diff --git a/package.json b/package.json index 1e2e355d..50328b4c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "meshcentral", - "version": "0.7.72", + "version": "0.7.73", "keywords": [ "Remote Device Management", "Remote Device Monitoring", diff --git a/public/scripts/agent-desktop-0.0.2-min.js b/public/scripts/agent-desktop-0.0.2-min.js index d54342f4..cb057eb3 100644 --- a/public/scripts/agent-desktop-0.0.2-min.js +++ b/public/scripts/agent-desktop-0.0.2-min.js @@ -1 +1 @@ -Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(e,t){return new Uint8Array(Array.prototype.slice.call(this,e,t))}});var CreateAgentRemoteDesktop=function(e,t){var h={};"string"==typeof(h.CanvasId=e)&&(h.CanvasId=Q(e)),h.Canvas=h.CanvasId.getContext("2d"),h.scrolldiv=t,h.State=0,h.PendingOperations=[],h.tilesReceived=0,h.TilesDrawn=0,h.KillDraw=0,h.ipad=!1,h.tabletKeyboardVisible=!1,h.LastX=0,h.LastY=0,h.touchenabled=0,h.submenuoffset=0,h.touchtimer=null,h.TouchArray={},h.connectmode=0,h.connectioncount=0,h.rotation=0,h.protocol=2,h.debugmode=0,h.firstUpKeys=[],h.stopInput=!1,h.localKeyMap=!0,h.remoteKeyMap=!1,h.pressedKeys=[],h.sessionid=0,h.username,h.oldie=!1,h.CompressionLevel=50,h.ScalingLevel=1024,h.FrameRateTimer=100,h.SwapMouse=!1,h.FirstDraw=!1,h.ScreenWidth=960,h.ScreenHeight=701,h.width=960,h.height=960,h.displays=null,h.selectedDisplay=null,h.onScreenSizeChange=null,h.onMessage=null,h.onConnectCountChanged=null,h.onDebugMessage=null,h.onTouchEnabledChanged=null,h.onDisplayinfo=null;var g=!(h.accumulator=null),p="default";h.mouseCursorActive=function(e){g!=e&&(g=e,h.CanvasId.style.cursor=1==e?p:"default")};var S=["default","progress","crosshair","pointer","help","text","no-drop","move","nesw-resize","ns-resize","nwse-resize","w-resize","alias","wait","none","not-allowed","col-resize","row-resize","copy","zoom-in","zoom-out"];h.Start=function(){h.State=0,h.accumulator=null},h.Stop=function(){h.setRotation(0),h.UnGrabKeyInput(),h.UnGrabMouseInput(),h.touchenabled=0,null!=h.onScreenSizeChange&&h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight,h.CanvasId),h.Canvas.clearRect(0,0,h.CanvasId.width,h.CanvasId.height)},h.xxStateChange=function(e){if(h.State!=e)switch(h.State=e,h.CanvasId.style.cursor="default",e){case 0:h.Stop()}},h.send=function(e){2>32)+h.intToStr(32&o)):(h.recordedSize+=n.length,h.shortToStr(e)+h.shortToStr(t)+h.intToStr(n.length)+h.intToStr(o>>32)+h.intToStr(32&o)+n)}return h.SendKeyMsg=function(e,t){var n;null!=e&&((t=t||window.event).code&&0==h.localKeyMap?null!=(n=function(e){return e.code.startsWith("Key")&&4==e.code.length?e.code.charCodeAt(3):e.code.startsWith("Digit")&&6==e.code.length?e.code.charCodeAt(5):e.code.startsWith("Numpad")&&7==e.code.length?e.code.charCodeAt(6)+48:o[e.code]}(t))&&h.SendKeyMsgKC(e,n):(59==(n=t.keyCode)?n=186:173==n?n=189:61==n&&(n=187),h.SendKeyMsgKC(e,n)))},h.SendMessage=function(e){3==h.State&&h.send(String.fromCharCode(0,17)+h.shortToStr(4+e.length)+e)},h.SendKeyMsgKC=function(e,t){if(3==h.State)if("object"==typeof e)for(var n in e)h.SendKeyMsgKC(e[n][0],e[n][1]);else{if(1==e)-1==h.pressedKeys.indexOf(t)&&h.pressedKeys.unshift(t);else if(2==e){-1!=(n=h.pressedKeys.indexOf(t))&&h.pressedKeys.splice(n,1)}0>8),255-(255&Math.abs(c))):(l=c>>8,255&c),u=String.fromCharCode(0,h.InputType.MOUSE,0,12,0,0,r/256&255,255&r,i/256&255,255&i,l,d)}else u=String.fromCharCode(0,h.InputType.MOUSE,0,10,0,e==h.KeyAction.DOWN?s:2*s&255,r/256&255,255&r,i/256&255,255&i);h.Action==h.KeyAction.NONE?0==h.Alternate||h.ipad?(h.send(u),h.Alternate=1):h.Alternate=0:h.send(u)}}},h.GetDisplayNumbers=function(){h.send(String.fromCharCode(0,11,0,4))},h.SetDisplay=function(e){h.send(String.fromCharCode(0,12,0,6,e>>8,255&e))},h.intToStr=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},h.shortToStr=function(e){return String.fromCharCode(e>>8&255,255&e)},h.onResize=function(){0!=h.ScreenWidth&&0!=h.ScreenHeight&&(h.Canvas.canvas.width==h.ScreenWidth&&h.Canvas.canvas.height==h.ScreenHeight||(h.FirstDraw&&(h.Canvas.canvas.width=h.ScreenWidth,h.Canvas.canvas.height=h.ScreenHeight,h.Canvas.fillRect(0,0,h.ScreenWidth,h.ScreenHeight),null!=h.onScreenSizeChange&&h.onScreenSizeChange(h,h.ScreenWidth,h.ScreenHeight,h.CanvasId)),h.FirstDraw=!1,1>32)+l.intToStr(32&o)):(l.recordedSize+=n.length,l.shortToStr(e)+l.shortToStr(t)+l.intToStr(n.length)+l.intToStr(o>>32)+l.intToStr(32&o)+n)}return l.SendKeyMsg=function(e,t){var n;null!=e&&((t=t||window.event).code&&0==l.localKeyMap?null!=(n=(n=t).code.startsWith("Key")&&4==n.code.length?n.code.charCodeAt(3):n.code.startsWith("Digit")&&6==n.code.length?n.code.charCodeAt(5):n.code.startsWith("Numpad")&&7==n.code.length?n.code.charCodeAt(6)+48:o[n.code])&&l.SendKeyMsgKC(e,n):(59==(n=t.keyCode)?n=186:173==n?n=189:61==n&&(n=187),l.SendKeyMsgKC(e,n)))},l.SendMessage=function(e){3==l.State&&l.send(String.fromCharCode(0,17)+l.shortToStr(4+e.length)+e)},l.SendKeyMsgKC=function(e,t){if(3==l.State)if("object"==typeof e)for(var n in e)l.SendKeyMsgKC(e[n][0],e[n][1]);else 1==e?-1==l.pressedKeys.indexOf(t)&&l.pressedKeys.unshift(t):2==e&&-1!=(n=l.pressedKeys.indexOf(t))&&l.pressedKeys.splice(n,1),0>8),255-(255&Math.abs(r))):(s=r>>8,255&r),String.fromCharCode(0,l.InputType.MOUSE,0,12,0,0,n/256&255,255&n,o/256&255,255&o,s,t)):String.fromCharCode(0,l.InputType.MOUSE,0,10,0,e==l.KeyAction.DOWN?a:2*a&255,n/256&255,255&n,o/256&255,255&o),l.Action==l.KeyAction.NONE?0==l.Alternate||l.ipad?(l.send(i),l.Alternate=1):l.Alternate=0:l.send(i)))},l.GetDisplayNumbers=function(){l.send(String.fromCharCode(0,11,0,4))},l.SetDisplay=function(e){l.send(String.fromCharCode(0,12,0,6,e>>8,255&e))},l.intToStr=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},l.shortToStr=function(e){return String.fromCharCode(e>>8&255,255&e)},l.onResize=function(){0!=l.ScreenWidth&&0!=l.ScreenHeight&&(l.Canvas.canvas.width==l.ScreenWidth&&l.Canvas.canvas.height==l.ScreenHeight||(l.FirstDraw&&(l.Canvas.canvas.width=l.ScreenWidth,l.Canvas.canvas.height=l.ScreenHeight,l.Canvas.fillRect(0,0,l.ScreenWidth,l.ScreenHeight),null!=l.onScreenSizeChange&&l.onScreenSizeChange(l,l.ScreenWidth,l.ScreenHeight,l.CanvasId)),l.FirstDraw=!1,1=E.MaxActiveEnumsCount||0==E.PendingEnums.length)){var t=E.PendingEnums.shift();E.Enum(t[0],t[1],t[2]),_(0)}}function r(o){o.names.length<=o.current?o.callback(E,o.name,o.responses,200,o.tag):(E.wsman.ExecGet(E.CompleteName(o.names[o.current]),function(e,t,n,i){!function(e,t,n){null==t||200!=n?e.callback(E,e.name,null,n,e.tag):(e.responses[t.Header.Method]=t,r(e))}(o,n,i)},o.pri),o.current++),A()}function i(e,t,n,i,o){200==i&&"0"==n.Body.ReturnValue?E.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,l,o):o[0](E,null,o[2])}function l(e,t,n,i,o){if(200==i&&"0"==n.Body.ReturnValue){var r,c,a,s,u,d=o[2],S=new Date,A=n.Body.RecordArray;for(r in"string"==typeof A&&(n.Body.RecordArray=[n.Body.RecordArray]),A){s=null;try{s=window.atob(A[r])}catch(e){}if(null!=s&&0<(u=ReadIntX(s,0))&&u<4294967295){for(a={DeviceAddress:s.charCodeAt(4),EventSensorType:s.charCodeAt(5),EventType:s.charCodeAt(6),EventOffset:s.charCodeAt(7),EventSourceType:s.charCodeAt(8),EventSeverity:s.charCodeAt(9),SensorNumber:s.charCodeAt(10),Entity:s.charCodeAt(11),EntityInstance:s.charCodeAt(12),EventData:[],Time:new Date(1e3*(u+60*S.getTimezoneOffset()))},c=13;c<21;c++)a.EventData.push(s.charCodeAt(c));a.EntityStr=C[a.Entity],a.Desc=m(a.EventSensorType,a.EventOffset,a.EventData,a.Entity),a.EntityStr||(a.EntityStr="Unknown"),d.push(a)}}1!=n.Body.NoMoreRecords?E.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,l,[o[0],d,o[2]]):o[0](E,d,o[2])}else o[0](E,null,o[2])}E.GetPendingActions=function(){return 2*E.PendingEnums.length+E.ActiveEnumsCount+E.wsman.comm.PendingAjax.length+E.wsman.comm.ActiveAjaxCount+E.PendingBatchOperations},E.Subscribe=function(o,e,t,r,c,n,i,a,s,u){E.wsman.ExecSubscribe(E.CompleteName(o),e,t,function(e,t,n,i){A(),r(E,o,n,i,c)},0,n,i,a,s,u),A()},E.UnSubscribe=function(o,r,c,e,t){E.wsman.ExecUnSubscribe(E.CompleteName(o),function(e,t,n,i){A(),r(E,o,n,i,c)},0,e,t),A()},E.Get=function(o,r,c,e){E.wsman.ExecGet(E.CompleteName(o),function(e,t,n,i){A(),r(E,o,n,i,c)},0,e),A()},E.Put=function(o,e,r,c,t,n){E.wsman.ExecPut(E.CompleteName(o),e,function(e,t,n,i){A(),r(E,o,n,i,c)},0,t,n),A()},E.Create=function(o,e,r,c,t){E.wsman.ExecCreate(E.CompleteName(o),e,function(e,t,n,i){A(),r(E,o,n,i,c)},0,t),A()},E.Delete=function(o,e,r,c,t){E.wsman.ExecDelete(E.CompleteName(o),e,function(e,t,n,i){A(),r(E,o,n,i,c)},0,t),A()},E.Exec=function(o,e,t,r,c,n,i){E.wsman.ExecMethod(E.CompleteName(o),e,t,function(e,t,n,i){A(),r(E,o,E.CompleteExecResponse(n),i,c)},0,n,i),A()},E.ExecWithXml=function(o,e,t,r,c,n,i){E.wsman.ExecMethodXml(E.CompleteName(o),e,execArgumentsToXml(t),function(e,t,n,i){A(),r(E,o,E.CompleteExecResponse(n),i,c)},0,n,i),A()},E.Enum=function(r,c,e,t){E.ActiveEnumsCounthttp://schemas.xmlsoap.org/ws/2004/08/addressinghttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,t)},E.SetBootConfigRole=function(e,t){E.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',e,t)},E.CancelAllQueries=function(e){E.wsman.CancelAllQueries(e)},E.AMT_AgentPresenceWatchdog_RegisterAgent=function(e){E.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},e)},E.AMT_AgentPresenceWatchdog_AssertPresence=function(e,t){E.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:e},t)},E.AMT_AgentPresenceWatchdog_AssertShutdown=function(e,t){E.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:e},t)},E.AMT_AgentPresenceWatchdog_AddAction=function(e,t,n,i,o,r,c,a,s){E.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r,c,a,s)},E.AMT_AgentPresenceWatchdog_DeleteAllActions=function(e,t,n,i){E.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},e,t,n,i)},E.AMT_AgentPresenceWatchdogAction_GetActionEac=function(e){E.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},e)},E.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(e){E.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},e)},E.AMT_AgentPresenceWatchdogVA_AssertPresence=function(e,t){E.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:e},t)},E.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(e,t){E.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:e},t)},E.AMT_AgentPresenceWatchdogVA_AddAction=function(e,t,n,i,o,r){E.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r)},E.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(e,t){E.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:e},t)},E.AMT_AuditLog_ClearLog=function(e){E.Exec("AMT_AuditLog","ClearLog",{},e)},E.AMT_AuditLog_RequestStateChange=function(e,t,n){E.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AMT_AuditLog_ReadRecords=function(e,t,n){E.Exec("AMT_AuditLog","ReadRecords",{StartIndex:e},t,n)},E.AMT_AuditLog_SetAuditLock=function(e,t,n,i){E.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:e,Flag:t,Handle:n},i)},E.AMT_AuditLog_ExportAuditLogSignature=function(e,t){E.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:e},t)},E.AMT_AuditLog_SetSigningKeyMaterial=function(e,t,n,i,o){E.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:e,SigningKey:t,LengthOfCertificates:n,Certificates:i},o)},E.AMT_AuditPolicyRule_SetAuditPolicy=function(e,t,n,i,o){E.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},E.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(e,t,n,i,o){E.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},E.AMT_AuthorizationService_AddUserAclEntryEx=function(e,t,n,i,o,r){E.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:e,DigestPassword:t,KerberosUserSid:n,AccessPermission:i,Realms:o},r)},E.AMT_AuthorizationService_EnumerateUserAclEntries=function(e,t){E.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:e},t)},E.AMT_AuthorizationService_GetUserAclEntryEx=function(e,t,n){E.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:e},t,n)},E.AMT_AuthorizationService_UpdateUserAclEntryEx=function(e,t,n,i,o,r,c){E.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:e,DigestUsername:t,DigestPassword:n,KerberosUserSid:i,AccessPermission:o,Realms:r},c)},E.AMT_AuthorizationService_RemoveUserAclEntry=function(e,t){E.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:e},t)},E.AMT_AuthorizationService_SetAdminAclEntryEx=function(e,t,n){E.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:e,DigestPassword:t},n)},E.AMT_AuthorizationService_GetAdminAclEntry=function(e){E.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},e)},E.AMT_AuthorizationService_GetAdminAclEntryStatus=function(e){E.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},e)},E.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(e){E.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},e)},E.AMT_AuthorizationService_SetAclEnabledState=function(e,t,n,i){E.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:e,Enabled:t},n,i)},E.AMT_AuthorizationService_GetAclEnabledState=function(e,t,n){E.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:e},t,n)},E.AMT_EndpointAccessControlService_RequestStateChange=function(e,t,n){E.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AMT_EndpointAccessControlService_GetPosture=function(e,t){E.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:e},t)},E.AMT_EndpointAccessControlService_GetPostureHash=function(e,t){E.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:e},t)},E.AMT_EndpointAccessControlService_UpdatePostureState=function(e,t){E.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:e},t)},E.AMT_EndpointAccessControlService_GetEacOptions=function(e){E.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},e)},E.AMT_EndpointAccessControlService_SetEacOptions=function(e,t,n){E.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:e,PostureHashAlgorithm:t},n)},E.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(e,t){E.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:e},t)},E.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(e,t){E.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:e},t)},E.AMT_EthernetPortSettings_SetLinkPreference=function(e,t,n){E.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:e,Timeout:t},n)},E.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(e,t){E.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:e},t)},E.AMT_KerberosSettingData_GetCredentialCacheState=function(e){E.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},e)},E.AMT_KerberosSettingData_SetCredentialCacheState=function(e,t){E.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:e},t)},E.AMT_MessageLog_CancelIteration=function(e,t){E.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:e},t)},E.AMT_MessageLog_RequestStateChange=function(e,t,n){E.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AMT_MessageLog_ClearLog=function(e){E.Exec("AMT_MessageLog","ClearLog",{},e)},E.AMT_MessageLog_GetRecords=function(e,t,n,i){E.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:e,MaxReadRecords:t},n,i)},E.AMT_MessageLog_GetRecord=function(e,t,n){E.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:e,PositionToNext:t},n)},E.AMT_MessageLog_PositionAtRecord=function(e,t,n,i){E.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:e,MoveAbsolute:t,RecordNumber:n},i)},E.AMT_MessageLog_PositionToFirstRecord=function(e,t){E.Exec("AMT_MessageLog","PositionToFirstRecord",{},e,t)},E.AMT_MessageLog_FreezeLog=function(e,t){E.Exec("AMT_MessageLog","FreezeLog",{Freeze:e},t)},E.AMT_PublicKeyManagementService_AddCRL=function(e,t,n){E.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:e,SerialNumbers:t},n)},E.AMT_PublicKeyManagementService_ResetCRLList=function(e,t){E.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:e},t)},E.AMT_PublicKeyManagementService_AddCertificate=function(e,t){E.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:e},t)},E.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(e,t){E.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:e},t)},E.AMT_PublicKeyManagementService_AddKey=function(e,t){E.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:e},t)},E.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(e,t,n,i){E.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:e,DNName:t,Usage:n},i)},E.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(e,t,n,i){E.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:e,SigningAlgorithm:t,NullSignedCertificateRequest:n},i)},E.AMT_PublicKeyManagementService_GenerateKeyPair=function(e,t,n){E.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:e,KeyLength:t},n)},E.AMT_RedirectionService_RequestStateChange=function(e,t){E.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:e},t)},E.AMT_RedirectionService_TerminateSession=function(e,t){E.Exec("AMT_RedirectionService","TerminateSession",{SessionType:e},t)},E.AMT_RemoteAccessService_AddMpServer=function(e,t,n,i,o,r,c,a,s){E.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:e,InfoFormat:t,Port:n,AuthMethod:i,Certificate:o,Username:r,Password:c,CN:a},s)},E.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(e,t,n,i,o){E.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:e,TunnelLifeTime:t,ExtendedData:n,MpServer:i},o)},E.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(e,t){E.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:e},t)},E.AMT_SetupAndConfigurationService_CommitChanges=function(e,t){E.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:e},t)},E.AMT_SetupAndConfigurationService_Unprovision=function(e,t){E.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:e},t)},E.AMT_SetupAndConfigurationService_PartialUnprovision=function(e,t){E.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:e},t)},E.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(e,t){E.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:e},t)},E.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(e,t){E.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:e},t)},E.AMT_SetupAndConfigurationService_SetMEBxPassword=function(e,t){E.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:e},t)},E.AMT_SetupAndConfigurationService_SetTLSPSK=function(e,t,n){E.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:e,PPS:t},n)},E.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(e){E.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},e)},E.AMT_SetupAndConfigurationService_GetUuid=function(e){E.Exec("AMT_SetupAndConfigurationService","GetUuid",{},e)},E.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(e){E.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},e)},E.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(e){E.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},e)},E.AMT_SystemDefensePolicy_GetTimeout=function(e){E.Exec("AMT_SystemDefensePolicy","GetTimeout",{},e)},E.AMT_SystemDefensePolicy_SetTimeout=function(e,t){E.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:e},t)},E.AMT_SystemDefensePolicy_UpdateStatistics=function(e,t,n,i,o,r){E.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:e,ResetOnRead:t},n,i,o,r)},E.AMT_SystemPowerScheme_SetPowerScheme=function(e,t,n){E.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},e,n,0,{InstanceID:t})},E.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(e,t){E.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},e,t)},E.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(e,t,n,i,o){E.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:e,Tm1:t,Tm2:n},i,o)},E.AMT_UserInitiatedConnectionService_RequestStateChange=function(e,t,n){E.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AMT_WebUIService_RequestStateChange=function(e,t,n){E.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(e,t,n,i,o,r){E.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},E.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(e,t,n,i,o,r){E.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},E.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(e,t){E.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:e},t)},E.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(e,t){E.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:e},t)},E.CIM_Account_RequestStateChange=function(e,t,n){E.Exec("CIM_Account","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_AccountManagementService_CreateAccount=function(e,t,n){E.Exec("CIM_AccountManagementService","CreateAccount",{System:e,AccountTemplate:t},n)},E.CIM_BootConfigSetting_ChangeBootOrder=function(e,t){E.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:e},t)},E.CIM_BootService_SetBootConfigRole=function(e,t,n){E.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:e,Role:t},n,0,1)},E.CIM_Card_ConnectorPower=function(e,t,n){E.Exec("CIM_Card","ConnectorPower",{Connector:e,PoweredOn:t},n)},E.CIM_Card_IsCompatible=function(e,t){E.Exec("CIM_Card","IsCompatible",{ElementToCheck:e},t)},E.CIM_Chassis_IsCompatible=function(e,t){E.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:e},t)},E.CIM_Fan_SetSpeed=function(e,t){E.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:e},t)},E.CIM_KVMRedirectionSAP_RequestStateChange=function(e,t,n){E.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:e},n)},E.CIM_MediaAccessDevice_LockMedia=function(e,t){E.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:e},t)},E.CIM_MediaAccessDevice_SetPowerState=function(e,t,n){E.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_MediaAccessDevice_Reset=function(e){E.Exec("CIM_MediaAccessDevice","Reset",{},e)},E.CIM_MediaAccessDevice_EnableDevice=function(e,t){E.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:e},t)},E.CIM_MediaAccessDevice_OnlineDevice=function(e,t){E.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:e},t)},E.CIM_MediaAccessDevice_QuiesceDevice=function(e,t){E.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:e},t)},E.CIM_MediaAccessDevice_SaveProperties=function(e){E.Exec("CIM_MediaAccessDevice","SaveProperties",{},e)},E.CIM_MediaAccessDevice_RestoreProperties=function(e){E.Exec("CIM_MediaAccessDevice","RestoreProperties",{},e)},E.CIM_MediaAccessDevice_RequestStateChange=function(e,t,n){E.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_PhysicalFrame_IsCompatible=function(e,t){E.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:e},t)},E.CIM_PhysicalPackage_IsCompatible=function(e,t){E.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:e},t)},E.CIM_PowerManagementService_RequestPowerStateChange=function(e,t,n,i,o){E.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:e,ManagedElement:t,Time:n,TimeoutPeriod:i},o,0,1)},E.CIM_PowerSupply_SetPowerState=function(e,t,n){E.Exec("CIM_PowerSupply","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_PowerSupply_Reset=function(e){E.Exec("CIM_PowerSupply","Reset",{},e)},E.CIM_PowerSupply_EnableDevice=function(e,t){E.Exec("CIM_PowerSupply","EnableDevice",{Enabled:e},t)},E.CIM_PowerSupply_OnlineDevice=function(e,t){E.Exec("CIM_PowerSupply","OnlineDevice",{Online:e},t)},E.CIM_PowerSupply_QuiesceDevice=function(e,t){E.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:e},t)},E.CIM_PowerSupply_SaveProperties=function(e){E.Exec("CIM_PowerSupply","SaveProperties",{},e)},E.CIM_PowerSupply_RestoreProperties=function(e){E.Exec("CIM_PowerSupply","RestoreProperties",{},e)},E.CIM_PowerSupply_RequestStateChange=function(e,t,n){E.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_Processor_SetPowerState=function(e,t,n){E.Exec("CIM_Processor","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_Processor_Reset=function(e){E.Exec("CIM_Processor","Reset",{},e)},E.CIM_Processor_EnableDevice=function(e,t){E.Exec("CIM_Processor","EnableDevice",{Enabled:e},t)},E.CIM_Processor_OnlineDevice=function(e,t){E.Exec("CIM_Processor","OnlineDevice",{Online:e},t)},E.CIM_Processor_QuiesceDevice=function(e,t){E.Exec("CIM_Processor","QuiesceDevice",{Quiesce:e},t)},E.CIM_Processor_SaveProperties=function(e){E.Exec("CIM_Processor","SaveProperties",{},e)},E.CIM_Processor_RestoreProperties=function(e){E.Exec("CIM_Processor","RestoreProperties",{},e)},E.CIM_Processor_RequestStateChange=function(e,t,n){E.Exec("CIM_Processor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_RecordLog_ClearLog=function(e){E.Exec("CIM_RecordLog","ClearLog",{},e)},E.CIM_RecordLog_RequestStateChange=function(e,t,n){E.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_RedirectionService_RequestStateChange=function(e,t,n){E.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_Sensor_SetPowerState=function(e,t,n){E.Exec("CIM_Sensor","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_Sensor_Reset=function(e){E.Exec("CIM_Sensor","Reset",{},e)},E.CIM_Sensor_EnableDevice=function(e,t){E.Exec("CIM_Sensor","EnableDevice",{Enabled:e},t)},E.CIM_Sensor_OnlineDevice=function(e,t){E.Exec("CIM_Sensor","OnlineDevice",{Online:e},t)},E.CIM_Sensor_QuiesceDevice=function(e,t){E.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:e},t)},E.CIM_Sensor_SaveProperties=function(e){E.Exec("CIM_Sensor","SaveProperties",{},e)},E.CIM_Sensor_RestoreProperties=function(e){E.Exec("CIM_Sensor","RestoreProperties",{},e)},E.CIM_Sensor_RequestStateChange=function(e,t,n){E.Exec("CIM_Sensor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_StatisticalData_ResetSelectedStats=function(e,t){E.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:e},t)},E.CIM_Watchdog_KeepAlive=function(e){E.Exec("CIM_Watchdog","KeepAlive",{},e)},E.CIM_Watchdog_SetPowerState=function(e,t,n){E.Exec("CIM_Watchdog","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_Watchdog_Reset=function(e){E.Exec("CIM_Watchdog","Reset",{},e)},E.CIM_Watchdog_EnableDevice=function(e,t){E.Exec("CIM_Watchdog","EnableDevice",{Enabled:e},t)},E.CIM_Watchdog_OnlineDevice=function(e,t){E.Exec("CIM_Watchdog","OnlineDevice",{Online:e},t)},E.CIM_Watchdog_QuiesceDevice=function(e,t){E.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:e},t)},E.CIM_Watchdog_SaveProperties=function(e){E.Exec("CIM_Watchdog","SaveProperties",{},e)},E.CIM_Watchdog_RestoreProperties=function(e){E.Exec("CIM_Watchdog","RestoreProperties",{},e)},E.CIM_Watchdog_RequestStateChange=function(e,t,n){E.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.CIM_WiFiPort_SetPowerState=function(e,t,n){E.Exec("CIM_WiFiPort","SetPowerState",{PowerState:e,Time:t},n)},E.CIM_WiFiPort_Reset=function(e){E.Exec("CIM_WiFiPort","Reset",{},e)},E.CIM_WiFiPort_EnableDevice=function(e,t){E.Exec("CIM_WiFiPort","EnableDevice",{Enabled:e},t)},E.CIM_WiFiPort_OnlineDevice=function(e,t){E.Exec("CIM_WiFiPort","OnlineDevice",{Online:e},t)},E.CIM_WiFiPort_QuiesceDevice=function(e,t){E.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:e},t)},E.CIM_WiFiPort_SaveProperties=function(e){E.Exec("CIM_WiFiPort","SaveProperties",{},e)},E.CIM_WiFiPort_RestoreProperties=function(e){E.Exec("CIM_WiFiPort","RestoreProperties",{},e)},E.CIM_WiFiPort_RequestStateChange=function(e,t,n){E.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.IPS_HostBasedSetupService_Setup=function(e,t,n,i,o,r,c){E.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,Certificate:i,SigningAlgorithm:o,DigitalSignature:r},c)},E.IPS_HostBasedSetupService_AddNextCertInChain=function(e,t,n,i){E.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:e,IsLeafCertificate:t,IsRootCertificate:n},i)},E.IPS_HostBasedSetupService_AdminSetup=function(e,t,n,i,o,r){E.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,SigningAlgorithm:i,DigitalSignature:o},r)},E.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(e,t,n,i){E.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:e,SigningAlgorithm:t,DigitalSignature:n},i)},E.IPS_HostBasedSetupService_DisableClientControlMode=function(e,t){E.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:e},t)},E.IPS_KVMRedirectionSettingData_TerminateSession=function(e){E.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},e)},E.IPS_OptInService_StartOptIn=function(e){E.Exec("IPS_OptInService","StartOptIn",{},e)},E.IPS_OptInService_CancelOptIn=function(e){E.Exec("IPS_OptInService","CancelOptIn",{},e)},E.IPS_OptInService_SendOptInCode=function(e,t){E.Exec("IPS_OptInService","SendOptInCode",{OptInCode:e},t)},E.IPS_OptInService_StartService=function(e){E.Exec("IPS_OptInService","StartService",{},e)},E.IPS_OptInService_StopService=function(e){E.Exec("IPS_OptInService","StopService",{},e)},E.IPS_OptInService_RequestStateChange=function(e,t,n){E.Exec("IPS_OptInService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.IPS_ProvisioningRecordLog_RequestStateChange=function(e,t,n){E.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.IPS_ProvisioningRecordLog_ClearLog=function(e,t){E.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:e},t)},E.IPS_SecIOService_RequestStateChange=function(e,t,n){E.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},E.AmtStatusToStr=function(e){return E.AmtStatusCodes[e]?E.AmtStatusCodes[e]:"UNKNOWN_ERROR"},E.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"},E.GetMessageLog=function(e,t){E.AMT_MessageLog_PositionToFirstRecord(i,[e,t,[]])};"Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var o="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|"),c="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|"),C="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");function m(e,t,n){return 15==e?235==n[0]?"Invalid Data":0==t?o[n[1]]:c[n[1]]:18==e&&170==n[0]?"Agent watchdog "+char2hex(n[4])+char2hex(n[3])+char2hex(n[2])+char2hex(n[1])+"-"+char2hex(n[6])+char2hex(n[5])+"-... changed to "+E.WatchdogCurrentStates[n[7]]:6==e?"Authentication failed "+(n[1]+(n[2]<<8))+" times. The system may be under attack.":30==e?"No bootable media":32==e?"Operating system lockup or power interrupt":35==e?"System boot failure":37==e?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+e}E.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|"),E.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var g={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2e3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel® ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3e3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};function M(e,t,n,i,o){if(200==i){var r,c,a,s,u,d=o[1],S=new Date;if(0Local",r=5),3==s.InitiatorType&&(s.Initiator="KVM Default Port",r=5),u=ReadInt(a,r),s.Time=new Date(1e3*(u+60*S.getTimezoneOffset())),r+=4,s.MCLocationType=a.charCodeAt(r++);var _=a.charCodeAt(r++);s.NetAddress=a.substring(r,r+_),r+=_;var l=a.charCodeAt(r++);s.Ex=a.substring(r,r+l),s.ExStr=E.GetAuditLogExtendedDataStr(100*s.AuditAppID+s.EventID,s.Ex),d.push(s)}n.Body.TotalRecordCount>d.length?E.AMT_AuditLog_ReadRecords(d.length+1,M,[o[0],d]):o[0](E,d,i)}else o[0](E,[],i)}return E.GetAuditLogExtendedDataStr=function(e,t){if((1602==e||1604==e)&&0==t.charCodeAt(0))return t.substring(2,2+t.charCodeAt(1));if(1603==e)return 0==t.charCodeAt(1)?t.substring(3):null;if(1605==e)return["Invalid ME access","Invalid MEBx access"][t.charCodeAt(0)];if(1606==e){var n=["Disabled","Enabled"][t.charCodeAt(0)];return 0==t.charCodeAt(1)&&(n+=", "+t.substring(3)),n}if(1607==e)return"Remote "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(1)];if(1617==e)return E.RealmNames[ReadInt(t,0)]+", "+["NoAuth","Auth","Disabled"][t.charCodeAt(4)];if(1619==e)return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][t.charCodeAt(0)];if(1900==e)return"From "+ReadShort(t,0)+"."+ReadShort(t,2)+"."+ReadShort(t,4)+"."+ReadShort(t,6)+" to "+ReadShort(t,8)+"."+ReadShort(t,10)+"."+ReadShort(t,12)+"."+ReadShort(t,14);if(2100!=e)return 3e3==e?"From "+["None","KVM","All"][t.charCodeAt(0)]+" to "+["None","KVM","All"][t.charCodeAt(1)]:3001==e?["Success","Failed 3 times"][t.charCodeAt(0)]:null;var i=new Date;return i.setTime(1e3*ReadInt(t,0)+6e4*(new Date).getTimezoneOffset()),i.toLocaleString()},E.GetAuditLog=function(e){E.AMT_AuditLog_ReadRecords(1,M,[e,[]])},E}function hex_md5(e){return null==e&&(e=""),forge.md.md5.create().update(e).digest().toHex()}for(var md5_k=[],i=0;i<64;)md5_k[i]=0|4294967296*Math.abs(Math.sin(++i));function hex_md5(e){null==e&&(e="");for(var t,n,i,o,r=[],c=unescape(encodeURI(e)),a=c.length,s=[t=1732584193,n=-271733879,~t,~n],u=0;u<=a;)r[u>>2]|=(c.charCodeAt(u)||128)<>6)+14]=8*a,u=0;u>4]+(md5_k[o]+(0|r[[o,5*o+1,3*o+5,7*o][a]%16+u])))<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>32-a),t,n];for(o=4;o;)s[--o]=s[o]+a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^7&o++)&15).toString(16);return e}function rstr_md5(e){return hex2rstr(hex_md5(e))}function execArgumentsToXml(e){if(null==e)return null;var t="";for(var n in e){var i=e[n];i&&("reference"===i.__parameterType?t+=referenceToXml(n,i):t+=instanceToXml(n,i))}return t}function instanceToXml(e,t){if(null==t)return null;var n=!!t.__namespace,i=n?"";for(var c in t)t.hasOwnProperty(c)&&0!==c.indexOf("__")&&("function"==typeof t[c]||Array.isArray(t[c])||("object"==typeof t[c]?console.error("only convert one level down..."):r+=i+c+">"+t[c].toString()+o+c+">"));return r+=""}function referenceToXml(e,t){if(null==t)return null;var n="/wsman"+t.__resourceUri+"";for(var i in t)t.hasOwnProperty(i)&&0!==i.indexOf("__")&&("function"==typeof t[i]||"object"==typeof t[i]||Array.isArray(t[i])||(n+=''+t[i].toString()+""));return n+=""}function GetSidString(e){for(var t="S-"+e.charCodeAt(0)+"-"+e.charCodeAt(7),n=2;n=C.MaxActiveEnumsCount||0==C.PendingEnums.length||(e=C.PendingEnums.shift(),C.Enum(e[0],e[1],e[2]),_(0))}function c(r){r.names.length<=r.current?r.callback(C,r.name,r.responses,200,r.tag):(C.wsman.ExecGet(C.CompleteName(r.names[r.current]),function(e,t,n,i){var o;o=r,i=i,null==(n=n)||200!=i?o.callback(C,o.name,null,i,o.tag):(o.responses[n.Header.Method]=n,c(o))},r.pri),r.current++),A()}function i(e,t,n,i,o){200==i&&"0"==n.Body.ReturnValue?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,o):o[0](C,null,o[2])}function m(e,t,n,i,o){if(200==i&&"0"==n.Body.ReturnValue){var r,c,a,s,u,d,S,A,_=o[2],l=new Date,E=n.Body.RecordArray;for(r in"string"==typeof E&&(n.Body.RecordArray=[n.Body.RecordArray]),E){s=null;try{s=window.atob(E[r])}catch(e){}if(null!=s&&0<(u=ReadIntX(s,0))&&u<4294967295){for(a={DeviceAddress:s.charCodeAt(4),EventSensorType:s.charCodeAt(5),EventType:s.charCodeAt(6),EventOffset:s.charCodeAt(7),EventSourceType:s.charCodeAt(8),EventSeverity:s.charCodeAt(9),SensorNumber:s.charCodeAt(10),Entity:s.charCodeAt(11),EntityInstance:s.charCodeAt(12),EventData:[],Time:new Date(1e3*(u+60*l.getTimezoneOffset()))},c=13;c<21;c++)a.EventData.push(s.charCodeAt(c));a.EntityStr=I[a.Entity],a.Desc=(d=a.EventSensorType,S=a.EventOffset,A=a.EventData,a.Entity,15!=d?18!=d||170!=A[0]?6==d?"Authentication failed "+(A[1]+(A[2]<<8))+" times. The system may be under attack.":30==d?"No bootable media":32==d?"Operating system lockup or power interrupt":35==d?"System boot failure":37==d?"System firmware started (at least one CPU is properly executing).":"Unknown Sensor Type #"+d:"Agent watchdog "+char2hex(A[4])+char2hex(A[3])+char2hex(A[2])+char2hex(A[1])+"-"+char2hex(A[6])+char2hex(A[5])+"-... changed to "+C.WatchdogCurrentStates[A[7]]:235==A[0]?"Invalid Data":(0==S?g:M)[A[1]]),a.EntityStr||(a.EntityStr="Unknown"),_.push(a)}}1!=n.Body.NoMoreRecords?C.AMT_MessageLog_GetRecords(n.Body.IterationIdentifier,390,m,[o[0],_,o[2]]):o[0](C,_,o[2])}else o[0](C,null,o[2])}C.GetPendingActions=function(){return 2*C.PendingEnums.length+C.ActiveEnumsCount+C.wsman.comm.PendingAjax.length+C.wsman.comm.ActiveAjaxCount+C.PendingBatchOperations},C.Subscribe=function(o,e,t,r,c,n,i,a,s,u){C.wsman.ExecSubscribe(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,n,i,c)},0,n,i,a,s,u),A()},C.UnSubscribe=function(o,r,c,e,t){C.wsman.ExecUnSubscribe(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e,t),A()},C.Get=function(o,r,c,e){C.wsman.ExecGet(C.CompleteName(o),function(e,t,n,i){A(),r(C,o,n,i,c)},0,e),A()},C.Put=function(o,e,r,c,t,n){C.wsman.ExecPut(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t,n),A()},C.Create=function(o,e,r,c,t){C.wsman.ExecCreate(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Delete=function(o,e,r,c,t){C.wsman.ExecDelete(C.CompleteName(o),e,function(e,t,n,i){A(),r(C,o,n,i,c)},0,t),A()},C.Exec=function(o,e,t,r,c,n,i){C.wsman.ExecMethod(C.CompleteName(o),e,t,function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.ExecWithXml=function(o,e,t,r,c,n,i){C.wsman.ExecMethodXml(C.CompleteName(o),e,execArgumentsToXml(t),function(e,t,n,i){A(),r(C,o,C.CompleteExecResponse(n),i,c)},0,n,i),A()},C.Enum=function(s,u,e,t){C.ActiveEnumsCounthttp://schemas.xmlsoap.org/ws/2004/08/addressinghttp://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ComputerSystemCIM_ComputerSystemManagedSystem',null,null,t)},C.SetBootConfigRole=function(e,t){C.CIM_BootService_SetBootConfigRole('
http://schemas.xmlsoap.org/ws/2004/08/addressing
http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_BootConfigSettingIntel(r) AMT: Boot Configuration 0',e,t)},C.CancelAllQueries=function(e){C.wsman.CancelAllQueries(e)},C.AMT_AgentPresenceWatchdog_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdog","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdog_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdog","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdog_AddAction=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_AgentPresenceWatchdog","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r,c,a,s)},C.AMT_AgentPresenceWatchdog_DeleteAllActions=function(e,t,n,i){C.Exec("AMT_AgentPresenceWatchdog","DeleteAllActions",{},e,t,n,i)},C.AMT_AgentPresenceWatchdogAction_GetActionEac=function(e){C.Exec("AMT_AgentPresenceWatchdogAction","GetActionEac",{},e)},C.AMT_AgentPresenceWatchdogVA_RegisterAgent=function(e){C.Exec("AMT_AgentPresenceWatchdogVA","RegisterAgent",{},e)},C.AMT_AgentPresenceWatchdogVA_AssertPresence=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertPresence",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AssertShutdown=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","AssertShutdown",{SequenceNumber:e},t)},C.AMT_AgentPresenceWatchdogVA_AddAction=function(e,t,n,i,o,r){C.Exec("AMT_AgentPresenceWatchdogVA","AddAction",{OldState:e,NewState:t,EventOnTransition:n,ActionSd:i,ActionEac:o},r)},C.AMT_AgentPresenceWatchdogVA_DeleteAllActions=function(e,t){C.Exec("AMT_AgentPresenceWatchdogVA","DeleteAllActions",{_method_dummy:e},t)},C.AMT_AuditLog_ClearLog=function(e){C.Exec("AMT_AuditLog","ClearLog",{},e)},C.AMT_AuditLog_RequestStateChange=function(e,t,n){C.Exec("AMT_AuditLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_AuditLog_ReadRecords=function(e,t,n){C.Exec("AMT_AuditLog","ReadRecords",{StartIndex:e},t,n)},C.AMT_AuditLog_SetAuditLock=function(e,t,n,i){C.Exec("AMT_AuditLog","SetAuditLock",{LockTimeoutInSeconds:e,Flag:t,Handle:n},i)},C.AMT_AuditLog_ExportAuditLogSignature=function(e,t){C.Exec("AMT_AuditLog","ExportAuditLogSignature",{SigningMechanism:e},t)},C.AMT_AuditLog_SetSigningKeyMaterial=function(e,t,n,i,o){C.Exec("AMT_AuditLog","SetSigningKeyMaterial",{SigningMechanismType:e,SigningKey:t,LengthOfCertificates:n,Certificates:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicy=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicy",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuditPolicyRule_SetAuditPolicyBulk=function(e,t,n,i,o){C.Exec("AMT_AuditPolicyRule","SetAuditPolicyBulk",{Enable:e,AuditedAppID:t,EventID:n,PolicyType:i},o)},C.AMT_AuthorizationService_AddUserAclEntryEx=function(e,t,n,i,o,r){C.Exec("AMT_AuthorizationService","AddUserAclEntryEx",{DigestUsername:e,DigestPassword:t,KerberosUserSid:n,AccessPermission:i,Realms:o},r)},C.AMT_AuthorizationService_EnumerateUserAclEntries=function(e,t){C.Exec("AMT_AuthorizationService","EnumerateUserAclEntries",{StartIndex:e},t)},C.AMT_AuthorizationService_GetUserAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","GetUserAclEntryEx",{Handle:e},t,n)},C.AMT_AuthorizationService_UpdateUserAclEntryEx=function(e,t,n,i,o,r,c){C.Exec("AMT_AuthorizationService","UpdateUserAclEntryEx",{Handle:e,DigestUsername:t,DigestPassword:n,KerberosUserSid:i,AccessPermission:o,Realms:r},c)},C.AMT_AuthorizationService_RemoveUserAclEntry=function(e,t){C.Exec("AMT_AuthorizationService","RemoveUserAclEntry",{Handle:e},t)},C.AMT_AuthorizationService_SetAdminAclEntryEx=function(e,t,n){C.Exec("AMT_AuthorizationService","SetAdminAclEntryEx",{Username:e,DigestPassword:t},n)},C.AMT_AuthorizationService_GetAdminAclEntry=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntry",{},e)},C.AMT_AuthorizationService_GetAdminAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminAclEntryStatus",{},e)},C.AMT_AuthorizationService_GetAdminNetAclEntryStatus=function(e){C.Exec("AMT_AuthorizationService","GetAdminNetAclEntryStatus",{},e)},C.AMT_AuthorizationService_SetAclEnabledState=function(e,t,n,i){C.Exec("AMT_AuthorizationService","SetAclEnabledState",{Handle:e,Enabled:t},n,i)},C.AMT_AuthorizationService_GetAclEnabledState=function(e,t,n){C.Exec("AMT_AuthorizationService","GetAclEnabledState",{Handle:e},t,n)},C.AMT_EndpointAccessControlService_RequestStateChange=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_EndpointAccessControlService_GetPosture=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPosture",{PostureType:e},t)},C.AMT_EndpointAccessControlService_GetPostureHash=function(e,t){C.Exec("AMT_EndpointAccessControlService","GetPostureHash",{PostureType:e},t)},C.AMT_EndpointAccessControlService_UpdatePostureState=function(e,t){C.Exec("AMT_EndpointAccessControlService","UpdatePostureState",{UpdateType:e},t)},C.AMT_EndpointAccessControlService_GetEacOptions=function(e){C.Exec("AMT_EndpointAccessControlService","GetEacOptions",{},e)},C.AMT_EndpointAccessControlService_SetEacOptions=function(e,t,n){C.Exec("AMT_EndpointAccessControlService","SetEacOptions",{EacVendors:e,PostureHashAlgorithm:t},n)},C.AMT_EnvironmentDetectionSettingData_SetSystemDefensePolicy=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","SetSystemDefensePolicy",{Policy:e},t)},C.AMT_EnvironmentDetectionSettingData_EnableVpnRouting=function(e,t){C.Exec("AMT_EnvironmentDetectionSettingData","EnableVpnRouting",{Enable:e},t)},C.AMT_EthernetPortSettings_SetLinkPreference=function(e,t,n){C.Exec("AMT_EthernetPortSettings","SetLinkPreference",{LinkPreference:e,Timeout:t},n)},C.AMT_HeuristicPacketFilterStatistics_ResetSelectedStats=function(e,t){C.Exec("AMT_HeuristicPacketFilterStatistics","ResetSelectedStats",{SelectedStatistics:e},t)},C.AMT_KerberosSettingData_GetCredentialCacheState=function(e){C.Exec("AMT_KerberosSettingData","GetCredentialCacheState",{},e)},C.AMT_KerberosSettingData_SetCredentialCacheState=function(e,t){C.Exec("AMT_KerberosSettingData","SetCredentialCacheState",{Enable:e},t)},C.AMT_MessageLog_CancelIteration=function(e,t){C.Exec("AMT_MessageLog","CancelIteration",{IterationIdentifier:e},t)},C.AMT_MessageLog_RequestStateChange=function(e,t,n){C.Exec("AMT_MessageLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_MessageLog_ClearLog=function(e){C.Exec("AMT_MessageLog","ClearLog",{},e)},C.AMT_MessageLog_GetRecords=function(e,t,n,i){C.Exec("AMT_MessageLog","GetRecords",{IterationIdentifier:e,MaxReadRecords:t},n,i)},C.AMT_MessageLog_GetRecord=function(e,t,n){C.Exec("AMT_MessageLog","GetRecord",{IterationIdentifier:e,PositionToNext:t},n)},C.AMT_MessageLog_PositionAtRecord=function(e,t,n,i){C.Exec("AMT_MessageLog","PositionAtRecord",{IterationIdentifier:e,MoveAbsolute:t,RecordNumber:n},i)},C.AMT_MessageLog_PositionToFirstRecord=function(e,t){C.Exec("AMT_MessageLog","PositionToFirstRecord",{},e,t)},C.AMT_MessageLog_FreezeLog=function(e,t){C.Exec("AMT_MessageLog","FreezeLog",{Freeze:e},t)},C.AMT_PublicKeyManagementService_AddCRL=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","AddCRL",{Url:e,SerialNumbers:t},n)},C.AMT_PublicKeyManagementService_ResetCRLList=function(e,t){C.Exec("AMT_PublicKeyManagementService","ResetCRLList",{_method_dummy:e},t)},C.AMT_PublicKeyManagementService_AddCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddTrustedRootCertificate=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddTrustedRootCertificate",{CertificateBlob:e},t)},C.AMT_PublicKeyManagementService_AddKey=function(e,t){C.Exec("AMT_PublicKeyManagementService","AddKey",{KeyBlob:e},t)},C.AMT_PublicKeyManagementService_GeneratePKCS10Request=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10Request",{KeyPair:e,DNName:t,Usage:n},i)},C.AMT_PublicKeyManagementService_GeneratePKCS10RequestEx=function(e,t,n,i){C.Exec("AMT_PublicKeyManagementService","GeneratePKCS10RequestEx",{KeyPair:e,SigningAlgorithm:t,NullSignedCertificateRequest:n},i)},C.AMT_PublicKeyManagementService_GenerateKeyPair=function(e,t,n){C.Exec("AMT_PublicKeyManagementService","GenerateKeyPair",{KeyAlgorithm:e,KeyLength:t},n)},C.AMT_RedirectionService_RequestStateChange=function(e,t){C.Exec("AMT_RedirectionService","RequestStateChange",{RequestedState:e},t)},C.AMT_RedirectionService_TerminateSession=function(e,t){C.Exec("AMT_RedirectionService","TerminateSession",{SessionType:e},t)},C.AMT_RemoteAccessService_AddMpServer=function(e,t,n,i,o,r,c,a,s){C.Exec("AMT_RemoteAccessService","AddMpServer",{AccessInfo:e,InfoFormat:t,Port:n,AuthMethod:i,Certificate:o,Username:r,Password:c,CN:a},s)},C.AMT_RemoteAccessService_AddRemoteAccessPolicyRule=function(e,t,n,i,o){C.Exec("AMT_RemoteAccessService","AddRemoteAccessPolicyRule",{Trigger:e,TunnelLifeTime:t,ExtendedData:n,MpServer:i},o)},C.AMT_RemoteAccessService_CloseRemoteAccessConnection=function(e,t){C.Exec("AMT_RemoteAccessService","CloseRemoteAccessConnection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_CommitChanges=function(e,t){C.Exec("AMT_SetupAndConfigurationService","CommitChanges",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_Unprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","Unprovision",{ProvisioningMode:e},t)},C.AMT_SetupAndConfigurationService_PartialUnprovision=function(e,t){C.Exec("AMT_SetupAndConfigurationService","PartialUnprovision",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ResetFlashWearOutProtection=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ResetFlashWearOutProtection",{_method_dummy:e},t)},C.AMT_SetupAndConfigurationService_ExtendProvisioningPeriod=function(e,t){C.Exec("AMT_SetupAndConfigurationService","ExtendProvisioningPeriod",{Duration:e},t)},C.AMT_SetupAndConfigurationService_SetMEBxPassword=function(e,t){C.Exec("AMT_SetupAndConfigurationService","SetMEBxPassword",{Password:e},t)},C.AMT_SetupAndConfigurationService_SetTLSPSK=function(e,t,n){C.Exec("AMT_SetupAndConfigurationService","SetTLSPSK",{PID:e,PPS:t},n)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecord=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecord",{},e)},C.AMT_SetupAndConfigurationService_GetUuid=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUuid",{},e)},C.AMT_SetupAndConfigurationService_GetUnprovisionBlockingComponents=function(e){C.Exec("AMT_SetupAndConfigurationService","GetUnprovisionBlockingComponents",{},e)},C.AMT_SetupAndConfigurationService_GetProvisioningAuditRecordV2=function(e){C.Exec("AMT_SetupAndConfigurationService","GetProvisioningAuditRecordV2",{},e)},C.AMT_SystemDefensePolicy_GetTimeout=function(e){C.Exec("AMT_SystemDefensePolicy","GetTimeout",{},e)},C.AMT_SystemDefensePolicy_SetTimeout=function(e,t){C.Exec("AMT_SystemDefensePolicy","SetTimeout",{Timeout:e},t)},C.AMT_SystemDefensePolicy_UpdateStatistics=function(e,t,n,i,o,r){C.Exec("AMT_SystemDefensePolicy","UpdateStatistics",{NetworkInterface:e,ResetOnRead:t},n,i,o,r)},C.AMT_SystemPowerScheme_SetPowerScheme=function(e,t,n){C.Exec("AMT_SystemPowerScheme","SetPowerScheme",{},e,n,0,{InstanceID:t})},C.AMT_TimeSynchronizationService_GetLowAccuracyTimeSynch=function(e,t){C.Exec("AMT_TimeSynchronizationService","GetLowAccuracyTimeSynch",{},e,t)},C.AMT_TimeSynchronizationService_SetHighAccuracyTimeSynch=function(e,t,n,i,o){C.Exec("AMT_TimeSynchronizationService","SetHighAccuracyTimeSynch",{Ta0:e,Tm1:t,Tm2:n},i,o)},C.AMT_UserInitiatedConnectionService_RequestStateChange=function(e,t,n){C.Exec("AMT_UserInitiatedConnectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WebUIService_RequestStateChange=function(e,t,n){C.Exec("AMT_WebUIService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AMT_WiFiPortConfigurationService_AddWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","AddWiFiSettings",{WiFiEndpoint:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_UpdateWiFiSettings=function(e,t,n,i,o,r){C.ExecWithXml("AMT_WiFiPortConfigurationService","UpdateWiFiSettings",{WiFiEndpointSettings:e,WiFiEndpointSettingsInput:t,IEEE8021xSettingsInput:n,ClientCredential:i,CACredential:o},r)},C.AMT_WiFiPortConfigurationService_DeleteAllITProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllITProfiles",{_method_dummy:e},t)},C.AMT_WiFiPortConfigurationService_DeleteAllUserProfiles=function(e,t){C.Exec("AMT_WiFiPortConfigurationService","DeleteAllUserProfiles",{_method_dummy:e},t)},C.CIM_Account_RequestStateChange=function(e,t,n){C.Exec("CIM_Account","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_AccountManagementService_CreateAccount=function(e,t,n){C.Exec("CIM_AccountManagementService","CreateAccount",{System:e,AccountTemplate:t},n)},C.CIM_BootConfigSetting_ChangeBootOrder=function(e,t){C.Exec("CIM_BootConfigSetting","ChangeBootOrder",{Source:e},t)},C.CIM_BootService_SetBootConfigRole=function(e,t,n){C.Exec("CIM_BootService","SetBootConfigRole",{BootConfigSetting:e,Role:t},n,0,1)},C.CIM_Card_ConnectorPower=function(e,t,n){C.Exec("CIM_Card","ConnectorPower",{Connector:e,PoweredOn:t},n)},C.CIM_Card_IsCompatible=function(e,t){C.Exec("CIM_Card","IsCompatible",{ElementToCheck:e},t)},C.CIM_Chassis_IsCompatible=function(e,t){C.Exec("CIM_Chassis","IsCompatible",{ElementToCheck:e},t)},C.CIM_Fan_SetSpeed=function(e,t){C.Exec("CIM_Fan","SetSpeed",{DesiredSpeed:e},t)},C.CIM_KVMRedirectionSAP_RequestStateChange=function(e,t,n){C.Exec("CIM_KVMRedirectionSAP","RequestStateChange",{RequestedState:e},n)},C.CIM_MediaAccessDevice_LockMedia=function(e,t){C.Exec("CIM_MediaAccessDevice","LockMedia",{Lock:e},t)},C.CIM_MediaAccessDevice_SetPowerState=function(e,t,n){C.Exec("CIM_MediaAccessDevice","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_MediaAccessDevice_Reset=function(e){C.Exec("CIM_MediaAccessDevice","Reset",{},e)},C.CIM_MediaAccessDevice_EnableDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","EnableDevice",{Enabled:e},t)},C.CIM_MediaAccessDevice_OnlineDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","OnlineDevice",{Online:e},t)},C.CIM_MediaAccessDevice_QuiesceDevice=function(e,t){C.Exec("CIM_MediaAccessDevice","QuiesceDevice",{Quiesce:e},t)},C.CIM_MediaAccessDevice_SaveProperties=function(e){C.Exec("CIM_MediaAccessDevice","SaveProperties",{},e)},C.CIM_MediaAccessDevice_RestoreProperties=function(e){C.Exec("CIM_MediaAccessDevice","RestoreProperties",{},e)},C.CIM_MediaAccessDevice_RequestStateChange=function(e,t,n){C.Exec("CIM_MediaAccessDevice","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_PhysicalFrame_IsCompatible=function(e,t){C.Exec("CIM_PhysicalFrame","IsCompatible",{ElementToCheck:e},t)},C.CIM_PhysicalPackage_IsCompatible=function(e,t){C.Exec("CIM_PhysicalPackage","IsCompatible",{ElementToCheck:e},t)},C.CIM_PowerManagementService_RequestPowerStateChange=function(e,t,n,i,o){C.Exec("CIM_PowerManagementService","RequestPowerStateChange",{PowerState:e,ManagedElement:t,Time:n,TimeoutPeriod:i},o,0,1)},C.CIM_PowerSupply_SetPowerState=function(e,t,n){C.Exec("CIM_PowerSupply","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_PowerSupply_Reset=function(e){C.Exec("CIM_PowerSupply","Reset",{},e)},C.CIM_PowerSupply_EnableDevice=function(e,t){C.Exec("CIM_PowerSupply","EnableDevice",{Enabled:e},t)},C.CIM_PowerSupply_OnlineDevice=function(e,t){C.Exec("CIM_PowerSupply","OnlineDevice",{Online:e},t)},C.CIM_PowerSupply_QuiesceDevice=function(e,t){C.Exec("CIM_PowerSupply","QuiesceDevice",{Quiesce:e},t)},C.CIM_PowerSupply_SaveProperties=function(e){C.Exec("CIM_PowerSupply","SaveProperties",{},e)},C.CIM_PowerSupply_RestoreProperties=function(e){C.Exec("CIM_PowerSupply","RestoreProperties",{},e)},C.CIM_PowerSupply_RequestStateChange=function(e,t,n){C.Exec("CIM_PowerSupply","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Processor_SetPowerState=function(e,t,n){C.Exec("CIM_Processor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Processor_Reset=function(e){C.Exec("CIM_Processor","Reset",{},e)},C.CIM_Processor_EnableDevice=function(e,t){C.Exec("CIM_Processor","EnableDevice",{Enabled:e},t)},C.CIM_Processor_OnlineDevice=function(e,t){C.Exec("CIM_Processor","OnlineDevice",{Online:e},t)},C.CIM_Processor_QuiesceDevice=function(e,t){C.Exec("CIM_Processor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Processor_SaveProperties=function(e){C.Exec("CIM_Processor","SaveProperties",{},e)},C.CIM_Processor_RestoreProperties=function(e){C.Exec("CIM_Processor","RestoreProperties",{},e)},C.CIM_Processor_RequestStateChange=function(e,t,n){C.Exec("CIM_Processor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RecordLog_ClearLog=function(e){C.Exec("CIM_RecordLog","ClearLog",{},e)},C.CIM_RecordLog_RequestStateChange=function(e,t,n){C.Exec("CIM_RecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_RedirectionService_RequestStateChange=function(e,t,n){C.Exec("CIM_RedirectionService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_Sensor_SetPowerState=function(e,t,n){C.Exec("CIM_Sensor","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Sensor_Reset=function(e){C.Exec("CIM_Sensor","Reset",{},e)},C.CIM_Sensor_EnableDevice=function(e,t){C.Exec("CIM_Sensor","EnableDevice",{Enabled:e},t)},C.CIM_Sensor_OnlineDevice=function(e,t){C.Exec("CIM_Sensor","OnlineDevice",{Online:e},t)},C.CIM_Sensor_QuiesceDevice=function(e,t){C.Exec("CIM_Sensor","QuiesceDevice",{Quiesce:e},t)},C.CIM_Sensor_SaveProperties=function(e){C.Exec("CIM_Sensor","SaveProperties",{},e)},C.CIM_Sensor_RestoreProperties=function(e){C.Exec("CIM_Sensor","RestoreProperties",{},e)},C.CIM_Sensor_RequestStateChange=function(e,t,n){C.Exec("CIM_Sensor","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_StatisticalData_ResetSelectedStats=function(e,t){C.Exec("CIM_StatisticalData","ResetSelectedStats",{SelectedStatistics:e},t)},C.CIM_Watchdog_KeepAlive=function(e){C.Exec("CIM_Watchdog","KeepAlive",{},e)},C.CIM_Watchdog_SetPowerState=function(e,t,n){C.Exec("CIM_Watchdog","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_Watchdog_Reset=function(e){C.Exec("CIM_Watchdog","Reset",{},e)},C.CIM_Watchdog_EnableDevice=function(e,t){C.Exec("CIM_Watchdog","EnableDevice",{Enabled:e},t)},C.CIM_Watchdog_OnlineDevice=function(e,t){C.Exec("CIM_Watchdog","OnlineDevice",{Online:e},t)},C.CIM_Watchdog_QuiesceDevice=function(e,t){C.Exec("CIM_Watchdog","QuiesceDevice",{Quiesce:e},t)},C.CIM_Watchdog_SaveProperties=function(e){C.Exec("CIM_Watchdog","SaveProperties",{},e)},C.CIM_Watchdog_RestoreProperties=function(e){C.Exec("CIM_Watchdog","RestoreProperties",{},e)},C.CIM_Watchdog_RequestStateChange=function(e,t,n){C.Exec("CIM_Watchdog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.CIM_WiFiPort_SetPowerState=function(e,t,n){C.Exec("CIM_WiFiPort","SetPowerState",{PowerState:e,Time:t},n)},C.CIM_WiFiPort_Reset=function(e){C.Exec("CIM_WiFiPort","Reset",{},e)},C.CIM_WiFiPort_EnableDevice=function(e,t){C.Exec("CIM_WiFiPort","EnableDevice",{Enabled:e},t)},C.CIM_WiFiPort_OnlineDevice=function(e,t){C.Exec("CIM_WiFiPort","OnlineDevice",{Online:e},t)},C.CIM_WiFiPort_QuiesceDevice=function(e,t){C.Exec("CIM_WiFiPort","QuiesceDevice",{Quiesce:e},t)},C.CIM_WiFiPort_SaveProperties=function(e){C.Exec("CIM_WiFiPort","SaveProperties",{},e)},C.CIM_WiFiPort_RestoreProperties=function(e){C.Exec("CIM_WiFiPort","RestoreProperties",{},e)},C.CIM_WiFiPort_RequestStateChange=function(e,t,n){C.Exec("CIM_WiFiPort","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_HostBasedSetupService_Setup=function(e,t,n,i,o,r,c){C.Exec("IPS_HostBasedSetupService","Setup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,Certificate:i,SigningAlgorithm:o,DigitalSignature:r},c)},C.IPS_HostBasedSetupService_AddNextCertInChain=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","AddNextCertInChain",{NextCertificate:e,IsLeafCertificate:t,IsRootCertificate:n},i)},C.IPS_HostBasedSetupService_AdminSetup=function(e,t,n,i,o,r){C.Exec("IPS_HostBasedSetupService","AdminSetup",{NetAdminPassEncryptionType:e,NetworkAdminPassword:t,McNonce:n,SigningAlgorithm:i,DigitalSignature:o},r)},C.IPS_HostBasedSetupService_UpgradeClientToAdmin=function(e,t,n,i){C.Exec("IPS_HostBasedSetupService","UpgradeClientToAdmin",{McNonce:e,SigningAlgorithm:t,DigitalSignature:n},i)},C.IPS_HostBasedSetupService_DisableClientControlMode=function(e,t){C.Exec("IPS_HostBasedSetupService","DisableClientControlMode",{_method_dummy:e},t)},C.IPS_KVMRedirectionSettingData_TerminateSession=function(e){C.Exec("IPS_KVMRedirectionSettingData","TerminateSession",{},e)},C.IPS_OptInService_StartOptIn=function(e){C.Exec("IPS_OptInService","StartOptIn",{},e)},C.IPS_OptInService_CancelOptIn=function(e){C.Exec("IPS_OptInService","CancelOptIn",{},e)},C.IPS_OptInService_SendOptInCode=function(e,t){C.Exec("IPS_OptInService","SendOptInCode",{OptInCode:e},t)},C.IPS_OptInService_StartService=function(e){C.Exec("IPS_OptInService","StartService",{},e)},C.IPS_OptInService_StopService=function(e){C.Exec("IPS_OptInService","StopService",{},e)},C.IPS_OptInService_RequestStateChange=function(e,t,n){C.Exec("IPS_OptInService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_RequestStateChange=function(e,t,n){C.Exec("IPS_ProvisioningRecordLog","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.IPS_ProvisioningRecordLog_ClearLog=function(e,t){C.Exec("IPS_ProvisioningRecordLog","ClearLog",{_method_dummy:e},t)},C.IPS_SecIOService_RequestStateChange=function(e,t,n){C.Exec("IPS_SecIOService","RequestStateChange",{RequestedState:e,TimeoutPeriod:t},n)},C.AmtStatusToStr=function(e){return C.AmtStatusCodes[e]||"UNKNOWN_ERROR"},C.AmtStatusCodes={0:"SUCCESS",1:"INTERNAL_ERROR",2:"NOT_READY",3:"INVALID_PT_MODE",4:"INVALID_MESSAGE_LENGTH",5:"TABLE_FINGERPRINT_NOT_AVAILABLE",6:"INTEGRITY_CHECK_FAILED",7:"UNSUPPORTED_ISVS_VERSION",8:"APPLICATION_NOT_REGISTERED",9:"INVALID_REGISTRATION_DATA",10:"APPLICATION_DOES_NOT_EXIST",11:"NOT_ENOUGH_STORAGE",12:"INVALID_NAME",13:"BLOCK_DOES_NOT_EXIST",14:"INVALID_BYTE_OFFSET",15:"INVALID_BYTE_COUNT",16:"NOT_PERMITTED",17:"NOT_OWNER",18:"BLOCK_LOCKED_BY_OTHER",19:"BLOCK_NOT_LOCKED",20:"INVALID_GROUP_PERMISSIONS",21:"GROUP_DOES_NOT_EXIST",22:"INVALID_MEMBER_COUNT",23:"MAX_LIMIT_REACHED",24:"INVALID_AUTH_TYPE",25:"AUTHENTICATION_FAILED",26:"INVALID_DHCP_MODE",27:"INVALID_IP_ADDRESS",28:"INVALID_DOMAIN_NAME",29:"UNSUPPORTED_VERSION",30:"REQUEST_UNEXPECTED",31:"INVALID_TABLE_TYPE",32:"INVALID_PROVISIONING_STATE",33:"UNSUPPORTED_OBJECT",34:"INVALID_TIME",35:"INVALID_INDEX",36:"INVALID_PARAMETER",37:"INVALID_NETMASK",38:"FLASH_WRITE_LIMIT_EXCEEDED",39:"INVALID_IMAGE_LENGTH",40:"INVALID_IMAGE_SIGNATURE",41:"PROPOSE_ANOTHER_VERSION",42:"INVALID_PID_FORMAT",43:"INVALID_PPS_FORMAT",44:"BIST_COMMAND_BLOCKED",45:"CONNECTION_FAILED",46:"CONNECTION_TOO_MANY",47:"RNG_GENERATION_IN_PROGRESS",48:"RNG_NOT_READY",49:"CERTIFICATE_NOT_READY",1024:"DISABLED_BY_POLICY",2048:"NETWORK_IF_ERROR_BASE",2049:"UNSUPPORTED_OEM_NUMBER",2050:"UNSUPPORTED_BOOT_OPTION",2051:"INVALID_COMMAND",2052:"INVALID_SPECIAL_COMMAND",2053:"INVALID_HANDLE",2054:"INVALID_PASSWORD",2055:"INVALID_REALM",2056:"STORAGE_ACL_ENTRY_IN_USE",2057:"DATA_MISSING",2058:"DUPLICATE",2059:"EVENTLOG_FROZEN",2060:"PKI_MISSING_KEYS",2061:"PKI_GENERATING_KEYS",2062:"INVALID_KEY",2063:"INVALID_CERT",2064:"CERT_KEY_NOT_MATCH",2065:"MAX_KERB_DOMAIN_REACHED",2066:"UNSUPPORTED",2067:"INVALID_PRIORITY",2068:"NOT_FOUND",2069:"INVALID_CREDENTIALS",2070:"INVALID_PASSPHRASE",2072:"NO_ASSOCIATION",2075:"AUDIT_FAIL",2076:"BLOCKING_COMPONENT",2081:"USER_CONSENT_REQUIRED",4096:"APP_INTERNAL_ERROR",4097:"NOT_INITIALIZED",4098:"LIB_VERSION_UNSUPPORTED",4099:"INVALID_PARAM",4100:"RESOURCES",4101:"HARDWARE_ACCESS_ERROR",4102:"REQUESTOR_NOT_REGISTERED",4103:"NETWORK_ERROR",4104:"PARAM_BUFFER_TOO_SHORT",4105:"COM_NOT_INITIALIZED_IN_THREAD",4106:"URL_REQUIRED"},C.GetMessageLog=function(e,t){C.AMT_MessageLog_PositionToFirstRecord(i,[e,t,[]])};"Platform firmware (e.g. BIOS)|SMI handler|ISV system management software|Alert ASIC|IPMI|BIOS vendor|System board set vendor|System integrator|Third party add-in|OSV|NIC|System management card".split("|");var g="Unspecified.|No system memory is physically installed in the system.|No usable system memory, all installed memory has experienced an unrecoverable failure.|Unrecoverable hard-disk/ATAPI/IDE device failure.|Unrecoverable system-board failure.|Unrecoverable diskette subsystem failure.|Unrecoverable hard-disk controller failure.|Unrecoverable PS/2 or USB keyboard failure.|Removable boot media not found.|Unrecoverable video controller failure.|No video device detected.|Firmware (BIOS) ROM corruption detected.|CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)|CPU speed matching failure".split("|"),M="Unspecified.|Memory initialization.|Starting hard-disk initialization and test|Secondary processor(s) initialization|User authentication|User-initiated system setup|USB resource configuration|PCI resource configuration|Option ROM initialization|Video initialization|Cache initialization|SM Bus initialization|Keyboard controller initialization|Embedded controller/management controller initialization|Docking station attachment|Enabling docking station|Docking station ejection|Disabling docking station|Calling operating system wake-up vector|Starting operating system boot process|Baseboard or motherboard initialization|reserved|Floppy initialization|Keyboard test|Pointing device test|Primary processor initialization".split("|"),I="Unspecified|Other|Unknown|Processor|Disk|Peripheral|System management module|System board|Memory module|Processor module|Power supply|Add in card|Front panel board|Back panel board|Power system board|Drive backplane|System internal expansion board|Other system board|Processor board|Power unit|Power module|Power management board|Chassis back panel board|System chassis|Sub chassis|Other chassis board|Disk drive bay|Peripheral bay|Device bay|Fan cooling|Cooling unit|Cable interconnect|Memory device|System management software|BIOS|Intel(r) ME|System bus|Group|Intel(r) ME|External environment|Battery|Processing blade|Connectivity switch|Processor/memory module|I/O module|Processor I/O module|Management controller firmware|IPMI channel|PCI bus|PCI express bus|SCSI bus|SATA/SAS bus|Processor front side bus".split("|");C.RealmNames="||Redirection|PT Administration|Hardware Asset|Remote Control|Storage|Event Manager|Storage Admin|Agent Presence Local|Agent Presence Remote|Circuit Breaker|Network Time|General Information|Firmware Update|EIT|LocalUN|Endpoint Access Control|Endpoint Access Control Admin|Event Log Reader|Audit Log|ACL Realm|||Local System".split("|"),C.WatchdogCurrentStates={1:"Not Started",2:"Stopped",4:"Running",8:"Expired",16:"Suspended"};var l={16:"Security Admin",17:"RCO",18:"Redirection Manager",19:"Firmware Update Manager",20:"Security Audit Log",21:"Network Time",22:"Network Administration",23:"Storage Administration",24:"Event Manager",25:"Circuit Breaker Manager",26:"Agent Presence Manager",27:"Wireless Configuration",28:"EAC",29:"KVM",30:"User Opt-In Events",32:"Screen Blanking",33:"Watchdog Events",1600:"Provisioning Started",1601:"Provisioning Completed",1602:"ACL Entry Added",1603:"ACL Entry Modified",1604:"ACL Entry Removed",1605:"ACL Access with Invalid Credentials",1606:"ACL Entry State",1607:"TLS State Changed",1608:"TLS Server Certificate Set",1609:"TLS Server Certificate Remove",1610:"TLS Trusted Root Certificate Added",1611:"TLS Trusted Root Certificate Removed",1612:"TLS Preshared Key Set",1613:"Kerberos Settings Modified",1614:"Kerberos Main Key Modified",1615:"Flash Wear out Counters Reset",1616:"Power Package Modified",1617:"Set Realm Authentication Mode",1618:"Upgrade Client to Admin Control Mode",1619:"Unprovisioning Started",1700:"Performed Power Up",1701:"Performed Power Down",1702:"Performed Power Cycle",1703:"Performed Reset",1704:"Set Boot Options",1800:"IDER Session Opened",1801:"IDER Session Closed",1802:"IDER Enabled",1803:"IDER Disabled",1804:"SoL Session Opened",1805:"SoL Session Closed",1806:"SoL Enabled",1807:"SoL Disabled",1808:"KVM Session Started",1809:"KVM Session Ended",1810:"KVM Enabled",1811:"KVM Disabled",1812:"VNC Password Failed 3 Times",1900:"Firmware Updated",1901:"Firmware Update Failed",2e3:"Security Audit Log Cleared",2001:"Security Audit Policy Modified",2002:"Security Audit Log Disabled",2003:"Security Audit Log Enabled",2004:"Security Audit Log Exported",2005:"Security Audit Log Recovered",2100:"Intel® ME Time Set",2200:"TCPIP Parameters Set",2201:"Host Name Set",2202:"Domain Name Set",2203:"VLAN Parameters Set",2204:"Link Policy Set",2205:"IPv6 Parameters Set",2300:"Global Storage Attributes Set",2301:"Storage EACL Modified",2302:"Storage FPACL Modified",2303:"Storage Write Operation",2400:"Alert Subscribed",2401:"Alert Unsubscribed",2402:"Event Log Cleared",2403:"Event Log Frozen",2500:"CB Filter Added",2501:"CB Filter Removed",2502:"CB Policy Added",2503:"CB Policy Removed",2504:"CB Default Policy Set",2505:"CB Heuristics Option Set",2506:"CB Heuristics State Cleared",2600:"Agent Watchdog Added",2601:"Agent Watchdog Removed",2602:"Agent Watchdog Action Set",2700:"Wireless Profile Added",2701:"Wireless Profile Removed",2702:"Wireless Profile Updated",2800:"EAC Posture Signer SET",2801:"EAC Enabled",2802:"EAC Disabled",2803:"EAC Posture State",2804:"EAC Set Options",2900:"KVM Opt-in Enabled",2901:"KVM Opt-in Disabled",2902:"KVM Password Changed",2903:"KVM Consent Succeeded",2904:"KVM Consent Failed",3e3:"Opt-In Policy Change",3001:"Send Consent Code Event",3002:"Start Opt-In Blocked Event"};function E(e,t,n,i,o){if(200==i){var r,c,a,s,u,d=o[1],S=new Date;if(0Local",r=5),3==u.InitiatorType&&(u.Initiator="KVM Default Port",r=5),A=ReadInt(a,r),u.Time=new Date(1e3*(A+60*S.getTimezoneOffset())),r+=4,u.MCLocationType=a.charCodeAt(r++);var A=a.charCodeAt(r++);u.NetAddress=a.substring(r,r+A),r+=A;A=a.charCodeAt(r++);u.Ex=a.substring(r,r+A),u.ExStr=C.GetAuditLogExtendedDataStr(100*u.AuditAppID+u.EventID,u.Ex),d.push(u)}n.Body.TotalRecordCount>d.length?C.AMT_AuditLog_ReadRecords(d.length+1,E,[o[0],d]):o[0](C,d,i)}else o[0](C,[],i)}return C.GetAuditLogExtendedDataStr=function(e,t){if((1602==e||1604==e)&&0==t.charCodeAt(0))return t.substring(2,2+t.charCodeAt(1));if(1603==e)return 0==t.charCodeAt(1)?t.substring(3):null;if(1605==e)return["Invalid ME access","Invalid MEBx access"][t.charCodeAt(0)];if(1606==e){var n=["Disabled","Enabled"][t.charCodeAt(0)];return 0==t.charCodeAt(1)&&(n+=", "+t.substring(3)),n}if(1607==e)return"Remote "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(0)]+", Local "+["NoAuth","ServerAuth","MutualAuth"][t.charCodeAt(1)];if(1617==e)return C.RealmNames[ReadInt(t,0)]+", "+["NoAuth","Auth","Disabled"][t.charCodeAt(4)];if(1619==e)return["BIOS","MEBx","Local MEI","Local WSMAN","Remote WSAMN"][t.charCodeAt(0)];if(1900==e)return"From "+ReadShort(t,0)+"."+ReadShort(t,2)+"."+ReadShort(t,4)+"."+ReadShort(t,6)+" to "+ReadShort(t,8)+"."+ReadShort(t,10)+"."+ReadShort(t,12)+"."+ReadShort(t,14);if(2100!=e)return 3e3==e?"From "+["None","KVM","All"][t.charCodeAt(0)]+" to "+["None","KVM","All"][t.charCodeAt(1)]:3001==e?["Success","Failed 3 times"][t.charCodeAt(0)]:null;e=new Date;return e.setTime(1e3*ReadInt(t,0)+6e4*(new Date).getTimezoneOffset()),e.toLocaleString()},C.GetAuditLog=function(e){C.AMT_AuditLog_ReadRecords(1,E,[e,[]])},C}function hex_md5(e){return null==e&&(e=""),forge.md.md5.create().update(e).digest().toHex()}for(var md5_k=[],i=0;i<64;)md5_k[i]=0|4294967296*Math.abs(Math.sin(++i));function hex_md5(e){null==e&&(e="");for(var t,n,i,o,r=[],c=unescape(encodeURI(e)),a=c.length,s=[1732584193,-271733879,-1732584194,271733878],u=0;u<=a;)r[u>>2]|=(c.charCodeAt(u)||128)<>6)+14]=8*a,u=0;u>4]+(md5_k[o]+(0|r[[o,5*o+1,3*o+5,7*o][a]%16+u])))<<(a=[7,12,17,22,5,9,14,20,4,11,16,23,6,10,15,21][4*a+o++%4])|i>>>32-a),t,n];for(o=4;o;)s[--o]=s[o]+a[o]}for(e="";o<32;)e+=(s[o>>3]>>4*(1^7&o++)&15).toString(16);return e}function rstr_md5(e){return hex2rstr(hex_md5(e))}function execArgumentsToXml(e){if(null==e)return null;var t,n="";for(t in e){var i=e[t];i&&("reference"===i.__parameterType?n+=referenceToXml(t,i):n+=instanceToXml(t,i))}return n}function instanceToXml(e,t){if(null==t)return null;var n,i=!!t.__namespace,o=i?"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||Array.isArray(t[n])||("object"==typeof t[n]?console.error("only convert one level down..."):c+=o+n+">"+t[n].toString()+r+n+">"));return c+=""}function referenceToXml(e,t){if(null==t)return null;var n,i="/wsman"+t.__resourceUri+"";for(n in t)t.hasOwnProperty(n)&&0!==n.indexOf("__")&&("function"==typeof t[n]||"object"==typeof t[n]||Array.isArray(t[n])||(i+=''+t[n].toString()+""));return i+=""}function GetSidString(e){for(var t="S-"+e.charCodeAt(0)+"-"+e.charCodeAt(7),n=2;n>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")";var p=T(e,n);n=x(e,n),e=p,y.canvas.fillRect(e,n,o,r)}else if(1>f&m],u++)}else{for(f=0;f>f&m],u++)}k(y.spare,e,n)}else if(128==v){if(2==y.bpp)for(;u>8&248,y.spare.data[e+1]=a>>3&252,y.spare.data[e+2]=(31&a)<<3}function S(a,t,e){for(var n=t<<2,o=224&a,r=(28&a)<<3,i=M((3&a)<<6);0<=--e;)y.spare.data[n]=o,y.spare.data[n+1]=r,y.spare.data[n+2]=i,n+=4}function w(a,t,e){for(var n=t<<2,o=a>>8&248,r=a>>3&252,i=(31&a)<<3;0<=--e;)y.spare.data[n]=o,y.spare.data[n+1]=r,y.spare.data[n+2]=i,n+=4}function T(a){return 0==y.rotation?a:1==y.rotation?a:2==y.rotation?a-y.canvas.canvas.width:3==y.rotation?a-y.canvas.canvas.height:0}function x(a,t){return 0==y.rotation?t:1==y.rotation?t-y.canvas.canvas.width:2==y.rotation?t-y.canvas.canvas.height:3==y.rotation?t:0}function M(a){return 127>8&248)+","+(c>>3&252)+","+((31&c)<<3))+")";var p=k(e);n=K(0,n),e=p,S.canvas.fillRect(e,n,o,r)}else if(1>d&m],u++)}else{for(d=0;d>d&m],u++)}w(S.spare,e,n)}else if(128==v){if(2==S.bpp)for(;u>8&248,S.spare.data[o+1]=a>>3&252,S.spare.data[o+2]=(31&a)<<3}function C(a,t,e){for(var n=t<<2,o=224&a,r=(28&a)<<3,s=L((3&a)<<6);0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function D(a,t,e){for(var n=t<<2,o=a>>8&248,r=a>>3&252,s=(31&a)<<3;0<=--e;)S.spare.data[n]=o,S.spare.data[n+1]=r,S.spare.data[n+2]=s,n+=4}function k(a){return 0==S.rotation||1==S.rotation?a:2==S.rotation?a-S.canvas.canvas.width:3==S.rotation?a-S.canvas.canvas.height:0}function K(a,t){return 0==S.rotation?t:1==S.rotation?t-S.canvas.canvas.width:2==S.rotation?t-S.canvas.canvas.height:3==S.rotation?t:0}function L(a){return 127 50) && (completed == true)) ? 2 : 0; - if (dma) { attributes += 1; } - var x = String.fromCharCode(cmdid, 0, 0, attributes) + IntToStrX(obj.outSequence++) + data; - obj.parent.xxSend(x); - obj.bytesToAmt += x.length; - if (cmdid != 0x4B) { debug('IDER-SendData', x.length, rstr2hex(x)); } - } - - // CommandEndResponse (SCSI_SENSE) - obj.SendCommandEndResponse = function (error, sense, device, asc, asq) { - if (error) { obj.SendCommand(0x51, String.fromCharCode(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xc5, 0, 3, 0, 0, 0, device, 0x50, 0, 0, 0), true); } - else { obj.SendCommand(0x51, String.fromCharCode(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x87, (sense << 4), 3, 0, 0, 0, device, 0x51, sense, asc, asq), true); } - } - - //54 00 00 03 71 00 00 00 00 00 0c 00 b4 00 02 00 00 00 a0 58 85 00 03 00 00 00 a0 50 00 00 - //54 00 00 02 26 00 00 00 00 00 0c 00 b5 00 02 00 00 0c a0 58 85 00 03 00 00 00 a0 50 00 00 - - // DataToHost (SCSI_READ) - obj.SendDataToHost = function (device, completed, data, dma) { - var dmalen = (dma) ? 0 : data.length; - if (completed == true) { - obj.SendCommand(0x54, String.fromCharCode(0, (data.length & 0xff), (data.length >> 8), 0, dma ? 0xb4 : 0xb5, 0, 2, 0, (dmalen & 0xff), (dmalen >> 8), device, 0x58, 0x85, 0, 3, 0, 0, 0, device, 0x50, 0, 0, 0, 0, 0, 0) + data, completed, dma); - } else { - obj.SendCommand(0x54, String.fromCharCode(0, (data.length & 0xff), (data.length >> 8), 0, dma ? 0xb4 : 0xb5, 0, 2, 0, (dmalen & 0xff), (dmalen >> 8), device, 0x58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + data, completed, dma); - } - } - - // GetDataFromHost (SCSI_CHUNK) - obj.SendGetDataFromHost = function (device, chunksize) { - obj.SendCommand(0x52, String.fromCharCode(0, (chunksize & 0xff), (chunksize >> 8), 0, 0xb5, 0, 0, 0, (chunksize & 0xff), (chunksize >> 8), device, 0x58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), false); - } - - // DisableEnableFeatures (STATUS_DATA) - // If type is REGS_TOGGLE (3), 4 bytes of data must be provided. - obj.SendDisableEnableFeatures = function (type, data) { if (data == null) { data = ''; } obj.SendCommand(0x48, String.fromCharCode(type) + data); } - - // Private method - obj.ProcessDataEx = function () { - if (obj.acc.length < 8) return 0; - - // First 8 bytes are the header - // CommandID + 0x000000 + Sequence Number - - switch(obj.acc.charCodeAt(0)) { - case 0x41: // OPEN_SESSION - if (obj.acc.length < 30) return 0; - var len = obj.acc.charCodeAt(29); - if (obj.acc.length < (30 + len)) return 0; - obj.iderinfo = {}; - obj.iderinfo.major = obj.acc.charCodeAt(8); - obj.iderinfo.minor = obj.acc.charCodeAt(9); - obj.iderinfo.fwmajor = obj.acc.charCodeAt(10); - obj.iderinfo.fwminor = obj.acc.charCodeAt(11); - obj.iderinfo.readbfr = ReadShortX(obj.acc, 16); - obj.iderinfo.writebfr = ReadShortX(obj.acc, 18); - obj.iderinfo.proto = obj.acc.charCodeAt(21); - obj.iderinfo.iana = ReadIntX(obj.acc, 25); - debug(obj.iderinfo); - - if (obj.iderinfo.proto != 0) { debug("Unknown proto", obj.iderinfo.proto); obj.Stop(); } - if (obj.iderinfo.readbfr > 8192) { debug("Illegal read buffer size", obj.iderinfo.readbfr); obj.Stop(); } - if (obj.iderinfo.writebfr > 8192) { debug("Illegal write buffer size", obj.iderinfo.writebfr); obj.Stop(); } - - if (obj.iderStart == 0) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x08)); } // OnReboot - else if (obj.iderStart == 1) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x10)); } // Graceful - else if (obj.iderStart == 2) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x18)); } // Now - //obj.SendDisableEnableFeatures(1); // GetSupportedFeatures - return 30 + len; - case 0x43: // CLOSE - debug('CLOSE'); - obj.Stop(); - return 8; - case 0x44: // KEEPALIVEPING - obj.SendCommand(0x45); // Send PONG back - return 8; - case 0x45: // KEEPALIVEPONG - debug('PONG'); - return 8; - case 0x46: // RESETOCCURED - if (obj.acc.length < 9) return 0; - var resetMask = obj.acc.charCodeAt(8); - if (g_media === null) { - // No operations are pending - obj.SendCommand(0x47); // Send ResetOccuredResponse - debug('RESETOCCURED1', resetMask); - } else { - // Operations are being done, sent the reset once completed. - g_reset = true; - debug('RESETOCCURED2', resetMask); - } - return 9; - case 0x49: // STATUS_DATA - DisableEnableFeaturesReply - if (obj.acc.length < 13) return 0; - var type = obj.acc.charCodeAt(8); - var value = ReadIntX(obj.acc, 9); - debug('STATUS_DATA', type, value); - switch (type) - { - case 1: // REGS_AVAIL - if (value & 1) { - if (obj.iderStart == 0) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x08)); } // OnReboot - else if (obj.iderStart == 1) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x10)); } // Graceful - else if (obj.iderStart == 2) { obj.SendDisableEnableFeatures(3, IntToStrX(0x01 + 0x18)); } // Now - } - break; - case 2: // REGS_STATUS - obj.enabled = (value & 2) ? true : false; - debug("IDER Status: " + obj.enabled); - break; - case 3: // REGS_TOGGLE - if (value != 1) { debug("Register toggle failure"); } //else { obj.SendDisableEnableFeatures(2); } - break; - } - return 13; - case 0x4A: // ERROR OCCURED - if (obj.acc.length < 11) return 0; - debug('IDER: ABORT', obj.acc.charCodeAt(8)); - //obj.Stop(); - return 11; - case 0x4B: // HEARTBEAT - //debug('HEARTBEAT'); - return 8; - case 0x50: // COMMAND WRITTEN - if (obj.acc.length < 28) return 0; - var device = (obj.acc.charCodeAt(14) & 0x10) ? 0xB0 : 0xA0; - var deviceFlags = obj.acc.charCodeAt(14); - var cdb = obj.acc.substring(16, 28); - var featureRegister = obj.acc.charCodeAt(9); - debug('SCSI_CMD', device, rstr2hex(cdb), featureRegister, deviceFlags); - handleSCSI(device, cdb, featureRegister, deviceFlags); - return 28; - case 0x53: // DATA FROM HOST - if (obj.acc.length < 14) return 0; - var len = ReadShortX(obj.acc, 9); - if (obj.acc.length < (14 + len)) return 0; - debug('SCSI_WRITE, len = ' + (14 + len)); - obj.SendCommand(0x51, String.fromCharCode(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x70, 0x03, 0x00, 0x00, 0x00, 0xa0, 0x51, 0x07, 0x27, 0x00), true); - return 14 + len; - default: - debug('Unknown IDER command', obj.acc[0]); - obj.Stop(); - break; - } - return 0; - } - - function handleSCSI(dev, cdb, featureRegister, deviceFlags) - { - var lba; - var len; - - switch(cdb.charCodeAt(0)) - { - case 0x00: // TEST_UNIT_READY: - debug("SCSI: TEST_UNIT_READY", dev); - switch (dev) { - case 0xA0: // DEV_FLOPPY - if (obj.floppy == null) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - if (obj.floppyReady == false) { obj.floppyReady = true; obj.SendCommandEndResponse(1, 0x06, dev, 0x28, 0x00); return -1; } // Switch to ready - break; - case 0xB0: // DEV_CDDVD - if (obj.cdrom == null) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - if (obj.cdromReady == false) { obj.cdromReady = true; obj.SendCommandEndResponse(1, 0x06, dev, 0x28, 0x00); return -1; } // Switch to ready - break; - default: - debug("SCSI Internal error 3", dev); - return -1; - } - obj.SendCommandEndResponse(1, 0x00, dev, 0x00, 0x00); // Indicate ready - break; - case 0x08: // READ_6 - lba = ((cdb.charCodeAt(1) & 0x1f) << 16) + (cdb.charCodeAt(2) << 8) + cdb.charCodeAt(3); - len = cdb.charCodeAt(4); - if (len == 0) { len = 256; } - debug("SCSI: READ_6", dev, lba, len); - sendDiskData(dev, lba, len, featureRegister); - break; - case 0x0a: // WRITE_6 - lba = ((cdb.charCodeAt(1) & 0x1f) << 16) + (cdb.charCodeAt(2) << 8) + cdb.charCodeAt(3); - len = cdb.charCodeAt(4); - if (len == 0) { len = 256; } - debug("SCSI: WRITE_6", dev, lba, len); - obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); // Write is not supported, remote no medium. - return -1; - /* - case 0x15: // MODE_SELECT_6: - debug("SCSI ERROR: MODE_SELECT_6", dev); - obj.SendCommandEndResponse(1, 0x05, dev, 0x20, 0x00); - return -1; - */ - case 0x1a: // MODE_SENSE_6 - debug("SCSI: MODE_SENSE_6", dev); - if ((cdb.charCodeAt(2) == 0x3f) && (cdb.charCodeAt(3) == 0x00)) { - var a = 0, b = 0; - switch (dev) { - case 0xA0: // DEV_FLOPPY - if (obj.floppy == null) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - a = 0x00; - b = 0x80; // Read only = 0x80, Read write = 0x00 - break; - case 0xB0: // DEV_CDDVD - if (obj.cdrom == null) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - a = 0x05; - b = 0x80; - break; - default: - debug("SCSI Internal error 6", dev); - return -1; - } - obj.SendDataToHost(dev, true, String.fromCharCode(0, a, b, 0), featureRegister & 1); - return; - } - obj.SendCommandEndResponse(1, 0x05, dev, 0x24, 0x00); - break; - case 0x1b: // START_STOP (Called when you eject the CDROM) - //var immediate = cdb.charCodeAt(1) & 0x01; - //var loej = cdb.charCodeAt(4) & 0x02; - //var start = cdb.charCodeAt(4) & 0x01; - obj.SendCommandEndResponse(1, 0, dev); - break; - case 0x1e: // LOCK_UNLOCK - ALLOW_MEDIUM_REMOVAL - debug("SCSI: ALLOW_MEDIUM_REMOVAL", dev); - if ((dev == 0xA0) && (obj.floppy == null)) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - if ((dev == 0xB0) && (obj.cdrom == null)) { obj.SendCommandEndResponse(1, 0x02, dev, 0x3a, 0x00); return -1; } - obj.SendCommandEndResponse(1, 0x00, dev, 0x00, 0x00); - break; - case 0x23: // READ_FORMAT_CAPACITIES (Floppy only) - debug("SCSI: READ_FORMAT_CAPACITIES", dev); - var buflen = ReadShort(cdb, 7); - var mediaStatus = 0, sectors; - var mcSize = buflen / 8; // Capacity descriptor size is 8 - - switch (dev) { - case 0xA0: // DEV_FLOPPY - if ((obj.floppy == null) || (obj.floppy.size == 0)) { obj.SendCommandEndResponse(0, 0x05, dev, 0x24, 0x00); return -1; } - sectors = (obj.floppy.size >> 9) - 1; - break; - case 0xB0: // DEV_CDDVD - if ((obj.cdrom == null) || (obj.cdrom.size == 0)) { obj.SendCommandEndResponse(0, 0x05, dev, 0x24, 0x00); return -1; } - sectors = (obj.cdrom.size >> 11) - 1; // Number 2048 byte blocks - break; - default: - debug("SCSI Internal error 4", dev); - return -1; - } - - obj.SendDataToHost(dev, true, IntToStr(8) + String.fromCharCode(0x00, 0x00, 0x0b, 0x40, 0x02, 0x00, 0x02, 0x00), featureRegister & 1); - break; - case 0x25: // READ_CAPACITY - debug("SCSI: READ_CAPACITY", dev); - var len = 0; - switch(dev) - { - case 0xA0: // DEV_FLOPPY - if ((obj.floppy == null) || (obj.floppy.size == 0)) { obj.SendCommandEndResponse(0, 0x02, dev, 0x3a, 0x00); return -1; } - if (obj.floppy != null) { len = (obj.floppy.size >> 9) - 1; } - debug('DEV_FLOPPY', len); // Number 512 byte blocks - break; - case 0xB0: // DEV_CDDVD - if ((obj.floppy == null) || (obj.floppy.size == 0)) { obj.SendCommandEndResponse(0, 0x02, dev, 0x3a, 0x00); return -1; } - if (obj.cdrom != null) { len = (obj.cdrom.size >> 11) - 1; } // Number 2048 byte blocks - debug('DEV_CDDVD', len); - break; - default: - debug("SCSI Internal error 4", dev); - return -1; - } - //if (dev == 0xA0) { dev = 0x00; } else { dev = 0x10; } // Weird but seems to work. - debug("SCSI: READ_CAPACITY2", dev, deviceFlags); - obj.SendDataToHost(deviceFlags, true, IntToStr(len) + String.fromCharCode(0, 0, ((dev == 0xB0) ? 0x08 : 0x02), 0), featureRegister & 1); - break; - case 0x28: // READ_10 - lba = ReadInt(cdb, 2); - len = ReadShort(cdb, 7); - debug("SCSI: READ_10", dev, lba, len); - sendDiskData(dev, lba, len, featureRegister); - break; - case 0x2a: // WRITE_10 (Floppy only) - case 0x2e: // WRITE_AND_VERIFY (Floppy only) - lba = ReadInt(cdb, 2); - len = ReadShort(cdb, 7); - debug("SCSI: WRITE_10", dev, lba, len); - obj.SendGetDataFromHost(dev, 512 * len); // Floppy writes only, accept sectors of 512 bytes - break; - case 0x43: // READ_TOC (CD Audio only) - var buflen = ReadShort(cdb, 7); - var msf = cdb.charCodeAt(1) & 0x02; - var format = cdb.charCodeAt(2) & 0x07; - if (format == 0) { format = cdb.charCodeAt(9) >> 6; } - debug("SCSI: READ_TOC, dev=" + dev + ", buflen=" + buflen + ", msf=" + msf + ", format=" + format); - - switch (dev) { - case 0xA0: // DEV_FLOPPY - obj.SendCommandEndResponse(1, 0x05, dev, 0x20, 0x00); // Not implemented - return -1; - case 0xB0: // DEV_CDDVD - // NOP - break; - default: - debug("SCSI Internal error 9", dev); - return -1; - } - - if (format == 1) { obj.SendDataToHost(dev, true, String.fromCharCode(0x00, 0x0a, 0x01, 0x01, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00), featureRegister & 1); } - else if (format == 0) { - if (msf) { - obj.SendDataToHost(dev, true, String.fromCharCode(0x00, 0x12, 0x01, 0x01, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x14, 0xaa, 0x00, 0x00, 0x00, 0x34, 0x13), featureRegister & 1); - } else { - obj.SendDataToHost(dev, true, String.fromCharCode(0x00, 0x12, 0x01, 0x01, 0x00, 0x14, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0xaa, 0x00, 0x00, 0x00, 0x00, 0x00), featureRegister & 1); - } - } - break; - case 0x46: // GET_CONFIGURATION - var sendall = (cdb.charCodeAt(1) != 2); - var firstcode = ReadShort(cdb, 2); - var buflen = ReadShort(cdb, 7); - - debug("SCSI: GET_CONFIGURATION", dev, sendall, firstcode, buflen); - - if (buflen == 0) { obj.SendDataToHost(dev, true, IntToStr(0x003c) + IntToStr(0x0008), featureRegister & 1); return -1; } // TODO: Fixed this return, it's not correct. - - // Set the header - var r = IntToStr(0x0008); - - // Add the data - if (firstcode == 0) { r += IDE_CD_ConfigArrayProfileList; } - if ((firstcode == 0x1) || (sendall && (firstcode < 0x1))) { r += IDE_CD_ConfigArrayCore; } - if ((firstcode == 0x2) || (sendall && (firstcode < 0x2))) { r += IDE_CD_Morphing; } - if ((firstcode == 0x3) || (sendall && (firstcode < 0x3))) { r += IDE_CD_ConfigArrayRemovable; } - if ((firstcode == 0x10) || (sendall && (firstcode < 0x10))) { r += IDE_CD_ConfigArrayRandom; } - if ((firstcode == 0x1E) || (sendall && (firstcode < 0x1E))) { r += IDE_CD_Read; } - if ((firstcode == 0x100) || (sendall && (firstcode < 0x100))) { r += IDE_CD_PowerManagement; } - if ((firstcode == 0x105) || (sendall && (firstcode < 0x105))) { r += IDE_CD_Timeout; } - - // Set the length - r = IntToStr(r.length) + r; - - // Cut the length to buflen if needed - if (r.length > buflen) { r = r.substring(0, buflen); } - - obj.SendDataToHost(dev, true, r, featureRegister & 1); - return -1; - case 0x4a: // GET_EV_STATUS - GET_EVENT_STATUS_NOTIFICATION - //var buflen = (cdb.charCodeAt(7) << 8) + cdb.charCodeAt(8); - //if (buflen == 0) { obj.SendDataToHost(dev, true, IntToStr(0x003c) + IntToStr(0x0008), featureRegister & 1); return -1; } // TODO: Fixed this return, it's not correct. - debug("SCSI: GET_EVENT_STATUS_NOTIFICATION", dev, cdb.charCodeAt(1), cdb.charCodeAt(4), cdb.charCodeAt(9)); - if ((cdb.charCodeAt(1) != 0x01) && (cdb.charCodeAt(4) != 0x10)) { debug('SCSI ERROR'); obj.SendCommandEndResponse(1, 0x05, dev, 0x26, 0x01); break; } - var present = 0x00; - if ((dev == 0xA0) && (obj.floppy != null)) { present = 0x02; } - else if ((dev == 0xB0) && (obj.cdrom != null)) { present = 0x02; } - obj.SendDataToHost(dev, true, String.fromCharCode(0x00, present, 0x80, 0x00), featureRegister & 1); // This is the original version, 4 bytes long - break; - case 0x4c: - obj.SendCommand(0x51, IntToStrX(0) + IntToStrX(0) + IntToStrX(0) + String.fromCharCode(0x87, 0x50, 0x03, 0x00, 0x00, 0x00, 0xb0, 0x51, 0x05, 0x20, 0x00), true); - break; - case 0x51: // READ_DISC_INFO - debug("SCSI READ_DISC_INFO", dev); - obj.SendCommandEndResponse(0, 0x05, dev, 0x20, 0x00); // Correct - return -1; - case 0x55: // MODE_SELECT_10: - debug("SCSI ERROR: MODE_SELECT_10", dev); - obj.SendCommandEndResponse(1, 0x05, dev, 0x20, 0x00); - return -1; - case 0x5a: // MODE_SENSE_10 - debug("SCSI: MODE_SENSE_10", dev, cdb.charCodeAt(2) & 0x3f); - var buflen = ReadShort(cdb, 7); - //var pc = cdb.charCodeAt(2) & 0xc0; - var r = null; - - if (buflen == 0) { obj.SendDataToHost(dev, true, IntToStr(0x003c) + IntToStr(0x0008), featureRegister & 1); return -1; } // TODO: Fixed this return, it's not correct. - - // 1.44 mb floppy or LS120 (sectorCount == 0x3c300) - var sectorCount = 0; - if (dev == 0xA0) { - if (obj.floppy != null) { sectorCount = (obj.floppy.size >> 9); } - } else { - if (obj.cdrom != null) { sectorCount = (obj.cdrom.size >> 11); } - } - - switch (cdb.charCodeAt(2) & 0x3f) { - case 0x01: if (dev == 0xA0) { r = (sectorCount <= 0xb40)?IDE_ModeSence_FloppyError_Recovery_Array:IDE_ModeSence_Ls120Error_Recovery_Array; } else { r = IDE_ModeSence_CDError_Recovery_Array; } break; - case 0x05: if (dev == 0xA0) { r = (sectorCount <= 0xb40)?IDE_ModeSence_FloppyDisk_Page_Array:IDE_ModeSence_LS120Disk_Page_Array; } break; - case 0x3f: if (dev == 0xA0) { r = (sectorCount <= 0xb40)?IDE_ModeSence_3F_Floppy_Array:IDE_ModeSence_3F_LS120_Array; } else { r = IDE_ModeSence_3F_CD_Array; } break; - case 0x1A: if (dev == 0xB0) { r = IDE_ModeSence_CD_1A_Array; } break; - case 0x1D: if (dev == 0xB0) { r = IDE_ModeSence_CD_1D_Array; } break; - case 0x2A: if (dev == 0xB0) { r = IDE_ModeSence_CD_2A_Array; } break; - } - - if (r == null) { - obj.SendCommandEndResponse(0, 0x05, dev, 0x20, 0x00); // TODO: Send proper error!!! - } else { - // Set disk to read only (we don't support write). - //ms_data[3] = ms_data[3] | 0x80; - obj.SendDataToHost(dev, true, r, featureRegister & 1); - } - break; - default: // UNKNOWN COMMAND - debug("IDER: Unknown SCSI command", cdb.charCodeAt(0)); - obj.SendCommandEndResponse(0, 0x05, dev, 0x20, 0x00); - return -1; - } - return 0; - } - - function sendDiskData(dev, lba, len, featureRegister) { - var media = null; - var mediaBlocks = 0; - if (dev == 0xA0) { media = obj.floppy; if (obj.floppy != null) { mediaBlocks = (obj.floppy.size >> 9); } } - if (dev == 0xB0) { media = obj.cdrom; if (obj.cdrom != null) { mediaBlocks = (obj.cdrom.size >> 11); } } - if ((len < 0) || (lba + len > mediaBlocks)) { obj.SendCommandEndResponse(1, 0x05, dev, 0x21, 0x00); return 0; } - if (len == 0) { obj.SendCommandEndResponse(1, 0x00, dev, 0x00, 0x00); return 0; } - if (media != null) { - if (dev == 0xA0) { lba <<= 9; len <<= 9; } else { lba <<= 11; len <<= 11; } - if (g_media !== null) { - console.log('IDERERROR: Read while performing read'); - obj.Stop(); - } else { - // obj.iderinfo.readbfr // TODO: MaxRead - g_media = media; - g_dev = dev; - g_lba = lba; - g_len = len; - sendDiskDataEx(featureRegister); - } - } - } - - var g_reset = false; - var g_media = null; - var g_dev; - var g_lba; - var g_len; - function sendDiskDataEx(featureRegister) { - var len = g_len, lba = g_lba; - if (g_len > obj.iderinfo.readbfr) { len = obj.iderinfo.readbfr; } - g_len -= len; - g_lba += len; - var fr = new FileReader(); - fr.onload = function () { - obj.SendDataToHost(g_dev, (g_len == 0), this.result, featureRegister & 1); - if ((g_len > 0) && (g_reset == false)) { - sendDiskDataEx(featureRegister); - } else { - g_media = null; - if (g_reset) { obj.SendCommand(0x47); g_reset = false; } // Send ResetOccuredResponse - } - }; - //console.log('Read from ' + lba + ' to ' + (lba + len) + ', total of ' + len); - fr.readAsBinaryString(g_media.slice(lba, lba + len)); - } - - return obj; -} \ No newline at end of file +var CreateAmtRemoteIder=function(){var l={};function f(){urlvars&&urlvars.idertrace&&console.log(...arguments)}l.protocol=3,l.bytesToAmt=0,l.bytesFromAmt=0,l.rx_timeout=3e4,l.tx_timeout=0,l.heartbeat=2e4,l.version=1,l.acc="",l.inSequence=0,l.outSequence=0,l.iderinfo=null,l.enabled=!1,l.iderStart=0,l.floppy=null,l.cdrom=null,l.floppyReady=!1,l.cdromReady=!1,l.pingTimer=null;var u=String.fromCharCode(0,38,49,128,0,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),h=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,16,169,8,32,2,0,3,195,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),p=String.fromCharCode(0,38,36,128,0,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0),R=String.fromCharCode(0,92,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0,3,22,0,160,0,0,0,0,0,18,2,0,0,0,0,0,0,0,160,0,0,0,5,30,4,176,2,18,2,0,0,80,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,2,208,0,0,8,10,0,0,0,0,0,0,0,0,0,0,11,6,0,0,0,17,36,49),E=String.fromCharCode(0,18,1,128,0,0,0,0,26,10,0,0,0,0,0,0,0,0,0,0),I=String.fromCharCode(0,18,1,128,0,0,0,0,29,10,0,0,0,0,0,0,0,0,0,0),g=String.fromCharCode(0,32,1,128,0,0,0,0,42,24,0,0,0,0,32,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),b=String.fromCharCode(0,40,1,128,0,0,0,0,1,6,0,255,0,0,0,0,42,24,0,0,0,0,2,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0),A=(String.fromCharCode(0,0,0,40,0,0,0,8),String.fromCharCode(0,0,3,4,0,8,1,0)),T=String.fromCharCode(0,1,3,4,0,0,0,2),D=String.fromCharCode(0,2,3,4,0,0,0,0),y=String.fromCharCode(0,3,3,4,41,0,0,2),_=String.fromCharCode(0,16,1,8,0,0,8,0,0,1,0,0),k=String.fromCharCode(0,30,3,0),v=String.fromCharCode(1,0,3,0),O=String.fromCharCode(1,5,3,0),X=String.fromCharCode(0,18,36,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),w=String.fromCharCode(0,18,49,128,0,0,0,0,1,10,0,1,0,0,0,0,2,0,0,0),F=String.fromCharCode(0,14,1,128,0,0,0,0,1,6,0,255,0,0,0,0);function H(e,r,n,a){var o=null,t=0;160==e&&(o=l.floppy,null!=l.floppy&&(t=l.floppy.size>>9)),176==e&&(o=l.cdrom,null!=l.cdrom&&(t=l.cdrom.size>>11)),n<0||tl.iderinfo.readbfr&&(n=l.iderinfo.readbfr);c-=n;S+=n;var o=new FileReader;o.onload=function(){l.SendDataToHost(d,0==c,this.result,1&r),0>8,0,a?180:181,0,2,0,255&o,o>>8,e,88,133,0,3,0,0,0,e,80,0,0,0,0,0,0)+n,r,a):l.SendCommand(84,String.fromCharCode(0,255&n.length,n.length>>8,0,a?180:181,0,2,0,255&o,o>>8,e,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0)+n,r,a)},l.SendGetDataFromHost=function(e,r){l.SendCommand(82,String.fromCharCode(0,255&r,r>>8,0,181,0,0,0,255&r,r>>8,e,88,0,0,0,0,0,0,0,0,0,0,0),!1)},l.SendDisableEnableFeatures=function(e,r){null==r&&(r=""),l.SendCommand(72,String.fromCharCode(e)+r)};var d,S,c,C=!(l.ProcessDataEx=function(){if(l.acc.length<8)return 0;switch(l.acc.charCodeAt(0)){case 65:if(l.acc.length<30)return 0;var e=l.acc.charCodeAt(29);return l.acc.length<30+e?0:(l.iderinfo={},l.iderinfo.major=l.acc.charCodeAt(8),l.iderinfo.minor=l.acc.charCodeAt(9),l.iderinfo.fwmajor=l.acc.charCodeAt(10),l.iderinfo.fwminor=l.acc.charCodeAt(11),l.iderinfo.readbfr=ReadShortX(l.acc,16),l.iderinfo.writebfr=ReadShortX(l.acc,18),l.iderinfo.proto=l.acc.charCodeAt(21),l.iderinfo.iana=ReadIntX(l.acc,25),f(l.iderinfo),0!=l.iderinfo.proto&&(f("Unknown proto",l.iderinfo.proto),l.Stop()),8192>9)-1:S);break;case 176:if(null==l.floppy||0==l.floppy.size)return l.SendCommandEndResponse(0,2,e,58,0);f("DEV_CDDVD",S=null!=l.cdrom?(l.cdrom.size>>11)-1:S);break;default:return f("SCSI Internal error 4",e)}f("SCSI: READ_CAPACITY2",e,a),l.SendDataToHost(a,!0,IntToStr(S)+String.fromCharCode(0,0,176==e?8:2,0),1&n);break;case 40:C=ReadInt(r,2),S=ReadShort(r,7),f("SCSI: READ_10",e,C,S),H(e,C,S,n);break;case 42:case 46:C=ReadInt(r,2),S=ReadShort(r,7),f("SCSI: WRITE_10",e,C,S),l.SendGetDataFromHost(e,512*S);break;case 67:var d=ReadShort(r,7),c=2&r.charCodeAt(1),C=7&r.charCodeAt(2);switch(0==C&&(C=r.charCodeAt(9)>>6),f("SCSI: READ_TOC, dev="+e+", buflen="+d+", msf="+c+", format="+C),e){case 160:return l.SendCommandEndResponse(1,5,e,32,0);case 176:break;default:return f("SCSI Internal error 9",e)}1==C?l.SendDataToHost(e,!0,String.fromCharCode(0,10,1,1,0,20,1,0,0,0,0,0),1&n):0==C&&(c?l.SendDataToHost(e,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,2,0,0,20,170,0,0,0,52,19),1&n):l.SendDataToHost(e,!0,String.fromCharCode(0,18,1,1,0,20,1,0,0,0,0,0,0,20,170,0,0,0,0,0),1&n));break;case 70:var c=2!=r.charCodeAt(1),i=ReadShort(r,2),d=ReadShort(r,7);if(f("SCSI: GET_CONFIGURATION",e,c,i,d),0==d)return l.SendDataToHost(e,!0,IntToStr(60)+IntToStr(8),1&n);var s=IntToStr(8);return 0==i&&(s+=A),(1==i||c&&i<1)&&(s+=T),(2==i||c&&i<2)&&(s+=D),(3==i||c&&i<3)&&(s+=y),(16==i||c&&i<16)&&(s+=_),(30==i||c&&i<30)&&(s+=k),(256==i||c&&i<256)&&(s+=v),(261==i||c&&i<261)&&(s+=O),(s=IntToStr(s.length)+s).length>d&&(s=s.substring(0,d)),l.SendDataToHost(e,!0,s,1&n);case 74:if(f("SCSI: GET_EVENT_STATUS_NOTIFICATION",e,r.charCodeAt(1),r.charCodeAt(4),r.charCodeAt(9)),1!=r.charCodeAt(1)&&16!=r.charCodeAt(4)){f("SCSI ERROR"),l.SendCommandEndResponse(1,5,e,38,1);break}i=0;(160==e&&null!=l.floppy||176==e&&null!=l.cdrom)&&(i=2),l.SendDataToHost(e,!0,String.fromCharCode(0,i,128,0),1&n);break;case 76:l.SendCommand(81,IntToStrX(0)+IntToStrX(0)+IntToStrX(0)+String.fromCharCode(135,80,3,0,0,0,176,81,5,32,0),!0);break;case 81:return f("SCSI READ_DISC_INFO",e),l.SendCommandEndResponse(0,5,e,32,0);case 85:return f("SCSI ERROR: MODE_SELECT_10",e),l.SendCommandEndResponse(1,5,e,32,0);case 90:f("SCSI: MODE_SENSE_10",e,63&r.charCodeAt(2));d=ReadShort(r,7),s=null;if(0==d)return l.SendDataToHost(e,!0,IntToStr(60)+IntToStr(8),1&n);var m=0;switch(160==e?null!=l.floppy&&(m=l.floppy.size>>9):null!=l.cdrom&&(m=l.cdrom.size>>11),63&r.charCodeAt(2)){case 1:s=160==e?m<=2880?X:w:F;break;case 5:160==e&&(s=m<=2880?p:u);break;case 63:s=160==e?m<=2880?R:h:b;break;case 26:176==e&&(s=E);break;case 29:176==e&&(s=I);break;case 42:176==e&&(s=g)}null==s?l.SendCommandEndResponse(0,5,e,32,0):l.SendDataToHost(e,!0,s,1&n);break;default:f("IDER: Unknown SCSI command",r.charCodeAt(0)),l.SendCommandEndResponse(0,5,e,32,0)}}(o,r,n,t),28;case 83:if(l.acc.length<14)return 0;e=ReadShortX(l.acc,9);return l.acc.length<14+e?0:(f("SCSI_WRITE, len = "+(14+e)),l.SendCommand(81,String.fromCharCode(0,0,0,0,0,0,0,0,0,0,0,0,135,112,3,0,0,0,160,81,7,39,0),!0),14+e);default:f("Unknown IDER command",l.acc[0]),l.Stop()}return 0}),i=null;return l} \ No newline at end of file diff --git a/public/scripts/amt-redir-ws-0.1.0-min.js b/public/scripts/amt-redir-ws-0.1.0-min.js index 13e61a23..d573be46 100644 --- a/public/scripts/amt-redir-ws-0.1.0-min.js +++ b/public/scripts/amt-redir-ws-0.1.0-min.js @@ -1 +1 @@ -var CreateAmtRedirect=function(e,c){var A={};function T(e){return String.fromCharCode.apply(null,e)}function U(e){for(var t="",n=0;n="==p[2]&&p[1]>=p[3]||">"==p[2]&&p[1]>p[3])&&(d.ip=p[0]):d.ip=p[0];break;case 2:null==n[1]?delete d.variables[n[0]]:d.setVar(n[0],p[1]);break;case 3:d.onConsole?d.onConsole(d.toString(p[0]),d):console.log(d.toString(p[0]));break;case 4:d.state=2,d.dialog=!0,setDialogMode(11,p[0],p[2],d.xxStepDialogOk,p[1],d);break;case 5:for(var s in p[1])p[1][s][p[2]]==p[3]&&(u=s);break;case 6:u=p[1].substr(p[2],p[3]);break;case 7:u=p[1].indexOf(p[2]);break;case 8:u=p[1].split(p[2]);break;case 9:u=p[1].join(p[2]);break;case 10:u=p[1].length;break;case 11:u=JSON.parse(p[1]);break;case 12:u=JSON.stringify(p[1]);break;case 13:u=p[1]+p[2];break;case 14:u=p[1]-p[2];break;case 15:u=parseInt(p[1]);break;case 16:d.state=2,d.amtstack.BatchEnum(p[0],p[1],d.xxWsmanReturn,d);break;case 17:d.state=2,d.amtstack.Put(p[0],p[1],d.xxWsmanReturn,d);break;case 18:d.state=2,d.amtstack.Create(p[0],p[1],d.xxWsmanReturn,d);break;case 19:d.state=2,d.amtstack.Delete(p[0],p[1],d.xxWsmanReturn,d);break;case 20:d.state=2,d.amtstack.Exec(p[0],p[1],p[2],d.xxWsmanReturn,d,0,p[3]);break;case 21:d.stepspeed=p[0],null!=d.timer&&(clearInterval(d.timer),d.timer=setInterval(function(){d.step()},d.stepspeed));break;case 22:d.state=2,d.amtstack.Subscribe(p[0],p[1],p[2],d.xxWsmanReturn,d,0,p[3],p[4],p[5],p[6]);break;case 23:d.state=2,d.amtstack.UnSubscribe(p[0],d.xxWsmanReturn,d,0,p[1]);break;case 24:console.log(p[1],p[2],p[1].charCodeAt(p[2])),u=p[1].charCodeAt(p[2]);break;case 25:d.state=2,amtcert_signWithCaKey(p[0],null,p[1],{CN:"Untrusted Root Certificate"},d.xxSignWithDummyCaReturn);break;default:d.state=9,console.error("Script Error, unknown command: "+e)}else e<2e4?u=script_functionTableX2[e-1e4](p[1],p[2],p[3],p[4],p[5],p[6]):script_functionTableX3&&script_functionTableX3[e-2e4]&&(u=script_functionTableX3[e-2e4](d,p[1],p[2],p[3],p[4],p[5],p[6]));null!=u&&d.setVar(n[0],u)}catch(e){"object"==typeof e&&(e=e.message),d.setVar("_exception",e)}}return 1==d.state&&d.ip>=d.script.length&&(d.state=0,d.stop()),d.onStep&&d.onStep(d),d}},d.xxStepDialogOk=function(e){d.variables.DialogSelect=e,d.state=1,d.dialog=!1,d.onStep&&d.onStep(d)},d.xxWsmanReturnFix=function(e){e&&null!=e&&(e.Header&&(e.Header=e.Header,delete e.Header),e.Body&&(e.Body=e.Body,delete e.Body),e.Responses&&(e.Responses=e.Responses,delete e.Responses),e.Response&&(e.Response=e.Response,delete e.Response),e.ReturnValueStr&&(e.ReturnValueStr=e.ReturnValueStr,delete e.ReturnValueStr))},d.xxWsmanReturn=function(e,t,r,a){if(r)for(var n in d.xxWsmanReturnFix(r),r)for(var s in d.xxWsmanReturnFix(r[n]),r[n])d.xxWsmanReturnFix(r[n][s]);d.setVar(t,r),d.setVar("wsman_result",a),d.setVar("wsman_result_str",httpErrorTable[a]?httpErrorTable[a]:"Error #"+a),d.state=1,d.onStep&&d.onStep(d)},d.xxSignWithDummyCaReturn=function(e){d.setVar("signed_cert",btoa(_arrayBufferToString(e))),d.state=1,d.onStep&&d.onStep(d)},d.toString=function(e){return"object"==typeof e?JSON.stringify(e):e},d.reset(),d)}function script_compile(e,t){var r="",a=e.split("\n"),n={},s=[],i=[];for(var o in a){var l=a[o];if(l.startsWith("##SWAP "))3==(c=l.split(" ")).length&&(i[c[1]]=c[2]);if("#"!=l[0]&&0!=l.length){for(var c in i)l=l.split(c).join(i[c]);var u=l.match(/"[^"]*"|[^\s"]+/g);if(0!=u.length)if(":"!=l[0]){var p=script_functionTable1.indexOf(u[0].toLowerCase());if(-1==p&&0<=(p=script_functionTable2.indexOf(u[0].toLowerCase()))&&(p+=1e4),-1==p&&0<=(p=script_functionTable3.indexOf(u[0].toLowerCase()))&&(p+=2e4),-1==p)return t&&t("Unabled to compile, unknown command: "+u[0]),"";var d=ShortToStr(u.length-1);for(var f in u)if(0!=f)if(":"==u[f][0])s.push([u[f],r.length+d.length+7]),d+=ShortToStr(5)+String.fromCharCode(3)+IntToStr(4294967295);else{var h=parseInt(u[f]);h==u[f]?d+=ShortToStr(5)+String.fromCharCode(2)+IntToStr(h):'"'==u[f][0]&&'"'==u[f][u[f].length-1]?d+=ShortToStr(u[f].length-1)+String.fromCharCode(1)+u[f].substring(1,u[f].length-1):d+=ShortToStr(u[f].length+1)+String.fromCharCode(0)+u[f]}r+=d=ShortToStr(p)+ShortToStr(d.length+4)+d}else n[u[0].toUpperCase()]=r.length}}for(o in s){var b=s[o][0].toUpperCase(),g=s[o][1],S=n[b];if(null==S)return t&&t("Unabled to compile, unknown label: "+b),"";r=r.substr(0,g)+IntToStr(S)+r.substr(g+4)}return IntToStr(612182341)+ShortToStr(1)+r}function script_decompile(e,t){var r="",a=6,n={};if(0<=t)a=t;else{if(e.length<6)return"# Invalid script length";var s=ReadInt(e,0),i=ReadShort(e,4);if(612182341!=s)return"# Invalid binary script: "+s;if(1!=i)return"# Invalid script version"}for(;a="==p[2]&&p[1]>=p[3]||">"==p[2]&&p[1]>p[3])&&(d.ip=p[0]);break;case 2:null==a[1]?delete d.variables[a[0]]:d.setVar(a[0],p[1]);break;case 3:d.onConsole?d.onConsole(d.toString(p[0]),d):console.log(d.toString(p[0]));break;case 4:d.state=2,d.dialog=!0,setDialogMode(11,p[0],p[2],d.xxStepDialogOk,p[1],d);break;case 5:for(var s in p[1])p[1][s][p[2]]==p[3]&&(u=s);break;case 6:u=p[1].substr(p[2],p[3]);break;case 7:u=p[1].indexOf(p[2]);break;case 8:u=p[1].split(p[2]);break;case 9:u=p[1].join(p[2]);break;case 10:u=p[1].length;break;case 11:u=JSON.parse(p[1]);break;case 12:u=JSON.stringify(p[1]);break;case 13:u=p[1]+p[2];break;case 14:u=p[1]-p[2];break;case 15:u=parseInt(p[1]);break;case 16:d.state=2,d.amtstack.BatchEnum(p[0],p[1],d.xxWsmanReturn,d);break;case 17:d.state=2,d.amtstack.Put(p[0],p[1],d.xxWsmanReturn,d);break;case 18:d.state=2,d.amtstack.Create(p[0],p[1],d.xxWsmanReturn,d);break;case 19:d.state=2,d.amtstack.Delete(p[0],p[1],d.xxWsmanReturn,d);break;case 20:d.state=2,d.amtstack.Exec(p[0],p[1],p[2],d.xxWsmanReturn,d,0,p[3]);break;case 21:d.stepspeed=p[0],null!=d.timer&&(clearInterval(d.timer),d.timer=setInterval(function(){d.step()},d.stepspeed));break;case 22:d.state=2,d.amtstack.Subscribe(p[0],p[1],p[2],d.xxWsmanReturn,d,0,p[3],p[4],p[5],p[6]);break;case 23:d.state=2,d.amtstack.UnSubscribe(p[0],d.xxWsmanReturn,d,0,p[1]);break;case 24:console.log(p[1],p[2],p[1].charCodeAt(p[2])),u=p[1].charCodeAt(p[2]);break;case 25:d.state=2,amtcert_signWithCaKey(p[0],null,p[1],{CN:"Untrusted Root Certificate"},d.xxSignWithDummyCaReturn);break;default:d.state=9,console.error("Script Error, unknown command: "+e)}else e<2e4?u=script_functionTableX2[e-1e4](p[1],p[2],p[3],p[4],p[5],p[6]):script_functionTableX3&&script_functionTableX3[e-2e4]&&(u=script_functionTableX3[e-2e4](d,p[1],p[2],p[3],p[4],p[5],p[6]));null!=u&&d.setVar(a[0],u)}catch(e){"object"==typeof e&&(e=e.message),d.setVar("_exception",e)}}return 1==d.state&&d.ip>=d.script.length&&(d.state=0,d.stop()),d.onStep&&d.onStep(d),d}},d.xxStepDialogOk=function(e){d.variables.DialogSelect=e,d.state=1,d.dialog=!1,d.onStep&&d.onStep(d)},d.xxWsmanReturnFix=function(e){e&&null!=e&&(e.Header&&(e.Header=e.Header,delete e.Header),e.Body&&(e.Body=e.Body,delete e.Body),e.Responses&&(e.Responses=e.Responses,delete e.Responses),e.Response&&(e.Response=e.Response,delete e.Response),e.ReturnValueStr&&(e.ReturnValueStr=e.ReturnValueStr,delete e.ReturnValueStr))},d.xxWsmanReturn=function(e,t,r,n){if(r)for(var a in d.xxWsmanReturnFix(r),r)for(var s in d.xxWsmanReturnFix(r[a]),r[a])d.xxWsmanReturnFix(r[a][s]);d.setVar(t,r),d.setVar("wsman_result",n),d.setVar("wsman_result_str",httpErrorTable[n]||"Error #"+n),d.state=1,d.onStep&&d.onStep(d)},d.xxSignWithDummyCaReturn=function(e){d.setVar("signed_cert",btoa(_arrayBufferToString(e))),d.state=1,d.onStep&&d.onStep(d)},d.toString=function(e){return"object"==typeof e?JSON.stringify(e):e},d.reset(),d)}function script_compile(e,t){var r,n="",a=e.split("\n"),s={},o=[],i=[];for(r in a){var l=a[r];if(l.startsWith("##SWAP ")&&3==(c=l.split(" ")).length&&(i[c[1]]=c[2]),"#"!=l[0]&&0!=l.length){for(var c in i)l=l.split(c).join(i[c]);var u=l.match(/"[^"]*"|[^\s"]+/g);if(0!=u.length)if(":"!=l[0]){var p=script_functionTable1.indexOf(u[0].toLowerCase());if(-1==p&&0<=(p=script_functionTable2.indexOf(u[0].toLowerCase()))&&(p+=1e4),-1==p&&0<=(p=script_functionTable3.indexOf(u[0].toLowerCase()))&&(p+=2e4),-1==p)return t&&t("Unabled to compile, unknown command: "+u[0]),"";var d,h,b=ShortToStr(u.length-1);for(d in u)0!=d&&(":"==u[d][0]?(o.push([u[d],n.length+b.length+7]),b+=ShortToStr(5)+String.fromCharCode(3)+IntToStr(4294967295)):(h=parseInt(u[d]))==u[d]?b+=ShortToStr(5)+String.fromCharCode(2)+IntToStr(h):'"'==u[d][0]&&'"'==u[d][u[d].length-1]?b+=ShortToStr(u[d].length-1)+String.fromCharCode(1)+u[d].substring(1,u[d].length-1):b+=ShortToStr(u[d].length+1)+String.fromCharCode(0)+u[d]);n+=b=ShortToStr(p)+ShortToStr(b.length+4)+b}else s[u[0].toUpperCase()]=n.length}}for(r in o){var f=o[r][0].toUpperCase(),g=o[r][1],S=s[f];if(null==S)return t&&t("Unabled to compile, unknown label: "+f),"";n=n.substr(0,g)+IntToStr(S)+n.substr(g+4)}return IntToStr(612182341)+ShortToStr(1)+n}function script_decompile(e,t){var r="",n=6,a={};if(0<=t)n=t;else{if(e.length<6)return"# Invalid script length";var s=ReadInt(e,0),o=ReadShort(e,4);if(612182341!=s)return"# Invalid binary script: "+s;if(1!=o)return"# Invalid script version"}for(;nAmtSetupBinSetupGuids.length)return null;var r=[],t=AmtSetupBinSetupGuids[e.fileType-1],a=0;for(t+=ShortToStrX(e.recordChunkCount),t+=ShortToStrX(e.recordHeaderByteCount),t+=IntToStrX(e.recordNumber),t+=String.fromCharCode(e.majorVersion,e.minorVersion),t+=ShortToStrX(e.flags),t+=IntToStrX(e.records.length),t+=IntToStrX(e.dataRecordsConsumed),t+=ShortToStrX(e.dataRecordChunkCount);t.length<512;)t+="\0";for(var o in r.push(t),e.records){var n="",i=e.records[o];for(var d in n+=IntToStrX(i.typeIdentifier),n+=IntToStrX(i.flags),n+=IntToStrX(0),n+=IntToStrX(0),n+=ShortToStrX(1),n+=ShortToStrX(24),n+=IntToStrX(++a),i.variables.sort(AmtSetupBinVariableCompare),i.variables){var u="",s=i.variables[d],l=s.value;for(s.type=AmtSetupBinVarIds[s.moduleid][s.varid][0],0r.moduleid?1:e.moduleidr.varid?1:e.varidAmtSetupBinSetupGuids.length)return null;var r,t=[],a=AmtSetupBinSetupGuids[e.fileType-1],o=0;for(a+=ShortToStrX(e.recordChunkCount),a+=ShortToStrX(e.recordHeaderByteCount),a+=IntToStrX(e.recordNumber),a+=String.fromCharCode(e.majorVersion,e.minorVersion),a+=ShortToStrX(e.flags),a+=IntToStrX(e.records.length),a+=IntToStrX(e.dataRecordsConsumed),a+=ShortToStrX(e.dataRecordChunkCount);a.length<512;)a+="\0";for(r in t.push(a),e.records){var n,i="",d=e.records[r];for(n in i+=IntToStrX(d.typeIdentifier),i+=IntToStrX(d.flags),i+=IntToStrX(0),i+=IntToStrX(0),i+=ShortToStrX(1),i+=ShortToStrX(24),i+=IntToStrX(++o),d.variables.sort(AmtSetupBinVariableCompare),d.variables){var u="",s=d.variables[n],l=s.value;for(s.type=AmtSetupBinVarIds[s.moduleid][s.varid][0],0r.moduleid?1:e.moduleidr.varid?1:e.varid":p=!1,o=0;break;case"7":a=S,h=b,o=0;break;case"8":S=a,b=h,o=0;break;case"M":for(var t=m[1];t>=m[0]+1;t--)for(var i=0;im[0]-1;t--)for(i=0;il.height&&(b=l.height));break;case"C":1==t&&(0==r[0]?S++:S+=r[0],S>l.width&&(S=l.width));break;case"D":1==t&&(0==r[0]?S--:S-=r[0],S<0&&(S=0));break;case"d":1==t&&((b=r[0]-1)>l.height&&(b=l.height),b<0&&(b=0));break;case"G":1==t&&((S=r[0]-1)<0&&(S=0),S>l.width-1&&(S=l.width-1));break;case"P":var a=1;for(1==t&&(a=r[0]),n=S;nl.height&&(r[0]=l.height),r[1]>l.width&&(r[1]=l.width),b=r[0]-1,r[1]-1):b=0;break;case"m":for(n=0;nl.height-1&&(m[0]=l.height-1),m[1]<0&&(m[1]=0),m[1]>l.height-1&&(m[1]=l.height-1),m[0]>m[1]&&(m[0]=m[1]);break;case"S":a=1;1==t&&(a=r[0]);for(var c=m[0];c<=m[1]-a;c++)for(var f=0;fm[0]+a;c--)for(f=0;fm[0];c--)for(f=0;f=l.width&&(s=0,d++);break;default:console.log("Unknown terminal code",e,r,i)}}}(e,c,s+1,d),o=0;break;case 4:case 5:o=0;break;case 6:var n=e.charCodeAt(0);";"==e?s++:7==n?(function(e){if(0==e.length)return;var r=parseInt(e[0]);(0==r||2==r)&&1l.width&&(S=l.width),b>l.height-1&&(b=l.height-1),e){case"\b":0m[1]&&(l.recordLineTobackBuffer(0),P(1),b=m[1]),(l.lineFeed="\r")&&(S=0);break;case"\r":S=0;break;default:S>=l.width&&(S=0,C&&b++,b>=l.height-1&&(P(1),b=l.height-1)),F(e),S++}}}function F(e){k[b][S]=e,T[b][S]=(g<<6)+(w<<12)+u}function E(){for(var e=(g<<6)+(w<<12)+u,r=S;r")},l.TermDrawLine=function(e,r,t){for(var i,n,a,h,o=1,c=0;c>h&63],1&i&&(e+=";text-decoration:underline"),e+=';">',t=""+(t=""),o=i),n=k[r][c]){case"&":e+="&";break;case"<":e+="<";break;case">":e+=">";break;case" ":e+=" ";break;default:e+=n}return[e,t]},l.TermDraw=function(){for(var e="",r="",t=0;t")}800"+n+r+e+"",l.DivElement.scrollTop=l.DivElement.scrollHeight,0==l.heightLock&&setTimeout(l.TermLockHeight,10)},l.TermLockHeight=function(){l.heightLock=l.DivElement.clientHeight,l.DivElement.style.height=l.DivElement.parentNode.style.height=l.heightLock+"px",l.DivElement.style["overflow-y"]="scroll"},l.TermInit=function(){l.TermResetScreen()},l.heightLock=0,l.DivElement.style.height="",null!=r&&null!=r.cols&&null!=r.rows?l.Init(r.cols,r.rows):l.Init(),l} \ No newline at end of file +var CreateAmtRemoteTerminal=function(e,r){var l={};l.DivId=e,l.DivElement=document.getElementById(e),l.protocol=1,r.protocol&&(l.protocol=r.protocol),l.terminalEmulation=1,l.fxEmulation=0,l.lineFeed="\r\n",l.debugmode=0,l.width=80,l.height=25,l.heightLock=0;var m,f=["000000","BB0000","00BB00","BBBB00","0000BB","BB00BB","00BBBB","BBBBBB","555555","FF5555","55FF55","FFFF55","5555FF","FF55FF","55FFFF","FFFFFF"],u=0,g=7,w=0,C=!0,S=0,T=0,a=0,h=0,o=0,c=[],s=0,d=0,b=[],k=[],n=!1,v=!0,p=!1,y=[],t="";l.title=null,l.onTitleChange=null,l.Start=function(){},l.Init=function(e,r){l.width=e||80,l.height=r||25;for(var t=0;t":p=!1,o=0;break;case"7":a=S,h=T,o=0;break;case"8":S=a,T=h,o=0;break;case"M":for(var t=m[1];t>=m[0]+1;t--)for(var i=0;im[0]-1;t--)for(i=0;il.height&&(T=l.height));break;case"C":1==t&&(0==r[0]?S++:S+=r[0],S>l.width&&(S=l.width));break;case"D":1==t&&(0==r[0]?S--:S-=r[0],S<0&&(S=0));break;case"d":1==t&&(T=(T=r[0]-1)>l.height?l.height:T)<0&&(T=0);break;case"G":1==t&&(S=(S=r[0]-1)<0?0:S)>l.width-1&&(S=l.width-1);break;case"P":var h=1;for(1==t&&(h=r[0]),n=S;nl.height&&(r[0]=l.height),r[1]>l.width&&(r[1]=l.width),T=r[0]-1,r[1]-1):T=0;break;case"m":for(n=0;nl.height-1&&(m[0]=l.height-1),m[1]<0&&(m[1]=0),m[1]>l.height-1&&(m[1]=l.height-1),m[0]>m[1]&&(m[0]=m[1]);break;case"S":h=1;1==t&&(h=r[0]);for(var c=m[0];c<=m[1]-h;c++)for(var f=0;fm[0]+h;c--)for(f=0;fm[0];c--)for(f=0;f=l.width&&(s=0,d++);break;default:console.log("Unknown terminal code",e,r,i)}}}(e,c,s+1,d),o=0;break;case 4:case 5:o=0;break;case 6:var n=e.charCodeAt(0);";"==e?s++:7==n?(function(e){var r;0==e.length||(0==(r=parseInt(e[0]))||2==r)&&1l.width&&(S=l.width),T>l.height-1&&(T=l.height-1),e){case"\b":0m[1]&&(l.recordLineTobackBuffer(0),P(1),T=m[1]),l.lineFeed="\r",S=0;break;case"\r":S=0;break;default:S>=l.width&&(S=0,C&&T++,T>=l.height-1&&(P(1),T=l.height-1)),F(e),S++}}}function F(e){k[T][S]=e,b[T][S]=(g<<6)+(w<<12)+u}function E(){for(var e=(g<<6)+(w<<12)+u,r=S;r")},l.TermDrawLine=function(e,r,t){for(var i,n,a,h,o=1,c=0;c>h&63],1&i&&(e+=";text-decoration:underline"),e+=';">',t=""+(t=""),o=i),n=k[r][c]){case"&":e+="&";break;case"<":e+="<";break;case">":e+=">";break;case" ":e+=" ";break;default:e+=n}return[e,t]},l.TermDraw=function(){for(var e="",r="",t=0;t")}var n=(y=800"+n+r+e+"",l.DivElement.scrollTop=l.DivElement.scrollHeight,0==l.heightLock&&setTimeout(l.TermLockHeight,10)},l.TermLockHeight=function(){l.heightLock=l.DivElement.clientHeight,l.DivElement.style.height=l.DivElement.parentNode.style.height=l.heightLock+"px",l.DivElement.style["overflow-y"]="scroll"},l.TermInit=function(){l.TermResetScreen()},l.heightLock=0,l.DivElement.style.height="",null!=r&&null!=r.cols&&null!=r.rows?l.Init(r.cols,r.rows):l.Init(),l} \ No newline at end of file diff --git a/public/scripts/amt-wsman-0.2.0-min.js b/public/scripts/amt-wsman-0.2.0-min.js index a8eb3bca..159fd00e 100644 --- a/public/scripts/amt-wsman-0.2.0-min.js +++ b/public/scripts/amt-wsman-0.2.0-min.js @@ -1 +1 @@ -var WsmanStackCreateService=function(e,s,r,a,o,t){var p={};function l(e){if(!e)return"";var s=" ";for(var r in e)e.hasOwnProperty(r)&&0===r.indexOf("@")&&(s+=r.substring(1)+'="'+e[r]+'" ');return s}function w(e){if(!e)return"";if("string"==typeof e)return e;if(e.InstanceID)return''+e.InstanceID+"";var s="";for(var r in e)if(e.hasOwnProperty(r)){if(s+='',e[r].ReferenceParameters){s+="",s+=""+e[r].Address+""+e[r].ReferenceParameters.ResourceURI+"";var a=e[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o"+a[o].Value+"";else s+=""+a.Value+"";s+=""}else s+=e[r];s+=""}return s+=""}return p.NextMessageId=1,p.Address="/wsman",p.comm=CreateWsmanComm(e,s,r,a,o,t),p.PerformAjax=function(e,o,s,r,a){null==a&&(a=""),p.comm.PerformAjax('
"+e,function(e,s,r){if(200==s){var a=p.ParseWsman(e);a&&null!=a?o(p,a.Header.ResourceURI,a,200,r):o(p,null,{Header:{HttpError:s}},601,r)}else o(p,null,{Header:{HttpError:s}},s,r)},s,r)},p.CancelAllQueries=function(e){p.comm.CancelAllQueries(e)},p.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},p.ExecSubscribe=function(e,s,r,a,o,t,n,l,d,c){var m="",i="";null!=d&&null!=c&&(m="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken"+d+''+c+"",i=''),l=null!=l&&null!=l?""+l+"":"";var u="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+w(n)+m+'
'+r+""+i+"PT0.000000S";p.PerformAjax(u+"
",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},p.ExecUnSubscribe=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+w(o)+"";p.PerformAjax(t+"",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},p.ExecPut=function(e,s,r,a,o,t){var n="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S"+w(t)+""+function(e,s){if(!e||null==s)return"";var r=p.GetNameFromUrl(e),a="';for(var o in s)if(s.hasOwnProperty(o)&&0!==o.indexOf("__")&&0!==o.indexOf("@")&&void 0!==s[o]&&null!==s[o]&&"function"!=typeof s[o])if("object"==typeof s[o]&&s[o].ReferenceParameters){a+=""+s[o].Address+""+s[o].ReferenceParameters.ResourceURI+"";var t=s[o].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n"+t[n].Value+"";else a+=""+t.Value+"";a+=""}else if(Array.isArray(s[o]))for(n=0;n"+s[o][n].toString()+"";else a+=""+s[o].toString()+"";return a+=""}(e,s);p.PerformAjax(n+"",r,a,o)},p.ExecCreate=function(e,s,r,a,o,t){var n=p.GetNameFromUrl(e),l="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+w(t)+"';for(var d in s)l+=""+s[d]+"";p.PerformAjax(l+"",r,a,o)},p.ExecCreateXml=function(e,s,r,a,o){var t=p.GetNameFromUrl(e);p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S'+s+"",r,a,o)},p.ExecDelete=function(e,s,r,a,o){var t="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+w(s)+"";p.PerformAjax(t,r,a,o)},p.ExecGet=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S",s,r,a)},p.ExecMethod=function(e,s,r,a,o,t,n){var l="";for(var d in r)if(null!=r[d])if(Array.isArray(r[d]))for(var c in r[d])l+=""+r[d][c]+"";else l+=""+r[d]+"";p.ExecMethodXml(e,s,l,a,o,t,n)},p.ExecMethodXml=function(e,s,r,a,o,t,n){p.PerformAjax(e+"/"+s+""+p.Address+""+e+""+p.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+w(n)+"'+r+"",a,o,t)},p.ExecEnum=function(e,s,r,a){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"+p.Address+""+e+""+p.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S',s,r,a)},p.ExecPull=function(e,s,r,a,o){p.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"+p.Address+""+e+""+p.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S'+s+"99999999",r,a,o)},p.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e,r={Header:{}},a=s.getElementsByTagName("Header")[0];if(!(a=a||s.getElementsByTagName("a:Header")[0]))return null;for(var o=0;o'+e.InstanceID+"";var s,r="";for(s in e)if(e.hasOwnProperty(s)){if(r+='',e[s].ReferenceParameters){r+="",r+=""+e[s].Address+""+e[s].ReferenceParameters.ResourceURI+"";var a=e[s].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(a))for(var o=0;o"+a[o].Value+"";else r+=""+a.Value+"";r+=""}else r+=e[s];r+=""}return r+=""}return u.NextMessageId=1,u.Address="/wsman",u.comm=CreateWsmanComm(e,s,r,a,o,t),u.PerformAjax=function(e,a,s,r,o){null==o&&(o=""),u.comm.PerformAjax('
"+e,function(e,s,r){200==s?(e=u.ParseWsman(e))&&null!=e?a(u,e.Header.ResourceURI,e,200,r):a(u,null,{Header:{HttpError:s}},601,r):a(u,null,{Header:{HttpError:s}},s,r)},s,r)},u.CancelAllQueries=function(e){u.comm.CancelAllQueries(e)},u.GetNameFromUrl=function(e){var s=e.lastIndexOf("/");return-1==s?e:e.substring(s+1)},u.ExecSubscribe=function(e,s,r,a,o,t,n,l,d,c){var m="",i="";null!=d&&null!=c&&(m="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken"+d+''+c+"",i='');i="http://schemas.xmlsoap.org/ws/2004/08/eventing/Subscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(n)+m+'
'+r+""+i+"PT0.000000S";u.PerformAjax(i+"
",a,o,t,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing" xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:se="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:m="http://x.com"')},u.ExecUnSubscribe=function(e,s,r,a,o){o="http://schemas.xmlsoap.org/ws/2004/08/eventing/Unsubscribe"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous"+p(o)+"";u.PerformAjax(o+"",s,r,a,'xmlns:e="http://schemas.xmlsoap.org/ws/2004/08/eventing"')},u.ExecPut=function(e,s,r,a,o,t){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Put"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S"+p(t)+""+function(e,s){if(!e||null==s)return"";var r,a=u.GetNameFromUrl(e),o="';for(r in s)if(s.hasOwnProperty(r)&&0!==r.indexOf("__")&&0!==r.indexOf("@")&&void 0!==s[r]&&null!==s[r]&&"function"!=typeof s[r])if("object"==typeof s[r]&&s[r].ReferenceParameters){o+=""+s[r].Address+""+s[r].ReferenceParameters.ResourceURI+"";var t=s[r].ReferenceParameters.SelectorSet.Selector;if(Array.isArray(t))for(var n=0;n"+t[n].Value+"";else o+=""+t.Value+"";o+=""}else if(Array.isArray(s[r]))for(n=0;n"+s[r][n].toString()+"";else o+=""+s[r].toString()+"";return o+=""}(e,s);u.PerformAjax(s+"",r,a,o)},u.ExecCreate=function(e,s,r,a,o,t){var n,l=u.GetNameFromUrl(e),d="http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(t)+"';for(n in s)d+=""+s[n]+"";u.PerformAjax(d+"",r,a,o)},u.ExecCreateXml=function(e,s,r,a,o){var t=u.GetNameFromUrl(e);u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Create"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60.000S'+s+"",r,a,o)},u.ExecDelete=function(e,s,r,a,o){s="http://schemas.xmlsoap.org/ws/2004/09/transfer/Delete"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(s)+"";u.PerformAjax(s,r,a,o)},u.ExecGet=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/transfer/Get"+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S",s,r,a)},u.ExecMethod=function(e,s,r,a,o,t,n){var l,d="";for(l in r)if(null!=r[l])if(Array.isArray(r[l]))for(var c in r[l])d+=""+r[l][c]+"";else d+=""+r[l]+"";u.ExecMethodXml(e,s,d,a,o,t,n)},u.ExecMethodXml=function(e,s,r,a,o,t,n){u.PerformAjax(e+"/"+s+""+u.Address+""+e+""+u.NextMessageId+++"http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S"+p(n)+"'+r+"",a,o,t)},u.ExecEnum=function(e,s,r,a){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Enumerate"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S',s,r,a)},u.ExecPull=function(e,s,r,a,o){u.PerformAjax("http://schemas.xmlsoap.org/ws/2004/09/enumeration/Pull"+u.Address+""+e+""+u.NextMessageId+++'http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymousPT60S'+s+"99999999",r,a,o)},u.ParseWsman=function(s){try{s.childNodes||(s=function(e){{if(window.DOMParser)return(new DOMParser).parseFromString(e,"text/xml");var s=new ActiveXObject("Microsoft.XMLDOM");return s.async=!1,s.loadXML(e),s}}(s));var e={Header:{}},r=s.getElementsByTagName("Header")[0];if(!(r=r||s.getElementsByTagName("a:Header")[0]))return null;for(var a=0;a=c.MaxActiveAjaxCount||0==c.PendingAjax.length)){var e=c.PendingAjax.shift();c.PerformAjaxEx(e[0],e[1],e[2],e[3],e[4]),c.PerformNextAjax()}},c.PerformAjaxEx=function(e,t,r,n,a){if(0==c.FailAllError)return e=e||"",c.ActiveAjaxCount++,c.PerformAjaxExNodeJS(e,t,r,n,a);c.gotNextMessagesError({status:c.FailAllError},"error",null,[e,t,r,n,a])},c.pendingAjaxCall=[],c.PerformAjaxExNodeJS=function(e,t,r,n,a){c.PerformAjaxExNodeJS2(e,t,r,n,a,3)},c.PerformAjaxExNodeJS2=function(e,t,r,n,a,o){if(o<=0||0!=c.FailAllError)return c.ActiveAjaxCount--,999!=c.FailAllError&&c.gotNextMessages(null,"error",{status:0==c.FailAllError?408:c.FailAllError},[e,t,r,n,a]),void c.PerformNextAjax();c.pendingAjaxCall.push([e,t,r,n,a,o]),0==c.socketState?c.xxConnectHttpSocket():2==c.socketState&&c.sendRequest(e,n,a)},c.sendRequest=function(e,t,r){var n=(r=r||"POST")+" "+(t=t||"/wsman")+" HTTP/1.1\r\n";if(null!=c.challengeParams){var a=hex_md5(hex_md5(c.user+":"+c.challengeParams.realm+":"+c.pass)+":"+c.challengeParams.nonce+":"+c.noncecounter+":"+c.cnonce+":"+c.challengeParams.qop+":"+hex_md5(r+":"+t+("auth-int"==c.challengeParams.qop?":"+hex_md5(e):"")));n+="Authorization: "+c.renderDigest({username:c.user,realm:c.challengeParams.realm,nonce:c.challengeParams.nonce,uri:t,qop:c.challengeParams.qop,response:a,nc:c.noncecounter++,cnonce:c.cnonce})+"\r\n"}!function(e){if(2==c.socketState&&null!=c.socket&&c.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),r=0;r=s.MaxActiveAjaxCount||0==s.PendingAjax.length||(e=s.PendingAjax.shift(),s.PerformAjaxEx(e[0],e[1],e[2],e[3],e[4]),s.PerformNextAjax())},s.PerformAjaxEx=function(e,t,n,r,a){if(0==s.FailAllError)return e=e||"",s.ActiveAjaxCount++,s.PerformAjaxExNodeJS(e,t,n,r,a);s.gotNextMessagesError({status:s.FailAllError},"error",null,[e,t,n,r,a])},s.pendingAjaxCall=[],s.PerformAjaxExNodeJS=function(e,t,n,r,a){s.PerformAjaxExNodeJS2(e,t,n,r,a,3)},s.PerformAjaxExNodeJS2=function(e,t,n,r,a,o){if(o<=0||0!=s.FailAllError)return s.ActiveAjaxCount--,999!=s.FailAllError&&s.gotNextMessages(null,"error",{status:0==s.FailAllError?408:s.FailAllError},[e,t,n,r,a]),void s.PerformNextAjax();s.pendingAjaxCall.push([e,t,n,r,a,o]),0==s.socketState?s.xxConnectHttpSocket():2==s.socketState&&s.sendRequest(e,r,a)},s.sendRequest=function(e,t,n){var r=(n=n||"POST")+" "+(t=t||"/wsman")+" HTTP/1.1\r\n";null!=s.challengeParams&&(n=hex_md5(hex_md5(s.user+":"+s.challengeParams.realm+":"+s.pass)+":"+s.challengeParams.nonce+":"+s.noncecounter+":"+s.cnonce+":"+s.challengeParams.qop+":"+hex_md5(n+":"+t+("auth-int"==s.challengeParams.qop?":"+hex_md5(e):""))),r+="Authorization: "+s.renderDigest({username:s.user,realm:s.challengeParams.realm,nonce:s.challengeParams.nonce,uri:t,qop:s.challengeParams.qop,response:n,nc:s.noncecounter++,cnonce:s.cnonce})+"\r\n"),function(e){if(2==s.socketState&&null!=s.socket&&s.socket.readyState==WebSocket.OPEN){for(var t=new Uint8Array(e.length),n=0;n>>0,i=0;iwt(t)?(r=t+1,s-wt(t)):(r=t,s),{year:r,dayOfYear:o}}function Bt(t,e,n){var i,a,r=Ht(t.year(),e,n),o=Math.floor((t.dayOfYear()-r-1)/7)+1;return o<1?i=o+Et(a=t.year()-1,e,n):o>Et(t.year(),e,n)?(i=o-Et(t.year(),e,n),a=t.year()+1):(a=t.year(),i=o),{week:i,year:a}}function Et(t,e,n){var i=Ht(t,e,n),a=Ht(t+1,e,n);return(wt(t)-i+a)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),W("week",5),W("isoWeek",5),lt("w",J),lt("ww",J,q),lt("W",J),lt("WW",J,q),ft(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)});B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),W("day",11),W("weekday",11),W("isoWeekday",11),lt("d",J),lt("e",J),lt("E",J),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,i){var a=n._locale.weekdaysParse(t,i,n._strict);null!=a?e.d=a:g(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var qt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Gt=ot;var Zt=ot;var Xt=ot;function Jt(){function t(t,e){return e.length-t.length}var e,n,i,a,r,o=[],s=[],l=[],u=[];for(e=0;e<7;e++)n=h([2e3,1]).day(e),i=this.weekdaysMin(n,""),a=this.weekdaysShort(n,""),r=this.weekdays(n,""),o.push(i),s.push(a),l.push(r),u.push(i),u.push(a),u.push(r);for(o.sort(t),s.sort(t),l.sort(t),u.sort(t),e=0;e<7;e++)s[e]=dt(s[e]),l[e]=dt(l[e]),u[e]=dt(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Kt(){return this.hours()%12||12}function $t(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Kt),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+Kt.apply(this)+Y(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Kt.apply(this)+Y(this.minutes(),2)+Y(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+Y(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+Y(this.minutes(),2)+Y(this.seconds(),2)}),$t("a",!0),$t("A",!1),A("hour","h"),W("hour",13),lt("a",Qt),lt("A",Qt),lt("H",J),lt("h",J),lt("k",J),lt("HH",J,q),lt("hh",J,q),lt("kk",J,q),lt("hmm",K),lt("hmmss",$),lt("Hmm",K),lt("Hmmss",$),ct(["H","HH"],vt),ct(["k","kk"],function(t,e,n){var i=k(t);e[vt]=24===i?0:i}),ct(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ct(["h","hh"],function(t,e,n){e[vt]=k(t),g(n).bigHour=!0}),ct("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i)),g(n).bigHour=!0}),ct("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a)),g(n).bigHour=!0}),ct("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i))}),ct("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a))});var te,ee=Ct("Hours",!0),ne={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:jt,weekdaysMin:qt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},ie={},ae={};function re(t){return t?t.toLowerCase().replace("_","-"):t}function oe(t){var e=null;if(!ie[t]&&void 0!==Un&&Un&&Un.exports)try{e=te._abbr,jn("./locale/"+t),se(e)}catch(t){}return ie[t]}function se(t,e){var n;return t&&(n=r(e)?ue(t):le(t,e))&&(te=n),te._abbr}function le(t,e){if(null===e)return delete ie[t],null;var n=ne;if(e.abbr=t,null!=ie[t])C("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ie[t]._config;else if(null!=e.parentLocale){if(null==ie[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=ie[e.parentLocale]._config}return ie[t]=new O(T(n,e)),ae[t]&&ae[t].forEach(function(t){le(t.name,t.config)}),se(t),ie[t]}function ue(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return te;if(!o(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r=e&&w(a,n,!0)>=e-1)break;e--}r++}return null}(t)}function de(t){var e,n=t._a;return n&&-2===g(t).overflow&&(e=n[mt]<0||11Ot(n[gt],n[mt])?pt:n[vt]<0||24Et(n,r,o)?g(t)._overflowWeeks=!0:null!=l?g(t)._overflowWeekday=!0:(s=Vt(n,i,a,r,o),t._a[gt]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(r=he(t._a[gt],i[gt]),(t._dayOfYear>wt(r)||0===t._dayOfYear)&&(g(t)._overflowDayOfYear=!0),n=zt(r,0,t._dayOfYear),t._a[mt]=n.getUTCMonth(),t._a[pt]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=o[e]=i[e];for(;e<7;e++)t._a[e]=o[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[yt]&&0===t._a[bt]&&0===t._a[xt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?zt:function(t,e,n,i,a,r,o){var s=new Date(t,e,n,i,a,r,o);return t<100&&0<=t&&isFinite(s.getFullYear())&&s.setFullYear(t),s}).apply(null,o),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(g(t).weekdayMismatch=!0)}}var fe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,pe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ye=/^\/?Date\((\-?\d+)/i;function be(t){var e,n,i,a,r,o,s=t._i,l=fe.exec(s)||ge.exec(s);if(l){for(g(t).iso=!0,e=0,n=pe.length;en.valueOf():n.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},un.isLocal=function(){return!!this.isValid()&&!this._isUTC},un.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},un.isUtc=He,un.isUTC=He,un.zoneAbbr=function(){return this._isUTC?"UTC":""},un.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},un.dates=n("dates accessor is deprecated. Use date instead.",nn),un.months=n("months accessor is deprecated. Use month instead",Lt),un.years=n("years accessor is deprecated. Use year instead",Dt),un.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),un.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t={};if(y(t,this),(t=Se(t))._a){var e=t._isUTC?h(t._a):Ce(t._a);this._isDSTShifted=this.isValid()&&0');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(l){var u=l.data;return u.labels.length&&u.datasets.length?u.labels.map(function(t,e){var n=l.getDatasetMeta(0),i=u.datasets[0],a=n.data[e],r=a&&a.custom||{},o=O.valueAtIndexOrDefault,s=l.options.elements.arc;return{text:t,fillStyle:r.backgroundColor?r.backgroundColor:o(i.backgroundColor,e,s.backgroundColor),strokeStyle:r.borderColor?r.borderColor:o(i.borderColor,e,s.borderColor),lineWidth:r.borderWidth?r.borderWidth:o(i.borderWidth,e,s.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n=Math.PI?-1:f<-Math.PI?1:0))+c,m=Math.cos(f),p=Math.sin(f),v=Math.cos(g),y=Math.sin(g),b=f<=0&&0<=g||f<=2*Math.PI&&2*Math.PI<=g,x=f<=.5*Math.PI&&.5*Math.PI<=g||f<=2.5*Math.PI&&2.5*Math.PI<=g,_=f<=-Math.PI&&-Math.PI<=g||f<=Math.PI&&Math.PI<=g,k=f<=.5*-Math.PI&&.5*-Math.PI<=g||f<=1.5*Math.PI&&1.5*Math.PI<=g,w=h/100,M=_?-1:Math.min(m*(m<0?1:w),v*(v<0?1:w)),S=k?-1:Math.min(p*(p<0?1:w),y*(y<0?1:w)),D=b?1:Math.max(m*(0');var n=t.data,i=n.datasets,a=n.labels;if(i.length)for(var r=0;r'),a[r]&&e.push(a[r]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},r=_.valueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor?a.backgroundColor:r(i.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor?a.borderColor:r(i.borderColor,e,o.borderColor),lineWidth:a.borderWidth?a.borderWidth:r(i.borderWidth,e,o.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){var n,i,a,r=e.index,o=this.chart;for(n=0,i=(o.data.datasets||[]).length;n=e.numSteps?(r.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var s=t(25),h=t(45),a=t(28),i=t(30),l=t(48),c=t(31);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var n=this;e=function(t){var e=(t=t||{}).data=t.data||{};return e.datasets=e.datasets||[],e.labels=e.labels||[],t.options=h.configMerge(s.global,s[t.type],t.options||{}),t}(e);var i=l.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,o=a&&a.width;n.id=h.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=o,n.height=r,n.aspectRatio=r?o/r:null,n.options=e.options,n._bufferedRender=!1,(n.chart=n).controller=n,u.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return c.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),c.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return u.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(h.getMaximumWidth(i))),o=Math.max(0,Math.floor(a?r/a:h.getMaximumHeight(i)));if((e.width!==r||e.height!==o)&&(i.width=e.width=r,i.height=e.height=o,i.style.width=r+"px",i.style.height=o+"px",h.retinaScale(e,n.devicePixelRatio),!t)){var s={width:r,height:o};c.notify(e,"resize",[s]),e.options.onResize&&e.options.onResize(e,s),e.stop(),e.update(e.options.responsiveAnimationDuration)}},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},n=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),n&&(n.id=n.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,n=e.id,i=h.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0;var a=null;if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=u.scaleService.getScaleConstructor(i);if(!r)return;a=new r({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),o.scales=s,u.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var r=this,o=[],s=[];return h.each(r.data.datasets,function(t,e){var n=r.getDatasetMeta(e),i=t.type||r.config.type;if(n.type&&n.type!==i&&(r.destroyDatasetMeta(e),n=r.getDatasetMeta(e)),n.type=i,o.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{var a=u.controllers[n.type];if(void 0===a)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new a(r,e),s.push(n.controller)}},r),s},resetElements:function(){var n=this;h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var n=this;if(t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),function(e){var t=e.options;h.each(e.scales,function(t){i.removeBox(e,t)}),t=h.configMerge(u.defaults.global,u.defaults[e.config.type],t),e.options=e.config.options=t,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=t.tooltips,e.tooltip.initialize()}(n),c._invalidate(n),!1!==c.notify(n,"beforeUpdate")){n.tooltip._data=n.data;var e=n.buildOrUpdateControllers();h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.buildOrUpdateElements()},n),n.updateLayout(),n.options.animation&&n.options.animation.duration&&h.each(e,function(t){t.reset()}),n.updateDatasets(),n.tooltip.initialize(),n.lastActive=[],c.notify(n,"afterUpdate"),n._bufferedRender?n._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:n.render(t)}},updateLayout:function(){!1!==c.notify(this,"beforeLayout")&&(i.update(this,this.width,this.height),c.notify(this,"afterScaleUpdate"),c.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==c.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?g.merge(e[t][a],[l.scaleService.getScaleDefaults(r),o]):g.merge(e[t][a],o)}else g._merger(t,e,n,i)}})},g.where=function(t,e){if(g.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return g.each(t,function(t){e(t)&&n.push(t)}),n},g.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},g.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},g.niceNum=function(t,e){var n=Math.floor(g.log10(t)),i=t/Math.pow(10,n);return(e?i<1.5?1:i<3?2:i<7?5:10:i<=1?1:i<=2?2:i<=5?5:10)*Math.pow(10,n)},g.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},g.getRelativePosition=function(t,e){var n,i,a=t.originalEvent||t,r=t.currentTarget||t.srcElement,o=r.getBoundingClientRect(),s=a.touches;i=s&&0n.length){for(var l=0;le&&(e=t.length)}),e},g.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},g.getHoverColor=function(t){return t instanceof CanvasPattern?t:g.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function s(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function l(t,e){var n,i,a,r,o;for(i=0,r=t.data.datasets.length;it.maxHeight){r--;break}r++,l=o*s}t.labelRotation=r},afterCalculateTickRotation:function(){B.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){B.callback(this.options.beforeFit,[this])},fit:function(){var t=this,e=t.minSize={width:0,height:0},n=M(t._ticks),i=t.options,a=i.ticks,r=i.scaleLabel,o=i.gridLines,s=i.display,l=t.isHorizontal(),u=k(a),d=i.gridLines.tickMarkLength;if(e.width=l?t.isFullWidth()?t.maxWidth-t.margins.left-t.margins.right:t.maxWidth:s&&o.drawTicks?d:0,e.height=l?s&&o.drawTicks?d:0:t.maxHeight,r.display&&s){var h=w(r)+B.options.toPadding(r.padding).height;l?e.height+=h:e.width+=h}if(a.display&&s){var c=B.longestText(t.ctx,u.font,n,t.longestTextCache),f=B.numberOfLabelLines(n),g=.5*u.size,m=t.options.ticks.padding;if(l){t.longestLabelWidth=c;var p=B.toRadians(t.labelRotation),v=Math.cos(p),y=Math.sin(p)*c+u.size*f+g*(f-1)+g;e.height=Math.min(t.maxHeight,e.height+y+m),t.ctx.font=u.font;var b=_(t.ctx,n[0],u.font),x=_(t.ctx,n[n.length-1],u.font);0!==t.labelRotation?(t.paddingLeft="bottom"===i.position?v*b+3:v*g+3,t.paddingRight="bottom"===i.position?v*g+3:v*x+3):(t.paddingLeft=b/2+3,t.paddingRight=x/2+3)}else a.mirror?c=0:c+=m+g,e.width=Math.min(t.maxWidth,e.width+c),t.paddingTop=u.size/2,t.paddingBottom=u.size/2}t.handleMargins(),t.width=e.width,t.height=e.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){B.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(B.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:B.noop,getPixelForValue:B.noop,getValueForPixel:B.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);var r=e.left+Math.round(a);return r+=e.isFullWidth()?e.margins.left:0}var o=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(o/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,i=e.left+Math.round(n);return i+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((h+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),a&&ai.width&&(a=i.width-e.width),a<0&&(a=0)),"top"===d?r+=h:r-="bottom"===d?e.height+h:e.height/2,"center"===d?"left"===u?a+=h:"right"===u&&(a-=h):"left"===u?a-=c:"right"===u&&(a+=c),{x:a,y:r}}(h,p=w(this,h),g=function(t,e){var n,i,a,r,o,s=t._model,l=t._chart,u=t._chart.chartArea,d="center",h="center";s.yl.height-e.height&&(h="bottom");var c=(u.left+u.right)/2,f=(u.top+u.bottom)/2;i="center"===h?(n=function(t){return t<=c},function(t){return c=l.width-e.width/2}),a=function(t){return t+e.width+s.caretSize+s.caretPadding>l.width},r=function(t){return t-e.width-s.caretSize-s.caretPadding<0},o=function(t){return t<=f?"top":"bottom"},n(s.x)?(d="left",a(s.x)&&(d="center",h=o(s.y))):i(s.x)&&(d="right",r(s.x)&&(d="center",h=o(s.y)));var g=t._options;return{xAlign:g.xAlign?g.xAlign:d,yAlign:g.yAlign?g.yAlign:h}}(this,p),l._chart)}else h.opacity=0;return h.xAlign=g.xAlign,h.yAlign=g.yAlign,h.x=m.x,h.y=m.y,h.width=p.width,h.height=p.height,h.caretX=v.x,h.caretY=v.y,l._model=h,t&&u.custom&&u.custom.call(l,h),l},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,a=this.getCaretPosition(t,e,i);n.lineTo(a.x1,a.y1),n.lineTo(a.x2,a.y2),n.lineTo(a.x3,a.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,m=e.width,p=e.height;if("center"===c)s=g+p/2,l="left"===h?(a=(i=f)-u,r=i,o=s+u,s-u):(a=(i=f+m)+u,r=i,o=s-u,s+u);else if(r=(i="left"===h?(a=f+d+u)-u:"right"===h?(a=f+m-d-u)-u:(a=n.caretX)-u,a+u),"top"===c)s=(o=g)-u,l=o;else{s=(o=g+p)+u,l=o;var v=r;r=i,i=v}return{x1:i,x2:a,x3:r,y1:o,y2:s,y3:l}},drawTitle:function(t,e,n,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=c(e.titleFontColor,i),n.font=M.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r=n.innerRadius&&r<=n.outerRadius;return l&&u}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),d=t(45),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||h.defaultColor,r.beginPath(),u=-1,t=0;t=i.left&&t<=i.right&&e>=i.top&&e<=i.bottom}return n},inLabelRange:function(t,e){if(!this._view)return!1;var n=r(this);return l(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=r(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=r(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e,n=this._view;return e=l(this)?(t=n.x,(n.y+n.base)/2):(t=(n.x+n.base)/2,n.y),{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";var i=t(42);n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){if(r){var o=Math.min(r,i/2),s=Math.min(r,a/2);t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+s),t.lineTo(e+i,n+a-s),t.quadraticCurveTo(e+i,n+a,e+i-o,n+a),t.lineTo(e+o,n+a),t.quadraticCurveTo(e,n+a,e,n+a-s),t.lineTo(e,n+s),t.quadraticCurveTo(e,n,e+o,n)}else t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var r,o,s,l,u,d;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),u=(o=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-o/2,a+u/3),t.lineTo(i+o/2,a+u/3),t.lineTo(i,a-2*u/3),t.closePath(),t.fill();break;case"rect":d=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-d,a-d,2*d,2*d),t.strokeRect(i-d,a-d,2*d,2*d);break;case"rectRounded":var h=n/Math.SQRT2,c=i-h,f=a-h,g=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,c,f,g,g,n/2),t.closePath(),t.fill();break;case"rectRot":d=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-d,a),t.lineTo(i,a+d),t.lineTo(i+d,a),t.lineTo(i,a-d),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i-s,a+l),t.lineTo(i+s,a-l),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),s=Math.cos(Math.PI/4)*n,l=Math.sin(Math.PI/4)*n,t.moveTo(i-s,a-l),t.lineTo(i+s,a+l),t.moveTo(i-s,a+l),t.lineTo(i+s,a-l),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};i.clear=n.clear,i.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(d.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
';var a=e.childNodes[0],r=e.childNodes[1];function o(){e._reset(),t()}return e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6},f(a,"scroll",o.bind(a,"expand")),f(r,"scroll",o.bind(r,"shrink")),e}(function(t,e){var n=!1,i=[];return function(){i=Array.prototype.slice.call(arguments),e=e||this,n||(n=!0,r.requestAnimFrame.call(window,function(){n=!1,t.apply(e,i)}))}}(function(){if(i.resizer)return t(m("resize",n))}));!function(e,n){var t=e[s]||(e[s]={}),i=t.renderProxy=function(t){t.animationName===u&&n()};r.each(d,function(t){f(e,t,i)}),t.reflow=!!e.offsetParent,e.classList.add(o)}(e,function(){if(i.resizer){var t=e.parentNode;t&&t!==a.parentNode&&t.insertBefore(a,t.firstChild),a._reset()}})}function v(t){var e=t[s]||{},n=e.resizer;delete e.resizer,function(e){var t=e[s]||{},n=t.renderProxy;n&&(r.each(d,function(t){g(e,t,n)}),delete t.renderProxy),e.classList.remove(o)}(t),n&&n.parentNode&&n.parentNode.removeChild(n)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t="from{opacity:0.99}to{opacity:1}";!function(t,e){var n=t._style||document.createElement("style");t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))}(this,"@-webkit-keyframes "+u+"{"+t+"}@keyframes "+u+"{"+t+"}."+o+"{-webkit-animation:"+u+" 0.001s;animation:"+u+" 0.001s;}")},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]),t&&t.canvas&&(t=t.canvas);var n=t&&t.getContext&&t.getContext("2d");return n&&n.canvas===t?(function(t,e){var n=t.style,i=t.getAttribute("height"),a=t.getAttribute("width");if(t[s]={initial:{height:i,width:a,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===a||""===a){var r=c(t,"width");void 0!==r&&(t.width=r)}if(null===i||""===i)if(""===t.style.height)t.height=t.width/(e.options.aspectRatio||2);else{var o=c(t,"height");void 0!==r&&(t.height=o)}}(t,e),n):null},releaseContext:function(t){var n=t.canvas;if(n[s]){var i=n[s].initial;["height","width"].forEach(function(t){var e=i[t];r.isNullOrUndef(e)?n.removeAttribute(t):n.setAttribute(t,e)}),r.each(i.style||{},function(t,e){n.style[e]=t}),n.width=n.width,delete n[s]}},addEventListener:function(e,t,n){var i=e.canvas;if("resize"!==t){var a=n[s]||(n[s]={});f(i,t,(a.proxies||(a.proxies={}))[e.id+"_"+t]=function(t){n(function(t,e){var n=h[t.type]||t.type,i=r.getRelativePosition(t,e);return m(n,e,i.x,i.y,t)}(t,e))})}else p(i,n,e)},removeEventListener:function(t,e,n){var i=t.canvas;if("resize"!==e){var a=((n[s]||{}).proxies||{})[t.id+"_"+e];a&&g(i,e,a)}else v(i)}},r.addEvent=f,r.removeEvent=g},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),r=t(47),o=r._enabled?r:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},o)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var u=t(25),c=t(40),d=t(45);u._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,n=t.chart,i=n.getDatasetMeta(e),a=i&&n.isDatasetVisible(e)&&i.dataset._children||[],r=a.length||0;return r?function(t,e){return e');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var o=i.extend({initialize:function(t){w.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:r,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:r,beforeSetDimensions:r,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:r,beforeBuildLabels:r,buildLabels:function(){var e=this,n=e.options.labels||{},t=w.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:r,beforeFit:r,fit:function(){var i=this,t=i.options,a=t.labels,e=t.display,r=i.ctx,n=k.global,o=w.valueOrDefault,s=o(a.fontSize,n.defaultFontSize),l=o(a.fontStyle,n.defaultFontStyle),u=o(a.fontFamily,n.defaultFontFamily),d=w.fontString(s,l,u),h=i.legendHitBoxes=[],c=i.minSize,f=i.isHorizontal();if(f?(c.width=i.maxWidth,c.height=e?10:0):(c.width=e?10:0,c.height=i.maxHeight),e)if(r.font=d,f){var g=i.lineWidths=[0],m=i.legendItems.length?s+a.padding:0;r.textAlign="left",r.textBaseline="top",w.each(i.legendItems,function(t,e){var n=M(a,s)+s/2+r.measureText(t.text).width;g[g.length-1]+n+a.padding>=i.width&&(m+=s+a.padding,g[g.length]=i.left),h[e]={left:0,top:0,width:n,height:s},g[g.length-1]+=n+a.padding}),c.height+=m}else{var p=a.padding,v=i.columnWidths=[],y=a.padding,b=0,x=0,_=s+p;w.each(i.legendItems,function(t,e){var n=M(a,s)+s/2+r.measureText(t.text).width;x+_>c.height&&(y+=b+a.padding,v.push(b),x=b=0),b=Math.max(b,n),x+=_,h[e]={left:0,top:0,width:n,height:s}}),y+=b,v.push(b),c.width+=y}i.width=c.width,i.height=c.height},afterFit:r,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var o=this,l=o.options,s=l.labels,u=k.global,d=u.elements.line,h=o.width,c=o.lineWidths;if(l.display){var f,g=o.ctx,m=w.valueOrDefault,t=m(s.fontColor,u.defaultFontColor),p=m(s.fontSize,u.defaultFontSize),e=m(s.fontStyle,u.defaultFontStyle),n=m(s.fontFamily,u.defaultFontFamily),i=w.fontString(p,e,n);g.textAlign="left",g.textBaseline="middle",g.lineWidth=.5,g.strokeStyle=t,g.fillStyle=t,g.font=i;var v=M(s,p),y=o.legendHitBoxes,b=o.isHorizontal();f=b?{x:o.left+(h-c[0])/2,y:o.top+s.padding,line:0}:{x:o.left+s.padding,y:o.top+s.padding,line:0};var x=p+s.padding;w.each(o.legendItems,function(t,e){var n=g.measureText(t.text).width,i=v+p/2+n,a=f.x,r=f.y;b?h<=a+i&&(r=f.y+=x,f.line++,a=f.x=o.left+(h-c[f.line])/2):r+x>o.bottom&&(a=f.x=a+o.columnWidths[f.line]+s.padding,r=f.y=o.top+s.padding,f.line++),function(t,e,n){if(!(isNaN(v)||v<=0)){g.save(),g.fillStyle=m(n.fillStyle,u.defaultColor),g.lineCap=m(n.lineCap,d.borderCapStyle),g.lineDashOffset=m(n.lineDashOffset,d.borderDashOffset),g.lineJoin=m(n.lineJoin,d.borderJoinStyle),g.lineWidth=m(n.lineWidth,d.borderWidth),g.strokeStyle=m(n.strokeStyle,u.defaultColor);var i=0===m(n.lineWidth,d.borderWidth);if(g.setLineDash&&g.setLineDash(m(n.lineDash,d.borderDash)),l.labels&&l.labels.usePointStyle){var a=p*Math.SQRT2/2,r=a/Math.SQRT2,o=t+r,s=e+r;w.canvas.drawPoint(g,n.pointStyle,a,o,s)}else i||g.strokeRect(t,e,v,p),g.fillRect(t,e,v,p);g.restore()}}(a,r,t),function(t,e,n,i){var a=p/2,r=v+a+t,o=e+a;g.fillText(n.text,r,o),n.hidden&&(g.beginPath(),g.lineWidth=2,g.moveTo(r,o),g.lineTo(r+i,o),g.stroke())}(y[e].left=a,y[e].top=r,t,n),b?f.x+=i+s.padding:f.y+=x})}},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function s(t,e){var n=new o({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:o,beforeInit:function(t){var e=t.options.legend;e&&s(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(w.mergeIf(e,k.global.legend),n?(a.configure(t,n,e),n.options=e):s(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){var n=t.legend;n&&n.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var _=t(25),i=t(26),k=t(45),a=t(30),r=k.noop;_._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var o=i.extend({initialize:function(t){k.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:r,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:r,beforeSetDimensions:r,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:r,beforeBuildLabels:r,buildLabels:r,afterBuildLabels:r,beforeFit:r,fit:function(){var t=k.valueOrDefault,e=this.options,n=e.display,i=t(e.fontSize,_.global.defaultFontSize),a=this.minSize,r=k.isArray(e.text)?e.text.length:1,o=k.options.toLineHeight(e.lineHeight,i),s=n?r*o+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=s):(a.width=s,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:r,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=k.valueOrDefault,n=this.options,i=_.global;if(n.display){var a,r,o,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),d=k.fontString(s,l,u),h=k.options.toLineHeight(n.lineHeight,s),c=h/2+n.padding,f=0,g=this.top,m=this.left,p=this.bottom,v=this.right;t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=d,this.isHorizontal()?(r=m+(v-m)/2,o=g+c,a=v-m):(r="left"===n.position?m+c:v-c,o=g+(p-g)/2,a=p-g,f=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,o),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var y=n.text;if(k.isArray(y))for(var b=0,x=0;xo.max&&(o.max=n))})});o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;if(this.isHorizontal())t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.width/50));else{var n=h.valueOrDefault(e.fontSize,i.global.defaultFontSize);t=Math.min(e.maxTicksLimit?e.maxTicksLimit:11,Math.ceil(this.height/(2*n)))}return t},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),i=this.end-e;return this.isHorizontal()?this.left+this.width/i*(n-e):this.bottom-this.height/i*(n-e)},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,i=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*i},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var d=t(45);e.exports=function(e){var t=d.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;if(e.beginAtZero){var n=d.sign(t.min),i=d.sign(t.max);n<0&&i<0?t.max=0:0=t.max&&(a?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),i={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:d.valueOrDefault(e.fixedStepSize,e.stepSize)},a=t.ticks=function(t,e){var n,i=[];if(t.stepSize&&0o.max&&(o.max=n),0!=n&&(null===o.minNotZero||no.r&&(o.r=g.end,s.r=c),m.starto.b&&(o.b=m.end,s.b=c)}t.setReductions(r,o,s)}(this):function(t){var e=Math.min(t.height/2,t.width/2);t.drawingArea=Math.round(e),t.setCenterPoint(0,0,0,0)}(this)},setReductions:function(t,e,n){var i=e.l/Math.sin(n.l),a=Math.max(e.r-this.width,0)/Math.sin(n.r),r=-e.t/Math.cos(n.t),o=-Math.max(e.b-this.height,0)/Math.cos(n.b);i=s(i),a=s(a),r=s(r),o=s(o),this.drawingArea=Math.min(Math.round(t-(i+a)/2),Math.round(t-(r+o)/2)),this.setCenterPoint(i,a,r,o)},setCenterPoint:function(t,e,n,i){var a=this,r=a.width-e-a.drawingArea,o=t+a.drawingArea,s=n+a.drawingArea,l=a.height-i-a.drawingArea;a.xCenter=Math.round((o+r)/2+a.left),a.yCenter=Math.round((s+l)/2+a.top)},getIndexAngle:function(t){return t*(2*Math.PI/y(this))+(this.chart.options&&this.chart.options.startAngle?this.chart.options.startAngle:0)*Math.PI*2/360},getDistanceFromCenterForValue:function(t){if(null===t)return 0;var e=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-t)*e:(t-this.min)*e},getPointPosition:function(t,e){var n=this.getIndexAngle(t)-Math.PI/2;return{x:Math.round(Math.cos(n)*e)+this.xCenter,y:Math.round(Math.sin(n)*e)+this.yCenter}},getPointPositionForValue:function(t,e){return this.getPointPosition(t,this.getDistanceFromCenterForValue(e))},getBasePosition:function(){var t=this.min,e=this.max;return this.getPointPositionForValue(0,this.beginAtZero?0:t<0&&e<0?e:0>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],o=a.lo?a.hi?a.hi:t[t.length-1]:t[1],s=o[e]-r[e],l=s?(n-r[e])/s:0,u=(o[i]-r[i])*l;return r[i]+u}function h(t,e){var n=e.parser,i=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof i?m(t,i):(t instanceof m||(t=m(t)),t.isValid()?t:"function"==typeof i?i(t):t)}function w(t,e){if(p.isNullOrUndef(t))return null;var n=e.options.time,i=h(e.getRightValue(t),n);return i.isValid()?(n.round&&i.startOf(n.round),i.valueOf()):null}function M(t){for(var e=x.indexOf(t)+1,n=x.length;e=x.indexOf(e);a--)if(r=x[a],b[r].common&&o.as(r)>=t.length)return r;return x[e?x.indexOf(e):0]}(u,s.minUnit,i.min,i.max),i._majorUnit=M(i._unit),i._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];var a,r,o,s,l,u=[],d=[e];for(a=0,r=t.length;a>>0,i=0;iwt(t)?(r=t+1,a-wt(t)):(r=t,a);return{year:r,dayOfYear:a}}function Bt(t,e,n){var i,a,r=Ht(t.year(),e,n),r=Math.floor((t.dayOfYear()-r-1)/7)+1;return r<1?i=r+Et(a=t.year()-1,e,n):r>Et(t.year(),e,n)?(i=r-Et(t.year(),e,n),a=t.year()+1):(a=t.year(),i=r),{week:i,year:a}}function Et(t,e,n){var i=Ht(t,e,n),n=Ht(t+1,e,n);return(wt(t)-i+n)/7}B("w",["ww",2],"wo","week"),B("W",["WW",2],"Wo","isoWeek"),A("week","w"),A("isoWeek","W"),Y("week",5),Y("isoWeek",5),lt("w",J),lt("ww",J,q),lt("W",J),lt("WW",J,q),ft(["w","ww","W","WW"],function(t,e,n,i){e[i.substr(0,1)]=k(t)});B("d",0,"do","day"),B("dd",0,0,function(t){return this.localeData().weekdaysMin(this,t)}),B("ddd",0,0,function(t){return this.localeData().weekdaysShort(this,t)}),B("dddd",0,0,function(t){return this.localeData().weekdays(this,t)}),B("e",0,0,"weekday"),B("E",0,0,"isoWeekday"),A("day","d"),A("weekday","e"),A("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),lt("d",J),lt("e",J),lt("E",J),lt("dd",function(t,e){return e.weekdaysMinRegex(t)}),lt("ddd",function(t,e){return e.weekdaysShortRegex(t)}),lt("dddd",function(t,e){return e.weekdaysRegex(t)}),ft(["dd","ddd","dddd"],function(t,e,n,i){i=n._locale.weekdaysParse(t,i,n._strict);null!=i?e.d=i:m(n).invalidWeekday=t}),ft(["d","e","E"],function(t,e,n,i){e[i]=k(t)});var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Ut="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var qt="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Gt=ot;var Zt=ot;var Xt=ot;function Jt(){function t(t,e){return e.length-t.length}for(var e,n,i,a=[],r=[],o=[],s=[],l=0;l<7;l++)i=d([2e3,1]).day(l),e=this.weekdaysMin(i,""),n=this.weekdaysShort(i,""),i=this.weekdays(i,""),a.push(e),r.push(n),o.push(i),s.push(e),s.push(n),s.push(i);for(a.sort(t),r.sort(t),o.sort(t),s.sort(t),l=0;l<7;l++)r[l]=dt(r[l]),o[l]=dt(o[l]),s[l]=dt(s[l]);this._weekdaysRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+o.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+r.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+a.join("|")+")","i")}function Kt(){return this.hours()%12||12}function $t(t,e){B(t,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)})}function Qt(t,e){return e._meridiemParse}B("H",["HH",2],0,"hour"),B("h",["hh",2],0,Kt),B("k",["kk",2],0,function(){return this.hours()||24}),B("hmm",0,0,function(){return""+Kt.apply(this)+W(this.minutes(),2)}),B("hmmss",0,0,function(){return""+Kt.apply(this)+W(this.minutes(),2)+W(this.seconds(),2)}),B("Hmm",0,0,function(){return""+this.hours()+W(this.minutes(),2)}),B("Hmmss",0,0,function(){return""+this.hours()+W(this.minutes(),2)+W(this.seconds(),2)}),$t("a",!0),$t("A",!1),A("hour","h"),Y("hour",13),lt("a",Qt),lt("A",Qt),lt("H",J),lt("h",J),lt("k",J),lt("HH",J,q),lt("hh",J,q),lt("kk",J,q),lt("hmm",K),lt("hmmss",$),lt("Hmm",K),lt("Hmmss",$),ct(["H","HH"],vt),ct(["k","kk"],function(t,e,n){t=k(t);e[vt]=24===t?0:t}),ct(["a","A"],function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t}),ct(["h","hh"],function(t,e,n){e[vt]=k(t),m(n).bigHour=!0}),ct("hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i)),m(n).bigHour=!0}),ct("hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a)),m(n).bigHour=!0}),ct("Hmm",function(t,e,n){var i=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i))}),ct("Hmmss",function(t,e,n){var i=t.length-4,a=t.length-2;e[vt]=k(t.substr(0,i)),e[yt]=k(t.substr(i,2)),e[bt]=k(t.substr(a))});var te,ee=Ct("Hours",!0),ne={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:At,monthsShort:Ft,week:{dow:0,doy:6},weekdays:jt,weekdaysMin:qt,weekdaysShort:Ut,meridiemParse:/[ap]\.?m?\.?/i},ie={},ae={};function re(t){return t&&t.toLowerCase().replace("_","-")}function oe(t){if(!ie[t]&&void 0!==xn&&xn&&xn.exports)try{var e=te._abbr;bn("./locale/"+t),se(e)}catch(t){}return ie[t]}function se(t,e){var n;return(te=t&&(n=r(e)?ue(t):le(t,e))?n:te)._abbr}function le(t,e){if(null===e)return delete ie[t],null;var n=ne;if(e.abbr=t,null!=ie[t])D("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),n=ie[t]._config;else if(null!=e.parentLocale){if(null==ie[e.parentLocale])return ae[e.parentLocale]||(ae[e.parentLocale]=[]),ae[e.parentLocale].push({name:t,config:e}),null;n=ie[e.parentLocale]._config}return ie[t]=new T(P(n,e)),ae[t]&&ae[t].forEach(function(t){le(t.name,t.config)}),se(t),ie[t]}function ue(t){var e;if(!(t=t&&t._locale&&t._locale._abbr?t._locale._abbr:t))return te;if(!o(t)){if(e=oe(t))return e;t=[t]}return function(t){for(var e,n,i,a,r=0;r=e&&w(a,n,!0)>=e-1)break;e--}r++}return null}(t)}function de(t){var e=t._a;return e&&-2===m(t).overflow&&(e=e[mt]<0||11Ot(e[gt],e[mt])?pt:e[vt]<0||24Et(o,u,d)?m(a)._overflowWeeks=!0:null!=h?m(a)._overflowWeekday=!0:(d=Vt(o,s,l,u,d),a._a[gt]=d.year,a._dayOfYear=d.dayOfYear)),null!=t._dayOfYear&&(i=he(t._a[gt],n[gt]),(t._dayOfYear>wt(i)||0===t._dayOfYear)&&(m(t)._overflowDayOfYear=!0),i=zt(i,0,t._dayOfYear),t._a[mt]=i.getUTCMonth(),t._a[pt]=i.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=f[e]=n[e];for(;e<7;e++)t._a[e]=f[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[vt]&&0===t._a[yt]&&0===t._a[bt]&&0===t._a[xt]&&(t._nextDay=!0,t._a[vt]=0),t._d=(t._useUTC?zt:function(t,e,n,i,a,r,o){return o=new Date(t,e,n,i,a,r,o),t<100&&0<=t&&isFinite(o.getFullYear())&&o.setFullYear(t),o}).apply(null,f),i=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[vt]=24),t._w&&void 0!==t._w.d&&t._w.d!==i&&(m(t).weekdayMismatch=!0)}}var fe=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ge=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,me=/Z|[+-]\d\d(?::?\d\d)?/,pe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ve=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],ye=/^\/?Date\((\-?\d+)/i;function be(t){var e,n,i,a,r,o,s=t._i,l=fe.exec(s)||ge.exec(s);if(l){for(m(t).iso=!0,e=0,n=pe.length;et.valueOf():t.valueOf()this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Z.isLocal=function(){return!!this.isValid()&&!this._isUTC},Z.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Z.isUtc=He,Z.isUTC=He,Z.zoneAbbr=function(){return this._isUTC?"UTC":""},Z.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Z.dates=n("dates accessor is deprecated. Use date instead.",At),Z.months=n("months accessor is deprecated. Use month instead",Lt),Z.years=n("years accessor is deprecated. Use year instead",Dt),Z.zone=n("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()}),Z.isDSTShifted=n("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!r(this._isDSTShifted))return this._isDSTShifted;var t,e={};return y(e,this),(e=Se(e))._a?(t=(e._isUTC?d:Ce)(e._a),this._isDSTShifted=this.isValid()&&0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e],r=a&&a.custom||{},o=y.valueAtIndexOrDefault,a=s.options.elements.arc;return{text:t,fillStyle:r.backgroundColor||o(i.backgroundColor,e,a.backgroundColor),strokeStyle:r.borderColor||o(i.borderColor,e,a.borderColor),lineWidth:r.borderWidth||o(i.borderWidth,e,a.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=Math.PI?-1:e<-Math.PI?1:0))+v,i=Math.cos(e),t=Math.sin(e),a=Math.cos(r),l=Math.sin(r),d=e<=0&&0<=r||e<=2*Math.PI&&2*Math.PI<=r,u=e<=.5*Math.PI&&.5*Math.PI<=r||e<=2.5*Math.PI&&2.5*Math.PI<=r,v=e<=-Math.PI&&-Math.PI<=r||e<=Math.PI&&Math.PI<=r,e=e<=.5*-Math.PI&&.5*-Math.PI<=r||e<=1.5*Math.PI&&1.5*Math.PI<=r,r=p/100,v=v?-1:Math.min(i*(i<0?1:r),a*(a<0?1:r)),e=e?-1:Math.min(t*(t<0?1:r),l*(l<0?1:r)),a=.5*((i=d?1:Math.max(i*(0');var t=t.data,n=t.datasets,i=t.labels;if(n.length)for(var a=0;a'),i[a]&&e.push(i[a]),e.push("");return e.push(""),e.join("")},legend:{labels:{generateLabels:function(s){var l=s.data;return l.labels.length&&l.datasets.length?l.labels.map(function(t,e){var n=s.getDatasetMeta(0),i=l.datasets[0],a=n.data[e].custom||{},r=y.valueAtIndexOrDefault,o=s.options.elements.arc;return{text:t,fillStyle:a.backgroundColor||r(i.backgroundColor,e,o.backgroundColor),strokeStyle:a.borderColor||r(i.borderColor,e,o.borderColor),lineWidth:a.borderWidth||r(i.borderWidth,e,o.borderWidth),hidden:isNaN(i.data[e])||n.data[e].hidden,index:e}}):[]}},onClick:function(t,e){for(var n,i=e.index,a=this.chart,r=0,o=(a.data.datasets||[]).length;r=e.numSteps?(r.callback(e.onAnimationComplete,[e],n),n.animating=!1,i.splice(a,1)):++a}},Object.defineProperty(t.Animation.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(t.Animation.prototype,"chartInstance",{get:function(){return this.chart},set:function(t){this.chart=t}})}},{25:25,26:26,45:45}],23:[function(t,e,n){"use strict";var o=t(25),h=t(45),i=t(28),a=t(30),s=t(48),l=t(31);e.exports=function(u){function d(t){return"top"===t||"bottom"===t}u.types={},u.instances={},u.controllers={},h.extend(u.prototype,{construct:function(t,e){var n=this;(a=(r=(r=e)||{}).data=r.data||{}).datasets=a.datasets||[],a.labels=a.labels||[],r.options=h.configMerge(o.global,o[r.type],r.options||{}),e=r;var i=s.acquireContext(t,e),a=i&&i.canvas,r=a&&a.height,t=a&&a.width;n.id=h.uid(),n.ctx=i,n.canvas=a,n.config=e,n.width=t,n.height=r,n.aspectRatio=r?t/r:null,n.options=e.options,n._bufferedRender=!1,(n.chart=n).controller=n,u.instances[n.id]=n,Object.defineProperty(n,"data",{get:function(){return n.config.data},set:function(t){n.config.data=t}}),i&&a?(n.initialize(),n.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){var t=this;return l.notify(t,"beforeInit"),h.retinaScale(t,t.options.devicePixelRatio),t.bindEvents(),t.options.responsive&&t.resize(!0),t.ensureScalesHaveIDs(),t.buildOrUpdateScales(),t.initToolTip(),l.notify(t,"afterInit"),t},clear:function(){return h.canvas.clear(this),this},stop:function(){return u.animationService.cancelAnimation(this),this},resize:function(t){var e=this,n=e.options,i=e.canvas,a=n.maintainAspectRatio&&e.aspectRatio||null,r=Math.max(0,Math.floor(h.getMaximumWidth(i))),a=Math.max(0,Math.floor(a?r/a:h.getMaximumHeight(i)));e.width===r&&e.height===a||(i.width=e.width=r,i.height=e.height=a,i.style.width=r+"px",i.style.height=a+"px",h.retinaScale(e,n.devicePixelRatio),t||(a={width:r,height:a},l.notify(e,"resize",[a]),e.options.onResize&&e.options.onResize(e,a),e.stop(),e.update(e.options.responsiveAnimationDuration)))},ensureScalesHaveIDs:function(){var t=this.options,e=t.scales||{},t=t.scale;h.each(e.xAxes,function(t,e){t.id=t.id||"x-axis-"+e}),h.each(e.yAxes,function(t,e){t.id=t.id||"y-axis-"+e}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var o=this,t=o.options,s=o.scales||{},e=[],l=Object.keys(s).reduce(function(t,e){return t[e]=!1,t},{});t.scales&&(e=e.concat((t.scales.xAxes||[]).map(function(t){return{options:t,dtype:"category",dposition:"bottom"}}),(t.scales.yAxes||[]).map(function(t){return{options:t,dtype:"linear",dposition:"left"}}))),t.scale&&e.push({options:t.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),h.each(e,function(t){var e=t.options,n=e.id,i=h.valueOrDefault(e.type,t.dtype);d(e.position)!==d(t.dposition)&&(e.position=t.dposition),l[n]=!0;var a=null;if(n in s&&s[n].type===i)(a=s[n]).options=e,a.ctx=o.ctx,a.chart=o;else{var r=u.scaleService.getScaleConstructor(i);if(!r)return;a=new r({id:n,type:i,options:e,ctx:o.ctx,chart:o}),s[a.id]=a}a.mergeTicksOptions(),t.isDefault&&(o.scale=a)}),h.each(l,function(t,e){t||delete s[e]}),o.scales=s,u.scaleService.addScalesToLayout(this)},buildOrUpdateControllers:function(){var i=this,a=[],r=[];return h.each(i.data.datasets,function(t,e){var n=i.getDatasetMeta(e),t=t.type||i.config.type;if(n.type&&n.type!==t&&(i.destroyDatasetMeta(e),n=i.getDatasetMeta(e)),n.type=t,a.push(n.type),n.controller)n.controller.updateIndex(e),n.controller.linkScales();else{t=u.controllers[n.type];if(void 0===t)throw new Error('"'+n.type+'" is not a chart type.');n.controller=new t(i,e),r.push(n.controller)}},i),r},resetElements:function(){var n=this;h.each(n.data.datasets,function(t,e){n.getDatasetMeta(e).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(t){var e,n,i=this;t&&"object"==typeof t||(t={duration:t,lazy:arguments[1]}),n=(e=i).options,h.each(e.scales,function(t){a.removeBox(e,t)}),n=h.configMerge(u.defaults.global,u.defaults[e.config.type],n),e.options=e.config.options=n,e.ensureScalesHaveIDs(),e.buildOrUpdateScales(),e.tooltip._options=n.tooltips,e.tooltip.initialize(),l._invalidate(i),!1!==l.notify(i,"beforeUpdate")&&(i.tooltip._data=i.data,n=i.buildOrUpdateControllers(),h.each(i.data.datasets,function(t,e){i.getDatasetMeta(e).controller.buildOrUpdateElements()},i),i.updateLayout(),i.options.animation&&i.options.animation.duration&&h.each(n,function(t){t.reset()}),i.updateDatasets(),i.tooltip.initialize(),i.lastActive=[],l.notify(i,"afterUpdate"),i._bufferedRender?i._bufferedRequest={duration:t.duration,easing:t.easing,lazy:t.lazy}:i.render(t))},updateLayout:function(){!1!==l.notify(this,"beforeLayout")&&(a.update(this,this.width,this.height),l.notify(this,"afterScaleUpdate"),l.notify(this,"afterLayout"))},updateDatasets:function(){if(!1!==l.notify(this,"beforeDatasetsUpdate")){for(var t=0,e=this.data.datasets.length;t=e[t].length&&e[t].push({}),!e[t][a].type||o.type&&o.type!==e[t][a].type?c.merge(e[t][a],[l.scaleService.getScaleDefaults(r),o]):c.merge(e[t][a],o)}else c._merger(t,e,n,i)}})},c.where=function(t,e){if(c.isArray(t)&&Array.prototype.filter)return t.filter(e);var n=[];return c.each(t,function(t){e(t)&&n.push(t)}),n},c.findIndex=Array.prototype.findIndex?function(t,e,n){return t.findIndex(e,n)}:function(t,e,n){n=void 0===n?t:n;for(var i=0,a=t.length;i=t.length-1?t[0]:t[e+1]:e>=t.length-1?t[t.length-1]:t[e+1]},c.previousItem=function(t,e,n){return n?e<=0?t[t.length-1]:t[e-1]:e<=0?t[0]:t[e-1]},c.niceNum=function(t,e){var n=Math.floor(c.log10(t)),t=t/Math.pow(10,n),t=e?t<1.5?1:t<3?2:t<7?5:10:t<=1?1:t<=2?2:t<=5?5:10;return t*Math.pow(10,n)},c.requestAnimFrame="undefined"==typeof window?function(t){t()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){return window.setTimeout(t,1e3/60)},c.getRelativePosition=function(t,e){var n=t.originalEvent||t,i=t.currentTarget||t.srcElement,a=i.getBoundingClientRect(),r=n.touches,o=r&&0n.length){for(var l=0;le&&(e=t.length)}),e},c.color=i?function(t){return t instanceof CanvasGradient&&(t=a.global.defaultColor),i(t)}:function(t){return console.error("Color.js not found!"),t},c.getHoverColor=function(t){return t instanceof CanvasPattern?t:c.color(t).saturate(.5).darken(.1).rgbString()}}},{2:2,25:25,45:45}],28:[function(t,e,n){"use strict";var i=t(45);function o(t,e){return t.native?{x:t.x,y:t.y}:i.getRelativePosition(t,e)}function s(t,e){for(var n,i,a,r=0,o=t.data.datasets.length;rt.maxHeight){r--;break}r++,s=d*o}t.labelRotation=r},afterCalculateTickRotation:function(){N.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){N.callback(this.options.beforeFit,[this])},fit:function(){var t,e=this,n=e.minSize={width:0,height:0},i=f(e._ticks),a=e.options,r=a.ticks,o=a.scaleLabel,s=a.gridLines,l=a.display,u=e.isHorizontal(),d=g(r),h=a.gridLines.tickMarkLength;n.width=u?e.isFullWidth()?e.maxWidth-e.margins.left-e.margins.right:e.maxWidth:l&&s.drawTicks?h:0,n.height=u?l&&s.drawTicks?h:0:e.maxHeight,o.display&&l&&(t=m(o)+N.options.toPadding(o.padding).height,u?n.height+=t:n.width+=t),r.display&&l&&(s=N.longestText(e.ctx,d.font,i,e.longestTextCache),h=N.numberOfLabelLines(i),o=.5*d.size,t=e.options.ticks.padding,u?(e.longestLabelWidth=s,l=N.toRadians(e.labelRotation),u=Math.cos(l),h=Math.sin(l)*s+d.size*h+o*(h-1)+o,n.height=Math.min(e.maxHeight,n.height+h+t),e.ctx.font=d.font,h=c(e.ctx,i[0],d.font),i=c(e.ctx,i[i.length-1],d.font),0!==e.labelRotation?(e.paddingLeft="bottom"===a.position?u*h+3:u*o+3,e.paddingRight="bottom"===a.position?u*o+3:u*i+3):(e.paddingLeft=h/2+3,e.paddingRight=i/2+3)):(r.mirror?s=0:s+=t+o,n.width=Math.min(e.maxWidth,n.width+s),e.paddingTop=d.size/2,e.paddingBottom=d.size/2)),e.handleMargins(),e.width=n.width,e.height=n.height},handleMargins:function(){var t=this;t.margins&&(t.paddingLeft=Math.max(t.paddingLeft-t.margins.left,0),t.paddingTop=Math.max(t.paddingTop-t.margins.top,0),t.paddingRight=Math.max(t.paddingRight-t.margins.right,0),t.paddingBottom=Math.max(t.paddingBottom-t.margins.bottom,0))},afterFit:function(){N.callback(this.options.afterFit,[this])},isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(t){if(N.isNullOrUndef(t))return NaN;if("number"==typeof t&&!isFinite(t))return NaN;if(t)if(this.isHorizontal()){if(void 0!==t.x)return this.getRightValue(t.x)}else if(void 0!==t.y)return this.getRightValue(t.y);return t},getLabelForIndex:N.noop,getPixelForValue:N.noop,getValueForPixel:N.noop,getPixelForTick:function(t){var e=this,n=e.options.offset;if(e.isHorizontal()){var i=(e.width-(e.paddingLeft+e.paddingRight))/Math.max(e._ticks.length-(n?0:1),1),a=i*t+e.paddingLeft;n&&(a+=i/2);a=e.left+Math.round(a);return a+=e.isFullWidth()?e.margins.left:0}a=e.height-(e.paddingTop+e.paddingBottom);return e.top+t*(a/(e._ticks.length-1))},getPixelForDecimal:function(t){var e=this;if(e.isHorizontal()){var n=(e.width-(e.paddingLeft+e.paddingRight))*t+e.paddingLeft,n=e.left+Math.round(n);return n+=e.isFullWidth()?e.margins.left:0}return e.top+t*e.height},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var t=this.min,e=this.max;return this.beginAtZero?0:t<0&&e<0?e:0r.width-(r.paddingLeft+r.paddingRight)&&(e=1+Math.floor((u+s.autoSkipPadding)*l/(r.width-(r.paddingLeft+r.paddingRight)))),a&&aa.height-e.height&&(s="bottom");var l=(r.left+r.right)/2,u=(r.top+r.bottom)/2,d="center"===s?(n=function(t){return t<=l},function(t){return l=a.width-e.width/2}),h=function(t){return t+e.width+i.caretSize+i.caretPadding>a.width},c=function(t){return t-e.width-i.caretSize-i.caretPadding<0},r=function(t){return t<=u?"top":"bottom"};return n(i.x)?(o="left",h(i.x)&&(o="center",s=r(i.y))):d(i.x)&&(o="right",c(i.x)&&(o="center",s=r(i.y))),{xAlign:(t=t._options).xAlign||o,yAlign:t.yAlign||s}}(this,k=I(this,v)),e=v,n=k,i=x,a=g._chart,r=e.x,o=e.y,s=e.caretSize,l=e.caretPadding,p=e.cornerRadius,e=i.xAlign,i=i.yAlign,s+=l,l=p+l,"right"===e?r-=n.width:"center"===e&&(r=(r-=n.width/2)+n.width>a.width?a.width-n.width:r)<0&&(r=0),"top"===i?o+=s:o-="bottom"===i?n.height+s:n.height/2,"center"===i?"left"===e?r+=s:"right"===e&&(r-=s):"left"===e?r-=l:"right"===e&&(r+=l),_={x:r,y:o}}else v.opacity=0;return v.xAlign=x.xAlign,v.yAlign=x.yAlign,v.x=_.x,v.y=_.y,v.width=k.width,v.height=k.height,v.caretX=w.x,v.caretY=w.y,g._model=v,t&&m.custom&&m.custom.call(g,v),g},drawCaret:function(t,e){var n=this._chart.ctx,i=this._view,i=this.getCaretPosition(t,e,i);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(t,e,n){var i,a,r,o,s,l,u=n.caretSize,d=n.cornerRadius,h=n.xAlign,c=n.yAlign,f=t.x,g=t.y,t=e.width,e=e.height;return"center"===c?(r=g+e/2,o="left"===h?(i=(l=f)-u,s=l,a=r+u,r-u):(i=(l=f+t)+u,s=l,a=r-u,r+u)):(s=(l="left"===h?(i=f+d+u)-u:"right"===h?(i=f+t-d-u)-u:(i=n.caretX)-u,i+u),"top"===c?(r=(a=g)-u,o=a):(r=(a=g+e)+u,o=a,u=s,s=l,l=u)),{x1:l,x2:i,x3:s,y1:a,y2:r,y3:o}},drawTitle:function(t,e,n,i){var a=e.title;if(a.length){n.textAlign=e._titleAlign,n.textBaseline="top";var r,o,s=e.titleFontSize,l=e.titleSpacing;for(n.fillStyle=h(e.titleFontColor,i),n.font=A.fontString(s,e._titleFontStyle,e._titleFontFamily),r=0,o=a.length;r=n.innerRadius&&e<=n.outerRadius;return t&&n}return!1},getCenterPoint:function(){var t=this._view,e=(t.startAngle+t.endAngle)/2,n=(t.innerRadius+t.outerRadius)/2;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},getArea:function(){var t=this._view;return Math.PI*((t.endAngle-t.startAngle)/(2*Math.PI))*(Math.pow(t.outerRadius,2)-Math.pow(t.innerRadius,2))},tooltipPosition:function(){var t=this._view,e=t.startAngle+(t.endAngle-t.startAngle)/2,n=(t.outerRadius-t.innerRadius)/2+t.innerRadius;return{x:t.x+Math.cos(e)*n,y:t.y+Math.sin(e)*n}},draw:function(){var t=this._chart.ctx,e=this._view,n=e.startAngle,i=e.endAngle;t.beginPath(),t.arc(e.x,e.y,e.outerRadius,n,i),t.arc(e.x,e.y,e.innerRadius,i,n,!0),t.closePath(),t.strokeStyle=e.borderColor,t.lineWidth=e.borderWidth,t.fillStyle=e.backgroundColor,t.fill(),t.lineJoin="bevel",e.borderWidth&&t.stroke()}})},{25:25,26:26,45:45}],37:[function(t,e,n){"use strict";var i=t(25),a=t(26),d=t(45),h=i.global;i._set("global",{elements:{line:{tension:.4,backgroundColor:h.defaultColor,borderWidth:3,borderColor:h.defaultColor,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}}),e.exports=a.extend({draw:function(){var t,e,n,i,a=this._view,r=this._chart.ctx,o=a.spanGaps,s=this._children.slice(),l=h.elements.line,u=-1;for(this._loop&&s.length&&s.push(s[0]),r.save(),r.lineCap=a.borderCapStyle||l.borderCapStyle,r.setLineDash&&r.setLineDash(a.borderDash||l.borderDash),r.lineDashOffset=a.borderDashOffset||l.borderDashOffset,r.lineJoin=a.borderJoinStyle||l.borderJoinStyle,r.lineWidth=a.borderWidth||l.borderWidth,r.strokeStyle=a.borderColor||h.defaultColor,r.beginPath(),u=-1,t=0;t=(n=a(this)).left&&t<=n.right&&e>=n.top&&e<=n.bottom:i},inLabelRange:function(t,e){if(!this._view)return!1;var n=a(this);return o(this)?t>=n.left&&t<=n.right:e>=n.top&&e<=n.bottom},inXRange:function(t){var e=a(this);return t>=e.left&&t<=e.right},inYRange:function(t){var e=a(this);return t>=e.top&&t<=e.bottom},getCenterPoint:function(){var t,e=this._view,e=o(this)?(t=e.x,(e.y+e.base)/2):(t=(e.x+e.base)/2,e.y);return{x:t,y:e}},getArea:function(){var t=this._view;return t.width*Math.abs(t.y-t.base)},tooltipPosition:function(){var t=this._view;return{x:t.x,y:t.y}}})},{25:25,26:26}],40:[function(t,e,n){"use strict";e.exports={},e.exports.Arc=t(36),e.exports.Line=t(37),e.exports.Point=t(38),e.exports.Rectangle=t(39)},{36:36,37:37,38:38,39:39}],41:[function(t,e,n){"use strict";t=t(42),n=e.exports={clear:function(t){t.ctx.clearRect(0,0,t.width,t.height)},roundedRect:function(t,e,n,i,a,r){var o;r?(o=Math.min(r,i/2),r=Math.min(r,a/2),t.moveTo(e+o,n),t.lineTo(e+i-o,n),t.quadraticCurveTo(e+i,n,e+i,n+r),t.lineTo(e+i,n+a-r),t.quadraticCurveTo(e+i,n+a,e+i-o,n+a),t.lineTo(e+o,n+a),t.quadraticCurveTo(e,n+a,e,n+a-r),t.lineTo(e,n+r),t.quadraticCurveTo(e,n,e+o,n)):t.rect(e,n,i,a)},drawPoint:function(t,e,n,i,a){var r,o,s,l;if(!e||"object"!=typeof e||"[object HTMLImageElement]"!==(r=e.toString())&&"[object HTMLCanvasElement]"!==r){if(!(isNaN(n)||n<=0)){switch(e){default:t.beginPath(),t.arc(i,a,n,0,2*Math.PI),t.closePath(),t.fill();break;case"triangle":t.beginPath(),h=(d=3*n/Math.sqrt(3))*Math.sqrt(3)/2,t.moveTo(i-d/2,a+h/3),t.lineTo(i+d/2,a+h/3),t.lineTo(i,a-2*h/3),t.closePath(),t.fill();break;case"rect":l=1/Math.SQRT2*n,t.beginPath(),t.fillRect(i-l,a-l,2*l,2*l),t.strokeRect(i-l,a-l,2*l,2*l);break;case"rectRounded":var u=n/Math.SQRT2,d=i-u,h=a-u,u=Math.SQRT2*n;t.beginPath(),this.roundedRect(t,d,h,u,u,n/2),t.closePath(),t.fill();break;case"rectRot":l=1/Math.SQRT2*n,t.beginPath(),t.moveTo(i-l,a),t.lineTo(i,a+l),t.lineTo(i+l,a),t.lineTo(i,a-l),t.closePath(),t.fill();break;case"cross":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"crossRot":t.beginPath(),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"star":t.beginPath(),t.moveTo(i,a+n),t.lineTo(i,a-n),t.moveTo(i-n,a),t.lineTo(i+n,a),o=Math.cos(Math.PI/4)*n,s=Math.sin(Math.PI/4)*n,t.moveTo(i-o,a-s),t.lineTo(i+o,a+s),t.moveTo(i-o,a+s),t.lineTo(i+o,a-s),t.closePath();break;case"line":t.beginPath(),t.moveTo(i-n,a),t.lineTo(i+n,a),t.closePath();break;case"dash":t.beginPath(),t.moveTo(i,a),t.lineTo(i+n,a),t.closePath()}t.stroke()}}else t.drawImage(e,i-e.width/2,a-e.height/2,e.width,e.height)},clipArea:function(t,e){t.save(),t.beginPath(),t.rect(e.left,e.top,e.right-e.left,e.bottom-e.top),t.clip()},unclipArea:function(t){t.restore()},lineTo:function(t,e,n,i){if(n.steppedLine)return"after"===n.steppedLine&&!i||"after"!==n.steppedLine&&i?t.lineTo(e.x,n.y):t.lineTo(n.x,e.y),void t.lineTo(n.x,n.y);n.tension?t.bezierCurveTo(i?e.controlPointPreviousX:e.controlPointNextX,i?e.controlPointPreviousY:e.controlPointNextY,i?n.controlPointNextX:n.controlPointPreviousX,i?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):t.lineTo(n.x,n.y)}};t.clear=n.clear,t.drawRoundedRectangle=function(t){t.beginPath(),n.roundedRect.apply(n,arguments),t.closePath()}},{42:42}],42:[function(t,e,n){"use strict";var i,d={noop:function(){},uid:(i=0,function(){return i++}),isNullOrUndef:function(t){return null==t},isArray:Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},isObject:function(t){return null!==t&&"[object Object]"===Object.prototype.toString.call(t)},valueOrDefault:function(t,e){return void 0===t?e:t},valueAtIndexOrDefault:function(t,e,n){return d.valueOrDefault(d.isArray(t)?t[e]:t,n)},callback:function(t,e,n){if(t&&"function"==typeof t.call)return t.apply(n,e)},each:function(t,e,n,i){var a,r,o;if(d.isArray(t))if(r=t.length,i)for(a=r-1;0<=a;a--)e.call(n,t[a],a);else for(a=0;a
';var a=e.childNodes[0],r=e.childNodes[1];return e._reset=function(){a.scrollLeft=1e6,a.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6},b(a,"scroll",(i=function(){e._reset(),t()}).bind(a,"expand")),b(r,"scroll",i.bind(r,"shrink")),e}((i=function(){if(h.resizer)return t(x("resize",n))},o=!1,function(){r=Array.prototype.slice.call(arguments),a=a||this,o||(o=!0,f.requestAnimFrame.call(window,function(){o=!1,i.apply(a,r)}))}));l=function(){var t;h.resizer&&((t=e.parentNode)&&t!==c.parentNode&&t.insertBefore(c,t.firstChild),c._reset())},u=(s=e)[g]||(s[g]={}),d=u.renderProxy=function(t){t.animationName===v&&l()},f.each(y,function(t){b(s,t,d)}),u.reflow=!!s.offsetParent,s.classList.add(p)}function a(t){var e,n,i=t[g]||{},a=i.resizer;delete i.resizer,t=(e=t)[g]||{},(n=t.renderProxy)&&(f.each(y,function(t){r(e,t,n)}),delete t.renderProxy),e.classList.remove(p),a&&a.parentNode&&a.parentNode.removeChild(a)}e.exports={_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,initialize:function(){var t,e,n="from{opacity:0.99}to{opacity:1}";e="@-webkit-keyframes "+v+"{"+n+"}@keyframes "+v+"{"+n+"}."+p+"{-webkit-animation:"+v+" 0.001s;animation:"+v+" 0.001s;}",n=(t=this)._style||document.createElement("style"),t._style||(e="/* Chart.js */\n"+e,(t._style=n).setAttribute("type","text/css"),document.getElementsByTagName("head")[0].appendChild(n)),n.appendChild(document.createTextNode(e))},acquireContext:function(t,e){"string"==typeof t?t=document.getElementById(t):t.length&&(t=t[0]);var n,i,a,r,o=(t=t&&t.canvas?t.canvas:t)&&t.getContext&&t.getContext("2d");return o&&o.canvas===t?(i=e,r=(n=t).style,e=n.getAttribute("height"),t=n.getAttribute("width"),n[g]={initial:{height:e,width:t,style:{display:r.display,height:r.height,width:r.width}}},r.display=r.display||"block",null!==t&&""!==t||void 0!==(a=s(n,"width"))&&(n.width=a),null!==e&&""!==e||(""===n.style.height?n.height=n.width/(i.options.aspectRatio||2):(i=s(n,"height"),void 0!==a&&(n.height=i))),o):null},releaseContext:function(t){var n,i=t.canvas;i[g]&&(n=i[g].initial,["height","width"].forEach(function(t){var e=n[t];f.isNullOrUndef(e)?i.removeAttribute(t):i.setAttribute(t,e)}),f.each(n.style||{},function(t,e){i.style[e]=t}),i.width=i.width,delete i[g])},addEventListener:function(a,t,r){var e,n=a.canvas;"resize"!==t?b(n,t,((e=r[g]||(r[g]={})).proxies||(e.proxies={}))[a.id+"_"+t]=function(t){var e,n,i;r((n=a,i=o[(e=t).type]||e.type,t=f.getRelativePosition(e,n),x(i,n,t.x,t.y,e)))}):l(n,r,a)},removeEventListener:function(t,e,n){var i=t.canvas;"resize"!==e?(t=((n[g]||{}).proxies||{})[t.id+"_"+e])&&r(i,e,t):a(i)}},f.addEvent=b,f.removeEvent=r},{45:45}],48:[function(t,e,n){"use strict";var i=t(45),a=t(46),t=t(47),a=t._enabled?t:a;e.exports=i.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},a)},{45:45,46:46,47:47}],49:[function(t,e,n){"use strict";e.exports={},e.exports.filler=t(50),e.exports.legend=t(51),e.exports.title=t(52)},{50:50,51:51,52:52}],50:[function(t,e,n){"use strict";var s=t(25),c=t(40),l=t(45);s._set("global",{plugins:{filler:{propagate:!0}}});var f={dataset:function(t){var e=t.fill,n=t.chart,t=n.getDatasetMeta(e),i=t&&n.isDatasetVisible(e)&&t.dataset._children||[],a=i.length||0;return a?function(t,e){return e');for(var n=0;n'),t.data.datasets[n].label&&e.push(t.data.datasets[n].label),e.push("");return e.push(""),e.join("")}});var r=i.extend({initialize:function(t){T.extend(this,t),this.legendHitBoxes=[],this.doughnutMode=!1},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:function(){var e=this,n=e.options.labels||{},t=T.callback(n.generateLabels,[e.chart],e)||[];n.filter&&(t=t.filter(function(t){return n.filter(t,e.chart.data)})),e.options.reverse&&t.reverse(),e.legendItems=t},afterBuildLabels:t,beforeFit:t,fit:function(){var n,i,a,r,o,s,l,u=this,t=u.options,d=t.labels,e=t.display,h=u.ctx,c=P.global,f=T.valueOrDefault,g=f(d.fontSize,c.defaultFontSize),t=f(d.fontStyle,c.defaultFontStyle),c=f(d.fontFamily,c.defaultFontFamily),t=T.fontString(g,t,c),m=u.legendHitBoxes=[],p=u.minSize,c=u.isHorizontal();c?(p.width=u.maxWidth,p.height=e?10:0):(p.width=e?10:0,p.height=u.maxHeight),e&&(h.font=t,c?(n=u.lineWidths=[0],i=u.legendItems.length?g+d.padding:0,h.textAlign="left",h.textBaseline="top",T.each(u.legendItems,function(t,e){t=O(d,g)+g/2+h.measureText(t.text).width;n[n.length-1]+t+d.padding>=u.width&&(i+=g+d.padding,n[n.length]=u.left),m[e]={left:0,top:0,width:t,height:g},n[n.length-1]+=t+d.padding}),p.height+=i):(c=d.padding,a=u.columnWidths=[],r=d.padding,s=o=0,l=g+c,T.each(u.legendItems,function(t,e){t=O(d,g)+g/2+h.measureText(t.text).width;s+l>p.height&&(r+=o+d.padding,a.push(o),s=o=0),o=Math.max(o,t),s+=l,m[e]={left:0,top:0,width:t,height:g}}),r+=o,a.push(o),p.width+=r)),u.width=p.width,u.height=p.height},afterFit:t,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var f,g,t,m,e,n,p,v,y,b,x,_=this,k=_.options,w=k.labels,M=P.global,S=M.elements.line,D=_.width,C=_.lineWidths;k.display&&(f=_.ctx,t=(g=T.valueOrDefault)(w.fontColor,M.defaultFontColor),m=g(w.fontSize,M.defaultFontSize),e=g(w.fontStyle,M.defaultFontStyle),n=g(w.fontFamily,M.defaultFontFamily),n=T.fontString(m,e,n),f.textAlign="left",f.textBaseline="middle",f.lineWidth=.5,f.strokeStyle=t,f.fillStyle=t,f.font=n,p=O(w,m),v=_.legendHitBoxes,y=_.isHorizontal(),b=y?{x:_.left+(D-C[0])/2,y:_.top+w.padding,line:0}:{x:_.left+w.padding,y:_.top+w.padding,line:0},x=m+w.padding,T.each(_.legendItems,function(t,e){var n,i,a,r,o,s,l,u=f.measureText(t.text).width,d=p+m/2+u,h=b.x,c=b.y;y?D<=h+d&&(c=b.y+=x,b.line++,h=b.x=_.left+(D-C[b.line])/2):c+x>_.bottom&&(h=b.x=h+_.columnWidths[b.line]+w.padding,c=b.y=_.top+w.padding,b.line++),n=h,i=c,a=t,isNaN(p)||p<=0||(f.save(),f.fillStyle=g(a.fillStyle,M.defaultColor),f.lineCap=g(a.lineCap,S.borderCapStyle),f.lineDashOffset=g(a.lineDashOffset,S.borderDashOffset),f.lineJoin=g(a.lineJoin,S.borderJoinStyle),f.lineWidth=g(a.lineWidth,S.borderWidth),f.strokeStyle=g(a.strokeStyle,M.defaultColor),r=0===g(a.lineWidth,S.borderWidth),f.setLineDash&&f.setLineDash(g(a.lineDash,S.borderDash)),k.labels&&k.labels.usePointStyle?(s=n+(l=(o=m*Math.SQRT2/2)/Math.SQRT2),l=i+l,T.canvas.drawPoint(f,a.pointStyle,o,s,l)):(r||f.strokeRect(n,i,p,m),f.fillRect(n,i,p,m)),f.restore()),v[e].left=h,v[e].top=c,e=t,t=u,h=p+(u=m/2)+(h=h),u=c+u,f.fillText(e.text,h,u),e.hidden&&(f.beginPath(),f.lineWidth=2,f.moveTo(h,u),f.lineTo(h+t,u),f.stroke()),y?b.x+=d+w.padding:b.y+=x}))},handleEvent:function(t){var e=this,n=e.options,i="mouseup"===t.type?"click":t.type,a=!1;if("mousemove"===i){if(!n.onHover)return}else{if("click"!==i)return;if(!n.onClick)return}var r=t.x,o=t.y;if(r>=e.left&&r<=e.right&&o>=e.top&&o<=e.bottom)for(var s=e.legendHitBoxes,l=0;l=u.left&&r<=u.left+u.width&&o>=u.top&&o<=u.top+u.height){if("click"===i){n.onClick.call(e,t.native,e.legendItems[l]),a=!0;break}if("mousemove"===i){n.onHover.call(e,t.native,e.legendItems[l]),a=!0;break}}}return a}});function o(t,e){var n=new r({ctx:t.ctx,options:e,chart:t});a.configure(t,n,e),a.addBox(t,n),t.legend=n}e.exports={id:"legend",_element:r,beforeInit:function(t){var e=t.options.legend;e&&o(t,e)},beforeUpdate:function(t){var e=t.options.legend,n=t.legend;e?(T.mergeIf(e,P.global.legend),n?(a.configure(t,n,e),n.options=e):o(t,e)):n&&(a.removeBox(t,n),delete t.legend)},afterEvent:function(t,e){t=t.legend;t&&t.handleEvent(e)}}},{25:25,26:26,30:30,45:45}],52:[function(t,e,n){"use strict";var y=t(25),i=t(26),b=t(45),a=t(30),t=b.noop;y._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,lineHeight:1.2,padding:10,position:"top",text:"",weight:2e3}});var r=i.extend({initialize:function(t){b.extend(this,t),this.legendHitBoxes=[]},beforeUpdate:t,update:function(t,e,n){var i=this;return i.beforeUpdate(),i.maxWidth=t,i.maxHeight=e,i.margins=n,i.beforeSetDimensions(),i.setDimensions(),i.afterSetDimensions(),i.beforeBuildLabels(),i.buildLabels(),i.afterBuildLabels(),i.beforeFit(),i.fit(),i.afterFit(),i.afterUpdate(),i.minSize},afterUpdate:t,beforeSetDimensions:t,setDimensions:function(){var t=this;t.isHorizontal()?(t.width=t.maxWidth,t.left=0,t.right=t.width):(t.height=t.maxHeight,t.top=0,t.bottom=t.height),t.paddingLeft=0,t.paddingTop=0,t.paddingRight=0,t.paddingBottom=0,t.minSize={width:0,height:0}},afterSetDimensions:t,beforeBuildLabels:t,buildLabels:t,afterBuildLabels:t,beforeFit:t,fit:function(){var t=b.valueOrDefault,e=this.options,n=e.display,i=t(e.fontSize,y.global.defaultFontSize),a=this.minSize,t=b.isArray(e.text)?e.text.length:1,i=b.options.toLineHeight(e.lineHeight,i),e=n?t*i+2*e.padding:0;this.isHorizontal()?(a.width=this.maxWidth,a.height=e):(a.width=e,a.height=this.maxHeight),this.width=a.width,this.height=a.height},afterFit:t,isHorizontal:function(){var t=this.options.position;return"top"===t||"bottom"===t},draw:function(){var t=this.ctx,e=b.valueOrDefault,n=this.options,i=y.global;if(n.display){var a,r,o,s=e(n.fontSize,i.defaultFontSize),l=e(n.fontStyle,i.defaultFontStyle),u=e(n.fontFamily,i.defaultFontFamily),d=b.fontString(s,l,u),h=b.options.toLineHeight(n.lineHeight,s),c=h/2+n.padding,f=0,g=this.top,l=this.left,u=this.bottom,s=this.right;t.fillStyle=e(n.fontColor,i.defaultFontColor),t.font=d,this.isHorizontal()?(r=l+(s-l)/2,o=g+c,a=s-l):(r="left"===n.position?l+c:s-c,o=g+(u-g)/2,a=u-g,f=Math.PI*("left"===n.position?-.5:.5)),t.save(),t.translate(r,o),t.rotate(f),t.textAlign="center",t.textBaseline="middle";var m=n.text;if(b.isArray(m))for(var p=0,v=0;vo.max)&&(o.max=t))})}),o.min=isFinite(o.min)&&!isNaN(o.min)?o.min:0,o.max=isFinite(o.max)&&!isNaN(o.max)?o.max:1,this.handleTickRangeOptions()},getTickLimit:function(){var t,e=this.options.ticks;return this.isHorizontal()?Math.min(e.maxTicksLimit||11,Math.ceil(this.width/50)):(t=h.valueOrDefault(e.fontSize,i.global.defaultFontSize),Math.min(e.maxTicksLimit||11,Math.ceil(this.height/(2*t))))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(t,e){return+this.getRightValue(this.chart.data.datasets[e].data[t])},getPixelForValue:function(t){var e=this.start,n=+this.getRightValue(t),t=this.end-e,e=this.isHorizontal()?this.left+this.width/t*(n-e):this.bottom-this.height/t*(n-e);return e},getValueForPixel:function(t){var e=this.isHorizontal(),n=e?this.width:this.height,n=(e?t-this.left:this.bottom-t)/n;return this.start+(this.end-this.start)*n},getPixelForTick:function(t){return this.getPixelForValue(this.ticksAsNumbers[t])}});t.scaleService.registerScaleType("linear",n,e)}},{25:25,34:34,45:45}],55:[function(t,e,n){"use strict";var u=t(45);e.exports=function(e){var t=u.noop;e.LinearScaleBase=e.Scale.extend({getRightValue:function(t){return"string"==typeof t?+t:e.Scale.prototype.getRightValue.call(this,t)},handleTickRangeOptions:function(){var t=this,e=t.options.ticks;e.beginAtZero&&(n=u.sign(t.min),i=u.sign(t.max),n<0&&i<0?t.max=0:0=t.max&&(n?t.max=t.min+1:t.min=t.max-1),t.min===t.max&&(t.max++,e.beginAtZero||t.min--)},getTickLimit:t,handleDirectionalChanges:t,buildTicks:function(){var t=this,e=t.options.ticks,n=t.getTickLimit(),n={maxTicks:n=Math.max(2,n),min:e.min,max:e.max,stepSize:u.valueOrDefault(e.fixedStepSize,e.stepSize)},n=t.ticks=function(t,e){var n,i,a=[];i=t.stepSize&&0r.max)&&(r.max=t),0!=t&&(null===r.minNotZero||ta.r&&(a.r=d.end,r.r=l),h.starta.b&&(a.b=h.end,r.b=l)}t.setReductions(i,a,r)}function i(t){var e=t.ctx,n=t.options,i=n.angleLines,a=n.pointLabels;e.lineWidth=i.lineWidth,e.strokeStyle=i.color;var r=t.getDistanceFromCenterForValue(n.ticks.reverse?t.min:t.max),o=g(t);e.textBaseline="top";for(var s,l,u,d,h=f(t)-1;0<=h;h--)i.display&&(u=t.getPointPosition(h,r),e.beginPath(),e.moveTo(t.xCenter,t.yCenter),e.lineTo(u.x,u.y),e.stroke(),e.closePath()),a.display&&(s=t.getPointPosition(h,r+5),d=p.valueAtIndexOrDefault(a.fontColor,h,c.defaultFontColor),e.font=o.font,e.fillStyle=d,l=t.getIndexAngle(h),u=p.toDegrees(l),e.textAlign=0===(d=u)||180===d?"center":d<180?"left":"right",l=u,d=t._pointLabelSizes[h],u=s,90===l||270===l?u.y-=d.h/2:(270>1)-1]||null,r=t[i],!a)return{lo:null,hi:r};if(r[e]n))return{lo:a,hi:r};s=i-1}}return{lo:r,hi:null}}(t,e,n),r=a.lo?a.hi?a.lo:t[t.length-2]:t[0],a=a.lo?a.hi||t[t.length-1]:t[1],t=a[e]-r[e],t=t?(n-r[e])/t:0,t=(a[i]-r[i])*t;return r[i]+t}function M(t,e){var n=e.parser,e=e.parser||e.format;return"function"==typeof n?n(t):"string"==typeof t&&"string"==typeof e?b(t,e):!(t=!(t instanceof b)?b(t):t).isValid()&&"function"==typeof e?e(t):t}function S(t,e){if(m.isNullOrUndef(t))return null;var n=e.options.time,t=M(e.getRightValue(t),n);return t.isValid()?(n.round&&t.startOf(n.round),t.valueOf()):null}function D(t){for(var e=_.indexOf(t)+1,n=_.length;e=_.indexOf(e);o--)if(a=_[o],x[a].common&&r.as(a)>=t.length)return a;return _[e?_.indexOf(e):0]}(y,p.minUnit,c.min,c.max),c._majorUnit=D(c._unit),c._table=function(t,e,n,i){if("linear"===i||!t.length)return[{time:e,pos:0},{time:n,pos:1}];for(var a,r,o,s=[],l=[e],u=0,d=t.length;u>8&255,255&n)}function ShortToStrX(n){return String.fromCharCode(255&n,n>>8&255)}function IntToStr(n){return String.fromCharCode(n>>24&255,n>>16&255,n>>8&255,255&n)}function IntToStrX(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)}function MakeToArray(n){return n&&null!=n&&"object"!=typeof n?[n]:n}function SplitArray(n){return n.split(",")}function Clone(n){return JSON.parse(JSON.stringify(n))}function EscapeHtml(n){return"string"==typeof n?n.replace(/&/g,"&").replace(/>/g,">").replace(//g,">").replace(/").replace(/\n/g,"").replace(/\t/g,"  "):"boolean"==typeof n?n:"number"==typeof n?n:void 0}function ArrayElementMove(n,t,r){n.splice(r,0,n.splice(t,1)[0])}function ObjectToStringEx(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="
"+gap(t)+"Item #"+e+": "+ObjectToStringEx(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="
"+gap(t)+e+" = "+ObjectToStringEx(n[e],t+1);else r+=EscapeHtml(n);return r}function ObjectToStringEx2(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="\r\n"+gap2(t)+"Item #"+e+": "+ObjectToStringEx2(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="\r\n"+gap2(t)+e+" = "+ObjectToStringEx2(n[e],t+1);else r+=EscapeHtml(n);return r}function gap(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function gap2(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function ObjectToString(n){return ObjectToStringEx(n,0)}function ObjectToString2(n){return ObjectToStringEx2(n,0)}function hex2rstr(n){if("string"!=typeof n||0==n.length)return"";for(var t,r="",e=(""+n).match(/../g);t=e.shift();)r+=String.fromCharCode("0x"+t);return r}function char2hex(n){return(n+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(n){var t,r="";for(t=0;t")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")&&-1==n.indexOf(":")}function isSafeString2(n){return"string"==typeof n&&-1==n.indexOf("<")&&-1==n.indexOf(">")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")}function parseUriArgs(){var n=window.document.location.href;n.endsWith("#")&&(n=n.substring(0,n.length-1));var t,r={},e=n.split(/[\?&|]/);for(var o in e.splice(0,1),e){var i=e[o],a=i.indexOf("=");if(r[t=i.substring(0,a)]=i.substring(a+1),isSafeString(r[t])){var c=parseInt(r[t]);c==r[t]&&(r[t]=c)}else delete r[t]}return r}String.prototype.startsWith||(String.prototype.startsWith=function(n){return 0===this.lastIndexOf(n,0)}),String.prototype.endsWith||(String.prototype.endsWith=function(n){return-1!==this.indexOf(n,this.length-n.length)}) \ No newline at end of file +function Q(n){return document.getElementById(n)}function QS(n){try{return Q(n).style}catch(n){}}function QE(n,t){try{Q(n).disabled=!t}catch(n){}}function QV(n,t){try{QS(n).display=t?"":"none"}catch(n){}}function QA(n,t){Q(n).innerHTML+=t}function QH(n,t){Q(n).innerHTML=t}function QC(n){try{return Q(n).classList}catch(n){}}function inputBoxFocus(n){Q(n).focus();var t=Q(n).value;Q(n).value="",Q(n).value=t}function ReadShort(n,t){return(n.charCodeAt(t)<<8)+n.charCodeAt(t+1)}function ReadShortX(n,t){return(n.charCodeAt(t+1)<<8)+n.charCodeAt(t)}function ReadInt(n,t){return 16777216*n.charCodeAt(t)+(n.charCodeAt(t+1)<<16)+(n.charCodeAt(t+2)<<8)+n.charCodeAt(t+3)}function ReadSInt(n,t){return(n.charCodeAt(t)<<24)+(n.charCodeAt(t+1)<<16)+(n.charCodeAt(t+2)<<8)+n.charCodeAt(t+3)}function ReadIntX(n,t){return 16777216*n.charCodeAt(t+3)+(n.charCodeAt(t+2)<<16)+(n.charCodeAt(t+1)<<8)+n.charCodeAt(t)}function ShortToStr(n){return String.fromCharCode(n>>8&255,255&n)}function ShortToStrX(n){return String.fromCharCode(255&n,n>>8&255)}function IntToStr(n){return String.fromCharCode(n>>24&255,n>>16&255,n>>8&255,255&n)}function IntToStrX(n){return String.fromCharCode(255&n,n>>8&255,n>>16&255,n>>24&255)}function MakeToArray(n){return n&&null!=n&&"object"!=typeof n?[n]:n}function SplitArray(n){return n.split(",")}function Clone(n){return JSON.parse(JSON.stringify(n))}function EscapeHtml(n){return"string"==typeof n?n.replace(/&/g,"&").replace(/>/g,">").replace(//g,">").replace(/").replace(/\n/g,"").replace(/\t/g,"  "):"boolean"==typeof n||"number"==typeof n?n:void 0}function ArrayElementMove(n,t,r){n.splice(r,0,n.splice(t,1)[0])}function ObjectToStringEx(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="
"+gap(t)+"Item #"+e+": "+ObjectToStringEx(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="
"+gap(t)+e+" = "+ObjectToStringEx(n[e],t+1);else r+=EscapeHtml(n);return r}function ObjectToStringEx2(n,t){var r="";if(0!=n&&(!n||null==n))return"(Null)";if(n instanceof Array)for(var e in n)r+="\r\n"+gap2(t)+"Item #"+e+": "+ObjectToStringEx2(n[e],t+1);else if(n instanceof Object)for(var e in n)r+="\r\n"+gap2(t)+e+" = "+ObjectToStringEx2(n[e],t+1);else r+=EscapeHtml(n);return r}function gap(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function gap2(n){for(var t="",r=0;r<4*n;r++)t+=" ";return t}function ObjectToString(n){return ObjectToStringEx(n,0)}function ObjectToString2(n){return ObjectToStringEx2(n,0)}function hex2rstr(n){if("string"!=typeof n||0==n.length)return"";for(var t,r="",e=(""+n).match(/../g);t=e.shift();)r+=String.fromCharCode("0x"+t);return r}function char2hex(n){return(n+256).toString(16).substr(-2).toUpperCase()}function rstr2hex(n){for(var t="",r=0;r")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")&&-1==n.indexOf(":")}function isSafeString2(n){return"string"==typeof n&&-1==n.indexOf("<")&&-1==n.indexOf(">")&&-1==n.indexOf("&")&&-1==n.indexOf('"')&&-1==n.indexOf("'")&&-1==n.indexOf("+")&&-1==n.indexOf("(")&&-1==n.indexOf(")")&&-1==n.indexOf("#")&&-1==n.indexOf("%")}function parseUriArgs(){var n,t=window.document.location.href,r={},e=(t=t.endsWith("#")?t.substring(0,t.length-1):t).split(/[\?&|]/);for(n in e.splice(0,1),e){var o,i=e[n],c=i.indexOf("=");r[o=i.substring(0,c)]=i.substring(c+1),isSafeString(r[o])?(c=parseInt(r[o]))==r[o]&&(r[o]=c):delete r[o]}return r}String.prototype.startsWith||(String.prototype.startsWith=function(n){return 0===this.lastIndexOf(n,0)}),String.prototype.endsWith||(String.prototype.endsWith=function(n){return-1!==this.indexOf(n,this.length-n.length)}) \ No newline at end of file diff --git a/public/scripts/meshcentral-min.js b/public/scripts/meshcentral-min.js index 0867bc27..200b0736 100644 --- a/public/scripts/meshcentral-min.js +++ b/public/scripts/meshcentral-min.js @@ -1 +1 @@ -var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.trace=!1,o.xxStateChange=function(e,t){if(o.State!=e){var n=o.State;o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t)}},o.Start=function(){if(0==o.connectstate){o.connectstate=0;var e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:"");o.authCookie&&""!=o.authCookie&&(e+="?auth="+o.authCookie),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3)}},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);o.trace&&console.log("RECV",t),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&(o.trace&&"ping"!=e.action&&console.log("SEND",e),o.socket.send(JSON.stringify(e)))},o} \ No newline at end of file +var MeshServerCreateControl=function(t,e){var o={State:0,connectstate:0,pingTimer:null};return o.authCookie=e,o.trace=!1,o.xxStateChange=function(e,t){var n;o.State!=e&&(n=o.State,o.State=e,o.onStateChanged&&o.onStateChanged(o,o.State,n,t))},o.Start=function(){var e;0==o.connectstate&&(o.connectstate=0,e=window.location.protocol.replace("http","ws")+"//"+window.location.host+t+"control.ashx"+(urlargs.key?"?key="+urlargs.key:""),o.authCookie&&""!=o.authCookie&&(e+="?auth="+o.authCookie),o.socket=new WebSocket(e),o.socket.onopen=function(e){o.connectstate=1},o.socket.onmessage=o.xxOnMessage,o.socket.onclose=function(e){o.Stop(e.code)},o.xxStateChange(1,0),null!=o.pingTimer&&clearInterval(o.pingTimer),o.pingTimer=setInterval(function(){o.send({action:"ping"})},29e3))},o.Stop=function(e){o.connectstate=0,o.socket&&(o.socket.close(),delete o.socket),null!=o.pingTimer&&(clearInterval(o.pingTimer),o.pingTimer=null),o.xxStateChange(0,e)},o.xxOnMessage=function(e){var t;1==o.State&&o.xxStateChange(2);try{t=JSON.parse(e.data)}catch(e){return}if("object"==typeof t&&"pong"!=t.action){if("ping"==t.action&&o.send({action:"pong"}),"close"==t.action)return t.msg&&console.log(t.msg),void o.Stop(t.cause);o.trace&&console.log("RECV",t),o.onMessage&&o.onMessage(o,t)}},o.send=function(e){null!=o.socket&&1==o.connectstate&&(o.trace&&"ping"!=e.action&&console.log("SEND",e),o.socket.send(JSON.stringify(e)))},o} \ No newline at end of file diff --git a/public/scripts/ol-min.js b/public/scripts/ol-min.js index b878008c..4cd7b2a1 100644 --- a/public/scripts/ol-min.js +++ b/public/scripts/ol-min.js @@ -1 +1 @@ -!function(t,e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define([],e):t.ol=e()}(this,function(){var t,e,o,r={},n=this;function i(t,e){var o,i=r;t=t.split("."),i=i||n,t[0]in i||!i.execScript||i.execScript("var "+t[0]);for(;t.length&&(o=t.shift());)t.length||void 0===e?i=i[o]&&i[o]!==Object.prototype[o]?i[o]:i[o]={}:i[o]=e}function N(t,e){return e>>0,r=0;r=e.ca&&t.da<=e.ia&&t.ia>=e.da}function w(t,e,o){return Math.min(Math.max(t,e),o)}s(h,Error);var f="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function x(t,e,o,i,r,n){var p=r-o,s=n-i;if(p||s){var a=((t-o)*p+(e-i)*s)/(p*p+s*s);1t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function q(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function J(t,e,o,i,r){for(;oe[0]?t[0]:e[0],o[1]=t[1]>e[1]?t[1]:e[1],o[2]=t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function ht(t){return t[2]=t.minZoom;){if(o.call(null,e,re(t,r,e,i)))return!0;--e}return!1}function oe(t,e,o,i){return e[0]P.$)&&(C(M,new I(L(x.ca,A),L(x.$,A),x.da,x.ia))||x.$-x.ca+1>A&&C(M,P))){v=!0;break t}}}v=!1}else v=!0}else v=!1;v?(g in a&&delete a[g],(v=f.b)in h||(h[v]=!0,s[g]=f)):a[g]=f}}}}for(var E in u=(e=[s,a])[0],e=e[1],this.l)E in u?(this.j[E]||(this.l[E].style.display="",this.j[E]=!0),delete u[E]):E in e?(this.j[E]&&(this.l[E].style.display="none",delete this.j[E]),delete e[E]):($e(this.l[E]),delete this.l[E],delete this.j[E]);for(E in u)(y=document.createElement("LI")).innerHTML=u[E].b,this.I.appendChild(y),this.l[E]=y,this.j[E]=!0;for(E in e)(y=document.createElement("LI")).innerHTML=e[E].b,y.style.display="none",this.I.appendChild(y),this.l[E]=y;for(j in E=!gt(this.j)||!gt(t.logos),this.B!=E&&(this.element.style.display=E?"":"none",this.B=E),E&>(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,E=this.T)j in t||($e(E[j]),delete E[j]);for(var T in t)if((e=t[T])instanceof HTMLElement&&(this.u.appendChild(e),E[T]=e),!(T in E)){var j=new Image;j.src=T,""===e?u=j:((u=document.createElement("a")).href=e,u.appendChild(j)),this.u.appendChild(u),E[T]=u}this.u.style.display=gt(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function oo(t){t.element.classList.toggle("ol-collapsed"),t.c?_e(t.D,t.C):_e(t.C,t.D),t.c=!t.c}function io(t){return Math.pow(t,3)}function ro(t){return 1-io(1-t)}function no(t){return 3*t*t-2*t*t*t}function po(t){return t}function so(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧";this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass"));var i=t.tipLabel?t.tipLabel:"Reset rotation";(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),me(o,"click",so.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render?t.render:ao,this.o=t.resetNorth?t.resetNorth:void 0,Qe.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function ao(t){if(t=t.frameState){if((t=t.viewState.rotation)!=this.u){var e="rotate("+t+"rad)";if(this.j){var o=this.element.classList.contains("ol-hidden");o||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")}this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e}this.u=t}}function ho(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",p=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",s=document.createElement("button");s.className=e+"-in",s.setAttribute("type","button"),s.title=n,s.appendChild("string"==typeof i?document.createTextNode(i):i),me(s,"click",ho.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=p,i.appendChild("string"==typeof r?document.createTextNode(r):r),me(i,"click",ho.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(s),o.appendChild(i),Qe.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function lo(t){t=t||{};var e=new De;return void 0!==t.zoom&&!t.zoom||e.push(new ho(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new so(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new to(t.attributionOptions)),e}function uo(t){t=t||{},this.c=void 0!==t.className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢";this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e;var o=t.tipLabel?t.tipLabel:"Toggle full-screen";(e=document.createElement("button")).className=this.c+"-"+yo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),me(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(co()?"":"ol-unsupported"),o.appendChild(e),Qe.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function co(){var t=document.body;return!!(t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled)}function yo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function fo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}s(Qe,Re),Qe.prototype.ka=function(){$e(this.element),Re.prototype.ka.call(this)},Qe.prototype.g=function(){return this.a},Qe.prototype.setMap=function(t){this.a&&$e(this.element);for(var e=0,o=this.v.length;e=e.length){var r,n=[];for(r=0;rt.D||Math.abs(e.clientY-t.c.clientY)>t.D}function vi(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function bi(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),mi(t,0)),e=t.c(i),delete t.a[e],i}function mi(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],p=i[e],s=e;e>1;){var a=2*e+1,h=2*e+2;a=h>1;if(!(t[p]>n))break;i[o]=i[p],t[o]=t[p],o=p}i[o]=r,t[o]=n}function xi(t){var e,o=t.l,i=t.b,r=t.i,n=0,p=i.length;for(e=0;e>1)-1;0<=o;o--)mi(t,o)}function Si(e,t){vi.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function Mi(t,e,o){for(var i,r,n=0;t.j=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||gr(t,e,o,i,function(t,e){var o=!1,i=X(l,t),r=X(l,e);if(1===i||1===r)o=!0;else{var n=l[0],p=l[1],s=l[2],a=l[3],h=e[0];t=((e=e[1])-t[1])/(h-t[0]),2&r&&!(2&i)&&(o=n<=(o=h-(e-a)/t)&&o<=s),o||!(4&r)||4&i||(o=p<=(o=e-(h-s)*t)&&o<=a),o||!(8&r)||8&i||(o=n<=(o=h-(e-p)/t)&&o<=s),o||!(16&r)||16&i||(o=p<=(o=e-(h-n)*t)&&o<=a)}return o}))}function vr(t,e,o,i,r){var n=o[0];if(!(dr(t,e,n,i,r)||cr(t,e,n,i,r[0],r[1])||cr(t,e,n,i,r[0],r[3])||cr(t,e,n,i,r[2],r[1])||cr(t,e,n,i,r[2],r[3])))return!1;if(1===o.length)return!0;for(e=1,n=o.length;ee;)i-=3;if((e=t.b[o+2]-t.b[i+2])<1e3/60)return!1;var r=t.b[o]-t.b[i];return o=t.b[o+1]-t.b[i+1],t.i=Math.atan2(o,r),t.a=Math.sqrt(r*r+o*o)/e,t.a>t.c}(this.a)){var e=this.a;e=(e.c-e.a)/e.f;var o=this.a.i,i=t.wa(),r=(i=r.Ja(i),r.Wa([i[0]-e*Math.cos(o),i[1]-e*Math.sin(o)]));t.animate({center:t.Ec(r),duration:500,easing:ro})}return Dr(t,1,-1),!1}function sn(t){if(0=this.u}function vn(t){if($r(t)){var e=this.a,o=t.pixel;e.c=this.g,e.i=o,fn(e),yn(e),this.b(new Mn(xn,t.coordinate,t))}}function bn(t){return!$r(t)||(this.a.setMap(null),this.l(t,this.g,t.pixel)&&(this.j(t),this.b(new Mn(Sn,t.coordinate,t))),!1)}function mn(t){if($r(t)&&zr(t)&&this.C(t)){this.g=t.pixel,this.a.setMap(t.map);var e=this.a,o=this.g;return e.c=this.g,e.i=o,fn(e),yn(e),this.b(new Mn(wn,t.coordinate,t)),!0}return!1}s(fi,je),(t=fi.prototype).Jh=function(t){gi(this,t);var e=new zo("pointerup",this.i,t);this.b(e),this.o||t.button||function(t,e){var o=new zo("click",t.i,e);t.b(o),t.j?(clearTimeout(t.j),t.j=0,o=new zo("dblclick",t.i,e),t.b(o)):t.j=setTimeout(function(){this.j=0;var t=new zo("singleclick",this.i,e);this.b(t)}.bind(t),250)}(this,this.c),this.S||(this.f.forEach(Se),this.f.length=0,this.o=!1,this.c=null,Ae(this.a),this.a=null)},t.Ol=function(t){gi(this,t);var e=new zo("pointerdown",this.i,t);this.b(e),this.c=t,this.f.length||(this.a=new ni(document),this.f.push(me(this.a,"pointermove",this.Hm,this),me(this.a,"pointerup",this.Jh,this),me(this.g,"pointercancel",this.Jh,this)))},t.Hm=function(t){if(di(this,t)){this.o=!0;var e=new zo("pointerdrag",this.i,t,this.o);this.b(e)}t.preventDefault()},t.Lp=function(t){this.b(new zo(t.type,this.i,t,!(!this.c||!di(this,t))))},t.ka=function(){this.v&&(Se(this.v),this.v=null),this.l&&(Se(this.l),this.l=null),this.f.forEach(Se),this.f.length=0,this.a&&(Ae(this.a),this.a=null),this.g&&(Ae(this.g),this.g=null),je.prototype.ka.call(this)},vi.prototype.clear=function(){this.b.length=0,this.i.length=0,yt(this.a)},vi.prototype.f=function(t){R(!(this.c(t)in this.a),31);var e=this.l(t);return 1/0!=e&&(this.b.push(t),this.i.push(e),this.a[this.c(t)]=!0,wi(this,0,this.b.length-1),!0)},s(Si,vi),Si.prototype.f=function(t){var e=vi.prototype.f.call(this,t);return e&&me(t[0],"change",this.o,this),e},Si.prototype.o=function(t){var e=(t=t.target).getState();2!==e&&3!==e&&4!==e&&5!==e||(xe(t,"change",this.o,this),(t=t.bb())in this.g&&(delete this.g[t],--this.j),this.v())},s(Xi,Re),(t=Xi.prototype).Ab=function(t,e){return e=e||[NaN,NaN],this.Kb(t[0],t[1],e,1/0),e},t.sb=function(t){return this.Mc(t[0],t[1])},t.Mc=Bi,t.G=function(t){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var e=this.l;return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):t=e,t},t.Rb=function(t){return this.Vd(t*t)},t.tb=function(t,e){return this.Dc(Kt(t,e)),this},s(Zi,Xi),(t=Zi.prototype).Mc=Bi,t.se=function(t){return z(this.A,0,this.A.length,this.a,t)},t.ac=function(){return this.A.slice(0,this.a)},t.ga=function(){return this.A},t.bc=function(){return this.A.slice(this.A.length-this.a)},t.cc=function(){return this.ja},t.Vd=function(t){if(this.o!=this.i&&(yt(this.f),this.g=0,this.o=this.i),t<0||this.g&&t<=this.g)return this;var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];var o=this.hd(t);return o.ga().length=this.f&&t<=this.a){var e=this.l||0;if(this.j){var o=l(this.j,t,1);if(e+=o,o==this.j.length-1)return e;var i=this.j[o];o=i/this.j[o+1]}else i=this.a,o=this.C;e+=Math.log(i/t)/Math.log(o)}return e},t.Qf=function(t,e){var o=(e=e||{}).size;if(o=o||Nr(this),t instanceof Zi)if("Circle"===t.U()){var i=Ar(t=t.G());i.rotate(this.Qa(),et(t))}else i=t;else R(Array.isArray(t),24),R(!ht(t),25),i=Ar(t);var r,n=e.padding?e.padding:[0,0,0,0],p=void 0===e.constrainResolution||e.constrainResolution,s=void 0!==e.nearest&&e.nearest;r=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.constrainResolution(this.a,e.maxZoom-this.l,0):0;var a=i.ga(),h=this.Qa();t=Math.cos(-h);h=Math.sin(-h);var l=1/0,u=1/0,c=-1/0,y=-1/0;i=i.qa();for(var f=0,g=a.length;fthis.C&&(this.a=!0)),this.j=o,(o=(t=t.map).Z()).g.rotation!==Pi){i=t.a.getBoundingClientRect();var r=en(this.o);r[0]-=i.left,r[1]-=i.top,this.g=t.Wa(r),this.a&&(i=o.Qa(),t.render(),Br(o,i+e,this.g))}}function kn(t){if(this.o.length<2){if(Dr(t=t.map.Z(),1,-1),this.a){var e=t.Qa(),o=this.g,i=this.u;e=t.constrainRotation(e,0);Br(t,e,o,i)}return!1}return!0}function Dn(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||Dr(t.Z(),1,1),!0)}function On(t){tn.call(this,{handleDownEvent:Bn,handleDragEvent:Un,handleUpEvent:Gn}),t=t||{},this.l=t.constrainResolution||!1,this.g=null,this.u=void 0!==t.duration?t.duration:400,this.a=void 0,this.j=1}function Un(t){var e=1,o=this.o[0],i=this.o[1],r=o.clientX-i.clientX;o=o.clientY-i.clientY,r=Math.sqrt(r*r+o*o);void 0!==this.a&&(e=this.a/r),this.a=r;i=(r=(t=t.map).Z()).Pa();var n=r.a,p=r.f;n<(o=i*e)?(e=n/i,o=n):ot.a){var o=this.g,i=this.u;e=t.constrainResolution(e,0,this.j-1);Vr(t,e,o,i)}return!1}return!0}function Bn(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.a=void 0,this.j=1,this.D||Dr(t.Z(),1,1),!0)}function Xn(t){t=t||{};var e=new De,o=new Or(-.005,.05,100);return void 0!==t.altShiftDragRotate&&!t.altShiftDragRotate||e.push(new an),void 0!==t.doubleClickZoom&&!t.doubleClickZoom||e.push(new Wr({delta:t.zoomDelta,duration:t.zoomDuration})),void 0!==t.dragPan&&!t.dragPan||e.push(new rn({kinetic:o})),void 0!==t.pinchRotate&&!t.pinchRotate||e.push(new Nn),void 0!==t.pinchZoom&&!t.pinchZoom||e.push(new On({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.keyboard&&!t.keyboard||(e.push(new An),e.push(new Tn({delta:t.zoomDelta,duration:t.zoomDuration}))),void 0!==t.mouseWheelZoom&&!t.mouseWheelZoom||e.push(new Cn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.shiftDragZoom&&!t.shiftDragZoom||e.push(new Pn({duration:t.zoomDuration})),e}function Vn(t){Re.call(this);var e=ct({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Je:!0}}function Wn(t){return t.a.opacity=w(t.hc(),0,1),t.a.yj=t.$f(),t.a.visible=t.Mb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.fc(),t.a.minResolution=Math.max(t.gc(),0),t.a}function Zn(t){var e=t||{};delete(t=ct({},e)).layers,e=e.layers,Vn.call(this,t),this.f=[],this.c={},me(this,Ne(Kn),this.Hl,this),e?Array.isArray(e)?e=new De(e.slice(),{unique:!0}):R(e instanceof De,43):e=new De(void 0,{unique:!0}),this.xi(e)}s(Nn,tn),Nn.prototype.Xc=Bi,s(On,tn),On.prototype.Xc=Bi,s(Vn,Re),(t=Vn.prototype).G=function(){return this.get("extent")},t.fc=function(){return this.get("maxResolution")},t.gc=function(){return this.get("minResolution")},t.hc=function(){return this.get("opacity")},t.Mb=function(){return this.get("visible")},t.Ba=function(){return this.get("zIndex")},t.vc=function(t){this.set("extent",t)},t.Ac=function(t){this.set("maxResolution",t)},t.Bc=function(t){this.set("minResolution",t)},t.wc=function(t){this.set("opacity",t)},t.xc=function(t){this.set("visible",t)},t.Vb=function(t){this.set("zIndex",t)},s(Zn,Vn),(t=Zn.prototype).Fd=function(){},t.Fe=function(){this.Mb()&&this.s()},t.Hl=function(){this.f.forEach(Se),this.f.length=0;var t,e=this.qd();for(var o in this.f.push(me(e,"add",this.Gl,this),me(e,"remove",this.Il,this)),this.c)this.c[o].forEach(Se);for(yt(this.c),o=0,t=(e=e.a).length;o=t.minResolution&&el[2])&&(u=[f+c*Math.ceil((l[0]-f)/c),t[1]])}for(c=(l=r.layerStatesArray).length-1;0<=c;--c){var y=l[c],f=y.layer;if(Yn(y,h)&&o.call(i,f)&&(y=lp(this,f),f.ha()&&(a=y.Ea(f.ha().u?u:t,r,e,s,p)),a))return a}},t.Ei=function(t,e,o,i,r){return void 0!==this.Ea(t,e,o,Gi,this,i,r)},t.Fl=function(){this.o.render()},t.Jg=m,t.Rp=function(t,e){for(var o in this.c)if(!(e&&o in e.layerStates)){t=o;var i=this.c[t];delete this.c[t],Se(this.v[t]),delete this.v[t],Ae(i)}},s(yp,Ee);var fp=[0,0,0,1],gp=[],dp=[0,0,0,1];function vp(t,e,o,i){e&&(t.translate(o,i),t.rotate(e),t.translate(-o,-i))}function bp(){}function mp(t,e,o,i,r){this.i=t,this.u=e,this.c=o,this.S=i,this.Yb=r,this.M=this.b=this.a=this.Ua=this.R=this.I=null,this.na=this.T=this.l=this.B=this.C=this.D=0,this.fa=!1,this.f=this.fb=0,this.pa=!1,this.oa=0,this.Ia="",this.va=this.Jb=0,this.Sa=!1,this.j=this.$a=0,this.ra=this.o=this.g=null,this.v=[],this.xb=[1,0,0,1,0,0]}function wp(t,e,o){if(t.M){e=Vi(e,0,o,2,t.S,t.v),o=t.i;var i=t.xb,r=o.globalAlpha;1!=t.l&&(o.globalAlpha=r*t.l);var n,p=t.fb;t.fa&&(p+=t.Yb);var s=0;for(n=e.length;s=s;){var a=this.i[p],h=this.f[p];o[h=G(h).toString()]&&(i!==n&&Bp(t,e,i,n),n=a),p--,i=a}i!==n&&Bp(t,e,i,n),i=n=s}}},t.ve=function(t,e,o,i,r){var n,p,s=this.i.length-2,a=this.i[s+1];for(n=this.u.length-1;0<=n;--n){var h=this.j[n];for(t.uniform4fv(this.v.B,h[0]),qp(this,t,h[1],h[2]),p=this.u[n];0<=s&&this.i[s]>=p;){h=this.i[s];var l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||at(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bp(t,e,h,a),a=i(l)))return a;s--,a=h}}},t.Ma=function(t,e){if(e){var o=e.i;this.c.lineDash=o||Vp,o=e.g,this.c.lineDashOffset=o||0,o=(o=e.a)instanceof CanvasGradient||o instanceof CanvasPattern?Wp:We(o).map(function(t,e){return 3!=e?t/255:t})||Wp,e=void 0!==(e=e.c)?e:1}else o=[0,0,0,0],e=0;t=(t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern?Xp:We(t).map(function(t,e){return 3!=e?t/255:t})||Xp,this.c.strokeColor&&U(this.c.strokeColor,o)&&this.c.fillColor&&U(this.c.fillColor,t)&&this.c.lineWidth===e||(this.c.s=!0,this.c.fillColor=t,this.c.strokeColor=o,this.c.lineWidth=e,this.j.push([t,o,e]))},s(Jp,Rp);var _p=new Jp;function $p(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}s($p,Ip);var Qp=new $p;function ts(t,e){this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"k"),this.i=t.getUniformLocation(e,"h"),this.v=t.getAttribLocation(e,"e"),this.u=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"c"),this.D=t.getAttribLocation(e,"g"),this.C=t.getAttribLocation(e,"d")}function es(t,e){this.j=t,this.b=e,this.a={},this.c={},this.i={},this.l=this.v=this.f=this.o=null,(this.g=d(o,"OES_element_index_uint"))&&e.getExtension("OES_element_index_uint"),me(this.j,"webglcontextlost",this.Xo,this),me(this.j,"webglcontextrestored",this.Yo,this)}function os(t,e,o){var i=t.b,r=o.b,n=String(G(o));if(n in t.a)i.bindBuffer(e,t.a[n].buffer);else{var p,s=i.createBuffer();i.bindBuffer(e,s),34962==e?p=new Float32Array(r):34963==e&&(p=t.g?new Uint32Array(r):new Uint16Array(r)),i.bufferData(e,p,o.a),t.a[n]={lc:o,buffer:s}}}function is(t,e){var o=t.b;e=String(G(e));var i=t.a[e];o.isContextLost()||o.deleteBuffer(i.buffer),delete t.a[e]}function rs(t){if(!t.f){var e=t.b,o=e.createFramebuffer();e.bindFramebuffer(e.FRAMEBUFFER,o);var i=as(e,1,1),r=e.createRenderbuffer();e.bindRenderbuffer(e.RENDERBUFFER,r),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,1,1),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,r),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),t.f=o,t.v=i,t.l=r}return t.f}function ns(t,e){var o=String(G(e));if(o in t.c)return t.c[o];var i=t.b,r=i.createShader(e.U());return i.shaderSource(r,e.b),i.compileShader(r),t.c[o]=r}function ps(t,e,o){var i=G(e)+"/"+G(o);if(i in t.i)return t.i[i];var r=t.b,n=r.createProgram();return r.attachShader(n,ns(t,e)),r.attachShader(n,ns(t,o)),r.linkProgram(n),t.i[i]=n}function ss(t,e,o){var i=t.createTexture();return t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(3553,10242,e),void 0!==o&&t.texParameteri(3553,10243,o),i}function as(t,e,o){var i=ss(t,void 0,void 0);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,o,0,t.RGBA,t.UNSIGNED_BYTE,null),i}function hs(t,e){var o=ss(t,33071,33071);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),o}function ls(t,e){Gp.call(this,0,e),this.C=this.D=void 0,this.S=[],this.v=[],this.oa=void 0,this.j=[],this.c=[],this.I=this.ra=void 0,this.B=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.va=[],this.u=[],this.pa=void 0}function us(t,e,o,i){var r,n=t.D,p=t.C,s=t.oa,a=t.ra,h=t.I,l=t.R,u=t.Ua,c=t.T,y=t.na?1:0,f=-t.fa,g=t.fb,d=t.pa,v=Math.cos(f),b=(f=Math.sin(f),t.b.length),m=t.a.length;for(r=0;r=a;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||at(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bp(t,e,h,p),p=i(l)))return p;p=h,s--}}},t.Ub=function(t){var e=t.Hc(),o=t.Y(1),i=t.ye(),r=t.qg(1),n=t.f,p=t.Oc(),s=t.l,a=t.g,h=t.ic();if(t=t.a,this.j.length){var l=this.j[this.j.length-1];G(l)!=G(o)&&(this.S.push(this.b.length),this.j.push(o))}else this.j.push(o);this.c.length?G(l=this.c[this.c.length-1])!=G(r)&&(this.v.push(this.b.length),this.c.push(r)):this.c.push(r),this.D=e[0],this.C=e[1],this.oa=h[1],this.ra=i[1],this.I=i[0],this.R=n,this.Ua=p[0],this.T=p[1],this.fa=a,this.na=s,this.fb=t,this.pa=h[0]},s(fs,Rp);var gs=new fs;function ds(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}s(ds,Ip);var vs=new ds;function bs(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.R=t.getUniformLocation(e,"l"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"p"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"o"),this.g=t.getAttribLocation(e,"g"),this.o=t.getAttribLocation(e,"d"),this.l=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e")}function ms(t,e){Gp.call(this,0,e),this.v=null,this.u=[],this.j=[],this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}function ws(t,e,o,i){var r,n=t.a.length,p=t.b.length,s="bevel"===t.c.lineJoin?0:"miter"===t.c.lineJoin?1:2,a="butt"===t.c.lineCap?0:"square"===t.c.lineCap?1:2,h=ys(e,o,i),l=p,u=1;for(r=0;ro&&(this.i.push(o),this.f.push(e),this.c.s&&(this.j.push(o),this.c.s=!1))},t.Db=function(){this.l=new zp(this.a),this.o=new zp(this.b),this.i.push(this.b.length),!this.j.length&&0=l;){var u=this.i[h],c=this.f[h];o[c=G(c).toString()]&&(p!==a&&(Bp(t,e,p,a),t.clear(t.DEPTH_BUFFER_BIT)),a=u),h--,p=u}p!==a&&(Bp(t,e,p,a),t.clear(t.DEPTH_BUFFER_BIT)),p=a=l}}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},t.ve=function(t,e,o,i,r){var n,p,s=this.i.length-2,a=this.i[s+1];for(n=this.j.length-1;0<=n;--n){var h=this.u[n];for(As(this,t,h[0],h[1],h[2]),p=this.j[n];0<=s&&this.i[s]>=p;){h=this.i[s];var l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||at(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bp(t,e,h,a),a=i(l)))return a;s--,a=h}}},t.Ma=function(t,e){t=e.f,this.c.lineCap=void 0!==t?t:"round",t=e.i,this.c.lineDash=t||Vp,t=e.g,this.c.lineDashOffset=t||0,t=e.j,this.c.lineJoin=void 0!==t?t:"round",t=(t=e.a)instanceof CanvasGradient||t instanceof CanvasPattern?Wp:We(t).map(function(t,e){return 3!=e?t/255:t})||Wp;var o=void 0!==(o=e.c)?o:1;e=void 0!==(e=e.o)?e:10,this.c.strokeColor&&U(this.c.strokeColor,t)&&this.c.lineWidth===o&&this.c.miterLimit===e||(this.c.s=!0,this.c.strokeColor=t,this.c.lineWidth=o,this.c.miterLimit=e,this.u.push([t,o,e]))};var Es=3,Ts=5,js=7,Cs=11,Ls=13,Rs=17,Is=19,Ns=23;function Fs(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}s(Fs,Rp);var ks=new Fs;function Ds(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}s(Ds,Ip);var Os=new Ds;function Us(t,e){this.B=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"c"),this.a=t.getUniformLocation(e,"f"),this.i=t.getUniformLocation(e,"b"),this.b=t.getAttribLocation(e,"a")}function Gs(t){t=t||{},this.a=void 0!==t.color?t.color:null,this.f=t.lineCap,this.i=void 0!==t.lineDash?t.lineDash:null,this.g=t.lineDashOffset,this.j=t.lineJoin,this.o=t.miterLimit,this.c=t.width,this.b=void 0}function Bs(t){this.b=this.a=this.i=void 0,this.f=void 0===t||t,this.c=0}function Xs(t){var e=t.b;if(e){var o=e.next,i=e.ub;o&&(o.ub=i),i&&(i.next=o),t.b=o||i,t.i===t.a?(t.b=void 0,t.i=void 0,t.a=void 0):t.i===e?t.i=t.b:t.a===e&&(t.a=i?t.b.ub:t.b),t.c--}}function Vs(t){if(t.b=t.i,t.b)return t.b.data}function Ws(t){if(t.b&&t.b.next)return t.b=t.b.next,t.b.data}function Zs(t){if(t.b&&t.b.next)return t.b.next.data}function Ks(t){if(t.b&&t.b.ub)return t.b=t.b.ub,t.b.data}function zs(t){if(t.b&&t.b.ub)return t.b.ub.data}function Ys(t){if(t.b)return t.b.data}(t=Gs.prototype).clone=function(){var t=this.a;return new Gs({color:t&&t.slice?t.slice():t||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})},t.No=function(){return this.a},t.Vk=function(){return this.f},t.Oo=function(){return this.i},t.Wk=function(){return this.g},t.Xk=function(){return this.j},t.bl=function(){return this.o},t.Po=function(){return this.c},t.Qo=function(t){this.a=t,this.b=void 0},t.aq=function(t){this.f=t,this.b=void 0},t.setLineDash=function(t){this.i=t,this.b=void 0},t.bq=function(t){this.g=t,this.b=void 0},t.cq=function(t){this.j=t,this.b=void 0},t.gq=function(t){this.o=t,this.b=void 0},t.jq=function(t){this.c=t,this.b=void 0},Bs.prototype.concat=function(t){if(t.b){if(this.b){var e=this.b.next;this.b.next=t.i,t.i.ub=this.b,e.ub=t.a,t.a.next=e,this.c+=t.c}else this.b=t.b,this.i=t.i,this.a=t.a,this.c=t.c;t.b=void 0,t.i=void 0,t.a=void 0,t.c=0}};var Hs,qs,Js={$d:function(){}};function _s(t,e,o){var i=t[e];t[e]=t[o],t[o]=i}function $s(t,e){return t=t.ca&&e.ia>=t.da}function ha(t){return{children:t,height:1,ib:!0,ca:1/0,da:1/0,$:-1/0,ia:-1/0}}function la(t,e,o,i,r){for(var n,p=[e,o];p.length;)(o=p.pop())-(e=p.pop())<=i||(n=e+Math.ceil((o-e)/i/2)*i,qs(t,n,e,o,r),p.push(e,n,n,o))}function ua(t){this.a=Js.$d(t),this.b={}}function ca(t,e,o){var i=t.b[G(o)];Y([i.ca,i.da,i.$,i.ia],e)||(t.remove(o),t.Ca(e,o))}function ya(t){return t.a.all().map(function(t){return t.value})}function fa(t,e){return t.a.search({ca:e[0],da:e[1],$:e[2],ia:e[3]}).map(function(t){return t.value})}function ga(t,e,o,i){return da(fa(t,e),o,i)}function da(t,e,o){for(var i,r=0,n=t.length;rn&&(n=e[y],c=e[y+1]),u=f}}else for(u=s=Aa(t,e[y=e.length-o],e[y+1],a++),n=e[y],c=e[y+1],y-=o,p=0;p<=y;y-=o)f=Aa(t,e[y],e[y+1],a++),l.push(Ea(u,f,i)),h.push([Math.min(u.x,f.x),Math.min(u.y,f.y),Math.max(u.x,f.x),Math.max(u.y,f.y)]),e[y]>n&&(n=e[y],c=e[y+1]),u=f;return l.push(Ea(f,s,i)),h.push([Math.min(u.x,f.x),Math.min(u.y,f.y),Math.max(u.x,f.x),Math.max(u.y,f.y)]),r.load(h,l),[n,c]}function wa(t,e,o){var i=Vs(t),r=i,n=Ws(t),p=!1;do{var s=o?Zp(n.W.x,n.W.y,r.W.x,r.W.y,r.aa.x,r.aa.y):Zp(r.aa.x,r.aa.y,r.W.x,r.W.y,n.W.x,n.W.y);void 0===s?(Ta(r,n,t,e),p=!0,n===i&&(i=Zs(t)),n=r,Ks(t)):r.W.Fb!==s&&(r.W.Fb=s,p=!0),r=n,n=Ws(t)}while(r!==i);return p}function xa(t,e,o,i,r){for(var n=Vs(t);n.W.x!==e;)n=Ws(t);var p,s=1/0,a=Ca({aa:e=n.W,W:i={x:i,y:e.y,hb:-1}},r,!0),h=0;for(p=a.length;h(o.y-i.y)*(e.x-i.x);return r=(r.x-i.x)*(e.y-i.y)<(r.y-i.y)*(e.x-i.x),t=(t.x-e.x)*(i.y-e.y)>(t.y-e.y)*(i.x-e.x),o=(o.x-e.x)*(i.y-e.y)<(o.y-e.y)*(i.x-e.x),e=e.Fb?o||t:o&&t,(i.Fb?r||n:r&&n)&&e}function Ia(){}function Na(t,e,o){this.f=e,this.g=t,this.c=o,this.a={}}function Fa(t,e){var o,i=[];for(o in t.a){var r,n=t.a[o];for(r in n)i.push(n[r].Eb(e))}return function(){for(var t,e=i.length,o=0;othis.Hf;)this.jk(i,e),e--;this.Zj(o,i,e)},jk:function(t,e){var o=t[e],i=o.children.length,r=this.fh;this.$j(o,r,i),i=this.ak(o,r,i),(i=ha(o.children.splice(i,o.children.length-i))).height=o.height,i.ib=o.ib,ta(o,this.wb),ta(i,this.wb),e?t[e-1].children.push(i):this.hh(o,i)},hh:function(t,e){this.data=ha([t,e]),this.data.height=t.height+1,this.data.ib=!1,ta(this.data,this.wb)},ak:function(t,e,o){var i,r,n=r=1/0;for(i=e;i<=o-e;i++){var p=ea(t,0,i,this.wb),s=ea(t,i,o,this.wb),a=Math.max(0,Math.min(p.$,s.$)-Math.max(p.ca,s.ca))*Math.max(0,Math.min(p.ia,s.ia)-Math.max(p.da,s.da));if(p=na(p)+na(s),as&&(this.i.push(s),this.f.push(e),this.j.s&&(this.c.push(s),this.j.s=!1)),this.g.b.length>a&&Ps(this.g,e,a)},t.rc=function(t,e){var o=t.Bb(),i=t.qa();if(0=l;){var u=this.i[h],c=this.f[h];o[c=G(c).toString()]&&(p!==a&&(Bp(t,e,p,a),t.clear(t.DEPTH_BUFFER_BIT)),a=u),h--,p=u}p!==a&&(Bp(t,e,p,a),t.clear(t.DEPTH_BUFFER_BIT)),p=a=l}}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},t.ve=function(t,e,o,i,r){var n,p,s=this.i.length-2,a=this.i[s+1];for(n=this.c.length-1;0<=n;--n){var h=this.u[n];for(t.uniform4fv(this.v.B,h),p=this.c[n];0<=s&&this.i[s]>=p;){h=this.i[s];var l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||at(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bp(t,e,h,a),a=i(l)))return a;s--,a=h}}},t.Ma=function(t,e){t=(t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern?Xp:We(t).map(function(t,e){return 3!=e?t/255:t})||Xp,this.j.fillColor&&U(t,this.j.fillColor)||(this.j.fillColor=t,this.j.s=!0,this.u.push(t)),e?this.g.Ma(null,e):this.g.Ma(null,new Gs({color:[0,0,0,0],lineWidth:0}))},Ia.prototype.La=function(){},s(Na,Cp),Na.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(t={},this.a[o]=t),void 0===(o=t[e])&&(o=new Oa[e](this.g,this.f),t[e]=o),o},Na.prototype.i=function(){return gt(this.a)},Na.prototype.La=function(t,e,o,i,r,n,p,s){var a,h,l=Object.keys(this.a).map(Number);l.sort(N);var u=0;for(a=l.length;u=t.l)break;++n}o=r+" "+i,t.D!=o&&(t.o.innerHTML=o,t.D=o),t.B!=e&&(t.o.style.width=e+"px",t.B=e),t.j||(t.c.style.display="",t.j=!0)}else t.j&&(t.c.style.display="none",t.j=!1)}ph.prototype.C=function(){return this.get(lh)},ph.prototype.T=function(){hh(this)},ph.prototype.I=function(t){this.set(lh,t)};var lh="units";function uh(t){t=t||{},this.c=void 0,this.j=ch,this.D=this.l=0,this.I=null,this.na=!1,this.T=void 0!==t.duration?t.duration:200;var e=void 0!==t.className?t.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb ol-unselectable";var i=document.createElement("div");i.className=e+" ol-unselectable ol-control",i.appendChild(o),this.o=new ni(i),me(this.o,"pointerdown",this.yl,this),me(this.o,"pointermove",this.wl,this),me(this.o,"pointerup",this.xl,this),me(i,"click",this.vl,this),me(o,"click",Te),Qe.call(this,{element:i,render:t.render?t.render:yh})}s(uh,Qe),uh.prototype.ka=function(){Ae(this.o),Qe.prototype.ka.call(this)};var ch=0;function yh(t){if(t.frameState){if(!this.na){var e=(n=this.element).offsetWidth,o=n.offsetHeight,i=n.firstElementChild,r=getComputedStyle(i),n=i.offsetWidth+parseFloat(r.marginRight)+parseFloat(r.marginLeft);i=i.offsetHeight+parseFloat(r.marginTop)+parseFloat(r.marginBottom);this.I=[n,i],o>1)],o))<0?h=r+1:(l=r,a=!s);s=(r=a?h:~h)<0?(o=(o-p[-r-2])/(p[-r-1]-p[-r-2]),p=M(t[e+=(-r-2)*i],t[e+i],o),M(t[e+1],t[e+i+1],o)):(p=t[e+r*i],t[e+r*i+1])}return n?(n[0]=p,n[1]=s,n):[p,s]}function ul(t,e,o,i,r,n){if(o==e)return null;if(r>1)+1)*i-1]?o=n:e=n+1;if(r==(o=t[e*i-1]))return t.slice((e-1)*i,(e-1)*i+i);var p;for(n=(r-o)/(t[(e+1)*i-1]-o),o=[],p=0;p>>0):4294967296*(e>>>0)+(t>>>0)}function Wf(t,e,o,i,r){this.g=r,this.i=t,this.b=e,this.f=o,this.c=i}function Zf(t){rl.call(this),t=t||{},this.defaultDataProjection=new wt({code:"",units:"tile-pixels"}),this.b=t.featureClass?t.featureClass:Wf,this.a=t.geometryName,this.i=t.layerName?t.layerName:"layer",this.c=t.layers?t.layers:null}function Kf(t,e,o){for(var i=0,r=0,n=t.length;r>1,a=-7,h=o?-1:1,l=t[e+(r=o?r-1:0)];for(r+=h,o=l&(1<<-a)-1,l>>=-a,a+=n;0>=-a,a+=i;0>3,n=this.ea;this.type=7&i,t(r,e,this),this.ea===n&&this.mq(i)}return e},yp:function(){var t=Lf(this.lc,this.ea,!0,23,4);return this.ea+=4,t},up:function(){var t=Lf(this.lc,this.ea,!0,52,8);return this.ea+=8,t},Ka:function(t){var e=this.lc,o=e[this.ea++],i=127&o;return o<128?i:(i|=(127&(o=e[this.ea++]))<<7,o<128?i:(i|=(127&(o=e[this.ea++]))<<14,o<128?i:(i|=(127&(o=e[this.ea++]))<<21,o<128?i:function(t,e,o){var i=o.lc,r=i[o.ea++],n=(112&r)>>4;if(r<128)return Vf(t,n,e);if(n|=(127&(r=i[o.ea++]))<<3,r<128)return Vf(t,n,e);if(n|=(127&(r=i[o.ea++]))<<10,r<128)return Vf(t,n,e);if(n|=(127&(r=i[o.ea++]))<<17,r<128)return Vf(t,n,e);if(n|=(127&(r=i[o.ea++]))<<24,r<128)return Vf(t,n,e);if((r=i[o.ea++])<128)return Vf(t,n|(1&r)<<31,e);throw Error("Expected varint not more than 10 bytes")}(i|(15&(o=e[this.ea]))<<28,t,this))))},Kp:function(){return this.Ka(!0)},ce:function(){var t=this.Ka();return 1==t%2?(t+1)/-2:t/2},sp:function(){return!!this.Ka()},Gg:function(){for(var t=this.Ka()+this.ea,e=this.lc,o="",i=this.ea;i>>10&1023|55296),n=56320|1023&n),o+=String.fromCharCode(n),i+=p}return this.ea=t,o},mq:function(t){if((t&=7)===Xf.c)for(;127>3)?t.Gg():2===e?t.yp():3===e?t.up():4===e?t.Kp():5===e?t.Ka():6===e?t.ce():7===e?t.sp():null;return e}(o))}function p(t,e,o){3===t&&((t=new s(o,o.Ka()+o.ea)).length&&(e[t.name]=t))}a.prototype={clone:function(){return new a(this.x,this.y)},add:function(t){return this.clone().Yj(t)},rotate:function(t){return this.clone().hk(t)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(t){return this.x+=t.x,this.y+=t.y,this},hk:function(t){var e=Math.cos(t),o=(t=Math.sin(t))*this.x+e*this.y;return this.x=e*this.x-t*this.y,this.y=o,this},ik:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},a.Kq=function(t){return t instanceof a?t:Array.isArray(t)?new a(t[0],t[1]):t},o.b=["Unknown","Point","LineString","Polygon"],o.prototype.Oh=function(){var t=this.Cc;t.ea=this.Ef;for(var e,o=t.Ka()+t.ea,i=1,r=0,n=0,p=0,s=[];t.ea>=3),r--,1===i||2===i)n+=t.ce(),p+=t.ce(),1===i&&(e&&s.push(e),e=[]),e.push(new a(n,p));else{if(7!==i)throw Error("unknown command "+i);e&&e.push(e[0].clone())}return e&&s.push(e),s},o.prototype.bbox=function(){var t=this.Cc;t.ea=this.Ef;for(var e=t.Ka()+t.ea,o=1,i=0,r=0,n=0,p=1/0,s=-1/0,a=1/0,h=-1/0;t.ea>=3),i--,1===o||2===o)(r+=t.ce())=this.me.length)throw Error("feature index out of bounds");return this.Cc.ea=this.me[t],t=this.Cc.Ka()+this.Cc.ea,new o(this.Cc,t,this.extent,this.ne,this.pe)};var h=s;t.default={Bf:e,Wj:o,Xj:h},t.Bf=e,t.Wj=o,t.Xj=h}(Js.xf=Js.xf||{}),(t=Wf.prototype).get=function(t){return this.c[t]},t.Bb=function(){return this.f},t.G=function(){return this.a||(this.a="Point"===this.i?K(this.b):z(this.b,0,this.b.length,2)),this.a},t.Wn=function(){return this.g},t.ec=function(){return this.b},t.ga=Wf.prototype.ec,t.V=function(){return this},t.Xn=function(){return this.c},t.Vd=Wf.prototype.V,t.qa=function(){return 2},t.Lc=m,t.U=function(){return this.i},s(Zf,rl),(t=Zf.prototype).U=function(){return"arraybuffer"},t.Oa=function(t,e){var o=this.c;t=new Js.Dd(t),t=new Js.xf.Bf(t);var i,r=[],n=this.b;for(i in t.layers)if(!o||-1!=o.indexOf(i))for(var p=t.layers[i],s=0,a=p.length;s>=5;e+=p+=String.fromCharCode(n+63)}return e}function xg(t,e){e=e||1e5;var o,i=[],r=0,n=0,p=0;for(o=t.length;p>1):n>>1;for(t=0,r=i.length;t=e[0]||t[1]<=e[1]&&t[3]>=e[1]||_(t,this.sb,this))},t.ob=function(t){var e,o=this.a,i=t.slice();for(i[o]=i[0]+(this.A[o]-this.A[0]),e=1;en[2])&&(o=s*Math.ceil((n[0]-o)/s),i=[i[0]+o,i[1],i[2]+o,i[3]]),o=this.S[0],n=this.S[1],s=-1,h=Math.pow(this.Jb*p,2),u=[],c=[],p=0,a=iv.length;pP.width?P.width-C:N,D=T+L>P.height?P.height-L:T;e.drawImage(P,C,L,k,D,M,R,k*o,D*o),1!=j&&(e.globalAlpha=F),1==f&&!y||e.setTransform.apply(e,m)}++g;break;case 5:for(v=M[1],l=M[2],E=M[3],T=M[4]*o,j=M[5]*o,y=M[6],f=M[7]*o,P=M[8],A=M[9],(R=M[10])&&(y+=r);vthis.c&&(this.c=this.i.lineWidth,this.f=null)},s(Dv,Ev),(t=Dv.prototype).Zb=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){Uv(this,t),jv(this,e),this.b.push([9,Ze(fp)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]);var r=t.ga();i=this.coordinates.length;Tv(this,r,0,r.length,t.qa(),!1,!1),t=[1],i=[2,i],this.a.push(t,i),this.b.push(t,i),t=[7],this.b.push(t),void 0!==o.fillStyle&&this.a.push(t),void 0!==o.strokeStyle&&(o=[12],this.a.push(o),this.b.push(o)),Rv(this,e)}},t.rc=function(t,e){var o=this.i;Uv(this,t),jv(this,e),this.b.push([9,Ze(fp)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]);o=t.Bb();Ov(this,t.ec(),0,o,t.qa()),Rv(this,e)},t.pc=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){Uv(this,t),jv(this,e),this.b.push([9,Ze(fp)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),o=t.c,i=wl(t),t=t.qa();var r,n=0,p=0;for(r=o.length;pthis.c&&(this.c=o.lineWidth,this.f=null)):(o.strokeStyle=void 0,o.lineCap=void 0,o.lineDash=null,o.lineDashOffset=void 0,o.lineJoin=void 0,o.lineWidth=void 0,o.miterLimit=void 0)},s(Gv,Ev),Gv.prototype.yc=function(t,e,o,i,r,n){if(""!==this.Ia&&this.g&&(this.i||this.f)){if(this.i){r=this.i;var p=this.S;if(!p||p.fillStyle!=r.fillStyle){var s=[9,r.fillStyle];this.a.push(s),this.b.push(s),p?p.fillStyle=r.fillStyle:this.S={fillStyle:r.fillStyle}}}this.f&&(r=this.f,(p=this.D)&&p.lineCap==r.lineCap&&p.lineDash==r.lineDash&&p.lineDashOffset==r.lineDashOffset&&p.lineJoin==r.lineJoin&&p.lineWidth==r.lineWidth&&p.miterLimit==r.miterLimit&&p.strokeStyle==r.strokeStyle||(s=[10,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset,!1,1],this.a.push(s),this.b.push(s),p?(p.lineCap=r.lineCap,p.lineDash=r.lineDash,p.lineDashOffset=r.lineDashOffset,p.lineJoin=r.lineJoin,p.lineWidth=r.lineWidth,p.miterLimit=r.miterLimit,p.strokeStyle=r.strokeStyle):this.D={lineCap:r.lineCap,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset,lineJoin:r.lineJoin,lineWidth:r.lineWidth,miterLimit:r.miterLimit,strokeStyle:r.strokeStyle})),r=this.g,(p=this.C)&&p.font==r.font&&p.textAlign==r.textAlign&&p.textBaseline==r.textBaseline||(s=[11,r.font,r.textAlign,r.textBaseline],this.a.push(s),this.b.push(s),p?(p.font=r.font,p.textAlign=r.textAlign,p.textBaseline=r.textBaseline):this.C={font:r.font,textAlign:r.textAlign,textBaseline:r.textBaseline}),jv(this,n),t=[5,r=this.coordinates.length,t=Tv(this,t,e,o,i,!1,!1),this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l],this.a.push(t),this.b.push(t),Rv(this,n)}},Gv.prototype.Cb=function(t){if(t){if((e=t.Fa())?(e=qe((e=e.b)||fp),this.i?this.i.fillStyle=e:this.i={fillStyle:e}):this.i=null,s=t.Ga()){var e=s.a,o=s.f,i=s.i,r=s.g,n=s.j,p=s.c,s=s.o;o=void 0!==o?o:"round",i=i?i.slice():gp,r=void 0!==r?r:0,n=void 0!==n?n:"round",p=void 0!==p?p:1,s=void 0!==s?s:10,e=qe(e||dp);if(this.f)(h=this.f).lineCap=o,h.lineDash=i,h.lineDashOffset=r,h.lineJoin=n,h.lineWidth=p,h.miterLimit=s,h.strokeStyle=e;else this.f={lineCap:o,lineDash:i,lineDashOffset:r,lineJoin:n,lineWidth:p,miterLimit:s,strokeStyle:e}}else this.f=null;var a=t.a,h=(e=t.i,o=t.c,i=t.o,p=t.f,s=t.b,r=t.Na(),n=t.g,t.j);t=void 0!==a?a:"10px sans-serif",n=void 0!==n?n:"center",h=void 0!==h?h:"middle",this.g?((a=this.g).font=t,a.textAlign=n,a.textBaseline=h):this.g={font:t,textAlign:n,textBaseline:h},this.Ia=void 0!==r?r:"",this.j=void 0!==e?e:0,this.o=void 0!==o?o:0,this.l=void 0!==i&&i,this.v=void 0!==p?p:0,this.u=void 0!==s?s:1}else this.Ia=""},s(Bv,Cp);var Xv={0:[[!0]]};function Vv(t,e,o){var i,r=Math.floor(t.length/2);if(r<=e)for(i=r;it.$&&(t.$=i.$),i.dat.ia&&(t.ia=i.ia)):t[e][o]=i:(t[e]={},t[e][o]=i)}function Qv(t,e,o,i,r,n,p,s,a,h){var l=G(e).toString();l in t.wantedTiles||(t.wantedTiles[l]={});var u=t.wantedTiles[l];t=t.tileQueue;var c,y,f,g=o.minZoom;for(f=p;g<=f;--f){var d=re(o,n,f,d),v=o.Da(f);for(c=d.ca;c<=d.$;++c)for(y=d.da;y<=d.ia;++y)if(p-f<=s){var b=e.Nc(f,c,y,i,r);0==b.getState()&&(u[b.bb()]=!0,b.bb()in t.a||t.f([b,l,ne(o,b.ta),v])),a&&a.call(h,b)}else e.Ug(f,c,y,r)}}function tb(t){zv.call(this,t),this.fa=[1,0,0,1,0,0]}function eb(t,e,o){var i=e.pixelRatio,r=e.size[0]*i,n=e.size[1]*i,p=e.viewState.rotation,s=nt(o),a=pt(o),h=tt(o);o=Q(o),ep(e.coordinateToPixelTransform,s),ep(e.coordinateToPixelTransform,a),ep(e.coordinateToPixelTransform,h),ep(e.coordinateToPixelTransform,o),t.save(),vp(t,-p,r/2,n/2),t.beginPath(),t.moveTo(s[0]*i,s[1]*i),t.lineTo(a[0]*i,a[1]*i),t.lineTo(h[0]*i,h[1]*i),t.lineTo(o[0]*i,o[1]*i),t.clip(),vp(t,p,r/2,n/2)}function ob(t,e,o,i,r){var n=t.a;if(Ce(n,e)){var p=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,a=i.viewState.rotation;vp(o,-a,p/2,s/2),t=r||ib(t,i,0),n.b(new yp(e,new mp(o,i.pixelRatio,i.extent,t,i.viewState.rotation),i,o,null)),vp(o,a,p/2,s/2)}}function ib(t,e,o){var i=e.viewState,r=e.pixelRatio,n=r/i.resolution;return np(t.fa,r*e.size[0]/2,r*e.size[1]/2,n,-n,-i.rotation,-i.center[0]+o,-i.center[1])}function rb(t,e){return G(t)-G(e)}function nb(t,e){return(t=.5*t/e)*t}function pb(t,e,o,i,r,n){var p,s=!1;if(p=o.Y()){var a=p.Ye();2==a||3==a?p.Bj(r,n):(0==a&&p.load(),p.Nh(r,n),s=!0)}return(r=(0,o.Za)(e))&&(i=r.Vd(i),(0,sb[i.U()])(t,i,o,e)),s}s(zv,Le),zv.prototype.Ea=m,zv.prototype.Ue=Bi,zv.prototype.Nf=function(o,i,r){return function(e,t){return Pw(o,i,e,t,function(t){r[e]||(r[e]={}),r[e][t.ta.toString()]=t})}},zv.prototype.na=function(t){2===t.target.getState()&&Hv(this)},s(tb,zv),tb.prototype.u=function(t,e,o,i){if(this.Ea(t,e,0,Gi,this))return o.call(i,this.a,null)},tb.prototype.ef=function(t,e,o,i){ob(this,"postcompose",t,e,i)};var sb={Point:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.qc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(e.ga(),0,2,2,e,i))},LineString:function(t,e,o,i){var r=o.Ga();if(r){var n=t.b(o.Ba(),"LineString");n.Ma(null,r),n.mc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(yl(e),0,2,2,e,i))},Polygon:function(t,e,o,i){var r=o.Fa(),n=o.Ga();if(r||n){var p=t.b(o.Ba(),"Polygon");p.Ma(r,n),p.rc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(Mr(e),0,2,2,e,i))},MultiPoint:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.oc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=e.ga(),t.yc(o,0,o.length,e.qa(),e,i))},MultiLineString:function(t,e,o,i){var r=o.Ga();if(r){var n=t.b(o.Ba(),"LineString");n.Ma(null,r),n.nc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=gl(e),t.yc(o,0,o.length,2,e,i))},MultiPolygon:function(t,e,o,i){var r=o.Fa(),n=o.Ga();if(n||r){var p=t.b(o.Ba(),"Polygon");p.Ma(r,n),p.pc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=ml(e),t.yc(o,0,o.length,2,e,i))},GeometryCollection:function(t,e,o,i){var r,n=0;for(r=(e=e.a).length;na[2];)l=ib(this,t,l=h*++m),u.La(g,r,l,s,n),p-=h;l=ib(this,t,0)}vp(g,s,v/2,b/2),g!=o&&(ob(this,"render",g,t,l),o.drawImage(g.canvas,-y,-f),g.translate(-y,-f)),g.globalAlpha=d}c&&o.restore(),this.ef(o,t,e,l)},ab.prototype.Ea=function(t,e,o,i,r){if(this.f){var n=this.a,p={};return this.f.Ea(t,e.viewState.resolution,e.viewState.rotation,o,{},function(t){var e=G(t).toString();if(!(e in p))return p[e]=!0,i.call(r,t,n)})}},ab.prototype.D=function(){Hv(this)},ab.prototype.sd=function(t){function e(t){var e=t.Lc();if(e)var o=e.call(t,h);else(e=n.f)&&(o=e(t,h));if(o){if(o){if(e=!1,Array.isArray(o))for(var i=0,r=o.length;it.ad:r<=t.ad}return t.l?(r=e.coordinate,o=t.j.V(),t.g===Gb?i=t.a:t.g===Xb?(i=(i=t.a[0])[i.length-1],Fb(t,e)&&(r=t.l.slice())):i=(i=t.a)[i.length-1],i[0]=r[0],i[1]=r[1],t.Za(t.a,o),t.B&&t.B.V().ma(r),o instanceof Sr&&t.g!==Xb?(t.C||(t.C=new Fh(new cl(null))),r=o.Ch(0),(e=t.C.V()).ba(r.ja,r.ga())):t.I&&(e=t.C.V()).ma(t.I),Ub(t)):(e=e.coordinate.slice(),t.B?t.B.V().ma(e):(t.B=new Fh(new lr(e)),Ub(t))),!0}function Fb(t,e){var o=!1;if(t.j){var i=!1,r=[t.l];if(t.g===Bb?i=t.a.length>t.Sa:t.g===Xb&&(i=t.a[0].length>t.Sa,r=[t.a[0][0],t.a[0][t.a[0].length-2]]),i){i=e.map;for(var n=0,p=r.length;n=t.va&&(t.u?r.pop():o=!0),r.push(e.slice()),t.Za(r,i)}else t.g===Xb&&((r=t.a[0]).length>=t.va&&(t.u?r.pop():o=!0),r.push(e.slice()),o&&(t.l=r[0]),t.Za(t.a,i));Ub(t),o&&t.Pd()}function Ob(t){t.l=null;var e=t.j;return e&&(t.j=null,t.B=null,t.C=null,t.pa.ha().clear(!0)),e}function Ub(t){var e=[];t.j&&e.push(t.j),t.C&&e.push(t.C),t.B&&e.push(t.B),(t=t.pa.ha()).clear(!0),t.cd(e)}s(wb,Re),(t=wb.prototype).Ea=m,t.ya=function(){return this.j},t.xa=function(){return this.D},t.za=function(){return this.c},t.getState=function(){return this.na},t.sa=function(){this.s()},t.ua=function(t){this.j=xb(t),this.s()},s(Mb,wb),(t=Mb.prototype).yb=function(t){var e=G(t).toString();if(Ab(this,e,t)){Pb(this,e,t);var o=t.V();o?(e=o.G(),this.a&&this.a.Ca(e,t)):this.g[e]=t,this.b(new jb("addfeature",t))}this.s()},t.cd=function(t){Eb(this,t),this.s()},t.clear=function(t){if(t){for(var e in this.v)this.v[e].forEach(Se);this.f||(this.v={},this.o={},this.l={})}else if(this.a)for(var o in this.a.forEach(this.Ig,this),this.g)this.Ig(this.g[o]);this.f&&this.f.clear(),this.a&&this.a.clear(),this.R.clear(),this.g={},this.b(new jb("clear")),this.s()},t.sh=function(t,e){return this.a?this.a.forEach(t,e):this.f?this.f.forEach(t,e):void 0},t.$b=function(t,e,o){return this.a?ga(this.a,t,e,o):this.f?this.f.forEach(e,o):void 0},t.th=function(e,o,i){return this.$b(e,function(t){if(t.V().Xa(e)&&(t=o.call(i,t)))return t})},t.Ah=function(){return this.f},t.Xe=function(){if(this.f)var t=this.f.a;else this.a&&(t=ya(this.a),gt(this.g)||c(t,ft(this.g)));return t},t.zh=function(t){var e=[];return function(t,e,o){t.$b([e[0],e[1],e[0],e[1]],function(t){if(t.V().sb(e))return o.call(void 0,t)})}(this,t,function(t){e.push(t)}),e},t.Uf=function(t){return fa(this.a,t)},t.vh=function(t,e){var i=t[0],r=t[1],n=null,p=[NaN,NaN],s=1/0,a=[-1/0,-1/0,1/0,1/0],h=e||Gi;return ga(this.a,a,function(t){if(h(t)){var e=t.V(),o=s;(s=e.Kb(i,r,p,s))o&&(t.index+=r)})}function fm(t,e,o){Ee.call(this,t),this.features=e,this.mapBrowserEvent=o}function gm(t){if(Gr.call(this,{handleEvent:dm}),t=t||{},this.C=t.condition?t.condition:Hr,this.D=t.addCondition?t.addCondition:Bi,this.B=t.removeCondition?t.removeCondition:Bi,this.I=t.toggleCondition?t.toggleCondition:Jr,this.l=!!t.multi&&t.multi,this.o=t.filter?t.filter:Gi,this.j=t.hitTolerance?t.hitTolerance:0,this.g=new vb({source:new Mb({useSpatialIndex:!1,features:t.features,wrapX:t.wrapX}),style:t.style?t.style:function(){var e=Ih();return c(e.Polygon,e.LineString),c(e.GeometryCollection,e.LineString),function(t){return t.V()?e[t.V().U()]:null}}(),updateWhileAnimating:!0,updateWhileInteracting:!0}),t.layers)if("function"==typeof t.layers)t=t.layers;else{var e=t.layers;t=function(t){return d(e,t)}}else t=Gi;this.u=t,this.a={},me(t=this.g.ha().f,"add",this.Fn,this),me(t,"remove",this.Jn,this)}function dm(t){if(!this.C(t))return!0;var o=this.D(t),i=this.B(t),r=this.I(t),e=!o&&!i&&!r,n=t.map,p=this.g.ha().f,s=[],a=[];if(e){for(yt(this.a),n.we(t.pixel,function(t,e){if(this.o(t,e))return a.push(t),t=G(t),this.a[t]=e,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=p.dc()-1;0<=e;--e){n=p.item(e);var h=a.indexOf(n);-1e.v),g))return void(Math.abs(o[0]-r[0])<=Math.abs(o[1]-r[1])?(f=[(i[0]+r[0])/2,(i[1]+r[1])/2],y=e.a(f),u=[(n[0]+o[0])/2,(n[1]+o[1])/2],c=e.a(u),t(e,o,i,f,u,p,s,y,c,l-1),t(e,u,f,r,n,c,y,a,h,l-1)):(f=[(o[0]+i[0])/2,(o[1]+i[1])/2],y=e.a(f),u=[(r[0]+n[0])/2,(r[1]+n[1])/2],c=e.a(u),t(e,o,f,u,n,p,y,c,h,l-1),t(e,f,i,r,u,y,s,a,c,l-1)));if(f){if(!e.l)return;e.o=!0}e.c.push({source:[p,a,h],target:[o,r,n]}),e.c.push({source:[p,s,a],target:[o,i,r]})}}(this,t,e,i,o,r,s,a,h,10),this.o){var l=1/0;this.c.forEach(function(t){l=Math.min(l,t.source[0][0],t.source[1][0],t.source[2][0])}),this.c.forEach(function(t){if(Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-l>this.b/2){var e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]];e[0][0]-l>this.b/2&&(e[0][0]-=this.b),e[1][0]-l>this.b/2&&(e[1][0]-=this.b),e[2][0]-l>this.b/2&&(e[2][0]-=this.b),Math.max(e[0][0],e[1][0],e[2][0])-Math.min(e[0][0],e[1][0],e[2][0])r[0]||t[1]<0||t[1]>r[1])&&(this.f||(this.f=Je(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),t[0],t[1],1,1,0,0,1,1),0<(r=this.f.getImageData(0,0,1,1).data)[3]))return o.call(i,this.a,r)}},s(tw,zn),tw.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new Om(this):"webgl"===o&&(e=new Qm(t,this)),e},s(ew,Dm),ew.prototype.sd=function(t,e){var o=t.pixelRatio,i=t.size,r=(p=t.viewState).projection,n=p.resolution,p=p.center,s=this.a,a=s.ha(),h=a.i,l=a.Ta(r),u=l.tc(n,this.T),c=l.Da(u),y=Math.round(n/c)||1,f=t.extent;if(void 0!==e.extent&&(f=rt(f,e.extent)),ht(f))return!1;var g=ie(l,f,c),d=l.Pc(u),v=l.Da(u),b=F(l.gb(u),l.j);d=W(d[0]+g.ca*b[0]*v,d[1]+g.da*b[1]*v,d[0]+(g.$+1)*b[0]*v,d[1]+(g.ia+1)*b[1]*v,void 0),v=a.nb(o),(b={})[u]={};var m,w,x=this.Nf(a,r,b),S=this.l,M=this.va,P=!1;for(m=g.ca;m<=g.$;++m)for(w=g.da;w<=g.ia;++w){var A=a.Nc(u,m,w,o,r);3!=A.getState()||this.a.kd()||uv(A,2),ow(this,A)||(A=lv(A)),ow(this,A)?2==A.getState()&&(b[u][A.ta.toString()]=A,P||-1!=this.g.indexOf(A)||(P=!0)):ee(l,A.ta,x,M,S)||(A=oe(l,A.ta,M,S))&&x(u+1,A)}if(m=(m=t.viewHints)[0]||m[1],!(this.f&&16t.highWaterMark}function Mw(t){wb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.va=void 0!==t.opaque&&t.opaque,this.$a=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.a=new xw(t.cacheSize),this.o=[0,0],this.uc=""}function Pw(t,e,o,i,r){if(!(e=t.Wd(e)))return!1;for(var n,p,s=!0,a=i.ca;a<=i.$;++a)for(var h=i.da;h<=i.ia;++h)n=t.Sb(o,a,h),p=!1,e.b.hasOwnProperty(n)&&((p=2===(n=e.get(n)).getState())&&(p=!1!==r(n))),p||(s=!1);return s}function Aw(t,e){t.uc!==e&&(t.uc=e,t.s())}function Ew(t,e,o){var i=void 0!==o?o:t.c;if(o=t.Ta(i),t.u&&i.c){var r=e;e=r[0],t=ne(o,r),e=D(i=ue(i),t)?r:(r=st(i),t[0]+=r*Math.ceil((i[0]-t[0])/r),o.bg(t,e))}if(r=e[0],i=e[1],t=e[2],o.minZoom>r||r>o.maxZoom)o=!1;else{var n=o.G();o=!(o=n?re(o,n,r):o.a?o.a[r]:null)||y(o,i,t)}return o?e:null}function Tw(t,e){Ee.call(this,t),this.tile=e}function jw(t){Mw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.Fc?this.Fc.bind(this):mw,this.urls=null,t.urls?this.eb(t.urls):t.url&&this.jb(t.url),t.tileUrlFunction&&this.cb(t.tileUrlFunction)}function Cw(t){jw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction?t.tileLoadFunction:Iw,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=t.tileClass?t.tileClass:cv,this.g={},this.v={},this.Sa=t.reprojectionErrorThreshold,this.I=!1}function Lw(t,e,o,i,r,n,p){return r=(o=Ew(t,e=[e,o,i],n))?t.tileUrlFunction(o,r,n):void 0,(r=new t.tileClass(e,void 0!==r?0:4,void 0!==r?r:"",t.crossOrigin,t.tileLoadFunction)).key=p,me(r,"change",t.Li,t),r}function Rw(t,e,o,i,r,n){var p=t.Sb(e,o,i),s=t.uc;if(t.a.b.hasOwnProperty(p)){var a=t.a.get(p);if(a.key!=s){var h=a;if(a=Lw(t,e,o,i,r,n,s),0==h.getState()?a.i=h.i:a.i=h,a.i){e=a.i,o=a;do{if(2==e.getState()){e.i=null;break}1==e.getState()?o=e:0==e.getState()?o.i=e.i:o=e,e=o.i}while(e)}t.a.replace(p,a)}}else a=Lw(t,e,o,i,r,n,s),t.a.set(p,a);return a}function Iw(t,e){t.Y().src=e}function Nw(t){this.B=void 0!==t.hidpi&&t.hidpi,Cw.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Wt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0===t.wrapX||t.wrapX}),this.R=void 0!==t.culture?t.culture:"en-us",this.C=void 0!==t.maxZoom?t.maxZoom:-1,this.f=t.key,this.l=t.imagerySet,fw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+this.f,this.pa.bind(this),void 0,"jsonp")}(t=lw.prototype).sd=function(t,e){var o=this.a,i=o.i;return this.pa!=i&&(this.g.length=0,o=o.j,this.c||"vector"==o||(this.c=Je()),this.c&&"vector"==o&&(this.c=null)),this.pa=i,ew.prototype.sd.apply(this,arguments)},t.Of=function(t,e,o,i,r,n,p,s){var a=t,h=this.a,l=e.pixelRatio,u=e.viewState.projection,c=h.i,y=h.get(bb)||null,f=a.o;if(f.Nd||f.mf!=c||f.Kg!=y){for(var g=0,d=a.a.length;gTerms of Use'});function kw(t){var e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",o=void 0!==t.tileGrid?t.tileGrid:ae({extent:ue(e),maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});Cw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX})}function Dw(t){this.C=t.account,this.B=t.map||"",this.f=t.config||{},this.l={},kw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,state:"loading",wrapX:t.wrapX}),Ow(this)}function Ow(t){var e=JSON.stringify(t.f);if(t.l[e])Uw(t,t.l[e]);else{var o="https://"+t.C+".cartodb.com/api/v1/map";t.B&&(o+="/named/"+t.B);var i=new XMLHttpRequest;i.addEventListener("load",t.Dl.bind(t,e)),i.addEventListener("error",t.Cl.bind(t)),i.open("POST",o),i.setRequestHeader("Content-type","application/json"),i.send(JSON.stringify(t.f))}}function Uw(t,e){t.jb("https://"+e.cdn_url.https+"/"+t.C+"/api/v1/map/"+e.layergroupid+"/{z}/{x}/{y}.png")}function Gw(t){Mb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.features=[],this.geometryFunction=t.geometryFunction||function(t){return R((t=t.V())instanceof lr,10),t},this.source=t.source,this.source.J("change",Gw.prototype.sa,this)}function Bw(t){if(void 0!==t.resolution)for(var e=[1/(t.features.length=0),1/0,-1/0,-1/0],o=t.distance*t.resolution,i=t.source.Xe(),r={},n=0,p=i.length;n>=1}return i.join("")}(e))}})),i.imageryProviders){var a=zt(Wt("EPSG:4326"),this.c);(t=i.imageryProviders.map(function(t){var e=t.attribution,n={};return t.coverageAreas.forEach(function(t){var e,o=t.zoomMin,i=Math.min(t.zoomMax,p);for(t=ut([(t=t.bbox)[1],t[0],t[3],t[2]],a),e=o;e<=i;++e){var r=e.toString();o=re(s,t,e),r in n?n[r].push(o):n[r]=[o]}}),new ce({html:e,tileRanges:n})})).push(Fw),this.ua(t)}this.D=e,Sb(this,"ready")}},s(kw,Cw),s(Dw,kw),(t=Dw.prototype).Kk=function(){return this.f},t.tq=function(t){ct(this.f,t),Ow(this)},t.Xp=function(t){this.f=t||{},Ow(this)},t.Dl=function(t,e){if(!(e=e.target).status||200<=e.status&&e.status<300){try{var o=JSON.parse(e.responseText)}catch(t){return void Sb(this,"error")}Uw(this,o),this.l[t]=o,Sb(this,"ready")}else Sb(this,"error")},t.Cl=function(){Sb(this,"error")},s(Gw,Mb),(t=Gw.prototype).$n=function(){return this.distance},t.ao=function(){return this.source},t.Yd=function(t,e,o){this.source.Yd(t,e,o),e!==this.resolution&&(this.clear(),this.resolution=e,Bw(this),this.cd(this.features))},t.Yp=function(t){this.distance=t,this.sa()},t.sa=function(){this.clear(),Bw(this),this.cd(this.features),Mb.prototype.sa.call(this)},s(Ww,Zm),(t=Ww.prototype).co=function(){return this.v},t.Jc=function(t,e,o,i){if(void 0===this.f)return null;e=Km(this,e),o=this.T?o:1;var r=this.M;if(r&&this.I==this.i&&r.resolution==e&&r.a==o&&O(r.G(),t))return r;ct(r={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.v);var n=((t=t.slice())[0]+t[2])/2,p=(t[1]+t[3])/2;if(1!=this.B){var s=this.B*st(t)/2,a=this.B*it(t)/2;t[0]=n-s,t[1]=p-a,t[2]=n+s,t[3]=p+a}s=e/o,a=Math.ceil(st(t)/s);var h=Math.ceil(it(t)/s);return t[0]=n-s*a/2,t[2]=n+s*a/2,t[1]=p-s*h/2,t[3]=p+s*h/2,this.l[0]=a,this.l[1]=h,n=t,p=this.l,s=o,i=i.mb.split(":").pop(),r.SIZE=p[0]+","+p[1],r.BBOX=n.join(","),r.BBOXSR=i,r.IMAGESR=i,r.DPI=Math.round(90*s),(n=(i=this.f).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"))==i&&R(!1,50),r=Vw(n,r),this.M=new sv(t,e,o,this.j,r,this.R,this.g),this.I=this.i,me(this.M,"change",this.o,this),this.M},t.bo=function(){return this.g},t.eo=function(){return this.f},t.fo=function(t){this.M=null,this.g=t,this.s()},t.ho=function(t){t!=this.f&&(this.f=t,this.M=null,this.s())},t.io=function(t){ct(this.v,t),this.M=null,this.s()},s(Zw,Zm),(t=Zw.prototype).ko=function(){return this.g},t.Jc=function(t,e,o){if(e=Km(this,e),o=this.T?o:1,(r=this.M)&&this.B==this.i&&r.resolution==e&&r.a==o&&O(r.G(),t))return r;1!=this.v&<(t=t.slice(),this.v);var i=[st(t)/e*o,it(t)/e*o];if(void 0!==this.I){var r=this.I,n=et(t),p=this.pa,s=st(t),a=it(t),h=i[0],l=i[1],u=.0254/this.l;i={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(i[0]),SETDISPLAYHEIGHT:Math.round(i[1]),SETVIEWSCALE:h*aOpenStreetMap contributors.'});function $w(t){this.B=null,this.va=void 0!==t.operationType?t.operationType:"pixel",this.Sa=void 0!==t.threads?t.threads:1,this.g=function(t){for(var e=t.length,o=Array(e),i=0;ithis.fk;)this.Ed.shift().callback(null,null)},e.prototype.dh=function(){if(0===this.oe&&0Stamen Design, under CC BY 3.0.'}),_w],nx={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},px={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function sx(t){Cw.call(this,{attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.f=t.params||{},this.l=[1/0,1/0,-1/0,-1/0],Aw(this,ax(this))}function ax(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function hx(t){Mw.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}function lx(t,e,o){hv.call(this,t,2),this.c=e,this.Ia=o,this.a=null}function ux(t){if(this.f=null,Cw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:Wt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX}),t.url)if(t.jsonp)fw(t.url,this.og.bind(this),this.Ve.bind(this));else{var e=new XMLHttpRequest;e.addEventListener("load",this.Ao.bind(this)),e.addEventListener("error",this.zo.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.og(t.tileJSON):R(!1,51)}function cx(t){if(Mw.call(this,{projection:Wt("EPSG:3857"),state:"loading"}),this.v=void 0===t.preemptive||t.preemptive,this.l=mw,this.g=void 0,this.f=t.jsonp||!1,t.url)if(this.f)fw(t.url,this.pg.bind(this),this.We.bind(this));else{var e=new XMLHttpRequest;e.addEventListener("load",this.Eo.bind(this)),e.addEventListener("error",this.Do.bind(this)),e.open("GET",t.url),e.send()}else t.tileJSON?this.pg(t.tileJSON):R(!1,51)}function yx(t,e,o,i,r,n){hv.call(this,t,e),this.o=o,this.a=i,this.v=r,this.c=this.j=this.g=null,this.l=n}function fx(t){if(0==t.state)if(t.state=1,t.l)fw(t.o,t.Ji.bind(t),t.De.bind(t));else{var e=new XMLHttpRequest;e.addEventListener("load",t.Co.bind(t)),e.addEventListener("error",t.Bo.bind(t)),e.open("GET",t.o),e.send()}}function gx(t){var e=(t=t||{}).params||{};Cw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:!(!("TRANSPARENT"in e)||e.TRANSPARENT),projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.C=void 0!==t.gutter?t.gutter:0,this.f=e,this.l=!0,this.B=t.serverType,this.T=void 0===t.hidpi||t.hidpi,this.R="",vx(this),this.fa=[1/0,1/0,-1/0,-1/0],mx(this),Aw(this,bx(this))}function dx(t,e,o,i,r,n,p){var s=t.urls;if(s){if(p.WIDTH=o[0],p.HEIGHT=o[1],p[t.l?"CRS":"SRS"]=n.mb,"STYLES"in t.f||(p.STYLES=""),1!=r)switch(t.B){case"geoserver":o=90*r+.5|0,p.FORMAT_OPTIONS="FORMAT_OPTIONS"in p?p.FORMAT_OPTIONS+";dpi:"+o:"dpi:"+o;break;case"mapserver":p.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":p.DPI=90*r;break;default:R(!1,52)}return n=n.b,t.l&&"ne"==n.substr(0,2)&&(t=i[0],i[0]=i[1],i[1]=t,t=i[2],i[2]=i[3],i[3]=t),p.BBOX=i.join(","),Vw(1==s.length?s[0]:s[L((e[1]<>=1,i>>=1;break;default:R(!1,53)}n.push([1,1]),n.reverse();r=[1];var p=[0];for(i=1,o=n.length;i=e+this.b&&s.height>=o+this.b)return n={offsetX:s.x+this.b,offsetY:s.y+this.b,image:this.f},this.c[t]=n,i.call(r,this.i,s.x+this.b,s.y+this.b),t=p,e+=this.b,i=o+this.b,e=s.width-e>s.height-i?(o={x:s.x+e,y:s.y,width:s.width-e,height:s.height},{x:s.x,y:s.y+i,width:e,height:s.height-i}):(o={x:s.x+e,y:s.y,width:s.width-e,height:i},{x:s.x,y:s.y+i,width:s.width,height:s.height-i}),Nx(this,t,o,e),n}return null},Fx.prototype.add=function(t,e,o,i,r,n){return e+this.b>this.i||o+this.b>this.i?null:(i=kx(this,!1,t,e,o,i,n))?(t=kx(this,!0,t,e,o,r||m,n),{offsetX:i.offsetX,offsetY:i.offsetY,image:i.image,Zl:t.image}):null},h.prototype.code=h.prototype.code,i("ol.Attribution",ce),ce.prototype.getHTML=ce.prototype.i,i("ol.Collection",De),De.prototype.clear=De.prototype.clear,De.prototype.extend=De.prototype.fg,De.prototype.forEach=De.prototype.forEach,De.prototype.getArray=De.prototype.tm,De.prototype.item=De.prototype.item,De.prototype.getLength=De.prototype.dc,De.prototype.insertAt=De.prototype.He,De.prototype.pop=De.prototype.pop,De.prototype.push=De.prototype.push,De.prototype.remove=De.prototype.remove,De.prototype.removeAt=De.prototype.Hg,De.prototype.setAt=De.prototype.Wp,Be.prototype.element=Be.prototype.element,i("ol.color.asArray",We),i("ol.color.asString",Ze),i("ol.colorlike.asColorLike",qe),i("ol.control.defaults",lo),i("ol.coordinate.add",ji),i("ol.coordinate.createStringXY",function(e){return function(t){return Ui(t,e)}}),i("ol.coordinate.format",Ri),i("ol.coordinate.rotate",Ni),i("ol.coordinate.toStringHDMS",function(t,e){return t?Li("NS",t[1],e)+" "+Li("EW",t[0],e):""}),i("ol.coordinate.toStringXY",Ui),i("ol.DeviceOrientation",vh),vh.prototype.getAlpha=vh.prototype.Fk,vh.prototype.getBeta=vh.prototype.Ik,vh.prototype.getGamma=vh.prototype.Ok,vh.prototype.getHeading=vh.prototype.um,vh.prototype.getTracking=vh.prototype.Th,vh.prototype.setTracking=vh.prototype.gg,i("ol.easing.easeIn",io),i("ol.easing.easeOut",ro),i("ol.easing.inAndOut",no),i("ol.easing.linear",po),i("ol.easing.upAndDown",function(t){return t<.5?no(2*t):1-no(2*(t-.5))}),i("ol.extent.boundingExtent",E),i("ol.extent.buffer",T),i("ol.extent.containsCoordinate",D),i("ol.extent.containsExtent",O),i("ol.extent.containsXY",B),i("ol.extent.createEmpty",V),i("ol.extent.equals",Y),i("ol.extent.extend",H),i("ol.extent.getArea",$),i("ol.extent.getBottomLeft",Q),i("ol.extent.getBottomRight",tt),i("ol.extent.getCenter",et),i("ol.extent.getHeight",it),i("ol.extent.getIntersection",rt),i("ol.extent.getSize",function(t){return[t[2]-t[0],t[3]-t[1]]}),i("ol.extent.getTopLeft",nt),i("ol.extent.getTopRight",pt),i("ol.extent.getWidth",st),i("ol.extent.intersects",at),i("ol.extent.isEmpty",ht),i("ol.extent.applyTransform",ut),i("ol.Feature",Fh),Fh.prototype.clone=Fh.prototype.clone,Fh.prototype.getGeometry=Fh.prototype.V,Fh.prototype.getId=Fh.prototype.wm,Fh.prototype.getGeometryName=Fh.prototype.Qk,Fh.prototype.getStyle=Fh.prototype.xm,Fh.prototype.getStyleFunction=Fh.prototype.Lc,Fh.prototype.setGeometry=Fh.prototype.Ra,Fh.prototype.setStyle=Fh.prototype.hg,Fh.prototype.setId=Fh.prototype.jc,Fh.prototype.setGeometryName=Fh.prototype.Tc,i("ol.featureloader.xhr",il),i("ol.Geolocation",_d),_d.prototype.getAccuracy=_d.prototype.Dk,_d.prototype.getAccuracyGeometry=_d.prototype.Ek,_d.prototype.getAltitude=_d.prototype.Gk,_d.prototype.getAltitudeAccuracy=_d.prototype.Hk,_d.prototype.getHeading=_d.prototype.ym,_d.prototype.getPosition=_d.prototype.zm,_d.prototype.getProjection=_d.prototype.Uh,_d.prototype.getSpeed=_d.prototype.ll,_d.prototype.getTracking=_d.prototype.Vh,_d.prototype.getTrackingOptions=_d.prototype.Gh,_d.prototype.setProjection=_d.prototype.Wh,_d.prototype.setTracking=_d.prototype.Ke,_d.prototype.setTrackingOptions=_d.prototype.wj,i("ol.Graticule",ev),ev.prototype.getMap=ev.prototype.Cm,ev.prototype.getMeridians=ev.prototype.al,ev.prototype.getParallels=ev.prototype.hl,ev.prototype.setMap=ev.prototype.setMap,i("ol.has.DEVICE_PIXEL_RATIO",Fo),i("ol.has.CANVAS",Do),i("ol.has.DEVICE_ORIENTATION",Oo),i("ol.has.GEOLOCATION",Uo),i("ol.has.TOUCH",Go),i("ol.has.WEBGL",To),sv.prototype.getImage=sv.prototype.Y,sv.prototype.load=sv.prototype.load,cv.prototype.getImage=cv.prototype.Y,i("ol.inherits",s),i("ol.interaction.defaults",Xn),i("ol.Kinetic",Or),i("ol.loadingstrategy.all",mb),i("ol.loadingstrategy.bbox",function(t){return[t]}),i("ol.loadingstrategy.tile",function(i){return function(t,e){e=i.tc(e),t=re(i,t,e);var o=[];for((e=[e,0,0])[1]=t.ca;e[1]<=t.$;++e[1])for(e[2]=t.da;e[2]<=t.ia;++e[2])o.push(i.Aa(e));return o}}),i("ol.Map",Ka),Ka.prototype.addControl=Ka.prototype.kk,Ka.prototype.addInteraction=Ka.prototype.lk,Ka.prototype.addLayer=Ka.prototype.ih,Ka.prototype.addOverlay=Ka.prototype.jh,Ka.prototype.forEachFeatureAtPixel=Ka.prototype.we,Ka.prototype.forEachLayerAtPixel=Ka.prototype.Im,Ka.prototype.hasFeatureAtPixel=Ka.prototype.Yl,Ka.prototype.getEventCoordinate=Ka.prototype.Tf,Ka.prototype.getEventPixel=Ka.prototype.xe,Ka.prototype.getTarget=Ka.prototype.ag,Ka.prototype.getTargetElement=Ka.prototype.jd,Ka.prototype.getCoordinateFromPixel=Ka.prototype.Wa,Ka.prototype.getControls=Ka.prototype.Lk,Ka.prototype.getOverlays=Ka.prototype.fl,Ka.prototype.getOverlayById=Ka.prototype.el,Ka.prototype.getInteractions=Ka.prototype.Sk,Ka.prototype.getLayerGroup=Ka.prototype.Kc,Ka.prototype.getLayers=Ka.prototype.Xh,Ka.prototype.getPixelFromCoordinate=Ka.prototype.Ja,Ka.prototype.getSize=Ka.prototype.Ob,Ka.prototype.getView=Ka.prototype.Z,Ka.prototype.getViewport=Ka.prototype.sl,Ka.prototype.renderSync=Ka.prototype.Tp,Ka.prototype.render=Ka.prototype.render,Ka.prototype.removeControl=Ka.prototype.Mp,Ka.prototype.removeInteraction=Ka.prototype.Np,Ka.prototype.removeLayer=Ka.prototype.Pp,Ka.prototype.removeOverlay=Ka.prototype.Qp,Ka.prototype.setLayerGroup=Ka.prototype.qj,Ka.prototype.setSize=Ka.prototype.Qg,Ka.prototype.setTarget=Ka.prototype.Le,Ka.prototype.setView=Ka.prototype.iq,Ka.prototype.updateSize=Ka.prototype.Ad,Po.prototype.originalEvent=Po.prototype.originalEvent,Po.prototype.pixel=Po.prototype.pixel,Po.prototype.coordinate=Po.prototype.coordinate,Po.prototype.dragging=Po.prototype.dragging,Mo.prototype.map=Mo.prototype.map,Mo.prototype.frameState=Mo.prototype.frameState,i("ol.Object",Re),Re.prototype.get=Re.prototype.get,Re.prototype.getKeys=Re.prototype.O,Re.prototype.getProperties=Re.prototype.N,Re.prototype.set=Re.prototype.set,Re.prototype.setProperties=Re.prototype.H,Re.prototype.unset=Re.prototype.P,ke.prototype.key=ke.prototype.key,ke.prototype.oldValue=ke.prototype.oldValue,i("ol.Observable",Le),i("ol.Observable.unByKey",function(t){if(Array.isArray(t))for(var e=0,o=t.length;e>>0,r=0;r=e.ca&&t.da<=e.ia&&t.ia>=e.da}function x(t,e,o){return Math.min(Math.max(t,e),o)}e(a,Error);var i="cosh"in Math?Math.cosh:function(t){return((t=Math.exp(t))+1/t)/2};function S(t,e,o,i,r,n){var s,a=r-o,p=n-i;return(a||p)&&(1<(s=((t-o)*a+(e-i)*p)/(a*a+p*p))?(o=r,i=n):0t[2]&&(t[2]=e[2]),e[1]t[3]&&(t[3]=e[3]),t}function z(t,e){e[0]t[2]&&(t[2]=e[0]),e[1]t[3]&&(t[3]=e[1])}function Y(t,e,o,i,r){for(;oe[0]?t:e)[0],o[1]=(t[1]>e[1]?t:e)[1],o[2]=(t[2]=e[0]&&t[1]<=e[3]&&t[3]>=e[1]}function st(t){return t[2]=t.minZoom;){if(o.call(null,e,ee(t,r,e,i)))return!0;--e}return!1}function Qt(t,e,o,i){return e[0]T.$)&&(C(E,new B(L(M.ca,j),L(M.$,j),M.da,M.ia))||M.$-M.ca+1>j&&C(E,T))){m=!0;break t}}m=!1}else m=!0}else m=!1;m?(b in l&&delete l[b],(m=v.b)in u||(u[m]=!0,h[b]=v)):l[b]=v}}}for(r in f=(a=[h,l])[0],a=a[1],this.l)r in f?(this.j[r]||(this.l[r].style.display="",this.j[r]=!0),delete f[r]):r in a?(this.j[r]&&(this.l[r].style.display="none",delete this.j[r]),delete a[r]):(qe(this.l[r]),delete this.l[r],delete this.j[r]);for(r in f)g=document.createElement("LI"),g.innerHTML=f[r].b,this.I.appendChild(g),this.l[r]=g,this.j[r]=!0;for(r in a)g=document.createElement("LI"),g.innerHTML=a[r].b,g.style.display="none",this.I.appendChild(g),this.l[r]=g;for(s in r=!ct(this.j)||!ct(t.logos),this.B!=r&&(this.element.style.display=r?"":"none",this.B=r),r&&ct(this.j)?this.element.classList.add("ol-logo-only"):this.element.classList.remove("ol-logo-only"),t=t.logos,r=this.T)s in t||(qe(r[s]),delete r[s]);for(n in t)(a=t[n])instanceof HTMLElement&&(this.u.appendChild(a),r[n]=a),n in r||((s=new Image).src=n,""===a?f=s:((f=document.createElement("a")).href=a,f.appendChild(s)),this.u.appendChild(f),r[n]=f);this.u.style.display=ct(t)?"none":""}else this.B&&(this.element.style.display="none",this.B=!1)}function Qe(t){t.element.classList.toggle("ol-collapsed"),t.c?He(t.D,t.C):He(t.C,t.D),t.c=!t.c}function to(t){return Math.pow(t,3)}function eo(t){return 1-to(1-t)}function oo(t){return 3*t*t-2*t*t*t}function io(t){return t}function ro(t){var e=void 0!==(t=t||{}).className?t.className:"ol-rotate",o=void 0!==t.label?t.label:"⇧";this.c=null,"string"==typeof o?(this.c=document.createElement("span"),this.c.className="ol-compass",this.c.textContent=o):(this.c=o,this.c.classList.add("ol-compass"));var i=t.tipLabel||"Reset rotation";(o=document.createElement("button")).className=e+"-reset",o.setAttribute("type","button"),o.title=i,o.appendChild(this.c),de(o,"click",ro.prototype.D,this),(i=document.createElement("div")).className=e+" ol-unselectable ol-control",i.appendChild(o),e=t.render||no,this.o=t.resetNorth||void 0,Je.call(this,{element:i,render:e,target:t.target}),this.l=void 0!==t.duration?t.duration:250,this.j=void 0===t.autoHide||t.autoHide,this.u=void 0,this.j&&this.element.classList.add("ol-hidden")}function no(t){var e,o;(t=t.frameState)&&((t=t.viewState.rotation)!=this.u&&(e="rotate("+t+"rad)",this.j&&((o=this.element.classList.contains("ol-hidden"))||t?o&&t&&this.element.classList.remove("ol-hidden"):this.element.classList.add("ol-hidden")),this.c.style.msTransform=e,this.c.style.webkitTransform=e,this.c.style.transform=e),this.u=t)}function so(t){var e=void 0!==(t=t||{}).className?t.className:"ol-zoom",o=void 0!==t.delta?t.delta:1,i=void 0!==t.zoomInLabel?t.zoomInLabel:"+",r=void 0!==t.zoomOutLabel?t.zoomOutLabel:"−",n=void 0!==t.zoomInTipLabel?t.zoomInTipLabel:"Zoom in",s=void 0!==t.zoomOutTipLabel?t.zoomOutTipLabel:"Zoom out",a=document.createElement("button");a.className=e+"-in",a.setAttribute("type","button"),a.title=n,a.appendChild("string"==typeof i?document.createTextNode(i):i),de(a,"click",so.prototype.j.bind(this,o)),(i=document.createElement("button")).className=e+"-out",i.setAttribute("type","button"),i.title=s,i.appendChild("string"==typeof r?document.createTextNode(r):r),de(i,"click",so.prototype.j.bind(this,-o)),(o=document.createElement("div")).className=e+" ol-unselectable ol-control",o.appendChild(a),o.appendChild(i),Je.call(this,{element:o,target:t.target}),this.c=void 0!==t.duration?t.duration:250}function ao(t){t=t||{};var e=new Ne;return void 0!==t.zoom&&!t.zoom||e.push(new so(t.zoomOptions)),void 0!==t.rotate&&!t.rotate||e.push(new ro(t.rotateOptions)),void 0!==t.attribution&&!t.attribution||e.push(new _e(t.attributionOptions)),e}function po(t){t=t||{},this.c=void 0!==t.className?t.className:"ol-full-screen";var e=void 0!==t.label?t.label:"⤢";this.o="string"==typeof e?document.createTextNode(e):e,e=void 0!==t.labelActive?t.labelActive:"×",this.l="string"==typeof e?document.createTextNode(e):e;var o=t.tipLabel||"Toggle full-screen";(e=document.createElement("button")).className=this.c+"-"+lo(),e.setAttribute("type","button"),e.title=o,e.appendChild(this.o),de(e,"click",this.C,this),(o=document.createElement("div")).className=this.c+" ol-unselectable ol-control "+(ho()?"":"ol-unsupported"),o.appendChild(e),Je.call(this,{element:o,target:t.target}),this.D=void 0!==t.keys&&t.keys,this.j=t.source}function ho(){var t=document.body;return t.webkitRequestFullscreen||t.mozRequestFullScreen&&document.mozFullScreenEnabled||t.msRequestFullscreen&&document.msFullscreenEnabled||t.requestFullscreen&&document.fullscreenEnabled}function lo(){return!!(document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement||document.fullscreenElement)}function uo(t){t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.webkitRequestFullscreen&&t.webkitRequestFullscreen()}e(Je,je),Je.prototype.ka=function(){qe(this.element),je.prototype.ka.call(this)},Je.prototype.g=function(){return this.a},Je.prototype.setMap=function(t){this.a&&qe(this.element);for(var e=0,o=this.v.length;e=e.length){for(var r=[],n=0;nt.D||Math.abs(e.clientY-t.c.clientY)>t.D}function di(t,e){this.l=t,this.c=e,this.b=[],this.i=[],this.a={}}function vi(t){var e=t.b,o=t.i,i=e[0];return 1==e.length?(e.length=0,o.length=0):(e[0]=e.pop(),o[0]=o.pop(),bi(t,0)),e=t.c(i),delete t.a[e],i}function bi(t,e){for(var o=t.b,i=t.i,r=o.length,n=o[e],s=i[e],a=e;e>1;){var p=2*e+1,h=2*e+2,p=h>1;if(!(t[s]>n))break;i[o]=i[s],t[o]=t[s],o=s}i[o]=r,t[o]=n}function wi(t){for(var e=t.l,o=t.b,i=t.i,r=0,n=o.length,s=0;s>1)-1;0<=e;e--)bi(t,e)}function xi(e,t){di.call(this,function(t){return e.apply(null,t)},function(t){return t[0].bb()}),this.v=t,this.j=0,this.g={}}function Si(t,e,o){for(var i,r,n=0;t.j=l[0]&&r[2]<=l[2]||r[1]>=l[1]&&r[3]<=l[3])||fr(t,e,o,i,function(t,e){var o,i,r,n,s,a=!1,p=R(l,t),h=R(l,e);return 1===p||1===h?a=!0:(o=l[0],i=l[1],r=l[2],n=l[3],s=e[0],t=((e=e[1])-t[1])/(s-t[0]),(a=!(a=!(a=2&h&&!(2&p)?o<=(a=s-(e-n)/t)&&a<=r:a)&&4&h&&!(4&p)?i<=(a=e-(s-r)*t)&&a<=n:a)&&8&h&&!(8&p)?o<=(a=s-(e-i)/t)&&a<=r:a)||!(16&h)||16&p||(a=i<=(a=e-(s-o)*t)&&a<=n)),a}))}function gr(t,e,o,i,r){var n=o[0];if(!(yr(t,e,n,i,r)||lr(t,e,n,i,r[0],r[1])||lr(t,e,n,i,r[0],r[3])||lr(t,e,n,i,r[2],r[1])||lr(t,e,n,i,r[2],r[3])))return!1;if(1===o.length)return!0;for(e=1,n=o.length;ee;)i-=3;if(!((e=t.b[2+o]-t.b[i+2])<1e3/60)){var r=t.b[o]-t.b[i],o=t.b[1+o]-t.b[i+1];return t.i=Math.atan2(o,r),t.a=Math.sqrt(r*r+o*o)/e,t.a>t.c}}}}(this.a)&&(e=((e=this.a).c-e.a)/e.f,o=this.a.i,i=t.wa(),i=r.Ja(i),r=r.Wa([i[0]-e*Math.cos(o),i[1]-e*Math.sin(o)]),t.animate({center:t.Ec(r),duration:500,easing:eo})),Fr(t,1,-1),!1)}function nn(t){if(0=this.u}function gn(t){var e,o;Jr(t)&&(e=this.a,o=t.pixel,e.c=this.g,e.i=o,cn(e),un(e),this.b(new xn(mn,t.coordinate,t)))}function dn(t){return!Jr(t)||(this.a.setMap(null),this.l(t,this.g,t.pixel)&&(this.j(t),this.b(new xn(wn,t.coordinate,t))),!1)}function vn(t){if(Jr(t)&&Zr(t)&&this.C(t)){this.g=t.pixel,this.a.setMap(t.map);var e=this.a,o=this.g;return e.c=this.g,e.i=o,cn(e),un(e),this.b(new xn(bn,t.coordinate,t)),!0}return!1}e(fi,Ae),(Au=fi.prototype).Jh=function(t){yi(this,t);var e,o=new Ko("pointerup",this.i,t);this.b(o),this.o||t.button||(e=(o=this).c,t=new Ko("click",o.i,e),o.b(t),o.j?(clearTimeout(o.j),o.j=0,t=new Ko("dblclick",o.i,e),o.b(t)):o.j=setTimeout(function(){this.j=0;var t=new Ko("singleclick",this.i,e);this.b(t)}.bind(o),250)),this.S||(this.f.forEach(me),this.f.length=0,this.o=!1,this.c=null,Se(this.a),this.a=null)},Au.Ol=function(t){yi(this,t);var e=new Ko("pointerdown",this.i,t);this.b(e),this.c=t,this.f.length||(this.a=new ri(document),this.f.push(de(this.a,"pointermove",this.Hm,this),de(this.a,"pointerup",this.Jh,this),de(this.g,"pointercancel",this.Jh,this)))},Au.Hm=function(t){var e;gi(this,t)&&(this.o=!0,e=new Ko("pointerdrag",this.i,t,this.o),this.b(e)),t.preventDefault()},Au.Lp=function(t){this.b(new Ko(t.type,this.i,t,!(!this.c||!gi(this,t))))},Au.ka=function(){this.v&&(me(this.v),this.v=null),this.l&&(me(this.l),this.l=null),this.f.forEach(me),this.f.length=0,this.a&&(Se(this.a),this.a=null),this.g&&(Se(this.g),this.g=null),Ae.prototype.ka.call(this)},di.prototype.clear=function(){this.b.length=0,this.i.length=0,lt(this.a)},di.prototype.f=function(t){O(!(this.c(t)in this.a),31);var e=this.l(t);return 1/0!=e&&(this.b.push(t),this.i.push(e),this.a[this.c(t)]=!0,mi(this,0,this.b.length-1),!0)},e(xi,di),xi.prototype.f=function(t){var e=di.prototype.f.call(this,t);return e&&de(t[0],"change",this.o,this),e},xi.prototype.o=function(t){var e=(t=t.target).getState();2!==e&&3!==e&&4!==e&&5!==e||(be(t,"change",this.o,this),(t=t.bb())in this.g&&(delete this.g[t],--this.j),this.v())},e(Bi,je),(Au=Bi.prototype).Ab=function(t,e){return e=e||[NaN,NaN],this.Kb(t[0],t[1],e,1/0),e},Au.sb=function(t){return this.Mc(t[0],t[1])},Au.Mc=Gi,Au.G=function(t){this.v!=this.i&&(this.l=this.se(this.l),this.v=this.i);var e=this.l;return t?(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3]):t=e,t},Au.Rb=function(t){return this.Vd(t*t)},Au.tb=function(t,e){return this.Dc(Vt(t,e)),this},e(Wi,Bi),(Au=Wi.prototype).Mc=Gi,Au.se=function(t){return W(this.A,0,this.A.length,this.a,t)},Au.ac=function(){return this.A.slice(0,this.a)},Au.ga=function(){return this.A},Au.bc=function(){return this.A.slice(this.A.length-this.a)},Au.cc=function(){return this.ja},Au.Vd=function(t){if(this.o!=this.i&&(lt(this.f),this.g=0,this.o=this.i),t<0||this.g&&t<=this.g)return this;var e=t.toString();if(this.f.hasOwnProperty(e))return this.f[e];var o=this.hd(t);return o.ga().length=this.f&&t<=this.a){var e=this.l||0;if(this.j){if(e+=i=v(this.j,t,1),i==this.j.length-1)return e;var o=this.j[i],i=o/this.j[i+1]}else o=this.a,i=this.C;e+=Math.log(o/t)/Math.log(i)}return e},Au.Qf=function(t,e){var o=(o=(e=e||{}).size)||Rr(this);t instanceof Wi?"Circle"===t.U()?(f=Mr(t=t.G())).rotate(this.Qa(),$(t)):f=t:(O(Array.isArray(t),24),O(!st(t),25),f=Mr(t));var i=e.padding||[0,0,0,0],r=void 0===e.constrainResolution||e.constrainResolution,n=void 0!==e.nearest&&e.nearest,s=void 0!==e.minResolution?e.minResolution:void 0!==e.maxZoom?this.constrainResolution(this.a,e.maxZoom-this.l,0):0,a=f.ga(),p=this.Qa();t=Math.cos(-p);for(var p=Math.sin(-p),h=1/0,l=1/0,u=-1/0,c=-1/0,f=f.qa(),y=0,g=a.length;ythis.C&&(this.a=!0)),this.j=i,(i=(t=t.map).Z()).g.rotation!==Mi&&(r=t.a.getBoundingClientRect(),(e=Qr(this.o))[0]-=r.left,e[1]-=r.top,this.g=t.Wa(e),this.a&&(r=i.Qa(),t.render(),Ur(i,r+o,this.g)))}function Nn(t){var e,o,i;return!(this.o.length<2)||(Fr(t=t.map.Z(),1,-1),this.a&&(i=t.Qa(),e=this.g,o=this.u,i=t.constrainRotation(i,0),Ur(t,i,e,o)),!1)}function Fn(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.j=void 0,this.a=!1,this.l=0,this.D||Fr(t.Z(),1,1),!0)}function kn(t){$r.call(this,{handleDownEvent:Un,handleDragEvent:Dn,handleUpEvent:On}),t=t||{},this.l=t.constrainResolution||!1,this.g=null,this.u=void 0!==t.duration?t.duration:400,this.a=void 0,this.j=1}function Dn(t){var e=1,o=this.o[0],i=this.o[1],r=o.clientX-i.clientX,o=o.clientY-i.clientY,r=Math.sqrt(r*r+o*o);void 0!==this.a&&(e=this.a/r),this.a=r;var i=(r=(t=t.map).Z()).Pa(),n=r.a,s=r.f;n<(o=i*e)?(e=n/i,o=n):ot.a)&&(e=this.g,o=this.u,i=t.constrainResolution(i,0,this.j-1),Br(t,i,e,o)),!1}return!0}function Un(t){return 2<=this.o.length&&(t=t.map,this.g=null,this.a=void 0,this.j=1,this.D||Fr(t.Z(),1,1),!0)}function Gn(t){t=t||{};var e=new Ne,o=new kr(-.005,.05,100);return void 0!==t.altShiftDragRotate&&!t.altShiftDragRotate||e.push(new sn),void 0!==t.doubleClickZoom&&!t.doubleClickZoom||e.push(new Xr({delta:t.zoomDelta,duration:t.zoomDuration})),void 0!==t.dragPan&&!t.dragPan||e.push(new en({kinetic:o})),void 0!==t.pinchRotate&&!t.pinchRotate||e.push(new Rn),void 0!==t.pinchZoom&&!t.pinchZoom||e.push(new kn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.keyboard&&!t.keyboard||(e.push(new Mn),e.push(new An({delta:t.zoomDelta,duration:t.zoomDuration}))),void 0!==t.mouseWheelZoom&&!t.mouseWheelZoom||e.push(new Tn({constrainResolution:t.constrainResolution,duration:t.zoomDuration})),void 0!==t.shiftDragZoom&&!t.shiftDragZoom||e.push(new Sn({duration:t.zoomDuration})),e}function Bn(t){je.call(this);var e=ht({},t);e.opacity=void 0!==t.opacity?t.opacity:1,e.visible=void 0===t.visible||t.visible,e.zIndex=void 0!==t.zIndex?t.zIndex:0,e.maxResolution=void 0!==t.maxResolution?t.maxResolution:1/0,e.minResolution=void 0!==t.minResolution?t.minResolution:0,this.H(e),this.a={layer:this,Je:!0}}function Xn(t){return t.a.opacity=x(t.hc(),0,1),t.a.yj=t.$f(),t.a.visible=t.Mb(),t.a.extent=t.G(),t.a.zIndex=t.Ba(),t.a.maxResolution=t.fc(),t.a.minResolution=Math.max(t.gc(),0),t.a}function Vn(t){var e=t||{};delete(t=ht({},e)).layers,e=e.layers,Bn.call(this,t),this.f=[],this.c={},de(this,Le(Wn),this.Hl,this),e?Array.isArray(e)?e=new Ne(e.slice(),{unique:!0}):O(e instanceof Ne,43):e=new Ne(void 0,{unique:!0}),this.xi(e)}e(Rn,$r),Rn.prototype.Xc=Gi,e(kn,$r),kn.prototype.Xc=Gi,e(Bn,je),(Au=Bn.prototype).G=function(){return this.get("extent")},Au.fc=function(){return this.get("maxResolution")},Au.gc=function(){return this.get("minResolution")},Au.hc=function(){return this.get("opacity")},Au.Mb=function(){return this.get("visible")},Au.Ba=function(){return this.get("zIndex")},Au.vc=function(t){this.set("extent",t)},Au.Ac=function(t){this.set("maxResolution",t)},Au.Bc=function(t){this.set("minResolution",t)},Au.wc=function(t){this.set("opacity",t)},Au.xc=function(t){this.set("visible",t)},Au.Vb=function(t){this.set("zIndex",t)},e(Vn,Bn),(Au=Vn.prototype).Fd=function(){},Au.Fe=function(){this.Mb()&&this.s()},Au.Hl=function(){this.f.forEach(me),this.f.length=0;var t=this.qd();for(e in this.f.push(de(t,"add",this.Gl,this),de(t,"remove",this.Il,this)),this.c)this.c[e].forEach(me);lt(this.c);for(var e=0,o=(t=t.a).length;e=t.minResolution&&eu[2])&&(c=[y+h*Math.ceil((u[0]-y)/h),t[1]])),h=(u=r.layerStatesArray).length-1;0<=h;--h){var f=u[h],y=f.layer;if(Kn(f,l)&&o.call(i,y)&&(f=hs(this,y),p=y.ha()?f.Ea(y.ha().u?c:t,r,e,a,s):p))return p}},Au.Ei=function(t,e,o,i,r){return void 0!==this.Ea(t,e,o,Ui,this,i,r)},Au.Fl=function(){this.o.render()},Au.Jg=w,Au.Rp=function(t,e){for(var o in this.c)e&&o in e.layerStates||(t=o,o=this.c[t],delete this.c[t],me(this.v[t]),delete this.v[t],Se(o))},e(cs,Me);var fs=[0,0,0,1],ys=[],gs=[0,0,0,1];function ds(t,e,o,i){e&&(t.translate(o,i),t.rotate(e),t.translate(-o,-i))}function vs(){}function bs(t,e,o,i,r){this.i=t,this.u=e,this.c=o,this.S=i,this.Yb=r,this.M=this.b=this.a=this.Ua=this.R=this.I=null,this.na=this.T=this.l=this.B=this.C=this.D=0,this.fa=!1,this.f=this.fb=0,this.pa=!1,this.oa=0,this.Ia="",this.va=this.Jb=0,this.Sa=!1,this.j=this.$a=0,this.ra=this.o=this.g=null,this.v=[],this.xb=qn()}function ms(t,e,o){if(t.M){e=Xi(e,0,o,2,t.S,t.v),o=t.i;var i=t.xb,r=o.globalAlpha;1!=t.l&&(o.globalAlpha=r*t.l);var n=t.fb;t.fa&&(n+=t.Yb);for(var s=0,a=e.length;s=a;){var p=this.i[s];o[G(this.f[s]).toString()]&&(i!==n&&Bs(t,e,i,n),n=p),s--,i=p}i!==n&&Bs(t,e,i,n),i=n=a}},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.u.length-1;0<=p;--p){var h=this.j[p];for(t.uniform4fv(this.v.B,h[0]),qs(this,t,h[1],h[2]),n=this.u[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}}},Au.Ma=function(t,e){var o;e=e?(o=e.i,this.c.lineDash=o||Vs,o=e.g,this.c.lineDashOffset=o||0,o=!((o=e.a)instanceof CanvasGradient||o instanceof CanvasPattern)&&Be(o).map(function(t,e){return 3!=e?t/255:t})||Ws,void 0!==(e=e.c)?e:1):(o=[0,0,0,0],0),t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Xs,this.c.strokeColor&&U(this.c.strokeColor,o)&&this.c.fillColor&&U(this.c.fillColor,t)&&this.c.lineWidth===e||(this.c.s=!0,this.c.fillColor=t,this.c.strokeColor=o,this.c.lineWidth=e,this.j.push([t,o,e]))},e(Js,Ls);var _s=new Js;function $s(){this.b="varying vec2 a;varying float b;attribute vec2 c;attribute vec2 d;attribute vec2 e;attribute float f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;void main(void){mat4 offsetMatrix=i;if(g==1.0){offsetMatrix=i*j;}vec4 offsets=offsetMatrix*vec4(e,0.0,0.0);gl_Position=h*vec4(c,0.0,1.0)+offsets;a=d;b=f;}"}e($s,Rs);var Qs=new $s;function ta(t,e){this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"k"),this.i=t.getUniformLocation(e,"h"),this.v=t.getAttribLocation(e,"e"),this.u=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"c"),this.D=t.getAttribLocation(e,"g"),this.C=t.getAttribLocation(e,"d")}function ea(t,e){this.j=t,this.b=e,this.a={},this.c={},this.i={},this.l=this.v=this.f=this.o=null,(this.g=d(Vo,"OES_element_index_uint"))&&e.getExtension("OES_element_index_uint"),de(this.j,"webglcontextlost",this.Xo,this),de(this.j,"webglcontextrestored",this.Yo,this)}function oa(t,e,o){var i,r,n=t.b,s=o.b,a=String(G(o));a in t.a?n.bindBuffer(e,t.a[a].buffer):(i=n.createBuffer(),n.bindBuffer(e,i),34962==e?r=new Float32Array(s):34963==e&&(r=new(t.g?Uint32Array:Uint16Array)(s)),n.bufferData(e,r,o.a),t.a[a]={lc:o,buffer:i})}function ia(t,e){var o=t.b;e=String(G(e));var i=t.a[e];o.isContextLost()||o.deleteBuffer(i.buffer),delete t.a[e]}function ra(t){var e,o,i,r;return t.f||(o=(e=t.b).createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,o),i=pa(e,1,1),r=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,r),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_COMPONENT16,1,1),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,i,0),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,r),e.bindTexture(e.TEXTURE_2D,null),e.bindRenderbuffer(e.RENDERBUFFER,null),e.bindFramebuffer(e.FRAMEBUFFER,null),t.f=o,t.v=i,t.l=r),t.f}function na(t,e){var o=String(G(e));if(o in t.c)return t.c[o];var i=t.b,r=i.createShader(e.U());return i.shaderSource(r,e.b),i.compileShader(r),t.c[o]=r}function sa(t,e,o){var i=G(e)+"/"+G(o);if(i in t.i)return t.i[i];var r=t.b,n=r.createProgram();return r.attachShader(n,na(t,e)),r.attachShader(n,na(t,o)),r.linkProgram(n),t.i[i]=n}function aa(t,e,o){var i=t.createTexture();return t.bindTexture(t.TEXTURE_2D,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),void 0!==e&&t.texParameteri(3553,10242,e),void 0!==o&&t.texParameteri(3553,10243,o),i}function pa(t,e,o){var i=aa(t,void 0,void 0);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,e,o,0,t.RGBA,t.UNSIGNED_BYTE,null),i}function ha(t,e){var o=aa(t,33071,33071);return t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,e),o}function la(t,e){Gs.call(this,0,e),this.C=this.D=void 0,this.S=[],this.v=[],this.oa=void 0,this.j=[],this.c=[],this.I=this.ra=void 0,this.B=null,this.fb=this.fa=this.na=this.T=this.Ua=this.R=void 0,this.va=[],this.u=[],this.pa=void 0}function ua(t,e,o,i){for(var r=t.D,n=t.C,s=t.oa,a=t.ra,p=t.I,h=t.R,l=t.Ua,u=t.T,c=t.na?1:0,f=-t.fa,y=t.fb,g=t.pa,d=Math.cos(f),f=Math.sin(f),v=t.b.length,b=t.a.length,m=0;m=a;){var h=this.i[n],l=this.f[n];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,p),p=i(l)))return p;p=h,n--}}},Au.Ub=function(t){var e=t.Hc(),o=t.Y(1),i=t.ye(),r=t.qg(1),n=t.f,s=t.Oc(),a=t.l,p=t.g,h=t.ic();t=t.a,this.j.length?G(this.j[this.j.length-1])!=G(o)&&(this.S.push(this.b.length),this.j.push(o)):this.j.push(o),this.c.length?G(this.c[this.c.length-1])!=G(r)&&(this.v.push(this.b.length),this.c.push(r)):this.c.push(r),this.D=e[0],this.C=e[1],this.oa=h[1],this.ra=i[1],this.I=i[0],this.R=n,this.Ua=s[0],this.T=s[1],this.fa=p,this.na=a,this.fb=t,this.pa=h[0]},e(ya,Ls);var ga=new ya;function da(){this.b="varying float a;varying vec2 b;varying float c;attribute vec2 d;attribute vec2 e;attribute vec2 f;attribute float g;uniform mat4 h;uniform mat4 i;uniform mat4 j;uniform float k;uniform float l;bool nearlyEquals(in float value,in float ref){float epsilon=0.000000000001;return value>=ref-epsilon&&value<=ref+epsilon;}void alongNormal(out vec2 offset,in vec2 nextP,in float turnDir,in float direction){vec2 dirVect=nextP-e;vec2 normal=normalize(vec2(-turnDir*dirVect.y,turnDir*dirVect.x));offset=k/2.0*normal*direction;}void miterUp(out vec2 offset,out float round,in bool isRound,in float direction){float halfWidth=k/2.0;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=f-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;round=0.0;if(isRound){round=1.0;}else if(miterLength>l+k){offset=halfWidth*tmpNormal*direction;}} bool miterDown(out vec2 offset,in vec4 projPos,in mat4 offsetMatrix,in float direction){bool degenerate=false;vec2 tangent=normalize(normalize(f-e)+normalize(e-d));vec2 normal=vec2(-tangent.y,tangent.x);vec2 dirVect=d-e;vec2 tmpNormal=normalize(vec2(-dirVect.y,dirVect.x));vec2 longOffset,shortOffset,longVertex;vec4 shortProjVertex;float halfWidth=k/2.0;if(length(f-e)>length(d-e)){longOffset=tmpNormal*direction*halfWidth;shortOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=f;shortProjVertex=h*vec4(d,0.0,1.0);}else{shortOffset=tmpNormal*direction*halfWidth;longOffset=normalize(vec2(dirVect.y,-dirVect.x))*direction*halfWidth;longVertex=d;shortProjVertex=h*vec4(f,0.0,1.0);}vec4 p1=h*vec4(longVertex,0.0,1.0)+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p2=projPos+offsetMatrix*vec4(longOffset,0.0,0.0);vec4 p3=shortProjVertex+offsetMatrix*vec4(-shortOffset,0.0,0.0);vec4 p4=shortProjVertex+offsetMatrix*vec4(shortOffset,0.0,0.0);float denom=(p4.y-p3.y)*(p2.x-p1.x)-(p4.x-p3.x)*(p2.y-p1.y);float firstU=((p4.x-p3.x)*(p1.y-p3.y)-(p4.y-p3.y)*(p1.x-p3.x))/denom;float secondU=((p2.x-p1.x)*(p1.y-p3.y)-(p2.y-p1.y)*(p1.x-p3.x))/denom;float epsilon=0.000000000001;if(firstU>epsilon&&firstU<1.0-epsilon&&secondU>epsilon&&secondU<1.0-epsilon){shortProjVertex.x=p1.x+firstU*(p2.x-p1.x);shortProjVertex.y=p1.y+firstU*(p2.y-p1.y);offset=shortProjVertex.xy;degenerate=true;}else{float miterLength=abs(halfWidth/dot(normal,tmpNormal));offset=normal*direction*miterLength;}return degenerate;}void squareCap(out vec2 offset,out float round,in bool isRound,in vec2 nextP,in float turnDir,in float direction){round=0.0;vec2 dirVect=e-nextP;vec2 firstNormal=normalize(dirVect);vec2 secondNormal=vec2(turnDir*firstNormal.y*direction,-turnDir*firstNormal.x*direction);vec2 hypotenuse=normalize(firstNormal-secondNormal);vec2 normal=vec2(turnDir*hypotenuse.y*direction,-turnDir*hypotenuse.x*direction);float length=sqrt(c*c*2.0);offset=normal*length;if(isRound){round=1.0;}} void main(void){bool degenerate=false;float direction=float(sign(g));mat4 offsetMatrix=i*j;vec2 offset;vec4 projPos=h*vec4(e,0.0,1.0);bool round=nearlyEquals(mod(g,2.0),0.0);a=0.0;c=k/2.0;b=projPos.xy;if(nearlyEquals(mod(g,3.0),0.0)||nearlyEquals(mod(g,17.0),0.0)){alongNormal(offset,f,1.0,direction);}else if(nearlyEquals(mod(g,5.0),0.0)||nearlyEquals(mod(g,13.0),0.0)){alongNormal(offset,d,-1.0,direction);}else if(nearlyEquals(mod(g,23.0),0.0)){miterUp(offset,a,round,direction);}else if(nearlyEquals(mod(g,19.0),0.0)){degenerate=miterDown(offset,projPos,offsetMatrix,direction);}else if(nearlyEquals(mod(g,7.0),0.0)){squareCap(offset,a,round,f,1.0,direction);}else if(nearlyEquals(mod(g,11.0),0.0)){squareCap(offset,a,round,d,-1.0,direction);}if(!degenerate){vec4 offsets=offsetMatrix*vec4(offset,0.0,0.0);gl_Position=projPos+offsets;}else{gl_Position=vec4(offset,0.0,1.0);}}"}e(da,Rs);var va=new da;function ba(t,e){this.B=t.getUniformLocation(e,"n"),this.oa=t.getUniformLocation(e,"k"),this.R=t.getUniformLocation(e,"l"),this.c=t.getUniformLocation(e,"j"),this.f=t.getUniformLocation(e,"i"),this.a=t.getUniformLocation(e,"m"),this.ra=t.getUniformLocation(e,"p"),this.i=t.getUniformLocation(e,"h"),this.I=t.getUniformLocation(e,"o"),this.g=t.getAttribLocation(e,"g"),this.o=t.getAttribLocation(e,"d"),this.l=t.getAttribLocation(e,"f"),this.b=t.getAttribLocation(e,"e")}function ma(t,e){Gs.call(this,0,e),this.v=null,this.u=[],this.j=[],this.c={strokeColor:null,lineCap:void 0,lineDash:null,lineDashOffset:void 0,lineJoin:void 0,lineWidth:void 0,miterLimit:void 0,s:!1}}function wa(t,e,o,i){for(var r=t.a.length,n=t.b.length,s="bevel"===t.c.lineJoin?0:"miter"===t.c.lineJoin?1:2,a="butt"===t.c.lineCap?0:"square"===t.c.lineCap?1:2,p=fa(e,o,i),h=n,l=1,u=0;uo&&(this.i.push(o),this.f.push(e),this.c.s&&(this.j.push(o),this.c.s=!1))},Au.Db=function(){this.l=new zs(this.a),this.o=new zs(this.b),this.i.push(this.b.length),!this.j.length&&0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.j.length-1;0<=p;--p)for(Aa(this,t,(h=this.u[p])[0],h[1],h[2]),n=this.j[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}},Au.Ma=function(t,e){t=e.f,this.c.lineCap=void 0!==t?t:"round",t=e.i,this.c.lineDash=t||Vs,t=e.g,this.c.lineDashOffset=t||0,t=e.j,this.c.lineJoin=void 0!==t?t:"round",t=!((t=e.a)instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Ws;var o=void 0!==(o=e.c)?o:1;e=void 0!==(e=e.o)?e:10,this.c.strokeColor&&U(this.c.strokeColor,t)&&this.c.lineWidth===o&&this.c.miterLimit===e||(this.c.s=!0,this.c.strokeColor=t,this.c.lineWidth=o,this.c.miterLimit=e,this.u.push([t,o,e]))};var Ea=3,Ta=5,ja=7,Ca=11,La=13,Ra=17,Ia=19,Na=23;function Fa(){this.b="precision mediump float;uniform vec4 e;uniform float f;void main(void){gl_FragColor=e;float alpha=e.a*f;if(alpha==0.0){discard;}gl_FragColor.a=alpha;}"}e(Fa,Ls);var ka=new Fa;function Da(){this.b="attribute vec2 a;uniform mat4 b;uniform mat4 c;uniform mat4 d;void main(void){gl_Position=b*vec4(a,0.0,1.0);}"}e(Da,Rs);var Oa=new Da;function Ua(t,e){this.B=t.getUniformLocation(e,"e"),this.c=t.getUniformLocation(e,"d"),this.f=t.getUniformLocation(e,"c"),this.a=t.getUniformLocation(e,"f"),this.i=t.getUniformLocation(e,"b"),this.b=t.getAttribLocation(e,"a")}function Ga(t){t=t||{},this.a=void 0!==t.color?t.color:null,this.f=t.lineCap,this.i=void 0!==t.lineDash?t.lineDash:null,this.g=t.lineDashOffset,this.j=t.lineJoin,this.o=t.miterLimit,this.c=t.width,this.b=void 0}function Ba(t){this.b=this.a=this.i=void 0,this.f=void 0===t||t,this.c=0}function Xa(t){var e,o,i=t.b;i&&(e=i.next,o=i.ub,e&&(e.ub=o),o&&(o.next=e),t.b=e||o,t.i===t.a?(t.b=void 0,t.i=void 0,t.a=void 0):t.i===i?t.i=t.b:t.a===i&&(t.a=o?t.b.ub:t.b),t.c--)}function Va(t){if(t.b=t.i,t.b)return t.b.data}function Wa(t){if(t.b&&t.b.next)return t.b=t.b.next,t.b.data}function Za(t){if(t.b&&t.b.next)return t.b.next.data}function Ka(t){if(t.b&&t.b.ub)return t.b=t.b.ub,t.b.data}function za(t){if(t.b&&t.b.ub)return t.b.ub.data}function Ya(t){if(t.b)return t.b.data}(Au=Ga.prototype).clone=function(){var t=this.a;return new Ga({color:t&&t.slice?t.slice():t||void 0,lineCap:this.f,lineDash:this.i?this.i.slice():void 0,lineDashOffset:this.g,lineJoin:this.j,miterLimit:this.o,width:this.c})},Au.No=function(){return this.a},Au.Vk=function(){return this.f},Au.Oo=function(){return this.i},Au.Wk=function(){return this.g},Au.Xk=function(){return this.j},Au.bl=function(){return this.o},Au.Po=function(){return this.c},Au.Qo=function(t){this.a=t,this.b=void 0},Au.aq=function(t){this.f=t,this.b=void 0},Au.setLineDash=function(t){this.i=t,this.b=void 0},Au.bq=function(t){this.g=t,this.b=void 0},Au.cq=function(t){this.j=t,this.b=void 0},Au.gq=function(t){this.o=t,this.b=void 0},Au.jq=function(t){this.c=t,this.b=void 0},Ba.prototype.concat=function(t){var e;t.b&&(this.b?(e=this.b.next,this.b.next=t.i,t.i.ub=this.b,e.ub=t.a,t.a.next=e,this.c+=t.c):(this.b=t.b,this.i=t.i,this.a=t.a,this.c=t.c),t.b=void 0,t.i=void 0,t.a=void 0,t.c=0)};var Ha,qa={$d:function(){}};function Ja(t,e,o){var i=t[e];t[e]=t[o],t[o]=i}function _a(t,e){return t=t.ca&&e.ia>=t.da}function pp(t){return{children:t,height:1,ib:!0,ca:1/0,da:1/0,$:-1/0,ia:-1/0}}function hp(t,e,o,i,r){for(var n,s=[e,o];s.length;)(o=s.pop())-(e=s.pop())<=i||(n=e+Math.ceil((o-e)/i/2)*i,Ha(t,n,e,o,r),s.push(e,n,n,o))}function lp(t){this.a=qa.$d(t),this.b={}}function up(t,e,o){var i=t.b[G(o)];Z([i.ca,i.da,i.$,i.ia],e)||(t.remove(o),t.Ca(e,o))}function cp(t){return t.a.all().map(function(t){return t.value})}function fp(t,e){return t.a.search({ca:e[0],da:e[1],$:e[2],ia:e[3]}).map(function(t){return t.value})}function yp(t,e,o,i){return gp(fp(t,e),o,i)}function gp(t,e,o){for(var i,r=0,n=t.length;rn&&(n=e[c],u=e[c+1]),l=y}}else for(l=s=Mp(t,e[c=e.length-o],e[c+1],a++),n=e[c],u=e[c+1],c-=o,f=0;f<=c;c-=o)y=Mp(t,e[c],e[c+1],a++),h.push(Pp(l,y,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),e[c]>n&&(n=e[c],u=e[c+1]),l=y;return h.push(Pp(y,s,i)),p.push([Math.min(l.x,y.x),Math.min(l.y,y.y),Math.max(l.x,y.x),Math.max(l.y,y.y)]),r.load(p,h),[n,u]}function mp(t,e,o){var i=Va(t),r=i,n=Wa(t),s=!1;do{var a=o?Zs(n.W.x,n.W.y,r.W.x,r.W.y,r.aa.x,r.aa.y):Zs(r.aa.x,r.aa.y,r.W.x,r.W.y,n.W.x,n.W.y)}while(void 0===a?(Ap(r,n,t,e),s=!0,n===i&&(i=Za(t)),n=r,Ka(t)):r.W.Fb!==a&&(r.W.Fb=a,s=!0),r=n,n=Wa(t),r!==i);return s}function wp(t,e,o,i,r){var n=t.b.length,s=Va(e),a=za(e),p=s,h=Wa(e),l=Za(e),u=!1;do{var c,f=p.aa,y=p.W,g=h.W}while(!1===y.Fb&&(c=r?Cp(l.W,g,y,f,a.aa):Cp(a.aa,f,y,g,l.W),!i&&Tp({aa:f,W:g},o).length||!c||Ep(f,y,g,o,!0).length||!i&&!1!==f.Fb&&!1!==g.Fb&&dr([a.aa.x,a.aa.y,f.x,f.y,y.x,y.y,g.x,g.y,l.W.x,l.W.y],0,10,2)!==!r||(t.b[n++]=f.hb,t.b[n++]=y.hb,t.b[n++]=g.hb,Ap(p,h,e,o),h===s&&(s=l),u=!0)),a=za(e),p=Ya(e),h=Wa(e),l=Za(e),p!==s&&3(o.y-i.y)*(e.x-i.x);return r=(r.x-i.x)*(e.y-i.y)<(r.y-i.y)*(e.x-i.x),t=(t.x-e.x)*(i.y-e.y)>(t.y-e.y)*(i.x-e.x),o=(o.x-e.x)*(i.y-e.y)<(o.y-e.y)*(i.x-e.x),e=e.Fb?o||t:o&&t,(i.Fb?r||n:r&&n)&&e}function Lp(){}function Rp(t,e,o){this.f=e,this.g=t,this.c=o,this.a={}}function Ip(t,e){var o,i=[];for(o in t.a){var r,n=t.a[o];for(r in n)i.push(n[r].Eb(e))}return function(){for(var t,e=i.length,o=0;othis.Hf;)this.jk(i,e),e--;this.Zj(o,i,e)},jk:function(t,e){var o=t[e],i=o.children.length,r=this.fh;this.$j(o,r,i),i=this.ak(o,r,i),(i=pp(o.children.splice(i,o.children.length-i))).height=o.height,i.ib=o.ib,Qa(o,this.wb),Qa(i,this.wb),e?t[e-1].children.push(i):this.hh(o,i)},hh:function(t,e){this.data=pp([t,e]),this.data.height=t.height+1,this.data.ib=!1,Qa(this.data,this.wb)},ak:function(t,e,o){for(var i=s=1/0,r=e;r<=o-e;r++){var n,s,a=tp(t,0,r,this.wb),p=tp(t,r,o,this.wb),h=Math.max(0,Math.min(a.$,p.$)-Math.max(a.ca,p.ca))*Math.max(0,Math.min(a.ia,p.ia)-Math.max(a.da,p.da)),a=rp(a)+rp(p);hr&&(this.i.push(r),this.f.push(e),this.j.s&&(this.c.push(r),this.j.s=!1)),this.g.b.length>n&&Pa(this.g,e,n)},Au.rc=function(t,e){var o=t.Bb(),i=t.qa();if(0=l;){var u=this.i[h];o[G(this.f[h]).toString()]&&(s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),p=u),h--,s=u}s!==p&&(Bs(t,e,s,p),t.clear(t.DEPTH_BUFFER_BIT)),s=p=l}i||(t.disable(t.DEPTH_TEST),t.clear(t.DEPTH_BUFFER_BIT),t.depthMask(n),t.depthFunc(r))},Au.ve=function(t,e,o,i,r){for(var n,s=this.i.length-2,a=this.i[s+1],p=this.c.length-1;0<=p;--p){var h=this.u[p];for(t.uniform4fv(this.v.B,h),n=this.c[p];0<=s&&this.i[s]>=n;){var h=this.i[s],l=this.f[s];if(void 0===o[G(l).toString()]&&l.V()&&(void 0===r||nt(r,l.V().G()))&&(t.clear(t.COLOR_BUFFER_BIT|t.DEPTH_BUFFER_BIT),Bs(t,e,h,a),a=i(l)))return a;s--,a=h}}},Au.Ma=function(t,e){t=!((t=t?t.b:[0,0,0,0])instanceof CanvasGradient||t instanceof CanvasPattern)&&Be(t).map(function(t,e){return 3!=e?t/255:t})||Xs,this.j.fillColor&&U(t,this.j.fillColor)||(this.j.fillColor=t,this.j.s=!0,this.u.push(t)),e?this.g.Ma(null,e):this.g.Ma(null,new Ga({color:[0,0,0,0],lineWidth:0}))},Lp.prototype.La=function(){},e(Rp,js),Rp.prototype.b=function(t,e){var o=void 0!==t?t.toString():"0";return void 0===(t=this.a[o])&&(t={},this.a[o]=t),void 0===(o=t[e])&&(o=new kp[e](this.g,this.f),t[e]=o),o},Rp.prototype.i=function(){return ct(this.a)},Rp.prototype.La=function(t,e,o,i,r,n,s,a){var p=Object.keys(this.a).map(Number);p.sort(D);for(var h=0,l=p.length;h=t.l)break;++n}o=r+" "+i,t.D!=o&&(t.o.innerHTML=o,t.D=o),t.B!=e&&(t.o.style.width=e+"px",t.B=e),t.j||(t.c.style.display="",t.j=!0)}else t.j&&(t.c.style.display="none",t.j=!1)}rh.prototype.C=function(){return this.get(ph)},rh.prototype.T=function(){ah(this)},rh.prototype.I=function(t){this.set(ph,t)};var ph="units";function hh(t){t=t||{},this.c=void 0,this.j=lh,this.D=this.l=0,this.I=null,this.na=!1,this.T=void 0!==t.duration?t.duration:200;var e=void 0!==t.className?t.className:"ol-zoomslider",o=document.createElement("button");o.setAttribute("type","button"),o.className=e+"-thumb ol-unselectable";var i=document.createElement("div");i.className=e+" ol-unselectable ol-control",i.appendChild(o),this.o=new ri(i),de(this.o,"pointerdown",this.yl,this),de(this.o,"pointermove",this.wl,this),de(this.o,"pointerup",this.xl,this),de(i,"click",this.vl,this),de(o,"click",Pe),Je.call(this,{element:i,render:t.render||uh})}e(hh,Je),hh.prototype.ka=function(){Se(this.o),Je.prototype.ka.call(this)};var lh=0;function uh(t){var e,o,i,r,n;t.frameState&&(this.na||(e=(r=this.element).offsetWidth,o=r.offsetHeight,n=r.firstElementChild,i=getComputedStyle(n),r=n.offsetWidth+parseFloat(i.marginRight)+parseFloat(i.marginLeft),n=n.offsetHeight+parseFloat(i.marginTop)+parseFloat(i.marginBottom),this.I=[r,n],o>1)],o))<0?p=r+1:(h=r,l=!a);a=(r=l?p:~p)<0?(o=(o-s[-r-2])/(s[-r-1]-s[-r-2]),s=f(t[e+=(-r-2)*i],t[e+i],o),f(t[e+1],t[e+i+1],o)):(s=t[e+r*i],t[e+r*i+1])}return n?(n[0]=s,n[1]=a,n):[s,a]}function hl(t,e,o,i,r,n){if(o==e)return null;if(r>1)+1)*i-1]?o=n:e=n+1;if(r==(o=t[e*i-1]))return t.slice((e-1)*i,(e-1)*i+i);var s;for(n=(r-o)/(t[(e+1)*i-1]-o),o=[],s=0;s>>0):4294967296*(e>>>0)+(t>>>0)}var o=function(t,e,o,i,r){var n=8*r-i-1,s=(1<>1,p=-7,h=o?-1:1,l=t[e+(r=o?r-1:0)];for(r+=h,o=l&(1<<-p)-1,l>>=-p,p+=n;0>=-p,p+=i;0>3,n=this.ea;this.type=7&i,t(r,e,this),this.ea===n&&this.mq(i)}return e},yp:function(){var t=o(this.lc,this.ea,!0,23,4);return this.ea+=4,t},up:function(){var t=o(this.lc,this.ea,!0,52,8);return this.ea+=8,t},Ka:function(t){var e=this.lc,o=e[this.ea++],i=127&o;return o<128?i:(i|=(127&(o=e[this.ea++]))<<7,o<128?i:(i|=(127&(o=e[this.ea++]))<<14,o<128?i:(i|=(127&(o=e[this.ea++]))<<21,o<128?i:function(t,e,o){var i=o.lc,r=i[o.ea++],n=(112&r)>>4;if(r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<3,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<10,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<17,r<128)return s(t,n,e);if(n|=(127&(r=i[o.ea++]))<<24,r<128)return s(t,n,e);if((r=i[o.ea++])<128)return s(t,n|(1&r)<<31,e);throw Error("Expected varint not more than 10 bytes")}(i|(15&e[this.ea])<<28,t,this))))},Kp:function(){return this.Ka(!0)},ce:function(){var t=this.Ka();return 1==t%2?(t+1)/-2:t/2},sp:function(){return!!this.Ka()},Gg:function(){for(var t=this.Ka()+this.ea,e=this.lc,o="",i=this.ea;i>>10&1023|55296),p=56320|1023&p),o+=String.fromCharCode(p),i+=h}return this.ea=t,o},mq:function(t){if((t&=7)===e.c)for(;127>3)?t.Gg():2===e?t.yp():3===e?t.up():4===e?t.Kp():5===e?t.Ka():6===e?t.ce():7===e?t.sp():null;return e}(o))}function s(t,e,o){3===t&&((t=new a(o,o.Ka()+o.ea)).length&&(e[t.name]=t))}p.prototype={clone:function(){return new p(this.x,this.y)},add:function(t){return this.clone().Yj(t)},rotate:function(t){return this.clone().hk(t)},round:function(){return this.clone().ik()},angle:function(){return Math.atan2(this.y,this.x)},Yj:function(t){return this.x+=t.x,this.y+=t.y,this},hk:function(t){var e=Math.cos(t),o=(t=Math.sin(t))*this.x+e*this.y;return this.x=e*this.x-t*this.y,this.y=o,this},ik:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},p.Kq=function(t){return!(t instanceof p)&&Array.isArray(t)?new p(t[0],t[1]):t},o.b=["Unknown","Point","LineString","Polygon"],o.prototype.Oh=function(){var t=this.Cc;t.ea=this.Ef;for(var e,o=t.Ka()+t.ea,i=1,r=0,n=0,s=0,a=[];t.ea>=3),r--,1===i||2===i)n+=t.ce(),s+=t.ce(),1===i&&(e&&a.push(e),e=[]),e.push(new p(n,s));else{if(7!==i)throw Error("unknown command "+i);e&&e.push(e[0].clone())}return e&&a.push(e),a},o.prototype.bbox=function(){var t=this.Cc;t.ea=this.Ef;for(var e=t.Ka()+t.ea,o=1,i=0,r=0,n=0,s=1/0,a=-1/0,p=1/0,h=-1/0;t.ea>=3),i--,1===o||2===o)(r+=t.ce())=this.me.length)throw Error("feature index out of bounds");return this.Cc.ea=this.me[t],t=this.Cc.Ka()+this.Cc.ea,new o(this.Cc,t,this.extent,this.ne,this.pe)};var h=a;t.default={Bf:e,Wj:o,Xj:h},t.Bf=e,t.Wj=o,t.Xj=h}(qa.xf=qa.xf||{}),(Au=Uy.prototype).get=function(t){return this.c[t]},Au.Bb=function(){return this.f},Au.G=function(){return this.a||(this.a="Point"===this.i?k(this.b):W(this.b,0,this.b.length,2)),this.a},Au.Wn=function(){return this.g},Au.ec=function(){return this.b},Au.ga=Uy.prototype.ec,Au.V=function(){return this},Au.Xn=function(){return this.c},Au.Vd=Uy.prototype.V,Au.qa=function(){return 2},Au.Lc=w,Au.U=function(){return this.i},e(Gy,ol),(Au=Gy.prototype).U=function(){return"arraybuffer"},Au.Oa=function(t,e){var o=this.c;t=new qa.Dd(t),t=new qa.xf.Bf(t);var i,r=[],n=this.b;for(i in t.layers)if(!o||-1!=o.indexOf(i))for(var s,a,p,h,l,u,c,f,y,g=t.layers[i],d=0,v=g.length;d>=5;e+=s+=String.fromCharCode(n+63)}return e}function gg(t,e){e=e||1e5;for(var o=[],i=0,r=0,n=0,s=t.length;n>1):r>>1;for(t=0,i=o.length;t=e[0]||t[1]<=e[1]&&t[3]>=e[1]||H(t,this.sb,this))},Au.ob=function(t){var e,o=this.a,i=t.slice();for(i[o]=i[0]+(this.A[o]-this.A[0]),e=1;eg[2])&&(c=e*Math.ceil((g[0]-c)/e),f=[f[0]+c,f[1],f[2]+c,f[3]]),c=this.S[0],g=this.S[1],e=-1,i=Math.pow(this.Jb*d,2),r=[],n=[],d=0,o=Yd.length;dx.width?x.width-E:I,D=P+T>x.height?x.height-T:P;e.drawImage(x,E,T,k,D,F,j,k*o,D*o),1!=A&&(e.globalAlpha=N),1==L&&!C||e.setTransform.apply(e,d)}++c;break;case 5:for(y=F[1],w=F[2],M=F[3],P=F[4]*o,A=F[5]*o,C=F[6],L=F[7]*o,x=F[8],S=F[9],(j=F[10])&&(C+=r);ythis.c&&(this.c=this.i.lineWidth,this.f=null)},e(Ev,dv),(Au=Ev.prototype).Zb=function(t,e){var o,i=this.i,r=i.strokeStyle;void 0===i.fillStyle&&void 0===r||(jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==i.strokeStyle&&this.b.push([10,i.strokeStyle,i.lineWidth,i.lineCap,i.lineJoin,i.miterLimit,i.lineDash,i.lineDashOffset,!0,1]),o=t.ga(),r=this.coordinates.length,vv(this,o,0,o.length,t.qa(),!1,!1),t=[1],r=[2,r],this.a.push(t,r),this.b.push(t,r),t=[7],this.b.push(t),void 0!==i.fillStyle&&this.a.push(t),void 0!==i.strokeStyle&&(i=[12],this.a.push(i),this.b.push(i)),xv(this,e))},Au.rc=function(t,e){var o=this.i;jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]);o=t.Bb();Tv(this,t.ec(),0,o,t.qa()),xv(this,e)},Au.pc=function(t,e){var o=this.i,i=o.strokeStyle;if(void 0!==o.fillStyle||void 0!==i){jv(this,t),bv(this,e),this.b.push([9,Xe(fs)]),void 0!==o.strokeStyle&&this.b.push([10,o.strokeStyle,o.lineWidth,o.lineCap,o.lineJoin,o.miterLimit,o.lineDash,o.lineDashOffset,!0,1]),o=t.c,i=bl(t),t=t.qa();for(var r=0,n=0,s=o.length;nthis.c&&(this.c=o.lineWidth,this.f=null)):(o.strokeStyle=void 0,o.lineCap=void 0,o.lineDash=null,o.lineDashOffset=void 0,o.lineJoin=void 0,o.lineWidth=void 0,o.miterLimit=void 0)},e(Cv,dv),Cv.prototype.yc=function(t,e,o,i,r,n){var s,a;""!==this.Ia&&this.g&&(this.i||this.f)&&(this.i&&(r=this.i,(s=this.S)&&s.fillStyle==r.fillStyle||(a=[9,r.fillStyle],this.a.push(a),this.b.push(a),s?s.fillStyle=r.fillStyle:this.S={fillStyle:r.fillStyle})),this.f&&(r=this.f,(s=this.D)&&s.lineCap==r.lineCap&&s.lineDash==r.lineDash&&s.lineDashOffset==r.lineDashOffset&&s.lineJoin==r.lineJoin&&s.lineWidth==r.lineWidth&&s.miterLimit==r.miterLimit&&s.strokeStyle==r.strokeStyle||(a=[10,r.strokeStyle,r.lineWidth,r.lineCap,r.lineJoin,r.miterLimit,r.lineDash,r.lineDashOffset,!1,1],this.a.push(a),this.b.push(a),s?(s.lineCap=r.lineCap,s.lineDash=r.lineDash,s.lineDashOffset=r.lineDashOffset,s.lineJoin=r.lineJoin,s.lineWidth=r.lineWidth,s.miterLimit=r.miterLimit,s.strokeStyle=r.strokeStyle):this.D={lineCap:r.lineCap,lineDash:r.lineDash,lineDashOffset:r.lineDashOffset,lineJoin:r.lineJoin,lineWidth:r.lineWidth,miterLimit:r.miterLimit,strokeStyle:r.strokeStyle})),r=this.g,(s=this.C)&&s.font==r.font&&s.textAlign==r.textAlign&&s.textBaseline==r.textBaseline||(a=[11,r.font,r.textAlign,r.textBaseline],this.a.push(a),this.b.push(a),s?(s.font=r.font,s.textAlign=r.textAlign,s.textBaseline=r.textBaseline):this.C={font:r.font,textAlign:r.textAlign,textBaseline:r.textBaseline}),bv(this,n),t=[5,r=this.coordinates.length,t=vv(this,t,e,o,i,!1,!1),this.Ia,this.j,this.o,this.v,this.u,!!this.i,!!this.f,this.l],this.a.push(t),this.b.push(t),xv(this,n))},Cv.prototype.Cb=function(t){var e,o,i,r,n,s,a,p,h;t?((o=t.Fa())?(o=ze((o=o.b)||fs),this.i?this.i.fillStyle=o:this.i={fillStyle:o}):this.i=null,(s=t.Ga())?(o=s.a,i=s.f,r=s.i,a=s.g,p=s.j,n=s.c,s=s.o,i=void 0!==i?i:"round",r=r?r.slice():ys,a=void 0!==a?a:0,p=void 0!==p?p:"round",n=void 0!==n?n:1,s=void 0!==s?s:10,o=ze(o||gs),this.f?((h=this.f).lineCap=i,h.lineDash=r,h.lineDashOffset=a,h.lineJoin=p,h.lineWidth=n,h.miterLimit=s,h.strokeStyle=o):this.f={lineCap:i,lineDash:r,lineDashOffset:a,lineJoin:p,lineWidth:n,miterLimit:s,strokeStyle:o}):this.f=null,e=t.a,o=t.i,i=t.c,r=t.o,n=t.f,s=t.b,a=t.Na(),p=t.g,h=t.j,t=void 0!==e?e:"10px sans-serif",p=void 0!==p?p:"center",h=void 0!==h?h:"middle",this.g?((e=this.g).font=t,e.textAlign=p,e.textBaseline=h):this.g={font:t,textAlign:p,textBaseline:h},this.Ia=void 0!==a?a:"",this.j=void 0!==o?o:0,this.o=void 0!==i?i:0,this.l=void 0!==r&&r,this.v=void 0!==n?n:0,this.u=void 0!==s?s:1):this.Ia=""},e(Lv,js);var Rv={0:[[!0]]};function Iv(t,e,o){var i,r=Math.floor(t.length/2);if(r<=e)for(i=r;it.$&&(t.$=i.$),i.dat.ia&&(t.ia=i.ia)):t[e][o]=i:(t[e]={},t[e][o]=i)}function Wv(t,e,o,i,r,n,s,a,p,h){var l=G(e).toString();l in t.wantedTiles||(t.wantedTiles[l]={});var u=t.wantedTiles[l];t=t.tileQueue;for(var c,f=o.minZoom,y=s;f<=y;--y)for(var g,d=ee(o,n,y,d),v=o.Da(y),b=d.ca;b<=d.$;++b)for(c=d.da;c<=d.ia;++c)s-y<=a?(0==(g=e.Nc(y,b,c,i,r)).getState()&&(u[g.bb()]=!0,g.bb()in t.a||t.f([g,l,oe(o,g.ta),v])),p&&p.call(h,g)):e.Ug(y,b,c,r)}function Zv(t){Dv.call(this,t),this.fa=qn()}function Kv(t,e,o){var i=e.pixelRatio,r=e.size[0]*i,n=e.size[1]*i,s=e.viewState.rotation,a=ot(o),p=it(o),h=_(o);o=J(o),ts(e.coordinateToPixelTransform,a),ts(e.coordinateToPixelTransform,p),ts(e.coordinateToPixelTransform,h),ts(e.coordinateToPixelTransform,o),t.save(),ds(t,-s,r/2,n/2),t.beginPath(),t.moveTo(a[0]*i,a[1]*i),t.lineTo(p[0]*i,p[1]*i),t.lineTo(h[0]*i,h[1]*i),t.lineTo(o[0]*i,o[1]*i),t.clip(),ds(t,s,r/2,n/2)}function zv(t,e,o,i,r){var n,s,a,p=t.a;Ee(p,e)&&(n=i.size[0]*i.pixelRatio,s=i.size[1]*i.pixelRatio,ds(o,-(a=i.viewState.rotation),n/2,s/2),t=r||Yv(t,i,0),p.b(new cs(e,new bs(o,i.pixelRatio,i.extent,t,i.viewState.rotation),i,o,null)),ds(o,a,n/2,s/2))}function Yv(t,e,o){var i=e.viewState,r=e.pixelRatio,n=r/i.resolution;return rs(t.fa,r*e.size[0]/2,r*e.size[1]/2,n,-n,-i.rotation,-i.center[0]+o,-i.center[1])}function Hv(t,e){return G(t)-G(e)}function qv(t,e){return(t=.5*t/e)*t}function Jv(t,e,o,i,r,n){var s,a,p=!1;return(s=o.Y())&&(2==(a=s.Ye())||3==a?s.Bj(r,n):(0==a&&s.load(),s.Nh(r,n),p=!0)),(r=(0,o.Za)(e))&&(i=r.Vd(i),(0,_v[i.U()])(t,i,o,e)),p}e(Dv,Te),Dv.prototype.Ea=w,Dv.prototype.Ue=Gi,Dv.prototype.Nf=function(o,i,r){return function(e,t){return fw(o,i,e,t,function(t){r[e]||(r[e]={}),r[e][t.ta.toString()]=t})}},Dv.prototype.na=function(t){2===t.target.getState()&&Uv(this)},e(Zv,Dv),Zv.prototype.u=function(t,e,o,i){if(this.Ea(t,e,0,Ui,this))return o.call(i,this.a,null)},Zv.prototype.ef=function(t,e,o,i){zv(this,"postcompose",t,e,i)};var _v={Point:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.qc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),t.yc(e.ga(),0,2,2,e,i))},LineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.mc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(ul(e),0,2,2,e,i))},Polygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(n||s)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.rc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),t.yc(xr(e),0,2,2,e,i))},MultiPoint:function(t,e,o,i){var r=o.Y();if(r){if(2!=r.Ye())return;var n=t.b(o.Ba(),"Image");n.Ub(r),n.oc(e,i)}(r=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(r),o=e.ga(),t.yc(o,0,o.length,e.qa(),e,i))},MultiLineString:function(t,e,o,i){var r,n=o.Ga();n&&((r=t.b(o.Ba(),"LineString")).Ma(null,n),r.nc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=fl(e),t.yc(o,0,o.length,2,e,i))},MultiPolygon:function(t,e,o,i){var r,n=o.Fa(),s=o.Ga();(s||n)&&((r=t.b(o.Ba(),"Polygon")).Ma(n,s),r.pc(e,i)),(n=o.Na())&&((t=t.b(o.Ba(),"Text")).Cb(n),o=vl(e),t.yc(o,0,o.length,2,e,i))},GeometryCollection:function(t,e,o,i){for(var r=0,n=(e=e.a).length;rp[2];)l=Yv(this,t,l=h*++m),u.La(f,r,l,a,n),s-=h;l=Yv(this,t,0)}ds(f,a,v/2,b/2),f!=o&&(zv(this,"render",f,t,l),o.drawImage(f.canvas,-y,-g),f.translate(-y,-g)),f.globalAlpha=d}c&&o.restore(),this.ef(o,t,e,l)},$v.prototype.Ea=function(t,e,o,i,r){if(this.f){var n=this.a,s={};return this.f.Ea(t,e.viewState.resolution,e.viewState.rotation,o,{},function(t){var e=G(t).toString();if(!(e in s))return s[e]=!0,i.call(r,t,n)})}},$v.prototype.D=function(){Uv(this)},$v.prototype.sd=function(t){function e(t){var e,o=t.Lc();if(o?e=o.call(t,h):(o=n.f)&&(e=o(t,h)),e){if(e){if(o=!1,Array.isArray(e))for(var i=0,r=e.length;it.ad:r<=t.ad),t.l?(r=e.coordinate,i=t.j.V(),t.g===Cb?o=t.a:t.g===Rb?(o=(o=t.a[0])[o.length-1],Pb(t,e)&&(r=t.l.slice())):o=(o=t.a)[o.length-1],o[0]=r[0],o[1]=r[1],t.Za(t.a,i),t.B&&t.B.V().ma(r),i instanceof wr&&t.g!==Rb?(t.C||(t.C=new Ih(new ll(null))),r=i.Ch(0),(e=t.C.V()).ba(r.ja,r.ga())):t.I&&(e=t.C.V()).ma(t.I),jb(t)):(e=e.coordinate.slice(),t.B?t.B.V().ma(e):(t.B=new Ih(new hr(e)),jb(t))),!0}function Pb(t,e){var o=!1;if(t.j){var i=!1,r=[t.l];if(t.g===Lb?i=t.a.length>t.Sa:t.g===Rb&&(i=t.a[0].length>t.Sa,r=[t.a[0][0],t.a[0][t.a[0].length-2]]),i)for(var i=e.map,n=0,s=r.length;n=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),t.Za(i,r)):t.g===Rb&&((i=t.a[0]).length>=t.va&&(t.u?i.pop():o=!0),i.push(e.slice()),o&&(t.l=i[0]),t.Za(t.a,r)),jb(t),o&&t.Pd()}function Tb(t){t.l=null;var e=t.j;return e&&(t.j=null,t.B=null,t.C=null,t.pa.ha().clear(!0)),e}function jb(t){var e=[];t.j&&e.push(t.j),t.C&&e.push(t.C),t.B&&e.push(t.B),(t=t.pa.ha()).clear(!0),t.cd(e)}e(lb,je),(Au=lb.prototype).Ea=w,Au.ya=function(){return this.j},Au.xa=function(){return this.D},Au.za=function(){return this.c},Au.getState=function(){return this.na},Au.sa=function(){this.s()},Au.ua=function(t){this.j=ub(t),this.s()},e(fb,lb),(Au=fb.prototype).yb=function(t){var e,o=G(t).toString();gb(this,o,t)&&(yb(this,o,t),(e=t.V())?(o=e.G(),this.a&&this.a.Ca(o,t)):this.g[o]=t,this.b(new bb("addfeature",t))),this.s()},Au.cd=function(t){db(this,t),this.s()},Au.clear=function(t){if(t){for(var e in this.v)this.v[e].forEach(me);this.f||(this.v={},this.o={},this.l={})}else if(this.a)for(var o in this.a.forEach(this.Ig,this),this.g)this.Ig(this.g[o]);this.f&&this.f.clear(),this.a&&this.a.clear(),this.R.clear(),this.g={},this.b(new bb("clear")),this.s()},Au.sh=function(t,e){return this.a?this.a.forEach(t,e):this.f?this.f.forEach(t,e):void 0},Au.$b=function(t,e,o){return this.a?yp(this.a,t,e,o):this.f?this.f.forEach(e,o):void 0},Au.th=function(e,o,i){return this.$b(e,function(t){if(t.V().Xa(e)&&(t=o.call(i,t)))return t})},Au.Ah=function(){return this.f},Au.Xe=function(){var t;return this.f?t=this.f.a:this.a&&(t=cp(this.a),ct(this.g)||c(t,ut(this.g))),t},Au.zh=function(t){var e,o,i=[];return e=t,o=function(t){i.push(t)},this.$b([e[0],e[1],e[0],e[1]],function(t){if(t.V().sb(e))return o.call(void 0,t)}),i},Au.Uf=function(t){return fp(this.a,t)},Au.vh=function(t,e){var i=t[0],r=t[1],n=null,s=[NaN,NaN],a=1/0,p=[-1/0,-1/0,1/0,1/0],h=e||Ui;return yp(this.a,p,function(t){var e,o;h(t)&&(e=t.V(),o=a,(a=e.Kb(i,r,s,a))o&&(t.index+=r)})}function rm(t,e,o){Me.call(this,t),this.features=e,this.mapBrowserEvent=o}function nm(t){var e,o;Or.call(this,{handleEvent:sm}),t=t||{},this.C=t.condition||zr,this.D=t.addCondition||Gi,this.B=t.removeCondition||Gi,this.I=t.toggleCondition||Hr,this.l=t.multi||!1,this.o=t.filter||Ui,this.j=t.hitTolerance||0,this.g=new ab({source:new fb({useSpatialIndex:!1,features:t.features,wrapX:t.wrapX}),style:t.style||(c((e=Lh()).Polygon,e.LineString),c(e.GeometryCollection,e.LineString),function(t){return t.V()?e[t.V().U()]:null}),updateWhileAnimating:!0,updateWhileInteracting:!0}),t=t.layers?"function"==typeof t.layers?t.layers:(o=t.layers,function(t){return d(o,t)}):Ui,this.u=t,this.a={},de(t=this.g.ha().f,"add",this.Fn,this),de(t,"remove",this.Jn,this)}function sm(t){if(!this.C(t))return!0;var o=this.D(t),i=this.B(t),r=this.I(t),e=!o&&!i&&!r,n=t.map,s=this.g.ha().f,a=[],p=[];if(e){for(lt(this.a),n.we(t.pixel,function(t,e){if(this.o(t,e))return p.push(t),t=G(t),this.a[t]=e,!this.l}.bind(this),{layerFilter:this.u,hitTolerance:this.j}),e=s.dc()-1;0<=e;--e){var n=s.item(e),h=p.indexOf(n);-1e.v),g))Math.abs(o[0]-r[0])<=Math.abs(o[1]-r[1])?(y=[(i[0]+r[0])/2,(i[1]+r[1])/2],f=e.a(y),u=[(n[0]+o[0])/2,(n[1]+o[1])/2],c=e.a(u),t(e,o,i,y,u,s,a,f,c,l-1),t(e,u,y,r,n,c,f,p,h,l-1)):(y=[(o[0]+i[0])/2,(o[1]+i[1])/2],f=e.a(y),u=[(r[0]+n[0])/2,(r[1]+n[1])/2],c=e.a(u),t(e,o,y,u,n,s,f,c,h,l-1),t(e,y,i,r,u,f,a,p,c,l-1));else{if(y){if(!e.l)return;e.o=!0}e.c.push({source:[s,p,h],target:[o,r,n]}),e.c.push({source:[s,a,p],target:[o,i,r]})}}}(this,t,e,i,o,r,p,h,l,10),this.o&&(a=1/0,this.c.forEach(function(t){a=Math.min(a,t.source[0][0],t.source[1][0],t.source[2][0])}),this.c.forEach(function(t){var e;Math.max(t.source[0][0],t.source[1][0],t.source[2][0])-a>this.b/2&&((e=[[t.source[0][0],t.source[0][1]],[t.source[1][0],t.source[1][1]],[t.source[2][0],t.source[2][1]]])[0][0]-a>this.b/2&&(e[0][0]-=this.b),e[1][0]-a>this.b/2&&(e[1][0]-=this.b),e[2][0]-a>this.b/2&&(e[2][0]-=this.b),Math.max(e[0][0],e[1][0],e[2][0])-Math.min(e[0][0],e[1][0],e[2][0])r[0]||t[1]<0||t[1]>r[1])&&(this.f||(this.f=Ye(1,1)),this.f.clearRect(0,0,1,1),this.f.drawImage(this.M.Y(),t[0],t[1],1,1,0,0,1,1),0<(r=this.f.getImageData(0,0,1,1).data)[3]))return o.call(i,this.a,r)}},e(Zm,Zn),Zm.prototype.Fd=function(t){var e=null,o=t.U();return"canvas"===o?e=new Tm(this):"webgl"===o&&(e=new Wm(t,this)),e},e(Km,Em),Km.prototype.sd=function(t,e){var o=t.pixelRatio,i=t.size,r=(s=t.viewState).projection,n=s.resolution,s=s.center,a=this.a,p=a.ha(),h=p.i,l=p.Ta(r),u=l.tc(n,this.T),c=l.Da(u),f=Math.round(n/c)||1,y=t.extent;if(st(y=void 0!==e.extent?et(y,e.extent):y))return!1;var g=te(l,y,c),d=l.Pc(u),v=l.Da(u),b=X(l.gb(u),l.j),d=F(d[0]+g.ca*b[0]*v,d[1]+g.da*b[1]*v,d[0]+(g.$+1)*b[0]*v,d[1]+(g.ia+1)*b[1]*v,void 0),v=p.nb(o);(b={})[u]={};var m=this.Nf(p,r,b),w=this.l,x=this.va,S=!1;for(C=g.ca;C<=g.$;++C)for(L=g.da;L<=g.ia;++L){var M=p.Nc(u,C,L,o,r);3!=M.getState()||this.a.kd()||ev(M,2),zm(this,M)||(M=tv(M)),zm(this,M)?2==M.getState()&&(b[u][M.ta.toString()]=M,S||-1!=this.g.indexOf(M)||(S=!0)):$t(l,M.ta,m,x,w)||(M=Qt(l,M.ta,x,w))&&m(u+1,M)}if(C=(C=t.viewHints)[0]||C[1],!(this.f&&16t.highWaterMark}function cw(t){lb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,state:t.state,wrapX:t.wrapX}),this.va=void 0!==t.opaque&&t.opaque,this.$a=void 0!==t.tilePixelRatio?t.tilePixelRatio:1,this.tileGrid=void 0!==t.tileGrid?t.tileGrid:null,this.a=new lw(t.cacheSize),this.o=[0,0],this.uc=""}function fw(t,e,o,i,r){if(!(e=t.Wd(e)))return!1;for(var n,s,a=!0,p=i.ca;p<=i.$;++p)for(var h=i.da;h<=i.ia;++h)n=t.Sb(o,p,h),s=!1,e.b.hasOwnProperty(n)&&((s=2===(n=e.get(n)).getState())&&(s=!1!==r(n))),s||(a=!1);return a}function yw(t,e){t.uc!==e&&(t.uc=e,t.s())}function gw(t,e,o){var i,r,n=void 0!==o?o:t.c;return o=t.Ta(n),t.u&&n.c&&(e=(i=e)[0],t=oe(o,i),e=T(n=pe(n),t)?i:(i=rt(n),t[0]+=i*Math.ceil((n[0]-t[0])/i),o.bg(t,e))),i=e[0],n=e[1],t=e[2],(o=!(o.minZoom>i||i>o.maxZoom)&&(!(o=(r=o.G())?ee(o,r,i):o.a?o.a[i]:null)||p(o,n,t)))?e:null}function dw(t,e){Me.call(this,t),this.tile=e}function vw(t){cw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tilePixelRatio:t.tilePixelRatio,wrapX:t.wrapX}),this.tileLoadFunction=t.tileLoadFunction,this.tileUrlFunction=this.Fc?this.Fc.bind(this):pw,this.urls=null,t.urls?this.eb(t.urls):t.url&&this.jb(t.url),t.tileUrlFunction&&this.cb(t.tileUrlFunction)}function bw(t){vw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,extent:t.extent,logo:t.logo,opaque:t.opaque,projection:t.projection,state:t.state,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction||xw,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:t.wrapX}),this.crossOrigin=void 0!==t.crossOrigin?t.crossOrigin:null,this.tileClass=t.tileClass||ov,this.g={},this.v={},this.Sa=t.reprojectionErrorThreshold,this.I=!1}function mw(t,e,o,i,r,n,s){return r=(o=gw(t,e=[e,o,i],n))?t.tileUrlFunction(o,r,n):void 0,(r=new t.tileClass(e,void 0!==r?0:4,void 0!==r?r:"",t.crossOrigin,t.tileLoadFunction)).key=s,de(r,"change",t.Li,t),r}function ww(t,e,o,i,r,n){var s=t.Sb(e,o,i),a=t.uc;if(t.a.b.hasOwnProperty(s)){if((h=t.a.get(s)).key!=a){var p=h,h=mw(t,e,o,i,r,n,a);if(0==p.getState()?h.i=p.i:h.i=p,h.i){e=h.i,o=h;do{if(2==e.getState()){e.i=null;break}}while(1!=e.getState()&&0==e.getState()?o.i=e.i:o=e,e=o.i)}t.a.replace(s,h)}}else h=mw(t,e,o,i,r,n,a),t.a.set(s,h);return h}function xw(t,e){t.Y().src=e}function Sw(t){this.B=void 0!==t.hidpi&&t.hidpi,bw.call(this,{cacheSize:t.cacheSize,crossOrigin:"anonymous",opaque:!0,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,tilePixelRatio:this.B?2:1,wrapX:void 0===t.wrapX||t.wrapX}),this.R=void 0!==t.culture?t.culture:"en-us",this.C=void 0!==t.maxZoom?t.maxZoom:-1,this.f=t.key,this.l=t.imagerySet,rw("https://dev.virtualearth.net/REST/v1/Imagery/Metadata/"+this.l+"?uriScheme=https&include=ImageryProviders&key="+this.f,this.pa.bind(this),void 0,"jsonp")}(Au=tw.prototype).sd=function(t,e){var o=this.a,i=o.i;return this.pa!=i&&(this.g.length=0,o=o.j,this.c||"vector"==o||(this.c=Ye()),this.c&&"vector"==o&&(this.c=null)),this.pa=i,Km.prototype.sd.apply(this,arguments)},Au.Of=function(t,e,o,i,r,n,s,a){var p=t,h=this.a,l=e.pixelRatio,u=e.viewState.projection,c=h.i,f=h.get(pb)||null,y=p.o;if(y.Nd||y.mf!=c||y.Kg!=f){for(var g=0,d=p.a.length;gTerms of Use'});function Pw(t){var e=void 0!==(t=t||{}).projection?t.projection:"EPSG:3857",o=void 0!==t.tileGrid?t.tileGrid:ne({extent:pe(e),maxZoom:t.maxZoom,minZoom:t.minZoom,tileSize:t.tileSize});bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:t.opaque,projection:e,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:o,tileLoadFunction:t.tileLoadFunction,tilePixelRatio:t.tilePixelRatio,tileUrlFunction:t.tileUrlFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX})}function Aw(t){this.C=t.account,this.B=t.map||"",this.f=t.config||{},this.l={},Pw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,maxZoom:void 0!==t.maxZoom?t.maxZoom:18,minZoom:t.minZoom,projection:t.projection,state:"loading",wrapX:t.wrapX}),Ew(this)}function Ew(t){var e,o,i=JSON.stringify(t.f);t.l[i]?Tw(t,t.l[i]):(e="https://"+t.C+".cartodb.com/api/v1/map",t.B&&(e+="/named/"+t.B),(o=new XMLHttpRequest).addEventListener("load",t.Dl.bind(t,i)),o.addEventListener("error",t.Cl.bind(t)),o.open("POST",e),o.setRequestHeader("Content-type","application/json"),o.send(JSON.stringify(t.f)))}function Tw(t,e){t.jb("https://"+e.cdn_url.https+"/"+t.C+"/api/v1/map/"+e.layergroupid+"/{z}/{x}/{y}.png")}function jw(t){fb.call(this,{attributions:t.attributions,extent:t.extent,logo:t.logo,projection:t.projection,wrapX:t.wrapX}),this.resolution=void 0,this.distance=void 0!==t.distance?t.distance:20,this.features=[],this.geometryFunction=t.geometryFunction||function(t){return O((t=t.V())instanceof hr,10),t},this.source=t.source,this.source.J("change",jw.prototype.sa,this)}function Cw(t){if(void 0!==t.resolution){t.features.length=0;for(var e=V(),o=t.distance*t.resolution,i=t.source.Xe(),r={},n=0,s=i.length;n>=1}return o.join("")}(e))}})),i.imageryProviders&&(p=Wt(Bt("EPSG:4326"),this.c),(t=i.imageryProviders.map(function(t){var e=t.attribution,n={};return t.coverageAreas.forEach(function(t){var e,o=t.zoomMin,i=Math.min(t.zoomMax,s);for(t=pt([(t=t.bbox)[1],t[0],t[3],t[2]],p),e=o;e<=i;++e){var r=e.toString(),o=ee(a,t,e);r in n?n[r].push(o):n[r]=[o]}}),new he({html:e,tileRanges:n})})).push(Mw),this.ua(t)),this.D=e,cb(this,"ready"))},e(Pw,bw),e(Aw,Pw),(Au=Aw.prototype).Kk=function(){return this.f},Au.tq=function(t){ht(this.f,t),Ew(this)},Au.Xp=function(t){this.f=t||{},Ew(this)},Au.Dl=function(t,e){if(!(e=e.target).status||200<=e.status&&e.status<300){try{var o=JSON.parse(e.responseText)}catch(t){return void cb(this,"error")}Tw(this,o),this.l[t]=o,cb(this,"ready")}else cb(this,"error")},Au.Cl=function(){cb(this,"error")},e(jw,fb),(Au=jw.prototype).$n=function(){return this.distance},Au.ao=function(){return this.source},Au.Yd=function(t,e,o){this.source.Yd(t,e,o),e!==this.resolution&&(this.clear(),this.resolution=e,Cw(this),this.cd(this.features))},Au.Yp=function(t){this.distance=t,this.sa()},Au.sa=function(){this.clear(),Cw(this),this.cd(this.features),fb.prototype.sa.call(this)},e(Rw,Fm),(Au=Rw.prototype).co=function(){return this.v},Au.Jc=function(t,e,o,i){if(void 0===this.f)return null;e=km(this,e),o=this.T?o:1;var r=this.M;if(r&&this.I==this.i&&r.resolution==e&&r.a==o&&N(r.G(),t))return r;ht(r={F:"image",FORMAT:"PNG32",TRANSPARENT:!0},this.v);var n=((t=t.slice())[0]+t[2])/2,s=(t[1]+t[3])/2;1!=this.B&&(a=this.B*rt(t)/2,p=this.B*tt(t)/2,t[0]=n-a,t[1]=s-p,t[2]=n+a,t[3]=s+p);var a=e/o,p=Math.ceil(rt(t)/a),h=Math.ceil(tt(t)/a);return t[0]=n-a*p/2,t[2]=n+a*p/2,t[1]=s-a*h/2,t[3]=s+a*h/2,this.l[0]=p,this.l[1]=h,n=t,s=this.l,a=o,i=i.mb.split(":").pop(),r.SIZE=s[0]+","+s[1],r.BBOX=n.join(","),r.BBOXSR=i,r.IMAGESR=i,r.DPI=Math.round(90*a),(n=(i=this.f).replace(/MapServer\/?$/,"MapServer/export").replace(/ImageServer\/?$/,"ImageServer/exportImage"))==i&&O(!1,50),r=Lw(n,r),this.M=new _d(t,e,o,this.j,r,this.R,this.g),this.I=this.i,de(this.M,"change",this.o,this),this.M},Au.bo=function(){return this.g},Au.eo=function(){return this.f},Au.fo=function(t){this.M=null,this.g=t,this.s()},Au.ho=function(t){t!=this.f&&(this.f=t,this.M=null,this.s())},Au.io=function(t){ht(this.v,t),this.M=null,this.s()},e(Iw,Fm),(Au=Iw.prototype).ko=function(){return this.g},Au.Jc=function(t,e,o){e=km(this,e),o=this.T?o:1;var i=this.M;if(i&&this.B==this.i&&i.resolution==e&&i.a==o&&N(i.G(),t))return i;1!=this.v&&at(t=t.slice(),this.v);var r,n,s,a,p,h,l,u=[rt(t)/e*o,tt(t)/e*o];return void 0!==this.I?(i=this.I,r=$(t),n=this.pa,s=rt(t),a=tt(t),p=u[0],h=u[1],l=.0254/this.l,u={OPERATION:this.va?"GETDYNAMICMAPOVERLAYIMAGE":"GETMAPIMAGE",VERSION:"2.0.0",LOCALE:"en",CLIENTAGENT:"ol.source.ImageMapGuide source",CLIP:"1",SETDISPLAYDPI:this.l,SETDISPLAYWIDTH:Math.round(u[0]),SETDISPLAYHEIGHT:Math.round(u[1]),SETVIEWSCALE:p*aOpenStreetMap contributors.'});function Bw(t){this.B=null,this.va=void 0!==t.operationType?t.operationType:"pixel",this.Sa=void 0!==t.threads?t.threads:1,this.g=function(t){for(var e=t.length,o=Array(e),i=0;ithis.fk;)this.Ed.shift().callback(null,null)},e.prototype.dh=function(){if(0===this.oe&&0Stamen Design, under CC BY 3.0.'}),Gw],Yw={terrain:{Lb:"jpg",opaque:!0},"terrain-background":{Lb:"jpg",opaque:!0},"terrain-labels":{Lb:"png",opaque:!1},"terrain-lines":{Lb:"png",opaque:!1},"toner-background":{Lb:"png",opaque:!0},toner:{Lb:"png",opaque:!0},"toner-hybrid":{Lb:"png",opaque:!1},"toner-labels":{Lb:"png",opaque:!1},"toner-lines":{Lb:"png",opaque:!1},"toner-lite":{Lb:"png",opaque:!0},watercolor:{Lb:"jpg",opaque:!0}},Hw={terrain:{minZoom:4,maxZoom:18},toner:{minZoom:0,maxZoom:20},watercolor:{minZoom:1,maxZoom:16}};function qw(t){bw.call(this,{attributions:(t=t||{}).attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.f=t.params||{},this.l=V(),yw(this,Jw(this))}function Jw(t){var e,o=0,i=[];for(e in t.f)i[o++]=e+"-"+t.f[e];return i.join("/")}function _w(t){cw.call(this,{opaque:!1,projection:t.projection,tileGrid:t.tileGrid,wrapX:void 0===t.wrapX||t.wrapX})}function $w(t,e,o){Qd.call(this,t,2),this.c=e,this.Ia=o,this.a=null}function Qw(t){var e;this.f=null,bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,projection:Bt("EPSG:3857"),reprojectionErrorThreshold:t.reprojectionErrorThreshold,state:"loading",tileLoadFunction:t.tileLoadFunction,wrapX:void 0===t.wrapX||t.wrapX}),t.url?t.jsonp?rw(t.url,this.og.bind(this),this.Ve.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Ao.bind(this)),e.addEventListener("error",this.zo.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.og(t.tileJSON):O(!1,51)}function tx(t){var e;cw.call(this,{projection:Bt("EPSG:3857"),state:"loading"}),this.v=void 0===t.preemptive||t.preemptive,this.l=pw,this.g=void 0,this.f=t.jsonp||!1,t.url?this.f?rw(t.url,this.pg.bind(this),this.We.bind(this)):((e=new XMLHttpRequest).addEventListener("load",this.Eo.bind(this)),e.addEventListener("error",this.Do.bind(this)),e.open("GET",t.url),e.send()):t.tileJSON?this.pg(t.tileJSON):O(!1,51)}function ex(t,e,o,i,r,n){Qd.call(this,t,e),this.o=o,this.a=i,this.v=r,this.c=this.j=this.g=null,this.l=n}function ox(t){var e;0==t.state&&(t.state=1,t.l?rw(t.o,t.Ji.bind(t),t.De.bind(t)):((e=new XMLHttpRequest).addEventListener("load",t.Co.bind(t)),e.addEventListener("error",t.Bo.bind(t)),e.open("GET",t.o),e.send()))}function ix(t){var e=(t=t||{}).params||{};bw.call(this,{attributions:t.attributions,cacheSize:t.cacheSize,crossOrigin:t.crossOrigin,logo:t.logo,opaque:!(!("TRANSPARENT"in e)||e.TRANSPARENT),projection:t.projection,reprojectionErrorThreshold:t.reprojectionErrorThreshold,tileGrid:t.tileGrid,tileLoadFunction:t.tileLoadFunction,url:t.url,urls:t.urls,wrapX:void 0===t.wrapX||t.wrapX}),this.C=void 0!==t.gutter?t.gutter:0,this.f=e,this.l=!0,this.B=t.serverType,this.T=void 0===t.hidpi||t.hidpi,this.R="",nx(this),this.fa=V(),ax(this),yw(this,sx(this))}function rx(t,e,o,i,r,n,s){var a=t.urls;if(a){if(s.WIDTH=o[0],s.HEIGHT=o[1],s[t.l?"CRS":"SRS"]=n.mb,"STYLES"in t.f||(s.STYLES=""),1!=r)switch(t.B){case"geoserver":o=90*r+.5|0,s.FORMAT_OPTIONS="FORMAT_OPTIONS"in s?s.FORMAT_OPTIONS+";dpi:"+o:"dpi:"+o;break;case"mapserver":s.MAP_RESOLUTION=90*r;break;case"carmentaserver":case"qgis":s.DPI=90*r;break;default:O(!1,52)}return n=n.b,t.l&&"ne"==n.substr(0,2)&&(t=i[0],i[0]=i[1],i[1]=t,t=i[2],i[2]=i[3],i[3]=t),s.BBOX=i.join(","),Lw(1==a.length?a[0]:a[L((e[1]<>=1,i>>=1;break;default:O(!1,53)}n.push([1,1]),n.reverse();for(var r=[1],s=[0],i=1,o=n.length;i=e+this.b&&a.height>=o+this.b)return s={offsetX:a.x+this.b,offsetY:a.y+this.b,image:this.f},this.c[t]=s,i.call(r,this.i,a.x+this.b,a.y+this.b),t=n,e+=this.b,i=o+this.b,e=a.width-e>a.height-i?(o={x:a.x+e,y:a.y,width:a.width-e,height:a.height},{x:a.x,y:a.y+i,width:e,height:a.height-i}):(o={x:a.x+e,y:a.y,width:a.width-e,height:i},{x:a.x,y:a.y+i,width:a.width,height:a.height-i}),xx(this,t,o,e),s}return null},Sx.prototype.add=function(t,e,o,i,r,n){return!(e+this.b>this.i||o+this.b>this.i)&&(i=Mx(this,!1,t,e,o,i,n))?(t=Mx(this,!0,t,e,o,r||w,n),{offsetX:i.offsetX,offsetY:i.offsetY,image:i.image,Zl:t.image}):null},t("ol.Attribution",he),he.prototype.getHTML=he.prototype.i,t("ol.Collection",Ne),Ne.prototype.extend=Ne.prototype.fg,Ne.prototype.getArray=Ne.prototype.tm,Ne.prototype.getLength=Ne.prototype.dc,Ne.prototype.insertAt=Ne.prototype.He,Ne.prototype.removeAt=Ne.prototype.Hg,Ne.prototype.setAt=Ne.prototype.Wp,t("ol.color.asArray",Be),t("ol.color.asString",Xe),t("ol.colorlike.asColorLike",ze),t("ol.control.defaults",ao),t("ol.coordinate.add",Ti),t("ol.coordinate.createStringXY",function(e){return function(t){return Oi(t,e)}}),t("ol.coordinate.format",Li),t("ol.coordinate.rotate",Ii),t("ol.coordinate.toStringHDMS",function(t,e){return t?Ci("NS",t[1],e)+" "+Ci("EW",t[0],e):""}),t("ol.coordinate.toStringXY",Oi),t("ol.DeviceOrientation",gh),gh.prototype.getAlpha=gh.prototype.Fk,gh.prototype.getBeta=gh.prototype.Ik,gh.prototype.getGamma=gh.prototype.Ok,gh.prototype.getHeading=gh.prototype.um,gh.prototype.getTracking=gh.prototype.Th,gh.prototype.setTracking=gh.prototype.gg,t("ol.easing.easeIn",to),t("ol.easing.easeOut",eo),t("ol.easing.inAndOut",oo),t("ol.easing.linear",io),t("ol.easing.upAndDown",function(t){return t<.5?oo(2*t):1-oo(2*(t-.5))}),t("ol.extent.boundingExtent",P),t("ol.extent.buffer",A),t("ol.extent.containsCoordinate",T),t("ol.extent.containsExtent",N),t("ol.extent.containsXY",j),t("ol.extent.createEmpty",V),t("ol.extent.equals",Z),t("ol.extent.extend",K),t("ol.extent.getArea",q),t("ol.extent.getBottomLeft",J),t("ol.extent.getBottomRight",_),t("ol.extent.getCenter",$),t("ol.extent.getHeight",tt),t("ol.extent.getIntersection",et),t("ol.extent.getSize",function(t){return[t[2]-t[0],t[3]-t[1]]}),t("ol.extent.getTopLeft",ot),t("ol.extent.getTopRight",it),t("ol.extent.getWidth",rt),t("ol.extent.intersects",nt),t("ol.extent.isEmpty",st),t("ol.extent.applyTransform",pt),t("ol.Feature",Ih),Ih.prototype.getGeometry=Ih.prototype.V,Ih.prototype.getId=Ih.prototype.wm,Ih.prototype.getGeometryName=Ih.prototype.Qk,Ih.prototype.getStyle=Ih.prototype.xm,Ih.prototype.getStyleFunction=Ih.prototype.Lc,Ih.prototype.setGeometry=Ih.prototype.Ra,Ih.prototype.setStyle=Ih.prototype.hg,Ih.prototype.setId=Ih.prototype.jc,Ih.prototype.setGeometryName=Ih.prototype.Tc,t("ol.featureloader.xhr",el),t("ol.Geolocation",Xd),Xd.prototype.getAccuracy=Xd.prototype.Dk,Xd.prototype.getAccuracyGeometry=Xd.prototype.Ek,Xd.prototype.getAltitude=Xd.prototype.Gk,Xd.prototype.getAltitudeAccuracy=Xd.prototype.Hk,Xd.prototype.getHeading=Xd.prototype.ym,Xd.prototype.getPosition=Xd.prototype.zm,Xd.prototype.getProjection=Xd.prototype.Uh,Xd.prototype.getSpeed=Xd.prototype.ll,Xd.prototype.getTracking=Xd.prototype.Vh,Xd.prototype.getTrackingOptions=Xd.prototype.Gh,Xd.prototype.setProjection=Xd.prototype.Wh,Xd.prototype.setTracking=Xd.prototype.Ke,Xd.prototype.setTrackingOptions=Xd.prototype.wj,t("ol.Graticule",Kd),Kd.prototype.getMap=Kd.prototype.Cm,Kd.prototype.getMeridians=Kd.prototype.al,Kd.prototype.getParallels=Kd.prototype.hl,t("ol.has.DEVICE_PIXEL_RATIO",Lo),t("ol.has.CANVAS",Io),t("ol.has.DEVICE_ORIENTATION",No),t("ol.has.GEOLOCATION",Fo),t("ol.has.TOUCH",ko),t("ol.has.WEBGL",Xo),_d.prototype.getImage=_d.prototype.Y,ov.prototype.getImage=ov.prototype.Y,t("ol.inherits",e),t("ol.interaction.defaults",Gn),t("ol.Kinetic",kr),t("ol.loadingstrategy.all",hb),t("ol.loadingstrategy.bbox",function(t){return[t]}),t("ol.loadingstrategy.tile",function(i){return function(t,e){e=i.tc(e),t=ee(i,t,e);var o=[];for((e=[e,0,0])[1]=t.ca;e[1]<=t.$;++e[1])for(e[2]=t.da;e[2]<=t.ia;++e[2])o.push(i.Aa(e));return o}}),t("ol.Map",Wp),Wp.prototype.addControl=Wp.prototype.kk,Wp.prototype.addInteraction=Wp.prototype.lk,Wp.prototype.addLayer=Wp.prototype.ih,Wp.prototype.addOverlay=Wp.prototype.jh,Wp.prototype.forEachFeatureAtPixel=Wp.prototype.we,Wp.prototype.forEachLayerAtPixel=Wp.prototype.Im,Wp.prototype.hasFeatureAtPixel=Wp.prototype.Yl,Wp.prototype.getEventCoordinate=Wp.prototype.Tf,Wp.prototype.getEventPixel=Wp.prototype.xe,Wp.prototype.getTarget=Wp.prototype.ag,Wp.prototype.getTargetElement=Wp.prototype.jd,Wp.prototype.getCoordinateFromPixel=Wp.prototype.Wa,Wp.prototype.getControls=Wp.prototype.Lk,Wp.prototype.getOverlays=Wp.prototype.fl,Wp.prototype.getOverlayById=Wp.prototype.el,Wp.prototype.getInteractions=Wp.prototype.Sk,Wp.prototype.getLayerGroup=Wp.prototype.Kc,Wp.prototype.getLayers=Wp.prototype.Xh,Wp.prototype.getPixelFromCoordinate=Wp.prototype.Ja,Wp.prototype.getSize=Wp.prototype.Ob,Wp.prototype.getView=Wp.prototype.Z,Wp.prototype.getViewport=Wp.prototype.sl,Wp.prototype.renderSync=Wp.prototype.Tp,Wp.prototype.removeControl=Wp.prototype.Mp,Wp.prototype.removeInteraction=Wp.prototype.Np,Wp.prototype.removeLayer=Wp.prototype.Pp,Wp.prototype.removeOverlay=Wp.prototype.Qp,Wp.prototype.setLayerGroup=Wp.prototype.qj,Wp.prototype.setSize=Wp.prototype.Qg,Wp.prototype.setTarget=Wp.prototype.Le,Wp.prototype.setView=Wp.prototype.iq,Wp.prototype.updateSize=Wp.prototype.Ad,t("ol.Object",je),je.prototype.getKeys=je.prototype.O,je.prototype.getProperties=je.prototype.N,je.prototype.setProperties=je.prototype.H,je.prototype.unset=je.prototype.P,t("ol.Observable",Te),t("ol.Observable.unByKey",function(t){if(Array.isArray(t))for(var e=0,o=t.length;e div",this.Base.container,!0);s<=i?(this.Base.container.style.right="auto",this.Base.container.style.left=t[0]+5+"px"):(this.Base.container.style.left="auto",this.Base.container.style.right="15px"),r<=a?(this.Base.container.style.bottom="auto",this.Base.container.style.top=t[1]-10+"px"):(this.Base.container.style.top="auto",this.Base.container.style.bottom=0),h.removeClass(this.Base.container,c.hidden),l.length&&(this.submenu.lastLeft=i<2*s?"-"+s+"px":this.submenu.left,l.forEach(function(t){var e=h.getViewportSize(),n=h.offset(t),i=n.height,s=a-i;s<0&&(s=i-(e.h-n.top),t.style.top="-"+s+"px"),t.style.left=o.submenu.lastLeft}))},e.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:n,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},e.prototype.closeMenu=function(){this.opened=!1,h.addClass(this.Base.container,c.hidden),this.Base.dispatchEvent({type:s})},e.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.handleEvent=function(e){var n=this;this.coordinateClicked=this.map.getEventCoordinate(e),this.pixelClicked=this.map.getEventPixel(e),this.Base.dispatchEvent({type:i,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===o&&(e.stopPropagation(),e.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),e.target.addEventListener("mousedown",{handleEvent:function(t){n.closeMenu(),e.target.removeEventListener(t.type,this,!1)}},!1))},e.prototype.setItemListener=function(t,n){var i,s=this;t&&"function"==typeof this.items[n].callback&&(i=this.items[n].callback,t.addEventListener("click",function(t){t.preventDefault();var e={coordinate:s.getCoordinateClicked(),data:s.items[n].data||null};s.closeMenu(),i(e,s.map)},!1))};function l(t){return this.Base=t,this.Base.container=this.container=this.createContainer(),this}var d;function u(t){void 0===t&&(t={}),h.assert("object"==typeof t,"@param `opt_options` should be object type!"),"default_items"in t&&(a.defaultItems=t.default_items),this.options=h.mergeOptions(a,t),this.disabled=!1,this.Internal=new e(this),this.Html=new l(this),d.call(this,{element:this.container})}return l.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),i=[c.container,c.OL_unselectable];return t&&i.push(c.hidden),e.className=i.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},l.prototype.createMenu=function(){var t=[];return"items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(r):this.Base.options.items:this.Base.options.defaultItems&&(t=r),0!==t.length&&void t.forEach(this.addMenuEntry,this)},l.prototype.addMenuEntry=function(t){var e=this;if(t.items&&Array.isArray(t.items)){t.classname=t.classname||"",h.contains(c.submenu,t.classname)||(t.classname=t.classname.length?" "+c.submenu:c.submenu);var n=this.generateHtmlAndPublish(this.container,t),i=this.createContainer();i.style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,n.appendChild(i),t.items.forEach(function(t){e.generateHtmlAndPublish(i,t,!0)})}else this.generateHtmlAndPublish(this.container,t)},l.prototype.generateHtmlAndPublish=function(t,e,n){var i,s,o,a=!1,r=h.getUniqueId();return"string"==typeof e&&"-"===e.trim()?(i=['
  • ',"
  • "].join(""),s=h.createFragment(i),o=[].slice.call(s.childNodes,0)[0],t.firstChild.appendChild(s),a=!0):(e.classname=e.classname||"",i=""+e.text+"",s=h.createFragment(i),o=document.createElement("li"),e.icon&&(""===e.classname?e.classname=c.icon:-1===e.classname.indexOf(c.icon)&&(e.classname+=" "+c.icon),o.setAttribute("style","background-image:url("+e.icon+")")),o.id=r,o.className=e.classname,o.appendChild(s),t.firstChild.appendChild(o)),this.Base.Internal.items[r]={id:r,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(o,r),o},l.prototype.removeMenuEntry=function(t){var e=h.find("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},l.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=h.createFragment("Foo"),n=h.createFragment("Foo"),i=document.createElement("li"),s=document.createElement("li");i.appendChild(e),s.appendChild(n),t.appendChild(i),t.appendChild(s),this.container.parentNode.appendChild(t);var o=t.offsetHeight/2;return this.container.parentNode.removeChild(t),o},(d=ol.control.Control)&&(u.__proto__=d),((u.prototype=Object.create(d&&d.prototype)).constructor=u).prototype.clear=function(){var e=this;Object.keys(this.Internal.items).forEach(function(t){e.Html.removeMenuEntry(t)})},u.prototype.close=function(){this.Internal.closeMenu()},u.prototype.enable=function(){this.disabled=!1},u.prototype.disable=function(){this.disabled=!0},u.prototype.getDefaultItems=function(){return r},u.prototype.extend=function(t){h.assert(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},u.prototype.isOpened=function(){return this.isOpen()},u.prototype.isOpen=function(){return this.Internal.opened},u.prototype.updatePosition=function(t){h.assert(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},u.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},u.prototype.push=function(t){h.assert(h.isDefAndNotNull(t),"@param `item` must be informed."),this.Html.addMenuEntry(t)},u.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},u.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),t?this.Internal.init(t,this):this.Internal.removeListeners()},u}) \ No newline at end of file +!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.ContextMenu=e()}(this,function(){"use strict";function e(t){return this.Base=t,this.map=void 0,this.viewport=void 0,this.coordinateClicked=void 0,this.pixelClicked=void 0,this.lineHeight=0,this.items={},this.opened=!1,this.submenu={left:t.options.width-15+"px",lastLeft:""},this.eventHandler=this.handleEvent.bind(this),this}var t="ol-ctx-menu",i="beforeopen",n="open",s="close",o="contextmenu",l={container:t+"-container",separator:t+"-separator",submenu:t+"-submenu",hidden:t+"-hidden",icon:t+"-icon",zoomIn:t+"-zoom-in",zoomOut:t+"-zoom-out",OL_unselectable:"ol-unselectable"},a={width:150,scrollAt:4,eventType:o,defaultItems:!0},r=[{text:"Zoom In",classname:[l.zoomIn,l.icon].join(" "),callback:function(t,e){e=e.getView();e.animate({zoom:+e.getZoom()+1,duration:700,center:t.coordinate})}},{text:"Zoom Out",classname:[l.zoomOut,l.icon].join(" "),callback:function(t,e){e=e.getView();e.animate({zoom:+e.getZoom()-1,duration:700,center:t.coordinate})}}],c={isNumeric:function(t){return/^\d+$/.test(t)},classRegex:function(t){return new RegExp("(^|\\s+) "+t+" (\\s+|$)")},addClass:function(t,e,n){var i=this;if(Array.isArray(t))t.forEach(function(t){i.addClass(t,e)});else for(var s=Array.isArray(e)?e:e.split(/\s+/),o=s.length;o--;)i.hasClass(t,s[o])||i._addClass(t,s[o],n)},_addClass:function(t,e,n){var i=this;t.classList?t.classList.add(e):t.className=(t.className+" "+e).trim(),n&&this.isNumeric(n)&&window.setTimeout(function(){i._removeClass(t,e)},n)},removeClass:function(t,e,n){var i=this;if(Array.isArray(t))t.forEach(function(t){i.removeClass(t,e,n)});else for(var s=Array.isArray(e)?e:e.split(/\s+/),o=s.length;o--;)i.hasClass(t,s[o])&&i._removeClass(t,s[o],n)},_removeClass:function(t,e,n){var i=this;t.classList?t.classList.remove(e):t.className=t.className.replace(this.classRegex(e)," ").trim(),n&&this.isNumeric(n)&&window.setTimeout(function(){i._addClass(t,e)},n)},hasClass:function(t,e){return t.classList?t.classList.contains(e):this.classRegex(e).test(t.className)},toggleClass:function(t,e){var n=this;return Array.isArray(t)?void t.forEach(function(t){n.toggleClass(t,e)}):void(t.classList?t.classList.toggle(e):this.hasClass(t,e)?this._removeClass(t,e):this._addClass(t,e))},$:function(t){return t="#"===t[0]?t.substr(1,t.length):t,document.getElementById(t)},isElement:function(t){return"HTMLElement"in window?!!t&&t instanceof HTMLElement:!!t&&"object"==typeof t&&1===t.nodeType&&!!t.nodeName},find:function(t,e,n){void 0===e&&(e=window.document);var i=Array.prototype.slice,s=[];if(/^(#?[\w-]+|\.[\w-.]+)$/.test(t))switch(t[0]){case"#":s=[this.$(t.substr(1))];break;case".":s=i.call(e.getElementsByClassName(t.substr(1).replace(/\./g," ")));break;default:s=i.call(e.getElementsByTagName(t))}else s=i.call(e.querySelectorAll(t));return n?s:s[0]},offset:function(t){var e=t.getBoundingClientRect(),n=document.documentElement;return{left:e.left+window.pageXOffset-n.clientLeft,top:e.top+window.pageYOffset-n.clientTop,width:t.offsetWidth,height:t.offsetHeight}},getViewportSize:function(){return{w:window.innerWidth||document.documentElement.clientWidth,h:window.innerHeight||document.documentElement.clientHeight}},getAllChildren:function(t,e){return[].slice.call(t.getElementsByTagName(e))},isEmpty:function(t){return!t||0===t.length},emptyArray:function(t){for(;t.length;)t.pop()},removeAllChildren:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},mergeOptions:function(t,e){var n,i,s={};for(n in t)s[n]=t[n];for(i in e)s[i]=e[i];return s},createFragment:function(t){var e=document.createDocumentFragment(),n=document.createElement("div");for(n.innerHTML=t;n.firstChild;)e.appendChild(n.firstChild);return e},contains:function(t,e){return!!~e.indexOf(t)},getUniqueId:function(){return"_"+Math.random().toString(36).substr(2,9)},isDefAndNotNull:function(t){return null!=t},assertEqual:function(t,e,n){if(t!==e)throw new Error(n+" mismatch: "+t+" != "+e)},assert:function(t,e){if(void 0===e&&(e="Assertion failed"),!t){if("undefined"!=typeof Error)throw new Error(e);throw e}}};e.prototype.init=function(t){this.map=t,this.viewport=t.getViewport(),this.setListeners(),this.Base.Html.createMenu(),this.lineHeight=0 div",this.Base.container,!0);s<=i?(this.Base.container.style.right="auto",this.Base.container.style.left=t[0]+5+"px"):(this.Base.container.style.left="auto",this.Base.container.style.right="15px"),e<=a?(this.Base.container.style.bottom="auto",this.Base.container.style.top=t[1]-10+"px"):(this.Base.container.style.top="auto",this.Base.container.style.bottom=0),c.removeClass(this.Base.container,l.hidden),n.length&&(this.submenu.lastLeft=i<2*s?"-"+s+"px":this.submenu.left,n.forEach(function(t){var e=c.getViewportSize(),n=c.offset(t),i=n.height,s=a-i;s<0&&(s=i-(e.h-n.top),t.style.top="-"+s+"px"),t.style.left=o.submenu.lastLeft}))},e.prototype.openMenu=function(t,e){this.Base.dispatchEvent({type:n,pixel:t,coordinate:e}),this.opened=!0,this.positionContainer(t)},e.prototype.closeMenu=function(){this.opened=!1,c.addClass(this.Base.container,l.hidden),this.Base.dispatchEvent({type:s})},e.prototype.setListeners=function(){this.viewport.addEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.removeListeners=function(){this.viewport.removeEventListener(this.Base.options.eventType,this.eventHandler,!1)},e.prototype.handleEvent=function(e){var n=this;this.coordinateClicked=this.map.getEventCoordinate(e),this.pixelClicked=this.map.getEventPixel(e),this.Base.dispatchEvent({type:i,pixel:this.pixelClicked,coordinate:this.coordinateClicked}),this.Base.disabled||(this.Base.options.eventType===o&&(e.stopPropagation(),e.preventDefault()),this.openMenu(this.pixelClicked,this.coordinateClicked),e.target.addEventListener("mousedown",{handleEvent:function(t){n.closeMenu(),e.target.removeEventListener(t.type,this,!1)}},!1))},e.prototype.setItemListener=function(t,e){var n,i=this;t&&"function"==typeof this.items[e].callback&&(n=this.items[e].callback,t.addEventListener("click",function(t){t.preventDefault();t={coordinate:i.getCoordinateClicked(),data:i.items[e].data||null};i.closeMenu(),n(t,i.map)},!1))};function h(t){return this.Base=t,this.Base.container=this.container=this.createContainer(),this}var d;function u(t){void 0===t&&(t={}),c.assert("object"==typeof t,"@param `opt_options` should be object type!"),"default_items"in t&&(a.defaultItems=t.default_items),this.options=c.mergeOptions(a,t),this.disabled=!1,this.Internal=new e(this),this.Html=new h(this),d.call(this,{element:this.container})}return h.prototype.createContainer=function(t){var e=document.createElement("div"),n=document.createElement("ul"),i=[l.container,l.OL_unselectable];return t&&i.push(l.hidden),e.className=i.join(" "),e.style.width=parseInt(this.Base.options.width,10)+"px",e.appendChild(n),e},h.prototype.createMenu=function(){var t=[];return"items"in this.Base.options?t=this.Base.options.defaultItems?this.Base.options.items.concat(r):this.Base.options.items:this.Base.options.defaultItems&&(t=r),0!==t.length&&void t.forEach(this.addMenuEntry,this)},h.prototype.addMenuEntry=function(t){var e,n,i=this;t.items&&Array.isArray(t.items)?(t.classname=t.classname||"",c.contains(l.submenu,t.classname)||(t.classname=t.classname.length?" "+l.submenu:l.submenu),e=this.generateHtmlAndPublish(this.container,t),(n=this.createContainer()).style.left=this.Base.Internal.submenu.lastLeft||this.Base.Internal.submenu.left,e.appendChild(n),t.items.forEach(function(t){i.generateHtmlAndPublish(n,t,!0)})):this.generateHtmlAndPublish(this.container,t)},h.prototype.generateHtmlAndPublish=function(t,e,n){var i,s,o,a=!1,r=c.getUniqueId();return"string"==typeof e&&"-"===e.trim()?(i=['
  • ',"
  • "].join(""),s=c.createFragment(i),o=[].slice.call(s.childNodes,0)[0],t.firstChild.appendChild(s),a=!0):(e.classname=e.classname||"",i=""+e.text+"",s=c.createFragment(i),o=document.createElement("li"),e.icon&&(""===e.classname?e.classname=l.icon:-1===e.classname.indexOf(l.icon)&&(e.classname+=" "+l.icon),o.setAttribute("style","background-image:url("+e.icon+")")),o.id=r,o.className=e.classname,o.appendChild(s),t.firstChild.appendChild(o)),this.Base.Internal.items[r]={id:r,submenu:n||0,separator:a,callback:e.callback,data:e.data||null},this.Base.Internal.setItemListener(o,r),o},h.prototype.removeMenuEntry=function(t){var e=c.find("#"+t,this.container.firstChild);e&&this.container.firstChild.removeChild(e),delete this.Base.Internal.items[t]},h.prototype.cloneAndGetLineHeight=function(){var t=this.container.cloneNode(),e=c.createFragment("Foo"),n=c.createFragment("Foo"),i=document.createElement("li"),s=document.createElement("li");i.appendChild(e),s.appendChild(n),t.appendChild(i),t.appendChild(s),this.container.parentNode.appendChild(t);s=t.offsetHeight/2;return this.container.parentNode.removeChild(t),s},(d=ol.control.Control)&&(u.__proto__=d),((u.prototype=Object.create(d&&d.prototype)).constructor=u).prototype.clear=function(){var e=this;Object.keys(this.Internal.items).forEach(function(t){e.Html.removeMenuEntry(t)})},u.prototype.close=function(){this.Internal.closeMenu()},u.prototype.enable=function(){this.disabled=!1},u.prototype.disable=function(){this.disabled=!0},u.prototype.getDefaultItems=function(){return r},u.prototype.extend=function(t){c.assert(Array.isArray(t),"@param `arr` should be an Array."),t.forEach(this.push,this)},u.prototype.isOpened=function(){return this.isOpen()},u.prototype.isOpen=function(){return this.Internal.opened},u.prototype.updatePosition=function(t){c.assert(Array.isArray(t),"@param `pixel` should be an Array."),this.isOpen()&&this.Internal.positionContainer(t)},u.prototype.pop=function(){var t=Object.keys(this.Internal.items);this.Html.removeMenuEntry(t[t.length-1])},u.prototype.push=function(t){c.assert(c.isDefAndNotNull(t),"@param `item` must be informed."),this.Html.addMenuEntry(t)},u.prototype.shift=function(){this.Html.removeMenuEntry(Object.keys(this.Internal.items)[0])},u.prototype.setMap=function(t){ol.control.Control.prototype.setMap.call(this,t),t?this.Internal.init(t,this):this.Internal.removeListeners()},u}) \ No newline at end of file diff --git a/public/scripts/u2f-api-min.js b/public/scripts/u2f-api-min.js index 7965e4e2..6cc5e26a 100644 --- a/public/scripts/u2f-api-min.js +++ b/public/scripts/u2f-api-min.js @@ -1 +1 @@ -"use strict";if(!window.u2f){var js_api_version,u2f=u2f||{};u2f.EXTENSION_ID="kmendfapggjehodndflmmgagdbamhnfd",u2f.MessageTypes={U2F_REGISTER_REQUEST:"u2f_register_request",U2F_REGISTER_RESPONSE:"u2f_register_response",U2F_SIGN_REQUEST:"u2f_sign_request",U2F_SIGN_RESPONSE:"u2f_sign_response",U2F_GET_API_VERSION_REQUEST:"u2f_get_api_version_request",U2F_GET_API_VERSION_RESPONSE:"u2f_get_api_version_response"},u2f.ErrorCodes={OK:0,OTHER_ERROR:1,BAD_REQUEST:2,CONFIGURATION_UNSUPPORTED:3,DEVICE_INELIGIBLE:4,TIMEOUT:5},u2f.U2fRequest,u2f.U2fResponse,u2f.Error,u2f.Transport,u2f.Transports,u2f.SignRequest,u2f.SignResponse,u2f.RegisterRequest,u2f.RegisterResponse,u2f.RegisteredKey,u2f.GetJsApiVersionResponse,u2f.getMessagePort=function(e){if("undefined"!=typeof chrome&&chrome.runtime){var t={type:u2f.MessageTypes.U2F_SIGN_REQUEST,signRequests:[]};chrome.runtime.sendMessage(u2f.EXTENSION_ID,t,function(){chrome.runtime.lastError?u2f.getIframePort_(e):u2f.getChromeRuntimePort_(e)})}else u2f.isAndroidChrome_()?u2f.getAuthenticatorPort_(e):u2f.isIosChrome_()?u2f.getIosPort_(e):u2f.getIframePort_(e)},u2f.isAndroidChrome_=function(){var e=navigator.userAgent;return-1!=e.indexOf("Chrome")&&-1!=e.indexOf("Android")},u2f.isIosChrome_=function(){var e=["iPhone","iPad","iPod"];for(var t in e)if(navigator.platform==e[t])return!0;return!1},u2f.getChromeRuntimePort_=function(e){var t=chrome.runtime.connect(u2f.EXTENSION_ID,{includeTlsChannelId:!0});setTimeout(function(){e(new u2f.WrappedChromeRuntimePort_(t))},0)},u2f.getAuthenticatorPort_=function(e){setTimeout(function(){e(new u2f.WrappedAuthenticatorPort_)},0)},u2f.getIosPort_=function(e){setTimeout(function(){e(new u2f.WrappedIosPort_)},0)},u2f.WrappedChromeRuntimePort_=function(e){this.port_=e},u2f.formatSignRequest_=function(e,t,r,o,n){if(void 0===js_api_version||js_api_version<1.1){for(var s=[],u=0;u>22},l.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?s.stringFromCodePoint(2097151&this.content):""},l.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},l.prototype.setFromCharData=function(e){this.fg=e[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t=!1;if(2>>16&255,e>>>8&255,255&e]},n.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},n.prototype.clone=function(){var e=new n;return e.fg=this.fg,e.bg=this.bg,e},n.prototype.isInverse=function(){return 67108864&this.fg},n.prototype.isBold=function(){return 134217728&this.fg},n.prototype.isUnderline=function(){return 268435456&this.fg},n.prototype.isBlink=function(){return 536870912&this.fg},n.prototype.isInvisible=function(){return 1073741824&this.fg},n.prototype.isItalic=function(){return 67108864&this.bg},n.prototype.isDim=function(){return 134217728&this.bg},n.prototype.getFgColorMode=function(){return 50331648&this.fg},n.prototype.getBgColorMode=function(){return 50331648&this.bg},n.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},n.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},n.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},n.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},n.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},n.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},n.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},n.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},n.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},n);function n(){this.fg=0,this.bg=0}t.AttributeData=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringFromCodePoint=function(e){return 65535>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length);for(var r="",n=t;n>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=(n.prototype.clear=function(){this._interim=0},n.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r=0,n=0;this._interim&&(56320<=(a=e.charCodeAt(n++))&&a<=57343?t[r++]=1024*(this._interim-55296)+a-56320+65536:(t[r++]=this._interim,t[r++]=a),this._interim=0);for(var o=n;o=i)return this._interim=s,r;var a;56320<=(a=e.charCodeAt(o))&&a<=57343?t[r++]=1024*(s-55296)+a-56320+65536:(t[r++]=s,t[r++]=a)}else t[r++]=s}return r},n);function n(){this._interim=0}t.StringToUtf32=r;var o=(s.prototype.clear=function(){this.interim.fill(0)},s.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function _(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function d(e,t,i){var r=e/255,n=t/255,o=i/255;return.2126*(r<=.03928?r/12.92:Math.pow((.055+r)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((.055+n)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((.055+o)/1.055,2.4))}Object.defineProperty(t,"__esModule",{value:!0}),(a=f=t.channels||(t.channels={})).toCss=function(e,t,i,r){return void 0!==r?"#"+c(e)+c(t)+c(i)+c(r):"#"+c(e)+c(t)+c(i)},a.toRgba=function(e,t,i,r){return void 0===r&&(r=255),(e<<24|t<<16|i<<8|r)>>>0},(r=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1==i)return{css:t.css,rgba:t.rgba};var r=t.rgba>>24&255,n=t.rgba>>16&255,o=t.rgba>>8&255,s=e.rgba>>24&255,a=e.rgba>>16&255,c=e.rgba>>8&255,l=s+Math.round((r-s)*i),h=a+Math.round((n-a)*i),u=c+Math.round((o-c)*i);return{css:f.toCss(l,h,u),rgba:f.toRgba(l,h,u)}},r.ensureContrastRatio=function(e,t,i){var r=s.ensureContrastRatio(e.rgba,t.rgba,i);if(r)return s.toColor(r>>24&255,r>>16&255,r>>8&255)},r.opaque=function(e){var t=(255|e.rgba)>>>0,i=s.toChannels(t),r=i[0],n=i[1],o=i[2];return{css:f.toCss(r,n,o),rgba:t}},(t.css||(t.css={})).toColor=function(e){return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0}},(o=h=t.rgb||(t.rgb={})).relativeLuminance=function(e){return d(e>>16&255,e>>8&255,255&e)},o.relativeLuminance2=d,(n=s=t.rgba||(t.rgba={})).ensureContrastRatio=function(e,t,i){var r=h.relativeLuminance(e>>8),n=h.relativeLuminance(t>>8);if(u(r,n)>24&255,e>>16&255,e>>8&255,255&e]},n.toColor=function(e,t,i){return{css:f.toCss(e,t,i),rgba:f.toRgba(e,t,i)}},t.toPaddedHex=c,t.contrastRatio=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,o=r?"node":navigator.platform;function s(e,t){return 0<=e.indexOf(t)}t.isFirefox=!!~n.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.isMac=s(["Macintosh","MacIntel","MacPPC","Mac68K"],o),t.isIpad="iPad"===o,t.isIphone="iPhone"===o,t.isWindows=s(["Windows","Win16","Win32","WinCE"],o),t.isLinux=0<=o.indexOf("Linux")},function(e,t,i){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),(n=t.C0||(t.C0={})).NUL="\0",n.SOH="",n.STX="",n.ETX="",n.EOT="",n.ENQ="",n.ACK="",n.BEL="",n.BS="\b",n.HT="\t",n.LF="\n",n.VT="\v",n.FF="\f",n.CR="\r",n.SO="",n.SI="",n.DLE="",n.DC1="",n.DC2="",n.DC3="",n.DC4="",n.NAK="",n.SYN="",n.ETB="",n.CAN="",n.EM="",n.SUB="",n.ESC="",n.FS="",n.GS="",n.RS="",n.US="",n.SP=" ",n.DEL="",(r=t.C1||(t.C1={})).PAD="€",r.HOP="",r.BPH="‚",r.NBH="ƒ",r.IND="„",r.NEL="…",r.SSA="†",r.ESA="‡",r.HTS="ˆ",r.HTJ="‰",r.VTS="Š",r.PLD="‹",r.PLU="Œ",r.RI="",r.SS2="Ž",r.SS3="",r.DCS="",r.PU1="‘",r.PU2="’",r.STS="“",r.CCH="”",r.MW="•",r.SPA="–",r.EPA="—",r.SOS="˜",r.SGCI="™",r.SCI="š",r.CSI="›",r.ST="œ",r.OSC="",r.PM="ž",r.APC="Ÿ"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),a=i(9),r=i(23),c=i(6),n=i(26),d=i(10),o=(l.prototype.dispose=function(){var e;this._container.removeChild(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},l.prototype._initCanvas=function(){this._ctx=n.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(e,t){},l.prototype.onSelectionChanged=function(e,t,i){void 0===i&&(i=!1)},l.prototype.setColors=function(e){this._refreshCharAtlas(e)},l.prototype._setTransparency=function(e){if(e!==this._alpha){var t=this._canvas;this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},l.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},l.prototype._fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(e,t,i){void 0===i&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(e,t,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},l.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},l.prototype._clearCells=function(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(i),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(e,t,i){var r,n,o=this._getContrastColor(e);o||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,i,o):(e.isInverse()?(r=e.isBgDefault()?a.INVERTED_DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?a.INVERTED_DEFAULT_COLOR:e.getFgColor()):(n=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),r=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=n,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i))},l.prototype._drawUncachedChars=function(e,t,i,r){if(this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse())if(r)this._ctx.fillStyle=r.css;else if(e.isBgDefault())this._ctx.fillStyle=d.color.opaque(this._colors.background).css;else if(e.isBgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(e.getBgColor()).join(",")+")";else{var n=e.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css}else if(r)this._ctx.fillStyle=r.css;else if(e.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(e.isFgRGB())this._ctx.fillStyle="rgb("+c.AttributeData.toColorRGB(e.getFgColor()).join(",")+")";else{var o=e.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&o<8&&(o+=8),this._ctx.fillStyle=this._colors.ansi[o].css}this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var i=e.getFgColor(),r=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();if(s){var c=i;i=n,n=c;var l=r;r=o,o=l}var h=this._resolveBackgroundRgba(o,n,s),u=this._resolveForegroundRgba(r,i,s,a),f=d.rgba.ensureContrastRatio(h,u,this._optionsService.options.minimumContrastRatio);if(f){var _={css:d.channels.toCss(f>>24&255,f>>16&255,f>>8&255),rgba:f};return this._colors.contrastCache.setColor(e.bg,e.fg,_),_}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},l.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return i?this._colors.foreground.rgba:this._colors.background.rgba}},l.prototype._resolveForegroundRgba=function(e,t,i,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return i?this._colors.background.rgba:this._colors.foreground.rgba}},l);function l(e,t,i,r,n,o,s,a){this._container=e,this._alpha=r,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}t.BaseRenderLayer=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n="di$target",o="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[o]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var r=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");!function(e,t,i){t[n]===t?t[o].push({id:e,index:i}):(t[o]=[{id:e,index:i}],t[n]=t)}(r,e,i)};return r.toString=function(){return e},t.serviceRegistry.set(e,r),r}},function(e,t,i){"use strict";function n(e,t,i,r){if(void 0===i&&(i=0),void 0===r&&(r=e.length),i>=e.length)return e;i=(e.length+i)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var n=i;n>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]},o.prototype.set=function(e,t){this._data[3*e+1]=t[a.CHAR_DATA_ATTR_INDEX],1>22},o.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},o.prototype.getFg=function(e){return this._data[3*e+1]},o.prototype.getBg=function(e){return this._data[3*e+2]},o.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},o.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},o.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},o.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?s.stringFromCodePoint(2097151&t):""},o.prototype.loadCell=function(e,t){var i=3*e;return t.content=this._data[0+i],t.fg=this._data[1+i],t.bg=this._data[2+i],2097152&t.content&&(t.combinedData=this._combined[e]),t},o.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},o.prototype.setCellFromCodePoint=function(e,t,i,r,n){this._data[3*e+0]=t|i<<22,this._data[3*e+1]=r,this._data[3*e+2]=n},o.prototype.addCodepointToCell=function(e,t){var i=this._data[3*e+0];2097152&i?this._combined[e]+=s.stringFromCodePoint(t):(2097151&i?(this._combined[e]=s.stringFromCodePoint(2097151&i)+s.stringFromCodePoint(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)},o.prototype.insertCells=function(e,t,i,r){var n,o,s,a;if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===(n=r)||void 0===n?void 0:n.fg)||0,(null===(o=r)||void 0===o?void 0:o.bg)||0),tthis.length){var i=new Uint32Array(3*e);this.length&&(3*e>22);return 0},o.prototype.copyCellsFrom=function(e,t,i,r,n){var o=e._data;if(n)for(var s=r-1;0<=s;s--)for(var a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];else for(s=0;s>22||1}return r},o);function o(e,t,i){void 0===i&&(i=!1),this.isWrapped=i,this._combined={},this._data=new Uint32Array(3*e);for(var r=t||h.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),n=0;n>8,r=255&this._subParamsIdx[t];0=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=2147483647=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=2147483647>8)},o.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,i=255&this._subParamsIdx[e];return 0>8,r=255&this._subParamsIdx[t];0r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},c.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},c);function c(e){this._handler=e,this._data="",this._hitLimit=!1}t.OscHandler=a},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=1e7},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),r=i(19),o=i(21),s=[],a=(c.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},c.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},c.prototype.setHandler=function(e,t){this._handlers[e]=[t]},c.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},c.prototype.setHandlerFallback=function(e){this._handlerFb=e},c.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},c.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var i=this._active.length-1;0<=i;i--)this._active[i].hook(t);else this._handlerFb(this._ident,"HOOK",t)},c.prototype.put=function(e,t,i){if(this._active.length)for(var r=this._active.length-1;0<=r;r--)this._active[r].put(e,t,i);else this._handlerFb(this._ident,"PUT",n.utf32ToString(e,t,i))},c.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;0<=t&&!1===this._active[t].unhook(e);t--);for(t--;0<=t;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},c);function c(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}t.DcsParser=a;var l=(h.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},h.prototype.put=function(e,t,i){this._hitLimit||(this._data+=n.utf32ToString(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},h.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params?this._params:new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},h);function h(e){this._handler=e,this._data="",this._hitLimit=!1}t.DcsHandler=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var h=i(24),u=i(42),f=[];t.acquireCharAtlas=function(e,t,i,r,n){for(var o=h.generateConfig(r,n,e,i),s=0;s=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)},p.prototype.translateToString=function(e,t,i){return this._line.translateToString(e,t,i)},p),u=(d.prototype.registerCsiHandler=function(e,t){return this._core.addCsiHandler(e,function(e){return t(e.toArray())})},d.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},d.prototype.registerDcsHandler=function(e,i){return this._core.addDcsHandler(e,function(e,t){return i(e,t.toArray())})},d.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},d.prototype.registerEscHandler=function(e,t){return this._core.addEscHandler(e,t)},d.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},d.prototype.registerOscHandler=function(e,t){return this._core.addOscHandler(e,t)},d.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},d),f=(_.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(_.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!0,configurable:!0}),Object.defineProperty(_.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!0,configurable:!0}),_);function _(e){this._core=e}function d(e){this._core=e}function p(e){this._line=e}function v(e){this._buffer=e}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(34),a=i(35),c=i(36),h=i(12),l=i(37),u=i(39),f=i(49),_=i(50),d=i(11),p=i(8),v=i(17),g=i(53),y=i(54),b=i(55),m=i(56),S=i(58),C=i(1),w=i(16),E=i(59),L=i(25),A=i(60),R=i(0),x=i(61),k=i(4),D=i(62),T=i(63),O=i(2),M=i(69),P=i(70),H=i(71),I=i(72),B=i(73),F=i(74),j=i(75),W=i(76),q=i(77),U=i(79),N="undefined"!=typeof window?window.document:null,z=(o=O.Disposable,n(K,o),Object.defineProperty(K.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onData",{get:function(){return this._onData.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onA11yChar",{get:function(){return this.onA11yCharEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"onA11yTab",{get:function(){return this.onA11yTabEmitter.event},enumerable:!0,configurable:!0}),K.prototype.dispose=function(){var e,t,i,r;this._isDisposed||(o.prototype.dispose.call(this),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0,null===(t=this._renderService)||void 0===t||t.dispose(),this._customKeyEventHandler=null,this.write=function(){},null===(r=null===(i=this.element)||void 0===i?void 0:i.parentNode)||void 0===r||r.removeChild(this.element))},K.prototype._setup=function(){var i=this;this._customKeyEventHandler=null,this.insertMode=!1,this.bracketedPasteMode=!1,this._userScrolling=!1,this._inputHandler?this._inputHandler.reset():(this._inputHandler=new l.InputHandler(this,this._bufferService,this._charsetService,this._coreService,this._dirtyRowService,this._logService,this.optionsService,this._coreMouseService,this.unicodeService,this._instantiationService),this._inputHandler.onRequestBell(function(){return i.bell()}),this._inputHandler.onRequestRefreshRows(function(e,t){return i.refresh(e,t)}),this._inputHandler.onRequestReset(function(){return i.reset()}),this._inputHandler.onCursorMove(function(){return i._onCursorMove.fire()}),this._inputHandler.onLineFeed(function(){return i._onLineFeed.fire()}),this.register(this._inputHandler)),this.linkifier||(this.linkifier=new f.Linkifier(this._bufferService,this._logService,this.optionsService,this.unicodeService)),this.options.windowsMode&&this._enableWindowsMode()},K.prototype._enableWindowsMode=function(){var e=this;if(!this._windowsMode){var t=[];t.push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),t.push(this.addCsiHandler({final:"H"},function(){return E.updateWindowsModeWrappedState(e._bufferService),!1})),this._windowsMode={dispose:function(){t.forEach(function(e){return e.dispose()})}}}},Object.defineProperty(K.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(K.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!0,configurable:!0}),K.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},K.prototype._setupOptionsListeners=function(){var s=this;this.optionsService.onOptionChange(function(e){var t,i,r,n,o;switch(e){case"fontFamily":case"fontSize":null===(t=s._renderService)||void 0===t||t.clear(),null===(i=s._charSizeService)||void 0===i||i.measure();break;case"cursorBlink":case"cursorStyle":s.refresh(s.buffer.y,s.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":s._renderService&&(s._renderService.clear(),s._renderService.onResize(s.cols,s.rows),s.refresh(0,s.rows-1));break;case"rendererType":s._renderService&&(s._renderService.setRenderer(s._createRenderer()),s._renderService.onResize(s.cols,s.rows));break;case"scrollback":s.buffers.resize(s.cols,s.rows),null===(r=s.viewport)||void 0===r||r.syncScrollArea();break;case"screenReaderMode":s.optionsService.options.screenReaderMode?!s._accessibilityManager&&s._renderService&&(s._accessibilityManager=new b.AccessibilityManager(s,s._renderService)):(null===(n=s._accessibilityManager)||void 0===n||n.dispose(),s._accessibilityManager=null);break;case"tabStopWidth":s.buffers.setupTabStops();break;case"theme":s._setTheme(s.optionsService.options.theme);break;case"windowsMode":s.optionsService.options.windowsMode?s._enableWindowsMode():(null===(o=s._windowsMode)||void 0===o||o.dispose(),s._windowsMode=void 0)}})},K.prototype._onTextAreaFocus=function(e){this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this.showCursor(),this._onFocus.fire()},K.prototype.blur=function(){return this.textarea.blur()},K.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},K.prototype._initGlobal=function(){var t=this;function e(e){return c.handlePasteEvent(e,t.textarea,t.bracketedPasteMode,t._coreService)}this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",function(e){t.hasSelection()&&c.copyHandler(e,t._selectionService)})),this.register(p.addDisposableDomListener(this.textarea,"paste",e)),this.register(p.addDisposableDomListener(this.element,"paste",e)),d.isFirefox?this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){2===e.button&&c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})):this.register(p.addDisposableDomListener(this.element,"contextmenu",function(e){c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})),d.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",function(e){1===e.button&&c.moveTextAreaUnderMouseCursor(e,t.textarea,t.screenElement)}))},K.prototype._bindKeys=function(){var t=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",function(e){return t._keyUp(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",function(e){return t._keyDown(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",function(e){return t._keyPress(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()})),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)})),this.register(p.addDisposableDomListener(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(e){return t._queueLinkification(e.start,e.end)}))},K.prototype.open=function(e){var i=this;if(!e)throw new Error("Terminal requires a parent element.");N.body.contains(e)||this._logService.warn("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var t=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(p.addDisposableDomListener(this.textarea,"focus",function(e){return i._onTextAreaFocus(e)})),this.register(p.addDisposableDomListener(this.textarea,"blur",function(){return i._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var r=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,r),this._charSizeService=this._instantiationService.createInstance(D.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(t),this._theme=this.options.theme||this._theme,this.options.theme=void 0,this._colorManager=new L.ColorManager(N,this.options.allowTransparency),this.optionsService.onOptionChange(function(e){return i._colorManager.onOptionsChange(e)}),this._colorManager.setTheme(this._theme);var n=this._createRenderer();this._renderService=this._instantiationService.createInstance(A.RenderService,n,this.rows,this.screenElement),this._instantiationService.setService(k.IRenderService,this._renderService),this._renderService.onRender(function(e){return i._onRender.fire(e)}),this.onResize(function(e){return i._renderService.resize(e.cols,e.rows)}),this._soundService=this._instantiationService.createInstance(g.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(e,t){return i.scrollLines(e,t)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this.viewport),this.register(this.onCursorMove(function(){return i._renderService.onCursorMove()})),this.register(this.onResize(function(){return i._renderService.onResize(i.cols,i.rows)})),this.register(this.onBlur(function(){return i._renderService.onBlur()})),this.register(this.onFocus(function(){return i._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return i.viewport.syncScrollArea()})),this._selectionService=this._instantiationService.createInstance(_.SelectionService,function(e,t){return i.scrollLines(e,t)},this.element,this.screenElement),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onSelectionChange(function(){return i._onSelectionChange.fire()})),this.register(this._selectionService.onRedrawRequest(function(e){return i._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(e){i.textarea.value=e,i.textarea.focus(),i.textarea.select()})),this.register(this.onScroll(function(){i.viewport.syncScrollArea(),i._selectionService.refresh()})),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",function(){return i._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return i._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){return i._selectionService.onMouseDown(e)})),this.mouseEvents?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},K.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},K.prototype._setTheme=function(e){var t,i,r;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(i=this._renderService)||void 0===i||i.setColors(this._colorManager.colors),null===(r=this.viewport)||void 0===r||r.onThemeChange(this._colorManager.colors)},K.prototype.bindMouse=function(){var o=this,n=this,t=this.element;function i(e){var t,i,r;if(!(t=n._mouseService.getRawByteCoords(e,n.screenElement,n.cols,n.rows)))return!1;switch(e.overrideType||e.type){case"mousemove":r=32,void 0===e.buttons?(i=3,void 0!==e.button&&(i=e.button<3?e.button:3)):i=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":r=0,i=e.button<3?e.button:3;break;case"mousedown":r=1,i=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(r=e.deltaY<0?0:1),i=4;break;default:return!1}return!(void 0===r||void 0===i||4=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+e,this.buffer.ybase),0),i!==this.buffer.ydisp&&(t||this._onScroll.fire(this.buffer.ydisp),this.refresh(0,this.rows-1))},K.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},K.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},K.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},K.prototype.scrollToLine=function(e){var t=e-this.buffer.ydisp;0!=t&&this.scrollLines(t)},K.prototype.paste=function(e){c.paste(e,this.textarea,this.bracketedPasteMode,this._coreService)},K.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},K.prototype.addEscHandler=function(e,t){return this._inputHandler.addEscHandler(e,t)},K.prototype.addDcsHandler=function(e,t){return this._inputHandler.addDcsHandler(e,t)},K.prototype.addCsiHandler=function(e,t){return this._inputHandler.addCsiHandler(e,t)},K.prototype.addOscHandler=function(e,t){return this._inputHandler.addOscHandler(e,t)},K.prototype.registerLinkMatcher=function(e,t,i){var r=this.linkifier.registerLinkMatcher(e,t,i);return this.refresh(0,this.rows-1),r},K.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},K.prototype.registerCharacterJoiner=function(e){var t=this._renderService.registerCharacterJoiner(e);return this.refresh(0,this.rows-1),t},K.prototype.deregisterCharacterJoiner=function(e){this._renderService.deregisterCharacterJoiner(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(K.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),K.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},K.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},K.prototype.select=function(e,t,i){this._selectionService.setSelection(e,t,i)},K.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},K.prototype.getSelectionPosition=function(){if(this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},K.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},K.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},K.prototype.selectLines=function(e,t){var i;null===(i=this._selectionService)||void 0===i||i.selectLines(e,t)},K.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=S.evaluateKeyboardEvent(e,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3!==t.type&&2!==t.type)return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(t.key!==h.C0.ETX&&t.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this.showCursor(),this._coreService.triggerDataEvent(t.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0)));var i=this.rows-1;return this.scrollLines(2===t.type?-i:i),this.cancel(e,!0)},K.prototype._isThirdLevelShift=function(e,t){var i=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"===t.type?i:i&&(!t.keyCode||47=c)if(l)o.x=0,o.y++,o.y===o.scrollBottom+1?(o.y--,this._terminal.scroll(this._eraseAttrData(),!0)):(o.y>=this._bufferService.rows&&(o.y=this._bufferService.rows-1),o.lines.get(o.y).isWrapped=!0),f=o.lines.get(o.y+o.ybase);else if(o.x=c-1,2===n)continue;if(h&&(f.insertCells(o.x,n,o.getNullCell(u),u),2===f.getWidth(c-1)&&f.setCellFromCodePoint(c-1,S.NULL_CELL_CODE,S.NULL_CELL_WIDTH,u.fg,u.bg)),f.setCellFromCodePoint(o.x++,r,n,u.fg,u.bg),0=this._bufferService.rows&&(e.y=this._bufferService.rows-1),e.x>=this._bufferService.cols&&e.x--,this._dirtyRowService.markDirty(e.y),this._onLineFeed.fire()},_.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},_.prototype.backspace=function(){this._restrictCursor(),0=this._bufferService.cols)){var e=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._terminal.onA11yTabEmitter.fire(this._bufferService.buffer.x-e)}},_.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},_.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},_.prototype._restrictCursor=function(){this._bufferService.buffer.x=Math.min(this._bufferService.cols-1,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},_.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=e,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+t):(this._bufferService.buffer.x=e,this._bufferService.buffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},_.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+e,this._bufferService.buffer.y+t)},_.prototype.cursorUp=function(e){var t=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;0<=t?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1))},_.prototype.cursorDown=function(e){var t=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;0<=t?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1)},_.prototype.cursorForward=function(e){this._moveCursor(e.params[0]||1,0)},_.prototype.cursorBackward=function(e){this._moveCursor(-(e.params[0]||1),0)},_.prototype.cursorNextLine=function(e){this.cursorDown(e),this._bufferService.buffer.x=0},_.prototype.cursorPrecedingLine=function(e){this.cursorUp(e),this._bufferService.buffer.x=0},_.prototype.cursorCharAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},_.prototype.cursorPosition=function(e){this._setCursor(2<=e.length?(e.params[1]||1)-1:0,(e.params[0]||1)-1)},_.prototype.charPosAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},_.prototype.hPositionRelative=function(e){this._moveCursor(e.params[0]||1,0)},_.prototype.linePosAbsolute=function(e){this._setCursor(this._bufferService.buffer.x,(e.params[0]||1)-1)},_.prototype.vPositionRelative=function(e){this._moveCursor(0,e.params[0]||1)},_.prototype.hVPosition=function(e){this.cursorPosition(e)},_.prototype.tabClear=function(e){var t=e.params[0];0===t?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===t&&(this._bufferService.buffer.tabs={})},_.prototype.cursorForwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1;t--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},_.prototype.cursorBackwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1,i=this._bufferService.buffer;t--;)i.x=i.prevStop()},_.prototype._eraseInBufferLine=function(e,t,i,r){void 0===r&&(r=!1);var n=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);n.replaceCells(t,i,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),r&&(n.isWrapped=!1)},_.prototype._resetBufferLine=function(e){var t=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);t.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),t.isWrapped=!1},_.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(),e.params[0]){case 0:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);t=this._bufferService.cols&&(this._bufferService.buffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var i=this._bufferService.buffer.lines.length-this._bufferService.rows;0i.scrollBottom||i.yi.scrollBottom||i.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.y0;276;0c"):this._terminal.is("rxvt-unicode")?this._coreService.triggerDataEvent(p.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._terminal.is("screen")&&this._coreService.triggerDataEvent(p.C0.ESC+"[>83;40003;0c"))},_.prototype.setMode=function(e){for(var t=0;tthis._bufferService.rows||0===t)&&(t=this._bufferService.rows),i=this._bufferService.rows&&(e.y=this._bufferService.rows-1),this._restrictCursor()},_.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},_.prototype.reverseIndex=function(){this._restrictCursor();var e=this._bufferService.buffer;if(e.y===e.scrollTop){var t=e.scrollBottom-e.scrollTop;e.lines.shiftElements(e.y+e.ybase,t,1),e.lines.set(e.y+e.ybase,e.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(e.scrollTop,e.scrollBottom)}else e.y--,this._restrictCursor()},_.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},_.prototype.reset=function(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()},_.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},_.prototype.setgLevel=function(e){this._charsetService.setgLevel(e)},_.prototype.screenAlignmentPattern=function(){var e=new C.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg;var t=this._bufferService.buffer;this._setCursor(0,0);for(var i=0;i",final:"c"},function(e){return u.sendDeviceAttributesSecondary(e)}),u._parser.setCsiHandler({final:"d"},function(e){return u.linePosAbsolute(e)}),u._parser.setCsiHandler({final:"e"},function(e){return u.vPositionRelative(e)}),u._parser.setCsiHandler({final:"f"},function(e){return u.hVPosition(e)}),u._parser.setCsiHandler({final:"g"},function(e){return u.tabClear(e)}),u._parser.setCsiHandler({final:"h"},function(e){return u.setMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"h"},function(e){return u.setModePrivate(e)}),u._parser.setCsiHandler({final:"l"},function(e){return u.resetMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"l"},function(e){return u.resetModePrivate(e)}),u._parser.setCsiHandler({final:"m"},function(e){return u.charAttributes(e)}),u._parser.setCsiHandler({final:"n"},function(e){return u.deviceStatus(e)}),u._parser.setCsiHandler({prefix:"?",final:"n"},function(e){return u.deviceStatusPrivate(e)}),u._parser.setCsiHandler({intermediates:"!",final:"p"},function(e){return u.softReset(e)}),u._parser.setCsiHandler({intermediates:" ",final:"q"},function(e){return u.setCursorStyle(e)}),u._parser.setCsiHandler({final:"r"},function(e){return u.setScrollRegion(e)}),u._parser.setCsiHandler({final:"s"},function(e){return u.saveCursor(e)}),u._parser.setCsiHandler({final:"t"},function(e){return u.windowOptions(e)}),u._parser.setCsiHandler({final:"u"},function(e){return u.restoreCursor(e)}),u._parser.setCsiHandler({intermediates:"'",final:"}"},function(e){return u.insertColumns(e)}),u._parser.setCsiHandler({intermediates:"'",final:"~"},function(e){return u.deleteColumns(e)}),u._parser.setExecuteHandler(p.C0.BEL,function(){return u.bell()}),u._parser.setExecuteHandler(p.C0.LF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(p.C0.VT,function(){return u.lineFeed()}),u._parser.setExecuteHandler(p.C0.FF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(p.C0.CR,function(){return u.carriageReturn()}),u._parser.setExecuteHandler(p.C0.BS,function(){return u.backspace()}),u._parser.setExecuteHandler(p.C0.HT,function(){return u.tab()}),u._parser.setExecuteHandler(p.C0.SO,function(){return u.shiftOut()}),u._parser.setExecuteHandler(p.C0.SI,function(){return u.shiftIn()}),u._parser.setExecuteHandler(p.C1.IND,function(){return u.index()}),u._parser.setExecuteHandler(p.C1.NEL,function(){return u.nextLine()}),u._parser.setExecuteHandler(p.C1.HTS,function(){return u.tabSet()}),u._parser.setOscHandler(0,new w.OscHandler(function(e){u.setTitle(e),u.setIconName(e)})),u._parser.setOscHandler(1,new w.OscHandler(function(e){return u.setIconName(e)})),u._parser.setOscHandler(2,new w.OscHandler(function(e){return u.setTitle(e)})),u._parser.setEscHandler({final:"7"},function(){return u.saveCursor()}),u._parser.setEscHandler({final:"8"},function(){return u.restoreCursor()}),u._parser.setEscHandler({final:"D"},function(){return u.index()}),u._parser.setEscHandler({final:"E"},function(){return u.nextLine()}),u._parser.setEscHandler({final:"H"},function(){return u.tabSet()}),u._parser.setEscHandler({final:"M"},function(){return u.reverseIndex()}),u._parser.setEscHandler({final:"="},function(){return u.keypadApplicationMode()}),u._parser.setEscHandler({final:">"},function(){return u.keypadNumericMode()}),u._parser.setEscHandler({final:"c"},function(){return u.fullReset()}),u._parser.setEscHandler({final:"n"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"o"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"|"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"}"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"~"},function(){return u.setgLevel(1)}),u._parser.setEscHandler({intermediates:"%",final:"@"},function(){return u.selectDefaultCharset()}),u._parser.setEscHandler({intermediates:"%",final:"G"},function(){return u.selectDefaultCharset()});function f(e){_._parser.setEscHandler({intermediates:"(",final:e},function(){return u.selectCharset("("+e)}),_._parser.setEscHandler({intermediates:")",final:e},function(){return u.selectCharset(")"+e)}),_._parser.setEscHandler({intermediates:"*",final:e},function(){return u.selectCharset("*"+e)}),_._parser.setEscHandler({intermediates:"+",final:e},function(){return u.selectCharset("+"+e)}),_._parser.setEscHandler({intermediates:"-",final:e},function(){return u.selectCharset("-"+e)}),_._parser.setEscHandler({intermediates:".",final:e},function(){return u.selectCharset("."+e)}),_._parser.setEscHandler({intermediates:"/",final:e},function(){return u.selectCharset("/"+e)})}var _=this;for(var d in v.CHARSETS)f(d);return u._parser.setEscHandler({intermediates:"#",final:"8"},function(){return u.screenAlignmentPattern()}),u._parser.setErrorHandler(function(e){return u._logService.error("Parsing error: ",e),e}),u._parser.setDcsHandler({intermediates:"$",final:"q"},new L(u._bufferService,u._coreService,u._logService,u._optionsService)),u}function d(e,t,i,r){this._bufferService=e,this._coreService=t,this._logService=i,this._optionsService=r,this._data=new Uint32Array(0)}t.InputHandler=f},function(e,i,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(15),a=t(19),c=t(20),l=t(22),h=(u.prototype.setDefault=function(e,t){s.fill(this.table,e<<4|t)},u.prototype.add=function(e,t,i,r){this.table[t<<8|e]=i<<4|r},u.prototype.addMany=function(e,t,i,r){for(var n=0;no||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(i<<=8)|o},d.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},d.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},d.prototype.setPrintHandler=function(e){this._printHandler=e},d.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},d.prototype.addEscHandler=function(e,t){var i=this._identifier(e,[48,126]);void 0===this._escHandlers[i]&&(this._escHandlers[i]=[]);var r=this._escHandlers[i];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},d.prototype.setEscHandler=function(e,t){this._escHandlers[this._identifier(e,[48,126])]=[t]},d.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},d.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},d.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},d.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},d.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},d.prototype.addCsiHandler=function(e,t){var i=this._identifier(e);void 0===this._csiHandlers[i]&&(this._csiHandlers[i]=[]);var r=this._csiHandlers[i];return r.push(t),{dispose:function(){var e=r.indexOf(t);-1!==e&&r.splice(e,1)}}},d.prototype.setCsiHandler=function(e,t){this._csiHandlers[this._identifier(e)]=[t]},d.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},d.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},d.prototype.addDcsHandler=function(e,t){return this._dcsParser.addHandler(this._identifier(e),t)},d.prototype.setDcsHandler=function(e,t){this._dcsParser.setHandler(this._identifier(e),t)},d.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},d.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},d.prototype.addOscHandler=function(e,t){return this._oscParser.addHandler(e,t)},d.prototype.setOscHandler=function(e,t){this._oscParser.setHandler(e,t)},d.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},d.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},d.prototype.setErrorHandler=function(e){this._errorHandler=e},d.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},d.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},d.prototype.parse=function(e,t){for(var i=0,r=0,n=this.currentState,o=this._oscParser,s=this._dcsParser,a=this._collect,c=this._params,l=this.TRANSITIONS.table,h=0;h>4){case 2:for(var u=h+1;;++u){if(t<=u||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=i},a);function a(e,t,i,r,n,o,s,a){var c=l.call(this,e,"text",t,n,i,o,s,a)||this;return c.bufferService=s,c.optionsService=a,c._characterWidth=0,c._characterFont="",c._characterOverlapCache={},c._workCell=new f.CellData,c._state=new h.GridCache,c._characterJoinerRegistry=r,c}t.TextRenderLayer=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.resize=function(e,t){for(var i=0;i>>24,n=t.rgba>>>16&255,o=t.rgba>>>8&255,s=0;s=this.capacity)i=this._head,this._unlinkNode(i),delete this._map[i.key],i.key=e,i.value=t,this._map[e]=i;else{var r=this._nodePool;0=this._bufferService.rows||s<0)){if(this._ctx.fillStyle=this._colors.selection.css,i){var a=e[0],c=t[0]-a,l=s-o+1;this._fillCells(a,o,c,l)}else{a=r===o?e[0]:0;var h=o===s?t[0]:this._bufferService.cols;this._fillCells(a,o,h-a,1);var u=Math.max(s-o-1,0);if(this._fillCells(0,o+1,this._bufferService.cols,u),o!==s){var f=n===s?t[0]:this._bufferService.cols;this._fillCells(0,s,f,1)}}this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},s.prototype._didStateChange=function(e,t,i,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||r!==this._state.ydisp},s.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},s);function s(e,t,i,r,n,o){var s=a.call(this,e,"selection",t,!0,i,r,n,o)||this;return s.bufferService=n,s.optionsService=o,s._clearState(),s}t.SelectionRenderLayer=o},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var h,o=i(13),u=i(5),s=(h=o.BaseRenderLayer,n(a,h),a.prototype.resize=function(e){h.prototype.resize.call(this,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},a.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},a.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},a.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},a.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new c(this._coreBrowserService.isFocused,function(){t._render(!0)})):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},a.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},a.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},a.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else if(this._bufferService.buffer.lines.get(t).loadCell(this._bufferService.buffer.x,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var r=this._optionsService.options.cursorStyle;return r&&"block"!==r?this._cursorRenderers[r](this._bufferService.buffer.x,i,this._cell):this._renderBlurCursor(this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=r,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===this._bufferService.buffer.x&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},a.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},a.prototype._renderBarCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.options.cursorWidth),this._ctx.restore()},a.prototype._renderBlockCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,e,t),this._ctx.restore()},a.prototype._renderUnderlineCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},a.prototype._renderBlurCursor=function(e,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,i.getWidth(),1),this._ctx.restore()},a);function a(e,t,i,r,n,o,s,a,c){var l=h.call(this,e,"cursor",t,!0,i,r,o,s)||this;return l._onRequestRefreshRowsEvent=n,l.bufferService=o,l.optionsService=s,l._coreService=a,l._coreBrowserService=c,l._cell=new u.CellData,l._state={x:0,y:0,isFocused:!1,style:"",width:0},l._cursorRenderers={bar:l._renderBarCursor.bind(l),block:l._renderBlockCursor.bind(l),underline:l._renderUnderlineCursor.bind(l)},l}t.CursorRenderLayer=s;var c=(Object.defineProperty(l.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),l.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},l.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=void 0})))},l.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,0=e.lines.length)){for(var i=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,r=Math.ceil(2e3/this._bufferService.cols),n=this._bufferService.buffer.iterator(!1,t,i,r,r);n.hasNext();)for(var o=n.next(),s=0;s>9&511:void 0;a.validationCallback?a.validationCallback(t,function(e){l._rowsTimeoutId||e&&l._addLink(i[1],i[0]-l._bufferService.buffer.ydisp,t,a,n)}):f._addLink(i[1],i[0]-f._bufferService.buffer.ydisp,t,a,n)},f=this;null!==(c=h.exec(s))&&"break"!==e(););},o.prototype._addLink=function(e,t,i,r,n){var o=this;if(this._mouseZoneManager&&this._element){var s=this._unicodeService.getStringCellWidth(i),a=e%this._bufferService.cols,c=t+Math.floor(e/this._bufferService.cols),l=(a+s)%this._bufferService.cols,h=c+Math.floor((a+s)/this._bufferService.cols);0===l&&(l=this._bufferService.cols,h--),this._mouseZoneManager.add(new u(1+a,c+1,l+1,h+1,function(e){if(r.handler)return r.handler(e,i);var t=window.open();t?(t.opener=null,t.location.href=i):console.warn("Opening link blocked as opener could not be cleared")},function(){o._onLinkHover.fire(o._createLinkHoverEvent(a,c,l,h,n)),o._element.classList.add("xterm-cursor-pointer")},function(e){o._onLinkTooltip.fire(o._createLinkHoverEvent(a,c,l,h,n)),r.hoverTooltipCallback&&r.hoverTooltipCallback(e,i,{start:{x:a,y:c},end:{x:l,y:h}})},function(){o._onLinkLeave.fire(o._createLinkHoverEvent(a,c,l,h,n)),o._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(e){return!r.willLinkActivate||r.willLinkActivate(e,i)}))}},o.prototype._createLinkHoverEvent=function(e,t,i,r,n){return{x1:e,y1:t,x2:i,y2:r,cols:this._bufferService.cols,fg:n}},o._timeBeforeLatency=200,o);function o(e,t,i,r){this._bufferService=e,this._logService=t,this._optionsService=i,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onLinkHover=new n.EventEmitter,this._onLinkLeave=new n.EventEmitter,this._onLinkTooltip=new n.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}t.Linkifier=r;var u=function(e,t,i,r,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=u},function(e,t,i){"use strict";var r=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3t[1]&&e[1]=t[0]&&e[0]=t[0]},v.prototype.selectWordAtCursor=function(e){var t=this._getMouseBufferCoords(e);t&&(this._selectWordAt(t,!1),this._model.selectionEnd=void 0,this.refresh(!0))},v.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},v.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},v.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},v.prototype._getMouseBufferCoords=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(t)return t[0]--,t[1]--,t[1]+=this._bufferService.buffer.ydisp,t},v.prototype._getMouseEventScrollAmount=function(e){var t=a.getCoordsRelativeToElement(e,this._screenElement)[1],i=this._bufferService.rows*Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight);return 0<=t&&t<=i?0:(i=r;r++){var n=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:1=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;0this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}},v.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&0<=this._optionsService.options.wordSeparator.indexOf(e.getChars())},v.prototype._selectLineAt=function(e){var t=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,t.first],this._model.selectionEnd=[this._bufferService.cols,t.last],this._model.selectionStartLength=0},r([n(3,o.ICharSizeService),n(4,s.IBufferService),n(5,s.ICoreService),n(6,o.IMouseService),n(7,s.IOptionsService)],v));function v(e,t,i,r,n,o,s,a){var c=this;this._scrollLines=e,this._element=t,this._screenElement=i,this._charSizeService=r,this._bufferService=n,this._coreService=o,this._mouseService=s,this._optionsService=a,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new h.CellData,this._mouseDownTimeStamp=0,this._onLinuxMouseSelection=new u.EventEmitter,this._onRedrawRequest=new u.EventEmitter,this._onSelectionChange=new u.EventEmitter,this._mouseMoveListener=function(e){return c._onMouseMove(e)},this._mouseUpListener=function(e){return c._onMouseUp(e)},this._coreService.onUserInput(function(){c.hasSelection&&c.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(function(e){return c._onTrim(e)}),this._bufferService.buffers.onBufferActivate(function(e){return c._onBufferActivate(e)}),this.enable(),this._model=new l.SelectionModel(this._bufferService),this._activeSelectionMode=0}t.SelectionService=p},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(n.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(this.selectionEnd&&!this.areSelectionValuesReversed())return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd;var e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}},enumerable:!0,configurable:!0}),n.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},n.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},n);function n(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}t.SelectionModel=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(12);function _(e,t,i,r){var n=e-d(i,e),o=t-d(i,t);return g(Math.abs(n-o)-function(e,t,i){for(var r=0,n=e-d(i,e),o=t-d(i,t),s=0;so.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),e=s=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function v(e,t){var i=t?"O":"[";return r.C0.ESC+i+e}function g(e,t){e=Math.floor(e);for(var i="",r=0;re&&r.y1<=t+1||r.y2>e&&r.y2<=t+1||r.y1t+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},_.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},_.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},_.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},_.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&((this._currentZone=i).hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=setTimeout(function(){return t._onTooltip(e)},500)))},_.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t&&t.tooltipCallback&&t.tooltipCallback(e)},_.prototype._onMouseDown=function(e){var t;this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive&&(null===(t=this._findZoneEventAt(e))||void 0===t?void 0:t.willLinkActivate(e))&&(e.preventDefault(),e.stopImmediatePropagation())},_.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},_.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},_.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},_.prototype._findZoneEventAt=function(e){var t=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(t)for(var i=t[0],r=t[1],n=0;n=o.x1&&i=o.x1||r===o.y2&&io.y1&&re;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},_.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},_.prototype._onTab=function(e){for(var t=0;tt;)this._rowContainer.removeChild(this._rowElements.pop())},m.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},m.prototype.onCharSizeChanged=function(){this._updateDimensions()},m.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},m.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},m.prototype.onSelectionChanged=function(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(e&&t){var r=e[1]-this._bufferService.buffer.ydisp,n=t[1]-this._bufferService.buffer.ydisp,o=Math.max(r,0),s=Math.min(n,this._bufferService.rows-1);if(!(o>=this._bufferService.rows||s<0)){var a=document.createDocumentFragment();if(i)a.appendChild(this._createSelectionElement(o,e[0],t[0],s-o+1));else{var c=r===o?e[0]:0,l=o===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(o,c,l));var h=s-o-1;if(a.appendChild(this._createSelectionElement(o+1,0,this._bufferService.cols,h)),o!==s){var u=n===s?t[0]:this._bufferService.cols;a.appendChild(this._createSelectionElement(s,0,u))}}this._selectionContainer.appendChild(a)}}},m.prototype._createSelectionElement=function(e,t,i,r){void 0===r&&(r=1);var n=document.createElement("div");return n.style.height=r*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(i-t)+"px",n},m.prototype.onCursorMove=function(){},m.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},m.prototype.clear=function(){this._rowElements.forEach(function(e){return e.innerHTML=""})},m.prototype.renderRows=function(e,t){for(var i=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=this._bufferService.buffer.x,n=this._optionsService.options.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerHTML="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.options.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a===i,l,r,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(m.prototype,"_terminalSelector",{get:function(){return"."+p+this._terminalClass},enumerable:!0,configurable:!0}),m.prototype.registerCharacterJoiner=function(e){return-1},m.prototype.deregisterCharacterJoiner=function(e){return!1},m.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},m.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},m.prototype._setCellUnderline=function(e,t,i,r,n,o){for(;e!==t||i!==r;){var s=this._rowElements[i];if(!s)return;var a=s.children[e];a&&(a.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,i++)}},o([s(5,u.ICharSizeService),s(6,f.IOptionsService),s(7,f.IBufferService)],m));function m(e,t,i,r,n,o,s,a){var c=l.call(this)||this;return c._colors=e,c._element=t,c._screenElement=i,c._viewportElement=r,c._linkifier=n,c._charSizeService=o,c._optionsService=s,c._bufferService=a,c._terminalClass=y++,c._rowElements=[],c._onRequestRefreshRows=new _.EventEmitter,c._rowContainer=document.createElement("div"),c._rowContainer.classList.add(v),c._rowContainer.style.lineHeight="normal",c._rowContainer.setAttribute("aria-hidden","true"),c._refreshRowElements(c._bufferService.cols,c._bufferService.rows),c._selectionContainer=document.createElement("div"),c._selectionContainer.classList.add(g),c._selectionContainer.setAttribute("aria-hidden","true"),c.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},c._updateDimensions(),c._injectCss(),c._rowFactory=new h.DomRendererRowFactory(document,c._optionsService,c._colors),c._element.classList.add(p+c._terminalClass),c._screenElement.appendChild(c._rowContainer),c._screenElement.appendChild(c._selectionContainer),c._linkifier.onLinkHover(function(e){return c._onLinkHover(e)}),c._linkifier.onLinkLeave(function(e){return c._onLinkLeave(e)}),c}t.DomRenderer=b},function(e,m,t){"use strict";Object.defineProperty(m,"__esModule",{value:!0});var S=t(9),C=t(3),r=t(5),w=t(10);m.BOLD_CLASS="xterm-bold",m.DIM_CLASS="xterm-dim",m.ITALIC_CLASS="xterm-italic",m.UNDERLINE_CLASS="xterm-underline",m.CURSOR_CLASS="xterm-cursor",m.CURSOR_BLINK_CLASS="xterm-cursor-blink",m.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",m.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",m.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var i=(n.prototype.setColors=function(e){this._colors=e},n.prototype.createRow=function(e,t,i,r,n,o,s){for(var a=this._document.createDocumentFragment(),c=0,l=Math.min(e.length,s)-1;0<=l;l--)if(e.loadCell(l,this._workCell).getCode()!==C.NULL_CELL_CODE||t&&l===r){c=l+1;break}for(l=0;l>16&255,f>>8&255,255&f);this._applyMinimumContrast(u,this._colors.background,b)||this._addStyle(u,"color:#"+E(f.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(u,this._colors.background,this._colors.foreground)||v&&u.classList.add("xterm-fg-"+S.INVERTED_DEFAULT_COLOR)}switch(p){case 16777216:case 33554432:u.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(u,"background-color:#"+E(d.toString(16),"0",6));break;case 0:default:v&&u.classList.add("xterm-bg-"+S.INVERTED_DEFAULT_COLOR)}a.appendChild(u)}}return a},n.prototype._applyMinimumContrast=function(e,t,i){if(1===this._optionsService.options.minimumContrastRatio)return!1;var r=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===r&&(r=w.color.ensureContrastRatio(t,i,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=r?r:null)),!!r&&(this._addStyle(e,"color:"+r.css),!0)},n.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},n);function n(e,t,i){this._document=e,this._optionsService=t,this._colors=i,this._workCell=new r.CellData}function E(e,t,i){for(;e.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,i,r){var n={type:0,cancel:!1,key:void 0},o=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?n.key=t?l.C0.ESC+"OA":l.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?n.key=t?l.C0.ESC+"OD":l.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?n.key=t?l.C0.ESC+"OC":l.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(n.key=t?l.C0.ESC+"OB":l.C0.ESC+"[B");break;case 8:if(e.shiftKey){n.key=l.C0.BS;break}if(e.altKey){n.key=l.C0.ESC+l.C0.DEL;break}n.key=l.C0.DEL;break;case 9:if(e.shiftKey){n.key=l.C0.ESC+"[Z";break}n.key=l.C0.HT,n.cancel=!0;break;case 13:n.key=l.C0.CR,n.cancel=!0;break;case 27:n.key=l.C0.ESC,n.cancel=!0;break;case 37:if(e.metaKey)break;o?(n.key=l.C0.ESC+"[1;"+(1+o)+"D",n.key===l.C0.ESC+"[1;3D"&&(n.key=l.C0.ESC+(i?"b":"[1;5D"))):n.key=t?l.C0.ESC+"OD":l.C0.ESC+"[D";break;case 39:if(e.metaKey)break;o?(n.key=l.C0.ESC+"[1;"+(1+o)+"C",n.key===l.C0.ESC+"[1;3C"&&(n.key=l.C0.ESC+(i?"f":"[1;5C"))):n.key=t?l.C0.ESC+"OC":l.C0.ESC+"[C";break;case 38:if(e.metaKey)break;o?(n.key=l.C0.ESC+"[1;"+(1+o)+"A",i||n.key!==l.C0.ESC+"[1;3A"||(n.key=l.C0.ESC+"[1;5A")):n.key=t?l.C0.ESC+"OA":l.C0.ESC+"[A";break;case 40:if(e.metaKey)break;o?(n.key=l.C0.ESC+"[1;"+(1+o)+"B",i||n.key!==l.C0.ESC+"[1;3B"||(n.key=l.C0.ESC+"[1;5B")):n.key=t?l.C0.ESC+"OB":l.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(n.key=l.C0.ESC+"[2~");break;case 46:n.key=o?l.C0.ESC+"[3;"+(1+o)+"~":l.C0.ESC+"[3~";break;case 36:n.key=o?l.C0.ESC+"[1;"+(1+o)+"H":t?l.C0.ESC+"OH":l.C0.ESC+"[H";break;case 35:n.key=o?l.C0.ESC+"[1;"+(1+o)+"F":t?l.C0.ESC+"OF":l.C0.ESC+"[F";break;case 33:e.shiftKey?n.type=2:n.key=l.C0.ESC+"[5~";break;case 34:e.shiftKey?n.type=3:n.key=l.C0.ESC+"[6~";break;case 112:n.key=o?l.C0.ESC+"[1;"+(1+o)+"P":l.C0.ESC+"OP";break;case 113:n.key=o?l.C0.ESC+"[1;"+(1+o)+"Q":l.C0.ESC+"OQ";break;case 114:n.key=o?l.C0.ESC+"[1;"+(1+o)+"R":l.C0.ESC+"OR";break;case 115:n.key=o?l.C0.ESC+"[1;"+(1+o)+"S":l.C0.ESC+"OS";break;case 116:n.key=o?l.C0.ESC+"[15;"+(1+o)+"~":l.C0.ESC+"[15~";break;case 117:n.key=o?l.C0.ESC+"[17;"+(1+o)+"~":l.C0.ESC+"[17~";break;case 118:n.key=o?l.C0.ESC+"[18;"+(1+o)+"~":l.C0.ESC+"[18~";break;case 119:n.key=o?l.C0.ESC+"[19;"+(1+o)+"~":l.C0.ESC+"[19~";break;case 120:n.key=o?l.C0.ESC+"[20;"+(1+o)+"~":l.C0.ESC+"[20~";break;case 121:n.key=o?l.C0.ESC+"[21;"+(1+o)+"~":l.C0.ESC+"[21~";break;case 122:n.key=o?l.C0.ESC+"[23;"+(1+o)+"~":l.C0.ESC+"[23~";break;case 123:n.key=o?l.C0.ESC+"[24;"+(1+o)+"~":l.C0.ESC+"[24~";break;default:if(!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)if(i&&!r||!e.altKey||e.metaKey)i&&!e.altKey&&!e.ctrlKey&&e.metaKey?65===e.keyCode&&(n.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&48<=e.keyCode&&1===e.key.length?n.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(n.key=l.C0.US);else{var s=h[e.keyCode],a=s&&s[e.shiftKey?1:0];if(a)n.key=l.C0.ESC+a;else if(65<=e.keyCode&&e.keyCode<=90){var c=e.ctrlKey?e.keyCode-64:e.keyCode+32;n.key=l.C0.ESC+String.fromCharCode(c)}}else 65<=e.keyCode&&e.keyCode<=90?n.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?n.key=l.C0.NUL:51<=e.keyCode&&e.keyCode<=55?n.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?n.key=l.C0.DEL:219===e.keyCode?n.key=l.C0.ESC:220===e.keyCode?n.key=l.C0.FS:221===e.keyCode&&(n.key=l.C0.GS)}return n}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(3);t.updateWindowsModeWrappedState=function(e){var t,i=null===(t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))||void 0===t?void 0:t.get(e.cols-1),r=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);r&&i&&(r.isWrapped=i[n.CHAR_DATA_CODE_INDEX]!==n.NULL_CELL_CODE&&i[n.CHAR_DATA_CODE_INDEX]!==n.WHITESPACE_CELL_CODE)}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(l.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return 0<=e&&ei.MAX_BUFFER_SIZE?i.MAX_BUFFER_SIZE:t},l.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=M.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},l.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},l.prototype.resize=function(e,t){var i=this.getNullCell(M.DEFAULT_ATTR_DATA),r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),0t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(re))for(n=0;nthis._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},l.prototype._reflowLarger=function(e,t){var i=P.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(M.DEFAULT_ATTR_DATA));if(0A+k){for(var D=x.newLines.length-1;0<=D;D--)this.lines.set(d--,x.newLines[D]);d++,w.push({index:A+1,amount:x.newLines.length}),k+=x.newLines.length,x=r[++R]}else this.lines.set(d,E[A--]);var T=0;for(d=w.length-1;0<=d;d--)w[d].index+=T,this.lines.onInsertEmitter.fire(w[d]),T+=w[d].amount;var O=Math.max(0,L+n-this.lines.maxLength);0=this._cols?this._cols-1:e<0?0:e},l.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e},l.prototype.addMarker=function(e){var t=this,i=new o.Marker(e);return this.markers.push(i),i.register(this.lines.onTrim(function(e){i.line-=e,i.line<0&&i.dispose()})),i.register(this.lines.onInsert(function(e){i.line>=e.index&&(i.line+=e.amount)})),i.register(this.lines.onDelete(function(e){i.line>=e.index&&i.linee.index&&(i.line-=e.amount)})),i.register(i.onDispose(function(){return t._removeMarker(i)})),i},l.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},l.prototype.iterator=function(e,t,i,r,n){return new h(this,e,t,i,r,n)},l);function l(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=M.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=n.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=n.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}i.Buffer=c;var h=(u.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",i=e.first;i<=e.last;++i)t+=this._buffer.translateBufferLineToString(i,this._trimRight);return this._current=e.last+1,{range:e,content:t}},u);function u(e,t,i,r,n,o){void 0===i&&(i=0),void 0===r&&(r=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=i,this._endIndex=r,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}i.BufferStringIterator=h},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),n=(Object.defineProperty(o.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),i=0;ithis._length)for(var t=this._length;tthis._maxLength){var o=this._length+i.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=i.length},o.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},o.prototype.shiftElements=function(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(0this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;rthis._end&&(this._end=e)},a.prototype.markRangeDirty=function(e,t){if(tthis._end&&(this._end=t)},a.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},r([n(0,o.IBufferService)],a));function a(e){this._bufferService=e,this.clearRange()}t.DirtyRowService=s},function(e,t,i){"use strict";var h=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},f.prototype.explainEvents=function(e){return{DOWN:!!(1&e),UP:!!(2&e),DRAG:!!(4&e),MOVE:!!(8&e),WHEEL:!!(16&e)}},f.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},r([n(0,o.IBufferService),n(1,o.ICoreService)],f));function f(e,t){var i=this;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null,Object.keys(a).forEach(function(e){return i.addProtocol(e,a[e])}),Object.keys(h).forEach(function(e){return i.addEncoding(e,h[e])}),this.reset()}t.CoreMouseService=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.writeSync=function(e){if(this._writeBuffer.length){for(var t=this._bufferOffset;tthis._bufferOffset;){var i=this._writeBuffer[this._bufferOffset],r=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(i),this._pendingData-=i.length,r&&r(),12<=Date.now()-t)break}this._writeBuffer.length>this._bufferOffset?(50=i)return t+this.wcwidth(n);var o=e.charCodeAt(r);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},s);function s(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}t.UnicodeService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=i(15),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],a=(c.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?r[e]:function(e,t){var i,r=0,n=t.length-1;if(et[n][1])return 0;for(;r<=n;)if(e>t[i=r+n>>1][1])r=1+i;else{if(!(e>22},c.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?s.stringFromCodePoint(2097151&this.content):""},c.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},c.prototype.setFromCharData=function(e){this.fg=e[a.CHAR_DATA_ATTR_INDEX],this.bg=0;var t,i,r=!1;2>>16&255,e>>>8&255,255&e]},n.fromColorRGB=function(e){return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},n.prototype.clone=function(){var e=new n;return e.fg=this.fg,e.bg=this.bg,e},n.prototype.isInverse=function(){return 67108864&this.fg},n.prototype.isBold=function(){return 134217728&this.fg},n.prototype.isUnderline=function(){return 268435456&this.fg},n.prototype.isBlink=function(){return 536870912&this.fg},n.prototype.isInvisible=function(){return 1073741824&this.fg},n.prototype.isItalic=function(){return 67108864&this.bg},n.prototype.isDim=function(){return 134217728&this.bg},n.prototype.getFgColorMode=function(){return 50331648&this.fg},n.prototype.getBgColorMode=function(){return 50331648&this.bg},n.prototype.isFgRGB=function(){return 50331648==(50331648&this.fg)},n.prototype.isBgRGB=function(){return 50331648==(50331648&this.bg)},n.prototype.isFgPalette=function(){return 16777216==(50331648&this.fg)||33554432==(50331648&this.fg)},n.prototype.isBgPalette=function(){return 16777216==(50331648&this.bg)||33554432==(50331648&this.bg)},n.prototype.isFgDefault=function(){return 0==(50331648&this.fg)},n.prototype.isBgDefault=function(){return 0==(50331648&this.bg)},n.prototype.isAttributeDefault=function(){return 0===this.fg&&0===this.bg},n.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},n.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},n);function n(){this.fg=0,this.bg=0}t.AttributeData=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.stringFromCodePoint=function(e){return 65535>10))+String.fromCharCode(e%1024+56320)):String.fromCharCode(e)},t.utf32ToString=function(e,t,i){void 0===t&&(t=0),void 0===i&&(i=e.length);for(var r="",n=t;n>10))+String.fromCharCode(o%1024+56320)):r+=String.fromCharCode(o)}return r};var r=(n.prototype.clear=function(){this._interim=0},n.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r=0,n=0;this._interim&&(56320<=(s=e.charCodeAt(n++))&&s<=57343?t[r++]=1024*(this._interim-55296)+s-56320+65536:(t[r++]=this._interim,t[r++]=s),this._interim=0);for(var o=n;o=i)return this._interim=a,r;56320<=(s=e.charCodeAt(o))&&s<=57343?t[r++]=1024*(a-55296)+s-56320+65536:(t[r++]=a,t[r++]=s)}else t[r++]=a}return r},n);function n(){this._interim=0}t.StringToUtf32=r;o.prototype.clear=function(){this.interim.fill(0)},o.prototype.decode=function(e,t){var i=e.length;if(!i)return 0;var r,n,o,s,a=0,c=0,l=0;if(this.interim[0]){var h=!1,u=this.interim[0];u&=192==(224&u)?31:224==(240&u)?15:7;for(var f=0,_=void 0;(_=63&this.interim[++f])&&f<4;)u<<=6,u|=_;for(var d=192==(224&this.interim[0])?2:224==(240&this.interim[0])?3:4,p=d-f;l>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function c(e,t,i){for(var r=e>>24&255,n=e>>16&255,o=e>>8&255,s=t>>24&255,a=t>>16&255,c=t>>8&255,l=u(h.relativeLuminance2(s,c,a),h.relativeLuminance2(r,n,o));l>>0}function l(e,t,i){e/=255,t/=255,i/=255;return.2126*(e<=.03928?e/12.92:Math.pow((.055+e)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((.055+t)/1.055,2.4))+.0722*(i<=.03928?i/12.92:Math.pow((.055+i)/1.055,2.4))}Object.defineProperty(t,"__esModule",{value:!0}),(r=a=t.channels||(t.channels={})).toCss=function(e,t,i,r){return void 0!==r?"#"+o(e)+o(t)+o(i)+o(r):"#"+o(e)+o(t)+o(i)},r.toRgba=function(e,t,i,r){return(e<<24|t<<16|i<<8|(r=void 0===r?255:r))>>>0},(r=t.color||(t.color={})).blend=function(e,t){var i=(255&t.rgba)/255;if(1==i)return{css:t.css,rgba:t.rgba};var r=t.rgba>>24&255,n=t.rgba>>16&255,o=t.rgba>>8&255,s=e.rgba>>24&255,t=e.rgba>>16&255,e=e.rgba>>8&255,s=s+Math.round((r-s)*i),t=t+Math.round((n-t)*i),i=e+Math.round((o-e)*i);return{css:a.toCss(s,t,i),rgba:a.toRgba(s,t,i)}},r.ensureContrastRatio=function(e,t,i){i=n.ensureContrastRatio(e.rgba,t.rgba,i);if(i)return n.toColor(i>>24&255,i>>16&255,i>>8&255)},r.opaque=function(e){var t=(255|e.rgba)>>>0,i=n.toChannels(t),r=i[0],e=i[1],i=i[2];return{css:a.toCss(r,e,i),rgba:t}},(t.css||(t.css={})).toColor=function(e){return{css:e,rgba:(parseInt(e.slice(1),16)<<8|255)>>>0}},(r=h=t.rgb||(t.rgb={})).relativeLuminance=function(e){return l(e>>16&255,e>>8&255,255&e)},r.relativeLuminance2=l,(r=n=t.rgba||(t.rgba={})).ensureContrastRatio=function(e,t,i){var r=h.relativeLuminance(e>>8),n=h.relativeLuminance(t>>8);if(u(r,n)>24&255,e>>16&255,e>>8&255,255&e]},r.toColor=function(e,t,i){return{css:a.toCss(e,t,i),rgba:a.toRgba(e,t,i)}},t.toPaddedHex=o,t.contrastRatio=u},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r="undefined"==typeof navigator,n=r?"node":navigator.userAgent,r=r?"node":navigator.platform;function o(e,t){return 0<=e.indexOf(t)}t.isFirefox=!!~n.indexOf("Firefox"),t.isSafari=/^((?!chrome|android).)*safari/i.test(n),t.isMac=o(["Macintosh","MacIntel","MacPPC","Mac68K"],r),t.isIpad="iPad"===r,t.isIphone="iPhone"===r,t.isWindows=o(["Windows","Win16","Win32","WinCE"],r),t.isLinux=0<=r.indexOf("Linux")},function(e,t,i){"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),(r=t.C0||(t.C0={})).NUL="\0",r.SOH="",r.STX="",r.ETX="",r.EOT="",r.ENQ="",r.ACK="",r.BEL="",r.BS="\b",r.HT="\t",r.LF="\n",r.VT="\v",r.FF="\f",r.CR="\r",r.SO="",r.SI="",r.DLE="",r.DC1="",r.DC2="",r.DC3="",r.DC4="",r.NAK="",r.SYN="",r.ETB="",r.CAN="",r.EM="",r.SUB="",r.ESC="",r.FS="",r.GS="",r.RS="",r.US="",r.SP=" ",r.DEL="",(t=t.C1||(t.C1={})).PAD="€",t.HOP="",t.BPH="‚",t.NBH="ƒ",t.IND="„",t.NEL="…",t.SSA="†",t.ESA="‡",t.HTS="ˆ",t.HTJ="‰",t.VTS="Š",t.PLD="‹",t.PLU="Œ",t.RI="",t.SS2="Ž",t.SS3="",t.DCS="",t.PU1="‘",t.PU2="’",t.STS="“",t.CCH="”",t.MW="•",t.SPA="–",t.EPA="—",t.SOS="˜",t.SGCI="™",t.SCI="š",t.CSI="›",t.ST="œ",t.OSC="",t.PM="ž",t.APC="Ÿ"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=i(3),a=i(9),r=i(23),o=i(6),n=i(26),c=i(10),i=(l.prototype.dispose=function(){var e;this._container.removeChild(this._canvas),null===(e=this._charAtlas)||void 0===e||e.dispose()},l.prototype._initCanvas=function(){this._ctx=n.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},l.prototype.onOptionsChanged=function(){},l.prototype.onBlur=function(){},l.prototype.onFocus=function(){},l.prototype.onCursorMove=function(){},l.prototype.onGridChanged=function(e,t){},l.prototype.onSelectionChanged=function(e,t,i){void 0===i&&(i=!1)},l.prototype.setColors=function(e){this._refreshCharAtlas(e)},l.prototype._setTransparency=function(e){var t;e!==this._alpha&&(t=this._canvas,this._alpha=e,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,t),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1))},l.prototype._refreshCharAtlas=function(e){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=r.acquireCharAtlas(this._optionsService.options,this._rendererId,e,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},l.prototype.resize=function(e){this._scaledCellWidth=e.scaledCellWidth,this._scaledCellHeight=e.scaledCellHeight,this._scaledCharWidth=e.scaledCharWidth,this._scaledCharHeight=e.scaledCharHeight,this._scaledCharLeft=e.scaledCharLeft,this._scaledCharTop=e.scaledCharTop,this._canvas.width=e.scaledCanvasWidth,this._canvas.height=e.scaledCanvasHeight,this._canvas.style.width=e.canvasWidth+"px",this._canvas.style.height=e.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},l.prototype._fillCells=function(e,t,i,r){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight)},l.prototype._fillBottomLineAtCells=function(e,t,i){void 0===i&&(i=1),this._ctx.fillRect(e*this._scaledCellWidth,(t+1)*this._scaledCellHeight-window.devicePixelRatio-1,i*this._scaledCellWidth,window.devicePixelRatio)},l.prototype._fillLeftLineAtCell=function(e,t,i){this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,window.devicePixelRatio*i,this._scaledCellHeight)},l.prototype._strokeRectAtCell=function(e,t,i,r){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(e*this._scaledCellWidth+window.devicePixelRatio/2,t*this._scaledCellHeight+window.devicePixelRatio/2,i*this._scaledCellWidth-window.devicePixelRatio,r*this._scaledCellHeight-window.devicePixelRatio)},l.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},l.prototype._clearCells=function(e,t,i,r){this._alpha?this._ctx.clearRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(e*this._scaledCellWidth,t*this._scaledCellHeight,i*this._scaledCellWidth,r*this._scaledCellHeight))},l.prototype._fillCharTrueColor=function(e,t,i){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(i),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},l.prototype._drawChars=function(e,t,i){var r,n,o=this._getContrastColor(e);o||e.isFgRGB()||e.isBgRGB()?this._drawUncachedChars(e,t,i,o):(e.isInverse()?(r=e.isBgDefault()?a.INVERTED_DEFAULT_COLOR:e.getBgColor(),n=e.isFgDefault()?a.INVERTED_DEFAULT_COLOR:e.getFgColor()):(n=e.isBgDefault()?s.DEFAULT_COLOR:e.getBgColor(),r=e.isFgDefault()?s.DEFAULT_COLOR:e.getFgColor()),r+=this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8?8:0,this._currentGlyphIdentifier.chars=e.getChars()||s.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=e.getCode()||s.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=n,this._currentGlyphIdentifier.fg=r,this._currentGlyphIdentifier.bold=!!e.isBold(),this._currentGlyphIdentifier.dim=!!e.isDim(),this._currentGlyphIdentifier.italic=!!e.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(e,t,i))},l.prototype._drawUncachedChars=function(e,t,i,r){var n;this._ctx.save(),this._ctx.font=this._getFont(!!e.isBold(),!!e.isItalic()),this._ctx.textBaseline="middle",e.isInverse()?r?this._ctx.fillStyle=r.css:e.isBgDefault()?this._ctx.fillStyle=c.color.opaque(this._colors.background).css:e.isBgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getBgColor()).join(",")+")":(n=e.getBgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&n<8&&(n+=8),this._ctx.fillStyle=this._colors.ansi[n].css):r?this._ctx.fillStyle=r.css:e.isFgDefault()?this._ctx.fillStyle=this._colors.foreground.css:e.isFgRGB()?this._ctx.fillStyle="rgb("+o.AttributeData.toColorRGB(e.getFgColor()).join(",")+")":(r=e.getFgColor(),this._optionsService.options.drawBoldTextInBrightColors&&e.isBold()&&r<8&&(r+=8),this._ctx.fillStyle=this._colors.ansi[r].css),this._clipRow(i),e.isDim()&&(this._ctx.globalAlpha=a.DIM_OPACITY),this._ctx.fillText(e.getChars(),t*this._scaledCellWidth+this._scaledCharLeft,i*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},l.prototype._clipRow=function(e){this._ctx.beginPath(),this._ctx.rect(0,e*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},l.prototype._getFont=function(e,t){return(t?"italic":"")+" "+(e?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},l.prototype._getContrastColor=function(e){if(1!==this._optionsService.options.minimumContrastRatio){var t=this._colors.contrastCache.getColor(e.bg,e.fg);if(void 0!==t)return t||void 0;var i=e.getFgColor(),r=e.getFgColorMode(),n=e.getBgColor(),o=e.getBgColorMode(),s=!!e.isInverse(),a=!!e.isInverse();s&&(t=i,i=n,n=t,t=r,r=o,o=t);n=this._resolveBackgroundRgba(o,n,s),a=this._resolveForegroundRgba(r,i,s,a),a=c.rgba.ensureContrastRatio(n,a,this._optionsService.options.minimumContrastRatio);if(a){a={css:c.channels.toCss(a>>24&255,a>>16&255,a>>8&255),rgba:a};return this._colors.contrastCache.setColor(e.bg,e.fg,a),a}this._colors.contrastCache.setColor(e.bg,e.fg,null)}},l.prototype._resolveBackgroundRgba=function(e,t,i){switch(e){case 16777216:case 33554432:return this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.foreground:this._colors.background).rgba}},l.prototype._resolveForegroundRgba=function(e,t,i,r){switch(e){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&r&&t<8&&(t+=8),this._colors.ansi[t].rgba;case 50331648:return t<<8;case 0:default:return(i?this._colors.background:this._colors.foreground).rgba}},l);function l(e,t,i,r,n,o,s,a){this._container=e,this._alpha=r,this._colors=n,this._rendererId=o,this._bufferService=s,this._optionsService=a,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+t+"-layer"),this._canvas.style.zIndex=i.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}t.BaseRenderLayer=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o="di$target",s="di$dependencies";t.serviceRegistry=new Map,t.getServiceDependencies=function(e){return e[s]||[]},t.createDecorator=function(e){if(t.serviceRegistry.has(e))return t.serviceRegistry.get(e);var n=function(e,t,i){if(3!==arguments.length)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");var r;r=n,i=i,(e=e)[o]===e?e[s].push({id:r,index:i}):(e[s]=[{id:r,index:i}],e[o]=e)};return n.toString=function(){return e},t.serviceRegistry.set(e,n),n}},function(e,t,i){"use strict";function n(e,t,i,r){if(void 0===i&&(i=0),void 0===r&&(r=e.length),i>=e.length)return e;i=(e.length+i)%e.length,r=r>=e.length?e.length:(e.length+r)%e.length;for(var n=i;n>22,2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):i]},r.prototype.set=function(e,t){this._data[3*e+1]=t[a.CHAR_DATA_ATTR_INDEX],1>22},r.prototype.hasWidth=function(e){return 12582912&this._data[3*e+0]},r.prototype.getFg=function(e){return this._data[3*e+1]},r.prototype.getBg=function(e){return this._data[3*e+2]},r.prototype.hasContent=function(e){return 4194303&this._data[3*e+0]},r.prototype.getCodePoint=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e].charCodeAt(this._combined[e].length-1):2097151&t},r.prototype.isCombined=function(e){return 2097152&this._data[3*e+0]},r.prototype.getString=function(e){var t=this._data[3*e+0];return 2097152&t?this._combined[e]:2097151&t?s.stringFromCodePoint(2097151&t):""},r.prototype.loadCell=function(e,t){var i=3*e;return t.content=this._data[0+i],t.fg=this._data[1+i],t.bg=this._data[2+i],2097152&t.content&&(t.combinedData=this._combined[e]),t},r.prototype.setCell=function(e,t){2097152&t.content&&(this._combined[e]=t.combinedData),this._data[3*e+0]=t.content,this._data[3*e+1]=t.fg,this._data[3*e+2]=t.bg},r.prototype.setCellFromCodePoint=function(e,t,i,r,n){this._data[3*e+0]=t|i<<22,this._data[3*e+1]=r,this._data[3*e+2]=n},r.prototype.addCodepointToCell=function(e,t){var i=this._data[3*e+0];2097152&i?this._combined[e]+=s.stringFromCodePoint(t):(2097151&i?(this._combined[e]=s.stringFromCodePoint(2097151&i)+s.stringFromCodePoint(t),i&=-2097152,i|=2097152):i=t|1<<22,this._data[3*e+0]=i)},r.prototype.insertCells=function(e,t,i,r){if((e%=this.length)&&2===this.getWidth(e-1)&&this.setCellFromCodePoint(e-1,0,1,(null===r||void 0===r?void 0:r.fg)||0,(null===r||void 0===r?void 0:r.bg)||0),tthis.length){var i=new Uint32Array(3*e);this.length&&(3*e>22);return 0},r.prototype.copyCellsFrom=function(e,t,i,r,n){var o=e._data;if(n)for(var s=r-1;0<=s;s--)for(var a=0;a<3;a++)this._data[3*(i+s)+a]=o[3*(t+s)+a];else for(s=0;s>22||1}return r},i=r;function r(e,t,i){void 0===i&&(i=!1),this.isWrapped=i,this._combined={},this._data=new Uint32Array(3*e);for(var r=t||c.CellData.fromCharData([0,a.NULL_CELL_CHAR,a.NULL_CELL_WIDTH,a.NULL_CELL_CODE]),n=0;n>8,r=255&this._subParamsIdx[t];0=this.maxLength)this._rejectDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=2147483647=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(e<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=2147483647>8)},o.prototype.getSubParams=function(e){var t=this._subParamsIdx[e]>>8,e=255&this._subParamsIdx[e];return 0>8,r=255&this._subParamsIdx[t];0r.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},s.prototype.end=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data)),this._data="",this._hitLimit=!1,t},i=s;function s(e){this._handler=e,this._data="",this._hitLimit=!1}t.OscHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PAYLOAD_LIMIT=1e7},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=i(7),r=i(19),o=i(21),s=[],i=(a.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},a.prototype.addHandler=function(e,t){void 0===this._handlers[e]&&(this._handlers[e]=[]);var i=this._handlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},a.prototype.setHandler=function(e,t){this._handlers[e]=[t]},a.prototype.clearHandler=function(e){this._handlers[e]&&delete this._handlers[e]},a.prototype.setHandlerFallback=function(e){this._handlerFb=e},a.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=s,this._ident=0},a.prototype.hook=function(e,t){if(this.reset(),this._ident=e,this._active=this._handlers[e]||s,this._active.length)for(var i=this._active.length-1;0<=i;i--)this._active[i].hook(t);else this._handlerFb(this._ident,"HOOK",t)},a.prototype.put=function(e,t,i){if(this._active.length)for(var r=this._active.length-1;0<=r;r--)this._active[r].put(e,t,i);else this._handlerFb(this._ident,"PUT",n.utf32ToString(e,t,i))},a.prototype.unhook=function(e){if(this._active.length){for(var t=this._active.length-1;0<=t&&!1===this._active[t].unhook(e);t--);for(t--;0<=t;t--)this._active[t].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",e);this._active=s,this._ident=0},a);function a(){this._handlers=Object.create(null),this._active=s,this._ident=0,this._handlerFb=function(){}}t.DcsParser=i;c.prototype.hook=function(e){this._params=e.clone(),this._data="",this._hitLimit=!1},c.prototype.put=function(e,t,i){this._hitLimit||(this._data+=n.utf32ToString(e,t,i),this._data.length>o.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},c.prototype.unhook=function(e){var t;return this._hitLimit?t=!1:e&&(t=this._handler(this._data,this._params||new r.Params)),this._params=void 0,this._data="",this._hitLimit=!1,t},i=c;function c(e){this._handler=e,this._data="",this._hitLimit=!1}t.DcsHandler=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=i(24),h=i(42),u=[];t.acquireCharAtlas=function(e,t,i,r,n){for(var o=l.generateConfig(r,n,e,i),s=0;s=this._line.length))return t?(this._line.loadCell(e,t),t):this._line.loadCell(e,new r.CellData)},d.prototype.translateToString=function(e,t,i){return this._line.translateToString(e,t,i)},d),h=(_.prototype.registerCsiHandler=function(e,t){return this._core.addCsiHandler(e,function(e){return t(e.toArray())})},_.prototype.addCsiHandler=function(e,t){return this.registerCsiHandler(e,t)},_.prototype.registerDcsHandler=function(e,i){return this._core.addDcsHandler(e,function(e,t){return i(e,t.toArray())})},_.prototype.addDcsHandler=function(e,t){return this.registerDcsHandler(e,t)},_.prototype.registerEscHandler=function(e,t){return this._core.addEscHandler(e,t)},_.prototype.addEscHandler=function(e,t){return this.registerEscHandler(e,t)},_.prototype.registerOscHandler=function(e,t){return this._core.addOscHandler(e,t)},_.prototype.addOscHandler=function(e,t){return this.registerOscHandler(e,t)},_),u=(f.prototype.register=function(e){this._core.unicodeService.register(e)},Object.defineProperty(f.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!0,configurable:!0}),Object.defineProperty(f.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(e){this._core.unicodeService.activeVersion=e},enumerable:!0,configurable:!0}),f);function f(e){this._core=e}function _(e){this._core=e}function d(e){this._line=e}function p(e){this._buffer=e}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var o,s=i(34),a=i(35),c=i(36),h=i(12),l=i(37),u=i(39),f=i(49),_=i(50),d=i(11),p=i(8),v=i(17),g=i(53),y=i(54),b=i(55),m=i(56),S=i(58),C=i(1),w=i(16),E=i(59),L=i(25),A=i(60),R=i(0),x=i(61),k=i(4),D=i(62),T=i(63),O=i(2),M=i(69),P=i(70),H=i(71),I=i(72),B=i(73),F=i(74),j=i(75),W=i(76),q=i(77),U=i(79),N="undefined"!=typeof window?window.document:null,n=(o=O.Disposable,n(z,o),Object.defineProperty(z.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onData",{get:function(){return this._onData.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yChar",{get:function(){return this.onA11yCharEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"onA11yTab",{get:function(){return this.onA11yTabEmitter.event},enumerable:!0,configurable:!0}),z.prototype.dispose=function(){var e;this._isDisposed||(o.prototype.dispose.call(this),null===(e=this._windowsMode)||void 0===e||e.dispose(),this._windowsMode=void 0,null===(e=this._renderService)||void 0===e||e.dispose(),this._customKeyEventHandler=null,this.write=function(){},null===(e=null===(e=this.element)||void 0===e?void 0:e.parentNode)||void 0===e||e.removeChild(this.element))},z.prototype._setup=function(){var i=this;this._customKeyEventHandler=null,this.insertMode=!1,this.bracketedPasteMode=!1,this._userScrolling=!1,this._inputHandler?this._inputHandler.reset():(this._inputHandler=new l.InputHandler(this,this._bufferService,this._charsetService,this._coreService,this._dirtyRowService,this._logService,this.optionsService,this._coreMouseService,this.unicodeService,this._instantiationService),this._inputHandler.onRequestBell(function(){return i.bell()}),this._inputHandler.onRequestRefreshRows(function(e,t){return i.refresh(e,t)}),this._inputHandler.onRequestReset(function(){return i.reset()}),this._inputHandler.onCursorMove(function(){return i._onCursorMove.fire()}),this._inputHandler.onLineFeed(function(){return i._onLineFeed.fire()}),this.register(this._inputHandler)),this.linkifier||(this.linkifier=new f.Linkifier(this._bufferService,this._logService,this.optionsService,this.unicodeService)),this.options.windowsMode&&this._enableWindowsMode()},z.prototype._enableWindowsMode=function(){var e,t=this;this._windowsMode||((e=[]).push(this.onLineFeed(E.updateWindowsModeWrappedState.bind(null,this._bufferService))),e.push(this.addCsiHandler({final:"H"},function(){return E.updateWindowsModeWrappedState(t._bufferService),!1})),this._windowsMode={dispose:function(){e.forEach(function(e){return e.dispose()})}})},Object.defineProperty(z.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!0,configurable:!0}),Object.defineProperty(z.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!0,configurable:!0}),z.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},z.prototype._setupOptionsListeners=function(){var r=this;this.optionsService.onOptionChange(function(e){var t,i;switch(e){case"fontFamily":case"fontSize":null===(t=r._renderService)||void 0===t||t.clear(),null===(t=r._charSizeService)||void 0===t||t.measure();break;case"cursorBlink":case"cursorStyle":r.refresh(r.buffer.y,r.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":r._renderService&&(r._renderService.clear(),r._renderService.onResize(r.cols,r.rows),r.refresh(0,r.rows-1));break;case"rendererType":r._renderService&&(r._renderService.setRenderer(r._createRenderer()),r._renderService.onResize(r.cols,r.rows));break;case"scrollback":r.buffers.resize(r.cols,r.rows),null===(t=r.viewport)||void 0===t||t.syncScrollArea();break;case"screenReaderMode":r.optionsService.options.screenReaderMode?!r._accessibilityManager&&r._renderService&&(r._accessibilityManager=new b.AccessibilityManager(r,r._renderService)):(null===(i=r._accessibilityManager)||void 0===i||i.dispose(),r._accessibilityManager=null);break;case"tabStopWidth":r.buffers.setupTabStops();break;case"theme":r._setTheme(r.optionsService.options.theme);break;case"windowsMode":r.optionsService.options.windowsMode?r._enableWindowsMode():(null===(i=r._windowsMode)||void 0===i||i.dispose(),r._windowsMode=void 0)}})},z.prototype._onTextAreaFocus=function(e){this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[I"),this.updateCursorStyle(e),this.element.classList.add("focus"),this.showCursor(),this._onFocus.fire()},z.prototype.blur=function(){return this.textarea.blur()},z.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.sendFocus&&this._coreService.triggerDataEvent(h.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},z.prototype._initGlobal=function(){var t=this;this._bindKeys(),this.register(p.addDisposableDomListener(this.element,"copy",function(e){t.hasSelection()&&c.copyHandler(e,t._selectionService)}));function e(e){return c.handlePasteEvent(e,t.textarea,t.bracketedPasteMode,t._coreService)}this.register(p.addDisposableDomListener(this.textarea,"paste",e)),this.register(p.addDisposableDomListener(this.element,"paste",e)),d.isFirefox?this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){2===e.button&&c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})):this.register(p.addDisposableDomListener(this.element,"contextmenu",function(e){c.rightClickHandler(e,t.textarea,t.screenElement,t._selectionService,t.options.rightClickSelectsWord)})),d.isLinux&&this.register(p.addDisposableDomListener(this.element,"auxclick",function(e){1===e.button&&c.moveTextAreaUnderMouseCursor(e,t.textarea,t.screenElement)}))},z.prototype._bindKeys=function(){var t=this;this.register(p.addDisposableDomListener(this.textarea,"keyup",function(e){return t._keyUp(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keydown",function(e){return t._keyDown(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"keypress",function(e){return t._keyPress(e)},!0)),this.register(p.addDisposableDomListener(this.textarea,"compositionstart",function(){return t._compositionHelper.compositionstart()})),this.register(p.addDisposableDomListener(this.textarea,"compositionupdate",function(e){return t._compositionHelper.compositionupdate(e)})),this.register(p.addDisposableDomListener(this.textarea,"compositionend",function(){return t._compositionHelper.compositionend()})),this.register(this.onRender(function(){return t._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(e){return t._queueLinkification(e.start,e.end)}))},z.prototype.open=function(e){var i=this;if(!e)throw new Error("Terminal requires a parent element.");N.body.contains(e)||this._logService.warn("Terminal.open was called on an element that was not attached to the DOM"),this._document=e.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),e.appendChild(this.element);var t=N.createDocumentFragment();this._viewportElement=N.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),t.appendChild(this._viewportElement),this._viewportScrollArea=N.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=N.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=N.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),t.appendChild(this.screenElement),this.textarea=N.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(p.addDisposableDomListener(this.textarea,"focus",function(e){return i._onTextAreaFocus(e)})),this.register(p.addDisposableDomListener(this.textarea,"blur",function(){return i._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);e=this._instantiationService.createInstance(W.CoreBrowserService,this.textarea);this._instantiationService.setService(k.ICoreBrowserService,e),this._charSizeService=this._instantiationService.createInstance(D.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(k.ICharSizeService,this._charSizeService),this._compositionView=N.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(s.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(t),this._theme=this.options.theme||this._theme,this.options.theme=void 0,this._colorManager=new L.ColorManager(N,this.options.allowTransparency),this.optionsService.onOptionChange(function(e){return i._colorManager.onOptionsChange(e)}),this._colorManager.setTheme(this._theme);t=this._createRenderer();this._renderService=this._instantiationService.createInstance(A.RenderService,t,this.rows,this.screenElement),this._instantiationService.setService(k.IRenderService,this._renderService),this._renderService.onRender(function(e){return i._onRender.fire(e)}),this.onResize(function(e){return i._renderService.resize(e.cols,e.rows)}),this._soundService=this._instantiationService.createInstance(g.SoundService),this._instantiationService.setService(k.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(M.MouseService),this._instantiationService.setService(k.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(a.Viewport,function(e,t){return i.scrollLines(e,t)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this.viewport),this.register(this.onCursorMove(function(){return i._renderService.onCursorMove()})),this.register(this.onResize(function(){return i._renderService.onResize(i.cols,i.rows)})),this.register(this.onBlur(function(){return i._renderService.onBlur()})),this.register(this.onFocus(function(){return i._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return i.viewport.syncScrollArea()})),this._selectionService=this._instantiationService.createInstance(_.SelectionService,function(e,t){return i.scrollLines(e,t)},this.element,this.screenElement),this._instantiationService.setService(k.ISelectionService,this._selectionService),this.register(this._selectionService.onSelectionChange(function(){return i._onSelectionChange.fire()})),this.register(this._selectionService.onRedrawRequest(function(e){return i._renderService.onSelectionChanged(e.start,e.end,e.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(e){i.textarea.value=e,i.textarea.focus(),i.textarea.select()})),this.register(this.onScroll(function(){i.viewport.syncScrollArea(),i._selectionService.refresh()})),this.register(p.addDisposableDomListener(this._viewportElement,"scroll",function(){return i._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(y.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return i._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.register(p.addDisposableDomListener(this.element,"mousedown",function(e){return i._selectionService.onMouseDown(e)})),this.mouseEvents?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new b.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},z.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(u.Renderer,this._colorManager.colors,this.screenElement,this.linkifier);case"dom":return this._instantiationService.createInstance(m.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},z.prototype._setTheme=function(e){var t;this._theme=e,null===(t=this._colorManager)||void 0===t||t.setTheme(e),null===(e=this._renderService)||void 0===e||e.setColors(this._colorManager.colors),null===(e=this.viewport)||void 0===e||e.onThemeChange(this._colorManager.colors)},z.prototype.bindMouse=function(){var o=this,n=this,t=this.element;function i(e){var t,i,r;if(t=n._mouseService.getRawByteCoords(e,n.screenElement,n.cols,n.rows)){switch(e.overrideType||e.type){case"mousemove":r=32,void 0===e.buttons?(i=3,void 0!==e.button&&(i=e.button<3?e.button:3)):i=1&e.buttons?0:4&e.buttons?1:2&e.buttons?2:3;break;case"mouseup":r=0,i=e.button<3?e.button:3;break;case"mousedown":r=1,i=e.button<3?e.button:3;break;case"wheel":0!==e.deltaY&&(r=e.deltaY<0?0:1),i=4;break;default:return}return!(void 0===r||void 0===i||4=this.buffer.ybase&&(this._userScrolling=!1);var i=this.buffer.ydisp;this.buffer.ydisp=Math.max(Math.min(this.buffer.ydisp+e,this.buffer.ybase),0),i!==this.buffer.ydisp&&(t||this._onScroll.fire(this.buffer.ydisp),this.refresh(0,this.rows-1))},z.prototype.scrollPages=function(e){this.scrollLines(e*(this.rows-1))},z.prototype.scrollToTop=function(){this.scrollLines(-this.buffer.ydisp)},z.prototype.scrollToBottom=function(){this.scrollLines(this.buffer.ybase-this.buffer.ydisp)},z.prototype.scrollToLine=function(e){e-=this.buffer.ydisp;0!=e&&this.scrollLines(e)},z.prototype.paste=function(e){c.paste(e,this.textarea,this.bracketedPasteMode,this._coreService)},z.prototype.attachCustomKeyEventHandler=function(e){this._customKeyEventHandler=e},z.prototype.addEscHandler=function(e,t){return this._inputHandler.addEscHandler(e,t)},z.prototype.addDcsHandler=function(e,t){return this._inputHandler.addDcsHandler(e,t)},z.prototype.addCsiHandler=function(e,t){return this._inputHandler.addCsiHandler(e,t)},z.prototype.addOscHandler=function(e,t){return this._inputHandler.addOscHandler(e,t)},z.prototype.registerLinkMatcher=function(e,t,i){i=this.linkifier.registerLinkMatcher(e,t,i);return this.refresh(0,this.rows-1),i},z.prototype.deregisterLinkMatcher=function(e){this.linkifier.deregisterLinkMatcher(e)&&this.refresh(0,this.rows-1)},z.prototype.registerCharacterJoiner=function(e){e=this._renderService.registerCharacterJoiner(e);return this.refresh(0,this.rows-1),e},z.prototype.deregisterCharacterJoiner=function(e){this._renderService.deregisterCharacterJoiner(e)&&this.refresh(0,this.rows-1)},Object.defineProperty(z.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!0,configurable:!0}),z.prototype.addMarker=function(e){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+e)},z.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},z.prototype.select=function(e,t,i){this._selectionService.setSelection(e,t,i)},z.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},z.prototype.getSelectionPosition=function(){if(this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},z.prototype.clearSelection=function(){var e;null===(e=this._selectionService)||void 0===e||e.clearSelection()},z.prototype.selectAll=function(){var e;null===(e=this._selectionService)||void 0===e||e.selectAll()},z.prototype.selectLines=function(e,t){var i;null===(i=this._selectionService)||void 0===i||i.selectLines(e,t)},z.prototype._keyDown=function(e){if(this._keyDownHandled=!1,this._customKeyEventHandler&&!1===this._customKeyEventHandler(e))return!1;if(!this._compositionHelper.keydown(e))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var t=S.evaluateKeyboardEvent(e,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(e),3!==t.type&&2!==t.type)return 1===t.type&&this.selectAll(),!!this._isThirdLevelShift(this.browser,e)||(t.cancel&&this.cancel(e,!0),!t.key||(t.key!==h.C0.ETX&&t.key!==h.C0.CR||(this.textarea.value=""),this._onKey.fire({key:t.key,domEvent:e}),this.showCursor(),this._coreService.triggerDataEvent(t.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(e,!0)));var i=this.rows-1;return this.scrollLines(2===t.type?-i:i),this.cancel(e,!0)},z.prototype._isThirdLevelShift=function(e,t){e=e.isMac&&!this.options.macOptionIsMeta&&t.altKey&&!t.ctrlKey&&!t.metaKey||e.isWindows&&t.altKey&&t.ctrlKey&&!t.metaKey;return"keypress"===t.type?e:e&&(!t.keyCode||47=s)if(a)r.x=0,r.y++,r.y===r.scrollBottom+1?(r.y--,this._terminal.scroll(this._eraseAttrData(),!0)):(r.y>=this._bufferService.rows&&(r.y=this._bufferService.rows-1),r.lines.get(r.y).isWrapped=!0),h=r.lines.get(r.y+r.ybase);else if(r.x=s-1,2===d)continue;if(c&&(h.insertCells(r.x,d,r.getNullCell(l),l),2===h.getWidth(s-1)&&h.setCellFromCodePoint(s-1,m.NULL_CELL_CODE,m.NULL_CELL_WIDTH,l.fg,l.bg)),h.setCellFromCodePoint(r.x++,_,d,l.fg,l.bg),0=this._bufferService.rows&&(e.y=this._bufferService.rows-1),e.x>=this._bufferService.cols&&e.x--,this._dirtyRowService.markDirty(e.y),this._onLineFeed.fire()},f.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},f.prototype.backspace=function(){this._restrictCursor(),0=this._bufferService.cols||(e=this._bufferService.buffer.x,this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._terminal.onA11yTabEmitter.fire(this._bufferService.buffer.x-e))},f.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},f.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},f.prototype._restrictCursor=function(){this._bufferService.buffer.x=Math.min(this._bufferService.cols-1,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._setCursor=function(e,t){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=e,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+t):(this._bufferService.buffer.x=e,this._bufferService.buffer.y=t),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},f.prototype._moveCursor=function(e,t){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+e,this._bufferService.buffer.y+t)},f.prototype.cursorUp=function(e){var t=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;0<=t?this._moveCursor(0,-Math.min(t,e.params[0]||1)):this._moveCursor(0,-(e.params[0]||1))},f.prototype.cursorDown=function(e){var t=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;0<=t?this._moveCursor(0,Math.min(t,e.params[0]||1)):this._moveCursor(0,e.params[0]||1)},f.prototype.cursorForward=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.cursorBackward=function(e){this._moveCursor(-(e.params[0]||1),0)},f.prototype.cursorNextLine=function(e){this.cursorDown(e),this._bufferService.buffer.x=0},f.prototype.cursorPrecedingLine=function(e){this.cursorUp(e),this._bufferService.buffer.x=0},f.prototype.cursorCharAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.cursorPosition=function(e){this._setCursor(2<=e.length?(e.params[1]||1)-1:0,(e.params[0]||1)-1)},f.prototype.charPosAbsolute=function(e){this._setCursor((e.params[0]||1)-1,this._bufferService.buffer.y)},f.prototype.hPositionRelative=function(e){this._moveCursor(e.params[0]||1,0)},f.prototype.linePosAbsolute=function(e){this._setCursor(this._bufferService.buffer.x,(e.params[0]||1)-1)},f.prototype.vPositionRelative=function(e){this._moveCursor(0,e.params[0]||1)},f.prototype.hVPosition=function(e){this.cursorPosition(e)},f.prototype.tabClear=function(e){e=e.params[0];0===e?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:3===e&&(this._bufferService.buffer.tabs={})},f.prototype.cursorForwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1;t--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},f.prototype.cursorBackwardTab=function(e){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var t=e.params[0]||1,i=this._bufferService.buffer;t--;)i.x=i.prevStop()},f.prototype._eraseInBufferLine=function(e,t,i,r){void 0===r&&(r=!1);e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.replaceCells(t,i,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),r&&(e.isWrapped=!1)},f.prototype._resetBufferLine=function(e){e=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+e);e.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),e.isWrapped=!1},f.prototype.eraseInDisplay=function(e){var t;switch(this._restrictCursor(),e.params[0]){case 0:for(t=this._bufferService.buffer.y,this._dirtyRowService.markDirty(t),this._eraseInBufferLine(t++,this._bufferService.buffer.x,this._bufferService.cols,0===this._bufferService.buffer.x);t=this._bufferService.cols&&(this._bufferService.buffer.lines.get(t+1).isWrapped=!1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 2:for(t=this._bufferService.rows,this._dirtyRowService.markDirty(t-1);t--;)this._resetBufferLine(t);this._dirtyRowService.markDirty(0);break;case 3:var i=this._bufferService.buffer.lines.length-this._bufferService.rows;0i.scrollBottom||i.yi.scrollBottom||i.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.yt.scrollBottom||t.y0;276;0c"):this._terminal.is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._terminal.is("linux")?this._coreService.triggerDataEvent(e.params[0]+"c"):this._terminal.is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c"))},f.prototype.setMode=function(e){for(var t=0;tthis._bufferService.rows||0===t?this._bufferService.rows:t)&&(this._bufferService.buffer.scrollTop=i-1,this._bufferService.buffer.scrollBottom=t-1,this._setCursor(0,0))},f.prototype.windowOptions=function(e){if(u(e.params[0],this._optionsService.options.windowOptions)){var t,i,r=1=this._bufferService.rows&&(e.y=this._bufferService.rows-1),this._restrictCursor()},f.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},f.prototype.reverseIndex=function(){this._restrictCursor();var e,t=this._bufferService.buffer;t.y===t.scrollTop?(e=t.scrollBottom-t.scrollTop,t.lines.shiftElements(t.y+t.ybase,e,1),t.lines.set(t.y+t.ybase,t.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(t.scrollTop,t.scrollBottom)):(t.y--,this._restrictCursor())},f.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},f.prototype.reset=function(){this._curAttrData=y.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=y.DEFAULT_ATTR_DATA.clone()},f.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},f.prototype.setgLevel=function(e){this._charsetService.setgLevel(e)},f.prototype.screenAlignmentPattern=function(){var e=new S.CellData;e.content=1<<22|"E".charCodeAt(0),e.fg=this._curAttrData.fg,e.bg=this._curAttrData.bg;var t=this._bufferService.buffer;this._setCursor(0,0);for(var i=0;i",final:"c"},function(e){return u.sendDeviceAttributesSecondary(e)}),u._parser.setCsiHandler({final:"d"},function(e){return u.linePosAbsolute(e)}),u._parser.setCsiHandler({final:"e"},function(e){return u.vPositionRelative(e)}),u._parser.setCsiHandler({final:"f"},function(e){return u.hVPosition(e)}),u._parser.setCsiHandler({final:"g"},function(e){return u.tabClear(e)}),u._parser.setCsiHandler({final:"h"},function(e){return u.setMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"h"},function(e){return u.setModePrivate(e)}),u._parser.setCsiHandler({final:"l"},function(e){return u.resetMode(e)}),u._parser.setCsiHandler({prefix:"?",final:"l"},function(e){return u.resetModePrivate(e)}),u._parser.setCsiHandler({final:"m"},function(e){return u.charAttributes(e)}),u._parser.setCsiHandler({final:"n"},function(e){return u.deviceStatus(e)}),u._parser.setCsiHandler({prefix:"?",final:"n"},function(e){return u.deviceStatusPrivate(e)}),u._parser.setCsiHandler({intermediates:"!",final:"p"},function(e){return u.softReset(e)}),u._parser.setCsiHandler({intermediates:" ",final:"q"},function(e){return u.setCursorStyle(e)}),u._parser.setCsiHandler({final:"r"},function(e){return u.setScrollRegion(e)}),u._parser.setCsiHandler({final:"s"},function(e){return u.saveCursor(e)}),u._parser.setCsiHandler({final:"t"},function(e){return u.windowOptions(e)}),u._parser.setCsiHandler({final:"u"},function(e){return u.restoreCursor(e)}),u._parser.setCsiHandler({intermediates:"'",final:"}"},function(e){return u.insertColumns(e)}),u._parser.setCsiHandler({intermediates:"'",final:"~"},function(e){return u.deleteColumns(e)}),u._parser.setExecuteHandler(d.C0.BEL,function(){return u.bell()}),u._parser.setExecuteHandler(d.C0.LF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.VT,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.FF,function(){return u.lineFeed()}),u._parser.setExecuteHandler(d.C0.CR,function(){return u.carriageReturn()}),u._parser.setExecuteHandler(d.C0.BS,function(){return u.backspace()}),u._parser.setExecuteHandler(d.C0.HT,function(){return u.tab()}),u._parser.setExecuteHandler(d.C0.SO,function(){return u.shiftOut()}),u._parser.setExecuteHandler(d.C0.SI,function(){return u.shiftIn()}),u._parser.setExecuteHandler(d.C1.IND,function(){return u.index()}),u._parser.setExecuteHandler(d.C1.NEL,function(){return u.nextLine()}),u._parser.setExecuteHandler(d.C1.HTS,function(){return u.tabSet()}),u._parser.setOscHandler(0,new C.OscHandler(function(e){u.setTitle(e),u.setIconName(e)})),u._parser.setOscHandler(1,new C.OscHandler(function(e){return u.setIconName(e)})),u._parser.setOscHandler(2,new C.OscHandler(function(e){return u.setTitle(e)})),u._parser.setEscHandler({final:"7"},function(){return u.saveCursor()}),u._parser.setEscHandler({final:"8"},function(){return u.restoreCursor()}),u._parser.setEscHandler({final:"D"},function(){return u.index()}),u._parser.setEscHandler({final:"E"},function(){return u.nextLine()}),u._parser.setEscHandler({final:"H"},function(){return u.tabSet()}),u._parser.setEscHandler({final:"M"},function(){return u.reverseIndex()}),u._parser.setEscHandler({final:"="},function(){return u.keypadApplicationMode()}),u._parser.setEscHandler({final:">"},function(){return u.keypadNumericMode()}),u._parser.setEscHandler({final:"c"},function(){return u.fullReset()}),u._parser.setEscHandler({final:"n"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"o"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"|"},function(){return u.setgLevel(3)}),u._parser.setEscHandler({final:"}"},function(){return u.setgLevel(2)}),u._parser.setEscHandler({final:"~"},function(){return u.setgLevel(1)}),u._parser.setEscHandler({intermediates:"%",final:"@"},function(){return u.selectDefaultCharset()}),u._parser.setEscHandler({intermediates:"%",final:"G"},function(){return u.selectDefaultCharset()});var f,_=this;for(f in p.CHARSETS)!function(e){_._parser.setEscHandler({intermediates:"(",final:e},function(){return u.selectCharset("("+e)}),_._parser.setEscHandler({intermediates:")",final:e},function(){return u.selectCharset(")"+e)}),_._parser.setEscHandler({intermediates:"*",final:e},function(){return u.selectCharset("*"+e)}),_._parser.setEscHandler({intermediates:"+",final:e},function(){return u.selectCharset("+"+e)}),_._parser.setEscHandler({intermediates:"-",final:e},function(){return u.selectCharset("-"+e)}),_._parser.setEscHandler({intermediates:".",final:e},function(){return u.selectCharset("."+e)}),_._parser.setEscHandler({intermediates:"/",final:e},function(){return u.selectCharset("/"+e)})}(f);return u._parser.setEscHandler({intermediates:"#",final:"8"},function(){return u.screenAlignmentPattern()}),u._parser.setErrorHandler(function(e){return u._logService.error("Parsing error: ",e),e}),u._parser.setDcsHandler({intermediates:"$",final:"q"},new E(u._bufferService,u._coreService,u._logService,u._optionsService)),u}function _(e,t,i,r){this._bufferService=e,this._coreService=t,this._logService=i,this._optionsService=r,this._data=new Uint32Array(0)}t.InputHandler=n},function(e,i,t){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(i,"__esModule",{value:!0});var o=t(2),s=t(15),a=t(19),c=t(20),l=t(22),h=(u.prototype.setDefault=function(e,t){s.fill(this.table,e<<4|t)},u.prototype.add=function(e,t,i,r){this.table[t<<8|e]=i<<4|r},u.prototype.addMany=function(e,t,i,r){for(var n=0;no||o>t[1])throw new Error("final must be in range "+t[0]+" .. "+t[1]);return(i<<=8)|o},_.prototype.identToString=function(e){for(var t=[];e;)t.push(String.fromCharCode(255&e)),e>>=8;return t.reverse().join("")},_.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},_.prototype.setPrintHandler=function(e){this._printHandler=e},_.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},_.prototype.addEscHandler=function(e,t){e=this._identifier(e,[48,126]);void 0===this._escHandlers[e]&&(this._escHandlers[e]=[]);var i=this._escHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setEscHandler=function(e,t){this._escHandlers[this._identifier(e,[48,126])]=[t]},_.prototype.clearEscHandler=function(e){this._escHandlers[this._identifier(e,[48,126])]&&delete this._escHandlers[this._identifier(e,[48,126])]},_.prototype.setEscHandlerFallback=function(e){this._escHandlerFb=e},_.prototype.setExecuteHandler=function(e,t){this._executeHandlers[e.charCodeAt(0)]=t},_.prototype.clearExecuteHandler=function(e){this._executeHandlers[e.charCodeAt(0)]&&delete this._executeHandlers[e.charCodeAt(0)]},_.prototype.setExecuteHandlerFallback=function(e){this._executeHandlerFb=e},_.prototype.addCsiHandler=function(e,t){e=this._identifier(e);void 0===this._csiHandlers[e]&&(this._csiHandlers[e]=[]);var i=this._csiHandlers[e];return i.push(t),{dispose:function(){var e=i.indexOf(t);-1!==e&&i.splice(e,1)}}},_.prototype.setCsiHandler=function(e,t){this._csiHandlers[this._identifier(e)]=[t]},_.prototype.clearCsiHandler=function(e){this._csiHandlers[this._identifier(e)]&&delete this._csiHandlers[this._identifier(e)]},_.prototype.setCsiHandlerFallback=function(e){this._csiHandlerFb=e},_.prototype.addDcsHandler=function(e,t){return this._dcsParser.addHandler(this._identifier(e),t)},_.prototype.setDcsHandler=function(e,t){this._dcsParser.setHandler(this._identifier(e),t)},_.prototype.clearDcsHandler=function(e){this._dcsParser.clearHandler(this._identifier(e))},_.prototype.setDcsHandlerFallback=function(e){this._dcsParser.setHandlerFallback(e)},_.prototype.addOscHandler=function(e,t){return this._oscParser.addHandler(e,t)},_.prototype.setOscHandler=function(e,t){this._oscParser.setHandler(e,t)},_.prototype.clearOscHandler=function(e){this._oscParser.clearHandler(e)},_.prototype.setOscHandlerFallback=function(e){this._oscParser.setHandlerFallback(e)},_.prototype.setErrorHandler=function(e){this._errorHandler=e},_.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},_.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},_.prototype.parse=function(e,t){for(var i=0,r=0,n=this.currentState,o=this._oscParser,s=this._dcsParser,a=this._collect,c=this._params,l=this.TRANSITIONS.table,h=0;h>4){case 2:for(var u=h+1;;++u){if(t<=u||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126=t||(i=e[u])<32||126this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[t]=e},s);function s(e,t,i,r,n,o,s,a){o=c.call(this,e,"text",t,n,i,o,s,a)||this;return o.bufferService=s,o.optionsService=a,o._characterWidth=0,o._characterFont="",o._characterOverlapCache={},o._workCell=new u.CellData,o._state=new l.GridCache,o._characterJoinerRegistry=r,o}t.TextRenderLayer=n},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.resize=function(e,t){for(var i=0;i>>24,r=s.rgba>>>16&255,n=s.rgba>>>8&255,o=0;o=this.capacity?(r=this._head,this._unlinkNode(r),delete this._map[r.key],r.key=e,r.value=t,this._map[e]=r):(0<(i=this._nodePool).length?((r=i.pop()).key=e,r.value=t):r={prev:null,next:null,key:e,value:t},this._map[e]=r,this.size++),this._appendNode(r)},n);function n(e){this.capacity=e,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}t.LRUMap=r},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var s,n=(s=i(13).BaseRenderLayer,n(o,s),o.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},o.prototype.resize=function(e){s.prototype.resize.call(this,e),this._clearState()},o.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},o.prototype.onSelectionChanged=function(e,t,i){var r,n,o,s,a,c,l;this._didStateChange(e,t,i,this._bufferService.buffer.ydisp)&&(this._clearAll(),e&&t?(a=e[1]-this._bufferService.buffer.ydisp,l=t[1]-this._bufferService.buffer.ydisp,r=Math.max(a,0),n=Math.min(l,this._bufferService.rows-1),r>=this._bufferService.rows||n<0||(this._ctx.fillStyle=this._colors.selection.css,i?(c=e[0],o=t[0]-c,s=n-r+1,this._fillCells(c,r,o,s)):(c=a===r?e[0]:0,a=r===n?t[0]:this._bufferService.cols,this._fillCells(c,r,a-c,1),c=Math.max(n-r-1,0),this._fillCells(0,r+1,this._bufferService.cols,c),r!==n&&(l=l===n?t[0]:this._bufferService.cols,this._fillCells(0,n,l,1))),this._state.start=[e[0],e[1]],this._state.end=[t[0],t[1]],this._state.columnSelectMode=i,this._state.ydisp=this._bufferService.buffer.ydisp)):this._clearState())},o.prototype._didStateChange=function(e,t,i,r){return!this._areCoordinatesEqual(e,this._state.start)||!this._areCoordinatesEqual(t,this._state.end)||i!==this._state.columnSelectMode||r!==this._state.ydisp},o.prototype._areCoordinatesEqual=function(e,t){return!(!e||!t)&&e[0]===t[0]&&e[1]===t[1]},o);function o(e,t,i,r,n,o){r=s.call(this,e,"selection",t,!0,i,r,n,o)||this;return r.bufferService=n,r.optionsService=o,r._clearState(),r}t.SelectionRenderLayer=n},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0});var l,o=i(13),h=i(5),n=(l=o.BaseRenderLayer,n(s,l),s.prototype.resize=function(e){l.prototype.resize.call(this,e),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},s.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},s.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onOptionsChanged=function(){var e,t=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new a(this._coreBrowserService.isFocused,function(){t._render(!0)})):(null===(e=this._cursorBlinkStateManager)||void 0===e||e.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRefreshRowsEvent.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},s.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype.onGridChanged=function(e,t){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},s.prototype._render=function(e){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var t=this._bufferService.buffer.ybase+this._bufferService.buffer.y,i=t-this._bufferService.buffer.ydisp;if(i<0||i>=this._bufferService.rows)this._clearCursor();else if(this._bufferService.buffer.lines.get(t).loadCell(this._bufferService.buffer.x,this._cell),void 0!==this._cell.content){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;t=this._optionsService.options.cursorStyle;return t&&"block"!==t?this._cursorRenderers[t](this._bufferService.buffer.x,i,this._cell):this._renderBlurCursor(this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=t,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===this._bufferService.buffer.x&&this._state.y===i&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](this._bufferService.buffer.x,i,this._cell),this._ctx.restore(),this._state.x=this._bufferService.buffer.x,this._state.y=i,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}else this._clearCursor()},s.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},s.prototype._renderBarCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(e,t,this._optionsService.options.cursorWidth),this._ctx.restore()},s.prototype._renderBlockCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(e,t,i.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(i,e,t),this._ctx.restore()},s.prototype._renderUnderlineCursor=function(e,t,i){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(e,t),this._ctx.restore()},s.prototype._renderBlurCursor=function(e,t,i){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(e,t,i.getWidth(),1),this._ctx.restore()},s);function s(e,t,i,r,n,o,s,a,c){r=l.call(this,e,"cursor",t,!0,i,r,o,s)||this;return r._onRequestRefreshRowsEvent=n,r.bufferService=o,r.optionsService=s,r._coreService=a,r._coreBrowserService=c,r._cell=new h.CellData,r._state={x:0,y:0,isFocused:!1,style:"",width:0},r._cursorRenderers={bar:r._renderBarCursor.bind(r),block:r._renderBlockCursor.bind(r),underline:r._renderUnderlineCursor.bind(r)},r}t.CursorRenderLayer=n;var a=(Object.defineProperty(c.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!0,configurable:!0}),c.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},c.prototype.restartBlinkAnimation=function(){var e=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){e._renderCallback(),e._animationFrame=void 0})))},c.prototype._restartInterval=function(e){var t=this;void 0===e&&(e=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=setTimeout(function(){if(t._animationTimeRestarted){var e=600-(Date.now()-t._animationTimeRestarted);if(t._animationTimeRestarted=void 0,0=e.lines.length)){for(var i=e.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,e=Math.ceil(2e3/this._bufferService.cols),r=this._bufferService.buffer.iterator(!1,t,i,e,e);r.hasNext();)for(var n=r.next(),o=0;o>9&511:void 0;s.validationCallback?s.validationCallback(t,function(e){c._rowsTimeoutId||e&&c._addLink(i[1],i[0]-c._bufferService.buffer.ydisp,t,s,r)}):u._addLink(i[1],i[0]-u._bufferService.buffer.ydisp,t,s,r)}(););},r.prototype._addLink=function(e,t,i,r,n){var o,s,a,c,l,h=this;this._mouseZoneManager&&this._element&&(o=this._unicodeService.getStringCellWidth(i),s=e%this._bufferService.cols,a=t+Math.floor(e/this._bufferService.cols),c=(s+o)%this._bufferService.cols,l=a+Math.floor((s+o)/this._bufferService.cols),0===c&&(c=this._bufferService.cols,l--),this._mouseZoneManager.add(new u(1+s,a+1,c+1,l+1,function(e){if(r.handler)return r.handler(e,i);e=window.open();e?(e.opener=null,e.location.href=i):console.warn("Opening link blocked as opener could not be cleared")},function(){h._onLinkHover.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.add("xterm-cursor-pointer")},function(e){h._onLinkTooltip.fire(h._createLinkHoverEvent(s,a,c,l,n)),r.hoverTooltipCallback&&r.hoverTooltipCallback(e,i,{start:{x:s,y:a},end:{x:c,y:l}})},function(){h._onLinkLeave.fire(h._createLinkHoverEvent(s,a,c,l,n)),h._element.classList.remove("xterm-cursor-pointer"),r.hoverLeaveCallback&&r.hoverLeaveCallback()},function(e){return!r.willLinkActivate||r.willLinkActivate(e,i)})))},r.prototype._createLinkHoverEvent=function(e,t,i,r,n){return{x1:e,y1:t,x2:i,y2:r,cols:this._bufferService.cols,fg:n}},r._timeBeforeLatency=200,r);function r(e,t,i,r){this._bufferService=e,this._logService=t,this._optionsService=i,this._unicodeService=r,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onLinkHover=new n.EventEmitter,this._onLinkLeave=new n.EventEmitter,this._onLinkTooltip=new n.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}t.Linkifier=i;var u=function(e,t,i,r,n,o,s,a,c){this.x1=e,this.y1=t,this.x2=i,this.y2=r,this.clickCallback=n,this.hoverCallback=o,this.tooltipCallback=s,this.leaveCallback=a,this.willLinkActivate=c};t.MouseZone=u},function(e,t,i){"use strict";var r=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3t[1]&&e[1]=t[0]&&e[0]=t[0]},d.prototype.selectWordAtCursor=function(e){e=this._getMouseBufferCoords(e);e&&(this._selectWordAt(e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},d.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},d.prototype.selectLines=function(e,t){this._model.clearSelection(),e=Math.max(e,0),t=Math.min(t,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,e],this._model.selectionEnd=[this._bufferService.cols,t],this.refresh(),this._onSelectionChange.fire()},d.prototype._onTrim=function(e){this._model.onTrim(e)&&this.refresh()},d.prototype._getMouseBufferCoords=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(e)return e[0]--,e[1]--,e[1]+=this._bufferService.buffer.ydisp,e},d.prototype._getMouseEventScrollAmount=function(e){var t=a.getCoordsRelativeToElement(e,this._screenElement)[1],e=this._bufferService.rows*Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight);return 0<=t&&t<=e?0:(e=r;r++){var n=e.loadCell(r,this._workCell).getChars().length;0===this._workCell.getWidth()?i--:1=this._bufferService.cols)){var n=this._bufferService.buffer,o=n.lines.get(e[1]);if(o){var s=n.translateBufferLineToString(e[1],!1),a=this._convertViewportColToCharacterIndex(o,e),c=a,l=e[0]-a,h=0,u=0,f=0,_=0;if(" "===s.charAt(a)){for(;0this._bufferService.cols;)t.length-=this._bufferService.cols,i++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?t.start:t.start+t.length,i]}},d.prototype._isCharWordSeparator=function(e){return 0!==e.getWidth()&&0<=this._optionsService.options.wordSeparator.indexOf(e.getChars())},d.prototype._selectLineAt=function(e){e=this._bufferService.buffer.getWrappedRangeForLine(e);this._model.selectionStart=[0,e.first],this._model.selectionEnd=[this._bufferService.cols,e.last],this._model.selectionStartLength=0},r([n(3,o.ICharSizeService),n(4,s.IBufferService),n(5,s.ICoreService),n(6,o.IMouseService),n(7,s.IOptionsService)],d));function d(e,t,i,r,n,o,s,a){var c=this;this._scrollLines=e,this._element=t,this._screenElement=i,this._charSizeService=r,this._bufferService=n,this._coreService=o,this._mouseService=s,this._optionsService=a,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new h.CellData,this._mouseDownTimeStamp=0,this._onLinuxMouseSelection=new u.EventEmitter,this._onRedrawRequest=new u.EventEmitter,this._onSelectionChange=new u.EventEmitter,this._mouseMoveListener=function(e){return c._onMouseMove(e)},this._mouseUpListener=function(e){return c._onMouseUp(e)},this._coreService.onUserInput(function(){c.hasSelection&&c.clearSelection()}),this._trimListener=this._bufferService.buffer.lines.onTrim(function(e){return c._onTrim(e)}),this._bufferService.buffers.onBufferActivate(function(e){return c._onBufferActivate(e)}),this.enable(),this._model=new l.SelectionModel(this._bufferService),this._activeSelectionMode=0}t.SelectionService=s},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(n.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(this.selectionEnd&&!this.areSelectionValuesReversed())return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd;var e=this.selectionStart[0]+this.selectionStartLength;return e>this._bufferService.cols?[e%this._bufferService.cols,this.selectionStart[1]+Math.floor(e/this._bufferService.cols)]:[e,this.selectionStart[1]]}},enumerable:!0,configurable:!0}),n.prototype.areSelectionValuesReversed=function(){var e=this.selectionStart,t=this.selectionEnd;return!(!e||!t)&&(e[1]>t[1]||e[1]===t[1]&&e[0]>t[0])},n.prototype.onTrim=function(e){return this.selectionStart&&(this.selectionStart[1]-=e),this.selectionEnd&&(this.selectionEnd[1]-=e),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},n);function n(e){this._bufferService=e,this.isSelectAllActive=!1,this.selectionStartLength=0}t.SelectionModel=r},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(12);function y(e,t,i,r){var n=e-b(i,e),o=t-b(i,t);return C(Math.abs(n-o)-function(e,t,i){for(var r=0,n=e-b(i,e),o=t-b(i,t),s=0;so.cols-1?(c+=o.buffer.translateBufferLineToString(a,!1,e,s),e=s=0,a++):!n&&s<0&&(c+=o.buffer.translateBufferLineToString(a,!1,0,e+1),e=s=o.cols-1,a--);return c+o.buffer.translateBufferLineToString(a,!1,e,s)}function S(e,t){t=t?"O":"[";return r.C0.ESC+t+e}function C(e,t){e=Math.floor(e);for(var i="",r=0;re&&r.y1<=t+1||r.y2>e&&r.y2<=t+1||r.y1t+1)&&(this._currentZone&&this._currentZone===r&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(i--,1))}0===this._zones.length&&this._deactivate()}},u.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},u.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},u.prototype._onMouseMove=function(e){this._lastHoverCoords[0]===e.pageX&&this._lastHoverCoords[1]===e.pageY||(this._onHover(e),this._lastHoverCoords=[e.pageX,e.pageY])},u.prototype._onHover=function(e){var t=this,i=this._findZoneEventAt(e);i!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),i&&((this._currentZone=i).hoverCallback&&i.hoverCallback(e),this._tooltipTimeout=setTimeout(function(){return t._onTooltip(e)},500)))},u.prototype._onTooltip=function(e){this._tooltipTimeout=void 0;var t=this._findZoneEventAt(e);t&&t.tooltipCallback&&t.tooltipCallback(e)},u.prototype._onMouseDown=function(e){var t;this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive&&null!==(t=this._findZoneEventAt(e))&&void 0!==t&&t.willLinkActivate(e)&&(e.preventDefault(),e.stopImmediatePropagation())},u.prototype._onMouseLeave=function(e){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},u.prototype._onClick=function(e){var t=this._findZoneEventAt(e),i=this._getSelectionLength();t&&i===this._initialSelectionLength&&(t.clickCallback(e),e.preventDefault(),e.stopImmediatePropagation())},u.prototype._getSelectionLength=function(){var e=this._selectionService.selectionText;return e?e.length:0},u.prototype._findZoneEventAt=function(e){e=this._mouseService.getCoords(e,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(e)for(var t=e[0],i=e[1],r=0;r=n.x1&&t=n.x1||i===n.y2&&tn.y1&&ie;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},f.prototype._createAccessibilityTreeNode=function(){var e=document.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e},f.prototype._onTab=function(e){for(var t=0;tt;)this._rowContainer.removeChild(this._rowElements.pop())},b.prototype.onResize=function(e,t){this._refreshRowElements(e,t),this._updateDimensions()},b.prototype.onCharSizeChanged=function(){this._updateDimensions()},b.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},b.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},b.prototype.onSelectionChanged=function(e,t,i){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);var r,n,o,s,a;e&&t&&(a=e[1]-this._bufferService.buffer.ydisp,r=t[1]-this._bufferService.buffer.ydisp,n=Math.max(a,0),o=Math.min(r,this._bufferService.rows-1),n>=this._bufferService.rows||o<0||(s=document.createDocumentFragment(),i?s.appendChild(this._createSelectionElement(n,e[0],t[0],o-n+1)):(a=a===n?e[0]:0,e=n===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(n,a,e)),e=o-n-1,s.appendChild(this._createSelectionElement(n+1,0,this._bufferService.cols,e)),n!==o&&(t=r===o?t[0]:this._bufferService.cols,s.appendChild(this._createSelectionElement(o,0,t)))),this._selectionContainer.appendChild(s)))},b.prototype._createSelectionElement=function(e,t,i,r){void 0===r&&(r=1);var n=document.createElement("div");return n.style.height=r*this.dimensions.actualCellHeight+"px",n.style.top=e*this.dimensions.actualCellHeight+"px",n.style.left=t*this.dimensions.actualCellWidth+"px",n.style.width=this.dimensions.actualCellWidth*(i-t)+"px",n},b.prototype.onCursorMove=function(){},b.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},b.prototype.clear=function(){this._rowElements.forEach(function(e){return e.innerHTML=""})},b.prototype.renderRows=function(e,t){for(var i=this._bufferService.buffer.ybase+this._bufferService.buffer.y,r=this._bufferService.buffer.x,n=this._optionsService.options.cursorBlink,o=e;o<=t;o++){var s=this._rowElements[o];s.innerHTML="";var a=o+this._bufferService.buffer.ydisp,c=this._bufferService.buffer.lines.get(a),l=this._optionsService.options.cursorStyle;s.appendChild(this._rowFactory.createRow(c,a===i,l,r,n,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(b.prototype,"_terminalSelector",{get:function(){return"."+p+this._terminalClass},enumerable:!0,configurable:!0}),b.prototype.registerCharacterJoiner=function(e){return-1},b.prototype.deregisterCharacterJoiner=function(e){return!1},b.prototype._onLinkHover=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!0)},b.prototype._onLinkLeave=function(e){this._setCellUnderline(e.x1,e.x2,e.y1,e.y2,e.cols,!1)},b.prototype._setCellUnderline=function(e,t,i,r,n,o){for(;e!==t||i!==r;){var s=this._rowElements[i];if(!s)return;s=s.children[e];s&&(s.style.textDecoration=o?"underline":"none"),++e>=n&&(e=0,i++)}},o([s(5,u.ICharSizeService),s(6,f.IOptionsService),s(7,f.IBufferService)],b));function b(e,t,i,r,n,o,s,a){var c=l.call(this)||this;return c._colors=e,c._element=t,c._screenElement=i,c._viewportElement=r,c._linkifier=n,c._charSizeService=o,c._optionsService=s,c._bufferService=a,c._terminalClass=y++,c._rowElements=[],c._onRequestRefreshRows=new _.EventEmitter,c._rowContainer=document.createElement("div"),c._rowContainer.classList.add(v),c._rowContainer.style.lineHeight="normal",c._rowContainer.setAttribute("aria-hidden","true"),c._refreshRowElements(c._bufferService.cols,c._bufferService.rows),c._selectionContainer=document.createElement("div"),c._selectionContainer.classList.add(g),c._selectionContainer.setAttribute("aria-hidden","true"),c.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},c._updateDimensions(),c._injectCss(),c._rowFactory=new h.DomRendererRowFactory(document,c._optionsService,c._colors),c._element.classList.add(p+c._terminalClass),c._screenElement.appendChild(c._rowContainer),c._screenElement.appendChild(c._selectionContainer),c._linkifier.onLinkHover(function(e){return c._onLinkHover(e)}),c._linkifier.onLinkLeave(function(e){return c._onLinkLeave(e)}),c}t.DomRenderer=f},function(e,y,t){"use strict";Object.defineProperty(y,"__esModule",{value:!0});var b=t(9),m=t(3),r=t(5),S=t(10);y.BOLD_CLASS="xterm-bold",y.DIM_CLASS="xterm-dim",y.ITALIC_CLASS="xterm-italic",y.UNDERLINE_CLASS="xterm-underline",y.CURSOR_CLASS="xterm-cursor",y.CURSOR_BLINK_CLASS="xterm-cursor-blink",y.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",y.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",y.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";i.prototype.setColors=function(e){this._colors=e},i.prototype.createRow=function(e,t,i,r,n,o,s){for(var a=this._document.createDocumentFragment(),c=0,l=Math.min(e.length,s)-1;0<=l;l--)if(e.loadCell(l,this._workCell).getCode()!==m.NULL_CELL_CODE||t&&l===r){c=l+1;break}for(l=0;l>16&255,f>>8&255,255&f);this._applyMinimumContrast(u,this._colors.background,g)||this._addStyle(u,"color:#"+C(f.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(u,this._colors.background,this._colors.foreground)||v&&u.classList.add("xterm-fg-"+b.INVERTED_DEFAULT_COLOR)}switch(p){case 16777216:case 33554432:u.classList.add("xterm-bg-"+d);break;case 50331648:this._addStyle(u,"background-color:#"+C(d.toString(16),"0",6));break;case 0:default:v&&u.classList.add("xterm-bg-"+b.INVERTED_DEFAULT_COLOR)}a.appendChild(u)}}return a},i.prototype._applyMinimumContrast=function(e,t,i){if(1===this._optionsService.options.minimumContrastRatio)return!1;var r=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return void 0===r&&(r=S.color.ensureContrastRatio(t,i,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,null!=r?r:null)),!!r&&(this._addStyle(e,"color:"+r.css),!0)},i.prototype._addStyle=function(e,t){e.setAttribute("style",""+(e.getAttribute("style")||"")+t+";")},t=i;function i(e,t,i){this._document=e,this._optionsService=t,this._colors=i,this._workCell=new r.CellData}function C(e,t,i){for(;e.length"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};t.evaluateKeyboardEvent=function(e,t,i,r){var n,o={type:0,cancel:!1,key:void 0},s=(e.shiftKey?1:0)|(e.altKey?2:0)|(e.ctrlKey?4:0)|(e.metaKey?8:0);switch(e.keyCode){case 0:"UIKeyInputUpArrow"===e.key?o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A":"UIKeyInputLeftArrow"===e.key?o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D":"UIKeyInputRightArrow"===e.key?o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C":"UIKeyInputDownArrow"===e.key&&(o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B");break;case 8:if(e.shiftKey){o.key=a.C0.BS;break}if(e.altKey){o.key=a.C0.ESC+a.C0.DEL;break}o.key=a.C0.DEL;break;case 9:if(e.shiftKey){o.key=a.C0.ESC+"[Z";break}o.key=a.C0.HT,o.cancel=!0;break;case 13:o.key=a.C0.CR,o.cancel=!0;break;case 27:o.key=a.C0.ESC,o.cancel=!0;break;case 37:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"D",o.key===a.C0.ESC+"[1;3D"&&(o.key=a.C0.ESC+(i?"b":"[1;5D"))):o.key=t?a.C0.ESC+"OD":a.C0.ESC+"[D";break;case 39:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"C",o.key===a.C0.ESC+"[1;3C"&&(o.key=a.C0.ESC+(i?"f":"[1;5C"))):o.key=t?a.C0.ESC+"OC":a.C0.ESC+"[C";break;case 38:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"A",i||o.key!==a.C0.ESC+"[1;3A"||(o.key=a.C0.ESC+"[1;5A")):o.key=t?a.C0.ESC+"OA":a.C0.ESC+"[A";break;case 40:if(e.metaKey)break;s?(o.key=a.C0.ESC+"[1;"+(1+s)+"B",i||o.key!==a.C0.ESC+"[1;3B"||(o.key=a.C0.ESC+"[1;5B")):o.key=t?a.C0.ESC+"OB":a.C0.ESC+"[B";break;case 45:e.shiftKey||e.ctrlKey||(o.key=a.C0.ESC+"[2~");break;case 46:o.key=s?a.C0.ESC+"[3;"+(1+s)+"~":a.C0.ESC+"[3~";break;case 36:o.key=s?a.C0.ESC+"[1;"+(1+s)+"H":t?a.C0.ESC+"OH":a.C0.ESC+"[H";break;case 35:o.key=s?a.C0.ESC+"[1;"+(1+s)+"F":t?a.C0.ESC+"OF":a.C0.ESC+"[F";break;case 33:e.shiftKey?o.type=2:o.key=a.C0.ESC+"[5~";break;case 34:e.shiftKey?o.type=3:o.key=a.C0.ESC+"[6~";break;case 112:o.key=s?a.C0.ESC+"[1;"+(1+s)+"P":a.C0.ESC+"OP";break;case 113:o.key=s?a.C0.ESC+"[1;"+(1+s)+"Q":a.C0.ESC+"OQ";break;case 114:o.key=s?a.C0.ESC+"[1;"+(1+s)+"R":a.C0.ESC+"OR";break;case 115:o.key=s?a.C0.ESC+"[1;"+(1+s)+"S":a.C0.ESC+"OS";break;case 116:o.key=s?a.C0.ESC+"[15;"+(1+s)+"~":a.C0.ESC+"[15~";break;case 117:o.key=s?a.C0.ESC+"[17;"+(1+s)+"~":a.C0.ESC+"[17~";break;case 118:o.key=s?a.C0.ESC+"[18;"+(1+s)+"~":a.C0.ESC+"[18~";break;case 119:o.key=s?a.C0.ESC+"[19;"+(1+s)+"~":a.C0.ESC+"[19~";break;case 120:o.key=s?a.C0.ESC+"[20;"+(1+s)+"~":a.C0.ESC+"[20~";break;case 121:o.key=s?a.C0.ESC+"[21;"+(1+s)+"~":a.C0.ESC+"[21~";break;case 122:o.key=s?a.C0.ESC+"[23;"+(1+s)+"~":a.C0.ESC+"[23~";break;case 123:o.key=s?a.C0.ESC+"[24;"+(1+s)+"~":a.C0.ESC+"[24~";break;default:!e.ctrlKey||e.shiftKey||e.altKey||e.metaKey?i&&!r||!e.altKey||e.metaKey?i&&!e.altKey&&!e.ctrlKey&&e.metaKey?65===e.keyCode&&(o.type=1):e.key&&!e.ctrlKey&&!e.altKey&&!e.metaKey&&48<=e.keyCode&&1===e.key.length?o.key=e.key:e.key&&e.ctrlKey&&"_"===e.key&&(o.key=a.C0.US):(n=(n=c[e.keyCode])&&n[e.shiftKey?1:0])?o.key=a.C0.ESC+n:65<=e.keyCode&&e.keyCode<=90&&(n=e.ctrlKey?e.keyCode-64:e.keyCode+32,o.key=a.C0.ESC+String.fromCharCode(n)):65<=e.keyCode&&e.keyCode<=90?o.key=String.fromCharCode(e.keyCode-64):32===e.keyCode?o.key=a.C0.NUL:51<=e.keyCode&&e.keyCode<=55?o.key=String.fromCharCode(e.keyCode-51+27):56===e.keyCode?o.key=a.C0.DEL:219===e.keyCode?o.key=a.C0.ESC:220===e.keyCode?o.key=a.C0.FS:221===e.keyCode&&(o.key=a.C0.GS)}return o}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(3);t.updateWindowsModeWrappedState=function(e){var t=null===(t=e.buffer.lines.get(e.buffer.ybase+e.buffer.y-1))||void 0===t?void 0:t.get(e.cols-1),e=e.buffer.lines.get(e.buffer.ybase+e.buffer.y);e&&t&&(e.isWrapped=t[r.CHAR_DATA_CODE_INDEX]!==r.NULL_CELL_CODE&&t[r.CHAR_DATA_CODE_INDEX]!==r.WHITESPACE_CELL_CODE)}},function(e,t,i){"use strict";var r,n=this&&this.__extends||(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])})(e,t)},function(e,t){function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=this&&this.__decorate||function(e,t,i,r){var n,o=arguments.length,s=o<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,i):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,r);else for(var a=e.length-1;0<=a;a--)(n=e[a])&&(s=(o<3?n(s):3this._rows},enumerable:!0,configurable:!0}),Object.defineProperty(c.prototype,"isCursorInViewport",{get:function(){var e=this.ybase+this.y-this.ydisp;return 0<=e&&et.MAX_BUFFER_SIZE?t.MAX_BUFFER_SIZE:e},c.prototype.fillViewportRows=function(e){if(0===this.lines.length){void 0===e&&(e=D.DEFAULT_ATTR_DATA);for(var t=this._rows;t--;)this.lines.push(this.getBlankLine(e))}},c.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},c.prototype.resize=function(e,t){var i=this.getNullCell(D.DEFAULT_ATTR_DATA),r=this._getCorrectBufferLength(t);if(r>this.lines.maxLength&&(this.lines.maxLength=r),0t+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));re))for(n=0;nthis._cols?this._reflowLarger(e,t):this._reflowSmaller(e,t))},c.prototype._reflowLarger=function(e,t){var i=T.reflowLargerGetLinesToRemove(this.lines,this._cols,e,this.ybase+this.y,this.getNullCell(D.DEFAULT_ATTR_DATA));0E+R){for(var x=A.newLines.length-1;0<=x;x--)this.lines.set(_--,A.newLines[x]);_++,S.push({index:E+1,amount:A.newLines.length}),R+=A.newLines.length,A=r[++L]}else this.lines.set(_,C[E--]);var k=0;for(_=S.length-1;0<=_;_--)S[_].index+=k,this.lines.onInsertEmitter.fire(S[_]),k+=S[_].amount;w=Math.max(0,w+n-this.lines.maxLength);0=this._cols?this._cols-1:e<0?0:e},c.prototype.nextStop=function(e){for(null==e&&(e=this.x);!this.tabs[++e]&&e=this._cols?this._cols-1:e<0?0:e},c.prototype.addMarker=function(e){var t=this,i=new o.Marker(e);return this.markers.push(i),i.register(this.lines.onTrim(function(e){i.line-=e,i.line<0&&i.dispose()})),i.register(this.lines.onInsert(function(e){i.line>=e.index&&(i.line+=e.amount)})),i.register(this.lines.onDelete(function(e){i.line>=e.index&&i.linee.index&&(i.line-=e.amount)})),i.register(i.onDispose(function(){return t._removeMarker(i)})),i},c.prototype._removeMarker=function(e){this.markers.splice(this.markers.indexOf(e),1)},c.prototype.iterator=function(e,t,i,r,n){return new l(this,e,t,i,r,n)},i=c;function c(e,t,i){this._hasScrollback=e,this._optionsService=t,this._bufferService=i,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=D.DEFAULT_ATTR_DATA.clone(),this.savedCharset=a.DEFAULT_CHARSET,this.markers=[],this._nullCell=n.CellData.fromCharData([0,s.NULL_CELL_CHAR,s.NULL_CELL_WIDTH,s.NULL_CELL_CODE]),this._whitespaceCell=n.CellData.fromCharData([0,s.WHITESPACE_CELL_CHAR,s.WHITESPACE_CELL_WIDTH,s.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new r.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}t.Buffer=i;var l=(h.prototype.hasNext=function(){return this._currentthis._endIndex+this._endOverscan&&(e.last=this._endIndex+this._endOverscan),e.first=Math.max(e.first,0),e.last=Math.min(e.last,this._buffer.lines.length);for(var t="",i=e.first;i<=e.last;++i)t+=this._buffer.translateBufferLineToString(i,this._trimRight);return this._current=e.last+1,{range:e,content:t}},h);function h(e,t,i,r,n,o){void 0===i&&(i=0),void 0===r&&(r=e.lines.length),void 0===n&&(n=0),void 0===o&&(o=0),this._buffer=e,this._trimRight=t,this._startIndex=i,this._endIndex=r,this._startOverscan=n,this._endOverscan=o,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}t.BufferStringIterator=l},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=i(1),i=(Object.defineProperty(n.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxLength",{get:function(){return this._maxLength},set:function(e){if(this._maxLength!==e){for(var t=new Array(e),i=0;ithis._length)for(var t=this._length;tthis._maxLength?(i=this._length+r.length-this._maxLength,this._startIndex+=i,this._length=this._maxLength,this.onTrimEmitter.fire(i)):this._length+=r.length},n.prototype.trimStart=function(e){e>this._length&&(e=this._length),this._startIndex+=e,this._length-=e,this.onTrimEmitter.fire(e)},n.prototype.shiftElements=function(e,t,i){if(!(t<=0)){if(e<0||e>=this._length)throw new Error("start argument out of range");if(e+i<0)throw new Error("Cannot shift elements in list beyond index 0");if(0this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(r=0;rthis._end&&(this._end=e)},o.prototype.markRangeDirty=function(e,t){var i;tthis._end&&(this._end=t)},o.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},i=r([n(0,i.IBufferService)],o);function o(e){this._bufferService=e,this.clearRange()}t.DirtyRowService=i},function(e,t,i){"use strict";var l=this&&this.__spreadArrays||function(){for(var e=0,t=0,i=arguments.length;t=this._bufferService.cols||e.row<0||e.row>=this._bufferService.rows)return!1;if(4===e.button&&32===e.action)return!1;if(3===e.button&&32!==e.action)return!1;if(4!==e.button&&(2===e.action||3===e.action))return!1;if(e.col++,e.row++,32===e.action&&this._lastEvent&&this._compareEvents(this._lastEvent,e))return!1;if(!this._protocols[this._activeProtocol].restrict(e))return!1;var t=this._encodings[this._activeEncoding](e);return t&&("DEFAULT"===this._activeEncoding?this._coreService.triggerBinaryEvent(t):this._coreService.triggerDataEvent(t,!0)),this._lastEvent=e,!0},u.prototype.explainEvents=function(e){return{DOWN:!!(1&e),UP:!!(2&e),DRAG:!!(4&e),MOVE:!!(8&e),WHEEL:!!(16&e)}},u.prototype._compareEvents=function(e,t){return e.col===t.col&&e.row===t.row&&e.button===t.button&&e.action===t.action&&e.ctrl===t.ctrl&&e.alt===t.alt&&e.shift===t.shift},r([n(0,o.IBufferService),n(1,o.ICoreService)],u));function u(e,t){var i=this;this._bufferService=e,this._coreService=t,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new s.EventEmitter,this._lastEvent=null,Object.keys(a).forEach(function(e){return i.addProtocol(e,a[e])}),Object.keys(h).forEach(function(e){return i.addEncoding(e,h[e])}),this.reset()}t.CoreMouseService=o},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(n.prototype.writeSync=function(e){if(this._writeBuffer.length){for(var t=this._bufferOffset;tthis._bufferOffset;){var i=this._writeBuffer[this._bufferOffset],r=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(i),this._pendingData-=i.length,r&&r(),12<=Date.now()-t)break}this._writeBuffer.length>this._bufferOffset?(50=i)return t+this.wcwidth(n);var o=e.charCodeAt(r);56320<=o&&o<=57343?n=1024*(n-55296)+o-56320+65536:t+=this.wcwidth(o)}t+=this.wcwidth(n)}return t},o);function o(){this._providers=Object.create(null),this._active="",this._onChange=new r.EventEmitter;var e=new n.UnicodeV6;this.register(e),this._active=e.version,this._activeProvider=e}t.UnicodeService=i},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=i(15),o=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],s=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],i=(a.prototype.wcwidth=function(e){return e<32?0:e<127?1:e<65536?r[e]:function(e,t){var i,r=0,n=t.length-1;if(!(et[n][1]))for(;r<=n;)if(e>t[i=r+n>>1][1])r=1+i;else{if(!(e>>16&65535,r&=65535,1==t)return r+=255&e.charCodeAt(o),c<=r&&(r-=c),c<=(a+=r)&&(a-=c),r|a<<16;if(null===e)return 1;if(t<16){for(;t--;)a+=r+=255&e.charCodeAt(o++);return c<=r&&(r-=c),r|(a%=c)<<16}for(;C<=t;){for(t-=C,d=347;a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),--d;);r%=c,a%=c}if(t){for(;16<=t;)t-=16,a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++),a+=r+=255&e.charCodeAt(o++);for(;t--;)a+=r+=255&e.charCodeAt(o++);r%=c,a%=c}return r|a<<16}(r,e,o,t):function(r,e,o,t){var a,d;if(a=r>>>16&65535,r&=65535,1==t)return r+=e[o],c<=r&&(r-=c),c<=(a+=r)&&(a-=c),r|a<<16;if(null===e)return 1;if(t<16){for(;t--;)a+=r+=e[o++];return c<=r&&(r-=c),r|(a%=c)<<16}for(;C<=t;){for(t-=C,d=347;a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],--d;);r%=c,a%=c}if(t){for(;16<=t;)t-=16,a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++],a+=r+=e[o++];for(;t--;)a+=r+=e[o++];r%=c,a%=c}return r|a<<16}(r,e,o,t)},ZLIB.adler32_combine=function(r,e,o){var t,a,d;return o<0?4294967295:(a=(d=o%=c)*(t=65535&r),a%=c,c<=(t+=(65535&e)+c-1)&&(t-=c),c<=t&&(t-=c),c<<1<=(a+=(r>>16&65535)+(e>>16&65535)+c-d)&&(a-=c<<1),c<=a&&(a-=c),t|a<<16)}}() \ No newline at end of file +"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-adler32.js"),function(){var c=65521,C=5552;ZLIB.adler32=function(r,e,o,t){return("string"==typeof e?function(r,e,o,t){var a,d=r>>>16&65535;if(r&=65535,1==t)return r+=255&e.charCodeAt(o),c<=r&&(r-=c),c<=(d+=r)&&(d-=c),r|d<<16;if(null===e)return 1;if(t<16){for(;t--;)d+=r+=255&e.charCodeAt(o++);return c<=r&&(r-=c),r|(d%=c)<<16}for(;C<=t;){for(t-=C,a=347;d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),--a;);r%=c,d%=c}if(t){for(;16<=t;)t-=16,d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++),d+=r+=255&e.charCodeAt(o++);for(;t--;)d+=r+=255&e.charCodeAt(o++);r%=c,d%=c}return r|d<<16}:function(r,e,o,t){var a,d=r>>>16&65535;if(r&=65535,1==t)return r+=e[o],c<=r&&(r-=c),c<=(d+=r)&&(d-=c),r|d<<16;if(null===e)return 1;if(t<16){for(;t--;)d+=r+=e[o++];return c<=r&&(r-=c),r|(d%=c)<<16}for(;C<=t;){for(t-=C,a=347;d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],--a;);r%=c,d%=c}if(t){for(;16<=t;)t-=16,d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++],d+=r+=e[o++];for(;t--;)d+=r+=e[o++];r%=c,d%=c}return r|d<<16})(r,e,o,t)},ZLIB.adler32_combine=function(r,e,o){var t,a;return o<0?4294967295:(a=(o%=c)*(t=65535&r),a%=c,c<=(t+=(65535&e)+c-1)&&(t-=c),c<=t&&(t-=c),c<<1<=(a+=(r>>16&65535)+(e>>16&65535)+c-o)&&(a-=c<<1),c<=a&&(a-=c),t|a<<16)}}() \ No newline at end of file diff --git a/public/scripts/zlib-crc32-min.js b/public/scripts/zlib-crc32-min.js index 2fc21c92..67dcb8ee 100644 --- a/public/scripts/zlib-crc32-min.js +++ b/public/scripts/zlib-crc32-min.js @@ -1 +1 @@ -"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js"),function(){var t=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];ZLIB.crc32=function(r,e,n,o){return"string"==typeof e?function(r,e,n,o){if(null==e)return 0;for(r^=4294967295;8<=o;)r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,r=t[255&(r^e.charCodeAt(n++))]^r>>>8,o-=8;if(o)for(;r=t[255&(r^e.charCodeAt(n++))]^r>>>8,--o;);return 4294967295^r}(r,e,n,o):function(r,e,n,o){if(null==e)return 0;for(r^=4294967295;8<=o;)r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,r=t[255&(r^e[n++])]^r>>>8,o-=8;if(o)for(;r=t[255&(r^e[n++])]^r>>>8,--o;);return 4294967295^r}(r,e,n,o)};function i(r,e){var n,o=0;for(n=0;e;)1&e&&(n^=r[o]),e>>=1,o++;return n}function u(r,e){var n;for(n=0;n<32;n++)r[n]=i(e,e[n])}ZLIB.crc32_combine=function(r,e,n){var o,t,f,c;if(n<=0)return r;for(f=new Array(32),(c=new Array(32))[0]=3988292384,o=t=1;o<32;o++)c[o]=t,t<<=1;u(f,c),u(c,f);do{if(u(f,c),1&n&&(r=i(f,r)),0==(n>>=1))break;u(c,f),1&n&&(r=i(c,r)),n>>=1}while(0!=n);return r^=e}}() \ No newline at end of file +"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-crc32.js"),function(){var t=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function i(r,n){for(var e=0,o=0;n;)1&n&&(o^=r[e]),n>>=1,e++;return o}function u(r,n){for(var e=0;e<32;e++)r[e]=i(n,n[e])}ZLIB.crc32=function(r,n,e,o){return("string"==typeof n?function(r,n,e,o){if(null==n)return 0;for(r^=4294967295;8<=o;)r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,r=t[255&(r^n.charCodeAt(e++))]^r>>>8,o-=8;if(o)for(;r=t[255&(r^n.charCodeAt(e++))]^r>>>8,--o;);return 4294967295^r}:function(r,n,e,o){if(null==n)return 0;for(r^=4294967295;8<=o;)r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,r=t[255&(r^n[e++])]^r>>>8,o-=8;if(o)for(;r=t[255&(r^n[e++])]^r>>>8,--o;);return 4294967295^r})(r,n,e,o)},ZLIB.crc32_combine=function(r,n,e){var o,t,f,c;if(e<=0)return r;for(f=new Array(32),(c=new Array(32))[0]=3988292384,o=t=1;o<32;o++)c[o]=t,t<<=1;for(u(f,c),u(c,f);u(f,c),1&e&&(r=i(f,r)),0!=(e>>=1)&&(u(c,f),1&e&&(r=i(c,r)),0!=(e>>=1)););return r^=n}}() \ No newline at end of file diff --git a/public/scripts/zlib-inflate-min.js b/public/scripts/zlib-inflate-min.js index 4f563fa4..d52de595 100644 --- a/public/scripts/zlib-inflate-min.js +++ b/public/scripts/zlib-inflate-min.js @@ -1 +1 @@ -"undefined"==typeof ZLIB&&alert("ZLIB is not defined. SRC zlib.js before zlib-inflate.js"),function(){var B=11,E=29,z=852,C=592,i=z+C,T=0,y=1,M=2,K=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],D=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,203,69],F=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],N=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64];function _(t,a){var i,s,o,l,b,e,v,p,n,d,r,h,c,f,u,_,m,k,g,w,Z,x,I=t.next,R=a==M?t.distbits:t.lenbits,L=t.work,B=t.lens,E=a==M?t.nlen:0,A=t.codes;i=a==y?t.nlen:a==M?t.ndist:19;var O=new Array(16),S=new Array(16);for(s=0;s<=15;s++)O[s]=0;for(o=0;ox?(_.op=w[Z+L[o]],_.val=k[g+L[o]]):_.op=96,h=1<>>p)+(c-=h)]=_,0!=c;);for(h=1<>>=1;if(0!=h?(r&=h-1,r+=h):r=0,o++,0==--O[s]){if(s==b)break;s=B[E+L[o]]}if(e>>=w=g.bits,c-=w,0==(w=g.op))t.output_data+=String.fromCharCode(g.val),b++;else{if(!(16&w)){if(0==(64&w)){g=f[u+(g.val+(h&(1<>>=w,c-=w),c<15&&(h+=(255&s.charCodeAt(o++))<>>=w=g.bits,c-=w,!(16&(w=g.op))){if(0==(64&w)){g=f[_+(g.val+(h&(1<>>=w,c-=w,(w=b-e)>>3,h&=(1<<(c-=Z<<3))-1,t.next_in=o,t.next_out=b,t.avail_in=o>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15>>8&255];t.state.check=t.checksum_function(t.state.check,i,0,2)}function w(t,a){return a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits,a}function Z(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function x(t){t.hold=0,t.bits=0}function I(t){return 0!=t.have&&(t.have--,t.hold+=(255&t.strm.input_data.charCodeAt(t.next++))<>>=a,t.bits-=a}function O(t){t.hold>>>=7&t.bits,t.bits-=7&t.bits}function S(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}var H=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(t,a){var i,s,o,l,b,e,v,p,n,d,r,h,c=-1,f=-1;if(!t||!t.state||!t.input_data&&0!=t.avail_in)return ZLIB.Z_STREAM_ERROR;(i=t.state).mode==B&&(i.mode=12),w(t,s={}),o=s.have,l=s.left,n=ZLIB.Z_OK;t:for(;;)switch(i.mode){case 0:if(0==i.wrap){i.mode=12;break}if(!R(s,16))break t;if(2&i.wrap&&35615==s.hold){i.check=t.checksum_function(0,null,0,0),g(t,s.hold),x(s),i.mode=1;break}if(i.flags=0,null!==i.head&&(i.head.done=-1),!(1&i.wrap)||((L(s,8)<<8)+(s.hold>>>8))%31){t.msg="incorrect header check",i.mode=E;break}if(L(s,4)!=ZLIB.Z_DEFLATED){t.msg="unknown compression method",i.mode=E;break}if(A(s,4),p=L(s,4)+8,0==i.wbits)i.wbits=p;else if(p>i.wbits){t.msg="invalid window size",i.mode=E;break}i.dmax=1<>>8&1),512&i.flags&&g(t,s.hold),x(s),i.mode=2;case 2:if(!R(s,32))break t;null!==i.head&&(i.head.time=s.hold),512&i.flags&&(d=t,r=s.hold,void 0,h=[255&r,r>>>8&255,r>>>16&255,r>>>24&255],d.state.check=d.checksum_function(d.state.check,h,0,4)),x(s),i.mode=3;case 3:if(!R(s,16))break t;null!==i.head&&(i.head.xflags=255&s.hold,i.head.os=s.hold>>>8),512&i.flags&&g(t,s.hold),x(s),i.mode=4;case 4:if(1024&i.flags){if(!R(s,16))break t;i.length=s.hold,null!==i.head&&(i.head.extra_len=s.hold),512&i.flags&&g(t,s.hold),x(s),i.head.extra=""}else null!==i.head&&(i.head.extra=null);i.mode=5;case 5:if(1024&i.flags&&((b=i.length)>s.have&&(b=s.have),b&&(null!==i.head&&null!==i.head.extra&&(p=i.head.extra_len-i.length,i.head.extra+=t.input_data.substring(s.next,s.next+(p+b>i.head.extra_max?i.head.extra_max-p:b))),512&i.flags&&(i.check=t.checksum_function(i.check,t.input_data,s.next,b)),s.have-=b,s.next+=b,i.length-=b),i.length))break t;i.length=0,i.mode=6;case 6:if(2048&i.flags){if(0==s.have)break t;null!==i.head&&null===i.head.name&&(i.head.name=""),b=0;do{if(p=t.input_data.charAt(s.next+b),b++,"\0"===p)break;null!==i.head&&i.length>>9&1,i.head.done=1),t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=B;break;case 9:if(!R(s,32))break t;t.adler=i.check=S(s.hold),x(s),i.mode=10;case 10:if(0==i.havedict)return Z(s),ZLIB.Z_NEED_DICT;t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=B;case B:if(a==ZLIB.Z_BLOCK||a==ZLIB.Z_TREES)break t;case 12:if(i.last){O(s),i.mode=26;break}if(!R(s,3))break t;switch(i.last=L(s,1),A(s,1),L(s,2)){case 0:i.mode=13;break;case 1:if(k(i),i.mode=19,a!=ZLIB.Z_TREES)break;A(s,2);break t;case 2:i.mode=16;break;case 3:t.msg="invalid block type",i.mode=E}A(s,2);break;case 13:if(O(s),!R(s,32))break t;if((65535&s.hold)!=(s.hold>>>16&65535^65535)){t.msg="invalid stored block lengths",i.mode=E;break}if(i.length=65535&s.hold,x(s),i.mode=14,a==ZLIB.Z_TREES)break t;case 14:i.mode=15;case 15:if(b=i.length){if(b>s.have&&(b=s.have),b>s.left&&(b=s.left),0==b)break t;t.output_data+=t.input_data.substring(s.next,s.next+b),t.next_out+=b,s.have-=b,s.next+=b,s.left-=b,i.length-=b;break}i.mode=B;break;case 16:if(!R(s,14))break t;if(i.nlen=L(s,5)+257,A(s,5),i.ndist=L(s,5)+1,A(s,5),i.ncode=L(s,4)+4,A(s,4),286i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=E;break}for(;b--;)i.lens[i.have++]=p}}if(i.mode==E)break;if(0==i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=E;break}if(i.next=0,i.lencode=i.next,i.lenbits=9,n=_(i,y)){t.msg="invalid literal/lengths set",i.mode=E;break}if(i.distcode=i.next,i.distbits=6,n=_(i,M)){t.msg="invalid distances set",i.mode=E;break}if(i.mode=19,a==ZLIB.Z_TREES)break t;case 19:i.mode=20;case 20:if(6<=s.have&&258<=s.left){Z(s),m(t,l),w(t,s),i.mode==B&&(i.back=-1);break}for(i.back=0;!((e=i.codes[i.lencode+L(s,i.lenbits)]).bits<=s.bits);)if(!I(s))break t;if(e.op&&0==(240&e.op)){for(v=e;e=i.codes[i.lencode+v.val+(L(s,v.bits+v.op)>>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!I(s))break t;A(s,v.bits),i.back+=v.bits}if(A(s,e.bits),i.back+=e.bits,i.length=e.val,0==e.op){i.mode=25;break}if(32&e.op){i.back=-1,i.mode=B;break}if(64&e.op){t.msg="invalid literal/length code",i.mode=E;break}i.extra=15&e.op,i.mode=21;case 21:if(i.extra){if(!R(s,i.extra))break t;i.length+=L(s,i.extra),A(s,i.extra),i.back+=i.extra}i.was=i.length,i.mode=22;case 22:for(;!((e=i.codes[i.distcode+L(s,i.distbits)]).bits<=s.bits);)if(!I(s))break t;if(0==(240&e.op)){for(v=e;e=i.codes[i.distcode+v.val+(L(s,v.bits+v.op)>>>v.bits)],!(v.bits+e.bits<=s.bits);)if(!I(s))break t;A(s,v.bits),i.back+=v.bits}if(A(s,e.bits),i.back+=e.bits,64&e.op){t.msg="invalid distance code",i.mode=E;break}i.offset=e.val,i.extra=15&e.op,i.mode=23;case 23:if(i.extra){if(!R(s,i.extra))break t;i.offset+=L(s,i.extra),A(s,i.extra),i.back+=i.extra}i.mode=24;case 24:if(0==s.left)break t;if(b=l-s.left,i.offset>b){if((b=i.offset-b)>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=E;break}f=(c=b>i.wnext?(b-=i.wnext,i.wsize-b):i.wnext-b,-1),b>i.length&&(b=i.length)}else c=-1,f=t.next_out-i.offset,b=i.length;if(b>s.left&&(b=s.left),s.left-=b,i.length-=b,0<=c)t.output_data+=i.window.substring(c,c+b),t.next_out+=b,b=0;else for(t.next_out+=b;t.output_data+=t.output_data.charAt(f++),--b;);0==i.length&&(i.mode=20);break;case 25:if(0==s.left)break t;t.output_data+=String.fromCharCode(i.length),t.next_out++,s.left--,i.mode=20;break;case 26:if(i.wrap){if(!R(s,32))break t;if(l-=s.left,t.total_out+=l,i.total+=l,l&&(t.adler=i.check=t.checksum_function(i.check,t.output_data,t.output_data.length-l,l)),l=s.left,(i.flags?s.hold:S(s.hold))!=i.check){t.msg="incorrect data check",i.mode=E;break}x(s)}i.mode=27;case 27:if(i.wrap&&i.flags){if(!R(s,32))break t;if(s.hold!=(4294967295&i.total)){t.msg="incorrect length check",i.mode=E;break}x(s)}i.mode=28;case 28:n=ZLIB.Z_STREAM_END;break t;case E:n=ZLIB.Z_DATA_ERROR;break t;case 30:return ZLIB.Z_MEM_ERROR;case 31:default:return ZLIB.Z_STREAM_ERROR}return Z(s),(i.wsize||l!=t.avail_out&&i.mode=a.wsize?a.window=t.output_data.substring(i-a.wsize):a.whave+iw?(f.op=k[g+I[i]],f.val=_[m+I[i]]):f.op=96,d=1<>>e)+(r-=d)]=f,0!=r;);for(d=1<>>=1;if(0!=d?(n&=d-1,n+=d):n=0,i++,0==--A[O]){if(O==o)break;O=L[R+I[i]]}if(l>>4),a<48&&(a&=15)),1==i&&"function"==typeof ZLIB.adler32?t.checksum_function=ZLIB.adler32:2==i&&"function"==typeof ZLIB.crc32?t.checksum_function=ZLIB.crc32:t.checksum_function=o,a&&(a<8||15>>8&255];t.state.check=t.checksum_function(t.state.check,a,0,2)}function x(t,a){return a.strm=t,a.left=t.avail_out,a.next=t.next_in,a.have=t.avail_in,a.hold=t.state.hold,a.bits=t.state.bits,a}function Z(t){var a=t.strm;a.next_in=t.next,a.avail_out=t.left,a.avail_in=t.have,a.state.hold=t.hold,a.state.bits=t.bits}function I(t){t.hold=0,t.bits=0}function E(t){return 0!=t.have&&(t.have--,t.hold+=(255&t.strm.input_data.charCodeAt(t.next++))<>>=a,t.bits-=a}function H(t){t.hold>>>=7&t.bits,t.bits-=7&t.bits}function j(t){return(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24)}var U=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];ZLIB.inflate=function(t,a){var i,s,o,L,l,b,e,v,p,n,d,r,h,c,f=-1,u=-1;if(!t||!t.state||!t.input_data&&0!=t.avail_in)return ZLIB.Z_STREAM_ERROR;(i=t.state).mode==R&&(i.mode=12),x(t,s={}),o=s.have,L=s.left,p=ZLIB.Z_OK;t:for(;;)switch(i.mode){case 0:if(0==i.wrap){i.mode=12;break}if(!A(s,16))break t;if(2&i.wrap&&35615==s.hold){i.check=t.checksum_function(0,null,0,0),w(t,s.hold),I(s),i.mode=1;break}if(i.flags=0,null!==i.head&&(i.head.done=-1),!(1&i.wrap)||((S(s,8)<<8)+(s.hold>>>8))%31){t.msg="incorrect header check",i.mode=B;break}if(S(s,4)!=ZLIB.Z_DEFLATED){t.msg="unknown compression method",i.mode=B;break}if(O(s,4),v=S(s,4)+8,0==i.wbits)i.wbits=v;else if(v>i.wbits){t.msg="invalid window size",i.mode=B;break}i.dmax=1<>>8&1),512&i.flags&&w(t,s.hold),I(s),i.mode=2;case 2:if(!A(s,32))break t;null!==i.head&&(i.head.time=s.hold),512&i.flags&&(n=t,d=[255&(d=s.hold),d>>>8&255,d>>>16&255,d>>>24&255],n.state.check=n.checksum_function(n.state.check,d,0,4)),I(s),i.mode=3;case 3:if(!A(s,16))break t;null!==i.head&&(i.head.xflags=255&s.hold,i.head.os=s.hold>>>8),512&i.flags&&w(t,s.hold),I(s),i.mode=4;case 4:if(1024&i.flags){if(!A(s,16))break t;i.length=s.hold,null!==i.head&&(i.head.extra_len=s.hold),512&i.flags&&w(t,s.hold),I(s),i.head.extra=""}else null!==i.head&&(i.head.extra=null);i.mode=5;case 5:if(1024&i.flags&&((l=(l=i.length)>s.have?s.have:l)&&(null!==i.head&&null!==i.head.extra&&(v=i.head.extra_len-i.length,i.head.extra+=t.input_data.substring(s.next,s.next+(v+l>i.head.extra_max?i.head.extra_max-v:l))),512&i.flags&&(i.check=t.checksum_function(i.check,t.input_data,s.next,l)),s.have-=l,s.next+=l,i.length-=l),i.length))break t;i.length=0,i.mode=6;case 6:if(2048&i.flags){if(0==s.have)break t;for(null!==i.head&&null===i.head.name&&(i.head.name=""),l=0;v=t.input_data.charAt(s.next+l),l++,"\0"!==v&&(null!==i.head&&i.length>>9&1,i.head.done=1),t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;break;case 9:if(!A(s,32))break t;t.adler=i.check=j(s.hold),I(s),i.mode=10;case 10:if(0==i.havedict)return Z(s),ZLIB.Z_NEED_DICT;t.adler=i.check=t.checksum_function(0,null,0,0),i.mode=R;case R:if(a==ZLIB.Z_BLOCK||a==ZLIB.Z_TREES)break t;case 12:if(i.last){H(s),i.mode=26;break}if(!A(s,3))break t;switch(i.last=S(s,1),O(s,1),S(s,2)){case 0:i.mode=13;break;case 1:if(!function(t){var a;for(k=k||[{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:192},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:160},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:224},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:144},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:208},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:176},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:240},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:200},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:168},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:232},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:152},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:216},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:184},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:248},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:196},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:164},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:228},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:148},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:212},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:180},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:244},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:204},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:172},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:236},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:156},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:220},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:188},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:252},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:194},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:162},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:226},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:146},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:210},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:178},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:242},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:202},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:170},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:234},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:154},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:218},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:186},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:250},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:198},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:166},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:230},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:150},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:214},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:182},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:246},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:206},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:174},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:238},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:158},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:222},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:190},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:254},{op:96,bits:7,val:0},{op:0,bits:8,val:80},{op:0,bits:8,val:16},{op:20,bits:8,val:115},{op:18,bits:7,val:31},{op:0,bits:8,val:112},{op:0,bits:8,val:48},{op:0,bits:9,val:193},{op:16,bits:7,val:10},{op:0,bits:8,val:96},{op:0,bits:8,val:32},{op:0,bits:9,val:161},{op:0,bits:8,val:0},{op:0,bits:8,val:128},{op:0,bits:8,val:64},{op:0,bits:9,val:225},{op:16,bits:7,val:6},{op:0,bits:8,val:88},{op:0,bits:8,val:24},{op:0,bits:9,val:145},{op:19,bits:7,val:59},{op:0,bits:8,val:120},{op:0,bits:8,val:56},{op:0,bits:9,val:209},{op:17,bits:7,val:17},{op:0,bits:8,val:104},{op:0,bits:8,val:40},{op:0,bits:9,val:177},{op:0,bits:8,val:8},{op:0,bits:8,val:136},{op:0,bits:8,val:72},{op:0,bits:9,val:241},{op:16,bits:7,val:4},{op:0,bits:8,val:84},{op:0,bits:8,val:20},{op:21,bits:8,val:227},{op:19,bits:7,val:43},{op:0,bits:8,val:116},{op:0,bits:8,val:52},{op:0,bits:9,val:201},{op:17,bits:7,val:13},{op:0,bits:8,val:100},{op:0,bits:8,val:36},{op:0,bits:9,val:169},{op:0,bits:8,val:4},{op:0,bits:8,val:132},{op:0,bits:8,val:68},{op:0,bits:9,val:233},{op:16,bits:7,val:8},{op:0,bits:8,val:92},{op:0,bits:8,val:28},{op:0,bits:9,val:153},{op:20,bits:7,val:83},{op:0,bits:8,val:124},{op:0,bits:8,val:60},{op:0,bits:9,val:217},{op:18,bits:7,val:23},{op:0,bits:8,val:108},{op:0,bits:8,val:44},{op:0,bits:9,val:185},{op:0,bits:8,val:12},{op:0,bits:8,val:140},{op:0,bits:8,val:76},{op:0,bits:9,val:249},{op:16,bits:7,val:3},{op:0,bits:8,val:82},{op:0,bits:8,val:18},{op:21,bits:8,val:163},{op:19,bits:7,val:35},{op:0,bits:8,val:114},{op:0,bits:8,val:50},{op:0,bits:9,val:197},{op:17,bits:7,val:11},{op:0,bits:8,val:98},{op:0,bits:8,val:34},{op:0,bits:9,val:165},{op:0,bits:8,val:2},{op:0,bits:8,val:130},{op:0,bits:8,val:66},{op:0,bits:9,val:229},{op:16,bits:7,val:7},{op:0,bits:8,val:90},{op:0,bits:8,val:26},{op:0,bits:9,val:149},{op:20,bits:7,val:67},{op:0,bits:8,val:122},{op:0,bits:8,val:58},{op:0,bits:9,val:213},{op:18,bits:7,val:19},{op:0,bits:8,val:106},{op:0,bits:8,val:42},{op:0,bits:9,val:181},{op:0,bits:8,val:10},{op:0,bits:8,val:138},{op:0,bits:8,val:74},{op:0,bits:9,val:245},{op:16,bits:7,val:5},{op:0,bits:8,val:86},{op:0,bits:8,val:22},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:118},{op:0,bits:8,val:54},{op:0,bits:9,val:205},{op:17,bits:7,val:15},{op:0,bits:8,val:102},{op:0,bits:8,val:38},{op:0,bits:9,val:173},{op:0,bits:8,val:6},{op:0,bits:8,val:134},{op:0,bits:8,val:70},{op:0,bits:9,val:237},{op:16,bits:7,val:9},{op:0,bits:8,val:94},{op:0,bits:8,val:30},{op:0,bits:9,val:157},{op:20,bits:7,val:99},{op:0,bits:8,val:126},{op:0,bits:8,val:62},{op:0,bits:9,val:221},{op:18,bits:7,val:27},{op:0,bits:8,val:110},{op:0,bits:8,val:46},{op:0,bits:9,val:189},{op:0,bits:8,val:14},{op:0,bits:8,val:142},{op:0,bits:8,val:78},{op:0,bits:9,val:253},{op:96,bits:7,val:0},{op:0,bits:8,val:81},{op:0,bits:8,val:17},{op:21,bits:8,val:131},{op:18,bits:7,val:31},{op:0,bits:8,val:113},{op:0,bits:8,val:49},{op:0,bits:9,val:195},{op:16,bits:7,val:10},{op:0,bits:8,val:97},{op:0,bits:8,val:33},{op:0,bits:9,val:163},{op:0,bits:8,val:1},{op:0,bits:8,val:129},{op:0,bits:8,val:65},{op:0,bits:9,val:227},{op:16,bits:7,val:6},{op:0,bits:8,val:89},{op:0,bits:8,val:25},{op:0,bits:9,val:147},{op:19,bits:7,val:59},{op:0,bits:8,val:121},{op:0,bits:8,val:57},{op:0,bits:9,val:211},{op:17,bits:7,val:17},{op:0,bits:8,val:105},{op:0,bits:8,val:41},{op:0,bits:9,val:179},{op:0,bits:8,val:9},{op:0,bits:8,val:137},{op:0,bits:8,val:73},{op:0,bits:9,val:243},{op:16,bits:7,val:4},{op:0,bits:8,val:85},{op:0,bits:8,val:21},{op:16,bits:8,val:258},{op:19,bits:7,val:43},{op:0,bits:8,val:117},{op:0,bits:8,val:53},{op:0,bits:9,val:203},{op:17,bits:7,val:13},{op:0,bits:8,val:101},{op:0,bits:8,val:37},{op:0,bits:9,val:171},{op:0,bits:8,val:5},{op:0,bits:8,val:133},{op:0,bits:8,val:69},{op:0,bits:9,val:235},{op:16,bits:7,val:8},{op:0,bits:8,val:93},{op:0,bits:8,val:29},{op:0,bits:9,val:155},{op:20,bits:7,val:83},{op:0,bits:8,val:125},{op:0,bits:8,val:61},{op:0,bits:9,val:219},{op:18,bits:7,val:23},{op:0,bits:8,val:109},{op:0,bits:8,val:45},{op:0,bits:9,val:187},{op:0,bits:8,val:13},{op:0,bits:8,val:141},{op:0,bits:8,val:77},{op:0,bits:9,val:251},{op:16,bits:7,val:3},{op:0,bits:8,val:83},{op:0,bits:8,val:19},{op:21,bits:8,val:195},{op:19,bits:7,val:35},{op:0,bits:8,val:115},{op:0,bits:8,val:51},{op:0,bits:9,val:199},{op:17,bits:7,val:11},{op:0,bits:8,val:99},{op:0,bits:8,val:35},{op:0,bits:9,val:167},{op:0,bits:8,val:3},{op:0,bits:8,val:131},{op:0,bits:8,val:67},{op:0,bits:9,val:231},{op:16,bits:7,val:7},{op:0,bits:8,val:91},{op:0,bits:8,val:27},{op:0,bits:9,val:151},{op:20,bits:7,val:67},{op:0,bits:8,val:123},{op:0,bits:8,val:59},{op:0,bits:9,val:215},{op:18,bits:7,val:19},{op:0,bits:8,val:107},{op:0,bits:8,val:43},{op:0,bits:9,val:183},{op:0,bits:8,val:11},{op:0,bits:8,val:139},{op:0,bits:8,val:75},{op:0,bits:9,val:247},{op:16,bits:7,val:5},{op:0,bits:8,val:87},{op:0,bits:8,val:23},{op:64,bits:8,val:0},{op:19,bits:7,val:51},{op:0,bits:8,val:119},{op:0,bits:8,val:55},{op:0,bits:9,val:207},{op:17,bits:7,val:15},{op:0,bits:8,val:103},{op:0,bits:8,val:39},{op:0,bits:9,val:175},{op:0,bits:8,val:7},{op:0,bits:8,val:135},{op:0,bits:8,val:71},{op:0,bits:9,val:239},{op:16,bits:7,val:9},{op:0,bits:8,val:95},{op:0,bits:8,val:31},{op:0,bits:9,val:159},{op:20,bits:7,val:99},{op:0,bits:8,val:127},{op:0,bits:8,val:63},{op:0,bits:9,val:223},{op:18,bits:7,val:27},{op:0,bits:8,val:111},{op:0,bits:8,val:47},{op:0,bits:9,val:191},{op:0,bits:8,val:15},{op:0,bits:8,val:143},{op:0,bits:8,val:79},{op:0,bits:9,val:255}],g=g||[{op:16,bits:5,val:1},{op:23,bits:5,val:257},{op:19,bits:5,val:17},{op:27,bits:5,val:4097},{op:17,bits:5,val:5},{op:25,bits:5,val:1025},{op:21,bits:5,val:65},{op:29,bits:5,val:16385},{op:16,bits:5,val:3},{op:24,bits:5,val:513},{op:20,bits:5,val:33},{op:28,bits:5,val:8193},{op:18,bits:5,val:9},{op:26,bits:5,val:2049},{op:22,bits:5,val:129},{op:64,bits:5,val:0},{op:16,bits:5,val:2},{op:23,bits:5,val:385},{op:19,bits:5,val:25},{op:27,bits:5,val:6145},{op:17,bits:5,val:7},{op:25,bits:5,val:1537},{op:21,bits:5,val:97},{op:29,bits:5,val:24577},{op:16,bits:5,val:4},{op:24,bits:5,val:769},{op:20,bits:5,val:49},{op:28,bits:5,val:12289},{op:18,bits:5,val:13},{op:26,bits:5,val:3073},{op:22,bits:5,val:193},{op:64,bits:5,val:0}],t.lencode=0,t.distcode=512,a=0;a<512;a++)t.codes[a]=k[a];for(a=0;a<32;a++)t.codes[a+512]=g[a];t.lenbits=9,t.distbits=5}(i),i.mode=19,a!=ZLIB.Z_TREES)break;O(s,2);break t;case 2:i.mode=16;break;case 3:t.msg="invalid block type",i.mode=B}O(s,2);break;case 13:if(H(s),!A(s,32))break t;if((65535&s.hold)!=(s.hold>>>16&65535^65535)){t.msg="invalid stored block lengths",i.mode=B;break}if(i.length=65535&s.hold,I(s),i.mode=14,a==ZLIB.Z_TREES)break t;case 14:i.mode=15;case 15:if(l=i.length){if(0==(l=(l=l>s.have?s.have:l)>s.left?s.left:l))break t;t.output_data+=t.input_data.substring(s.next,s.next+l),t.next_out+=l,s.have-=l,s.next+=l,s.left-=l,i.length-=l;break}i.mode=R;break;case 16:if(!A(s,14))break t;if(i.nlen=S(s,5)+257,O(s,5),i.ndist=S(s,5)+1,O(s,5),i.ncode=S(s,4)+4,O(s,4),286i.nlen+i.ndist){t.msg="invalid bit length repeat",i.mode=B;break}for(;l--;)i.lens[i.have++]=v}}if(i.mode==B)break;if(0==i.lens[256]){t.msg="invalid code -- missing end-of-block",i.mode=B;break}if(i.next=0,i.lencode=i.next,i.lenbits=9,p=m(i,y)){t.msg="invalid literal/lengths set",i.mode=B;break}if(i.distcode=i.next,i.distbits=6,p=m(i,M)){t.msg="invalid distances set",i.mode=B;break}if(i.mode=19,a==ZLIB.Z_TREES)break t;case 19:i.mode=20;case 20:if(6<=s.have&&258<=s.left){Z(s),function(t){var a,i,s,o=-1,l=-1,b=t.state,e=t.input_data,v=t.next_in,p=v+t.avail_in-5,n=t.next_out,d=n-(L-t.avail_out),r=n+(t.avail_out-257),h=b.wsize,c=b.whave,f=b.wnext,u=b.window,_=b.hold,m=b.bits,k=b.codes,g=b.lencode,w=b.distcode,x=(1<>>=i=a.bits,m-=i,0==(i=a.op))t.output_data+=String.fromCharCode(a.val),n++;else{if(!(16&i)){if(0==(64&i)){a=k[g+(a.val+(_&(1<>>=i,m-=i),m<15&&(_+=(255&e.charCodeAt(v++))<>>=i=a.bits,m-=i,!(16&(i=a.op))){if(0==(64&i)){a=k[w+(a.val+(_&(1<>>=i,m-=i,(i=n-d)>>3,_&=(1<<(m-=s<<3))-1,t.next_in=v,t.next_out=n,t.avail_in=v>>e.bits)],!(e.bits+b.bits<=s.bits);)if(!E(s))break t;O(s,e.bits),i.back+=e.bits}if(O(s,b.bits),i.back+=b.bits,i.length=b.val,0==b.op){i.mode=25;break}if(32&b.op){i.back=-1,i.mode=R;break}if(64&b.op){t.msg="invalid literal/length code",i.mode=B;break}i.extra=15&b.op,i.mode=21;case 21:if(i.extra){if(!A(s,i.extra))break t;i.length+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.was=i.length,i.mode=22;case 22:for(;!((b=i.codes[i.distcode+S(s,i.distbits)]).bits<=s.bits);)if(!E(s))break t;if(0==(240&b.op)){for(e=b;b=i.codes[i.distcode+e.val+(S(s,e.bits+e.op)>>>e.bits)],!(e.bits+b.bits<=s.bits);)if(!E(s))break t;O(s,e.bits),i.back+=e.bits}if(O(s,b.bits),i.back+=b.bits,64&b.op){t.msg="invalid distance code",i.mode=B;break}i.offset=b.val,i.extra=15&b.op,i.mode=23;case 23:if(i.extra){if(!A(s,i.extra))break t;i.offset+=S(s,i.extra),O(s,i.extra),i.back+=i.extra}i.mode=24;case 24:if(0==s.left)break t;if(l=L-s.left,i.offset>l){if(l=i.offset-l,l>i.whave&&i.sane){t.msg="invalid distance too far back",i.mode=B;break}u=(f=l>i.wnext?(l-=i.wnext,i.wsize-l):i.wnext-l,-1),l>i.length&&(l=i.length)}else f=-1,u=t.next_out-i.offset,l=i.length;if(l>s.left&&(l=s.left),s.left-=l,i.length-=l,0<=f)t.output_data+=i.window.substring(f,f+l),t.next_out+=l,l=0;else for(t.next_out+=l;t.output_data+=t.output_data.charAt(u++),--l;);0==i.length&&(i.mode=20);break;case 25:if(0==s.left)break t;t.output_data+=String.fromCharCode(i.length),t.next_out++,s.left--,i.mode=20;break;case 26:if(i.wrap){if(!A(s,32))break t;if(L-=s.left,t.total_out+=L,i.total+=L,L&&(t.adler=i.check=t.checksum_function(i.check,t.output_data,t.output_data.length-L,L)),L=s.left,(i.flags?s.hold:j(s.hold))!=i.check){t.msg="incorrect data check",i.mode=B;break}I(s)}i.mode=27;case 27:if(i.wrap&&i.flags){if(!A(s,32))break t;if(s.hold!=(4294967295&i.total)){t.msg="incorrect length check",i.mode=B;break}I(s)}i.mode=28;case 28:p=ZLIB.Z_STREAM_END;break t;case B:p=ZLIB.Z_DATA_ERROR;break t;case 30:return ZLIB.Z_MEM_ERROR;case 31:default:return ZLIB.Z_STREAM_ERROR}return Z(s),(i.wsize||L!=t.avail_out&&i.mode=h.wsize?h.window=r.output_data.substring(c-h.wsize):h.whave+c11->258", - "default-mobile.handlebars->11->261", + "default-mobile.handlebars->11->263", "default-mobile.handlebars->11->264", "default-mobile.handlebars->11->307", "default.handlebars->31->598", - "default.handlebars->31->601", + "default.handlebars->31->603", "default.handlebars->31->604", "default.handlebars->31->828" ] @@ -20469,10 +20469,8 @@ "zh-chs": "无效证件", "zh-cht": "無效證件", "xloc": [ - "default-mobile.handlebars->11->262", - "default-mobile.handlebars->11->263", - "default.handlebars->31->602", - "default.handlebars->31->603" + "default-mobile.handlebars->11->261", + "default.handlebars->31->601" ] }, { @@ -39871,6 +39869,13 @@ "agent-translations.json" ] }, + { + "en": "Trying Credentials", + "xloc": [ + "default-mobile.handlebars->11->262", + "default.handlebars->31->602" + ] + }, { "cs": "Tsonga", "de": "Tsonga", @@ -46642,4 +46647,4 @@ ] } ] -} +} \ No newline at end of file diff --git a/views/default-mobile.handlebars b/views/default-mobile.handlebars index 6b4e0180..7588ae0c 100644 --- a/views/default-mobile.handlebars +++ b/views/default-mobile.handlebars @@ -3096,6 +3096,7 @@ var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } + if (node.agent.id == 14) { str = node.agent.core; } if ((node.agent.root === false) && ((node.conn & 1) != 0)) { str += ', ' + "Restricted"; } x += addDeviceAttribute("Agent", str); } @@ -4635,7 +4636,6 @@ x += addDetailItem("Antivirus", y.join('
    ')); } - if (x != '') { sections.push({ name: "Operating System", html: x, img: 'software' }); } } @@ -4646,6 +4646,7 @@ var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } + if (node.agent.id == 14) { str = node.agent.core; } x += addDetailItem("Mesh Agent", str); } if ((node.conn & 1) != 0) { diff --git a/views/default.handlebars b/views/default.handlebars index 697d42b3..64a09ed3 100644 --- a/views/default.handlebars +++ b/views/default.handlebars @@ -5896,6 +5896,7 @@ var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } + if (node.agent.id == 14) { str = node.agent.core; } x += addDeviceAttribute("Mesh Agent", str); } @@ -9113,6 +9114,7 @@ var str = ''; if (node.agent.id <= agentsStr.length) { str = agentsStr[node.agent.id]; } else { str = agentsStr[0]; } if (node.agent.ver != 0) { str += ' v' + node.agent.ver; } + if (node.agent.id == 14) { str = node.agent.core; } x += addDetailItem("Mesh Agent", str); } if ((node.conn & 1) != 0) {