text
stringlengths
2
1.05M
sap.ui.define(['sap/ui/webc/common/thirdparty/base/config/Theme', './v5/inventory', './v4/inventory'], function (Theme, inventory$2, inventory$1) { 'use strict'; const pathData = Theme.isTheme("sap_horizon") ? inventory$1 : inventory$2; var inventory = { pathData }; return inventory; });
/** * Created with JetBrains WebStorm. * User: Dieter Beelaert * Date: 5/08/13 * Time: 16:15 * To change this template use File | Settings | File Templates. */ console.log("loading " + module.id ); var cody = require("cody/index.js"); var fs = require("fs"); //sql statements SocialuserController.sqlGetUsers = "select u.*, ui.info,ui.Street,ui.number,ui.zip,ui.city,ui.userFunction,ui.telephone,ui.since from users u left join user_info ui on ui.id = u.id where u.domain = 'users' order by since"; SocialuserController.sqlGetUserById = "select * from users u left join user_info ui on ui.id = u.id where u.id = ?"; SocialuserController.sqlUpdateUserData = "insert into user_info (id,info,Street,number,zip,city,userFunction,telephone)" + " values(?,?,?,?,?,?,?,?) on duplicate key update info = ?, Street = ?,number = ?," + " zip = ?,city = ?,userFunction = ?,telephone = ?"; SocialuserController.sqlUpdateUser = "update users set name = ?, email = ? where id = ? "; SocialuserController.sqlSendMessage = "insert into user_message(user_from,user_to,message,timestamp) values(?,?,?,?)"; SocialuserController.sqlGetMessagesForUser = "select * from user_message um left join users u on um.user_from = u.id where user_to = ? order by timestamp desc limit 0,100"; SocialuserController.sqlGetOutGoingMessagesForUser ="select * from user_message um left join users u on um.user_to = u.id where user_from = ? order by timestamp desc limit 0,100"; SocialuserController.sqlGetMessageById = "select * from user_message um join users u on um.user_from = u.id where messageId = ?"; SocialuserController.sqlGetOutMessageById = "select * from user_message um join users u on um.user_to = u.id where messageId = ?"; function SocialuserController(context) { //views this.profileview = "../views/userprofile.ejs"; this.listView = "../views/userlist.ejs"; this.inboxView = "../views/inbox.ejs"; this.messageView = "../views/messageview.ejs"; // init inherited controller cody.Controller.call(this, context); } //inherrit from controller SocialuserController.prototype = Object.create( cody.Controller.prototype ); module.exports = SocialuserController; SocialuserController.prototype.doRequest = function(finish){ var self = this; if(self.isRequest("")){ self.doList(function(){finish(self.listView);}); }else if(self.isRequest("otherUser")){ self.doProfile(self.getParam("id"),function(){finish(self.profileview);}); }else if(self.isRequest("doUpdate")){ var id = self.getParam("id"); var name = self.getParam("name"); var userFunction = self.getParam("Function"); var info = self.getParam("info"); var email = self.getParam("email"); var telephone = self.getParam("telephone"); var street = self.getParam("street"); var number = self.getParam("number"); var zip = self.getParam("zip"); var city = self.getParam("city"); self.query(SocialuserController.sqlUpdateUserData,[id,info,street,number,zip,city,userFunction,telephone,info,street,number,zip,city,userFunction,telephone],function(err,res){ if(err){console.log(err);} self.query(SocialuserController.sqlUpdateUser,[name,email,id],function(err,res){ self.doList(function(){finish(self.listView);}); }); }); } else if(self.isRequest("sendMsg")){ var msg = self.getParam("message"); var toId = self.getParam("toId"); self.query(SocialuserController.sqlSendMessage,[self.context.getLogin().getId(),toId,msg,self.getCurrentDateTime()],function(err,res){ if(err){console.log(err);} self.doList(function(){finish(self.listView);}); }); }else if(self.isRequest("viewMessages")){ var uId = self.context.getLogin().getId(); self.query(SocialuserController.sqlGetMessagesForUser,[uId],function(err,res){ if(err){console.log(err);} self.context.messages = res; self.query(SocialuserController.sqlGetOutGoingMessagesForUser,[uId],function(err,res){ if(err){console.log(err);} self.context.outMessages = res; finish(self.inboxView); }); }); }else if(self.isRequest("viewSingleMessage")){ var msgId = self.getParam("msgId"); var inGoing = self.getParam("in"); if(inGoing === "Y"){ self.query(SocialuserController.sqlGetMessageById,[msgId],function(err,res){ if(err){console.log(err);} self.context.message = res[0]; finish(self.messageView); }); }else { self.query(SocialuserController.sqlGetOutMessageById,[msgId],function(err,res){ if(err){console.log(err);} self.context.message = res[0]; finish(self.messageView); }); } } } SocialuserController.prototype.doList = function(finish){ var self = this; self.query(SocialuserController.sqlGetUsers,[],function(err,res){ self.context.users = res; finish(); }); } SocialuserController.prototype.doProfile = function(id,finish){ var self=this; console.log("the id is " + id); self.query(SocialuserController.sqlGetUserById,[id],function(err,res){ if(err){console.log(err);} //assigning values here, to replace the nulls with empty strings self.context.viewId = id; self.context.username = res[0].username; self.context.telephone = res[0].telephone || ""; self.context.name = res[0].name; self.context.email = res[0].email; self.context.userFunction = res[0].userFunction || ""; self.context.street = res[0].Street || ""; self.context.number = res[0].number || ""; self.context.zip = res[0].zip || ""; self.context.city = res[0].city || ""; self.context.info = res[0].info || ""; self.context.since = res[0].since || ""; finish(); }); } SocialuserController.prototype.getCurrentDateTime = function(){ var date = new Date(); var curdateTime = ""; curdateTime += date.getFullYear() + "-" + (date.getMonth() +1)+ "-" + date.getDate(); curdateTime += " " + date.getHours() + ":" + date.getMinutes() + ":" + date.getSeconds(); return curdateTime; }
export default [ { title: '身份核验', iconSvg: 'ihome', children: [ { path: '/dataVerification/namePhone', title: '姓名/手机号',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/idPhone', title: '身份证号/手机号',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/sexPhone', title: '性别/手机号',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/peoPhone', title: '手机号/使用人职业',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/addPhone', title: '手机号/所在单位',iconSvg: 'iipAdressBlacklist' }, ] }, { path: '/dataVerification/addCustomer', title: '虚拟帐号核验', iconSvg: 'inewConsumerSubmit', children: [ { path: '/dataVerification/nameEmail', title: '姓名/邮箱',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/nameEmail1', title: '企业/邮箱',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/nameEmail2', title: '虚拟号码个数',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/nameEmail3', title: '手机号/虚拟账号',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/nameEmail4', title: '手机号/信用卡',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/nameEmail5', title: '手机号/虚拟身份',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/nameEmail6', title: '贷款类APP个数',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/nameEmail7', title: '手机号/IMSI',iconSvg: 'itelephoneBlacklist' }, ] }, { path: '/dataVerification/examineCustomer', title: '设备核验', iconSvg: 'iauditsMgt', children: [ { path: '/dataVerification/naph', title: '同设备多手机号核验',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/naph1', title: '设备操作系统核验',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/naph2', title: '设备型号核验',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/naph3', title: '同手机号设备核验',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/naph4', title: '手机号/IMEI对应',iconSvg: 'iipAdressBlacklist' }, ] }, { path: '/dataVerification/creditLoan', title: '位置核验', iconSvg: 'icheatWarn', children: [ { path: '/dataVerification/place', title: '手机号归属地核验',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/place1', title: '手机号所在地核验',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/place2', title: '手机号活跃城市核验',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/place3', title: '手机号居住地核验',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/place4', title: '手机号工作地核验',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/place5', title: '手机号机主籍贯核验',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/place6', title: '手机号出现位置核验',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/place7', title: '手机号活跃时间核验',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/place8', title: '手机号位置共现核验',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/place9', title: '出行规律核验',iconSvg: 'ivirtualAccountBlacklist' }, ] }, { path: '/dataVerification/searchCustomer', title: '关系核验', iconSvg: 'iconsumerSearch', children: [ { path: '/dataVerification/relation', title: '手机号之间熟悉程度',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/relation1', title: '手机号之间社会关系',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/relation2', title: '虚拟账号是否有关系',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/relation3', title: '实体是否有群体关系',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/relation4', title: '手机号之间通联频次',iconSvg: 'iipAdressBlacklist' }, ] }, { path: '/dataVerification/manage', title: '行为核验', iconSvg: 'iBusinessMgt', children: [ { path: '/dataVerification/action', title: '车牌违章核验',iconSvg: 'iidCardBlacklist' }, { path: '/dataVerification/action1', title: '搜索词核验',iconSvg: 'itelephoneBlacklist' }, { path: '/dataVerification/action2', title: '近期搜索热词',iconSvg: 'ivirtualAccountBlacklist' }, { path: '/dataVerification/action3', title: '借贷行为核验',iconSvg: 'iipAdressBlacklist' }, { path: '/dataVerification/action4', title: '收入消费水平核验',iconSvg: 'iipAdressBlacklist' }, ] } ]
/* * * Blockstrap v0.8.0.1 * http://blockstrap.com * * Designed, Developed and Maintained by Neuroware.io Inc * All Work Released Under MIT License * * -- Including this file in the HTML header is the only requirement * -- Everything else, including the loading of dependencies is handled here * */ var blockstrap_options = { v: "0.8.0.1", id: "blockstrap", app_id: "framework", loader_id: "blockstrap", account_poll: true, install: false, public: false, security: false, role: "admin", theme: "default", element: "body", less: false, test: false, refresh: true, cascade: true, html_base: "html/", data_base: "data/", core_base: "blockstrap/", theme_base: "themes/", dependency_base: "js/dependencies/", module_base: "js/modules/", page_base: "index", slug_base: "dashboard", store: [ "app_url", "your_name", "your_username", "your_password" ], base_url: "", content_id: "main-content", navigation_id: "navigation", mobile_nav_id: "mobile-footer", bootstrap: [ "lists", "jumbotrons", "panels", "tables", "modals", "forms", "bars" ], buttons: { classes: [ "access", "edit", "hidden_toggler", "login", "logout", "page", "print", "refresh", "remove", "reset", "setup", "import", "toggle", "sign", "verify", "switch", "new_chain", "new_contract", "see_all", "check_inactive", "check_all_inactive", "add_contact_address", "contract_send", "contract_remove" ], ids: [ "create-account", "create-contact", "create-credentials", "edit-object", "import-file", "more-security", "send-money", "set-credentials", "submit-import", "submit-payment", "submit-verification", "save-salt", "save-wallet" ] }, styles: false, timeouts: { default: 750, loader: 750, isotope_delay: 750, clear_forms: 50, // Related to a strange firefox bug delayed_init: 750, // Are we sure we need this? Was 3000 bs_buttons_submit_payment: 750, // Are we sure we need this? Was 6000 bs_forms_switch_address: 750, // Are we sure we need this? Was 6000 bs_widgets_request: 750, // Are we sure we need this? Was 6000 es_buttons_confirm: 750, // Are we sure we need this? Was 6000 es_ready_iso_delay: 750, // Are we sure we need this? Was 6000 es_forms_edit: 750, // Are we sure we need this? Was 6000 es_forms_record: 750, // Are we sure we need this? Was 6000 es_instances_setup: 750, // Are we sure we need this? Was 6000 es_txs_commit: 750, // Are we sure we need this? Was 6000 es_txs_confirm: 750, // Are we sure we need this? Was 6000 es_txs_prepare: 750, // Are we sure we need this? Was 6000 }, confirmations: { default: 0 }, contacts: [ { name: "Blockstrap Donations", blockchains: { btc: ["1GjHvbkCyYpy3uaNPvHsxe2EptH2RxEvMt"], dash: ["Xhp3RfQKVCsqju3VEcHuMwcMPNbLszEGJG"], doge: ["DJHXpkQGcRydRvocWaeUtZir6c2pXHkUn4"], ltc: ["LbGtaXcsPDQpU6pA8k3sTDmCaG5qFUPAhP"], btct: ["miNyrRGBZkyVxw1RoKMLpEagCcftVQJD22"], dasht: ["y67MSj12Wm9YJA4291VPpnC8pGS128tH4J"], doget: ["ncq5H5EdCwmGVtQtquk2TKyXDTNApoDpwq"], ltct: ["moyssLnSTs6EBWDoyRMaXkUKnDmLCSXBte"] }, contact_dnk: false } ], tests: { api: { address: { request: "1Nz5RqevRodefPyGVB8EpdwSEGS4Ax2f1k", results: { address: "1Nz5RqevRodefPyGVB8EpdwSEGS4Ax2f1k", balance: 10019000, blockchain: "btc", hash: "f1260c3cd86ecc03ce460c303ec0e8006e32273d", received: 10019000, tx_count: 2 } }, addresses: { request: [ "1121cQLqCsDsLPAkJW5ddTCREZ7Bp4ufrk", "12higDjoCCNXSA95xZMWUdPvXNmkAduhWv" ], results: [ { address: "1121cQLqCsDsLPAkJW5ddTCREZ7Bp4ufrk", balance: 0, blockchain: "btc", hash: "0030ececbad05ffcdff89f3f26e38ca3d735a8de", received: 5000000000, tx_count: 2 }, { address: "12higDjoCCNXSA95xZMWUdPvXNmkAduhWv", balance: 1, blockchain: "btc", hash: "12ab8dc588ca9d5787dde7eb29569da63c3a238c", received: 7764439255613, tx_count: 78 } ] }, block: { request: "15968", results: { blockchain: "btc", hash: "00000000201016a83272835468d457d15965d57f57c0da5944dc94ea9389f360", height: 15968, next: "0000000037d7c9885177df7af395d2e99b176a9372a03b855abdf2c9adac90b1", prev: "00000000abae6b44fa98526e865a08820f4528eda46cad40445de3690c502ae8", time: 1243609567, tx_count: 2 } }, relay: { request: "0100000001ec71e2ceac8476bea21fbc4a97062c000f07def6c8ef8d9171fb1a5e113418e0010000008c493046022100e6f39b4393794ef03b0f9dc71395e0835a211015b42ab4329cb6a6c1c8b3c6ea022100f1ccae451f35e5c5ad25a8f7e7b5e778bafc4dc69dd560fab1cbadbb88767916014104e1934263e84e202ebffca95246b63c18c07cd369c4f02de76dbd1db89e6255dacb3ab1895af0422e24e1d1099e80f01b899cfcdf9b947575352dbc1af57466b5ffffffff0210270000000000001976a914652c453e3f8768d6d6e1f2985cb8939db91a4e0588ace065f81f000000001976a914cf0dfe6e0fa6ea5dda32c58ff699071b672e1faf88ac00000000", results: false }, transaction: { request: "06032a172f88ba823785f87341eab26ee7a2eb2de9d2f105220d6580e3affc16", results: { block: 15968, blockchain: "btc", fees: 0, input: 300000000000, output: 300000000000, size: 6883, time: 1243609567, txid: "06032a172f88ba823785f87341eab26ee7a2eb2de9d2f105220d6580e3affc16", value: 300000000000 } }, transactions: { request: "1Nz5RqevRodefPyGVB8EpdwSEGS4Ax2f1k", results: [ { block: 317958, blockchain: "btc", fees: 10000, input: 1030000, output: 1020000, size: 668, time: 1409255576, txid: "5e441731363d19e7fb541600a944189724d1fd6863483b1d3903b2a2863aafa7", value: 19000 }, { block: 317957, blockchain: "btc", fees: 0, input: 25000000, output: 25000000, size: 225, time: 1409255541, txid: "65e7df7f40e1a38626a98a150730e5ed42d4b6b648ca9ff66e035ec21903aca3", value: 10000000 } ] }, unspents: { request: "1Nz5RqevRodefPyGVB8EpdwSEGS4Ax2f1k", results: [ { index: 0, script: "76a914f1260c3cd86ecc03ce460c303ec0e8006e32273d88ac", txid: "5e441731363d19e7fb541600a944189724d1fd6863483b1d3903b2a2863aafa7", value: 19000 }, { index: 0, script: "76a914f1260c3cd86ecc03ce460c303ec0e8006e32273d88ac", txid: "65e7df7f40e1a38626a98a150730e5ed42d4b6b648ca9ff66e035ec21903aca3", value: 10000000 } ] } } }, styles: { vars: { content_bg: "#DDD", header_bg: "#475862" }, elements: { content_bg: "#main-content", header_bg: "header" }, rules: { content_bg: "background", header_bg: "background" } }, blockchains: { btct: { blockchain: "Bitcoin (Testnet)", lib: "bitcointestnet", apis: { blockcypher: "http://api.blockcypher.com/v1/btc/test3/", blocktrail: "https://api.blocktrail.com/v1/tBTC/", toshi: "https://testnet3.toshi.io/api/v0/", qt: "proxies/rpc.php?blockchain=btct" }, fee: 0.0001, op_return: true, op_limit: 80 }, dasht: { blockchain: "DashPay (Testnet)", lib: "dashpaytestnet", apis: { }, fee: 0.0001, op_return: true, op_limit: 80 }, doget: { blockchain: "Dogecoin (Testnet)", lib: "dogecointestnet", apis: { blockstrap: "http://officeapi.neuroware.io/v0/doget/", spinal: "http://spinal.neuroware.io/v1/doget/" }, fee: 2, op_return: true, op_limit: 80 }, ltct: { blockchain: "Litecoin (Testnet)", lib: "litecointestnet", apis: { }, fee: 0.001, op_return: true, op_limit: 80 }, multi: { private: true, apis: { blockstrap: "http://officeapi.neuroware.io/v0/multi/" } }, btc: { blockchain: "Bitcoin", lib: "bitcoin", apis: { blockcypher: "http://api.blockcypher.com/v1/btc/main/", spinal: "https://api.neuroware.io/v2/btc/" }, fee: 0.0001, op_return: true, op_limit: 80 }, dash: { blockchain: "DashPay", lib: "dashpay", apis: { }, fee: 0.0001, op_return: true, op_limit: 80 }, doge: { blockchain: "Dogecoin", lib: "dogecoin", apis: { blockcypher: "http://api.blockcypher.com/v1/doge/main/", qt: "proxies/rpc.php?blockchain=doge" }, fee: 1, op_return: true, op_limit: 80 }, ltc: { blockchain: "Litecoin", lib: "litecoin", apis: { }, fee: 0.001, op_return: true, op_limit: 80 } }, apis: { available: { blockcypher: "BlockCypher", spinal: "Spinal" }, defaults: { blockcypher: { async: false, functions: { to: { address: "addrs/$call/full", addresses: "addrs/$call/full", block: "blocks/", op_returns: "addrs/$call/full", relay: "txs/push/", relay_param: "tx", relay_json: "tx", transaction: "txs/", transactions: "addrs/$call/full", unspents: "addrs/$call?unspentOnly=true&includeScript=true" }, from: { address: { key: "", address: "address", hash: "", tx_count: "final_n_tx", received: "total_received", balance: "final_balance" }, addresses: { key: "", address: "address", hash: "", tx_count: "final_n_tx", received: "total_received", balance: "final_balance" }, block: { key: "", height: "height", hash: "hash", prev: "prev_block", next: "", next: "", tx_count: "n_tx", time: "[time, utctoepoch]" }, op_returns: { key: "", inner: "txs", txid: "hash", data: "script" }, relay: { txid: "hash", inner: "tx" }, transaction: { key: "", txid: "hash", size: "size", block: "block_height", time: "[received, utctoepoch]", input: "[total, +, fees, int]", output: "total", value: "[total, -, fees, int]", fees: "fees", data: "transactions.outputs.data_string" }, transactions: { key: "", inner: "txs", txid: "hash", size: "size", block: "block_height", time: "[received, utctoepoch]", input: "[total, +, fees, int]", output: "total", value: "[outputs, value]", fees: "fees", data: "transactions.outputs.data_string", transactions: "txs" }, unspents: { key: "", inner: "txrefs", inner_unconfirmed: "unconfirmed_txrefs", confirmations: "confirmations", txid: "tx_hash", index: "tx_output_n", value: "value", script: "script" } } } }, spinal: { async: false, functions: { to: { address: 'addr/$call/mode/1', block: 'block/$call/mode/1', dnkeys: 'dnkey/', op_returns: "addr/$call/mode/2", relay: "tx/relay/", relay_param: "tx", relay_json: "tx", transaction: "tx/$call/mode/1", transactions: "addr/$call/mode/2", unspents: "addr/$call/mode/3" }, from: { address: { key: "result", address: "id", hash: "hash", tx_count: "tx_count", received: "total_incoming_satoshi", balance: "total_balance_satoshi" }, block: { key: "result", height: "height", hash: "id", prev: "prev_block_id", next: "next_block_id", tx_count: "tx_count", time: "time" }, dnkeys: { key: "result", dnkeys: "dnkeys" }, op_returns: { key: "result", inner: "tx", txid: "txid", data: "opreturn" }, relay: { key: "result", txid: "tx" }, transaction: { key: "result", txid: "id", size: "size", block: "block_height", time: "time", input: "total_vin_satoshi", output: "total_vout_satoshi", value: "estimated_value", fees: "total_fees_satoshi" }, transactions: { key: "result", inner: "tx", txid: "txid", size: "size", block: "block_height", time: "time", input: "total_vin_satoshi", output: "total_vout_satoshi", value: "estimated_value", fees: "total_fees_satoshi" }, unspents: { key: "result", inner: "tx", confirmations: "", txid: "txid", index: "index", value: "satoshi", script: "script_hex" } } } } } } }; if(typeof bs_secrets != 'undefined') { blockstrap_options.keys = bs_secrets; } var blockstrap_defaults = JSON.stringify(blockstrap_options);
(self.webpackChunkCnblogs_Theme_SimpleMemory=self.webpackChunkCnblogs_Theme_SimpleMemory||[]).push([[3199],{1391:function(e,s,l){"use strict";l.r(s)}}]);
export { default } from 'ember-inputmask/components/one-way-credit-card-mask';
import { UPDATE_ARTIST_LIST, SEARCH_BY_ARTIST, SEARCH_BY_GENRE, } from './actions/actionTypes.js' import { getArtistsByNameGenre, getArtistsByGenre, } from '../helpers/artistApiHelper.js' import { updateArtistsList, updateFilteredResultArtistList, } from './actions/actions.js' export default store => next => async action =>{ switch (action.type ){ case SEARCH_BY_ARTIST: const result= await getArtistsByNameGenre(action.payload.keyword,action.payload.limit) store.dispatch(updateArtistsList(result)); break; case SEARCH_BY_GENRE: const filteredResult= await getArtistsByGenre(action.payload) store.dispatch(updateFilteredResultArtistList(filteredResult)); break; } const result = next(action); return result }
export function createStreamingData() { let result let promise function Data({ children, duration = 500 }) { if (result) return result if (!promise) promise = new Promise((res) => { setTimeout(() => { result = children res() }, duration) }) throw promise } return Data }
/** * [[AMElement]] represents any SVG element and related functionality. */ import * as $dom from "../utils/DOM"; import * as $object from "../utils/Object"; import * as $type from "../utils/Type"; /** * ============================================================================ * MAIN CLASS * ============================================================================ * @hidden */ /** * A base class for all SVG elements. Provides low-level DOM functionality. * * All visual elements extend this class. */ var AMElement = /** @class */ (function () { /** * Constructor creates a new element or uses the one that was passed in. * * @param element Element reference node type */ function AMElement(element) { /** * Indicates if the element was already disposed. */ this._isDisposed = false; /** * Current X coordinate. */ this._x = 0; /** * Current Y coordinate. */ this._y = 0; /** * */ this._rotationY = 0; /** * */ this._rotationX = 0; /** * Current rotation. */ this._rotation = 0; /** * Current scale. */ this._scale = 1; if (typeof element === "string") { this.node = document.createElementNS($dom.SVGNS, element); } else { this.node = element; } } /** * Removes element's node from DOM. */ AMElement.prototype.removeNode = function () { if (this.node) { if (this.node.parentNode) { this.node.parentNode.removeChild(this.node); } } }; Object.defineProperty(AMElement.prototype, "transformString", { /** * Returns `transform` attribute of the element. * * @ignore Exclude from docs * @return Transform attribute value */ get: function () { if (this.node) { return this._transformString; /* const value = this.node.getAttribute("transform"); if (value !== null) { return value; }*/ } }, enumerable: true, configurable: true }); /** * Appply position, rotation and scale properties via elemen's `transform` * property * * @ignore Exclude from docs */ AMElement.prototype.transform = function () { var transfromString = "translate(" + this._x + "," + this._y + ")"; if (this._scale != 1) { transfromString += ((transfromString ? " " : "") + "scale(" + this._scale + ")"); } if (this._rotation != 0) { var rotateString = "rotate(" + this._rotation + ")"; if (this._rotationX && this._rotationY) { rotateString = "rotate(" + this._rotation + " " + this._rotationX + " " + this._rotationY + ")"; } transfromString += ((transfromString ? " " : "") + rotateString); } this._transformString = transfromString; this.node.setAttribute("transform", transfromString); }; /** * Returns bounding box of the element. * * ATTENTION: Bounding box calculations are extremely costly so should be * used sparingly and cached whenever possible. * * @return Bounding rectangle */ AMElement.prototype.getBBox = function () { var bbox = { width: 0, height: 0, x: 0, y: 0 }; // FF would fail if getBBox() is called without node added to parent if (this.node && this.node.parentNode) { try { // again for ff. TODO: check if this doesn't slow down var svgbbox = this.node.getBBox(); bbox.x = svgbbox.x; bbox.y = svgbbox.y; bbox.width = svgbbox.width; bbox.height = svgbbox.height; } catch (err) { } } return bbox; }; /** * Moves the element to new coordinates. * * @param x Target X * @param y Target Y */ AMElement.prototype.moveTo = function (point) { if (point) { var x = point.x; var y = point.y; if (this._x != x || this._y != y) { this._x = x; this._y = y; this.transform(); } } }; Object.defineProperty(AMElement.prototype, "content", { /** * Returns element's contents as SVG markup. * * @return Contents */ get: function () { // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers return this.node.innerHTML || ""; }, /** * Element's SVG contents. * * @param value Contents */ set: function (value) { // @todo Do not use `innerHTML` as this is not reliable and will not work on all browsers this.node.innerHTML = value; }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "textContent", { /** * @return Text contents */ get: function () { return this.node.textContent || ""; }, /** * Text contents of the SVG element. * * @param value Text contents */ set: function (value) { this.node.textContent = value; }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "x", { /** * @return X coordinate (px) */ get: function () { return this._x; }, /** * Element's X position in pixels. * * @param value X coordinate (px) */ set: function (value) { if (this._x != value) { this._x = value; this.transform(); } }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "y", { /** * @return Y coordinate (px) */ get: function () { return this._y; }, /** * Element's Y position in pixels. * * @param value Y coordinate (px) */ set: function (value) { if (this._y != value) { this._y = value; this.transform(); } }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "rotation", { /** * @return Rotation */ get: function () { return this._rotation; }, /** * Element's rotation in degrees. * * @param value Rotation */ set: function (angle) { if (this._rotation != angle) { this._rotation = angle; this.transform(); } }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "rotationX", { /** * @ignore */ get: function () { return this._rotationX; }, /** * @ignore */ set: function (x) { if (this._rotationX != x) { this._rotationX = x; this.transform(); } }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "rotationY", { /** * @ignore */ get: function () { return this._rotationY; }, /** * @ignore */ set: function (y) { if (this._rotationY != y) { this._rotationY = y; this.transform(); } }, enumerable: true, configurable: true }); Object.defineProperty(AMElement.prototype, "scale", { /** * @return Scale */ get: function () { return this._scale; }, /** * Element's scale where 1 is original size. * * Setting to 0.5 will reduce element's size by 50%, 2 will make element * twice as large, etc. * * @param value Scale */ set: function (value) { if (this._scale != value) { this._scale = value; this.transform(); } }, enumerable: true, configurable: true }); /** * Removes an attribute from element. * * @param attribute Attribute to remove */ AMElement.prototype.removeAttr = function (attribute) { this.node.removeAttribute(attribute); }; /** * Sets a set of attributes on a element. * * @param attributes An object with attribute names (key) and values * @return The same element */ AMElement.prototype.attr = function (attributes) { var _this = this; $object.each(attributes, function (attributeName, attributeValue) { if (!$type.hasValue(attributeValue)) { _this.node.removeAttribute(attributeName); } else { // this is for performance testing //if(attributeValue == this.node.getAttribute(attributeName)){ // console.log(attributeName, attributeValue) //} _this.node.setAttribute(attributeName, attributeValue); } }); return this; }; /** * Returns a value of a node attribute. * * @param attribute Attribute name * @return Attribute value */ AMElement.prototype.getAttr = function (attribute) { return this.node.getAttribute(attribute); }; /** * Sets a single attribute of the element's node using namesspace. * * @param ns Namespace * @param attribute Attribute * @param value Value * @return The same element */ AMElement.prototype.attrNS = function (ns, attribute, value) { this.node.setAttributeNS(ns, attribute, value); return this; }; /** * Returns a namespaced attribute value from node. * * @param ns Namespace * @param attribute Attribute * @return Attribute value */ AMElement.prototype.getAttrNS = function (ns, attribute) { return this.node.getAttributeNS(ns, attribute); }; /** * Removes `style` attribute from node. * * @param attribute Attribute to remove */ AMElement.prototype.removeStyle = function (attribute) { // @todo Review because it's a bit messy and maybe not needed (pratically not used) delete this.node.style[attribute]; }; /** * Returns style attribute value. * * @param attribute Style attribute value * @return Attribute value */ AMElement.prototype.getStyle = function (attribute) { // @todo Review because it's a bit messy and maybe not needed (pratically not used) return this.node.style[attribute]; }; /** * Adds style attributes to element's node. * * @param attributes Object containing attribute: value pairs * @return The same element */ AMElement.prototype.addStyle = function (attributes) { var _this = this; // @todo Review because it's a bit messy and maybe not needed (pratically not used) $object.each(attributes, function (attributeName, attributeValue) { if (!$type.hasValue(attributeValue)) { _this.removeStyle(attributeName); } else { _this.node.style[attributeName] = attributeValue; } }); return this; }; /** * Adds a class to element. * * @param name Class name */ AMElement.prototype.addClass = function (name) { $dom.addClass(this.node, name); }; /** * Removes a class from element. * * @param name Class name */ AMElement.prototype.removeClass = function (name) { $dom.removeClass(this.node, name); }; /** * Sets a class name on element. * * @param name Class name */ AMElement.prototype.setClass = function (name) { this.node.setAttribute("class", name); }; /** * Removes all element's child nodes, basically leaving it empty. */ AMElement.prototype.removeChildNodes = function () { // remove all children while (this.node.childNodes.length > 0) { this.node.removeChild(this.node.firstChild); } }; /** * Was this element already been disposed? * * @return Disposed? */ AMElement.prototype.isDisposed = function () { return this._isDisposed; }; /** * Disposes element. */ AMElement.prototype.dispose = function () { this.removeNode(); }; return AMElement; }()); export { AMElement }; //# sourceMappingURL=AMElement.js.map
import React from "react" import ReactDOM from "react-dom" import App from "./App" async function renderApp() { const rootEl = document.getElementById("root") if (!(rootEl instanceof Element)) { throw new Error("invalid type") } ReactDOM.render(<App />, rootEl) } renderApp() // TODO: once we have routes, activate this code // if (module.hot) { // module.hot.accept('./routes', () => { // renderApp(); // }); // }
var express = require('express'); var data = require('./data/test.json'); var app = express(); const PORT = 3000; app.set('view engine','ejs');//sent views to EJS //route for index page app.get('/', (req,res)=>{ var title = "Our Home Page"; res.render('pages/index',{title:title}); }); //route for users (list) page app.get('/users', function(req, res) { var title = 'Users Page'; res.render('users/index', { title: title, users: data }); }); //add user/view route - we are cheating by using the array index + 1 app.get('/users/view/:id', function(req, res) { var title = 'User Page'; var id = req.params.id; res.render('users/view', { title: title, user: data[--id] }); }); app.listen(PORT,()=>{ console.log(`App is running on port ${PORT}`); console.log(data); });
module.exports = { transpileDependencies: [ 'vuetify', ], lintOnSave: false, publicPath: process.env.NODE_ENV === 'production' ? '/' : '/', filenameHashing: false, devServer: { host: 'wav2mid.com', overlay: { warnings: true, errors: false, }, proxy: { '^/mts/transcription': { target: 'http://localhost:8002/', secure: false, pathRewrite: { '^/mts': '' }, logLevel: 'debug', }, }, }, chainWebpack: (config) => { config .plugin('html') .tap((args) => { args[0].title = 'Muzikos transkripcijos paslauga'; // eslint-disable-line no-param-reassign return args; }); }, configureWebpack: { devtool: process.env.NODE_ENV === 'production' ? 'source-map' : 'inline-source-map', }, };
/** * termcoin - a bitcoin wallet for your terminal * Copyright (c) 2014, Christopher Jeffrey. (MIT Licensed) * https://github.com/chjj/termcoin */ exports.bitcoind = require('./bitcoind'); exports.bcoin = require('./bcoin'); exports.bitcore = require('./bitcore'); exports.libbitcoind = require('./libbitcoind'); exports.bitcoindjs = exports.libbitcoind; exports['bitcoind.js'] = exports.libbitcoind;
import React, { useState } from 'react'; import SinglePendingTaskStyled from './SinglePendingTaskStyled'; import { Link } from 'react-router-dom'; import { Button } from 'antd'; import { GradingModal } from './GradingModal'; function SinglePendingTask({ data, track }) { const { title, deadline, id } = data; const [visible, setVisible] = useState(); const onCancel = () => { setVisible(false); }; return ( <SinglePendingTaskStyled> <div className="pending-task"> <div className="task-box"> <div className="task-details w-50"> <Link className="task-name" to={{ pathname: `/dashboard/pending-task/${id}`, query: { data }, }} > {title} </Link> <p className="task-track">{track}</p> </div> <div className="task-deadline "> <p>Deadline: {new Date(deadline).toUTCString()}</p> <Button onClick={() => setVisible(true)}>Grading</Button> </div> <GradingModal visible={visible} taskId={id} onCancel={onCancel} /> </div> </div> </SinglePendingTaskStyled> ); } export default SinglePendingTask;
/** * DocuSign REST API * The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. * * OpenAPI spec version: v2 * Contact: devcenter@docusign.com * * NOTE: This class is auto generated. Do not edit the class manually and submit a new issue instead. * */ (function(root, factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['Configuration', 'ApiClient', 'model/BulkEnvelopeStatus', 'model/BulkEnvelopesResponse', 'model/BulkRecipientsRequest', 'model/BulkRecipientsResponse', 'model/BulkRecipientsSummaryResponse', 'model/BulkRecipientsUpdateResponse', 'model/ErrorDetails'], factory); } else if (typeof module === 'object' && module.exports) { // CommonJS-like environments that support module.exports, like Node. module.exports = factory(require('../Configuration'), require('../ApiClient'), require('../model/BulkEnvelopeStatus'), require('../model/BulkEnvelopesResponse'), require('../model/BulkRecipientsRequest'), require('../model/BulkRecipientsResponse'), require('../model/BulkRecipientsSummaryResponse'), require('../model/BulkRecipientsUpdateResponse'), require('../model/ErrorDetails')); } else { // Browser globals (root is window) if (!root.Docusign) { root.Docusign = {}; } root.Docusign.BulkEnvelopesApi = factory(root.Docusign.Configuration, root.Docusign.ApiClient, root.Docusign.BulkEnvelopeStatus, root.Docusign.BulkEnvelopesResponse, root.Docusign.BulkRecipientsRequest, root.Docusign.BulkRecipientsResponse, root.Docusign.BulkRecipientsSummaryResponse, root.Docusign.BulkRecipientsUpdateResponse, root.Docusign.ErrorDetails); } }(this, function(Configuration, ApiClient, BulkEnvelopeStatus, BulkEnvelopesResponse, BulkRecipientsRequest, BulkRecipientsResponse, BulkRecipientsSummaryResponse, BulkRecipientsUpdateResponse, ErrorDetails) { 'use strict'; /** * BulkEnvelopes service. * @module api/BulkEnvelopesApi * @version 3.0.0 */ /** * Constructs a new BulkEnvelopesApi. * @alias module:api/BulkEnvelopesApi * @class * @param {module:ApiClient} apiClient Optional API client implementation to use, * default to {@link module:ApiClient#instance} if unspecified. */ var exports = function(apiClient) { this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance; this.setApiClient = function(apiClient) { this.apiClient = apiClient; }; this.getApiClient = function() { return this.apiClient; }; /** * Callback function to receive the result of the deleteRecipients operation. * @callback module:api/BulkEnvelopesApi~deleteRecipientsCallback * @param {String} error Error message, if any. * @param {module:model/BulkRecipientsUpdateResponse} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Deletes the bulk recipient file from an envelope. * Deletes the bulk recipient file from an envelope. This cannot be used if the envelope has been sent. After using this, the `bulkRecipientsUri` property is not returned in subsequent GET calls for the envelope, but the recipient will remain as a bulk recipient. * @param {String} accountId The external account number (int) or account ID Guid. * @param {String} envelopeId The envelopeId Guid of the envelope being accessed. * @param {String} recipientId The ID of the recipient being accessed. * @param {module:api/BulkEnvelopesApi~deleteRecipientsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/BulkRecipientsUpdateResponse} */ this.deleteRecipients = function(accountId, envelopeId, recipientId, callback) { var postBody = null; // verify the required parameter 'accountId' is set if (accountId == undefined || accountId == null) { throw new Error("Missing the required parameter 'accountId' when calling deleteRecipients"); } // verify the required parameter 'envelopeId' is set if (envelopeId == undefined || envelopeId == null) { throw new Error("Missing the required parameter 'envelopeId' when calling deleteRecipients"); } // verify the required parameter 'recipientId' is set if (recipientId == undefined || recipientId == null) { throw new Error("Missing the required parameter 'recipientId' when calling deleteRecipients"); } var pathParams = { 'accountId': accountId, 'envelopeId': envelopeId, 'recipientId': recipientId }; var queryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = []; var accepts = ['application/json']; var returnType = BulkRecipientsUpdateResponse; return this.apiClient.callApi( '/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients', 'DELETE', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; /** * Callback function to receive the result of the get operation. * @callback module:api/BulkEnvelopesApi~getCallback * @param {String} error Error message, if any. * @param {module:model/BulkEnvelopeStatus} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets the status of a specified bulk send operation. * Retrieves the status information of a single bulk recipient batch. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. * @param {String} accountId The external account number (int) or account ID Guid. * @param {String} batchId * @param {Object} opts Optional parameters * @param {String} opts.count Specifies the number of entries to return. * @param {String} opts.include Specifies which entries are included in the response. Multiple entries can be included by using commas in the query string (example: ?include&#x3D;”failed,queued”) Valid values are: * all - Returns all entries. If present, overrides all other query settings. This is the default if no query string is provided. * failed - This only returns entries with a failed status. * queued - This only returns entries with a queued status. * sent – This only returns entries with a sent status. * @param {String} opts.startPosition Specifies the location in the list of envelopes from which to start. * @param {module:api/BulkEnvelopesApi~getCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/BulkEnvelopeStatus} */ this.get = function(accountId, batchId, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'accountId' is set if (accountId == undefined || accountId == null) { throw new Error("Missing the required parameter 'accountId' when calling get"); } // verify the required parameter 'batchId' is set if (batchId == undefined || batchId == null) { throw new Error("Missing the required parameter 'batchId' when calling get"); } var pathParams = { 'accountId': accountId, 'batchId': batchId }; var queryParams = { 'count': opts['count'], 'include': opts['include'], 'start_position': opts['startPosition'] }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = []; var accepts = ['application/json']; var returnType = BulkEnvelopeStatus; return this.apiClient.callApi( '/v2/accounts/{accountId}/bulk_envelopes/{batchId}', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; /** * Callback function to receive the result of the getRecipients operation. * @callback module:api/BulkEnvelopesApi~getRecipientsCallback * @param {String} error Error message, if any. * @param {module:model/BulkRecipientsResponse} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets the bulk recipient file from an envelope. * Retrieves the bulk recipient file information from an envelope that has a bulk recipient. * @param {String} accountId The external account number (int) or account ID Guid. * @param {String} envelopeId The envelopeId Guid of the envelope being accessed. * @param {String} recipientId The ID of the recipient being accessed. * @param {Object} opts Optional parameters * @param {String} opts.includeTabs * @param {String} opts.startPosition * @param {module:api/BulkEnvelopesApi~getRecipientsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/BulkRecipientsResponse} */ this.getRecipients = function(accountId, envelopeId, recipientId, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'accountId' is set if (accountId == undefined || accountId == null) { throw new Error("Missing the required parameter 'accountId' when calling getRecipients"); } // verify the required parameter 'envelopeId' is set if (envelopeId == undefined || envelopeId == null) { throw new Error("Missing the required parameter 'envelopeId' when calling getRecipients"); } // verify the required parameter 'recipientId' is set if (recipientId == undefined || recipientId == null) { throw new Error("Missing the required parameter 'recipientId' when calling getRecipients"); } var pathParams = { 'accountId': accountId, 'envelopeId': envelopeId, 'recipientId': recipientId }; var queryParams = { 'include_tabs': opts['includeTabs'], 'start_position': opts['startPosition'] }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = []; var accepts = ['application/json']; var returnType = BulkRecipientsResponse; return this.apiClient.callApi( '/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; /** * Callback function to receive the result of the list operation. * @callback module:api/BulkEnvelopesApi~listCallback * @param {String} error Error message, if any. * @param {module:model/BulkEnvelopesResponse} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Gets status information about bulk recipient batches. * Retrieves status information about all the bulk recipient batches. A bulk recipient batch is the set of envelopes sent from a single bulk recipient file. The response includes general information about each bulk recipient batch. The response returns information about the envelopes sent with bulk recipient batches, including the `batchId` property, which can be used to retrieve a more detailed status of individual bulk recipient batches. * @param {String} accountId The external account number (int) or account ID Guid. * @param {Object} opts Optional parameters * @param {String} opts.count The number of results to return. This can be 1 to 20. * @param {String} opts.include * @param {String} opts.startPosition The position of the bulk envelope items in the response. This is used for repeated calls, when the number of bulk envelopes returned is too large for one return. The default value is 0. * @param {module:api/BulkEnvelopesApi~listCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/BulkEnvelopesResponse} */ this.list = function(accountId, opts, callback) { opts = opts || {}; var postBody = null; // verify the required parameter 'accountId' is set if (accountId == undefined || accountId == null) { throw new Error("Missing the required parameter 'accountId' when calling list"); } var pathParams = { 'accountId': accountId }; var queryParams = { 'count': opts['count'], 'include': opts['include'], 'start_position': opts['startPosition'] }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = []; var accepts = ['application/json']; var returnType = BulkEnvelopesResponse; return this.apiClient.callApi( '/v2/accounts/{accountId}/bulk_envelopes', 'GET', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; /** * Callback function to receive the result of the updateRecipients operation. * @callback module:api/BulkEnvelopesApi~updateRecipientsCallback * @param {String} error Error message, if any. * @param {module:model/BulkRecipientsSummaryResponse} data The data returned by the service call. * @param {String} response The complete HTTP response. */ /** * Adds or replaces envelope bulk recipients. * Updates the bulk recipients in a draft envelope using a file upload. The Content-Type supported for uploading a bulk recipient file is CSV (text/csv). The REST API does not support modifying individual rows or values in the bulk recipients file. It only allows the entire file to be added or replaced with a new file. * @param {String} accountId The external account number (int) or account ID Guid. * @param {String} envelopeId The envelopeId Guid of the envelope being accessed. * @param {String} recipientId The ID of the recipient being accessed. * @param {Object} opts Optional parameters * @param {module:model/BulkRecipientsRequest} opts.bulkRecipientsRequest * @param {module:api/BulkEnvelopesApi~updateRecipientsCallback} callback The callback function, accepting three arguments: error, data, response * data is of type: {@link module:model/BulkRecipientsSummaryResponse} */ this.updateRecipients = function(accountId, envelopeId, recipientId, opts, callback) { opts = opts || {}; var postBody = opts['bulkRecipientsRequest']; // verify the required parameter 'accountId' is set if (accountId == undefined || accountId == null) { throw new Error("Missing the required parameter 'accountId' when calling updateRecipients"); } // verify the required parameter 'envelopeId' is set if (envelopeId == undefined || envelopeId == null) { throw new Error("Missing the required parameter 'envelopeId' when calling updateRecipients"); } // verify the required parameter 'recipientId' is set if (recipientId == undefined || recipientId == null) { throw new Error("Missing the required parameter 'recipientId' when calling updateRecipients"); } var pathParams = { 'accountId': accountId, 'envelopeId': envelopeId, 'recipientId': recipientId }; var queryParams = { }; var headerParams = { }; var formParams = { }; var authNames = []; var contentTypes = []; var accepts = ['application/json']; var returnType = BulkRecipientsSummaryResponse; return this.apiClient.callApi( '/v2/accounts/{accountId}/envelopes/{envelopeId}/recipients/{recipientId}/bulk_recipients', 'PUT', pathParams, queryParams, headerParams, formParams, postBody, authNames, contentTypes, accepts, returnType, callback ); }; }; return exports; }));
import { unwrapType } from './wrappingTypeUtils'; export const inbuiltTypes = { Int: true, Boolean: true, String: true, Float: true, ID: true, }; const singularize = kind => { return kind.substr(0, kind.length - 1); }; export const filterNameLessTypeLess = arr => { return arr.filter(item => !!item.name && !!item.type); }; export const filterNameless = arr => { return arr.filter(item => !!item.name); }; export const filterValueLess = arr => { return arr.filter(item => !!item.value); }; export const mergeCustomTypes = (newTypesList, existingTypesList) => { const mergedTypes = [...existingTypesList]; const overlappingTypenames = []; const existingTypeIndexMap = {}; existingTypesList.forEach((et, i) => { existingTypeIndexMap[et.name] = i; }); newTypesList.forEach(nt => { if (existingTypeIndexMap[nt.name] !== undefined) { mergedTypes[existingTypeIndexMap[nt.name]] = nt; overlappingTypenames.push(nt.name); } else { mergedTypes.push(nt); } }); return { types: mergedTypes, overlappingTypenames, }; }; export const reformCustomTypes = typesFromState => { const sanitisedTypes = []; typesFromState.forEach(t => { if (!t.name) { return; } const sanitisedType = { ...t }; if (t.fields) { sanitisedType.fields = filterNameLessTypeLess(t.fields); } if (t.arguments) { sanitisedType.arguments = filterNameLessTypeLess(t.arguments); } sanitisedTypes.push(sanitisedType); }); const customTypes = { scalars: [], input_objects: [], objects: [], enums: [], }; sanitisedTypes.forEach(_type => { const type = JSON.parse(JSON.stringify(_type)); delete type.kind; switch (_type.kind) { case 'scalar': customTypes.scalars.push(type); return; case 'object': customTypes.objects.push(type); return; case 'input_object': customTypes.input_objects.push(type); return; case 'enum': customTypes.enums.push(type); return; default: return; } }); return customTypes; }; export const parseCustomTypes = customTypesServer => { const customTypesClient = []; Object.keys(customTypesServer).forEach(tk => { const types = customTypesServer[tk]; if (types) { types.forEach(t => { customTypesClient.push({ ...t, kind: singularize(tk), }); }); } }); return customTypesClient; }; export const getActionTypes = (actionDef, allTypes) => { const usedTypes = {}; const actionTypes = []; const getDependentTypes = typename => { if (usedTypes[typename]) return; const type = allTypes.find(t => t.name === typename); if (!type) return; actionTypes.push(type); usedTypes[typename] = true; if (type.kind === 'input_object' || type.kind === 'object') { type.fields.forEach(f => { const { typename: _typename } = unwrapType(f.type); getDependentTypes(_typename); }); } }; actionDef.arguments.forEach(a => { const { typename } = unwrapType(a.type); getDependentTypes(typename); }); getDependentTypes(actionDef.output_type); return actionTypes; }; export const hydrateTypeRelationships = (newTypes, existingTypes) => { const typeMap = {}; existingTypes.forEach(t => { typeMap[t.name] = t; }); return newTypes.map(t => { if (t.kind === 'object' && typeMap[t.name]) { return { ...t, relationships: typeMap[t.name].relationships, }; } return t; }); };
const { utils, ethers } = require('ethers') const bridgeToL1 = async (L2ERC721, L2NFTBridge, tokenId) => { // check if NFT is base L2 // check if L1StandardERC721 contract exists for the pair const L1NFT = await L2NFTBridge.pairNFTInfo(L2ERC721.address) if ( L1NFT.l1Contract !== ethers.constants.AddressZero && L1NFT.baseNetwork === 1 ) { const approveTx = await L2ERC721.approve(L2NFTBridge.address, tokenId) await approveTx.wait() console.log('Approved Bridge') console.log('Sending tx to withdraw NFT to L1..') const withdrawTx = await L2NFTBridge.withdraw( L2ERC721.address, // L2 NFT Contract tokenId, // tokenId 9999999, // sample l1 gas for the xDomain tx utils.formatBytes32String('') // data ) await withdrawTx.wait() return withdrawTx.hash } else { return [] } } module.exports = { bridgeToL1 }
exports.id = 0; exports.ids = null; exports.modules = { /***/ 84: /***/ ((__unused_webpack_module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.AddOrderDetailDto = void 0; class AddOrderDetailDto { constructor() { this.total = 0; } } exports.AddOrderDetailDto = AddOrderDetailDto; /***/ }), /***/ 60: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; var _a, _b, _c, _d, _e; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.OrderDetailsController = void 0; const common_1 = __webpack_require__(6); const add_order_detail_dto_1 = __webpack_require__(84); const order_details_service_1 = __webpack_require__(59); let OrderDetailsController = class OrderDetailsController { constructor(orderDetailsService) { this.orderDetailsService = orderDetailsService; } AddOrderDetails(body) { return this.orderDetailsService.AddOrderDetails(body); } GetById(params) { return this.orderDetailsService.GetById(parseInt(params.id)); } GetOrders() { return this.orderDetailsService.GetOrders(); } SetTotal(body) { this.orderDetailsService.SetTotal(body.id); } DeleteOrderDetails(params) { return this.orderDetailsService.DeleteOrderDetails(parseInt(params.id)); } }; __decorate([ (0, common_1.Post)(''), __param(0, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [typeof (_a = typeof add_order_detail_dto_1.AddOrderDetailDto !== "undefined" && add_order_detail_dto_1.AddOrderDetailDto) === "function" ? _a : Object]), __metadata("design:returntype", typeof (_b = typeof Promise !== "undefined" && Promise) === "function" ? _b : Object) ], OrderDetailsController.prototype, "AddOrderDetails", null); __decorate([ (0, common_1.Get)(':id'), __param(0, (0, common_1.Param)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", typeof (_c = typeof Promise !== "undefined" && Promise) === "function" ? _c : Object) ], OrderDetailsController.prototype, "GetById", null); __decorate([ (0, common_1.Get)('bills'), __metadata("design:type", Function), __metadata("design:paramtypes", []), __metadata("design:returntype", typeof (_d = typeof Promise !== "undefined" && Promise) === "function" ? _d : Object) ], OrderDetailsController.prototype, "GetOrders", null); __decorate([ (0, common_1.Put)(''), __param(0, (0, common_1.Body)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0) ], OrderDetailsController.prototype, "SetTotal", null); __decorate([ (0, common_1.Delete)(':id'), __param(0, (0, common_1.Param)()), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0) ], OrderDetailsController.prototype, "DeleteOrderDetails", null); OrderDetailsController = __decorate([ (0, common_1.Controller)('order-details'), __metadata("design:paramtypes", [typeof (_e = typeof order_details_service_1.OrderDetailsService !== "undefined" && order_details_service_1.OrderDetailsService) === "function" ? _e : Object]) ], OrderDetailsController); exports.OrderDetailsController = OrderDetailsController; /***/ }) }; exports.runtime = /******/ function(__webpack_require__) { // webpackRuntimeModules /******/ "use strict"; /******/ /******/ /* webpack/runtime/getFullHash */ /******/ (() => { /******/ __webpack_require__.h = () => ("b0b800d96e5a81d96dc6") /******/ })(); /******/ /******/ } ;
/** * * Headerr * */ import React from 'react'; import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; import { Helmet } from 'react-helmet'; import { createStructuredSelector } from 'reselect'; import { compose } from 'redux'; import { Layout, Avatar } from 'antd'; import injectSaga from 'utils/injectSaga'; import injectReducer from 'utils/injectReducer'; import { get } from 'lodash'; import makeSelectHeaderr from './selectors'; import { selectGlobal } from '../App/selectors'; import Logo from '../../images/logo.png'; import reducer from './reducer'; import saga from './saga'; import { fetchUser } from '../App/api.js'; const { Header } = Layout; /* eslint-disable react/prefer-stateless-function */ export class Headerr extends React.Component { constructor(props) { super(props); this.state = { username: '', }; } handleRedirect = () => { this.props.history.push('/news-page'); }; // this.props.history.push('/add-news'); componentDidMount() { this.fetchUser(); } fetchUser = async () => { let email = localStorage.getItem('email'); try { let response = await fetchUser(email); let u = get(response,'data[0]',{}); this.setState({ user: u }) } catch (e) { console.log(e.message); } } logout = () => { localStorage.clear(); this.props.history.push("/"); } render() { let avatar = <span />; setTimeout(() => { let a = localStorage.getItem('profile'); if (a) { a = JSON.parse(a); if (a) { const image = get(a, 'avatar', ''); if (image) { avatar = <Avatar src={image} size="large" />; } } } }, 1000); return ( <div> <Helmet> <title>Headerr</title> <meta name="description" content="Description of Headerr" /> </Helmet> <Header style={{ background: '#fff', padding: '0 20px', textAlign: 'right' }} > <Link to="/home" className="logo-header"> Home </Link> <div > <strong onClick={this.handleRedirect} style={{ cursor: 'pointer',display: 'inline-block',marginRight: '20px' }} >{get(this,'state.user.username','')}</strong> <strong onClick={this.logout} style={{ cursor: 'pointer',display: 'inline-block',marginRight: '20px' }} >Logout</strong> </div> </Header> </div> ); } } Headerr.propTypes = { dispatch: PropTypes.func.isRequired, }; const mapStateToProps = createStructuredSelector({ headerr: makeSelectHeaderr(), // global: selectGlobal() }); function mapDispatchToProps(dispatch) { return { dispatch, }; } const withConnect = connect( mapStateToProps, mapDispatchToProps, ); const withReducer = injectReducer({ key: 'headerr', reducer }); const withSaga = injectSaga({ key: 'headerr', saga }); export default compose( withReducer, withSaga, withConnect, )(Headerr);
const q = document.querySelector, $ = q.bind(document); let $width = $('#width'), $height = $('#height'), $btnCal = $('#calculate'), $perimeter = $('#perimeter'), $area = $('#area'), $widthValidate = $('#width-validate'), $heightValidate = $('#height-validate'), isPassValidate = false; $width.onblur = () => { let result = Util.validate($width.value); isPassValidate = result.isOK; if(!result.isOK) { $widthValidate.innerHTML = '宽度' + result.reason; $width.select(); } else { $widthValidate.innerHTML = ''; } }; $width.onkeypress = (e) => { if(!Util.isLegalKey(e.key, e.target.value, e.target.selectionStart)) { e.preventDefault(); } }; $height.onblur = () => { let result = Util.validate($height.value); isPassValidate = result.isOK; if(!result.isOK) { $heightValidate.innerHTML = '高度' + result.reason; $height.select(); } else { $heightValidate.innerHTML = ''; } }; $height.onkeypress = function(e) { if(!Util.isLegalKey(e.key, e.target.value, e.target.selectionStart)) { e.preventDefault(); } }; $btnCal.onclick = () => { if(!isPassValidate) return; let w = $width.value, h = $height.value; let r = new Rectangle(w, h); $perimeter.value = r.perimeter; $area.value = r.area; };
/* Zed Attack Proxy (ZAP) and its related class files. * * ZAP is an HTTP/HTTPS proxy for assessing web application security. * * Copyright 2018 the ZAP development team * * 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. */ 'use strict'; /** * This file was automatically generated. */ function Pscan(clientApi) { this.api = clientApi; } /** * Tells whether or not the passive scan should be performed only on messages that are in scope. **/ Pscan.prototype.scanOnlyInScope = function (callback) { if (typeof callback === 'function') { this.api.request('/pscan/view/scanOnlyInScope/', callback); return; } return this.api.requestPromise('/pscan/view/scanOnlyInScope/'); }; /** * The number of records the passive scanner still has to scan **/ Pscan.prototype.recordsToScan = function (callback) { if (typeof callback === 'function') { this.api.request('/pscan/view/recordsToScan/', callback); return; } return this.api.requestPromise('/pscan/view/recordsToScan/'); }; /** * Lists all passive scanners with its ID, name, enabled state and alert threshold. **/ Pscan.prototype.scanners = function (callback) { if (typeof callback === 'function') { this.api.request('/pscan/view/scanners/', callback); return; } return this.api.requestPromise('/pscan/view/scanners/'); }; /** * Sets whether or not the passive scanning is enabled (Note: the enabled state is not persisted). **/ Pscan.prototype.setEnabled = function (enabled, callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/setEnabled/', {'enabled' : enabled}, callback); return; } return this.api.requestPromise('/pscan/action/setEnabled/', {'enabled' : enabled}); }; /** * Sets whether or not the passive scan should be performed only on messages that are in scope. **/ Pscan.prototype.setScanOnlyInScope = function (onlyinscope, callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/setScanOnlyInScope/', {'onlyInScope' : onlyinscope}, callback); return; } return this.api.requestPromise('/pscan/action/setScanOnlyInScope/', {'onlyInScope' : onlyinscope}); }; /** * Enables all passive scanners **/ Pscan.prototype.enableAllScanners = function (callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/enableAllScanners/', callback); return; } return this.api.requestPromise('/pscan/action/enableAllScanners/'); }; /** * Disables all passive scanners **/ Pscan.prototype.disableAllScanners = function (callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/disableAllScanners/', callback); return; } return this.api.requestPromise('/pscan/action/disableAllScanners/'); }; /** * Enables all passive scanners with the given IDs (comma separated list of IDs) **/ Pscan.prototype.enableScanners = function (ids, callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/enableScanners/', {'ids' : ids}, callback); return; } return this.api.requestPromise('/pscan/action/enableScanners/', {'ids' : ids}); }; /** * Disables all passive scanners with the given IDs (comma separated list of IDs) **/ Pscan.prototype.disableScanners = function (ids, callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/disableScanners/', {'ids' : ids}, callback); return; } return this.api.requestPromise('/pscan/action/disableScanners/', {'ids' : ids}); }; /** * Sets the alert threshold of the passive scanner with the given ID, accepted values for alert threshold: OFF, DEFAULT, LOW, MEDIUM and HIGH **/ Pscan.prototype.setScannerAlertThreshold = function (id, alertthreshold, callback) { if (typeof callback === 'function') { this.api.request('/pscan/action/setScannerAlertThreshold/', {'id' : id, 'alertThreshold' : alertthreshold}, callback); return; } return this.api.requestPromise('/pscan/action/setScannerAlertThreshold/', {'id' : id, 'alertThreshold' : alertthreshold}); }; module.exports = Pscan;
'use strict'; const debug = require('debug')('brunch:asset'); const sysPath = require('path'); const copyFile = require('quickly-copy-file'); const prettify = require('../helpers').prettify; const isIgnored = require('./common').isIgnored; // Asset: Simple abstraction on top of static assets that are not compiled. // Get first parent directory that matches asset convention. // getAssetDirectory('app/assets/thing/thing2.html', /assets/) // => 'app/assets/' // Returns String. const getAssetDirectory = (path, convention) => { const sep = sysPath.sep; const split = path.split(sep); // Creates thing like this // ['app/', 'app/assets/', 'app/assets/thing/', 'app/assets/thing/item.html/'] return split.map((part, index) => { return split.slice(0, index).concat([part, '']).join(sep); }).find(convention); }; // A static file that shall be copied to public directory. class Asset { constructor(path, publicPath, assetsConvention) { const directory = getAssetDirectory(path, assetsConvention); const rel = sysPath.relative(directory, path); const destPath = sysPath.join(publicPath, rel); this.path = path; this.destPath = destPath; this.error = null; this.copyTime = null; debug(`Init ${path} %s`, prettify({directory, destPath, rel})); Object.seal(this); } updateTime() { this.copyTime = Date.now(); } // Copy file to public directory. copy() { const path = this.path; if (isIgnored(path)) return Promise.resolve(); return copyFile(path, this.destPath).then(() => { debug(`Copied ${path}`); this.updateTime(); this.error = null; return Promise.resolve(); }, err => { debug(`Cannot copy ${path}: ${err}`); this.updateTime(); const error = new Error(err); error.code = 'Copying'; this.error = error; return Promise.reject(this.error); }); } dispose() { // You're frozen when your heart's not open. Object.freeze(this); } } module.exports = Asset;
"use strict";(self.webpackChunkvoyager_admin=self.webpackChunkvoyager_admin||[]).push([[2135],{1085:(e,r,n)=>{n.r(r),n.d(r,{default:()=>t});var o=n(6252);function t(e,r){return(0,o.wg)(),(0,o.j4)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","aria-hidden":"true"},[(0,o.Wm)("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})])}}}]);
/* * printThis v1.14.1 * @desc Printing plug-in for jQuery * @author Jason Day * * Resources (based on): * - jPrintArea: http://plugins.jquery.com/project/jPrintArea * - jqPrint: https://github.com/permanenttourist/jquery.jqprint * - Ben Nadal: http://www.bennadel.com/blog/1591-Ask-Ben-Print-Part-Of-A-Web-Page-With-jQuery.htm * * Licensed under the MIT licence: * http://www.opensource.org/licenses/mit-license.php * * (c) Jason Day 2015-2018 * * Usage: * * $("#mySelector").printThis({ * debug: false, // show the iframe for debugging * importCSS: true, // import parent page css * importStyle: false, // import style tags * printContainer: true, // grab outer container as well as the contents of the selector * loadCSS: "path/to/my.css", // path to additional css file - use an array [] for multiple * pageTitle: "", // add title to print page * removeInline: false, // remove all inline styles from print elements * removeInlineSelector: "body *", // custom selectors to filter inline styles. removeInline must be true * printDelay: 333, // variable print delay * header: null, // prefix to html * footer: null, // postfix to html * base: false, // preserve the BASE tag, or accept a string for the URL * formValues: true, // preserve input/form values * canvas: false, // copy canvas elements * doctypeString: '...', // enter a different doctype for older markup * removeScripts: false, // remove script tags from print content * copyTagClasses: false // copy classes from the html & body tag * beforePrintEvent: null, // callback function for printEvent in iframe * beforePrint: null, // function called before iframe is filled * afterPrint: null // function called before iframe is removed * }); * * Notes: * - the loadCSS will load additional CSS (with or without @media print) into the iframe, adjusting layout */ ; (function($) { function appendContent($el, content) { if (!content) return; // Simple test for a jQuery element $el.append(content.jquery ? content.clone() : content); } function appendBody($body, $element, opt) { // Clone for safety and convenience // Calls clone(withDataAndEvents = true) to copy form values. var $content = $element.clone(opt.formValues); if (opt.formValues) { // Copy original select and textarea values to their cloned counterpart // Makes up for inability to clone select and textarea values with clone(true) copyValues($element, $content, 'select, textarea'); } if (opt.removeScripts) { $content.find('script').remove(); } if (opt.printContainer) { // grab $.selector as container $content.appendTo($body); } else { // otherwise just print interior elements of container $content.each(function() { $(this).children().appendTo($body) }); } } // Copies values from origin to clone for passed in elementSelector function copyValues(origin, clone, elementSelector) { var $originalElements = origin.find(elementSelector); clone.find(elementSelector).each(function(index, item) { $(item).val($originalElements.eq(index).val()); }); } var opt; $.fn.printThis = function(options) { opt = $.extend({}, $.fn.printThis.defaults, options); var $element = this instanceof jQuery ? this : $(this); var strFrameName = "printThis-" + (new Date()).getTime(); if (window.location.hostname !== document.domain && navigator.userAgent.match(/msie/i)) { // Ugly IE hacks due to IE not inheriting document.domain from parent // checks if document.domain is set by comparing the host name against document.domain var iframeSrc = "javascript:document.write(\"<head><script>document.domain=\\\"" + document.domain + "\\\";</s" + "cript></head><body></body>\")"; var printI = document.createElement('iframe'); printI.name = "printIframe"; printI.id = strFrameName; printI.className = "MSIE"; document.body.appendChild(printI); printI.src = iframeSrc; } else { // other browsers inherit document.domain, and IE works if document.domain is not explicitly set var $frame = $("<iframe id='" + strFrameName + "' name='printIframe' />"); $frame.appendTo("body"); } var $iframe = $("#" + strFrameName); // show frame if in debug mode if (!opt.debug) $iframe.css({ position: "absolute", width: "0px", height: "0px", left: "-600px", top: "-600px" }); // before print callback if (typeof opt.beforePrint === "function") { opt.beforePrint(); } // $iframe.ready() and $iframe.load were inconsistent between browsers setTimeout(function() { // Add doctype to fix the style difference between printing and render function setDocType($iframe, doctype){ var win, doc; win = $iframe.get(0); win = win.contentWindow || win.contentDocument || win; doc = win.document || win.contentDocument || win; doc.open(); doc.write(doctype); doc.close(); } if (opt.doctypeString){ setDocType($iframe, opt.doctypeString); } var $doc = $iframe.contents(), $head = $doc.find("head"), $body = $doc.find("body"), $base = $('base'), baseURL; // add base tag to ensure elements use the parent domain if (opt.base === true && $base.length > 0) { // take the base tag from the original page baseURL = $base.attr('href'); } else if (typeof opt.base === 'string') { // An exact base string is provided baseURL = opt.base; } else { // Use the page URL as the base baseURL = document.location.protocol + '//' + document.location.host; } $head.append('<base href="' + baseURL + '">'); // import page stylesheets if (opt.importCSS) $("link[rel=stylesheet]").each(function() { var href = $(this).attr("href"); if (href) { var media = $(this).attr("media") || "all"; $head.append("<link type='text/css' rel='stylesheet' href='" + href + "' media='" + media + "'>"); } }); // import style tags if (opt.importStyle) $("style").each(function() { $head.append(this.outerHTML); }); // add title of the page if (opt.pageTitle) $head.append("<title>" + opt.pageTitle + "</title>"); // import additional stylesheet(s) if (opt.loadCSS) { if ($.isArray(opt.loadCSS)) { jQuery.each(opt.loadCSS, function(index, value) { $head.append("<link type='text/css' rel='stylesheet' href='" + this + "'>"); }); } else { $head.append("<link type='text/css' rel='stylesheet' href='" + opt.loadCSS + "'>"); } } var pageHtml = $('html')[0]; // CSS VAR in html tag when dynamic apply e.g. document.documentElement.style.setProperty("--foo", bar); $doc.find('html').prop('style', pageHtml.style.cssText); // copy 'root' tag classes var tag = opt.copyTagClasses; if (tag) { tag = tag === true ? 'bh' : tag; if (tag.indexOf('b') !== -1) { $body.addClass($('body')[0].className); } if (tag.indexOf('h') !== -1) { $doc.find('html').addClass(pageHtml.className); } } // print header appendContent($body, opt.header); if (opt.canvas) { // add canvas data-ids for easy access after cloning. var canvasId = 0; // .addBack('canvas') adds the top-level element if it is a canvas. $element.find('canvas').addBack('canvas').each(function(){ $(this).attr('data-printthis', canvasId++); }); } appendBody($body, $element, opt); if (opt.canvas) { // Re-draw new canvases by referencing the originals $body.find('canvas').each(function(){ var cid = $(this).data('printthis'), $src = $('[data-printthis="' + cid + '"]'); this.getContext('2d').drawImage($src[0], 0, 0); // Remove the markup from the original if ($.isFunction($.fn.removeAttr)) { $src.removeAttr('data-printthis'); } else { $.each($src, function(i, el) { el.removeAttribute('data-printthis') }); } }); } // remove inline styles if (opt.removeInline) { // Ensure there is a selector, even if it's been mistakenly removed var selector = opt.removeInlineSelector || '*'; // $.removeAttr available jQuery 1.7+ if ($.isFunction($.removeAttr)) { $body.find(selector).removeAttr("style"); } else { $body.find(selector).attr("style", ""); } } // print "footer" appendContent($body, opt.footer); // attach event handler function to beforePrint event function attachOnBeforePrintEvent($iframe, beforePrintHandler) { var win = $iframe.get(0); win = win.contentWindow || win.contentDocument || win; if (typeof beforePrintHandler === "function") { if ('matchMedia' in win) { win.matchMedia('print').addListener(function(mql) { if(mql.matches) beforePrintHandler(); }); } else { win.onbeforeprint = beforePrintHandler; } } } attachOnBeforePrintEvent($iframe, opt.beforePrint); setTimeout(function() { if ($iframe.hasClass("MSIE")) { // check if the iframe was created with the ugly hack // and perform another ugly hack out of neccessity window.frames["printIframe"].focus(); $head.append("<script> window.print(); </s" + "cript>"); } else { // proper method if (document.queryCommandSupported("print")) { $iframe[0].contentWindow.document.execCommand("print", false, null); } else { $iframe[0].contentWindow.focus(); $iframe[0].contentWindow.print(); } } // remove iframe after print if (!opt.debug) { setTimeout(function() { $iframe.remove(); }, 1000); } // after print callback if (typeof opt.afterPrint === "function") { opt.afterPrint(); } }, opt.printDelay); }, 333); }; // defaults $.fn.printThis.defaults = { debug: false, // show the iframe for debugging importCSS: false, // import parent page css importStyle: false, // import style tags printContainer: true, // print outer container/$.selector loadCSS: "", // path to additional css file - use an array [] for multiple pageTitle: "", // add title to print page removeInline: false, // remove inline styles from print elements removeInlineSelector: "*", // custom selectors to filter inline styles. removeInline must be true printDelay: 333, // variable print delay header: null, // prefix to html footer: null, // postfix to html base: false, // preserve the BASE tag or accept a string for the URL formValues: true, // preserve input/form values canvas: false, // copy canvas content doctypeString: '<!DOCTYPE html>', // enter a different doctype for older markup removeScripts: false, // remove script tags from print content copyTagClasses: false, // copy classes from the html & body tag beforePrintEvent: null, // callback function for printEvent in iframe beforePrint: null, // function called before iframe is filled afterPrint: null // function called before iframe is removed }; })(jQuery);
// @flow import {action, autorun, computed, observable, toJS} from 'mobx'; import {observer} from 'mobx-react'; import React, {Fragment} from 'react'; import log from 'loglevel'; import Loader from '../../components/Loader'; import Renderer from './Renderer'; import FormStore from './stores/FormStore'; import FormInspector from './FormInspector'; import GhostDialog from './GhostDialog'; type Props = { store: FormStore, onSubmit: (action: ?string) => ?Promise<Object>, }; @observer export default class Form extends React.Component<Props> { @observable showAllErrors = false; @observable displayGhostDialog = false; displayGhostDialogDisposer: () => void; constructor(props: Props) { super(props); this.displayGhostDialogDisposer = autorun(() => { const {store} = this.props; const { data: { concreteLanguages, }, loading, locale, } = store; if (loading) { this.hideGhostDialog(); return; } if (concreteLanguages && locale && !concreteLanguages.includes(locale.get())) { this.showGhostDialog(); } }); } componentWillUnmount() { this.displayGhostDialogDisposer(); } @computed get formInspector(): FormInspector { return new FormInspector(this.props.store); } /** @public */ @action submit = (action: ?string) => { this.showAllErrors = true; return this.props.onSubmit(action); }; handleChange = (name: string, value: mixed) => { this.props.store.change(name, value); }; @action showGhostDialog() { this.displayGhostDialog = true; } @action hideGhostDialog() { this.displayGhostDialog = false; } @action handleGhostDialogCancel = () => { this.hideGhostDialog(); }; @action handleGhostDialogConfirm = (locale: string) => { this.props.store.copyFromLocale(locale); this.hideGhostDialog(); }; handleFieldFinish = (dataPath: string, schemaPath: string) => { log.debug( 'Finished editing field with dataPath "' + dataPath + '" and schemaPath "' + schemaPath + '"', toJS(this.formInspector.getValueByPath(dataPath)) ); const {store} = this.props; store.validate(); this.formInspector.finishField(dataPath, schemaPath); }; render() { const {store} = this.props; const { data: { concreteLanguages, }, } = store; return store.loading ? <Loader /> : ( <Fragment> {store.id && concreteLanguages && <GhostDialog locales={concreteLanguages} onCancel={this.handleGhostDialogCancel} onConfirm={this.handleGhostDialogConfirm} open={this.displayGhostDialog} /> } <Renderer data={store.data} dataPath="" errors={store.errors} formInspector={this.formInspector} onChange={this.handleChange} onFieldFinish={this.handleFieldFinish} schema={store.schema} schemaPath="" showAllErrors={this.showAllErrors} /> </Fragment> ); } }
/******************************************************* > File Name: test_spec_webdriver.js > Author: IndexXuan > Mail: indexxuan@gmail.com > Created Time: 2015年05月29日 星期五 16时36分43秒 ******************************************************/ var sw = require('selenium-webdriver'); var driver = new sw.Builder() .withCapabilities(sw.Capabilities.phantomjs()) .build(); // then var chai = require('chai'); var chaiwebdriver = require('chai-webdriver'); chai.use(chaiwebdriver(driver)); // and you're good to go! driver.get('http://github.com'); chai.expect('#site-container h1.heading').dom.to.not.contain.text("I'm a kitty!");
if (typeof jQuery === "undefined") { throw new Error("jQuery plugins need to be before this file"); } $.AdminBSB = {}; $.AdminBSB.options = { colors: { red: '#F44336', pink: '#E91E63', purple: '#9C27B0', deepPurple: '#673AB7', indigo: '#3F51B5', blue: '#2196F3', lightBlue: '#03A9F4', cyan: '#00BCD4', teal: '#009688', green: '#4CAF50', lightGreen: '#8BC34A', lime: '#CDDC39', yellow: '#ffe821', amber: '#FFC107', orange: '#FF9800', deepOrange: '#FF5722', brown: '#795548', grey: '#9E9E9E', blueGrey: '#607D8B', black: '#000000', white: '#ffffff' }, leftSideBar: { scrollColor: 'rgba(0,0,0,0.5)', scrollWidth: '4px', scrollAlwaysVisible: false, scrollBorderRadius: '0', scrollRailBorderRadius: '0', scrollActiveItemWhenPageLoad: true, breakpointWidth: 1170 }, dropdownMenu: { effectIn: 'fadeIn', effectOut: 'fadeOut' } } /* Left Sidebar - Function ================================================================================================= * You can manage the left sidebar menu options * */ $.AdminBSB.leftSideBar = { activate: function () { var _this = this; var $body = $('body'); var $overlay = $('.overlay'); //Close sidebar $(window).click(function (e) { var $target = $(e.target); if (e.target.nodeName.toLowerCase() === 'i') { $target = $(e.target).parent(); } if (!$target.hasClass('bars') && _this.isOpen() && $target.parents('#leftsidebar').length === 0) { if (!$target.hasClass('js-right-sidebar')) $overlay.fadeOut(); $body.removeClass('overlay-open'); } }); $.each($('.menu-toggle.toggled'), function (i, val) { $(val).next().slideToggle(0); }); //When page load $.each($('.menu .list li.active'), function (i, val) { var $activeAnchors = $(val).find('a:eq(0)'); $activeAnchors.addClass('toggled'); $activeAnchors.next().show(); }); //Collapse or Expand Menu $('.menu-toggle').on('click', function (e) { var $this = $(this); var $content = $this.next(); if ($($this.parents('ul')[0]).hasClass('list')) { var $not = $(e.target).hasClass('menu-toggle') ? e.target : $(e.target).parents('.menu-toggle'); $.each($('.menu-toggle.toggled').not($not).next(), function (i, val) { if ($(val).is(':visible')) { $(val).prev().toggleClass('toggled'); $(val).slideUp(); } }); } $this.toggleClass('toggled'); $content.slideToggle(320); }); //Set menu height _this.setMenuHeight(); _this.checkStatuForResize(true); $(window).resize(function () { _this.setMenuHeight(); _this.checkStatuForResize(false); }); //Set Waves Waves.attach('.menu .list a', ['waves-block']); Waves.init(); }, setMenuHeight: function (isFirstTime) { if (typeof $.fn.slimScroll != 'undefined') { var configs = $.AdminBSB.options.leftSideBar; var height = ($(window).height() - ($('.legal').outerHeight() + $('.user-info').outerHeight() + $('.navbar').innerHeight())); var $el = $('.list'); $el.slimscroll({ height: height + "px", color: configs.scrollColor, size: configs.scrollWidth, alwaysVisible: configs.scrollAlwaysVisible, borderRadius: configs.scrollBorderRadius, railBorderRadius: configs.scrollRailBorderRadius }); //Scroll active menu item when page load, if option set = true /**if ($.AdminBSB.options.leftSideBar.scrollActiveItemWhenPageLoad) { var activeItemOffsetTop = $('.menu .list li.active')[0].offsetTop if (activeItemOffsetTop > 150) $el.slimscroll({ scrollTo: activeItemOffsetTop + 'px' }); }*/ } }, checkStatuForResize: function (firstTime) { var $body = $('body'); var $openCloseBar = $('.navbar .navbar-header .bars'); var width = $body.width(); if (firstTime) { $body.find('.content, .sidebar').addClass('no-animate').delay(1000).queue(function () { $(this).removeClass('no-animate').dequeue(); }); } if (width < $.AdminBSB.options.leftSideBar.breakpointWidth) { $body.addClass('ls-closed'); $openCloseBar.fadeIn(); } else { $body.removeClass('ls-closed'); $openCloseBar.fadeOut(); } }, isOpen: function () { return $('body').hasClass('overlay-open'); } }; //========================================================================================================================== /* Right Sidebar - Function ================================================================================================ * You can manage the right sidebar menu options * */ $.AdminBSB.rightSideBar = { activate: function () { var _this = this; var $sidebar = $('#rightsidebar'); var $overlay = $('.overlay'); //Close sidebar $(window).click(function (e) { var $target = $(e.target); if (e.target.nodeName.toLowerCase() === 'i') { $target = $(e.target).parent(); } if (!$target.hasClass('js-right-sidebar') && _this.isOpen() && $target.parents('#rightsidebar').length === 0) { if (!$target.hasClass('bars')) $overlay.fadeOut(); $sidebar.removeClass('open'); } }); $('.js-right-sidebar').on('click', function () { $sidebar.toggleClass('open'); if (_this.isOpen()) { $overlay.fadeIn(); } else { $overlay.fadeOut(); } }); }, isOpen: function () { return $('.right-sidebar').hasClass('open'); } } //========================================================================================================================== //========================================================================================================================== /* Navbar - Function ======================================================================================================= * You can manage the navbar * */ $.AdminBSB.navbar = { activate: function () { var $body = $('body'); var $overlay = $('.overlay'); //Open left sidebar panel $('.bars').on('click', function () { $body.toggleClass('overlay-open'); if ($body.hasClass('overlay-open')) { $overlay.fadeIn(); } else { $overlay.fadeOut(); } }); //Close collapse bar on click event $('.nav [data-close="true"]').on('click', function () { var isVisible = $('.navbar-toggle').is(':visible'); var $navbarCollapse = $('.navbar-collapse'); if (isVisible) { $navbarCollapse.slideUp(function () { $navbarCollapse.removeClass('in').removeAttr('style'); }); } }); } } //========================================================================================================================== /* Input - Function ======================================================================================================== * You can manage the inputs(also textareas) with name of class 'form-control' * */ $.AdminBSB.input = { activate: function () { //On focus event $('.form-control').focus(function () { $(this).parent().addClass('focused'); }); //On focusout event $('.form-control').focusout(function () { var $this = $(this); if ($this.parents('.form-group').hasClass('form-float')) { if ($this.val() == '') { $this.parents('.form-line').removeClass('focused'); } } else { $this.parents('.form-line').removeClass('focused'); } }); //On label click $('body').on('click', '.form-float .form-line .form-label', function () { $(this).parent().find('input').focus(); }); //Not blank form $('.form-control').each(function () { if ($(this).val() !== '') { $(this).parents('.form-line').addClass('focused'); } }); } } //========================================================================================================================== /* Form - Select - Function ================================================================================================ * You can manage the 'select' of form elements * */ $.AdminBSB.select = { activate: function () { if ($.fn.selectpicker) { $('select:not(.ms)').selectpicker(); } } } //========================================================================================================================== /* DropdownMenu - Function ================================================================================================= * You can manage the dropdown menu * */ $.AdminBSB.dropdownMenu = { activate: function () { var _this = this; $('.dropdown, .dropup, .btn-group').on({ "show.bs.dropdown": function () { var dropdown = _this.dropdownEffect(this); _this.dropdownEffectStart(dropdown, dropdown.effectIn); }, "shown.bs.dropdown": function () { var dropdown = _this.dropdownEffect(this); if (dropdown.effectIn && dropdown.effectOut) { _this.dropdownEffectEnd(dropdown, function () { }); } }, "hide.bs.dropdown": function (e) { var dropdown = _this.dropdownEffect(this); if (dropdown.effectOut) { e.preventDefault(); _this.dropdownEffectStart(dropdown, dropdown.effectOut); _this.dropdownEffectEnd(dropdown, function () { dropdown.dropdown.removeClass('open'); }); } } }); //Set Waves Waves.attach('.dropdown-menu li a', ['waves-block']); Waves.init(); }, dropdownEffect: function (target) { var effectIn = $.AdminBSB.options.dropdownMenu.effectIn, effectOut = $.AdminBSB.options.dropdownMenu.effectOut; var dropdown = $(target), dropdownMenu = $('.dropdown-menu', target); if (dropdown.length > 0) { var udEffectIn = dropdown.data('effect-in'); var udEffectOut = dropdown.data('effect-out'); if (udEffectIn !== undefined) { effectIn = udEffectIn; } if (udEffectOut !== undefined) { effectOut = udEffectOut; } } return { target: target, dropdown: dropdown, dropdownMenu: dropdownMenu, effectIn: effectIn, effectOut: effectOut }; }, dropdownEffectStart: function (data, effectToStart) { if (effectToStart) { data.dropdown.addClass('dropdown-animating'); data.dropdownMenu.addClass('animated dropdown-animated'); data.dropdownMenu.addClass(effectToStart); } }, dropdownEffectEnd: function (data, callback) { var animationEnd = 'webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend'; data.dropdown.one(animationEnd, function () { data.dropdown.removeClass('dropdown-animating'); data.dropdownMenu.removeClass('animated dropdown-animated'); data.dropdownMenu.removeClass(data.effectIn); data.dropdownMenu.removeClass(data.effectOut); if (typeof callback == 'function') { callback(); } }); } } //========================================================================================================================== /* Browser - Function ====================================================================================================== * You can manage browser * */ var edge = 'Microsoft Edge'; var ie10 = 'Internet Explorer 10'; var ie11 = 'Internet Explorer 11'; var opera = 'Opera'; var firefox = 'Mozilla Firefox'; var chrome = 'Google Chrome'; var safari = 'Safari'; $.AdminBSB.browser = { activate: function () { var _this = this; var className = _this.getClassName(); if (className !== '') $('html').addClass(_this.getClassName()); }, getBrowser: function () { var userAgent = navigator.userAgent.toLowerCase(); if (/edge/i.test(userAgent)) { return edge; } else if (/rv:11/i.test(userAgent)) { return ie11; } else if (/msie 10/i.test(userAgent)) { return ie10; } else if (/opr/i.test(userAgent)) { return opera; } else if (/chrome/i.test(userAgent)) { return chrome; } else if (/firefox/i.test(userAgent)) { return firefox; } else if (!!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/)) { return safari; } return undefined; }, getClassName: function () { var browser = this.getBrowser(); if (browser === edge) { return 'edge'; } else if (browser === ie11) { return 'ie11'; } else if (browser === ie10) { return 'ie10'; } else if (browser === opera) { return 'opera'; } else if (browser === chrome) { return 'chrome'; } else if (browser === firefox) { return 'firefox'; } else if (browser === safari) { return 'safari'; } else { return ''; } } } //========================================================================================================================== $.AdminBSB.konten = { activate : function () { $('.loaded_konten').click(function(){ $('#konten').load($(this).attr('href'), function () { $('.dataTable').DataTable(); }); return false; }); } } //========================================================================================================================== $(function () { $.AdminBSB.browser.activate(); $.AdminBSB.leftSideBar.activate(); $.AdminBSB.rightSideBar.activate(); $.AdminBSB.navbar.activate(); $.AdminBSB.dropdownMenu.activate(); $.AdminBSB.input.activate(); $.AdminBSB.select.activate(); $.AdminBSB.konten.activate(); setTimeout(function () { $('.page-loader-wrapper').fadeOut(); }, 20); });
(function(undefined) { if (!("Intl"in self&&"DateTimeFormat"in self.Intl&&"formatRangeToParts"in self.Intl.DateTimeFormat&&self.Intl.DateTimeFormat.supportedLocalesOf("az-Latn").length )) { // Intl.DateTimeFormat.~locale.az-Latn /* @generated */ // prettier-ignore if (Intl.DateTimeFormat && typeof Intl.DateTimeFormat.__addLocaleData === 'function') { Intl.DateTimeFormat.__addLocaleData({"data":{"am":"AM","pm":"PM","weekday":{"narrow":["7","1","2","3","4","5","6"],"short":["B.","B.e.","Ç.a.","Ç.","C.a.","C.","Ş."],"long":["bazar","bazar ertəsi","çərşənbə axşamı","çərşənbə","cümə axşamı","cümə","şənbə"]},"era":{"narrow":{"BC":"e.ə.","AD":"y.e."},"short":{"BC":"e.ə.","AD":"y.e."},"long":{"BC":"eramızdan əvvəl","AD":"yeni era"}},"month":{"narrow":["1","2","3","4","5","6","7","8","9","10","11","12"],"short":["yan","fev","mar","apr","may","iyn","iyl","avq","sen","okt","noy","dek"],"long":["yanvar","fevral","mart","aprel","may","iyun","iyul","avqust","sentyabr","oktyabr","noyabr","dekabr"]},"timeZoneName":{"Asia/Kabul":{"long":["Əfqanıstan Vaxtı","Əfqanıstan Vaxtı"]},"Africa/Maputo":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Bujumbura":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Gaborone":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Lubumbashi":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Blantyre":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Kigali":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Lusaka":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Harare":{"long":["Mərkəzi Afrika Vaxtı","Mərkəzi Afrika Vaxtı"]},"Africa/Nairobi":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Djibouti":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Asmera":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Addis_Ababa":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Indian/Comoro":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Indian/Antananarivo":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Mogadishu":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Dar_es_Salaam":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Kampala":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Indian/Mayotte":{"long":["Şərqi Afrika Vaxtı","Şərqi Afrika Vaxtı"]},"Africa/Johannesburg":{"long":["Cənubi Afrika Vaxtı","Cənubi Afrika Vaxtı"]},"Africa/Maseru":{"long":["Cənubi Afrika Vaxtı","Cənubi Afrika Vaxtı"]},"Africa/Mbabane":{"long":["Cənubi Afrika Vaxtı","Cənubi Afrika Vaxtı"]},"Africa/Lagos":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Luanda":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Porto-Novo":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Kinshasa":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Bangui":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Brazzaville":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Douala":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Libreville":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Malabo":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Niamey":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Africa/Ndjamena":{"long":["Qərbi Afrika Standart Vaxtı","Qərbi Afrika Yay Vaxtı"]},"Asia/Aqtobe":{"long":["Qərbi Qazaxıstan Vaxtı","Qərbi Qazaxıstan Vaxtı"]},"America/Juneau":{"long":["Alyaska Standart Vaxtı","Alyaska Yay Vaxtı"]},"Asia/Almaty":{"long":["Şərqi Qazaxıstan Vaxtı","Şərqi Qazaxıstan Vaxtı"]},"America/Manaus":{"long":["Amazon Standart Vaxtı","Amazon Yay Vaxtı"]},"America/Chicago":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Belize":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Winnipeg":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Costa_Rica":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Guatemala":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Tegucigalpa":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/Mexico_City":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/El_Salvador":{"long":["Şimali Mərkəzi Amerika Standart Vaxtı","Şimali Mərkəzi Amerika Yay Vaxtı"]},"America/New_York":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Nassau":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Toronto":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Port-au-Prince":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Jamaica":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Cayman":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Panama":{"long":["Şimali Şərqi Amerika Standart Vaxtı","Şimali Şərqi Amerika Yay Vaxtı"]},"America/Denver":{"long":["Şimali Dağlıq Amerika Standart Vaxtı","Şimali Dağlıq Amerika Yay Vaxtı"]},"America/Edmonton":{"long":["Şimali Dağlıq Amerika Standart Vaxtı","Şimali Dağlıq Amerika Yay Vaxtı"]},"America/Hermosillo":{"long":["Şimali Dağlıq Amerika Standart Vaxtı","Şimali Dağlıq Amerika Yay Vaxtı"]},"America/Los_Angeles":{"long":["Şimali Amerika Sakit Okean Standart Vaxtı","Şimali Amerika Sakit Okean Yay Vaxtı"]},"America/Vancouver":{"long":["Şimali Amerika Sakit Okean Standart Vaxtı","Şimali Amerika Sakit Okean Yay Vaxtı"]},"America/Tijuana":{"long":["Şimali Amerika Sakit Okean Standart Vaxtı","Şimali Amerika Sakit Okean Yay Vaxtı"]},"Pacific/Apia":{"long":["Apia Standart Vaxtı","Apia Yay Vaxtı"]},"Asia/Riyadh":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"Asia/Bahrain":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"Asia/Baghdad":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"Asia/Kuwait":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"Asia/Qatar":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"Asia/Aden":{"long":["Ərəbistan Standart Vaxtı","Ərəbistan Yay Vaxtı"]},"America/Buenos_Aires":{"long":["Argentina Standart Vaxtı","Argentina Yay Vaxtı"]},"America/Argentina/San_Luis":{"long":["Qərbi Argentina Standart Vaxtı","Qərbi Argentina Yay Vaxtı"]},"Asia/Ashgabat":{"long":["Türkmənistan Standart Vaxtı","Türkmənistan Yay Vaxtı"]},"America/Halifax":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Antigua":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Anguilla":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Aruba":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Barbados":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"Atlantic/Bermuda":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Kralendijk":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Curacao":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Dominica":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Grenada":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Thule":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Guadeloupe":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/St_Kitts":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/St_Lucia":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Marigot":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Martinique":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Montserrat":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Puerto_Rico":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Lower_Princes":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Port_of_Spain":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/St_Vincent":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/Tortola":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"America/St_Thomas":{"long":["Atlantik Standart Vaxt","Atlantik Yay Vaxtı"]},"Australia/Adelaide":{"long":["Mərkəzi Avstraliya Standart Vaxtı","Mərkəzi Avstraliya Yay Vaxtı"]},"Australia/Eucla":{"long":["Mərkəzi Qərbi Avstraliya Standart Vaxtı","Mərkəzi Qərbi Avstraliya Yay Vaxtı"]},"Australia/Sydney":{"long":["Şərqi Avstraliya Standart Vaxtı","Şərqi Avstraliya Yay Vaxtı"]},"Australia/Perth":{"long":["Qərbi Avstraliya Standart Vaxtı","Qərbi Avstraliya Yay Vaxtı"]},"Atlantic/Azores":{"long":["Azor Standart Vaxtı","Azor Yay Vaxtı"]},"Asia/Thimphu":{"long":["Butan Vaxtı","Butan Vaxtı"]},"America/La_Paz":{"long":["Boliviya Vaxtı","Boliviya Vaxtı"]},"Asia/Kuching":{"long":["Malayziya Vaxtı","Malayziya Vaxtı"]},"America/Sao_Paulo":{"long":["Braziliya Standart Vaxtı","Braziliya Yay Vaxtı"]},"Europe/London":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Asia/Brunei":{"long":["Brunei Darussalam vaxtı","Brunei Darussalam vaxtı"]},"Atlantic/Cape_Verde":{"long":["Kape Verde Standart Vaxtı","Kape Verde Yay Vaxtı"]},"Pacific/Chatham":{"long":["Çatham Standart Vaxtı","Çatham Yay Vaxtı"]},"America/Santiago":{"long":["Çili Standart Vaxtı","Çili Yay Vaxtı"]},"Asia/Shanghai":{"long":["Çin Standart Vaxtı","Çin Yay Vaxtı"]},"Asia/Choibalsan":{"long":["Çoybalsan Standart Vaxtı","Çoybalsan Yay Vaxtı"]},"Indian/Christmas":{"long":["Milad Adası Vaxtı","Milad Adası Vaxtı"]},"Indian/Cocos":{"long":["Kokos Adaları Vaxtı","Kokos Adaları Vaxtı"]},"America/Bogota":{"long":["Kolumbiya Standart Vaxtı","Kolumbiya Yay Vaxtı"]},"Pacific/Rarotonga":{"long":["Kuk Adaları Standart Vaxtı","Kuk Adaları Yarım Yay Vaxtı"]},"America/Havana":{"long":["Kuba Standart Vaxtı","Kuba Yay Vaxtı"]},"Antarctica/Davis":{"long":["Devis Vaxtı","Devis Vaxtı"]},"Antarctica/DumontDUrville":{"long":["Dümon-d’Ürvil Vaxtı","Dümon-d’Ürvil Vaxtı"]},"Asia/Dushanbe":{"long":["Tacikistan Vaxtı","Tacikistan Vaxtı"]},"America/Paramaribo":{"long":["Surinam Vaxtı","Surinam Vaxtı"]},"Asia/Dili":{"long":["Şərqi Timor Vaxtı","Şərqi Timor Vaxtı"]},"Pacific/Easter":{"long":["Pasxa Adası Standart Vaxtı","Pasxa Adası Yay Vaxtı"]},"America/Guayaquil":{"long":["Ekvador Vaxtı","Ekvador Vaxtı"]},"Europe/Paris":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Andorra":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Tirane":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Vienna":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Sarajevo":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Brussels":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Zurich":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Prague":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Berlin":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Copenhagen":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Madrid":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Gibraltar":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Zagreb":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Budapest":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Rome":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Vaduz":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Luxembourg":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Monaco":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Podgorica":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Skopje":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Malta":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Amsterdam":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Oslo":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Warsaw":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Belgrade":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Stockholm":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Ljubljana":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Arctic/Longyearbyen":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Bratislava":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/San_Marino":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Africa/Tunis":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Vatican":{"long":["Mərkəzi Avropa Standart Vaxtı","Mərkəzi Avropa Yay Vaxtı"]},"Europe/Bucharest":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Europe/Mariehamn":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Europe/Sofia":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Asia/Nicosia":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Africa/Cairo":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Europe/Helsinki":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Europe/Athens":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Asia/Amman":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Asia/Beirut":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Asia/Damascus":{"long":["Şərqi Avropa Standart Vaxtı","Şərqi Avropa Yay Vaxtı"]},"Europe/Minsk":{"long":["Kənar Şərqi Avropa Vaxtı","Kənar Şərqi Avropa Vaxtı"]},"Europe/Kaliningrad":{"long":["Kənar Şərqi Avropa Vaxtı","Kənar Şərqi Avropa Vaxtı"]},"Atlantic/Canary":{"long":["Qərbi Avropa Standart Vaxtı","Qərbi Avropa Yay Vaxtı"]},"Atlantic/Faeroe":{"long":["Qərbi Avropa Standart Vaxtı","Qərbi Avropa Yay Vaxtı"]},"Atlantic/Stanley":{"long":["Folklend Adaları Standart Vaxtı","Folklend Adaları Yay Vaxtı"]},"Pacific/Fiji":{"long":["Fici Standart Vaxtı","Fici Yay Vaxtı"]},"America/Cayenne":{"long":["Fransız Qvianası Vaxtı","Fransız Qvianası Vaxtı"]},"Indian/Kerguelen":{"long":["Fransız Cənubi və Antarktik Vaxtı","Fransız Cənubi və Antarktik Vaxtı"]},"Asia/Bishkek":{"long":["Qırğızıstan Vaxtı","Qırğızıstan Vaxtı"]},"Pacific/Galapagos":{"long":["Qalapaqos Vaxtı","Qalapaqos Vaxtı"]},"Pacific/Gambier":{"long":["Qambier Vaxtı","Qambier Vaxtı"]},"Pacific/Tarawa":{"long":["Gilbert Adaları Vaxtı","Gilbert Adaları Vaxtı"]},"Atlantic/Reykjavik":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Ouagadougou":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Abidjan":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Accra":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Banjul":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Conakry":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Bamako":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Nouakchott":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Atlantic/St_Helena":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Freetown":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Dakar":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"Africa/Lome":{"long":["Qrinviç Orta Vaxtı","Qrinviç Orta Vaxtı"]},"America/Scoresbysund":{"long":["Şərqi Qrenlandiya Standart Vaxtı","Şərqi Qrenlandiya Yay Vaxtı"]},"America/Godthab":{"long":["Qərbi Qrenlandiya Standart Vaxtı","Qərbi Qrenlandiya Yay Vaxtı"]},"Asia/Dubai":{"long":["Körfəz Vaxtı","Körfəz Vaxtı"]},"Asia/Muscat":{"long":["Körfəz Vaxtı","Körfəz Vaxtı"]},"America/Guyana":{"long":["Qayana Vaxtı","Qayana Vaxtı"]},"Pacific/Honolulu":{"long":["Havay-Aleut Standart Vaxtı","Havay-Aleut Yay Vaxtı"]},"Asia/Hong_Kong":{"long":["Honq Konq Standart Vaxtı","Honq Konq Yay Vaxtı"]},"Asia/Hovd":{"long":["Hovd Standart Vaxtı","Hovd Yay Vaxtı"]},"Asia/Calcutta":{"long":["Hindistan Vaxtı","Hindistan Vaxtı"]},"Indian/Chagos":{"long":["Hind Okeanı Vaxtı","Hind Okeanı Vaxtı"]},"Asia/Bangkok":{"long":["Hindçin Vaxtı","Hindçin Vaxtı"]},"Asia/Phnom_Penh":{"long":["Hindçin Vaxtı","Hindçin Vaxtı"]},"Asia/Vientiane":{"long":["Hindçin Vaxtı","Hindçin Vaxtı"]},"Asia/Makassar":{"long":["Mərkəzi İndoneziya Vaxtı","Mərkəzi İndoneziya Vaxtı"]},"Asia/Jayapura":{"long":["Şərqi İndoneziya Vaxtı","Şərqi İndoneziya Vaxtı"]},"Asia/Jakarta":{"long":["Qərbi İndoneziya Vaxtı","Qərbi İndoneziya Vaxtı"]},"Asia/Tehran":{"long":["İran Standart Vaxtı","İran Yay Vaxtı"]},"Asia/Irkutsk":{"long":["İrkutsk Standart Vaxtı","İrkutsk Yay Vaxtı"]},"Asia/Jerusalem":{"long":["İsrail Standart Vaxtı","İsrail Yay Vaxtı"]},"Asia/Tokyo":{"long":["Yaponiya Standart Vaxtı","Yaponiya Yay Vaxtı"]},"Asia/Karachi":{"long":["Pakistan Standart vaxtı","Pakistan Yay Vaxtı"]},"Asia/Seoul":{"long":["Koreya Standart Vaxtı","Koreya Yay Vaxtı"]},"Pacific/Kosrae":{"long":["Korse Vaxtı","Korse Vaxtı"]},"Asia/Krasnoyarsk":{"long":["Krasnoyarsk Standart Vaxtı","Krasnoyarsk Yay Vaxtı"]},"Europe/Samara":{"long":["Samara standart vaxtı","Samara yay vaxtı"]},"Pacific/Kiritimati":{"long":["Layn Adaları Vaxtı","Layn Adaları Vaxtı"]},"Australia/Lord_Howe":{"long":["Lord Hau Standart Vaxtı","Lord Hau Yay vaxtı"]},"Antarctica/Macquarie":{"long":["Makari Adası Vaxtı","Makari Adası Vaxtı"]},"Asia/Magadan":{"long":["Maqadan Standart Vaxtı","Maqadan Yay Vaxtı"]},"Indian/Maldives":{"long":["Maldiv Vaxtı","Maldiv Vaxtı"]},"Pacific/Marquesas":{"long":["Markesas Vaxtı","Markesas Vaxtı"]},"Pacific/Majuro":{"long":["Marşal Adaları Vaxtı","Marşal Adaları Vaxtı"]},"Indian/Mauritius":{"long":["Mavriki Standart Vaxtı","Mavriki Yay Vaxtı"]},"Antarctica/Mawson":{"long":["Mouson Vaxtı","Mouson Vaxtı"]},"America/Santa_Isabel":{"long":["Şimal-Qərbi Meksika Standart Vaxtı","Şimal-Qərbi Meksika Yay Vaxtı"]},"America/Mazatlan":{"long":["Meksika Sakit Okean Standart Vaxtı","Meksika Sakit Okean Yay Vaxtı"]},"Asia/Ulaanbaatar":{"long":["Ulanbator Standart Vaxtı","Ulanbator Yay Vaxtı"]},"Europe/Moscow":{"long":["Moskva Standart Vaxtı","Moskva Yay vaxtı"]},"Asia/Rangoon":{"long":["Myanma Vaxtı","Myanma Vaxtı"]},"Pacific/Nauru":{"long":["Nauru Vaxtı","Nauru Vaxtı"]},"Asia/Katmandu":{"long":["Nepal vaxtı","Nepal vaxtı"]},"Pacific/Noumea":{"long":["Yeni Kaledoniya Standart Vaxtı","Yeni Kaledoniya Yay Vaxtı"]},"Pacific/Auckland":{"long":["Yeni Zelandiya Standart Vaxtı","Yeni Zelandiya Yay Vaxtı"]},"Antarctica/McMurdo":{"long":["Yeni Zelandiya Standart Vaxtı","Yeni Zelandiya Yay Vaxtı"]},"America/St_Johns":{"long":["Nyufaundlend Standart Vaxtı","Nyufaundlend Yay Vaxtı"]},"Pacific/Niue":{"long":["Niue Vaxtı","Niue Vaxtı"]},"Pacific/Norfolk":{"long":["Norfolk Adası Standart Vaxtı","Norfolk Adası Yay Vaxtı"]},"America/Noronha":{"long":["Fernando de Noronya Standart Vaxtı","Fernando de Noronya Yay Vaxtı"]},"Asia/Novosibirsk":{"long":["Novosibirsk Standart Vaxtı","Novosibirsk Yay Vaxtı"]},"Asia/Omsk":{"long":["Omsk Standart Vaxtı","Omsk Yay Vaxtı"]},"Pacific/Palau":{"long":["Palau Vaxtı","Palau Vaxtı"]},"Pacific/Port_Moresby":{"long":["Papua Yeni Qvineya Vaxtı","Papua Yeni Qvineya Vaxtı"]},"America/Asuncion":{"long":["Paraqvay Standart Vaxtı","Paraqvay Yay Vaxtı"]},"America/Lima":{"long":["Peru Standart Vaxtı","Peru Yay Vaxtı"]},"Asia/Manila":{"long":["Filippin Standart Vaxtı","Filippin Yay Vaxtı"]},"Pacific/Enderbury":{"long":["Feniks Adaları Vaxtı","Feniks Adaları Vaxtı"]},"America/Miquelon":{"long":["Müqəddəs Pyer və Mikelon Standart Vaxtı","Müqəddəs Pyer və Mikelon Yay Vaxtı"]},"Pacific/Pitcairn":{"long":["Pitkern Vaxtı","Pitkern Vaxtı"]},"Pacific/Ponape":{"long":["Ponape Vaxtı","Ponape Vaxtı"]},"Asia/Pyongyang":{"long":["Pxenyan Vaxtı","Pxenyan Vaxtı"]},"Indian/Reunion":{"long":["Reyunyon","Reyunyon"]},"Antarctica/Rothera":{"long":["Rotera Vaxtı","Rotera Vaxtı"]},"Asia/Sakhalin":{"long":["Saxalin Standart Vaxtı","Saxalin Yay Vaxtı"]},"Pacific/Pago_Pago":{"long":["Samoa Standart Vaxtı","Samoa Yay Vaxtı"]},"Indian/Mahe":{"long":["Seyşel Adaları Vaxtı","Seyşel Adaları Vaxtı"]},"Asia/Singapore":{"long":["Sinqapur Vaxtı","Sinqapur Vaxtı"]},"Pacific/Guadalcanal":{"long":["Solomon Adaları Vaxtı","Solomon Adaları Vaxtı"]},"Atlantic/South_Georgia":{"long":["Cənubi Corciya Vaxtı","Cənubi Corciya Vaxtı"]},"Asia/Yekaterinburg":{"long":["Yekaterinburq Standart Vaxtı","Yekaterinburq Yay Vaxtı"]},"Antarctica/Syowa":{"long":["Syova Vaxtı","Syova Vaxtı"]},"Pacific/Tahiti":{"long":["Tahiti Vaxtı","Tahiti Vaxtı"]},"Asia/Taipei":{"long":["Taybey Standart Vaxtı","Taybey Yay Vaxtı"]},"Asia/Tashkent":{"long":["Özbəkistan Standart Vaxtı","Özbəkistan Yay Vaxtı"]},"Pacific/Fakaofo":{"long":["Tokelau Vaxtı","Tokelau Vaxtı"]},"Pacific/Tongatapu":{"long":["Tonqa Standart Vaxtı","Tonqa Yay Vaxtı"]},"Pacific/Truk":{"long":["Çuuk Vaxtı","Çuuk Vaxtı"]},"Pacific/Funafuti":{"long":["Tuvalu Vaxtı","Tuvalu Vaxtı"]},"America/Montevideo":{"long":["Uruqvay Standart Vaxtı","Uruqvay Yay Vaxtı"]},"Pacific/Efate":{"long":["Vanuatu Standart Vaxtı","Vaunatu Yay Vaxtı"]},"America/Caracas":{"long":["Venesuela Vaxtı","Venesuela Vaxtı"]},"Asia/Vladivostok":{"long":["Vladivostok Standart Vaxtı","Vladivostok Yay Vaxtı"]},"Europe/Volgograd":{"long":["Volqoqrad Standart Vaxtı","Volqoqrad Yay Vaxtı"]},"Antarctica/Vostok":{"long":["Vostok Vaxtı","Vostok Vaxtı"]},"Pacific/Wake":{"long":["Ueyk Vaxtı","Ueyk Vaxtı"]},"Pacific/Wallis":{"long":["Uollis və Futuna Vaxtı","Uollis və Futuna Vaxtı"]},"Asia/Yakutsk":{"long":["Yakutsk Standart Vaxtı","Yakutsk Yay Vaxtı"]},"UTC":{"long":["Koordinasiya edilmiş ümumdünya vaxtı","Koordinasiya edilmiş ümumdünya vaxtı"],"short":["UTC","UTC"]}},"gmtFormat":"GMT{0}","hourFormat":"+HH:mm;-HH:mm","dateFormat":{"full":"d MMMM y, EEEE","long":"d MMMM y","medium":"d MMM y","short":"dd.MM.yy"},"timeFormat":{"full":"HH:mm:ss zzzz","long":"HH:mm:ss z","medium":"HH:mm:ss","short":"HH:mm"},"dateTimeFormat":{"full":"{1} {0}","long":"{1} {0}","medium":"{1} {0}","short":"{1} {0}"},"formats":{"gregory":{"Bh":"B h","Bhm":"B h:mm","Bhms":"B h:mm:ss","d":"d","E":"ccc","EBhm":"E B h:mm","EBhms":"E B h:mm:ss","Ed":"d E","Ehm":"E h:mm a","EHm":"E HH:mm","Ehms":"E h:mm:ss a","EHms":"E HH:mm:ss","Gy":"G y","GyMMM":"G MMM y","GyMMMd":"G d MMM y","GyMMMEd":"G d MMM y, E","h":"h a","H":"HH","hm":"h:mm a","Hm":"HH:mm","hms":"h:mm:ss a","Hms":"HH:mm:ss","hmsv":"h:mm:ss a v","Hmsv":"HH:mm:ss v","hmv":"h:mm a v","Hmv":"HH:mm v","M":"L","Md":"dd.MM","MEd":"dd.MM, E","MMM":"LLL","MMMd":"d MMM","MMMEd":"d MMM, E","MMMMd":"d MMMM","ms":"mm:ss","y":"y","yM":"MM.y","yMd":"dd.MM.y","yMEd":"dd.MM.y, E","yMMM":"MMM y","yMMMd":"d MMM y","yMMMEd":"d MMM y, E","yMMMM":"MMMM y","d MMMM y, EEEE":"d MMMM y, EEEE","d MMMM y":"d MMMM y","d MMM y":"d MMM y","dd.MM.yy":"dd.MM.yy","HH:mm:ss zzzz":"HH:mm:ss zzzz","HH:mm:ss z":"HH:mm:ss z","HH:mm:ss":"HH:mm:ss","HH:mm":"HH:mm","d MMMM y, EEEE HH:mm:ss zzzz":"d MMMM y, EEEE HH:mm:ss zzzz","d MMMM y HH:mm:ss zzzz":"d MMMM y HH:mm:ss zzzz","d MMM y HH:mm:ss zzzz":"d MMM y HH:mm:ss zzzz","dd.MM.yy HH:mm:ss zzzz":"dd.MM.yy HH:mm:ss zzzz","d HH:mm:ss zzzz":"d HH:mm:ss zzzz","E HH:mm:ss zzzz":"ccc HH:mm:ss zzzz","Ed HH:mm:ss zzzz":"d E HH:mm:ss zzzz","Gy HH:mm:ss zzzz":"G y HH:mm:ss zzzz","GyMMM HH:mm:ss zzzz":"G MMM y HH:mm:ss zzzz","GyMMMd HH:mm:ss zzzz":"G d MMM y HH:mm:ss zzzz","GyMMMEd HH:mm:ss zzzz":"G d MMM y, E HH:mm:ss zzzz","M HH:mm:ss zzzz":"L HH:mm:ss zzzz","Md HH:mm:ss zzzz":"dd.MM HH:mm:ss zzzz","MEd HH:mm:ss zzzz":"dd.MM, E HH:mm:ss zzzz","MMM HH:mm:ss zzzz":"LLL HH:mm:ss zzzz","MMMd HH:mm:ss zzzz":"d MMM HH:mm:ss zzzz","MMMEd HH:mm:ss zzzz":"d MMM, E HH:mm:ss zzzz","MMMMd HH:mm:ss zzzz":"d MMMM HH:mm:ss zzzz","y HH:mm:ss zzzz":"y HH:mm:ss zzzz","yM HH:mm:ss zzzz":"MM.y HH:mm:ss zzzz","yMd HH:mm:ss zzzz":"dd.MM.y HH:mm:ss zzzz","yMEd HH:mm:ss zzzz":"dd.MM.y, E HH:mm:ss zzzz","yMMM HH:mm:ss zzzz":"MMM y HH:mm:ss zzzz","yMMMd HH:mm:ss zzzz":"d MMM y HH:mm:ss zzzz","yMMMEd HH:mm:ss zzzz":"d MMM y, E HH:mm:ss zzzz","yMMMM HH:mm:ss zzzz":"MMMM y HH:mm:ss zzzz","d MMMM y, EEEE HH:mm:ss z":"d MMMM y, EEEE HH:mm:ss z","d MMMM y HH:mm:ss z":"d MMMM y HH:mm:ss z","d MMM y HH:mm:ss z":"d MMM y HH:mm:ss z","dd.MM.yy HH:mm:ss z":"dd.MM.yy HH:mm:ss z","d HH:mm:ss z":"d HH:mm:ss z","E HH:mm:ss z":"ccc HH:mm:ss z","Ed HH:mm:ss z":"d E HH:mm:ss z","Gy HH:mm:ss z":"G y HH:mm:ss z","GyMMM HH:mm:ss z":"G MMM y HH:mm:ss z","GyMMMd HH:mm:ss z":"G d MMM y HH:mm:ss z","GyMMMEd HH:mm:ss z":"G d MMM y, E HH:mm:ss z","M HH:mm:ss z":"L HH:mm:ss z","Md HH:mm:ss z":"dd.MM HH:mm:ss z","MEd HH:mm:ss z":"dd.MM, E HH:mm:ss z","MMM HH:mm:ss z":"LLL HH:mm:ss z","MMMd HH:mm:ss z":"d MMM HH:mm:ss z","MMMEd HH:mm:ss z":"d MMM, E HH:mm:ss z","MMMMd HH:mm:ss z":"d MMMM HH:mm:ss z","y HH:mm:ss z":"y HH:mm:ss z","yM HH:mm:ss z":"MM.y HH:mm:ss z","yMd HH:mm:ss z":"dd.MM.y HH:mm:ss z","yMEd HH:mm:ss z":"dd.MM.y, E HH:mm:ss z","yMMM HH:mm:ss z":"MMM y HH:mm:ss z","yMMMd HH:mm:ss z":"d MMM y HH:mm:ss z","yMMMEd HH:mm:ss z":"d MMM y, E HH:mm:ss z","yMMMM HH:mm:ss z":"MMMM y HH:mm:ss z","d MMMM y, EEEE HH:mm:ss":"d MMMM y, EEEE HH:mm:ss","d MMMM y HH:mm:ss":"d MMMM y HH:mm:ss","d MMM y HH:mm:ss":"d MMM y HH:mm:ss","dd.MM.yy HH:mm:ss":"dd.MM.yy HH:mm:ss","d HH:mm:ss":"d HH:mm:ss","E HH:mm:ss":"ccc HH:mm:ss","Ed HH:mm:ss":"d E HH:mm:ss","Gy HH:mm:ss":"G y HH:mm:ss","GyMMM HH:mm:ss":"G MMM y HH:mm:ss","GyMMMd HH:mm:ss":"G d MMM y HH:mm:ss","GyMMMEd HH:mm:ss":"G d MMM y, E HH:mm:ss","M HH:mm:ss":"L HH:mm:ss","Md HH:mm:ss":"dd.MM HH:mm:ss","MEd HH:mm:ss":"dd.MM, E HH:mm:ss","MMM HH:mm:ss":"LLL HH:mm:ss","MMMd HH:mm:ss":"d MMM HH:mm:ss","MMMEd HH:mm:ss":"d MMM, E HH:mm:ss","MMMMd HH:mm:ss":"d MMMM HH:mm:ss","y HH:mm:ss":"y HH:mm:ss","yM HH:mm:ss":"MM.y HH:mm:ss","yMd HH:mm:ss":"dd.MM.y HH:mm:ss","yMEd HH:mm:ss":"dd.MM.y, E HH:mm:ss","yMMM HH:mm:ss":"MMM y HH:mm:ss","yMMMd HH:mm:ss":"d MMM y HH:mm:ss","yMMMEd HH:mm:ss":"d MMM y, E HH:mm:ss","yMMMM HH:mm:ss":"MMMM y HH:mm:ss","d MMMM y, EEEE HH:mm":"d MMMM y, EEEE HH:mm","d MMMM y HH:mm":"d MMMM y HH:mm","d MMM y HH:mm":"d MMM y HH:mm","dd.MM.yy HH:mm":"dd.MM.yy HH:mm","d HH:mm":"d HH:mm","E HH:mm":"ccc HH:mm","Ed HH:mm":"d E HH:mm","Gy HH:mm":"G y HH:mm","GyMMM HH:mm":"G MMM y HH:mm","GyMMMd HH:mm":"G d MMM y HH:mm","GyMMMEd HH:mm":"G d MMM y, E HH:mm","M HH:mm":"L HH:mm","Md HH:mm":"dd.MM HH:mm","MEd HH:mm":"dd.MM, E HH:mm","MMM HH:mm":"LLL HH:mm","MMMd HH:mm":"d MMM HH:mm","MMMEd HH:mm":"d MMM, E HH:mm","MMMMd HH:mm":"d MMMM HH:mm","y HH:mm":"y HH:mm","yM HH:mm":"MM.y HH:mm","yMd HH:mm":"dd.MM.y HH:mm","yMEd HH:mm":"dd.MM.y, E HH:mm","yMMM HH:mm":"MMM y HH:mm","yMMMd HH:mm":"d MMM y HH:mm","yMMMEd HH:mm":"d MMM y, E HH:mm","yMMMM HH:mm":"MMMM y HH:mm","d MMMM y, EEEE Bh":"d MMMM y, EEEE B h","d MMMM y Bh":"d MMMM y B h","d MMM y Bh":"d MMM y B h","dd.MM.yy Bh":"dd.MM.yy B h","d Bh":"d B h","E Bh":"ccc B h","Ed Bh":"d E B h","Gy Bh":"G y B h","GyMMM Bh":"G MMM y B h","GyMMMd Bh":"G d MMM y B h","GyMMMEd Bh":"G d MMM y, E B h","M Bh":"L B h","Md Bh":"dd.MM B h","MEd Bh":"dd.MM, E B h","MMM Bh":"LLL B h","MMMd Bh":"d MMM B h","MMMEd Bh":"d MMM, E B h","MMMMd Bh":"d MMMM B h","y Bh":"y B h","yM Bh":"MM.y B h","yMd Bh":"dd.MM.y B h","yMEd Bh":"dd.MM.y, E B h","yMMM Bh":"MMM y B h","yMMMd Bh":"d MMM y B h","yMMMEd Bh":"d MMM y, E B h","yMMMM Bh":"MMMM y B h","d MMMM y, EEEE Bhm":"d MMMM y, EEEE B h:mm","d MMMM y Bhm":"d MMMM y B h:mm","d MMM y Bhm":"d MMM y B h:mm","dd.MM.yy Bhm":"dd.MM.yy B h:mm","d Bhm":"d B h:mm","E Bhm":"ccc B h:mm","Ed Bhm":"d E B h:mm","Gy Bhm":"G y B h:mm","GyMMM Bhm":"G MMM y B h:mm","GyMMMd Bhm":"G d MMM y B h:mm","GyMMMEd Bhm":"G d MMM y, E B h:mm","M Bhm":"L B h:mm","Md Bhm":"dd.MM B h:mm","MEd Bhm":"dd.MM, E B h:mm","MMM Bhm":"LLL B h:mm","MMMd Bhm":"d MMM B h:mm","MMMEd Bhm":"d MMM, E B h:mm","MMMMd Bhm":"d MMMM B h:mm","y Bhm":"y B h:mm","yM Bhm":"MM.y B h:mm","yMd Bhm":"dd.MM.y B h:mm","yMEd Bhm":"dd.MM.y, E B h:mm","yMMM Bhm":"MMM y B h:mm","yMMMd Bhm":"d MMM y B h:mm","yMMMEd Bhm":"d MMM y, E B h:mm","yMMMM Bhm":"MMMM y B h:mm","d MMMM y, EEEE Bhms":"d MMMM y, EEEE B h:mm:ss","d MMMM y Bhms":"d MMMM y B h:mm:ss","d MMM y Bhms":"d MMM y B h:mm:ss","dd.MM.yy Bhms":"dd.MM.yy B h:mm:ss","d Bhms":"d B h:mm:ss","E Bhms":"ccc B h:mm:ss","Ed Bhms":"d E B h:mm:ss","Gy Bhms":"G y B h:mm:ss","GyMMM Bhms":"G MMM y B h:mm:ss","GyMMMd Bhms":"G d MMM y B h:mm:ss","GyMMMEd Bhms":"G d MMM y, E B h:mm:ss","M Bhms":"L B h:mm:ss","Md Bhms":"dd.MM B h:mm:ss","MEd Bhms":"dd.MM, E B h:mm:ss","MMM Bhms":"LLL B h:mm:ss","MMMd Bhms":"d MMM B h:mm:ss","MMMEd Bhms":"d MMM, E B h:mm:ss","MMMMd Bhms":"d MMMM B h:mm:ss","y Bhms":"y B h:mm:ss","yM Bhms":"MM.y B h:mm:ss","yMd Bhms":"dd.MM.y B h:mm:ss","yMEd Bhms":"dd.MM.y, E B h:mm:ss","yMMM Bhms":"MMM y B h:mm:ss","yMMMd Bhms":"d MMM y B h:mm:ss","yMMMEd Bhms":"d MMM y, E B h:mm:ss","yMMMM Bhms":"MMMM y B h:mm:ss","d MMMM y, EEEE h":"d MMMM y, EEEE h a","d MMMM y h":"d MMMM y h a","d MMM y h":"d MMM y h a","dd.MM.yy h":"dd.MM.yy h a","d h":"d h a","E h":"ccc h a","Ed h":"d E h a","Gy h":"G y h a","GyMMM h":"G MMM y h a","GyMMMd h":"G d MMM y h a","GyMMMEd h":"G d MMM y, E h a","M h":"L h a","Md h":"dd.MM h a","MEd h":"dd.MM, E h a","MMM h":"LLL h a","MMMd h":"d MMM h a","MMMEd h":"d MMM, E h a","MMMMd h":"d MMMM h a","y h":"y h a","yM h":"MM.y h a","yMd h":"dd.MM.y h a","yMEd h":"dd.MM.y, E h a","yMMM h":"MMM y h a","yMMMd h":"d MMM y h a","yMMMEd h":"d MMM y, E h a","yMMMM h":"MMMM y h a","d MMMM y, EEEE H":"d MMMM y, EEEE HH","d MMMM y H":"d MMMM y HH","d MMM y H":"d MMM y HH","dd.MM.yy H":"dd.MM.yy HH","d H":"d HH","E H":"ccc HH","Ed H":"d E HH","Gy H":"G y HH","GyMMM H":"G MMM y HH","GyMMMd H":"G d MMM y HH","GyMMMEd H":"G d MMM y, E HH","M H":"L HH","Md H":"dd.MM HH","MEd H":"dd.MM, E HH","MMM H":"LLL HH","MMMd H":"d MMM HH","MMMEd H":"d MMM, E HH","MMMMd H":"d MMMM HH","y H":"y HH","yM H":"MM.y HH","yMd H":"dd.MM.y HH","yMEd H":"dd.MM.y, E HH","yMMM H":"MMM y HH","yMMMd H":"d MMM y HH","yMMMEd H":"d MMM y, E HH","yMMMM H":"MMMM y HH","d MMMM y, EEEE hm":"d MMMM y, EEEE h:mm a","d MMMM y hm":"d MMMM y h:mm a","d MMM y hm":"d MMM y h:mm a","dd.MM.yy hm":"dd.MM.yy h:mm a","d hm":"d h:mm a","E hm":"ccc h:mm a","Ed hm":"d E h:mm a","Gy hm":"G y h:mm a","GyMMM hm":"G MMM y h:mm a","GyMMMd hm":"G d MMM y h:mm a","GyMMMEd hm":"G d MMM y, E h:mm a","M hm":"L h:mm a","Md hm":"dd.MM h:mm a","MEd hm":"dd.MM, E h:mm a","MMM hm":"LLL h:mm a","MMMd hm":"d MMM h:mm a","MMMEd hm":"d MMM, E h:mm a","MMMMd hm":"d MMMM h:mm a","y hm":"y h:mm a","yM hm":"MM.y h:mm a","yMd hm":"dd.MM.y h:mm a","yMEd hm":"dd.MM.y, E h:mm a","yMMM hm":"MMM y h:mm a","yMMMd hm":"d MMM y h:mm a","yMMMEd hm":"d MMM y, E h:mm a","yMMMM hm":"MMMM y h:mm a","d MMMM y, EEEE Hm":"d MMMM y, EEEE HH:mm","d MMMM y Hm":"d MMMM y HH:mm","d MMM y Hm":"d MMM y HH:mm","dd.MM.yy Hm":"dd.MM.yy HH:mm","d Hm":"d HH:mm","E Hm":"ccc HH:mm","Ed Hm":"d E HH:mm","Gy Hm":"G y HH:mm","GyMMM Hm":"G MMM y HH:mm","GyMMMd Hm":"G d MMM y HH:mm","GyMMMEd Hm":"G d MMM y, E HH:mm","M Hm":"L HH:mm","Md Hm":"dd.MM HH:mm","MEd Hm":"dd.MM, E HH:mm","MMM Hm":"LLL HH:mm","MMMd Hm":"d MMM HH:mm","MMMEd Hm":"d MMM, E HH:mm","MMMMd Hm":"d MMMM HH:mm","y Hm":"y HH:mm","yM Hm":"MM.y HH:mm","yMd Hm":"dd.MM.y HH:mm","yMEd Hm":"dd.MM.y, E HH:mm","yMMM Hm":"MMM y HH:mm","yMMMd Hm":"d MMM y HH:mm","yMMMEd Hm":"d MMM y, E HH:mm","yMMMM Hm":"MMMM y HH:mm","d MMMM y, EEEE hms":"d MMMM y, EEEE h:mm:ss a","d MMMM y hms":"d MMMM y h:mm:ss a","d MMM y hms":"d MMM y h:mm:ss a","dd.MM.yy hms":"dd.MM.yy h:mm:ss a","d hms":"d h:mm:ss a","E hms":"ccc h:mm:ss a","Ed hms":"d E h:mm:ss a","Gy hms":"G y h:mm:ss a","GyMMM hms":"G MMM y h:mm:ss a","GyMMMd hms":"G d MMM y h:mm:ss a","GyMMMEd hms":"G d MMM y, E h:mm:ss a","M hms":"L h:mm:ss a","Md hms":"dd.MM h:mm:ss a","MEd hms":"dd.MM, E h:mm:ss a","MMM hms":"LLL h:mm:ss a","MMMd hms":"d MMM h:mm:ss a","MMMEd hms":"d MMM, E h:mm:ss a","MMMMd hms":"d MMMM h:mm:ss a","y hms":"y h:mm:ss a","yM hms":"MM.y h:mm:ss a","yMd hms":"dd.MM.y h:mm:ss a","yMEd hms":"dd.MM.y, E h:mm:ss a","yMMM hms":"MMM y h:mm:ss a","yMMMd hms":"d MMM y h:mm:ss a","yMMMEd hms":"d MMM y, E h:mm:ss a","yMMMM hms":"MMMM y h:mm:ss a","d MMMM y, EEEE Hms":"d MMMM y, EEEE HH:mm:ss","d MMMM y Hms":"d MMMM y HH:mm:ss","d MMM y Hms":"d MMM y HH:mm:ss","dd.MM.yy Hms":"dd.MM.yy HH:mm:ss","d Hms":"d HH:mm:ss","E Hms":"ccc HH:mm:ss","Ed Hms":"d E HH:mm:ss","Gy Hms":"G y HH:mm:ss","GyMMM Hms":"G MMM y HH:mm:ss","GyMMMd Hms":"G d MMM y HH:mm:ss","GyMMMEd Hms":"G d MMM y, E HH:mm:ss","M Hms":"L HH:mm:ss","Md Hms":"dd.MM HH:mm:ss","MEd Hms":"dd.MM, E HH:mm:ss","MMM Hms":"LLL HH:mm:ss","MMMd Hms":"d MMM HH:mm:ss","MMMEd Hms":"d MMM, E HH:mm:ss","MMMMd Hms":"d MMMM HH:mm:ss","y Hms":"y HH:mm:ss","yM Hms":"MM.y HH:mm:ss","yMd Hms":"dd.MM.y HH:mm:ss","yMEd Hms":"dd.MM.y, E HH:mm:ss","yMMM Hms":"MMM y HH:mm:ss","yMMMd Hms":"d MMM y HH:mm:ss","yMMMEd Hms":"d MMM y, E HH:mm:ss","yMMMM Hms":"MMMM y HH:mm:ss","d MMMM y, EEEE hmsv":"d MMMM y, EEEE h:mm:ss a v","d MMMM y hmsv":"d MMMM y h:mm:ss a v","d MMM y hmsv":"d MMM y h:mm:ss a v","dd.MM.yy hmsv":"dd.MM.yy h:mm:ss a v","d hmsv":"d h:mm:ss a v","E hmsv":"ccc h:mm:ss a v","Ed hmsv":"d E h:mm:ss a v","Gy hmsv":"G y h:mm:ss a v","GyMMM hmsv":"G MMM y h:mm:ss a v","GyMMMd hmsv":"G d MMM y h:mm:ss a v","GyMMMEd hmsv":"G d MMM y, E h:mm:ss a v","M hmsv":"L h:mm:ss a v","Md hmsv":"dd.MM h:mm:ss a v","MEd hmsv":"dd.MM, E h:mm:ss a v","MMM hmsv":"LLL h:mm:ss a v","MMMd hmsv":"d MMM h:mm:ss a v","MMMEd hmsv":"d MMM, E h:mm:ss a v","MMMMd hmsv":"d MMMM h:mm:ss a v","y hmsv":"y h:mm:ss a v","yM hmsv":"MM.y h:mm:ss a v","yMd hmsv":"dd.MM.y h:mm:ss a v","yMEd hmsv":"dd.MM.y, E h:mm:ss a v","yMMM hmsv":"MMM y h:mm:ss a v","yMMMd hmsv":"d MMM y h:mm:ss a v","yMMMEd hmsv":"d MMM y, E h:mm:ss a v","yMMMM hmsv":"MMMM y h:mm:ss a v","d MMMM y, EEEE Hmsv":"d MMMM y, EEEE HH:mm:ss v","d MMMM y Hmsv":"d MMMM y HH:mm:ss v","d MMM y Hmsv":"d MMM y HH:mm:ss v","dd.MM.yy Hmsv":"dd.MM.yy HH:mm:ss v","d Hmsv":"d HH:mm:ss v","E Hmsv":"ccc HH:mm:ss v","Ed Hmsv":"d E HH:mm:ss v","Gy Hmsv":"G y HH:mm:ss v","GyMMM Hmsv":"G MMM y HH:mm:ss v","GyMMMd Hmsv":"G d MMM y HH:mm:ss v","GyMMMEd Hmsv":"G d MMM y, E HH:mm:ss v","M Hmsv":"L HH:mm:ss v","Md Hmsv":"dd.MM HH:mm:ss v","MEd Hmsv":"dd.MM, E HH:mm:ss v","MMM Hmsv":"LLL HH:mm:ss v","MMMd Hmsv":"d MMM HH:mm:ss v","MMMEd Hmsv":"d MMM, E HH:mm:ss v","MMMMd Hmsv":"d MMMM HH:mm:ss v","y Hmsv":"y HH:mm:ss v","yM Hmsv":"MM.y HH:mm:ss v","yMd Hmsv":"dd.MM.y HH:mm:ss v","yMEd Hmsv":"dd.MM.y, E HH:mm:ss v","yMMM Hmsv":"MMM y HH:mm:ss v","yMMMd Hmsv":"d MMM y HH:mm:ss v","yMMMEd Hmsv":"d MMM y, E HH:mm:ss v","yMMMM Hmsv":"MMMM y HH:mm:ss v","d MMMM y, EEEE hmv":"d MMMM y, EEEE h:mm a v","d MMMM y hmv":"d MMMM y h:mm a v","d MMM y hmv":"d MMM y h:mm a v","dd.MM.yy hmv":"dd.MM.yy h:mm a v","d hmv":"d h:mm a v","E hmv":"ccc h:mm a v","Ed hmv":"d E h:mm a v","Gy hmv":"G y h:mm a v","GyMMM hmv":"G MMM y h:mm a v","GyMMMd hmv":"G d MMM y h:mm a v","GyMMMEd hmv":"G d MMM y, E h:mm a v","M hmv":"L h:mm a v","Md hmv":"dd.MM h:mm a v","MEd hmv":"dd.MM, E h:mm a v","MMM hmv":"LLL h:mm a v","MMMd hmv":"d MMM h:mm a v","MMMEd hmv":"d MMM, E h:mm a v","MMMMd hmv":"d MMMM h:mm a v","y hmv":"y h:mm a v","yM hmv":"MM.y h:mm a v","yMd hmv":"dd.MM.y h:mm a v","yMEd hmv":"dd.MM.y, E h:mm a v","yMMM hmv":"MMM y h:mm a v","yMMMd hmv":"d MMM y h:mm a v","yMMMEd hmv":"d MMM y, E h:mm a v","yMMMM hmv":"MMMM y h:mm a v","d MMMM y, EEEE Hmv":"d MMMM y, EEEE HH:mm v","d MMMM y Hmv":"d MMMM y HH:mm v","d MMM y Hmv":"d MMM y HH:mm v","dd.MM.yy Hmv":"dd.MM.yy HH:mm v","d Hmv":"d HH:mm v","E Hmv":"ccc HH:mm v","Ed Hmv":"d E HH:mm v","Gy Hmv":"G y HH:mm v","GyMMM Hmv":"G MMM y HH:mm v","GyMMMd Hmv":"G d MMM y HH:mm v","GyMMMEd Hmv":"G d MMM y, E HH:mm v","M Hmv":"L HH:mm v","Md Hmv":"dd.MM HH:mm v","MEd Hmv":"dd.MM, E HH:mm v","MMM Hmv":"LLL HH:mm v","MMMd Hmv":"d MMM HH:mm v","MMMEd Hmv":"d MMM, E HH:mm v","MMMMd Hmv":"d MMMM HH:mm v","y Hmv":"y HH:mm v","yM Hmv":"MM.y HH:mm v","yMd Hmv":"dd.MM.y HH:mm v","yMEd Hmv":"dd.MM.y, E HH:mm v","yMMM Hmv":"MMM y HH:mm v","yMMMd Hmv":"d MMM y HH:mm v","yMMMEd Hmv":"d MMM y, E HH:mm v","yMMMM Hmv":"MMMM y HH:mm v","d MMMM y, EEEE ms":"d MMMM y, EEEE mm:ss","d MMMM y ms":"d MMMM y mm:ss","d MMM y ms":"d MMM y mm:ss","dd.MM.yy ms":"dd.MM.yy mm:ss","d ms":"d mm:ss","E ms":"ccc mm:ss","Ed ms":"d E mm:ss","Gy ms":"G y mm:ss","GyMMM ms":"G MMM y mm:ss","GyMMMd ms":"G d MMM y mm:ss","GyMMMEd ms":"G d MMM y, E mm:ss","M ms":"L mm:ss","Md ms":"dd.MM mm:ss","MEd ms":"dd.MM, E mm:ss","MMM ms":"LLL mm:ss","MMMd ms":"d MMM mm:ss","MMMEd ms":"d MMM, E mm:ss","MMMMd ms":"d MMMM mm:ss","y ms":"y mm:ss","yM ms":"MM.y mm:ss","yMd ms":"dd.MM.y mm:ss","yMEd ms":"dd.MM.y, E mm:ss","yMMM ms":"MMM y mm:ss","yMMMd ms":"d MMM y mm:ss","yMMMEd ms":"d MMM y, E mm:ss","yMMMM ms":"MMMM y mm:ss"}},"intervalFormats":{"intervalFormatFallback":"{0} – {1}","Bh":{"B":"h B – h B","h":"h–h B"},"Bhm":{"B":"h:mm B – h:mm B","h":"h:mm–h:mm B","m":"h:mm–h:mm B"},"d":{"d":"d–d"},"Gy":{"G":"G y – G y","y":"G y–y"},"GyM":{"G":"GGGGG MM.y – GGGGG MM.y","M":"GGGGG MM.y – MM.y","y":"GGGGG MM.y – MM.y"},"GyMd":{"d":"GGGGG dd.MM.y – dd.MM.y","G":"GGGGG dd.MM.y – GGGGG dd.MM.y","M":"GGGGG dd.MM.y – dd.MM.y","y":"GGGGG dd.MM.y – dd.MM.y"},"GyMEd":{"d":"GGGGG dd.MM.y, E – dd.MM.y, E","G":"GGGGG dd.MM.y, E – GGGGG dd.MM.y, E","M":"GGGGG dd.MM.y, E – dd.MM.y, E","y":"GGGGG dd.MM.y, E – dd.MM.y, E"},"GyMMM":{"G":"G MMM y – G MMM y","M":"G MMM – MMM y","y":"G MMM y – MMM y"},"GyMMMd":{"d":"G d – d MMM y","G":"G d MMM y – G d MMM y","M":"G d MMM – d MMM y","y":"G d MMM y – d MMM y"},"GyMMMEd":{"d":"G d MMM, E – d MMM y, E","G":"G d MMM y, E – d MMM y, E","M":"G d MMM, E – d MMM y, E","y":"G d MMM y, E – d MMM y, E"},"h":{"a":"h a – h a","h":"h–h a"},"H":{"H":"HH–HH"},"hm":{"a":"h:mm a – h:mm a","h":"h:mm–h:mm a","m":"h:mm–h:mm a"},"Hm":{"H":"HH:mm–HH:mm","m":"HH:mm–HH:mm"},"hmv":{"a":"h:mm a – h:mm a v","h":"h:mm–h:mm a v","m":"h:mm–h:mm a v"},"Hmv":{"H":"HH:mm–HH:mm v","m":"HH:mm–HH:mm v"},"hv":{"a":"h a – h a v","h":"h–h a v"},"Hv":{"H":"HH–HH v"},"M":{"M":"MM–MM"},"Md":{"d":"dd.MM – dd.MM","M":"dd.MM – dd.MM"},"MEd":{"d":"dd.MM, E – dd.MM, E","M":"dd.MM, E – dd.MM, E"},"MMM":{"M":"LLL–LLL"},"MMMd":{"d":"d–d MMM","M":"d MMM – d MMM"},"MMMEd":{"d":"d MMM, E – d MMM, E","M":"d MMM, E – d MMM, E"},"y":{"y":"y–y"},"yM":{"M":"MM.y – MM.y","y":"MM.y – MM.y"},"yMd":{"d":"dd.MM.y – dd.MM.y","M":"dd.MM.y – dd.MM.y","y":"dd.MM.y – dd.MM.y"},"yMEd":{"d":"dd.MM.y, E – dd.MM.y, E","M":"dd.MM.y, E – dd.MM.y, E","y":"dd.MM.y, E – dd.MM.y, E"},"yMMM":{"M":"MMM–MMM y","y":"MMM y – MMM y"},"yMMMd":{"d":"y MMM d–d","M":"d MMM y – d MMM","y":"d MMM y – d MMM y"},"yMMMEd":{"d":"d MMM y, E – d MMM, E","M":"d MMM y, E – d MMM, E","y":"d MMM y, E – d MMM y, E"},"yMMMM":{"M":"MMMM–MMMM y","y":"MMMM y – MMMM y"}},"hourCycle":"h23","nu":["latn"],"ca":["gregory"],"hc":["h23","","h12"]},"locale":"az-Latn"} ) }}}).call('object' === typeof window && window || 'object' === typeof self && self || 'object' === typeof global && global || {});
__NUXT_JSONP__("/amp/58/7", (function(a,b,c,d,e,f,g){return {data:[{metaTitle:b,metaDesc:c,verseId:7,surahId:58,currentSurah:{number:"58",name:"المجادلة",name_latin:"Al-Mujadalah",number_of_ayah:"22",text:{"1":"قَدْ سَمِعَ اللّٰهُ قَوْلَ الَّتِيْ تُجَادِلُكَ فِيْ زَوْجِهَا وَتَشْتَكِيْٓ اِلَى اللّٰهِ ۖوَاللّٰهُ يَسْمَعُ تَحَاوُرَكُمَاۗ اِنَّ اللّٰهَ سَمِيْعٌۢ بَصِيْرٌ ","2":"اَلَّذِيْنَ يُظٰهِرُوْنَ مِنْكُمْ مِّنْ نِّسَاۤىِٕهِمْ مَّا هُنَّ اُمَّهٰتِهِمْۗ اِنْ اُمَّهٰتُهُمْ اِلَّا الّٰۤـِٔيْ وَلَدْنَهُمْۗ وَاِنَّهُمْ لَيَقُوْلُوْنَ مُنْكَرًا مِّنَ الْقَوْلِ وَزُوْرًاۗ وَاِنَّ اللّٰهَ لَعَفُوٌّ غَفُوْرٌ ","3":"وَالَّذِيْنَ يُظٰهِرُوْنَ مِنْ نِّسَاۤىِٕهِمْ ثُمَّ يَعُوْدُوْنَ لِمَا قَالُوْا فَتَحْرِيْرُ رَقَبَةٍ مِّنْ قَبْلِ اَنْ يَّتَمَاۤسَّاۗ ذٰلِكُمْ تُوْعَظُوْنَ بِهٖۗ وَاللّٰهُ بِمَا تَعْمَلُوْنَ خَبِيْرٌ ","4":"فَمَنْ لَّمْ يَجِدْ فَصِيَامُ شَهْرَيْنِ مُتَتَابِعَيْنِ مِنْ قَبْلِ اَنْ يَّتَمَاۤسَّاۗ فَمَنْ لَّمْ يَسْتَطِعْ فَاِطْعَامُ سِتِّيْنَ مِسْكِيْنًاۗ ذٰلِكَ لِتُؤْمِنُوْا بِاللّٰهِ وَرَسُوْلِهٖۗ وَتِلْكَ حُدُوْدُ اللّٰهِ ۗوَلِلْكٰفِرِيْنَ عَذَابٌ اَلِيْمٌ ","5":"اِنَّ الَّذِيْنَ يُحَاۤدُّوْنَ اللّٰهَ وَرَسُوْلَهٗ كُبِتُوْا كَمَا كُبِتَ الَّذِيْنَ مِنْ قَبْلِهِمْ وَقَدْ اَنْزَلْنَآ اٰيٰتٍۢ بَيِّنٰتٍۗ وَلِلْكٰفِرِيْنَ عَذَابٌ مُّهِيْنٌۚ ","6":"يَوْمَ يَبْعَثُهُمُ اللّٰهُ جَمِيْعًا فَيُنَبِّئُهُمْ بِمَا عَمِلُوْاۗ اَحْصٰىهُ اللّٰهُ وَنَسُوْهُۗ وَاللّٰهُ عَلٰى كُلِّ شَيْءٍ شَهِيْدٌ ࣖ","7":"اَلَمْ تَرَ اَنَّ اللّٰهَ يَعْلَمُ مَا فِى السَّمٰوٰتِ وَمَا فِى الْاَرْضِۗ مَا يَكُوْنُ مِنْ نَّجْوٰى ثَلٰثَةٍ اِلَّا هُوَ رَابِعُهُمْ وَلَا خَمْسَةٍ اِلَّا هُوَ سَادِسُهُمْ وَلَآ اَدْنٰى مِنْ ذٰلِكَ وَلَآ اَكْثَرَ اِلَّا هُوَ مَعَهُمْ اَيْنَ مَا كَانُوْاۚ ثُمَّ يُنَبِّئُهُمْ بِمَا عَمِلُوْا يَوْمَ الْقِيٰمَةِۗ اِنَّ اللّٰهَ بِكُلِّ شَيْءٍ عَلِيْمٌ ","8":"اَلَمْ تَرَ اِلَى الَّذِيْنَ نُهُوْا عَنِ النَّجْوٰى ثُمَّ يَعُوْدُوْنَ لِمَا نُهُوْا عَنْهُ وَيَتَنٰجَوْنَ بِالْاِثْمِ وَالْعُدْوَانِ وَمَعْصِيَتِ الرَّسُوْلِۖ وَاِذَا جَاۤءُوْكَ حَيَّوْكَ بِمَا لَمْ يُحَيِّكَ بِهِ اللّٰهُ ۙوَيَقُوْلُوْنَ فِيْٓ اَنْفُسِهِمْ لَوْلَا يُعَذِّبُنَا اللّٰهُ بِمَا نَقُوْلُۗ حَسْبُهُمْ جَهَنَّمُۚ يَصْلَوْنَهَاۚ فَبِئْسَ الْمَصِيْرُ ","9":"يٰٓاَيُّهَا الَّذِيْنَ اٰمَنُوْٓا اِذَا تَنَاجَيْتُمْ فَلَا تَتَنَاجَوْا بِالْاِثْمِ وَالْعُدْوَانِ وَمَعْصِيَتِ الرَّسُوْلِ وَتَنَاجَوْا بِالْبِرِّ وَالتَّقْوٰىۗ وَاتَّقُوا اللّٰهَ الَّذِيْٓ اِلَيْهِ تُحْشَرُوْنَ","10":"اِنَّمَا النَّجْوٰى مِنَ الشَّيْطٰنِ لِيَحْزُنَ الَّذِيْنَ اٰمَنُوْا وَلَيْسَ بِضَاۤرِّهِمْ شَيْـًٔا اِلَّا بِاِذْنِ اللّٰهِ ۗوَعَلَى اللّٰهِ فَلْيَتَوَكَّلِ الْمُؤْمِنُوْنَ","11":"يٰٓاَيُّهَا الَّذِيْنَ اٰمَنُوْٓا اِذَا قِيْلَ لَكُمْ تَفَسَّحُوْا فِى الْمَجٰلِسِ فَافْسَحُوْا يَفْسَحِ اللّٰهُ لَكُمْۚ وَاِذَا قِيْلَ انْشُزُوْا فَانْشُزُوْا يَرْفَعِ اللّٰهُ الَّذِيْنَ اٰمَنُوْا مِنْكُمْۙ وَالَّذِيْنَ اُوْتُوا الْعِلْمَ دَرَجٰتٍۗ وَاللّٰهُ بِمَا تَعْمَلُوْنَ خَبِيْرٌ","12":"يٰٓاَيُّهَا الَّذِيْنَ اٰمَنُوْٓا اِذَا نَاجَيْتُمُ الرَّسُوْلَ فَقَدِّمُوْا بَيْنَ يَدَيْ نَجْوٰىكُمْ صَدَقَةً ۗذٰلِكَ خَيْرٌ لَّكُمْ وَاَطْهَرُۗ فَاِنْ لَّمْ تَجِدُوْا فَاِنَّ اللّٰهَ غَفُوْرٌ رَّحِيْمٌ ","13":"ءَاَشْفَقْتُمْ اَنْ تُقَدِّمُوْا بَيْنَ يَدَيْ نَجْوٰىكُمْ صَدَقٰتٍۗ فَاِذْ لَمْ تَفْعَلُوْا وَتَابَ اللّٰهُ عَلَيْكُمْ فَاَقِيْمُوا الصَّلٰوةَ وَاٰتُوا الزَّكٰوةَ وَاَطِيْعُوا اللّٰهَ وَرَسُوْلَهٗ ۗوَاللّٰهُ خَبِيْرٌ ۢبِمَا تَعْمَلُوْنَ ࣖ ","14":"۞ اَلَمْ تَرَ اِلَى الَّذِيْنَ تَوَلَّوْا قَوْمًا غَضِبَ اللّٰهُ عَلَيْهِمْۗ مَا هُمْ مِّنْكُمْ وَلَا مِنْهُمْۙ وَيَحْلِفُوْنَ عَلَى الْكَذِبِ وَهُمْ يَعْلَمُوْنَ ","15":"اَعَدَّ اللّٰهُ لَهُمْ عَذَابًا شَدِيْدًاۗ اِنَّهُمْ سَاۤءَ مَا كَانُوْا يَعْمَلُوْنَ","16":"اِتَّخَذُوْٓا اَيْمَانَهُمْ جُنَّةً فَصَدُّوْا عَنْ سَبِيْلِ اللّٰهِ فَلَهُمْ عَذَابٌ مُّهِيْنٌ ","17":"لَنْ تُغْنِيَ عَنْهُمْ اَمْوَالُهُمْ وَلَآ اَوْلَادُهُمْ مِّنَ اللّٰهِ شَيْـًٔاۗ اُولٰۤىِٕكَ اَصْحٰبُ النَّارِۗ هُمْ فِيْهَا خٰلِدُوْنَ ","18":"يَوْمَ يَبْعَثُهُمُ اللّٰهُ جَمِيْعًا فَيَحْلِفُوْنَ لَهٗ كَمَا يَحْلِفُوْنَ لَكُمْ وَيَحْسَبُوْنَ اَنَّهُمْ عَلٰى شَيْءٍۗ اَلَآ اِنَّهُمْ هُمُ الْكٰذِبُوْنَ","19":"اِسْتَحْوَذَ عَلَيْهِمُ الشَّيْطٰنُ فَاَنْسٰىهُمْ ذِكْرَ اللّٰهِ ۗ اُولٰۤىِٕكَ حِزْبُ الشَّيْطٰنِۗ اَلَآ اِنَّ حِزْبَ الشَّيْطٰنِ هُمُ الْخٰسِرُوْنَ","20":"اِنَّ الَّذِيْنَ يُحَاۤدُّوْنَ اللّٰهَ وَرَسُوْلَهٗٓ اُولٰۤىِٕكَ فِى الْاَذَلِّيْنَ","21":"كَتَبَ اللّٰهُ لَاَغْلِبَنَّ اَنَا۠ وَرُسُلِيْۗ اِنَّ اللّٰهَ قَوِيٌّ عَزِيْزٌ ","22":"لَا تَجِدُ قَوْمًا يُّؤْمِنُوْنَ بِاللّٰهِ وَالْيَوْمِ الْاٰخِرِ يُوَاۤدُّوْنَ مَنْ حَاۤدَّ اللّٰهَ وَرَسُوْلَهٗ وَلَوْ كَانُوْٓا اٰبَاۤءَهُمْ اَوْ اَبْنَاۤءَهُمْ اَوْ اِخْوَانَهُمْ اَوْ عَشِيْرَتَهُمْۗ اُولٰۤىِٕكَ كَتَبَ فِيْ قُلُوْبِهِمُ الْاِيْمَانَ وَاَيَّدَهُمْ بِرُوْحٍ مِّنْهُ ۗوَيُدْخِلُهُمْ جَنّٰتٍ تَجْرِيْ مِنْ تَحْتِهَا الْاَنْهٰرُ خٰلِدِيْنَ فِيْهَاۗ رَضِيَ اللّٰهُ عَنْهُمْ وَرَضُوْا عَنْهُۗ اُولٰۤىِٕكَ حِزْبُ اللّٰهِ ۗ اَلَآ اِنَّ حِزْبَ اللّٰهِ هُمُ الْمُفْلِحُوْنَ ࣖ "},translations:{id:{name:"Gugatan",text:{"1":"Sungguh, Allah telah mendengar ucapan perempuan yang mengajukan gugatan kepadamu (Muhammad) tentang suaminya, dan mengadukan (halnya) kepada Allah, dan Allah mendengar percakapan antara kamu berdua. Sesungguhnya Allah Maha Mendengar, Maha Melihat.","2":"Orang-orang di antara kamu yang menzihar istrinya, (menganggap istrinya sebagai ibunya, padahal) istri mereka itu bukanlah ibunya. Ibu-ibu mereka hanyalah perempuan yang melahirkannya. Dan sesungguhnya mereka benar-benar telah mengucapkan suatu perkataan yang mungkar dan dusta. Dan sesungguhnya Allah Maha Pemaaf, Maha Pengampun. ","3":"Dan mereka yang menzihar istrinya, kemudian menarik kembali apa yang telah mereka ucapkan, maka (mereka diwajibkan) memerdekakan seorang budak sebelum kedua suami istri itu bercampur. Demikianlah yang diajarkan kepadamu, dan Allah Mahateliti terhadap apa yang kamu kerjakan. ","4":"Maka barangsiapa tidak dapat (memerdekakan hamba sahaya), maka (dia wajib) berpuasa dua bulan berturut-turut sebelum keduanya bercampur. Tetapi barangsiapa tidak mampu, maka (wajib) memberi makan enam puluh orang miskin. Demikianlah agar kamu beriman kepada Allah dan Rasul-Nya. Itulah hukum-hukum Allah, dan bagi orang-orang yang mengingkarinya akan mendapat azab yang sangat pedih. ","5":"Sesungguhnya orang-orang yang menentang Allah dan Rasul-Nya pasti mendapat kehinaan sebagaimana kehinaan yang telah didapat oleh orang-orang sebelum mereka. Dan sungguh, Kami telah menurunkan bukti-bukti yang nyata. Dan bagi orang-orang yang mengingkarinya akan mendapat azab yang menghinakan. ","6":"Pada hari itu mereka semuanya dibangkitkan Allah, lalu diberitakan-Nya kepada mereka apa yang telah mereka kerjakan. Allah menghitungnya (semua amal perbuatan itu), meskipun mereka telah melupakannya. Dan Allah Maha Menyaksikan segala sesuatu. ","7":"Tidakkah engkau perhatikan, bahwa Allah mengetahui apa yang ada di langit dan apa yang ada di bumi? Tidak ada pembicaraan rahasia antara tiga orang, melainkan Dialah yang keempatnya. Dan tidak ada lima orang, melainkan Dialah yang keenamnya. Dan tidak ada yang kurang dari itu atau lebih banyak, melainkan Dia pasti ada bersama mereka di mana pun mereka berada. Kemudian Dia akan memberitakan kepada mereka pada hari Kiamat apa yang telah mereka kerjakan. Sesungguhnya Allah Maha Mengetahui segala sesuatu. ","8":"Tidakkah engkau perhatikan orang-orang yang telah dilarang mengadakan pembicaraan rahasia, kemudian mereka kembali (mengerjakan) larangan itu dan mereka mengadakan pembicaraan rahasia untuk berbuat dosa, permusuhan dan durhaka kepada Rasul. Dan apabila mereka datang kepadamu (Muhammad), mereka mengucapkan salam dengan cara yang bukan seperti yang ditentukan Allah untukmu. Dan mereka mengatakan pada diri mereka sendiri, “Mengapa Allah tidak menyiksa kita atas apa yang kita katakan itu?” Cukuplah bagi mereka neraka Jahanam yang akan mereka masuki. Maka neraka itu seburuk-buruk tempat kembali. ","9":"Wahai orang-orang yang beriman! Apabila kamu mengadakan pembicaraan rahasia, janganlah kamu membicarakan perbuatan dosa, permusuhan dan durhaka kepada Rasul. Tetapi bicarakanlah tentang perbuatan kebajikan dan takwa. Dan bertakwalah kepada Allah yang kepada-Nya kamu akan dikumpulkan kembali. ","10":"Sesungguhnya pembicaraan rahasia itu termasuk (perbuatan) setan, agar orang-orang yang beriman itu bersedih hati, sedang (pembicaraan) itu tidaklah memberi bencana sedikit pun kepada mereka, kecuali dengan izin Allah. Dan kepada Allah hendaknya orang-orang yang beriman bertawakal. ","11":"Wahai orang-orang yang beriman! Apabila dikatakan kepadamu, “Berilah kelapangan di dalam majelis-majelis,” maka lapangkanlah, niscaya Allah akan memberi kelapangan untukmu. Dan apabila dikatakan, “Berdirilah kamu,” maka berdirilah, niscaya Allah akan mengangkat (derajat) orang-orang yang beriman di antaramu dan orang-orang yang diberi ilmu beberapa derajat. Dan Allah Mahateliti apa yang kamu kerjakan. ","12":"Wahai orang-orang yang beriman! Apabila kamu mengadakan pembicaraan khusus dengan Rasul, hendaklah kamu mengeluarkan sedekah (kepada orang miskin) sebelum (melakukan) pembicaraan itu. Yang demikian itu lebih baik bagimu dan lebih bersih. Tetapi jika kamu tidak memperoleh (yang akan disedekahkan) maka sungguh, Allah Maha Pengampun, Maha Penyayang.","13":"Apakah kamu takut akan (menjadi miskin) karena kamu memberikan sedekah sebelum (melakukan) pembicaraan dengan Rasul? Tetapi jika kamu tidak melakukannya dan Allah telah memberi ampun kepadamu, maka laksanakanlah salat, dan tunaikanlah zakat serta taatlah kepada Allah dan Rasul-Nya! Dan Allah Mahateliti terhadap apa yang kamu kerjakan.","14":"Tidakkah engkau perhatikan orang-orang (munafik) yang menjadikan suatu kaum yang telah dimurkai Allah sebagai sahabat? Orang-orang itu bukan dari (kaum) kamu dan bukan dari (kaum) mereka. Dan mereka bersumpah atas kebohongan, sedang mereka mengetahuinya. ","15":"Allah telah menyediakan azab yang sangat keras bagi mereka. Sungguh, betapa buruknya apa yang telah mereka kerjakan. ","16":"Mereka menjadikan sumpah-sumpah mereka sebagai perisai, lalu mereka menghalang-halangi (manusia) dari jalan Allah; maka bagi mereka azab yang menghinakan.","17":"Harta benda dan anak-anak mereka tidak berguna sedikit pun (untuk menolong) mereka dari azab Allah. Mereka itulah penghuni neraka, mereka kekal di dalamnya. ","18":"(Ingatlah) pada hari (ketika) mereka semua dibangkitkan Allah, lalu mereka bersumpah kepada-Nya (bahwa mereka bukan orang musyrik) sebagaimana mereka bersumpah kepadamu; dan mereka menyangka bahwa mereka akan memperoleh sesuatu (manfaat). Ketahuilah, bahwa mereka orang-orang pendusta. ","19":"Setan telah menguasai mereka, lalu menjadikan mereka lupa mengingat Allah; mereka itulah golongan setan. Ketahuilah, bahwa golongan setan itulah golongan yang rugi. ","20":"Sesungguhnya orang-orang yang menentang Allah dan Rasul-Nya, mereka termasuk orang-orang yang sangat hina. ","21":"Allah telah menetapkan, “Aku dan rasul-rasul-Ku pasti menang.” Sungguh, Allah Mahakuat, Mahaperkasa.","22":"Engkau (Muhammad) tidak akan mendapatkan suatu kaum yang beriman kepada Allah dan hari akhirat saling berkasih sayang dengan orang-orang yang menentang Allah dan Rasul-Nya, sekalipun orang-orang itu bapaknya, anaknya, saudaranya atau keluarganya. Mereka itulah orang-orang yang dalam hatinya telah ditanamkan Allah keimanan dan Allah telah menguatkan mereka dengan pertolongan yang datang dari Dia. Lalu dimasukkan-Nya mereka ke dalam surga yang mengalir di bawahnya sungai-sungai, mereka kekal di dalamnya. Allah rida terhadap mereka dan mereka pun merasa puas terhadap (limpahan rahmat)-Nya. Merekalah golongan Allah. Ingatlah, sesungguhnya golongan Allah itulah yang beruntung. "}}},tafsir:{id:{kemenag:{name:"Kemenag",source:"Aplikasi Quran Kementrian Agama Republik Indonesia",text:{"1":"Ayat ini menerangkan bahwa Allah telah menerima gugatan seorang perempuan yang diajukan kepada Rasulullah saw tentang tindakan suaminya. Ia merasa dirugikan oleh suaminya itu, karena dizihar yang berakibat hidupnya akan terkatung-katung. Allah telah mendengar pula tanya jawab yang terjadi antara istri yang menggugat dengan Rasulullah saw. Oleh karena itu, Allah menurunkan hukum yang dapat menghilangkan kekhawatiran istri itu.\n\nZihar adalah ucapan suami kepada istrinya, \"Anti 'alayya ka dhahri ummi (Engkau menurutku haram aku campuri, seperti aku haram mencampuri ibuku).\" Zihar termasuk hukum Arab Jahiliah yang kemudian dinyatakan berlaku di kalangan umat Islam dengan turunnya ayat ini. Akan tetapi, hukumnya telah berubah sedemikian rupa sehingga telah hilang unsur-unsur yang dapat merugikan pihak istri.\n\nMenurut hukum Arab Jahiliah, bila seorang suami menzihar istrinya maka sejak itu istrinya haram dicampurinya. Maka sejak itu pula istrinya hidup dalam keadaan terkatung-katung. Setelah zihar, perkawinannya dengan suaminya belum putus, tetapi ia tidak boleh dicampuri lagi oleh suaminya. Biasanya istri yang dizihar tidak lagi diberi nafkah oleh suaminya, dan untuk kawin dengan orang lain terhalang oleh masih adanya ikatan perkawinan dengan suaminya.\n\nZihar dilakukan suami kepada istri di zaman Arab Jahiliah biasanya karena suami tidak mencintai istrinya lagi atau karena marah kepada istrinya, tetapi ia bermaksud mengikat istrinya. Perbuatan yang demikian biasa di zaman Arab Jahiliah karena memandang rendah derajat perempuan. Sedangkan agama Islam menyamakan derajat perempuan dengan pria.","2":"Ayat ini mencela suami-suami yang telah menzihar istrinya dengan mengatakan bahwa orang-orang yang telah menzihar istrinya adalah perkataan yang tidak benar yang dikatakan oleh orang-orang yang tidak menggunakan akal sehatnya. Apakah mungkin istri itu sama dengan ibu? Istri adalah teman hidup yang dihubungkan oleh akad nikah, sedang ibu adalah orang yang melahirkannya sehingga ada hubungan darah.\n\nOleh karena itu, orang yang demikian adalah orang yang mengatakan perkataan yang tidak etis dan tidak dibenarkan oleh agama, akal, maupun adat kebiasaan. Perkataan itu adalah perkataan yang tidak etis, tidak mempunyai alasan sedikit pun. Sekalipun demikian, Allah akan mengampuni dosa orang yang telah menzihar istrinya, jika ia mengikuti ketentuan-ketentuan-Nya.\n\nAda suatu prinsip dalam agama Islam yang harus ditegakkan, yaitu \"mengakui kenyataan-kenyataan yang ada sesuai dengan sunatullah.\" Dalam menetapkan hukum-hukum yang berlaku di alam ini, Allah mengetahui hikmah dan akibatnya secara benar dan pasti. Oleh karena itu, sangat tercela orang-orang yang mau mengubah-ubah sunatullah itu, seperti memandang istri sebagai mahramnya, padahal Allah telah menetapkan orang-orang yang haram dinikahi oleh seorang pria (lihat Surah an-Nisa'\u002F4: 22-24, dan beberapa ayat lainnya). \n\nPada ayat 4 Surah al-Ahzab\u002F33, perkataan zihar digandengkan dengan perkataan anak angkat. Karena mengakui anak orang lain sebagai anak kandung sendiri sama hukumnya dengan anak sendiri, termasuk mengatakan sesuatu yang tidak sesuai dengan sunatullah, dan tidak sesuai dengan kebenaran. Kemudian Allah menegaskan bahwa anak angkat itu adalah anak ayah dan ibunya, bukan sekali-kali anak orang yang mengangkatnya. Allah berfirman:\n\nPanggillah mereka (anak angkat itu) dengan (memakai) nama bapak-bapak mereka; itulah yang adil di sisi Allah, dan jika kamu tidak mengetahui bapak mereka, maka (panggillah mereka sebagai) saudara-saudaramu seagama dan maula-maulamu. Dan tidak ada dosa atasmu jika kamu khilaf tentang itu, tetapi (yang ada dosanya) apa yang disengaja oleh hatimu. Allah Maha Pengampun, Maha Penyayang. (al-Ahzab\u002F33: 5)\n\nDari ayat ketiga surah ini dapat dipahami bahwa suami yang menzihar istrinya memperoleh hukuman ukhrawi dan hukuman duniawi. Hukuman ukhrawi ialah mereka berdosa karena mengatakan yang bukan-bukan, yaitu mengatakan bahwa istrinya haram dicampurinya seperti ia haram mencampuri ibunya. Dalam agama termasuk perbuatan terlarang apabila seseorang menghalalkan yang haram atau mengharamkan yang halal, karena yang menentukan halal dan haram itu hanyalah Allah saja. Hukuman duniawi ialah ia wajib membayar kafarat jika ia hendak mencampuri istrinya kembali, dan kafarat itu cukup besar jumlahnya, seperti yang akan diterangkan nanti.\n\nPara ulama sepakat bahwa menyamakan istri dengan ibu dengan maksud untuk menyatakan kasih sayang kepadanya atau untuk menyatakan penghormatan dan terima kasih kepadanya, tidaklah termasuk zihar. Karena zihar itu hanyalah ucapan suami yang menyatakan bahwa istrinya itu haram dicampurinya.\n\nPerkataan anti 'alaiyya ka dhahri ummi merupakan suatu ungkapan (idiom) yang mempunyai arti yang khusus dalam bahasa Arab. Hanyalah orang yang mendalam rasa bahasanya yang dapat merasakan arti ungkapan itu. Oleh karena itu, jika suami yang hanya mengerti bahasa Indonesia, mengucapkan sigat dhihar itu dengan ungkapan yang dipahami oleh orang Indonesia maka hukum di atas berlaku pula baginya.\n\nMenurut Hanifah, Auza'i, ats-tsauri dan salah satu qaul Imam Syafi'i boleh disebut dalam sigat dhihar perempuan selain ibu, asal saja perempuan yang disebut namanya itu termasuk muhrim laki-laki yang menzihar, seperti suami mengatakan, \"Engkau haram aku campuri, seperti aku haram mencampuri adik kandungku yang perempuan.\"\n\nJika seorang suami telah menzihar istrinya, tidak berarti telah terjadi perceraian antara kedua suami-istri itu. Masing-masing masih terikat oleh hak dan kewajiban sebagai suami dan istri. Mereka hanya terlarang melakukan persetubuhan. Demikian pula untuk menghindarkan diri dari perbuatan haram, maka haram pula kedua suami-istri itu berkhalwat (berduaan di tempat sunyi) sebelum suami membayar kafarat.\n\nAgar istri tidak terkatung-katung hidupnya dan menderita karena zihar itu, sebaiknya ditetapkan waktu menunggu bagi istri. Waktu menunggu itu dapat dikiaskan kepada waktu menunggu dalam ila'), yaitu empat bulan. Apabila telah lewat waktu empat bulan sejak suami mengucapkan ziharnya, sedang suami belum lagi menetapkan keputusan, bercerai atau melanjutkan perkawinan dengan membayar kafarat, maka istri berhak mengajukan gugatan kepada pengadilan. Hakim tentu akan mengabulkan gugatan istri bila gugatan itu terbukti.\n\nJika zihar berakibat perceraian, maka jatuhlah talak ba'in kubra, dimana perkawinan kembali antara bekas suami-istri itu haruslah dengan syarat membayar kafarat.","3":d,"4":d,"5":"Ayat ini memperingatkan manusia yang menentang Allah dan rasul-Nya, dengan memilih hukum yang berlaku pada dirinya, bukan hukum yang telah ditetapkan Allah dan rasul-Nya, dan memeluk agama yang bukan agama yang disyariatkan-Nya. Mereka akan ditimpa azab berupa kehinaan selama hidup di dunia, sebagaimana telah ditimpakan kepada orang-orang dahulu yang mengingkari para rasul yang diutus Allah kepada mereka.\n\nAyat ini merupakan kabar gembira dan menambah semangat kaum Muslimin yang sedang mengalami tekanan dari orang-orang yang bersekutu dalam Perang Ahzab. Pada waktu itu, orang-orang Yahudi, orang-orang musyrik Mekah, dan orang-orang munafik bersatu dan bersekutu menghadapi kaum Muslimin, sehingga jumlah mereka jauh lebih besar dibandingkan dengan jumlah kaum Muslimin. Karena semangat kaum Muslimin yang tinggi dan keyakinan mereka akan pertolongan Allah yang akan diberikan kepada mereka, maka mereka dapat mengalahkan tentara yang bersekutu itu.\n\nAyat ini merupakan peringatan kepada para pemimpin bahwa mereka akan dimintai pertanggungjawaban oleh Allah di akhirat, apakah mereka telah menjalankan hukum-hukum Allah dalam pemerintahan mereka. Sebab, Allah telah menegaskan bahwa hukum dan agama yang boleh dianut manusia hanyalah agama Islam. Selain dari itu, manusia dilarang mengikuti dan menganutnya. Allah berfirman:\n\nPada hari ini telah Aku sempurnakan agamamu untukmu, dan telah Aku cukupkan nikmat-Ku bagimu, dan telah Aku ridai Islam sebagai agamamu. Tetapi barang siapa terpaksa karena lapar, bukan karena ingin berbuat dosa, maka sungguh, Allah Maha Pengampun, Maha Penyayang. (Al-Ma'idah\u002F5: 3)\n\nAgama Islam yang dimaksud ialah agama yang didakwahkan Nabi Muhammad yang diterima dari Allah.\n\nSementara itu mengenai hal-hal yang telah ditentukan, para penguasa atau orang-orang yang mewakili rakyatnya dibolehkan menetapkan hukum-hukum lain yang mengatur kehidupan masyarakatnya, selama hukum itu tidak bertentangan dengan hukum yang telah ditetapkan Allah.\n\nDiterangkan bahwa Allah telah menurunkan ayat-ayat-Nya kepada Nabi Muhammad, yang mengemukakan dalil-dalil dan bukti-bukti yang kuat akan kebenaran agama beserta hukum-hukum-Nya. Tidak seorang pun yang dapat mematahkan dalil-dalil dan bukti-bukti, sekalipun mereka masih tetap ingkar dan melanggar hukum-hukum itu.\n\nDari ayat-ayat ini dapat dipahami bahwa Allah memerintahkan kepada manusia terutama kepada cerdik-pandai agar mempelajari dan membahas hukum-hukum Allah, menggunakan akal, pikiran, dan pengalaman mereka, bahkan dengan seluruh kemampuan yang ada pada mereka. Kemudian memberikan penilaian yang tepat dan objektif.\n\nDalam ayat ke-4 yang lalu dikatakan, \"Wa lil-kafirina 'adhabun alim\" (dan bagi orang-orang kafir azab yang pedih), sedangkan pada ayat kelima ini dikatakan, \"Wa lil kafirina 'adhabun muhin\" (dan bagi orang-orang kafir azab yang menghinakan). Yang dimaksud dengan orang-orang kafir pada ayat ke-4 ialah orang-orang mukmin yang melanggar ketentuan-ketentuan. Mereka memperoleh azab yang pedih sebagai pelajaran bagi mereka agar segera bertobat dan menyadari kesalahan mereka. Sedangkan yang dimaksud dengan orang kafir pada ayat kelima ini ialah orang yang benar-benar kafir, tidak beriman. Bagi mereka azab yang menimbulkan kehinaan selama kehidupan dunia, seperti hilangnya rasa malu pada diri mereka, merasa biasa melakukan perbuatan terlarang, merasa biasa berbuat curang dan melakukan perbuatan keji. Orang yang seperti itu biasanya adalah orang yang berkuasa yang dapat melakukan semua yang dikehendakinya, tetapi orang lain tidak lagi mempunyai penghargaan dalam arti yang sebenarnya pada mereka. Banyak lagi bentuk penghinaan yang lebih berat yang mereka terima.","6":"Dalam ayat ini diterangkan keadaan orang-orang yang menentang dan melanggar hukum Allah di akhirat nanti. Allah mengumpulkan mereka semua sejak manusia pertama yaitu Adam, sampai saat terakhir kehidupan manusia, pada hari Kiamat. Kemudian Allah memberitahukan kepada mereka yang telah mereka kerjakan selama hidup di dunia. Semuanya itu tercatat dalam kitab catatan mereka masing-masing, tidak ada satu pun yang dilupakan, walaupun mereka sendiri telah melupakannya karena tidak sesuatu pun yang luput dari pengetahuan Allah.","7":"Ayat ini menerangkan bagaimana luas, dalam, dan lengkapnya pengetahuan Allah tentang makhluk yang diciptakan-Nya, sejak dari yang kecil sampai kepada yang sebesar-besarnya. Diterangkan bahwa ilmu Allah mencakup segala yang ada di langit dan di bumi, betapa pun kecil dan halusnya. Jika ada tiga orang di langit dan di bumi berbisik-bisik, maka Allah yang keempatnya. Jika yang berbisik dan mengadakan perundingan rahasia itu empat orang, maka Allah yang kelimanya, dan jika yang berbisik dan mengadakan perundingan rahasia itu lima orang maka Allah yang keenamnya. Bahkan berapa orang saja berbisik dan mengadakan perundingan rahasia dan di mana saja mereka melakukannya, pasti Allah mengetahuinya.\n\nPenyebutan bilangan tiga, empat, dan lima orang dalam ayat hanyalah untuk menyatakan bahwa biasanya perundingan itu dilakukan oleh beberapa orang seperti tiga, empat, lima, dan seterusnya, dan tiap-tiap perundingan itu pasti Allah menyaksikannya. Allah berfirman:\n\nTidakkah mereka mengetahui bahwa Allah mengetahui rahasia dan bisikan mereka, dan bahwa Allah mengetahui segala yang gaib? (at-Taubah\u002F9: 78)\n\nDan berfirman:\n\nAtaukah mereka mengira, bahwa Kami tidak mendengar rahasia dan bisikan-bisikan mereka? Sebenarnya (Kami mendengar), dan utusan-utusan Kami (malaikat) selalu mencatat di sisi mereka. (az-Zukhruf\u002F43: 80)\n\nPada akhir ayat ini, Allah menegaskan bahwa kebenaran tentang Allah Maha Mengetahui segala sesuatu itu, barulah mereka ketahui di hari Kiamat nanti, yaitu ketika dikemukakan catatan amal mereka yang di dalamnya tercatat seluruh perbuatan yang pernah mereka kerjakan selama hidup di dunia, yaitu berupa perbuatan baik maupun perbuatan buruk, tidak ada satu pun yang dilupakan untuk dicatat. Pada saat itu, orang-orang kafir barulah menyesali perbuatan mereka, tetapi penyesalan di kemudian hari itu tidak ada gunanya sedikit pun.","8":"Ayat ini mencela perbuatan yang dilakukan orang Yahudi yang melakukan tindakan yang memancing perselisihan dan permusuhan antara mereka dan kaum Muslimin, padahal telah diadakan perjanjian damai antara mereka dan kaum Muslimin. Rasulullah saw memperingatkan sikap mereka itu, tetapi mereka tidak mengindahkannya.\n\nPembicaraan mereka dengan berbisik-bisik itu sebenarnya dapat memperbesar dosa mereka kepada Allah. Dosa itu karena mereka telah melanggar perjanjian damai yang mereka adakan dengan Rasulullah, bahwa mereka dengan kaum Muslimin akan memelihara ketenteraman dan berusaha menciptakan suasana damai di kota Medinah. Mereka bersalah karena setiap saat mencari-cari kesempatan untuk menghancurkan kaum Muslimin dan menggagalkan dakwah Nabi Muhammad.\n\nOrang-orang Yahudi itu jika mereka bertemu atau datang kepada Rasulullah saw mereka mengucapkan salam, tetapi isinya menghina Rasulullah saw. 'Aisyah menjawab dengan jawaban yang lebih kasar, karena sikap dan tindakan orang-orang Yahudi itu melampaui batas, baik ditinjau dari segi rasa kesopanan dalam pergaulan maupun ditinjau dari segi adat kebiasaan yang berlaku waktu itu.\n\nDitinjau dari segi agama Islam, maka tindakan orang-orang Yahudi itu benar-benar telah melampaui batas, karena Muhammad saw adalah seorang nabi dan rasul Allah, di mana setiap kaum Muslimin mendoakan keselamatan dan kebaikan untuknya. Allah swt berfirman:\n\nSesungguhnya Allah dan para malaikat-Nya bersalawat untuk Nabi. Wahai orang-orang yang beriman! Bersalawatlah kamu untuk Nabi dan ucapkanlah salam dengan penuh penghormatan kepadanya. (al-Ahzab\u002F33: 56)\n\nDari ayat di atas dan sebab-sebab turunnya dapat diambil pengertian bahwa hendaklah kita berlaku sabar terhadap ucapan-ucapan keji yang dilontarkan kepada kita. Jangan langsung membalas seperti yang mereka lakukan, karena di sanalah letak perbedaan antara orang Muslim dan orang kafir. Dengan bersabar mereka akan sadar dan insaf bahwa mereka telah melakukan kesalahan.\n\nSetelah orang-orang Yahudi itu mengucapkan salam penghinaan kepada Rasulullah sebagaimana tersebut di atas, mereka berkata kepada sesamanya, \"Kenapa Allah tidak menimpakan azab kepada kita sebagai akibat jawaban Muhammad. Seandainya Muhammad benar-benar seorang nabi dan rasul yang diutus Allah, tentulah kita telah ditimpa azab.\" Sangkaan mereka yang demikian terhadap Allah, yaitu Allah akan langsung mengazab setiap orang yang durhaka kepada-Nya, adalah sangkaan yang salah. Benar Dia akan mengazab setiap orang yang durhaka kepada-Nya, tetapi kapan datangnya azab itu, adalah urusan-Nya. Dia akan menimpakan azab itu bila dikehendaki-Nya. Tetapi jika azab itu telah datang, maka tidak seorang pun yang dapat menghindarkan diri daripadanya.\n\nDalam hal menjawab salam terhadap non muslim, para ulama berbeda pendapat. Ibnu 'Abbas, asy-Sya'bi, dan Qatadah menyatakan bahwa menjawab salam terhadap non muslim hukumnya wajib, sama halnya dengan menjawab salam terhadap sesama muslim. Sedangkan Imam Malik dan Syafi'i menyatakan bahwa hal tersebut tidak wajib, dalam arti hanya boleh saja. Bila mereka mengucapkan salam, maka bagi kita cukup menjawabnya dengan \"'alaika.\" \n\nPada akhir ayat ini, Allah membantah anggapan mereka dengan tegas bahwa mereka pasti akan dimasukkan ke dalam neraka Jahanam. Mereka akan terbakar hangus di dalamnya. Jahanam itu adalah seburuk-buruknya tempat kembali yang disediakan bagi orang-orang kafir.","9":"Kemudian Allah menghadapkan perintahnya kepada orang-orang yang beriman agar jangan sekali-kali mengadakan perundingan rahasia di antara mereka dengan tujuan berbuat dosa, mengadakan permusuhan, dan mendurhakai Allah dan rasul.\n\nJika mereka mengadakan perundingan rahasia juga, hal itu diperbolehkan, tetapi yang dibicarakan di dalam perundingan itu hanyalah kebajikan, membahas cara-cara yang baik, mengerjakan perbuatan-perbuatan takwa, dan menghindarkan diri dari perbuatan mungkar. Perlu diketahui bahwa Allah mengetahui segala sesuatu, tidak ada sesuatu pun yang luput dari pengetahuan-Nya. Oleh karena itu, betapa pun rahasianya perundingan yang dilakukan, pasti diketahui-Nya.\n\nDan barang siapa mendurhakai Allah dan Rasul-Nya dan melanggar batas-batas hukum-Nya, niscaya Allah memasukkannya ke dalam api neraka, dia kekal di dalamnya dan dia akan mendapat azab yang menghinakan. (an-Nisa'\u002F4: 14)\n\nDalam satu hadis diterangkan sebagai berikut:\n\nApabila kamu bertiga, maka janganlah dua orang di antara kamu itu berbisik-bisik tanpa mengajak yang ketiga sehingga kamu bergabung dengan orang lain, karena sikap itu menyedihkan perasaannya. (Riwayat al-Bukhari dan Muslim)","10":"Dalam ayat ini diterangkan bahwa berbisik-bisik dan mengadakan perundingan rahasia untuk menimbulkan permusuhan dan pertentangan itu adalah usaha dan perbuatan setan. Ia mendorong manusia melakukannya, agar mereka mendurhakai Allah dan Rasul-Nya. Itulah tujuan hidup setan. Ia mempengaruhi manusia sejak dari nenek moyang mereka, yaitu Nabi Adam. Semakin banyak manusia yang dapat digodanya, semakin banyak temannya di neraka.\n\nDiterangkan pula bahwa usaha setan adalah untuk menimbulkan kesedihan dalam hati orang-orang yang beriman. Bisik-bisik dan perundingan rahasia yang dilakukan orang-orang Yahudi dan orang-orang munafik, menimbulkan rasa tidak aman dalam hati orang-orang yang beriman. Sebenarnya kecelakaan manusia yang diusahakan oleh setan tidak akan terwujud dan terlaksana, tanpa izin dari Allah yang Mahakuasa lagi Maha Menentukan segala sesuatu.\n\nPada akhir ayat ini, Allah menegaskan bahwa kaum Muslimin tidak boleh terpancing dan merasa tidak aman karena bisik-bisik dan perjanjian rahasia yang diadakan orang-orang kafir. Semuanya tidak akan terlaksana, kecuali jika Allah mengizinkannya. Oleh karena itu, setiap Muslim mesti bertawakal kepada Allah dan tidak percaya kepada siapa pun, kecuali kepada-Nya.","11":"Ayat ini memberikan penjelasan bahwa jika di antara kaum Muslimin ada yang diperintahkan Rasulullah saw berdiri untuk memberikan kesempatan kepada orang tertentu untuk duduk, atau mereka diperintahkan pergi dahulu, hendaklah mereka berdiri atau pergi, karena beliau ingin memberikan penghormatan kepada orang-orang itu, ingin menyendiri untuk memikirkan urusan-urusan agama, atau melaksanakan tugas-tugas yang perlu diselesaikan dengan segera.\n\nDari ayat ini dapat dipahami hal-hal sebagai berikut:\n\n1.Para sahabat berlomba-lomba mencari tempat dekat Rasulullah saw agar mudah mendengar perkataan yang beliau sampaikan kepada mereka.\n\n2.Perintah memberikan tempat kepada orang yang baru datang merupakan anjuran, jika memungkinkan dilakukan, untuk menimbulkan rasa persahabatan antara sesama yang hadir.\n\n3.Sesungguhnya tiap-tiap orang yang memberikan kelapangan kepada hamba Allah dalam melakukan perbuatan-perbuatan baik, maka Allah akan memberi kelapangan pula kepadanya di dunia dan di akhirat.\n\nMemberi kelapangan kepada sesama Muslim dalam pergaulan dan usaha mencari kebajikan dan kebaikan, berusaha menyenangkan hati saudara-saudaranya, memberi pertolongan, dan sebagainya termasuk yang dianjurkan Rasulullah saw. Beliau bersabda:\n\nAllah selalu menolong hamba selama hamba itu menolong saudaranya. (Riwayat Muslim dari Abu Hurairah)\n\nBerdasarkan ayat ini para ulama berpendapat bahwa orang-orang yang hadir dalam suatu majelis hendaklah mematuhi ketentuan-ketentuan yang berlaku dalam majelis itu atau mematuhi perintah orang-orang yang mengatur majelis itu.\n\nJika dipelajari maksud ayat di atas, ada suatu ketetapan yang ditentukan ayat ini, yaitu agar orang-orang menghadiri suatu majelis baik yang datang pada waktunya atau yang terlambat, selalu menjaga suasana yang baik, penuh persaudaraan dan saling bertenggang rasa. Bagi yang lebih dahulu datang, hendaklah memenuhi tempat di muka, sehingga orang yang datang kemudian tidak perlu melangkahi atau mengganggu orang yang telah lebih dahulu hadir. Bagi orang yang terlambat datang, hendaklah rela dengan keadaan yang ditemuinya, seperti tidak mendapat tempat duduk. Inilah yang dimaksud dengan sabda Nabi saw:\n\nJanganlah seseorang menyuruh temannya berdiri dari tempat duduknya, lalu ia duduk di tempat tersebut, tetapi hendaklah mereka bergeser dan berlapang-lapang.\" (Riwayat Muslim dari Ibnu 'Umar)\n\nAkhir ayat ini menerangkan bahwa Allah akan mengangkat derajat orang yang beriman, taat dan patuh kepada-Nya, melaksanakan perintah-Nya, menjauhi larangan-Nya, berusaha menciptakan suasana damai, aman, dan tenteram dalam masyarakat, demikian pula orang-orang berilmu yang menggunakan ilmunya untuk menegakkan kalimat Allah. Dari ayat ini dipahami bahwa orang-orang yang mempunyai derajat yang paling tinggi di sisi Allah ialah orang yang beriman dan berilmu. Ilmunya itu diamalkan sesuai dengan yang diperintahkan Allah dan rasul-Nya.\n\nKemudian Allah menegaskan bahwa Dia Maha Mengetahui semua yang dilakukan manusia, tidak ada yang tersembunyi bagi-Nya. Dia akan memberi balasan yang adil sesuai dengan perbuatan yang telah dilakukannya. Perbuatan baik akan dibalas dengan surga dan perbuatan jahat dan terlarang akan dibalas dengan azab neraka.","12":"Menurut riwayat Ibnu Abi hatim dari Ibnu 'Abbas, diterangkan bahwa para sahabat banyak yang ingin bertanya kepada Rasulullah saw, sehingga membebaninya. Untuk meringankan bebannya, Allah menurunkan ayat ini, dengan memerintahkan bersedekah sebelum menghadap Rasulullah.\n\nAyat ini memerintahkan kepada orang-orang yang beriman apabila mereka ingin berbicara secara rahasia dengan Rasulullah saw tentang sesuatu hal yang penting, hendaklah bersedekah sebelum melakukan pembicaraan itu. Perintah itu untuk membuktikan kebesaran Rasulullah dengan mengagungkannya, dan mendatangkan manfaat kepada fakir-miskin. Hal ini juga untuk membedakan antara orang yang benar-benar cinta kepada Rasulullah dan mengharapkan pelajaran darinya, dengan orang munafik yang berbeda perkataan dan perbuatannya. Di sisi lain, perintah ini mencegah orang yang datang beramai-ramai kepada Rasulullah tanpa keperluan yang sangat penting sehingga menyibukkan beliau.\n\nMenurut Abu Muslim, Allah memerintahkan demikian karena orang-orang munafik yang mulutnya menyatakan iman, sedang hatinya tetap kafir. Menyatakan bahwa mereka masuk Islam dengan sebenar-benarnya. Untuk menguji pernyataan itu, maka turun perintah untuk bersedekah lebih dahulu sebelum menghadap Rasulullah.\n\nFaedah memberi sedekah ialah mendapat pahala yang berlipat-ganda dari Allah, membersihkan dan menyucikan harta yang dimiliki, serta membersihkan jiwa dari keinginan mengumpulkan harta dan menjadikannya sebagai tujuan hidup. Suka bersedekah dapat mengurangi kesengsaraan orang-orang fakir dan dapat pula meninggikan kalimat Allah. Harta yang disedekahkan itu langsung diberikan kepada orang-orang yang berhak menerimanya, tidak diberikan kepada Nabi saw, karena di antara tujuan sedekah itu ialah mengagungkan Rasulullah saw dan meringankan beban hidup fakir-miskin.\n\nPada akhir ayat ini diterangkan bahwa jika orang yang akan menghadap Rasulullah saw itu tidak mempunyai sesuatu yang akan disedekahkan, sedangkan ia memerlukan sekali bertemu dengan beliau, maka Allah memberikan keringanan kepadanya dengan tidak mengharuskannya bersedekah.\n\nSedekah yang dimaksud di sini adalah sedekah sunah, bukan sedekah wajib, dan jumlahnya pun tidak ditentukan, hanya menurut keikhlasan dan kesanggupan yang memberi. Yang ditekankan ayat ini ialah agar kaum Muslimin suka bersedekah, tidak kikir, dan sadar bahwa harta yang mereka peroleh itu semata-mata sebagai alat untuk mencari keridaan Allah. Keharusan memberi sedekah dalam ayat ini untuk menguji kemauan orang-orang munafik yang baru masuk Islam.","13":"Menurut riwayat Ibnu Abi hatim dari thalhah dari Ibnu 'Abbas dikatakan bahwa setelah turun ayat ke 12 di atas, maka kebanyakan orang menahan dirinya bertanya kepada Rasulullah karena keharusan membayar sedekah. Oleh karena itu, turunlah ayat ini sebagai teguran kepada orang-orang yang tidak mau bertanya kepada Rasulullah saw karena adanya keharusan membayar sedekah.\n\nAyat ini menegur orang-orang yang menahan dirinya untuk tidak menemui Rasulullah karena adanya keharusan membayar sedekah lebih dahulu. Dalam ayat ini dinyatakan, \"Apakah kamu tidak datang menghadap Rasulullah saw karena takut miskin lantaran keharusan membayar sedekah lebih dahulu, padahal kamu sangat memerlukan penjelasan dan keterangannya?\"\n\nAllah lalu memberikan keringanan kepada orang-orang itu dengan me-nasakh ayat 12 dengan ayat 13, terutama dengan menyatakan, \"Seandainya kamu sekalian benar-benar tidak sanggup melaksanakan anjuran untuk bersedekah sebelum menghadap Rasulullah saw, maka kamu sekalian boleh menghadap untuk menanyakan sesuatu yang diperlukan penjelasannya, tanpa memberi sedekah lebih dahulu. Laksanakanlah apa yang telah diterangkan ini dengan sebaik-baiknya.\"\n\nKemudian Allah mengingatkan kewajiban lainnya bagi kaum Muslimin yang harus dilaksanakan, yaitu agar mereka mendirikan salat terus-menerus menurut waktu yang telah ditentukan, jangan sekali-kali meninggalkannya walau dalam keadaan bagaimanapun. Salat sangat besar faedahnya bagi manusia, yaitu untuk menyempurnakan penghambaan diri kepada Allah, dan memurnikan ketaatan dan ketundukan hanya kepada-Nya, tidak kepada yang lain. Salat itu dapat menghilangkan dan mengikis keinginan-keinginan untuk mengerjakan perbuatan keji dan mungkar. \n\nKaum Muslimin juga diperintahkan untuk mengeluarkan zakat jika telah memenuhi syarat-syaratnya. Zakat itu bertujuan untuk menyucikan jiwa, menghilangkan sifat-sifat kikir yang ada dalam hati, dan membantu penderitaan orang miskin. Kemudian ditegaskan agar kaum Muslimin menaati perintah-perintah Allah dan rasul-Nya dan menghentikan segala yang dilarang-Nya.\n\nPada akhir ayat ini, Allah memperingatkan manusia agar selalu berhati-hati terhadap semua perbuatan dan keinginan hatinya. Sebab, Allah mengetahui semuanya, tidak ada yang luput dari pengetahuan-Nya. Berdasarkan pengetahuan-Nya itu, Dia memberi balasan yang setimpal kepada setiap manusia. Allah berfirman:\n\nMaka barang siapa mengerjakan kebaikan seberat zarah, niscaya dia akan melihat (balasan)nya, dan barang siapa mengerjakan kejahatan seberat zarah, niscaya dia akan melihat (balasan)nya. (az-Zalzalah\u002F99: 7-8)\n\nDan Firman Allah:\n\n(Yaitu) bahwa seseorang yang berdosa tidak akan memikul dosa orang lain, dan bahwa manusia hanya memperoleh apa yang telah diusahakannya, dan sesungguhnya usahanya itu kelak akan diperlihatkan (kepadanya), kemudian akan diberi balasan kepadanya dengan balasan yang paling sempurna. (an-Najm\u002F53: 38-41)","14":"Allah memerintahkan kaum Muslimin agar memperhatikan dengan seksama orang-orang munafik yang menjadikan orang-orang Yahudi sebagai teman setia mereka, dan mereka menyampaikan kepada orang-orang Yahudi rahasia-rahasia yang sering mereka dengarkan dari Nabi saw dan kaum Muslimin. Bila bertemu dengan orang-orang yang beriman, mereka menyatakan keimanan mereka, serta berjanji akan ikut berdakwah dan berjuang menegakkan kalimat Allah. Akan tetapi, bila mereka bertemu dengan orang-orang Yahudi, mereka menggambarkan kejelekan kaum Muslimin dan berjanji bersama-sama akan menghancurkan Islam dan kaum Muslimin. Firman Allah:\n\nDan di antara manusia ada yang berkata, \"Kami beriman kepada Allah dan hari akhir,\" padahal sesungguhnya mereka itu bukanlah orang-orang yang beriman. Mereka menipu Allah dan orang-orang yang beriman, padahal mereka hanyalah menipu diri sendiri tanpa mereka sadari. Dalam hati mereka ada penyakit, lalu Allah menambah penyakitnya itu; dan mereka mendapat azab yang pedih, karena mereka berdusta. (al-Baqarah\u002F2: 8-10)\n\nMenurut riwayat Ahmad dan al-hakim yang diterima dari as-Suddi dari Ibnu 'Abbas, bahwa ayat ini diturunkan berhubungan dengan 'Abdullah bin Nabtal, seorang munafik yang sering menyampaikan rahasia-rahasia kaum Muslimin kepada orang-orang Yahudi. Pada suatu hari, Rasulullah sedang duduk di rumahnya, kemudian beliau menyampaikan kepada para sahabat yang duduk di sekitar beliau, \"Akan datang ke tempatmu ini seorang yang pandangannya seperti pandangan setan. Jika ia datang nanti, janganlah kalian berbicara dengannya.\" Tidak berapa lama kemudian, datanglah seseorang, yaitu 'Abdullah bin Nabtal, dan Rasulullah berkata kepadanya, \"Mengapa kamu beserta teman-teman kamu itu mencaci-makiku dan sahabat-sahabatku?\" Orang itu menjawab, \"Akan aku panggil sahabat-sahabatku untuk membuktikan ketidakbenaran tuduhan itu.\" Setelah ia dan teman-temannya sampai di hadapan Rasulullah saw, mereka bersumpah dengan menyebut nama Allah, bahwa mereka semua tidak pernah melakukan seperti apa yang dituduhkan itu. \n\nAllah menegaskan bahwa orang-orang munafik bukanlah orang mukmin yang benar, sebagaimana pengakuan mereka. Mereka mengaku beriman semata-mata untuk mengambil hati orang-orang yang beriman saja, dan menjaga hubungan baik dengan mereka. Orang-orang munafik itu juga tidak termasuk golongan Yahudi yang benar. Mereka mengaku Yahudi semata-mata untuk mengambil hati orang-orang Yahudi, sehingga memperoleh perlindungan dari mereka. Dengan cara bermuka dua itu, mereka menduga akan dapat menghindarkan diri dari peperangan yang terjadi antara kaum Muslimin dan orang-orang kafir, termasuk di dalamnya orang Yahudi. Allah berfirman:\n\nMereka dalam keadaan ragu antara yang demikian (iman atau kafir), tidak termasuk kepada golongan ini (orang beriman) dan tidak (pula) kepada golongan itu (orang kafir). Barang siapa dibiarkan sesat oleh Allah, maka kamu tidak akan mendapatkan jalan (untuk memberi petunjuk) baginya. (an-Nisa'\u002F4: 143)\n\nDiterangkan bahwa orang-orang munafik itu tidak segan-segan bersumpah dengan menyebut nama Allah untuk meyakinkan orang-orang yang beriman dan menyatakan bahwa mereka benar-benar beriman kepada Allah dan Rasul-Nya. Demikian pula bila mereka bertemu dengan orang-orang Yahudi, mereka bersumpah pula bahwa mereka adalah teman setia dan berjanji akan saling membantu dalam menghadapi orang-orang Islam. Orang-orang munafik itu mengetahui benar bahwa perbuatan mereka itu adalah tidak baik dan terlarang","15":"Pada ayat ini diterangkan bahwa karena kemunafikan itu, Allah menyediakan bagi mereka azab yang sangat berat. Dari ayat ini dapat dipahami bahwa kemunafikan itu termasuk perbuatan buruk, membahayakan masyarakat, dan dosa besar. Orang-orang munafik itu menipu dan membeberkan rahasia-rahasia kaum Muslimin kepada musuh-musuh mereka, yaitu orang-orang Yahudi dan orang-orang musyrik Mekah. Tindakan itu dapat mengakibatkan kehancuran agama Islam dan kaum Muslimin. Allah menyediakan bagi mereka di akhirat nanti azab neraka sebagai hukuman atas perbuatan mereka di dunia.","16":"Dalam ayat ini diterangkan tujuan mereka melakukan kemunafikan itu. Dengan berdusta yang dikuatkan dengan sumpah, banyak kaum Muslimin yang mempercayai mereka. Karena disangka orang yang benar-benar beriman, sehingga terhindar dari pembalasan atau pengusiran oleh kaum Muslimin.\n\nDengan tindakan itu, mereka mendapat keuntungan dari kaum Muslimin, yang mempercayai perkataan mereka, sehingga membela mereka. Dengan jalan demikian, mereka dapat menghalang-halangi orang lain memeluk agama Islam dengan cara menjelek-jelekkan Islam dan kaum Muslimin. Bahkan mereka dapat menimbulkan ketakutan dan keengganan pada hati kaum Muslimin untuk ikut berperang bersama Rasulullah. Dalam salah satu firman-Nya, Allah menjelaskan sikap dari orang-orang munafik:\n\nOrang-orang yang ditinggalkan (tidak ikut berperang), merasa gembira dengan duduk-duduk diam sepeninggal Rasulullah. Mereka tidak suka berjihad dengan harta dan jiwa mereka di jalan Allah dan mereka berkata, \"Janganlah kamu berangkat (pergi berperang) dalam panas terik ini.\" Katakanlah (Muhammad), \"Api neraka Jahanam lebih panas,\" jika mereka mengetahui. (at-Taubah\u002F9: 81)\n\nKarena dosa besar yang telah mereka lakukan, maka sudah sepantasnya orang-orang munafik menerima siksa yang menghinakan di dunia dan di akhirat, sebagai balasan perbuatan mereka itu.","17":"Dalam ayat ini ditegaskan bahwa harta dan anak-anak orang munafik tidak dapat membantu menyelamatkan dan menghindarkan diri mereka dari azab Allah. Ayat ini menggambarkan bahwa watak dan sifat orang-orang munafik adalah merasa bangga mempunyai anak-anak dan harta yang banyak, seakan-akan apa yang mereka miliki itu dapat membela dan melepaskan mereka dari malapetaka yang mengancam mereka. Allah berfirman:\n\nDan mereka berkata, \"Kami memiliki lebih banyak harta dan anak-anak (daripada kamu) dan kami tidak akan diazab.\" (Saba'\u002F34: 35)\n\nKarena mendapat nikmat yang besar di dunia, maka orang-orang munafik itu merasa bahwa mereka adalah orang yang dikasihi Allah dan tidak akan diazab di akhirat. Menurut mereka, gambaran kehidupan akhirat bagi seseorang adalah kehidupan dunianya. Jika seseorang berbahagia dalam kehidupan dunia, tentu mereka berbahagia pula dalam kehidupan akhirat. Sebaliknya jika mereka sengsara dalam kehidupan dunia, tentu akan sengsara pula dalam kehidupan akhirat. Dugaan mereka itu keliru, karena tujuan hidup yang utama ialah mencari keridaan Allah. Selama seorang mencari keridaan Allah dalam kehidupannya, selama itu pula ia dilindungi-Nya, baik ia terlihat hidup berkecukupan atau tidak.\n\nPada akhir ayat ini ditegaskan bahwa orang-orang yang menyatakan harta dan anak-anak mereka dapat digunakan untuk menghindarkan diri dari azab Allah akan menjadi penghuni neraka di akhirat. Mereka kelak hidup di dalamnya dengan penuh penderitaan.","18":"Orang-orang yang menyatakan bahwa harta dan anak-anak mereka dapat dipergunakan untuk menghindarkan diri dari azab Allah di akhirat, mereka juga berdusta di hadapan Allah ketika hari perhitungan nanti. Mereka bersumpah bahwa mereka benar-benar termasuk orang-orang beriman, sebagaimana mereka telah bersumpah sewaktu mereka hidup di dunia, seakan-akan mereka dapat mengelabui Allah dengan pengakuan tersebut. Mereka mengira bahwa dengan berdusta seperti itu, mereka akan dapat menghindarkan diri dari azab yang akan ditimpakan kepada mereka.\n\nAyat ini mengisyaratkan bahwa watak dan sifat seorang manusia selama hidup di dunia akan diperlihatkan Allah di akhirat. Jika watak, sifat, dan tabiat mereka baik selama hidup di dunia, maka hal itu akan tampak baik di akhirat. Sebaliknya jika watak, sifat, dan tabiat mereka jelek selama hidup di dunia, hal itu akan tampak jelek di akhirat. Di dunia mereka masih dapat mengelabui mata manusia, sedangkan di akhirat, mereka langsung berhadapan dengan Allah yang Maha Mengetahui lagi Mahakuasa.\n\nDalam ayat-ayat yang lain, Allah menerangkan sikap orang-orang munafik di akhirat, yaitu:\n\nDan apabila dikatakan kepada mereka, \"Janganlah berbuat kerusakan di bumi!\" Mereka menjawab, \"Sesungguhnya kami justru orang-orang yang melakukan perbaikan.\" Ingatlah, sesungguhnya merekalah yang berbuat kerusakan, tetapi mereka tidak menyadari. (al-Baqarah\u002F2: 11-12)","19":"Allah menerangkan sebab-sebab orang-orang munafik di atas dimasukkan ke dalam api neraka adalah karena hati dan pikiran mereka telah dipengaruhi oleh bisikan-bisikan setan, sehingga mereka tidak dapat lagi mengingat Allah, mengikuti perintah dan menjauhi larangan-Nya. Yang baik menurut pikiran mereka ialah apa yang menurut nafsu dan keinginan mereka baik. Oleh karena itu, mereka bersumpah untuk menarik simpati orang lain, seakan-akan yang mereka ucapkan itu adalah suatu kebenaran. Firman Allah:\n\nDan demikianlah untuk setiap nabi Kami menjadikan musuh yang terdiri dari setan-setan manusia dan jin, sebagian mereka membisikkan kepada sebagian yang lain perkataan yang indah sebagai tipuan. Dan kalau Tuhanmu menghendaki, niscaya mereka tidak akan melakukannya, maka biarkanlah mereka bersama apa (kebohongan) yang mereka ada-adakan. (al-An'am\u002F6: 112)\n\nPada akhir ayat ini ditegaskan bahwa orang-orang munafik yang diterangkan di atas adalah tentara dan pesuruh setan. Mereka berkumpul dan mengadakan perundingan rahasia untuk mengerjakan perbuatan dosa dan menimbulkan permusuhan di kalangan kaum Muslimin. Tujuan mereka melakukan usaha yang demikian adalah untuk menuruti hawa nafsu mereka. Tentara dan pesuruh setan itu adalah orang-orang yang durhaka kepada Allah. Orang-orang yang durhaka kepada Allah pasti akan binasa dan hancur, serta di akhirat akan dimasukkan ke dalam neraka.","20":"Ayat ini menerangkan tentang orang-orang yang menentang Allah, mereka tidak mengindahkan perintah-perintah-Nya, tidak mematuhi larangan-larangan-Nya, dan enggan mengerjakan kewajiban-kewajiban yang telah ditetapkan Allah bagi mereka. Mereka termasuk orang-orang yang hina karena kaum Muslimin akan mengalahkan mereka dengan memerangi dan menawan mereka. Bahkan ada di antara mereka yang diusir dari negeri mereka.\n\nAyat ini mengingatkan kaum Muslimin akan azab Allah yang ditimpakan kepada orang-orang musyrik Mekah berupa kekalahan pada fath Makkah. Akibat Perang Ahzab orang-orang Yahudi diusir dari kota Medinah karena melanggar perjanjian damai dengan Rasulullah saw. Orang-orang yang telah dinyatakan Allah sebagai orang yang hina, tidak dapat dimuliakan oleh siapa pun, sebagaimana tersebut dalam firman-Nya:\n\nYa Tuhan kami, sesungguhnya orang yang Engkau masukkan ke dalam neraka, maka sungguh, Engkau telah menghinakannya, dan tidak ada seorang penolong pun bagi orang yang zalim. (Â'li 'Imran\u002F3: 192)\n\nAyat ke-20 ini merupakan kabar gembira bagi orang-orang yang beriman yang sedang menerima cobaan-cobaan yang sangat berat bahwa mereka akan dapat mengalahkan musuh-musuh mereka dan agama Islam akan berkembang di mana-mana dalam waktu dekat.","21":"Allah mengingatkan manusia tentang sunah-Nya yang telah ditetapkan di Lauh Mahfudh dan berlaku di sepanjang masa dan di semua tempat. Sunah-Nya itu ialah mengenai ketetapan Allah dan rasul-Nya yang pasti akan mengalahkan setiap orang yang ingkar kepada-Nya. Di antaranya Allah telah menghancurkan kaum Nuh, kaum Lut, kaum Saleh, Fir'aun serta pengikutnya dengan bermacam-macam cara. Kemenangan seperti itu akan diperoleh pula oleh Nabi Muhammad dan pengikut-pengikutnya, dan juga setiap orang yang benar-benar melaksanakan agama Islam dengan sebaik-baiknya. Ini adalah sunatullah yang berlaku bagi hamba-Nya. Allah berfirman:\n\nDan sungguh, janji Kami telah tetap bagi hamba-hamba Kami yang menjadi rasul, (yaitu) mereka itu pasti akan mendapat pertolongan. Dan sesungguhnya bala tentara Kami itulah yang pasti menang. (as-saffat\u002F37: 171-173)\n\nPada akhir ayat ini ditegaskan lagi bahwa Allah mempunyai kekuasaan yang mutlak, kuasa menolong rasul-Nya dan orang-orang yang beriman, dan mengalahkan orang-orang kafir. Tidak seorang pun di langit maupun di bumi yang sanggup melawan kehendak-Nya. Dia sangat mudah melaksanakan kehendak-Nya. Allah berfirman:\n\nSesungguhnya urusan-Nya apabila Dia menghendaki sesuatu Dia hanya berkata kepadanya, \"Jadilah!\" Maka jadilah sesuatu itu. (Yasin\u002F36: 82)","22":"Diriwayatkan oleh Ibnu Abi hatim, ath-thabrani, Abu Nu'aim, dan al-Baihaqi dari Ibnu 'Abbas bahwa ia berkata, \"Ayat ini turun berhubungan dengan Abu Ubaidah bin 'Abdillah al-Jarrah, yang mana dalam Perang Badar, selalu ditantang berperang tanding oleh ayahnya, 'Abdullah al-Jarrah. Akan tetapi, ia selalu berusaha menghindarkan diri dari perang tanding itu. Karena terus-menerus dicari dan diburu oleh ayahnya, ia terpaksa melayaninya, sehingga Abu Ubaidah membunuh ayahnya. Maka turunlah ayat ini.\n\nAyat ini menerangkan bahwa sebenarnya orang munafik itu benar-benar kafir, bahkan lebih berbahaya dari orang yang terang-terangan menyatakan kekafirannya. Orang-orang munafik yang dimaksud dalam ayat ini ialah orang-orang yang selalu berusaha dan mengadakan tipu daya dalam mencapai tujuan mereka untuk menghancurkan agama Islam dan kaum Muslimin. Orang-orang kafir yang tidak memusuhi kaum Muslimin atau orang yang tidak berusaha menghancurkan agama Islam dan kaum Muslimin tidak termasuk dalam ayat ini.\n\nKaum Muslimin dilarang berteman dengan orang-orang kafir yang menjadi musuh Islam karena hal itu berarti ikut berusaha menghancurkan Islam dan kaum Muslimin. Sedangkan terhadap orang-orang kafir yang tidak memusuhi kaum Muslimin dan tidak berusaha menghancurkan agama Islam, kaum Muslimin dibolehkan berteman dan bergaul dengan mereka, seperti yang dilakukan oleh Rasulullah saw sendiri dan para sahabat. Sesuai dengan firman Allah:\n\nAllah tidak melarang kamu berbuat baik dan berlaku adil terhadap orang-orang yang tidak memerangimu dalam urusan agama dan tidak mengusir kamu dari kampung halamanmu. Sesungguhnya Allah mencintai orang-orang yang berlaku adil. (al-Mumtahanah\u002F60: 8)\n\nKemudian ditegaskan, seandainya ada kaum Muslimin yang berteman erat dengan orang kafir yang memusuhi Islam maka hal itu adalah sikap yang tidak wajar. Sebab, tidak mungkin ada orang-orang mukmin yang benar-benar beriman kepada Allah berteman dengan orang kafir yang ingin menghancurkan Islam.\n\nDengan demikian, kaum Muslimin diminta agar selalu waspada setiap terjadi permusuhan dan pertempuran dengan orang-orang kafir. Sekali-kali tidak boleh berteman erat dengan mereka, karena akan membahayakan kaum Muslimin. \n\nAllah menerangkan bahwa orang-orang yang telah diterangkan kekuatan iman dan keikhlasan hati mereka, seperti Abu Ubaidah, adalah orang yang telah tertanam keimanan dalam hatinya. Sehingga mereka tidak tahan mendengar Allah dan Rasul-Nya dicaci-maki orang, atau agama Islam direndahkan.\n\nDi samping mempunyai keimanan yang kuat, Allah juga telah menguatkan hati dan jiwa mereka sehingga menimbulkan ketenangan jiwa dan ketetapan hati dalam menegakkan agama Allah. Oleh karena itu, mereka tidak dapat melakukan kerja sama dengan orang-orang yang memusuhi Islam dan kaum Muslimin.\n\nPada akhir ayat ini diterangkan balasan yang akan mereka peroleh dari Allah, yaitu:\n\n1.Di akhirat mereka akan ditempatkan di dalam surga yang penuh kenikmatan, dan di bawahnya mengalir sungai-sungai. Mereka kekal di dalamnya.\n\n2.Allah rida dan menyukai perbuatan-perbuatan yang telah mereka lakukan selama hidup di dunia dan keadaan mereka di akhirat. Mereka pun rida dan senang terhadap balasan yang dianugerahkan Allah kepada mereka cepat atau lambat.\n\n3.Mereka termasuk orang-orang yang dimuliakan Allah karena telah bersedia menjadi tentara Allah dan mengorbankan segala yang ada pada mereka untuk meninggikan kalimat-Nya.\n\n4.Mereka termasuk orang-orang yang beruntung, karena dirinya telah berhasil melaksanakan tugas hidupnya sebagai hamba Allah di dunia dan di akhirat."}}}}},jsonldBreadcrumb:{"@context":e,"@type":"BreadcrumbList",itemListElement:[{"@type":a,position:1,name:"Home",item:"https:\u002F\u002Fwww.baca-quran.id\u002F"},{"@type":a,position:2,name:"QS 58",item:"https:\u002F\u002Fwww.baca-quran.id\u002F58\u002F"},{"@type":a,position:3,name:"QS 58:7",item:f}]},jsonLdArticle:{"@context":e,"@type":"NewsArticle",mainEntityOfPage:{"@type":"WebPage","@id":f},headline:b,image:["https:\u002F\u002Fwww.baca-quran.id\u002Fmeta-image.png"],datePublished:g,dateModified:g,author:{"@type":"Person",name:"Irfan Maulana"},description:c,publisher:{"@type":"Organization",name:"mazipan",logo:{"@type":"ImageObject",url:"https:\u002F\u002Fwww.baca-quran.id\u002Ficon.png"}}}}],fetch:{},mutations:[]}}("ListItem","Ayat ke 7, QS Al-Mujadalah (Gugatan) | Baca-Quran.id","Ayat ke 7, QS Al-Mujadalah (Gugatan) beserta terjemahan dan tafsir dari Kemenag, ❌ tanpa iklan, ❌ tanpa analitik, ✅ gratis sepenuhnya","Pada ayat-ayat ini diterangkan syarat-syarat bagi suami-istri agar dapat bercampur atau melaksanakan perkawinan kembali jika mereka telah bercerai, yaitu pihak suami wajib membayar kafarat. Kewajiban membayar kafarat itu disebabkan telah terjadinya zihar dan adanya kehendak suami mencampuri istrinya ('aud).\n\nDalam ayat ini diterangkan tiga tahap kafarat zihar. Tahap pertama harus diupayakan melaksanakannya. Kalau tahap pertama tidak sanggup dilaksanakan, boleh menjalankan tahap kedua. Bila tahap kedua juga tidak sanggup melaksanakannya, wajib dijalankan tahap ketiga. Tahap-tahap itu ialah:\n\n1.Memerdekakan seorang budak sebelum melaksanakan persetubuhan kembali. Ini adalah ketetapan Allah yang ditetapkan bagi seluruh orang yang beriman, agar mereka berhati-hati terhadap perbuatan mungkar dan membayar kafarat itu sebagai penghapus dosa perbuatan mungkar. Allah memperhatikan dan mengetahui semua perbuatan hamba-Nya, dan akan mengampuni semua hamba-Nya yang mau menghentikan perbuatan mungkar dan melaksanakan hukum-hukum Allah. Pada saat ini perbudakan telah hapus dari permukaan bumi, karena itu kafarat tingkat pertama ini tidak mungkin dilaksanakan lagi. Memerdekakan budak sebagai kafarat, termasuk salah satu cara dalam agama Islam untuk menghilangkan perbudakan, yang pernah membudaya di kalangan bangsa-bangsa di dunia, seperti yang terjadi di Amerika, Eropa, dan lain-lain. Oleh karena itu, agama Islam adalah agama yang berusaha menghapus perbudakan dan menetapkan cara-cara untuk melenyapkannya dengan segera.\n\n2.Jika yang pertama tidak dapat dilakukan, hendaklah puasa dua bulan berturut-turut. Berturut-turut merupakan salah satu syarat dari puasa yang akan dilakukan itu. Hal ini berarti jika ada hari-hari puasa yang tidak terlaksana seperti puasa sehari atau lebih kemudian tidak puasa pada hari yang lain dalam masa dua bulan itu, maka puasa itu tidak dapat dijadikan kafarat, walaupun tidak berpuasa itu disebabkan perjalanan jauh (safar) atau sakit. Puasa itu harus dilakukan sebelum melakukan persetubuhan suami istri.\n\n3.Jika yang kedua tidak juga dapat dilaksanakan, maka dilakukan tahap ketiga, yaitu memberi makan enam puluh orang miskin.\n\nZihar adalah semacam sumpah, yaitu sumpah suami yang menyatakan bahwa istrinya haram dicampuri seperti haramnya mencampuri ibunya. Oleh karena itu, yang wajib membayar kafarat ialah suami yang melakukan zihar saja, karena dialah yang bersumpah, sedang istri yang tidak pernah melakukan zihar tidak wajib membayar kafarat.\n\nJumlah atau bentuk kafarat zihar yang ditetapkan itu adalah jumlah atau bentuk yang sangat tinggi, apalagi jika diingat bahwa hukum itu berlaku bagi seluruh kaum Muslimin, baik yang kaya atau yang miskin. Bagi seorang yang kaya tidak ada kesulitan membayar kafarat itu, tetapi merupakan hal yang sulit dan berat membayarnya bagi orang-orang miskin.\n\nMenghadapi masalah yang seperti ini, syariat Islam mempunyai prinsip-prinsip yang dapat meringankan suatu beban yang dipikulkan Allah kepada kaum Muslimin, yaitu prinsip, \"Kesukaran itu menimbulkan kemudahan,\" asal saja kesukaran itu benar-benar suatu kesukaran yang tidak dapat diatasi, disertai dengan keinginan di dalam hati untuk mencari keridaan Allah.\n\nSehubungan dengan ini, pada kelanjutan hadis Khuwailah binti Malik yang diriwayatkan oleh Abu Dawud, dikatakan:\n\nMaka Rasulullah saw berkata, \"Hendaklah ia memerdekakan seorang budak.\" Khaulah berkata, \"Ia tidak sanggup mengusahakannya.\" Nabi berkata, \"(Kalau demikian) maka ia berpuasa dua bulan berturut-turut.\" Khaulah berkata, \"Ya Rasulullah, sesungguhnya ia (suamiku) adalah seorang yang telah tua bangka, tidak sanggup lagi berpuasa.\" Nabi berkata, \"Maka hendaklah ia memberi makan enam puluh orang miskin.\" Khaulah berkata, \"Ia tidak mempunyai sesuatu pun yang akan disedekahkannya.\" Rasulullah saw Berkata, \"(Kalau demikian) maka sesungguhnya aku akan membantunya dengan segantang tamar.\" Khaulah berkata, \"Dan aku akan membantunya pula dengan segantang tamar.\" Berkata Rasulullah saw, \"Engkau benar-benar baik, pergilah, maka beritahukanlah atas namanya, beri makanlah dengan tamar ini enam puluh orang fakir-miskin.\" (Riwayat Abu Dawud)\n\nPada riwayat yang lain diterangkan bahwa Khaulah mengatakan kepada Rasulullah saw bahwa orang yang paling miskin di negeri ini adalah keluarganya. Maka Rasulullah saw menyuruh Khaulah membawa kurma sebagai kafarat itu pulang ke rumahnya untuk dimakan keluarganya sendiri.\n\nPada dasarnya agama Islam tidak menyetujui adanya zihar itu, bahkan memandangnya sebagai perbuatan mungkar dan dosa, karena perbuatan zihar itu adalah perbuatan yang tidak mempunyai dasar, mengatakan sesuatu yang bukan-bukan. Akan tetapi, karena zihar itu adalah suatu kebiasaan bangsa Arab Jahiliah, sedang untuk menghapus kebiasaan itu dalam waktu yang singkat akan menimbulkan kegoncangan pada masyarakat Islam yang baru tumbuh, sedang masyarakat itu berasal dari orang-orang Arab masa Jahiliah, maka agama Islam tidak langsung menghapuskan kebiasaan tersebut. Agama Islam menghilangkan semua akibat yang ditimbulkan oleh perbuatan zihar itu dengan menetapkan waktu menunggu empat bulan. Dalam masa itu, suami boleh menceraikan istrinya atau membayar kafarat bagi yang ingin mencampuri istrinya kembali, yakni mencabut kembali ucapan zihar yang telah diucapkannya. Jadi zihar itu berasal dari hukum Arab masa Jahiliah yang telah dihapuskan oleh Islam. Oleh karena itu, bagi negara-negara atau umat Islam yang tidak mengenal zihar tersebut, tidak perlu mencantumkan hukum itu apabila mereka membuat suatu undang-undang perkawinan.\n\nPada akhir ayat ini diterangkan bahwa Allah menerangkan kewajiban membayar kafarat itu bagi suami yang telah menzihar istrinya adalah untuk memperdalam jiwa tauhid, mempercayai Nabi Muhammad saw sebagai rasul Allah, dan agar berhati-hati mengucapkan suatu perkataan, sehingga tidak mengadakan kedustaan dan mengatakan yang bukan-bukan. Dengan demikian, tertanamlah dalam hati setiap orang yang beriman keinginan melaksanakan semua hukum-hukum Allah dengan sebaik-baiknya. Tertanam juga dalam hati mereka bahwa mengingkari hukum-hukum Allah itu akan menimbulkan kesengsaraan di dunia maupun di akhirat nanti.","https:\u002F\u002Fschema.org","https:\u002F\u002Fwww.baca-quran.id\u002F58\u002F7\u002F","2021-08-01T10:39:54.934Z")));
import * as helpers from '../../utils/helpers' export function getPinnedContacts (state) { return state.contacts.pinnedContacts } export function getContact (state) { let contact = getCurrentContact(state) return (helpers.isNullOrUndefined(contact)) ? {} : state.contacts.pinnedContacts[contact] } export function getCurrentContact (state) { return state.contacts.currentContact } export function getSearchContacts (state) { return state.contacts.searchContacts } export function getSearching (state) { return state.contacts.searching }
import { GlSkeletonLoader, GlSprintf, GlAlert } from '@gitlab/ui'; import { shallowMount } from '@vue/test-utils'; import Vue, { nextTick } from 'vue'; import VueApollo from 'vue-apollo'; import createMockApollo from 'helpers/mock_apollo_helper'; import waitForPromises from 'helpers/wait_for_promises'; import getContainerRepositoriesQuery from 'shared_queries/container_registry/get_container_repositories.query.graphql'; import { FILTERED_SEARCH_TERM } from '~/packages_and_registries/shared/constants'; import DeleteImage from '~/packages_and_registries/container_registry/explorer/components/delete_image.vue'; import CliCommands from '~/packages_and_registries/shared/components/cli_commands.vue'; import GroupEmptyState from '~/packages_and_registries/container_registry/explorer/components/list_page/group_empty_state.vue'; import ImageList from '~/packages_and_registries/container_registry/explorer/components/list_page/image_list.vue'; import ProjectEmptyState from '~/packages_and_registries/container_registry/explorer/components/list_page/project_empty_state.vue'; import RegistryHeader from '~/packages_and_registries/container_registry/explorer/components/list_page/registry_header.vue'; import { DELETE_IMAGE_SUCCESS_MESSAGE, DELETE_IMAGE_ERROR_MESSAGE, SORT_FIELDS, } from '~/packages_and_registries/container_registry/explorer/constants'; import deleteContainerRepositoryMutation from '~/packages_and_registries/container_registry/explorer/graphql/mutations/delete_container_repository.mutation.graphql'; import getContainerRepositoriesDetails from '~/packages_and_registries/container_registry/explorer/graphql/queries/get_container_repositories_details.query.graphql'; import component from '~/packages_and_registries/container_registry/explorer/pages/list.vue'; import Tracking from '~/tracking'; import PersistedSearch from '~/packages_and_registries/shared/components/persisted_search.vue'; import TitleArea from '~/vue_shared/components/registry/title_area.vue'; import { $toast } from 'jest/packages_and_registries/shared/mocks'; import { graphQLImageListMock, graphQLImageDeleteMock, deletedContainerRepository, graphQLEmptyImageListMock, graphQLEmptyGroupImageListMock, pageInfo, graphQLProjectImageRepositoriesDetailsMock, dockerCommands, } from '../mock_data'; import { GlModal, GlEmptyState } from '../stubs'; describe('List Page', () => { let wrapper; let apolloProvider; const findDeleteModal = () => wrapper.findComponent(GlModal); const findSkeletonLoader = () => wrapper.findComponent(GlSkeletonLoader); const findEmptyState = () => wrapper.findComponent(GlEmptyState); const findCliCommands = () => wrapper.findComponent(CliCommands); const findProjectEmptyState = () => wrapper.findComponent(ProjectEmptyState); const findGroupEmptyState = () => wrapper.findComponent(GroupEmptyState); const findRegistryHeader = () => wrapper.findComponent(RegistryHeader); const findDeleteAlert = () => wrapper.findComponent(GlAlert); const findImageList = () => wrapper.findComponent(ImageList); const findPersistedSearch = () => wrapper.findComponent(PersistedSearch); const findEmptySearchMessage = () => wrapper.find('[data-testid="emptySearch"]'); const findDeleteImage = () => wrapper.findComponent(DeleteImage); const fireFirstSortUpdate = () => { findPersistedSearch().vm.$emit('update', { sort: 'UPDATED_DESC', filters: [] }); }; const waitForApolloRequestRender = async () => { jest.runOnlyPendingTimers(); await waitForPromises(); await nextTick(); }; const mountComponent = ({ mocks, resolver = jest.fn().mockResolvedValue(graphQLImageListMock), detailsResolver = jest.fn().mockResolvedValue(graphQLProjectImageRepositoriesDetailsMock), mutationResolver = jest.fn().mockResolvedValue(graphQLImageDeleteMock), config = { isGroupPage: false }, query = {}, } = {}) => { Vue.use(VueApollo); const requestHandlers = [ [getContainerRepositoriesQuery, resolver], [getContainerRepositoriesDetails, detailsResolver], [deleteContainerRepositoryMutation, mutationResolver], ]; apolloProvider = createMockApollo(requestHandlers); wrapper = shallowMount(component, { apolloProvider, stubs: { GlModal, GlEmptyState, GlSprintf, RegistryHeader, TitleArea, DeleteImage, }, mocks: { $toast, $route: { name: 'foo', query, }, ...mocks, }, provide() { return { config, ...dockerCommands, }; }, }); }; afterEach(() => { wrapper.destroy(); }); it('contains registry header', async () => { mountComponent(); fireFirstSortUpdate(); await waitForApolloRequestRender(); expect(findRegistryHeader().exists()).toBe(true); expect(findRegistryHeader().props()).toMatchObject({ imagesCount: 2, metadataLoading: false, }); }); describe.each([ { error: 'connectionError', errorName: 'connection error' }, { error: 'invalidPathError', errorName: 'invalid path error' }, ])('handling $errorName', ({ error }) => { const config = { containersErrorImage: 'foo', helpPagePath: 'bar', isGroupPage: false, }; config[error] = true; it('should show an empty state', () => { mountComponent({ config }); expect(findEmptyState().exists()).toBe(true); }); it('empty state should have an svg-path', () => { mountComponent({ config }); expect(findEmptyState().props('svgPath')).toBe(config.containersErrorImage); }); it('empty state should have a description', () => { mountComponent({ config }); expect(findEmptyState().props('title')).toContain('connection error'); }); it('should not show the loading or default state', () => { mountComponent({ config }); expect(findSkeletonLoader().exists()).toBe(false); expect(findImageList().exists()).toBe(false); }); }); describe('isLoading is true', () => { it('shows the skeleton loader', async () => { mountComponent(); fireFirstSortUpdate(); await nextTick(); expect(findSkeletonLoader().exists()).toBe(true); }); it('imagesList is not visible', () => { mountComponent(); expect(findImageList().exists()).toBe(false); }); it('cli commands is not visible', () => { mountComponent(); expect(findCliCommands().exists()).toBe(false); }); it('title has the metadataLoading props set to true', async () => { mountComponent(); fireFirstSortUpdate(); await nextTick(); expect(findRegistryHeader().props('metadataLoading')).toBe(true); }); }); describe('list is empty', () => { describe('project page', () => { const resolver = jest.fn().mockResolvedValue(graphQLEmptyImageListMock); it('cli commands is not visible', async () => { mountComponent({ resolver }); await waitForApolloRequestRender(); expect(findCliCommands().exists()).toBe(false); }); it('project empty state is visible', async () => { mountComponent({ resolver }); await waitForApolloRequestRender(); expect(findProjectEmptyState().exists()).toBe(true); }); }); describe('group page', () => { const resolver = jest.fn().mockResolvedValue(graphQLEmptyGroupImageListMock); const config = { isGroupPage: true, }; it('group empty state is visible', async () => { mountComponent({ resolver, config }); await waitForApolloRequestRender(); expect(findGroupEmptyState().exists()).toBe(true); }); it('cli commands is not visible', async () => { mountComponent({ resolver, config }); await waitForApolloRequestRender(); expect(findCliCommands().exists()).toBe(false); }); }); }); describe('list is not empty', () => { describe('unfiltered state', () => { it('quick start is visible', async () => { mountComponent(); fireFirstSortUpdate(); await waitForApolloRequestRender(); expect(findCliCommands().exists()).toBe(true); }); it('list component is visible', async () => { mountComponent(); fireFirstSortUpdate(); await waitForApolloRequestRender(); expect(findImageList().exists()).toBe(true); }); describe('additional metadata', () => { it('is called on component load', async () => { const detailsResolver = jest .fn() .mockResolvedValue(graphQLProjectImageRepositoriesDetailsMock); mountComponent({ detailsResolver }); fireFirstSortUpdate(); jest.runOnlyPendingTimers(); await waitForPromises(); expect(detailsResolver).toHaveBeenCalled(); }); it('does not block the list ui to show', async () => { const detailsResolver = jest.fn().mockRejectedValue(); mountComponent({ detailsResolver }); fireFirstSortUpdate(); await waitForApolloRequestRender(); expect(findImageList().exists()).toBe(true); }); it('loading state is passed to list component', async () => { // this is a promise that never resolves, to trick apollo to think that this request is still loading const detailsResolver = jest.fn().mockImplementation(() => new Promise(() => {})); mountComponent({ detailsResolver }); fireFirstSortUpdate(); await waitForApolloRequestRender(); expect(findImageList().props('metadataLoading')).toBe(true); }); }); describe('delete image', () => { const selectImageForDeletion = async () => { fireFirstSortUpdate(); await waitForApolloRequestRender(); findImageList().vm.$emit('delete', deletedContainerRepository); }; it('should call deleteItem when confirming deletion', async () => { const mutationResolver = jest.fn().mockResolvedValue(graphQLImageDeleteMock); mountComponent({ mutationResolver }); await selectImageForDeletion(); findDeleteModal().vm.$emit('primary'); expect(mutationResolver).toHaveBeenCalledWith({ id: deletedContainerRepository.id }); }); it('should show a success alert when delete request is successful', async () => { mountComponent(); await selectImageForDeletion(); findDeleteImage().vm.$emit('success'); await nextTick(); const alert = findDeleteAlert(); expect(alert.exists()).toBe(true); expect(alert.text().replace(/\s\s+/gm, ' ')).toBe( DELETE_IMAGE_SUCCESS_MESSAGE.replace('%{title}', wrapper.vm.itemToDelete.path), ); }); describe('when delete request fails it shows an alert', () => { it('user recoverable error', async () => { mountComponent(); await selectImageForDeletion(); findDeleteImage().vm.$emit('error'); await nextTick(); const alert = findDeleteAlert(); expect(alert.exists()).toBe(true); expect(alert.text().replace(/\s\s+/gm, ' ')).toBe( DELETE_IMAGE_ERROR_MESSAGE.replace('%{title}', wrapper.vm.itemToDelete.path), ); }); }); }); }); describe('search and sorting', () => { const doSearch = async () => { await waitForApolloRequestRender(); findPersistedSearch().vm.$emit('update', { sort: 'UPDATED_DESC', filters: [{ type: FILTERED_SEARCH_TERM, value: { data: 'centos6' } }], }); findPersistedSearch().vm.$emit('filter:submit'); await waitForPromises(); }; it('has a persisted search box element', async () => { mountComponent(); fireFirstSortUpdate(); await waitForApolloRequestRender(); const registrySearch = findPersistedSearch(); expect(registrySearch.exists()).toBe(true); expect(registrySearch.props()).toMatchObject({ defaultOrder: 'UPDATED', defaultSort: 'desc', sortableFields: SORT_FIELDS, }); }); it('performs sorting', async () => { const resolver = jest.fn().mockResolvedValue(graphQLImageListMock); mountComponent({ resolver }); await waitForApolloRequestRender(); findPersistedSearch().vm.$emit('update', { sort: 'UPDATED_DESC', filters: [] }); await nextTick(); expect(resolver).toHaveBeenCalledWith(expect.objectContaining({ sort: 'UPDATED_DESC' })); }); it('performs a search', async () => { const resolver = jest.fn().mockResolvedValue(graphQLImageListMock); mountComponent({ resolver }); await doSearch(); expect(resolver).toHaveBeenCalledWith(expect.objectContaining({ name: 'centos6' })); }); it('when search result is empty displays an empty search message', async () => { const resolver = jest.fn().mockResolvedValue(graphQLImageListMock); const detailsResolver = jest .fn() .mockResolvedValue(graphQLProjectImageRepositoriesDetailsMock); mountComponent({ resolver, detailsResolver }); await waitForApolloRequestRender(); resolver.mockResolvedValue(graphQLEmptyImageListMock); detailsResolver.mockResolvedValue(graphQLEmptyImageListMock); await doSearch(); expect(findEmptySearchMessage().exists()).toBe(true); }); }); describe('pagination', () => { it('prev-page event triggers a fetchMore request', async () => { const resolver = jest.fn().mockResolvedValue(graphQLImageListMock); const detailsResolver = jest .fn() .mockResolvedValue(graphQLProjectImageRepositoriesDetailsMock); mountComponent({ resolver, detailsResolver }); fireFirstSortUpdate(); await waitForApolloRequestRender(); findImageList().vm.$emit('prev-page'); await waitForPromises(); expect(resolver).toHaveBeenCalledWith( expect.objectContaining({ before: pageInfo.startCursor }), ); expect(detailsResolver).toHaveBeenCalledWith( expect.objectContaining({ before: pageInfo.startCursor }), ); }); it('next-page event triggers a fetchMore request', async () => { const resolver = jest.fn().mockResolvedValue(graphQLImageListMock); const detailsResolver = jest .fn() .mockResolvedValue(graphQLProjectImageRepositoriesDetailsMock); mountComponent({ resolver, detailsResolver }); fireFirstSortUpdate(); await waitForApolloRequestRender(); findImageList().vm.$emit('next-page'); await waitForPromises(); expect(resolver).toHaveBeenCalledWith( expect.objectContaining({ after: pageInfo.endCursor }), ); expect(detailsResolver).toHaveBeenCalledWith( expect.objectContaining({ after: pageInfo.endCursor }), ); }); }); }); describe('modal', () => { beforeEach(() => { mountComponent(); fireFirstSortUpdate(); }); it('exists', () => { expect(findDeleteModal().exists()).toBe(true); }); it('contains a description with the path of the item to delete', async () => { await waitForPromises(); findImageList().vm.$emit('delete', { path: 'foo' }); await waitForPromises(); expect(findDeleteModal().html()).toContain('foo'); }); }); describe('tracking', () => { beforeEach(() => { mountComponent(); fireFirstSortUpdate(); }); const testTrackingCall = (action) => { expect(Tracking.event).toHaveBeenCalledWith(undefined, action, { label: 'registry_repository_delete', }); }; beforeEach(() => { jest.spyOn(Tracking, 'event'); }); it('send an event when delete button is clicked', () => { findImageList().vm.$emit('delete', {}); testTrackingCall('click_button'); }); it('send an event when cancel is pressed on modal', () => { const deleteModal = findDeleteModal(); deleteModal.vm.$emit('cancel'); testTrackingCall('cancel_delete'); }); it('send an event when the deletion starts', () => { findDeleteImage().vm.$emit('start'); testTrackingCall('confirm_delete'); }); }); });
import * as types from 'reduxes/actionTypes'; /** * 请求全屏 * @param el * @param callback * @returns {function(*): *} */ export const requestFullScreen = (el, callback) => dispatch => dispatch({ type: types.REQUEST_FULL_SCREEN, el, callback }); /** * 退出全屏 * @param callback * @returns {function(*): *} */ export const exitFullScreen = callback => dispatch => dispatch({ type: types.EXIT_FULL_SCREEN, callback }); /** * 设置是否全屏 * @param isFullScreen * @returns {function(*): *} */ export const updateFullScreen = isFullScreen => dispatch => dispatch({ type: types.UPDATE_FULL_SCREEN, isFullScreen }); /** * 切换全屏 * @param el * @param callback * @returns {Function} */ export const toggleFullScreen = (el, callback) => dispatch => dispatch({ type: types.TOGGLE_FULL_SCREEN, el, callback });
(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{"3X9D":function(t,e,r){"use strict";var s={props:["field","row"],computed:{entry:function(){var t=_.split(this.field,".");return{key:t[0],field:t[1]}}}},a=(r("RxVw"),r("KHd+")),i=Object(a.a)(s,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",[t._l(t.row[t.entry.key],(function(e,s){return r("span",{key:s,staticClass:"badge badge-pill badge-azure mr-1"},[t._v("\n "+t._s(e[t.entry.field])+"\n ")])})),t._v(" "),0===t.row[t.entry.key].length?r("span",{staticClass:"badge badge-pill badge-orange"},[t._v("\n Not Assigned\n ")]):t._e()],2)}),[],!1,null,"cf110172",null);e.a=i.exports},"4FdH":function(t,e,r){var s=r("QyL9");"string"==typeof s&&(s=[[t.i,s,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};r("aET+")(s,a);s.locals&&(t.exports=s.locals)},I5SZ:function(t,e,r){"use strict";r.r(e);var s=r("L2JU");function a(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,s)}return r}function i(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?a(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var c={components:{DatatableList:r("3X9D").a},data:function(){return{}},beforeDestroy:function(){this.resetState()},computed:i({},Object(s.c)("RolesSingle",["entry"])),watch:{"$route.params.id":{immediate:!0,handler:function(){this.resetState(),this.fetchShowData(this.$route.params.id)}}},methods:i({},Object(s.b)("RolesSingle",["fetchShowData","resetState"]))},o=r("KHd+"),l=Object(o.a)(c,(function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("div",{staticClass:"container-fluid"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12"},[r("div",{staticClass:"card"},[t._m(0),t._v(" "),r("div",{staticClass:"card-body"},[r("back-button")],1),t._v(" "),r("div",{staticClass:"card-body"},[r("div",{staticClass:"row"},[r("div",{staticClass:"col-md-12"},[r("div",{staticClass:"table-responsive"},[r("div",{staticClass:"table"},[r("tbody",[r("tr",[r("td",{staticClass:"text-primary"},[t._v("\n Title\n ")]),t._v(" "),r("td",[t._v("\n "+t._s(t.entry.title)+"\n ")])]),t._v(" "),r("tr",[r("td",{staticClass:"text-primary"},[t._v("\n Permissions\n ")]),t._v(" "),r("td",[r("datatable-list",{attrs:{row:t.entry,field:"permissions.title"}})],1)])])])])])])])])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header card-header-primary card-header-icon"},[e("div",{staticClass:"card-icon"},[e("i",{staticClass:"material-icons"},[this._v("remove_red_eye")])]),this._v(" "),e("h4",{staticClass:"card-title"},[this._v("View Role")])])}],!1,null,null,null);e.default=l.exports},QyL9:function(t,e,r){(t.exports=r("I1BE")(!1)).push([t.i,".badge[data-v-cf110172]{font-size:.875rem;font-weight:500;text-transform:none}",""])},RxVw:function(t,e,r){"use strict";var s=r("4FdH");r.n(s).a}}]);
import React from 'react'; import { connect } from 'react-redux'; import { Link } from 'react-router-dom'; function AuthButton({ isLogged }) { return ( isLogged ? <a href="/api/logout">Logout</a> : <a href="/api/auth/google">Login</a> ); } export function Header(props) { const { isLogged } = props; return ( <header> <Link to="/">Home</Link> <Link to="/users">Users</Link> <Link to="/something">Not Found</Link> { isLogged && <Link to="/admins">Admins</Link> } <AuthButton isLogged={ isLogged } /> </header> ) } function mapStateToProps({ auth }) { return { isLogged: auth.isLogged } } export default connect(mapStateToProps)(Header);
var jwt = require('jsonwebtoken'); var Promise = require('bluebird'); var createToken = function (payload) { return new Promise(function (resolve, reject) { try { var token = jwt.sign(payload, process.env.SECRET_JWT, { expiresIn: '1d' // expires in 24 hours // expiresIn: 60 // test }); resolve(token); } catch (e) { console.log(e); reject(e); } }); }; var createRenewToken = function (payload) { return new Promise(function (resolve, reject) { try { var token = jwt.sign(payload, process.env.SECRET_JWT, { expiresIn: '365d' // expires in 1 year }); resolve(token); } catch (e) { console.log(e); reject(e); } }); }; var authentication = function (token) { return new Promise(function (resolve, reject) { jwt.verify(token, process.env.SECRET_JWT, function(err, decoded) { if (err) { return reject(err); } else { return resolve(decoded); } }); }); }; module.exports = { createToken: createToken, createRenewToken: createRenewToken, authentication: authentication };
// Importações. const {DataTypes, Sequelize} = require('sequelize'); // Instância da conexão com a Database. const {connection} = require('../../configs/database'); // Definição do Model 'Cliente' para 'tbl_cliente'. const Cliente = connection.define('Cliente', { cod_cliente: { type: DataTypes.INTEGER.UNSIGNED, allowNull: false, unique: true, autoIncrement: true, primaryKey: true }, senha: { type: DataTypes.STRING(100), allowNull: false }, tipo_cliente: { type: DataTypes.ENUM('Comum', 'Pet Adote'), allowNull: false, defaultValue: 'Comum'}, data_criacao: { type: DataTypes.DATE, allowNull: false, defaultValue: Sequelize.NOW }, data_modificacao: { type: DataTypes.DATE, allowNull: false, defaultValue: Sequelize.NOW } }, { tableName: 'tbl_cliente', }); // Exportação. module.exports = Cliente
/*! For license information please see main.02ab9ff7.js.LICENSE.txt */ (window.webpackJsonp=window.webpackJsonp||[]).push([[11],[function(e,t,n){"use strict";e.exports=n(89)},function(e,t,n){"use strict";function r(){return(r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(41)("wks"),o=n(43),i=n(5).Symbol,a="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=a&&i[e]||(a?i:o)("Symbol."+e))}).store=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return O})),n.d(t,"b",(function(){return N})),n.d(t,"c",(function(){return x})),n.d(t,"d",(function(){return M})),n.d(t,"e",(function(){return E})),n.d(t,"f",(function(){return R})),n.d(t,"g",(function(){return U})),n.d(t,"h",(function(){return B})),n.d(t,"i",(function(){return z}));var r=n(6),o=n(0),i=n.n(o),a=n(17),l=n.n(a),u=n(7),s=n(50),c=n.n(s),f=n(73),p=n.n(f);function d(e){var t=[];return{on:function(e){t.push(e)},off:function(e){t=t.filter((function(t){return t!==e}))},get:function(){return e},set:function(n,r){e=n,t.forEach((function(t){return t(e,r)}))}}}var m=i.a.createContext||function(e,t){var n,r,i="__create-react-context-"+p()()+"__",a=function(e){function n(){var t;return(t=e.apply(this,arguments)||this).emitter=d(t.props.value),t}c()(n,e);var r=n.prototype;return r.getChildContext=function(){var e;return(e={})[i]=this.emitter,e},r.componentWillReceiveProps=function(e){if(this.props.value!==e.value){var n,r=this.props.value,o=e.value;((i=r)===(a=o)?0!==i||1/i==1/a:i!=i&&a!=a)?n=0:(n="function"==typeof t?t(r,o):1073741823,0!==(n|=0)&&this.emitter.set(e.value,n))}var i,a},r.render=function(){return this.props.children},n}(o.Component);a.childContextTypes=((n={})[i]=l.a.object.isRequired,n);var u=function(t){function n(){var e;return(e=t.apply(this,arguments)||this).state={value:e.getValue()},e.onUpdate=function(t,n){0!=((0|e.observedBits)&n)&&e.setState({value:e.getValue()})},e}c()(n,t);var r=n.prototype;return r.componentWillReceiveProps=function(e){var t=e.observedBits;this.observedBits=null==t?1073741823:t},r.componentDidMount=function(){this.context[i]&&this.context[i].on(this.onUpdate);var e=this.props.observedBits;this.observedBits=null==e?1073741823:e},r.componentWillUnmount=function(){this.context[i]&&this.context[i].off(this.onUpdate)},r.getValue=function(){return this.context[i]?this.context[i].get():e},r.render=function(){return(e=this.props.children,Array.isArray(e)?e[0]:e)(this.state.value);var e},n}(o.Component);return u.contextTypes=((r={})[i]=l.a.object,r),{Provider:a,Consumer:u}},h=n(4),g=n(1),v=n(51),y=n.n(v),b=(n(68),n(10)),w=n(74),k=n.n(w),E=function(e){var t=m();return t.displayName=e,t}("Router"),x=function(e){function t(t){var n;return(n=e.call(this,t)||this).state={location:t.history.location},n._isMounted=!1,n._pendingLocation=null,t.staticContext||(n.unlisten=t.history.listen((function(e){n._isMounted?n.setState({location:e}):n._pendingLocation=e}))),n}Object(r.a)(t,e),t.computeRootMatch=function(e){return{path:"/",url:"/",params:{},isExact:"/"===e}};var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0,this._pendingLocation&&this.setState({location:this._pendingLocation})},n.componentWillUnmount=function(){this.unlisten&&this.unlisten()},n.render=function(){return i.a.createElement(E.Provider,{children:this.props.children||null,value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}})},t}(i.a.Component);i.a.Component;var S=function(e){function t(){return e.apply(this,arguments)||this}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.props.onMount&&this.props.onMount.call(this,this)},n.componentDidUpdate=function(e){this.props.onUpdate&&this.props.onUpdate.call(this,this,e)},n.componentWillUnmount=function(){this.props.onUnmount&&this.props.onUnmount.call(this,this)},n.render=function(){return null},t}(i.a.Component);var T={},_=0;function C(e,t){return void 0===e&&(e="/"),void 0===t&&(t={}),"/"===e?e:function(e){if(T[e])return T[e];var t=y.a.compile(e);return _<1e4&&(T[e]=t,_++),t}(e)(t,{pretty:!0})}function O(e){var t=e.computedMatch,n=e.to,r=e.push,o=void 0!==r&&r;return i.a.createElement(E.Consumer,null,(function(e){e||Object(h.a)(!1);var r=e.history,a=e.staticContext,l=o?r.push:r.replace,s=Object(u.c)(t?"string"==typeof n?C(n,t.params):Object(g.a)({},n,{pathname:C(n.pathname,t.params)}):n);return a?(l(s),null):i.a.createElement(S,{onMount:function(){l(s)},onUpdate:function(e,t){var n=Object(u.c)(t.to);Object(u.f)(n,Object(g.a)({},s,{key:n.key}))||l(s)},to:n})}))}var P={},A=0;function R(e,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var n=t,r=n.path,o=n.exact,i=void 0!==o&&o,a=n.strict,l=void 0!==a&&a,u=n.sensitive,s=void 0!==u&&u;return[].concat(r).reduce((function(t,n){if(!n&&""!==n)return null;if(t)return t;var r=function(e,t){var n=""+t.end+t.strict+t.sensitive,r=P[n]||(P[n]={});if(r[e])return r[e];var o=[],i={regexp:y()(e,o,t),keys:o};return A<1e4&&(r[e]=i,A++),i}(n,{end:i,strict:l,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(e);if(!u)return null;var c=u[0],f=u.slice(1),p=e===c;return i&&!p?null:{path:n,url:"/"===n&&""===c?"/":c,isExact:p,params:a.reduce((function(e,t,n){return e[t.name]=f[n],e}),{})}}),null)}var N=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(E.Consumer,null,(function(t){t||Object(h.a)(!1);var n=e.props.location||t.location,r=e.props.computedMatch?e.props.computedMatch:e.props.path?R(n.pathname,e.props):t.match,o=Object(g.a)({},t,{location:n,match:r}),a=e.props,l=a.children,u=a.component,s=a.render;return Array.isArray(l)&&0===l.length&&(l=null),i.a.createElement(E.Provider,{value:o},o.match?l?"function"==typeof l?l(o):l:u?i.a.createElement(u,o):s?s(o):null:"function"==typeof l?l(o):null)}))},t}(i.a.Component);function I(e){return"/"===e.charAt(0)?e:"/"+e}function L(e,t){if(!e)return t;var n=I(e);return 0!==t.pathname.indexOf(n)?t:Object(g.a)({},t,{pathname:t.pathname.substr(n.length)})}function j(e){return"string"==typeof e?e:Object(u.e)(e)}function F(e){return function(){Object(h.a)(!1)}}function D(){}i.a.Component;var M=function(e){function t(){return e.apply(this,arguments)||this}return Object(r.a)(t,e),t.prototype.render=function(){var e=this;return i.a.createElement(E.Consumer,null,(function(t){t||Object(h.a)(!1);var n,r,o=e.props.location||t.location;return i.a.Children.forEach(e.props.children,(function(e){if(null==r&&i.a.isValidElement(e)){n=e;var a=e.props.path||e.props.from;r=a?R(o.pathname,Object(g.a)({},e.props,{path:a})):t.match}})),r?i.a.cloneElement(n,{location:o,computedMatch:r}):null}))},t}(i.a.Component);function z(e){var t="withRouter("+(e.displayName||e.name)+")",n=function(t){var n=t.wrappedComponentRef,r=Object(b.a)(t,["wrappedComponentRef"]);return i.a.createElement(E.Consumer,null,(function(t){return t||Object(h.a)(!1),i.a.createElement(e,Object(g.a)({},r,t,{ref:n}))}))};return n.displayName=t,n.WrappedComponent=e,k()(n,e)}var $=i.a.useContext;function U(){return $(E).history}function B(){return $(E).location}},function(e,t,n){"use strict";t.a=function(e,t){if(!e)throw new Error("Invariant failed")}},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return k})),n.d(t,"b",(function(){return _})),n.d(t,"d",(function(){return O})),n.d(t,"c",(function(){return h})),n.d(t,"f",(function(){return g})),n.d(t,"e",(function(){return m}));var r=n(1);function o(e){return"/"===e.charAt(0)}function i(e,t){for(var n=t,r=n+1,o=e.length;r<o;n+=1,r+=1)e[n]=e[r];e.pop()}var a=function(e,t){void 0===t&&(t="");var n,r=e&&e.split("/")||[],a=t&&t.split("/")||[],l=e&&o(e),u=t&&o(t),s=l||u;if(e&&o(e)?a=r:r.length&&(a.pop(),a=a.concat(r)),!a.length)return"/";if(a.length){var c=a[a.length-1];n="."===c||".."===c||""===c}else n=!1;for(var f=0,p=a.length;p>=0;p--){var d=a[p];"."===d?i(a,p):".."===d?(i(a,p),f++):f&&(i(a,p),f--)}if(!s)for(;f--;f)a.unshift("..");!s||""===a[0]||a[0]&&o(a[0])||a.unshift("");var m=a.join("/");return n&&"/"!==m.substr(-1)&&(m+="/"),m};function l(e){return e.valueOf?e.valueOf():Object.prototype.valueOf.call(e)}var u=function e(t,n){if(t===n)return!0;if(null==t||null==n)return!1;if(Array.isArray(t))return Array.isArray(n)&&t.length===n.length&&t.every((function(t,r){return e(t,n[r])}));if("object"==typeof t||"object"==typeof n){var r=l(t),o=l(n);return r!==t||o!==n?e(r,o):Object.keys(Object.assign({},t,n)).every((function(r){return e(t[r],n[r])}))}return!1},s=n(4);function c(e){return"/"===e.charAt(0)?e:"/"+e}function f(e){return"/"===e.charAt(0)?e.substr(1):e}function p(e,t){return function(e,t){return 0===e.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(e.charAt(t.length))}(e,t)?e.substr(t.length):e}function d(e){return"/"===e.charAt(e.length-1)?e.slice(0,-1):e}function m(e){var t=e.pathname,n=e.search,r=e.hash,o=t||"/";return n&&"?"!==n&&(o+="?"===n.charAt(0)?n:"?"+n),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function h(e,t,n,o){var i;"string"==typeof e?(i=function(e){var t=e||"/",n="",r="",o=t.indexOf("#");-1!==o&&(r=t.substr(o),t=t.substr(0,o));var i=t.indexOf("?");return-1!==i&&(n=t.substr(i),t=t.substr(0,i)),{pathname:t,search:"?"===n?"":n,hash:"#"===r?"":r}}(e)).state=t:(void 0===(i=Object(r.a)({},e)).pathname&&(i.pathname=""),i.search?"?"!==i.search.charAt(0)&&(i.search="?"+i.search):i.search="",i.hash?"#"!==i.hash.charAt(0)&&(i.hash="#"+i.hash):i.hash="",void 0!==t&&void 0===i.state&&(i.state=t));try{i.pathname=decodeURI(i.pathname)}catch(l){throw l instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):l}return n&&(i.key=n),o?i.pathname?"/"!==i.pathname.charAt(0)&&(i.pathname=a(i.pathname,o.pathname)):i.pathname=o.pathname:i.pathname||(i.pathname="/"),i}function g(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash===t.hash&&e.key===t.key&&u(e.state,t.state)}function v(){var e=null;var t=[];return{setPrompt:function(t){return e=t,function(){e===t&&(e=null)}},confirmTransitionTo:function(t,n,r,o){if(null!=e){var i="function"==typeof e?e(t,n):e;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(e){var n=!0;function r(){n&&e.apply(void 0,arguments)}return t.push(r),function(){n=!1,t=t.filter((function(e){return e!==r}))}},notifyListeners:function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];t.forEach((function(e){return e.apply(void 0,n)}))}}}var y=!("undefined"==typeof window||!window.document||!window.document.createElement);function b(e,t){t(window.confirm(e))}function w(){try{return window.history.state||{}}catch(e){return{}}}function k(e){void 0===e&&(e={}),y||Object(s.a)(!1);var t,n=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,i=!(-1===window.navigator.userAgent.indexOf("Trident")),a=e,l=a.forceRefresh,u=void 0!==l&&l,f=a.getUserConfirmation,g=void 0===f?b:f,k=a.keyLength,E=void 0===k?6:k,x=e.basename?d(c(e.basename)):"";function S(e){var t=e||{},n=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return x&&(i=p(i,x)),h(i,r,n)}function T(){return Math.random().toString(36).substr(2,E)}var _=v();function C(e){Object(r.a)(z,e),z.length=n.length,_.notifyListeners(z.location,z.action)}function O(e){(function(e){return void 0===e.state&&-1===navigator.userAgent.indexOf("CriOS")})(e)||R(S(e.state))}function P(){R(S(w()))}var A=!1;function R(e){if(A)A=!1,C();else{_.confirmTransitionTo(e,"POP",g,(function(t){t?C({action:"POP",location:e}):function(e){var t=z.location,n=I.indexOf(t.key);-1===n&&(n=0);var r=I.indexOf(e.key);-1===r&&(r=0);var o=n-r;o&&(A=!0,j(o))}(e)}))}}var N=S(w()),I=[N.key];function L(e){return x+m(e)}function j(e){n.go(e)}var F=0;function D(e){1===(F+=e)&&1===e?(window.addEventListener("popstate",O),i&&window.addEventListener("hashchange",P)):0===F&&(window.removeEventListener("popstate",O),i&&window.removeEventListener("hashchange",P))}var M=!1;var z={length:n.length,action:"POP",location:N,createHref:L,push:function(e,t){var r=h(e,t,T(),z.location);_.confirmTransitionTo(r,"PUSH",g,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.pushState({key:i,state:a},null,t),u)window.location.href=t;else{var l=I.indexOf(z.location.key),s=I.slice(0,l+1);s.push(r.key),I=s,C({action:"PUSH",location:r})}else window.location.href=t}}))},replace:function(e,t){var r=h(e,t,T(),z.location);_.confirmTransitionTo(r,"REPLACE",g,(function(e){if(e){var t=L(r),i=r.key,a=r.state;if(o)if(n.replaceState({key:i,state:a},null,t),u)window.location.replace(t);else{var l=I.indexOf(z.location.key);-1!==l&&(I[l]=r.key),C({action:"REPLACE",location:r})}else window.location.replace(t)}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return M||(D(1),M=!0),function(){return M&&(M=!1,D(-1)),t()}},listen:function(e){var t=_.appendListener(e);return D(1),function(){D(-1),t()}}};return z}var E={hashbang:{encodePath:function(e){return"!"===e.charAt(0)?e:"!/"+f(e)},decodePath:function(e){return"!"===e.charAt(0)?e.substr(1):e}},noslash:{encodePath:f,decodePath:c},slash:{encodePath:c,decodePath:c}};function x(e){var t=e.indexOf("#");return-1===t?e:e.slice(0,t)}function S(){var e=window.location.href,t=e.indexOf("#");return-1===t?"":e.substring(t+1)}function T(e){window.location.replace(x(window.location.href)+"#"+e)}function _(e){void 0===e&&(e={}),y||Object(s.a)(!1);var t=window.history,n=(window.navigator.userAgent.indexOf("Firefox"),e),o=n.getUserConfirmation,i=void 0===o?b:o,a=n.hashType,l=void 0===a?"slash":a,u=e.basename?d(c(e.basename)):"",f=E[l],g=f.encodePath,w=f.decodePath;function k(){var e=w(S());return u&&(e=p(e,u)),h(e)}var _=v();function C(e){Object(r.a)(z,e),z.length=t.length,_.notifyListeners(z.location,z.action)}var O=!1,P=null;function A(){var e,t,n=S(),r=g(n);if(n!==r)T(r);else{var o=k(),a=z.location;if(!O&&(t=o,(e=a).pathname===t.pathname&&e.search===t.search&&e.hash===t.hash))return;if(P===m(o))return;P=null,function(e){if(O)O=!1,C();else{_.confirmTransitionTo(e,"POP",i,(function(t){t?C({action:"POP",location:e}):function(e){var t=z.location,n=L.lastIndexOf(m(t));-1===n&&(n=0);var r=L.lastIndexOf(m(e));-1===r&&(r=0);var o=n-r;o&&(O=!0,j(o))}(e)}))}}(o)}}var R=S(),N=g(R);R!==N&&T(N);var I=k(),L=[m(I)];function j(e){t.go(e)}var F=0;function D(e){1===(F+=e)&&1===e?window.addEventListener("hashchange",A):0===F&&window.removeEventListener("hashchange",A)}var M=!1;var z={length:t.length,action:"POP",location:I,createHref:function(e){var t=document.querySelector("base"),n="";return t&&t.getAttribute("href")&&(n=x(window.location.href)),n+"#"+g(u+m(e))},push:function(e,t){var n=h(e,void 0,void 0,z.location);_.confirmTransitionTo(n,"PUSH",i,(function(e){if(e){var t=m(n),r=g(u+t);if(S()!==r){P=t,function(e){window.location.hash=e}(r);var o=L.lastIndexOf(m(z.location)),i=L.slice(0,o+1);i.push(t),L=i,C({action:"PUSH",location:n})}else C()}}))},replace:function(e,t){var n=h(e,void 0,void 0,z.location);_.confirmTransitionTo(n,"REPLACE",i,(function(e){if(e){var t=m(n),r=g(u+t);S()!==r&&(P=t,T(r));var o=L.indexOf(m(z.location));-1!==o&&(L[o]=t),C({action:"REPLACE",location:n})}}))},go:j,goBack:function(){j(-1)},goForward:function(){j(1)},block:function(e){void 0===e&&(e=!1);var t=_.setPrompt(e);return M||(D(1),M=!0),function(){return M&&(M=!1,D(-1)),t()}},listen:function(e){var t=_.appendListener(e);return D(1),function(){D(-1),t()}}};return z}function C(e,t,n){return Math.min(Math.max(e,t),n)}function O(e){void 0===e&&(e={});var t=e,n=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,l=void 0===a?0:a,u=t.keyLength,s=void 0===u?6:u,c=v();function f(e){Object(r.a)(w,e),w.length=w.entries.length,c.notifyListeners(w.location,w.action)}function p(){return Math.random().toString(36).substr(2,s)}var d=C(l,0,i.length-1),g=i.map((function(e){return h(e,void 0,"string"==typeof e?p():e.key||p())})),y=m;function b(e){var t=C(w.index+e,0,w.entries.length-1),r=w.entries[t];c.confirmTransitionTo(r,"POP",n,(function(e){e?f({action:"POP",location:r,index:t}):f()}))}var w={length:g.length,action:"POP",location:g[d],index:d,entries:g,createHref:y,push:function(e,t){var r=h(e,t,p(),w.location);c.confirmTransitionTo(r,"PUSH",n,(function(e){if(e){var t=w.index+1,n=w.entries.slice(0);n.length>t?n.splice(t,n.length-t,r):n.push(r),f({action:"PUSH",location:r,index:t,entries:n})}}))},replace:function(e,t){var r=h(e,t,p(),w.location);c.confirmTransitionTo(r,"REPLACE",n,(function(e){e&&(w.entries[w.index]=r,f({action:"REPLACE",location:r}))}))},go:b,goBack:function(){b(-1)},goForward:function(){b(1)},canGo:function(e){var t=w.index+e;return t>=0&&t<w.entries.length},block:function(e){return void 0===e&&(e=!1),c.setPrompt(e)},listen:function(e){return c.appendListener(e)}};return w}},function(e,t,n){var r=n(13);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){e.exports=!n(14)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}n.d(t,"a",(function(){return r}))},function(e,t,n){var r=n(28),o=n(57);e.exports=n(9)?function(e,t,n){return r.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(5),o=n(16),i=n(11),a=n(15),l=n(25),u=function(e,t,n){var s,c,f,p,d=e&u.F,m=e&u.G,h=e&u.S,g=e&u.P,v=e&u.B,y=m?r:h?r[t]||(r[t]={}):(r[t]||{}).prototype,b=m?o:o[t]||(o[t]={}),w=b.prototype||(b.prototype={});for(s in m&&(n=t),n)f=((c=!d&&y&&void 0!==y[s])?y:n)[s],p=v&&c?l(f,r):g&&"function"==typeof f?l(Function.call,f):f,y&&a(y,s,f,e&u.U),b[s]!=f&&i(b,s,p),g&&w[s]!=f&&(w[s]=f)};r.core=o,u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,e.exports=u},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports=function(e){try{return!!e()}catch(t){return!0}}},function(e,t,n){var r=n(5),o=n(11),i=n(29),a=n(43)("src"),l=n(94),u=(""+l).split("toString");n(16).inspectSource=function(e){return l.call(e)},(e.exports=function(e,t,n,l){var s="function"==typeof n;s&&(i(n,"name")||o(n,"name",t)),e[t]!==n&&(s&&(i(n,a)||o(n,a,e[t]?""+e[t]:u.join(String(t)))),e===r?e[t]=n:l?e[t]?e[t]=n:o(e,t,n):(delete e[t],o(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||l.call(this)}))},function(e,t){var n=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=n(102)()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return u}));var r=n(3),o=n(1),i=n(0),a=n.n(i);function l(e,t,n){return void 0===n&&(n=[]),e.some((function(e){var o=e.path?Object(r.f)(t,e):n.length?n[n.length-1].match:r.c.computeRootMatch(t);return o&&(n.push({route:e,match:o}),e.routes&&l(e.routes,t,n)),o})),n}function u(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e?a.a.createElement(r.d,n,e.map((function(e,n){return a.a.createElement(r.b,{key:e.key||n,path:e.path,exact:e.exact,strict:e.strict,render:function(n){return e.render?e.render(Object(o.a)({},n,{},t,{route:e})):a.a.createElement(e.component,Object(o.a)({},n,t,{route:e}))}})}))):null}},function(e,t,n){"use strict";var r=n(77),o=n(95),i=n(22),a=n(30);e.exports=n(65)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,o(1)):o(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var r=n(34),o={};o[n(2)("toStringTag")]="z",o+""!="[object z]"&&n(15)(Object.prototype,"toString",(function(){return"[object "+r(this)+"]"}),!0)},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports={}},function(e,t,n){var r=n(83),o=n(59);e.exports=Object.keys||function(e){return r(e,o)}},function(e,t,n){var r=n(33),o=Math.min;e.exports=function(e){return e>0?o(r(e),9007199254740991):0}},function(e,t,n){var r=n(32);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,o){return e.call(t,n,r,o)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){for(var r=n(19),o=n(23),i=n(15),a=n(5),l=n(11),u=n(22),s=n(2),c=s("iterator"),f=s("toStringTag"),p=u.Array,d={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=o(d),h=0;h<m.length;h++){var g,v=m[h],y=d[v],b=a[v],w=b&&b.prototype;if(w&&(w[c]||l(w,c,p),w[f]||l(w,f,v),u[v]=p,y))for(g in r)w[g]||i(w,g,r[g],!0)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){var r=n(8),o=n(81),i=n(82),a=Object.defineProperty;t.f=n(9)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),o)try{return a(e,t,n)}catch(l){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var r=n(58),o=n(27);e.exports=function(e){return r(o(e))}},function(e,t,n){var r=n(27);e.exports=function(e){return Object(r(e))}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(21),o=n(2)("toStringTag"),i="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),o))?n:i?r(t):"Object"==(a=r(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t){var n=!("undefined"==typeof window||!window.document||!window.document.createElement),r={canUseDOM:n,canUseEventListeners:n&&!(!window.addEventListener&&!window.attachEvent),canUseIntersectionObserver:n&&"IntersectionObserver"in window,canUseViewport:n&&!!window.screen};e.exports=r},function(e){e.exports=JSON.parse('{"/learning-notes/":{"component":"c4f5d8e4"},"/learning-notes/:route":{"component":"1be78505","docsMetadata":"039a453e"},"/learning-notes/about/about":{"component":"17896441","content":"ceb5ae55"},"/learning-notes/about/contributing":{"component":"17896441","content":"d5bc498f"},"/learning-notes/backend/background-jobs":{"component":"17896441","content":"7f10a2a9"},"/learning-notes/javascript/promises":{"component":"17896441","content":"a6a88a80"}}')},function(e,t,n){"use strict";t.a={plugins:["/home/mehdisaffar/github/learning-notes/_website/extended-favicon-plugin","/home/mehdisaffar/github/learning-notes/_website/embedded-font-awesome-icons-plugin","/home/mehdisaffar/github/learning-notes/_website/collapse-sidebar-again-if-js-enabled-plugin","/home/mehdisaffar/github/learning-notes/_website/goatcounter-plugin"],themes:[],customFields:{},themeConfig:{navbar:{title:"learning-notes",logo:{alt:"mehdisaffar logo",src:"img/mehdisaffar.svg"},links:[{href:"https://mehdisaffar.github.io/learning-notes",label:"GitHub",position:"left"},{href:"https://mehdisaffar.github.io/learning-notes",position:"right",className:"header-github-link navbar__item navbar__link","aria-label":"GitHub repository"}]},footer:{style:"dark",copyright:'This work is licensed under a <a href="http://creativecommons.org/licenses/by/4.0/" rel="nofollow">Creative Commons Attribution 4.0 International\nLicense</a>.'},prism:{theme:{plain:{color:"#393A34",backgroundColor:"#f6f8fa"},styles:[{types:["comment","prolog","doctype","cdata"],style:{color:"#999988",fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}},{types:["string","attr-value"],style:{color:"#e3116c"}},{types:["punctuation","operator"],style:{color:"#393A34"}},{types:["entity","url","symbol","number","boolean","variable","constant","property","regex","inserted"],style:{color:"#36acaa"}},{types:["atrule","keyword","attr-name","selector"],style:{color:"#00a4db"}},{types:["function","deleted","tag"],style:{color:"#d73a49"}},{types:["function-variable"],style:{color:"#6f42c1"}},{types:["tag","selector","keyword"],style:{color:"#00009f"}}]},darkTheme:{plain:{backgroundColor:"#282c34",color:"#ffffff"},styles:[{types:["attr-name"],style:{color:"#c5a5c5"}},{types:["attr-value"],style:{color:"#8dc891"}},{types:["comment","block-comment","prolog","doctype","cdata"],style:{color:"#999999"}},{types:["property","number","function-name","constant","symbol","deleted"],style:{color:"#5a9bcf"}},{types:["boolean"],style:{color:"#ff8b50"}},{types:["tag"],style:{color:"#fc929e"}},{types:["string"],style:{color:"#8dc891"}},{types:["punctuation"],style:{color:"#8dc891"}},{types:["selector","char","builtin","inserted"],style:{color:"#D8DEE9"}},{types:["function"],style:{color:"#79b6f2"}},{types:["operator","entity","url","variable"],style:{color:"#d7deea"}},{types:["keyword"],style:{color:"#c5a5c5"}},{types:["at-rule","class-name"],style:{color:"#FAC863"}},{types:["important"],style:{fontWeight:"400"}},{types:["bold"],style:{fontWeight:"bold"}},{types:["italic"],style:{fontStyle:"italic"}},{types:["namespace"],style:{opacity:.7}}]}},disableDarkMode:!1,algolia:{apiKey:"c3c137b699cdad3809b418cd4adad354",indexName:"mehdisaffar_learning-notes"}},title:"learning-notes",tagline:"Notes regarding things I have learned",url:"https://mehdisaffar.github.io/learning-notes",baseUrl:"/learning-notes/",favicon:"favicon.ico",organizationName:"mehdisaffar",projectName:"learning-notes",presets:[["@docusaurus/preset-classic",{docs:{sidebarPath:"/home/mehdisaffar/github/learning-notes/_website/sidebars.js",routeBasePath:""},theme:{customCss:"/home/mehdisaffar/github/learning-notes/_website/src/css/custom.css"}}]]}},function(e,t,n){var r,o;void 0===(o="function"==typeof(r=function(){var e,t,n={version:"0.2.0"},r=n.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function o(e,t,n){return e<t?t:e>n?n:e}function i(e){return 100*(-1+e)}n.configure=function(e){var t,n;for(t in e)void 0!==(n=e[t])&&e.hasOwnProperty(t)&&(r[t]=n);return this},n.status=null,n.set=function(e){var t=n.isStarted();e=o(e,r.minimum,1),n.status=1===e?null:e;var u=n.render(!t),s=u.querySelector(r.barSelector),c=r.speed,f=r.easing;return u.offsetWidth,a((function(t){""===r.positionUsing&&(r.positionUsing=n.getPositioningCSS()),l(s,function(e,t,n){var o;return(o="translate3d"===r.positionUsing?{transform:"translate3d("+i(e)+"%,0,0)"}:"translate"===r.positionUsing?{transform:"translate("+i(e)+"%,0)"}:{"margin-left":i(e)+"%"}).transition="all "+t+"ms "+n,o}(e,c,f)),1===e?(l(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){l(u,{transition:"all "+c+"ms linear",opacity:0}),setTimeout((function(){n.remove(),t()}),c)}),c)):setTimeout(t,c)})),this},n.isStarted=function(){return"number"==typeof n.status},n.start=function(){n.status||n.set(0);var e=function(){setTimeout((function(){n.status&&(n.trickle(),e())}),r.trickleSpeed)};return r.trickle&&e(),this},n.done=function(e){return e||n.status?n.inc(.3+.5*Math.random()).set(1):this},n.inc=function(e){var t=n.status;return t?("number"!=typeof e&&(e=(1-t)*o(Math.random()*t,.1,.95)),t=o(t+e,0,.994),n.set(t)):n.start()},n.trickle=function(){return n.inc(Math.random()*r.trickleRate)},e=0,t=0,n.promise=function(r){return r&&"resolved"!==r.state()?(0===t&&n.start(),e++,t++,r.always((function(){0==--t?(e=0,n.done()):n.set((e-t)/e)})),this):this},n.render=function(e){if(n.isRendered())return document.getElementById("nprogress");s(document.documentElement,"nprogress-busy");var t=document.createElement("div");t.id="nprogress",t.innerHTML=r.template;var o,a=t.querySelector(r.barSelector),u=e?"-100":i(n.status||0),c=document.querySelector(r.parent);return l(a,{transition:"all 0 linear",transform:"translate3d("+u+"%,0,0)"}),r.showSpinner||(o=t.querySelector(r.spinnerSelector))&&p(o),c!=document.body&&s(c,"nprogress-custom-parent"),c.appendChild(t),t},n.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(r.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&p(e)},n.isRendered=function(){return!!document.getElementById("nprogress")},n.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),l=function(){var e=["Webkit","O","Moz","ms"],t={};function n(n){return n=n.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()})),t[n]||(t[n]=function(t){var n=document.body.style;if(t in n)return t;for(var r,o=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);o--;)if((r=e[o]+i)in n)return r;return t}(n))}function r(e,t,r){t=n(t),e.style[t]=r}return function(e,t){var n,o,i=arguments;if(2==i.length)for(n in t)void 0!==(o=t[n])&&t.hasOwnProperty(n)&&r(e,n,o);else r(e,i[1],i[2])}}();function u(e,t){return("string"==typeof e?e:f(e)).indexOf(" "+t+" ")>=0}function s(e,t){var n=f(e),r=n+t;u(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=f(e);u(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function f(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function p(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return n})?r.call(t,n,t,e):r)||(e.exports=o)},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return w}));var r=n(3);n.d(t,"c",(function(){return r.a})),n.d(t,"d",(function(){return r.f})),n.d(t,"e",(function(){return r.g})),n.d(t,"f",(function(){return r.h}));var o=n(6),i=n(0),a=n.n(i),l=n(7),u=(n(17),n(1)),s=n(10),c=n(4),f=function(e){function t(){for(var t,n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(t=e.call.apply(e,[this].concat(r))||this).history=Object(l.a)(t.props),t}return Object(o.a)(t,e),t.prototype.render=function(){return a.a.createElement(r.c,{history:this.history,children:this.props.children})},t}(a.a.Component);a.a.Component;var p=function(e,t){return"function"==typeof e?e(t):e},d=function(e,t){return"string"==typeof e?Object(l.c)(e,null,null,t):e},m=function(e){return e},h=a.a.forwardRef;void 0===h&&(h=m);var g=h((function(e,t){var n=e.innerRef,r=e.navigate,o=e.onClick,i=Object(s.a)(e,["innerRef","navigate","onClick"]),l=i.target,c=Object(u.a)({},i,{onClick:function(e){try{o&&o(e)}catch(t){throw e.preventDefault(),t}e.defaultPrevented||0!==e.button||l&&"_self"!==l||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)||(e.preventDefault(),r())}});return c.ref=m!==h&&t||n,a.a.createElement("a",c)}));var v=h((function(e,t){var n=e.component,o=void 0===n?g:n,i=e.replace,l=e.to,f=e.innerRef,v=Object(s.a)(e,["component","replace","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(c.a)(!1);var n=e.history,r=d(p(l,e.location),e.location),s=r?n.createHref(r):"",g=Object(u.a)({},v,{href:s,navigate:function(){var t=p(l,e.location);(i?n.replace:n.push)(t)}});return m!==h?g.ref=t||f:g.innerRef=f,a.a.createElement(o,g)}))})),y=function(e){return e},b=a.a.forwardRef;void 0===b&&(b=y);var w=b((function(e,t){var n=e["aria-current"],o=void 0===n?"page":n,i=e.activeClassName,l=void 0===i?"active":i,f=e.activeStyle,m=e.className,h=e.exact,g=e.isActive,w=e.location,k=e.strict,E=e.style,x=e.to,S=e.innerRef,T=Object(s.a)(e,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","strict","style","to","innerRef"]);return a.a.createElement(r.e.Consumer,null,(function(e){e||Object(c.a)(!1);var n=w||e.location,i=d(p(x,n),n),s=i.pathname,_=s&&s.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),C=_?Object(r.f)(n.pathname,{path:_,exact:h,strict:k}):null,O=!!(g?g(C,n):C),P=O?function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.filter((function(e){return e})).join(" ")}(m,l):m,A=O?Object(u.a)({},E,{},f):E,R=Object(u.a)({"aria-current":O&&o||null,className:P,style:A,to:i},T);return y!==b?R.ref=t||S:R.innerRef=S,a.a.createElement(v,R)}))}))},,function(e,t,n){var r=n(16),o=n(5),i=o["__core-js_shared__"]||(o["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(42)?"pure":"global",copyright:"\xa9 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){e.exports=!1},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t,n){"use strict";var r,o,i=n(80),a=RegExp.prototype.exec,l=String.prototype.replace,u=a,s=(r=/a/,o=/b*/g,a.call(r,"a"),a.call(o,"a"),0!==r.lastIndex||0!==o.lastIndex),c=void 0!==/()??/.exec("")[1];(s||c)&&(u=function(e){var t,n,r,o,u=this;return c&&(n=new RegExp("^"+u.source+"$(?!\\s)",i.call(u))),s&&(t=u.lastIndex),r=a.call(u,e),s&&r&&(u.lastIndex=u.global?r.index+r[0].length:t),c&&r&&r.length>1&&l.call(r[0],n,(function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(r[o]=void 0)})),r}),e.exports=u},function(e,t,n){var r=n(13),o=n(5).document,i=r(o)&&r(o.createElement);e.exports=function(e){return i?o.createElement(e):{}}},function(e,t,n){var r=n(41)("keys"),o=n(43);e.exports=function(e){return r[e]||(r[e]=o(e))}},function(e,t,n){var r=n(28).f,o=n(29),i=n(2)("toStringTag");e.exports=function(e,t,n){e&&!o(e=n?e:e.prototype,i)&&r(e,i,{configurable:!0,value:t})}},function(e,t,n){var r={"./":110};function o(e){var t=i(e);return n(t)}function i(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return r[e]}o.keys=function(){return Object.keys(r)},o.resolve=i,e.exports=o,o.id=48},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=n(0),u=n(17),s=[],c=[];function f(e){var t=e(),n={loading:!0,loaded:null,error:null};return n.promise=t.then((function(e){return n.loading=!1,n.loaded=e,e})).catch((function(e){throw n.loading=!1,n.error=e,e})),n}function p(e){var t={loading:!1,loaded:{},error:null},n=[];try{Object.keys(e).forEach((function(r){var o=f(e[r]);o.loading?t.loading=!0:(t.loaded[r]=o.loaded,t.error=o.error),n.push(o.promise),o.promise.then((function(e){t.loaded[r]=e})).catch((function(e){t.error=e}))}))}catch(r){t.error=r}return t.promise=Promise.all(n).then((function(e){return t.loading=!1,e})).catch((function(e){throw t.loading=!1,e})),t}function d(e,t){return l.createElement((n=e)&&n.__esModule?n.default:n,t);var n}function m(e,t){var f,p;if(!t.loading)throw new Error("react-loadable requires a `loading` component");var m=Object.assign({loader:null,loading:null,delay:200,timeout:null,render:d,webpack:null,modules:null},t),h=null;function g(){return h||(h=e(m.loader)),h.promise}return s.push(g),"function"==typeof m.webpack&&c.push((function(){if(e=m.webpack,"object"===r(n.m)&&e().every((function(e){return void 0!==e&&void 0!==n.m[e]})))return g();var e})),p=f=function(t){function n(r){o(this,n);var a=i(this,t.call(this,r));return a.retry=function(){a.setState({error:null,loading:!0,timedOut:!1}),h=e(m.loader),a._loadModule()},g(),a.state={error:h.error,pastDelay:!1,timedOut:!1,loading:h.loading,loaded:h.loaded},a}return a(n,t),n.preload=function(){return g()},n.prototype.componentWillMount=function(){this._mounted=!0,this._loadModule()},n.prototype._loadModule=function(){var e=this;if(this.context.loadable&&Array.isArray(m.modules)&&m.modules.forEach((function(t){e.context.loadable.report(t)})),h.loading){"number"==typeof m.delay&&(0===m.delay?this.setState({pastDelay:!0}):this._delay=setTimeout((function(){e.setState({pastDelay:!0})}),m.delay)),"number"==typeof m.timeout&&(this._timeout=setTimeout((function(){e.setState({timedOut:!0})}),m.timeout));var t=function(){e._mounted&&(e.setState({error:h.error,loaded:h.loaded,loading:h.loading}),e._clearTimeouts())};h.promise.then((function(){t()})).catch((function(e){t()}))}},n.prototype.componentWillUnmount=function(){this._mounted=!1,this._clearTimeouts()},n.prototype._clearTimeouts=function(){clearTimeout(this._delay),clearTimeout(this._timeout)},n.prototype.render=function(){return this.state.loading||this.state.error?l.createElement(m.loading,{isLoading:this.state.loading,pastDelay:this.state.pastDelay,timedOut:this.state.timedOut,error:this.state.error,retry:this.retry}):this.state.loaded?m.render(this.state.loaded,this.props):null},n}(l.Component),f.contextTypes={loadable:u.shape({report:u.func.isRequired})},p}function h(e){return m(f,e)}h.Map=function(e){if("function"!=typeof e.render)throw new Error("LoadableMap requires a `render(loaded, props)` function");return m(p,e)};var g=function(e){function t(){return o(this,t),i(this,e.apply(this,arguments))}return a(t,e),t.prototype.getChildContext=function(){return{loadable:{report:this.props.report}}},t.prototype.render=function(){return l.Children.only(this.props.children)},t}(l.Component);function v(e){for(var t=[];e.length;){var n=e.pop();t.push(n())}return Promise.all(t).then((function(){if(e.length)return v(e)}))}g.propTypes={report:u.func.isRequired},g.childContextTypes={loadable:u.shape({report:u.func.isRequired}).isRequired},h.Capture=g,h.preloadAll=function(){return new Promise((function(e,t){v(s).then(e,t)}))},h.preloadReady=function(){return new Promise((function(e,t){v(c).then(e,e)}))},e.exports=h},function(e,t){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}},function(e,t,n){var r=n(104);e.exports=d,e.exports.parse=i,e.exports.compile=function(e,t){return l(i(e,t),t)},e.exports.tokensToFunction=l,e.exports.tokensToRegExp=p;var o=new RegExp(["(\\\\.)","([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))"].join("|"),"g");function i(e,t){for(var n,r=[],i=0,a=0,l="",c=t&&t.delimiter||"/";null!=(n=o.exec(e));){var f=n[0],p=n[1],d=n.index;if(l+=e.slice(a,d),a=d+f.length,p)l+=p[1];else{var m=e[a],h=n[2],g=n[3],v=n[4],y=n[5],b=n[6],w=n[7];l&&(r.push(l),l="");var k=null!=h&&null!=m&&m!==h,E="+"===b||"*"===b,x="?"===b||"*"===b,S=n[2]||c,T=v||y;r.push({name:g||i++,prefix:h||"",delimiter:S,optional:x,repeat:E,partial:k,asterisk:!!w,pattern:T?s(T):w?".*":"[^"+u(S)+"]+?"})}}return a<e.length&&(l+=e.substr(a)),l&&r.push(l),r}function a(e){return encodeURI(e).replace(/[\/?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function l(e,t){for(var n=new Array(e.length),o=0;o<e.length;o++)"object"==typeof e[o]&&(n[o]=new RegExp("^(?:"+e[o].pattern+")$",f(t)));return function(t,o){for(var i="",l=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<e.length;s++){var c=e[s];if("string"!=typeof c){var f,p=l[c.name];if(null==p){if(c.optional){c.partial&&(i+=c.prefix);continue}throw new TypeError('Expected "'+c.name+'" to be defined')}if(r(p)){if(!c.repeat)throw new TypeError('Expected "'+c.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length){if(c.optional)continue;throw new TypeError('Expected "'+c.name+'" to not be empty')}for(var d=0;d<p.length;d++){if(f=u(p[d]),!n[s].test(f))throw new TypeError('Expected all "'+c.name+'" to match "'+c.pattern+'", but received `'+JSON.stringify(f)+"`");i+=(0===d?c.prefix:c.delimiter)+f}}else{if(f=c.asterisk?encodeURI(p).replace(/[?#]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})):u(p),!n[s].test(f))throw new TypeError('Expected "'+c.name+'" to match "'+c.pattern+'", but received "'+f+'"');i+=c.prefix+f}}else i+=c}return i}}function u(e){return e.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(e){return e.replace(/([=!:$\/()])/g,"\\$1")}function c(e,t){return e.keys=t,e}function f(e){return e&&e.sensitive?"":"i"}function p(e,t,n){r(t)||(n=t||n,t=[]);for(var o=(n=n||{}).strict,i=!1!==n.end,a="",l=0;l<e.length;l++){var s=e[l];if("string"==typeof s)a+=u(s);else{var p=u(s.prefix),d="(?:"+s.pattern+")";t.push(s),s.repeat&&(d+="(?:"+p+d+")*"),a+=d=s.optional?s.partial?p+"("+d+")?":"(?:"+p+"("+d+"))?":p+"("+d+")"}}var m=u(n.delimiter||"/"),h=a.slice(-m.length)===m;return o||(a=(h?a.slice(0,-m.length):a)+"(?:"+m+"(?=$))?"),a+=i?"$":o&&h?"":"(?="+m+"|$)",c(new RegExp("^"+a,f(n)),t)}function d(e,t,n){return r(t)||(n=t||n,t=[]),n=n||{},e instanceof RegExp?function(e,t){var n=e.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)t.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return c(e,t)}(e,t):r(e)?function(e,t,n){for(var r=[],o=0;o<e.length;o++)r.push(d(e[o],t,n).source);return c(new RegExp("(?:"+r.join("|")+")",f(n)),t)}(e,t,n):function(e,t,n){return p(i(e,n),t,n)}(e,t,n)}},function(e,t,n){"use strict";var r,o,i,a=(r=0,o={util:{encode:function(e){return e instanceof i?new i(e.type,o.util.encode(e.content),e.alias):"Array"===o.util.type(e)?e.map(o.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++r}),e.__id},clone:function(e,t){var n=o.util.type(e);switch(t=t||{},n){case"Object":if(t[o.util.objId(e)])return t[o.util.objId(e)];var r={};for(var i in t[o.util.objId(e)]=r,e)e.hasOwnProperty(i)&&(r[i]=o.util.clone(e[i],t));return r;case"Array":return t[o.util.objId(e)]?t[o.util.objId(e)]:(r=[],t[o.util.objId(e)]=r,e.forEach((function(e,n){r[n]=o.util.clone(e,t)})),r)}return e}},languages:{extend:function(e,t){var n=o.util.clone(o.languages[e]);for(var r in t)n[r]=t[r];return n},insertBefore:function(e,t,n,r){var i=(r=r||o.languages)[e];if(2==arguments.length){for(var a in n=arguments[1])n.hasOwnProperty(a)&&(i[a]=n[a]);return i}var l={};for(var u in i)if(i.hasOwnProperty(u)){if(u==t)for(var a in n)n.hasOwnProperty(a)&&(l[a]=n[a]);l[u]=i[u]}return o.languages.DFS(o.languages,(function(t,n){n===r[e]&&t!=e&&(this[t]=l)})),r[e]=l},DFS:function(e,t,n,r){for(var i in r=r||{},e)e.hasOwnProperty(i)&&(t.call(e,i,e[i],n||i),"Object"!==o.util.type(e[i])||r[o.util.objId(e[i])]?"Array"!==o.util.type(e[i])||r[o.util.objId(e[i])]||(r[o.util.objId(e[i])]=!0,o.languages.DFS(e[i],t,i,r)):(r[o.util.objId(e[i])]=!0,o.languages.DFS(e[i],t,null,r)))}},plugins:{},highlight:function(e,t,n){var r={code:e,grammar:t,language:n};return r.tokens=o.tokenize(r.code,r.grammar),i.stringify(o.util.encode(r.tokens),r.language)},matchGrammar:function(e,t,n,r,i,a,l){var u=o.Token;for(var s in n)if(n.hasOwnProperty(s)&&n[s]){if(s==l)return;var c=n[s];c="Array"===o.util.type(c)?c:[c];for(var f=0;f<c.length;++f){var p=c[f],d=p.inside,m=!!p.lookbehind,h=!!p.greedy,g=0,v=p.alias;if(h&&!p.pattern.global){var y=p.pattern.toString().match(/[imuy]*$/)[0];p.pattern=RegExp(p.pattern.source,y+"g")}p=p.pattern||p;for(var b=r,w=i;b<t.length;w+=t[b].length,++b){var k=t[b];if(t.length>e.length)return;if(!(k instanceof u)){if(h&&b!=t.length-1){if(p.lastIndex=w,!(C=p.exec(e)))break;for(var E=C.index+(m?C[1].length:0),x=C.index+C[0].length,S=b,T=w,_=t.length;S<_&&(T<x||!t[S].type&&!t[S-1].greedy);++S)E>=(T+=t[S].length)&&(++b,w=T);if(t[b]instanceof u)continue;O=S-b,k=e.slice(w,T),C.index-=w}else{p.lastIndex=0;var C=p.exec(k),O=1}if(C){m&&(g=C[1]?C[1].length:0),x=(E=C.index+g)+(C=C[0].slice(g)).length;var P=k.slice(0,E),A=k.slice(x),R=[b,O];P&&(++b,w+=P.length,R.push(P));var N=new u(s,d?o.tokenize(C,d):C,v,C,h);if(R.push(N),A&&R.push(A),Array.prototype.splice.apply(t,R),1!=O&&o.matchGrammar(e,t,n,b,w,!0,s),a)break}else if(a)break}}}}},hooks:{add:function(){}},tokenize:function(e,t,n){var r=[e],i=t.rest;if(i){for(var a in i)t[a]=i[a];delete t.rest}return o.matchGrammar(e,r,t,0,0,!1),r}},(i=o.Token=function(e,t,n,r,o){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!o}).stringify=function(e,t,n){if("string"==typeof e)return e;if("Array"===o.util.type(e))return e.map((function(n){return i.stringify(n,t,e)})).join("");var r={type:e.type,content:i.stringify(e.content,t,n),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:n};if(e.alias){var a="Array"===o.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(r.classes,a)}var l=Object.keys(r.attributes).map((function(e){return e+'="'+(r.attributes[e]||"").replace(/"/g,"&quot;")+'"'})).join(" ");return"<"+r.tag+' class="'+r.classes.join(" ")+'"'+(l?" "+l:"")+">"+r.content+"</"+r.tag+">"},o);a.languages.markup={comment:/<!--[\s\S]*?-->/,prolog:/<\?[\s\S]+?\?>/,doctype:/<!DOCTYPE[\s\S]+?>/i,cdata:/<!\[CDATA\[[\s\S]*?]]>/i,tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/i,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/i,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/i,inside:{punctuation:[/^=/,{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:/&#?[\da-z]{1,8};/i},a.languages.markup.tag.inside["attr-value"].inside.entity=a.languages.markup.entity,a.hooks.add("wrap",(function(e){"entity"===e.type&&(e.attributes.title=e.content.replace(/&amp;/,"&"))})),Object.defineProperty(a.languages.markup.tag,"addInlined",{value:function(e,t){var n={};n["language-"+t]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:a.languages[t]},n.cdata=/^<!\[CDATA\[|\]\]>$/i;var r={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:n}};r["language-"+t]={pattern:/[\s\S]+/,inside:a.languages[t]};var o={};o[e]={pattern:RegExp(/(<__[\s\S]*?>)(?:<!\[CDATA\[[\s\S]*?\]\]>\s*|[\s\S])*?(?=<\/__>)/.source.replace(/__/g,e),"i"),lookbehind:!0,greedy:!0,inside:r},a.languages.insertBefore("markup","cdata",o)}}),a.languages.xml=a.languages.extend("markup",{}),a.languages.html=a.languages.markup,a.languages.mathml=a.languages.markup,a.languages.svg=a.languages.markup,function(e){var t="\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b",n={environment:{pattern:RegExp("\\$"+t),alias:"constant"},variable:[{pattern:/\$?\(\([\s\S]+?\)\)/,greedy:!0,inside:{variable:[{pattern:/(^\$\(\([\s\S]+)\)\)/,lookbehind:!0},/^\$\(\(/],number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/,operator:/--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/,punctuation:/\(\(?|\)\)?|,|;/}},{pattern:/\$\((?:\([^)]+\)|[^()])+\)|`[^`]+`/,greedy:!0,inside:{variable:/^\$\(|^`|\)$|`$/}},{pattern:/\$\{[^}]+\}/,greedy:!0,inside:{operator:/:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,punctuation:/[\[\]]/,environment:{pattern:RegExp("(\\{)"+t),lookbehind:!0,alias:"constant"}}},/\$(?:\w+|[#?*!@$])/],entity:/\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/};e.languages.bash={shebang:{pattern:/^#!\s*\/.*/,alias:"important"},comment:{pattern:/(^|[^"{\\$])#.*/,lookbehind:!0},"function-name":[{pattern:/(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/,lookbehind:!0,alias:"function"},{pattern:/\b\w+(?=\s*\(\s*\)\s*\{)/,alias:"function"}],"for-or-select":{pattern:/(\b(?:for|select)\s+)\w+(?=\s+in\s)/,alias:"variable",lookbehind:!0},"assign-left":{pattern:/(^|[\s;|&]|[<>]\()\w+(?=\+?=)/,inside:{environment:{pattern:RegExp("(^|[\\s;|&]|[<>]\\()"+t),lookbehind:!0,alias:"constant"}},alias:"variable",lookbehind:!0},string:[{pattern:/((?:^|[^<])<<-?\s*)(\w+?)\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\2/,lookbehind:!0,greedy:!0,inside:n},{pattern:/((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s*(?:\r?\n|\r)(?:[\s\S])*?(?:\r?\n|\r)\3/,lookbehind:!0,greedy:!0},{pattern:/(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/,greedy:!0,inside:n}],environment:{pattern:RegExp("\\$?"+t),alias:"constant"},variable:n.variable,function:{pattern:/(^|[\s;|&]|[<>]\()(?:add|apropos|apt|aptitude|apt-cache|apt-get|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,lookbehind:!0},keyword:{pattern:/(^|[\s;|&]|[<>]\()(?:if|then|else|elif|fi|for|while|in|case|esac|function|select|do|done|until)(?=$|[)\s;|&])/,lookbehind:!0},builtin:{pattern:/(^|[\s;|&]|[<>]\()(?:\.|:|break|cd|continue|eval|exec|exit|export|getopts|hash|pwd|readonly|return|shift|test|times|trap|umask|unset|alias|bind|builtin|caller|command|declare|echo|enable|help|let|local|logout|mapfile|printf|read|readarray|source|type|typeset|ulimit|unalias|set|shopt)(?=$|[)\s;|&])/,lookbehind:!0,alias:"class-name"},boolean:{pattern:/(^|[\s;|&]|[<>]\()(?:true|false)(?=$|[)\s;|&])/,lookbehind:!0},"file-descriptor":{pattern:/\B&\d\b/,alias:"important"},operator:{pattern:/\d?<>|>\||\+=|==?|!=?|=~|<<[<-]?|[&\d]?>>|\d?[<>]&?|&[>&]?|\|[&|]?|<=?|>=?/,inside:{"file-descriptor":{pattern:/^\d/,alias:"important"}}},punctuation:/\$?\(\(?|\)\)?|\.\.|[{}[\];\\]/,number:{pattern:/(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,lookbehind:!0}};for(var r=["comment","function-name","for-or-select","assign-left","string","environment","function","keyword","builtin","boolean","file-descriptor","operator","punctuation","number"],o=n.variable[1].inside,i=0;i<r.length;i++)o[r[i]]=e.languages.bash[r[i]];e.languages.shell=e.languages.bash}(a),a.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,boolean:/\b(?:true|false)\b/,function:/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/},a.languages.c=a.languages.extend("clike",{"class-name":{pattern:/(\b(?:enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/,number:/(?:\b0x(?:[\da-f]+\.?[\da-f]*|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i}),a.languages.insertBefore("c","string",{macro:{pattern:/(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,alias:"property",inside:{string:{pattern:/(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/,lookbehind:!0},directive:{pattern:/(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/,lookbehind:!0,alias:"keyword"}}},constant:/\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/}),delete a.languages.c.boolean,a.languages.cpp=a.languages.extend("c",{"class-name":{pattern:/(\b(?:class|enum|struct)\s+)\w+/,lookbehind:!0},keyword:/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+\.?[\da-f']*|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+\.?[\d']*|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]*/i,greedy:!0},operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:true|false)\b/}),a.languages.insertBefore("cpp","string",{"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),function(e){var t=/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:/@[\w-]+[\s\S]*?(?:;|(?=\s*\{))/,inside:{rule:/@[\w-]+/}},url:{pattern:RegExp("url\\((?:"+t.source+"|[^\n\r()]*)\\)","i"),inside:{function:/^url/i,punctuation:/^\(|\)$/}},selector:RegExp("[^{}\\s](?:[^{};\"']|"+t.source+")*?(?=\\s*\\{)"),string:{pattern:t,greedy:!0},property:/[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i,important:/!important\b/i,function:/[-a-z0-9]+(?=\()/i,punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),e.languages.insertBefore("inside","attr-value",{"style-attr":{pattern:/\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i,inside:{"attr-name":{pattern:/^\s*style/i,inside:n.tag.inside},punctuation:/^\s*=\s*['"]|['"]\s*$/,"attr-value":{pattern:/.+/i,inside:e.languages.css}},alias:"language-css"}},n.tag))}(a),a.languages.css.selector={pattern:a.languages.css.selector,inside:{"pseudo-element":/:(?:after|before|first-letter|first-line|selection)|::[-\w]+/,"pseudo-class":/:[-\w]+/,class:/\.[-:.\w]+/,id:/#[-:.\w]+/,attribute:{pattern:/\[(?:[^[\]"']|("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1)*\]/,greedy:!0,inside:{punctuation:/^\[|\]$/,"case-sensitivity":{pattern:/(\s)[si]$/i,lookbehind:!0,alias:"keyword"},namespace:{pattern:/^(\s*)[-*\w\xA0-\uFFFF]*\|(?!=)/,lookbehind:!0,inside:{punctuation:/\|$/}},attribute:{pattern:/^(\s*)[-\w\xA0-\uFFFF]+/,lookbehind:!0},value:[/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,{pattern:/(=\s*)[-\w\xA0-\uFFFF]+(?=\s*$)/,lookbehind:!0}],operator:/[|~*^$]?=/}},"n-th":[{pattern:/(\(\s*)[+-]?\d*[\dn](?:\s*[+-]\s*\d+)?(?=\s*\))/,lookbehind:!0,inside:{number:/[\dn]+/,operator:/[+-]/}},{pattern:/(\(\s*)(?:even|odd)(?=\s*\))/i,lookbehind:!0}],punctuation:/[()]/}},a.languages.insertBefore("css","property",{variable:{pattern:/(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i,lookbehind:!0}}),a.languages.insertBefore("css","function",{operator:{pattern:/(\s)[+\-*\/](?=\s)/,lookbehind:!0},hexcode:/#[\da-f]{3,8}/i,entity:/\\[\da-f]{1,8}/i,unit:{pattern:/(\d)(?:%|[a-z]+)/,lookbehind:!0},number:/-?[\d.]+/}),a.languages.javascript=a.languages.extend("clike",{"class-name":[a.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},{pattern:/(^|[^.])\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],number:/\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/,function:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),a.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,a.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\))/,lookbehind:!0,inside:a.languages.javascript},{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/i,inside:a.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*=>)/,lookbehind:!0,inside:a.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:[_$A-Za-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)(?!\s)(?:[^()]|\([^()]*\))+?(?=\s*\)\s*\{)/,lookbehind:!0,inside:a.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),a.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:a.languages.javascript}},string:/[\s\S]+/}}}),a.languages.markup&&a.languages.markup.tag.addInlined("script","javascript"),a.languages.js=a.languages.javascript,function(e){var t=e.util.clone(e.languages.javascript);e.languages.jsx=e.languages.extend("markup",t),e.languages.jsx.tag.pattern=/<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i,e.languages.jsx.tag.inside.tag.pattern=/^<\/?[^\s>\/]*/i,e.languages.jsx.tag.inside["attr-value"].pattern=/=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i,e.languages.jsx.tag.inside.tag.inside["class-name"]=/^[A-Z]\w*(?:\.[A-Z]\w*)*$/,e.languages.insertBefore("inside","attr-name",{spread:{pattern:/\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/,inside:{punctuation:/\.{3}|[{}.]/,"attr-value":/\w+/}}},e.languages.jsx.tag),e.languages.insertBefore("inside","attr-value",{script:{pattern:/=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i,inside:{"script-punctuation":{pattern:/^=(?={)/,alias:"punctuation"},rest:e.languages.jsx},alias:"language-javascript"}},e.languages.jsx.tag);var n=function(e){return e?"string"==typeof e?e:"string"==typeof e.content?e.content:e.content.map(n).join(""):""},r=function(t){for(var o=[],i=0;i<t.length;i++){var a=t[i],l=!1;if("string"!=typeof a&&("tag"===a.type&&a.content[0]&&"tag"===a.content[0].type?"</"===a.content[0].content[0].content?o.length>0&&o[o.length-1].tagName===n(a.content[0].content[1])&&o.pop():"/>"===a.content[a.content.length-1].content||o.push({tagName:n(a.content[0].content[1]),openedBraces:0}):o.length>0&&"punctuation"===a.type&&"{"===a.content?o[o.length-1].openedBraces++:o.length>0&&o[o.length-1].openedBraces>0&&"punctuation"===a.type&&"}"===a.content?o[o.length-1].openedBraces--:l=!0),(l||"string"==typeof a)&&o.length>0&&0===o[o.length-1].openedBraces){var u=n(a);i<t.length-1&&("string"==typeof t[i+1]||"plain-text"===t[i+1].type)&&(u+=n(t[i+1]),t.splice(i+1,1)),i>0&&("string"==typeof t[i-1]||"plain-text"===t[i-1].type)&&(u=n(t[i-1])+u,t.splice(i-1,1),i--),t[i]=new e.Token("plain-text",u,null,u)}a.content&&"string"!=typeof a.content&&r(a.content)}};e.hooks.add("after-tokenize",(function(e){"jsx"!==e.language&&"tsx"!==e.language||r(e.tokens)}))}(a),function(e){var t=e.languages.javadoclike={parameter:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*@(?:param|arg|arguments)\s+)\w+/m,lookbehind:!0},keyword:{pattern:/(^\s*(?:\/{3}|\*|\/\*\*)\s*|\{)@[a-z][a-zA-Z-]+\b/m,lookbehind:!0},punctuation:/[{}]/};Object.defineProperty(t,"addSupport",{value:function(t,n){"string"==typeof t&&(t=[t]),t.forEach((function(t){!function(t,n){var r=e.languages[t];if(r){var o=r["doc-comment"];if(!o){var i={"doc-comment":{pattern:/(^|[^\\])\/\*\*[^/][\s\S]*?(?:\*\/|$)/,alias:"comment"}};o=(r=e.languages.insertBefore(t,"comment",i))["doc-comment"]}if(o instanceof RegExp&&(o=r["doc-comment"]={pattern:o}),Array.isArray(o))for(var a=0,l=o.length;a<l;a++)o[a]instanceof RegExp&&(o[a]={pattern:o[a]}),n(o[a]);else n(o)}}(t,(function(e){e.inside||(e.inside={}),e.inside.rest=n}))}))}}),t.addSupport(["java","javascript","php"],t)}(a),function(e){var t=/\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/,n=/\b[A-Z](?:\w*[a-z]\w*)?\b/;e.languages.java=e.languages.extend("clike",{"class-name":[n,/\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/],keyword:t,function:[e.languages.clike.function,{pattern:/(\:\:)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0}}),e.languages.insertBefore("java","class-name",{annotation:{alias:"punctuation",pattern:/(^|[^.])@\w+/,lookbehind:!0},namespace:{pattern:/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/,lookbehind:!0,inside:{punctuation:/\./}},generics:{pattern:/<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/,inside:{"class-name":n,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}}})}(a),function(e){function t(e,t){return"___"+e.toUpperCase()+t+"___"}Object.defineProperties(e.languages["markup-templating"]={},{buildPlaceholders:{value:function(n,r,o,i){if(n.language===r){var a=n.tokenStack=[];n.code=n.code.replace(o,(function(e){if("function"==typeof i&&!i(e))return e;for(var o,l=a.length;-1!==n.code.indexOf(o=t(r,l));)++l;return a[l]=e,o})),n.grammar=e.languages.markup}}},tokenizePlaceholders:{value:function(n,r){if(n.language===r&&n.tokenStack){n.grammar=e.languages[r];var o=0,i=Object.keys(n.tokenStack);!function a(l){for(var u=0;u<l.length&&!(o>=i.length);u++){var s=l[u];if("string"==typeof s||s.content&&"string"==typeof s.content){var c=i[o],f=n.tokenStack[c],p="string"==typeof s?s:s.content,d=t(r,c),m=p.indexOf(d);if(m>-1){++o;var h=p.substring(0,m),g=new e.Token(r,e.tokenize(f,n.grammar),"language-"+r,f),v=p.substring(m+d.length),y=[];h&&y.push.apply(y,a([h])),y.push(g),v&&y.push.apply(y,a([v])),"string"==typeof s?l.splice.apply(l,[u,1].concat(y)):s.content=y}}else s.content&&a(s.content)}return l}(n.tokens)}}}})}(a),function(e){e.languages.php=e.languages.extend("clike",{keyword:/\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i,boolean:{pattern:/\b(?:false|true)\b/i,alias:"constant"},constant:[/\b[A-Z_][A-Z0-9_]*\b/,/\b(?:null)\b/i],comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0}}),e.languages.insertBefore("php","string",{"shell-comment":{pattern:/(^|[^\\])#.*/,lookbehind:!0,alias:"comment"}}),e.languages.insertBefore("php","comment",{delimiter:{pattern:/\?>$|^<\?(?:php(?=\s)|=)?/i,alias:"important"}}),e.languages.insertBefore("php","keyword",{variable:/\$+(?:\w+\b|(?={))/i,package:{pattern:/(\\|namespace\s+|use\s+)[\w\\]+/,lookbehind:!0,inside:{punctuation:/\\/}}}),e.languages.insertBefore("php","operator",{property:{pattern:/(->)[\w]+/,lookbehind:!0}});var t={pattern:/{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/,lookbehind:!0,inside:{rest:e.languages.php}};e.languages.insertBefore("php","string",{"nowdoc-string":{pattern:/<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<'[^']+'|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<'?|[';]$/}}}},"heredoc-string":{pattern:/<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i,greedy:!0,alias:"string",inside:{delimiter:{pattern:/^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i,alias:"symbol",inside:{punctuation:/^<<<"?|[";]$/}},interpolation:t}},"single-quoted-string":{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,alias:"string",inside:{interpolation:t}}}),delete e.languages.php.string,e.hooks.add("before-tokenize",(function(t){if(/<\?/.test(t.code)){e.languages["markup-templating"].buildPlaceholders(t,"php",/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#)(?:[^?\n\r]|\?(?!>))*|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/gi)}})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"php")}))}(a),function(e){var t=e.languages.javascript,n=/{(?:[^{}]|{(?:[^{}]|{[^{}]*})*})+}/.source,r="(@(?:param|arg|argument|property)\\s+(?:"+n+"\\s+)?)";e.languages.jsdoc=e.languages.extend("javadoclike",{parameter:{pattern:RegExp(r+/[$\w\xA0-\uFFFF.]+(?=\s|$)/.source),lookbehind:!0,inside:{punctuation:/\./}}}),e.languages.insertBefore("jsdoc","keyword",{"optional-parameter":{pattern:RegExp(r+/\[[$\w\xA0-\uFFFF.]+(?:=[^[\]]+)?\](?=\s|$)/.source),lookbehind:!0,inside:{parameter:{pattern:/(^\[)[$\w\xA0-\uFFFF\.]+/,lookbehind:!0,inside:{punctuation:/\./}},code:{pattern:/(=)[\s\S]*(?=\]$)/,lookbehind:!0,inside:t,alias:"language-javascript"},punctuation:/[=[\]]/}},"class-name":[{pattern:RegExp("(@[a-z]+\\s+)"+n),lookbehind:!0,inside:{punctuation:/[.,:?=<>|{}()[\]]/}},{pattern:/(@(?:augments|extends|class|interface|memberof!?|this)\s+)[A-Z]\w*(?:\.[A-Z]\w*)*/,lookbehind:!0,inside:{punctuation:/\./}}],example:{pattern:/(@example\s+)[^@]+?(?=\s*(?:\*\s*)?(?:@\w|\*\/))/,lookbehind:!0,inside:{code:{pattern:/^(\s*(?:\*\s*)?).+$/m,lookbehind:!0,inside:t,alias:"language-javascript"}}}}),e.languages.javadoclike.addSupport("javascript",e.languages.jsdoc)}(a),a.languages.actionscript=a.languages.extend("javascript",{keyword:/\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/,operator:/\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/}),a.languages.actionscript["class-name"].alias="function",a.languages.markup&&a.languages.insertBefore("actionscript","string",{xml:{pattern:/(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/,lookbehind:!0,inside:{rest:a.languages.markup}}}),function(e){var t=/#(?!\{).+/,n={pattern:/#\{[^}]+\}/,alias:"variable"};e.languages.coffeescript=e.languages.extend("javascript",{comment:t,string:[{pattern:/'(?:\\[\s\S]|[^\\'])*'/,greedy:!0},{pattern:/"(?:\\[\s\S]|[^\\"])*"/,greedy:!0,inside:{interpolation:n}}],keyword:/\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/,"class-member":{pattern:/@(?!\d)\w+/,alias:"variable"}}),e.languages.insertBefore("coffeescript","comment",{"multiline-comment":{pattern:/###[\s\S]+?###/,alias:"comment"},"block-regex":{pattern:/\/{3}[\s\S]*?\/{3}/,alias:"regex",inside:{comment:t,interpolation:n}}}),e.languages.insertBefore("coffeescript","string",{"inline-javascript":{pattern:/`(?:\\[\s\S]|[^\\`])*`/,inside:{delimiter:{pattern:/^`|`$/,alias:"punctuation"},rest:e.languages.javascript}},"multiline-string":[{pattern:/'''[\s\S]*?'''/,greedy:!0,alias:"string"},{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string",inside:{interpolation:n}}]}),e.languages.insertBefore("coffeescript","keyword",{property:/(?!\d)\w+(?=\s*:(?!:))/}),delete e.languages.coffeescript["template-string"],e.languages.coffee=e.languages.coffeescript}(a),function(e){e.languages.insertBefore("javascript","function-variable",{"method-variable":{pattern:RegExp("(\\.\\s*)"+e.languages.javascript["function-variable"].pattern.source),lookbehind:!0,alias:["function-variable","method","function","property-access"]}}),e.languages.insertBefore("javascript","function",{method:{pattern:RegExp("(\\.\\s*)"+e.languages.javascript.function.source),lookbehind:!0,alias:["function","property-access"]}}),e.languages.insertBefore("javascript","constant",{"known-class-name":[{pattern:/\b(?:(?:(?:Uint|Int)(?:8|16|32)|Uint8Clamped|Float(?:32|64))?Array|ArrayBuffer|BigInt|Boolean|DataView|Date|Error|Function|Intl|JSON|Math|Number|Object|Promise|Proxy|Reflect|RegExp|String|Symbol|(?:Weak)?(?:Set|Map)|WebAssembly)\b/,alias:"class-name"},{pattern:/\b(?:[A-Z]\w*)Error\b/,alias:"class-name"}]}),e.languages.javascript.keyword.unshift({pattern:/\b(?:as|default|export|from|import)\b/,alias:"module"},{pattern:/\bnull\b/,alias:["null","nil"]},{pattern:/\bundefined\b/,alias:"nil"}),e.languages.insertBefore("javascript","operator",{spread:{pattern:/\.{3}/,alias:"operator"},arrow:{pattern:/=>/,alias:"operator"}}),e.languages.insertBefore("javascript","punctuation",{"property-access":{pattern:/(\.\s*)#?[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*/,lookbehind:!0},"maybe-class-name":{pattern:/(^|[^$\w\xA0-\uFFFF])[A-Z][$\w\xA0-\uFFFF]+/,lookbehind:!0},dom:{pattern:/\b(?:document|location|navigator|performance|(?:local|session)Storage|window)\b/,alias:"variable"},console:{pattern:/\bconsole(?=\s*\.)/,alias:"class-name"}});for(var t=["function","function-variable","method","method-variable","property-access"],n=0;n<t.length;n++){var r=t[n],o=e.languages.javascript[r];"RegExp"===e.util.type(o)&&(o=e.languages.javascript[r]={pattern:o});var i=o.inside||{};o.inside=i,i["maybe-class-name"]=/^[A-Z][\s\S]*/}}(a),function(e){e.languages.flow=e.languages.extend("javascript",{}),e.languages.insertBefore("flow","keyword",{type:[{pattern:/\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/,alias:"tag"}]}),e.languages.flow["function-variable"].pattern=/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,delete e.languages.flow.parameter,e.languages.insertBefore("flow","operator",{"flow-punctuation":{pattern:/\{\||\|\}/,alias:"punctuation"}}),Array.isArray(e.languages.flow.keyword)||(e.languages.flow.keyword=[e.languages.flow.keyword]),e.languages.flow.keyword.unshift({pattern:/(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/,lookbehind:!0},{pattern:/(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/,lookbehind:!0})}(a),a.languages.n4js=a.languages.extend("javascript",{keyword:/\b(?:any|Array|boolean|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|false|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|module|new|null|number|package|private|protected|public|return|set|static|string|super|switch|this|throw|true|try|typeof|var|void|while|with|yield)\b/}),a.languages.insertBefore("n4js","constant",{annotation:{pattern:/@+\w+/,alias:"operator"}}),a.languages.n4jsd=a.languages.n4js,a.languages.typescript=a.languages.extend("javascript",{keyword:/\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/,builtin:/\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/}),a.languages.ts=a.languages.typescript,function(e){var t=e.languages.javascript["template-string"],n=t.pattern.source,r=t.inside.interpolation,o=r.inside["interpolation-punctuation"],i=r.pattern.source;function a(t,r){if(e.languages[t])return{pattern:RegExp("((?:"+r+")\\s*)"+n),lookbehind:!0,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},"embedded-code":{pattern:/[\s\S]+/,alias:t}}}}function l(e,t){return"___"+t.toUpperCase()+"_"+e+"___"}function u(t,n,r){var o={code:t,grammar:n,language:r};return e.hooks.run("before-tokenize",o),o.tokens=e.tokenize(o.code,o.grammar),e.hooks.run("after-tokenize",o),o.tokens}function s(t){var n={};n["interpolation-punctuation"]=o;var i=e.tokenize(t,n);if(3===i.length){var a=[1,1];a.push.apply(a,u(i[1],e.languages.javascript,"javascript")),i.splice.apply(i,a)}return new e.Token("interpolation",i,r.alias,t)}function c(t,n,r){var o=e.tokenize(t,{interpolation:{pattern:RegExp(i),lookbehind:!0}}),a=0,c={},f=u(o.map((function(e){if("string"==typeof e)return e;for(var n,o=e.content;-1!==t.indexOf(n=l(a++,r)););return c[n]=o,n})).join(""),n,r),p=Object.keys(c);return a=0,function e(t){for(var n=0;n<t.length;n++){if(a>=p.length)return;var r=t[n];if("string"==typeof r||"string"==typeof r.content){var o=p[a],i="string"==typeof r?r:r.content,l=i.indexOf(o);if(-1!==l){++a;var u=i.substring(0,l),f=s(c[o]),d=i.substring(l+o.length),m=[];if(u&&m.push(u),m.push(f),d){var h=[d];e(h),m.push.apply(m,h)}"string"==typeof r?(t.splice.apply(t,[n,1].concat(m)),n+=m.length-1):r.content=m}}else{var g=r.content;Array.isArray(g)?e(g):e([g])}}}(f),new e.Token(r,f,"language-"+r,t)}e.languages.javascript["template-string"]=[a("css",/\b(?:styled(?:\([^)]*\))?(?:\s*\.\s*\w+(?:\([^)]*\))*)*|css(?:\s*\.\s*(?:global|resolve))?|createGlobalStyle|keyframes)/.source),a("html",/\bhtml|\.\s*(?:inner|outer)HTML\s*\+?=/.source),a("svg",/\bsvg/.source),a("markdown",/\b(?:md|markdown)/.source),a("graphql",/\b(?:gql|graphql(?:\s*\.\s*experimental)?)/.source),t].filter(Boolean);var f={javascript:!0,js:!0,typescript:!0,ts:!0,jsx:!0,tsx:!0};function p(e){return"string"==typeof e?e:Array.isArray(e)?e.map(p).join(""):p(e.content)}e.hooks.add("after-tokenize",(function(t){t.language in f&&function t(n){for(var r=0,o=n.length;r<o;r++){var i=n[r];if("string"!=typeof i){var a=i.content;if(Array.isArray(a))if("template-string"===i.type){var l=a[1];if(3===a.length&&"string"!=typeof l&&"embedded-code"===l.type){var u=p(l),s=l.alias,f=Array.isArray(s)?s[0]:s,d=e.languages[f];if(!d)continue;a[1]=c(u,d,f)}}else t(a);else"string"!=typeof a&&t([a])}}}(t.tokens)}))}(a),a.languages.graphql={comment:/#.*/,string:{pattern:/"(?:\\.|[^\\"\r\n])*"/,greedy:!0},number:/(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i,boolean:/\b(?:true|false)\b/,variable:/\$[a-z_]\w*/i,directive:{pattern:/@[a-z_]\w*/i,alias:"function"},"attr-name":{pattern:/[a-z_]\w*(?=\s*(?:\((?:[^()"]|"(?:\\.|[^\\"\r\n])*")*\))?:)/i,greedy:!0},"class-name":{pattern:/(\b(?:enum|implements|interface|on|scalar|type|union)\s+)[a-zA-Z_]\w*/,lookbehind:!0},fragment:{pattern:/(\bfragment\s+|\.{3}\s*(?!on\b))[a-zA-Z_]\w*/,lookbehind:!0,alias:"function"},keyword:/\b(?:enum|fragment|implements|input|interface|mutation|on|query|scalar|schema|type|union)\b/,operator:/[!=|]|\.{3}/,punctuation:/[!(){}\[\]:=,]/,constant:/\b(?!ID\b)[A-Z][A-Z_\d]*\b/},function(e){var t=/(?:\\.|[^\\\n\r]|(?:\r?\n|\r)(?!\r?\n|\r))/.source;function n(e,n){return e=e.replace(/<inner>/g,t),n&&(e=e+"|"+e.replace(/_/g,"\\*")),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+e+")")}var r=/(?:\\.|``.+?``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,o=/\|?__(?:\|__)+\|?(?:(?:\r?\n|\r)|$)/.source.replace(/__/g,r),i=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\r?\n|\r)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+o+i+"(?:"+o+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+o+i+")(?:"+o+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+o+")"+i+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+o+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/(^[ \t]*(?:\r?\n|\r))(?: {4}|\t).+(?:(?:\r?\n|\r)(?: {4}|\t).+)*/m,lookbehind:!0,alias:"keyword"},{pattern:/``.+?``|`[^`\r\n]+`/,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\r?\n|\r)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#+.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_/.source,!0),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+?\2/.source,!1),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[(?:(?!\])<inner>)+\])/.source,!1),lookbehind:!0,greedy:!0,inside:{variable:{pattern:/(\[)[^\]]+(?=\]$)/,lookbehind:!0},content:{pattern:/(^!?\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},string:{pattern:/"(?:\\.|[^"\\])*"(?=\)$)/}}}}),["url","bold","italic","strike"].forEach((function(t){["url","bold","italic","strike"].forEach((function(n){t!==n&&(e.languages.markdown[t].inside.content.inside[n]=e.languages.markdown[n])}))})),e.hooks.add("after-tokenize",(function(e){"markdown"!==e.language&&"md"!==e.language||function e(t){if(t&&"string"!=typeof t)for(var n=0,r=t.length;n<r;n++){var o=t[n];if("code"===o.type){var i=o.content[1],a=o.content[3];if(i&&a&&"code-language"===i.type&&"code-block"===a.type&&"string"==typeof i.content){var l="language-"+i.content.trim().split(/\s+/)[0].toLowerCase();a.alias?"string"==typeof a.alias?a.alias=[a.alias,l]:a.alias.push(l):a.alias=[l]}}else e(o.content)}}(e.tokens)})),e.hooks.add("wrap",(function(t){if("code-block"===t.type){for(var n="",r=0,o=t.classes.length;r<o;r++){var i=t.classes[r],a=/language-(.+)/.exec(i);if(a){n=a[1];break}}var l=e.languages[n];if(l){var u=t.content.replace(/&lt;/g,"<").replace(/&amp;/g,"&");t.content=e.highlight(u,l,n)}else if(n&&"none"!==n&&e.plugins.autoloader){var s="md-"+(new Date).valueOf()+"-"+Math.floor(1e16*Math.random());t.attributes.id=s,e.plugins.autoloader.loadLanguages(n,(function(){var t=document.getElementById(s);t&&(t.innerHTML=e.highlight(t.textContent,e.languages[n],n))}))}}})),e.languages.md=e.languages.markdown}(a),function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d+.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach((function(n){var r=t[n],o=[];/^\w+$/.test(n)||o.push(/\w+/.exec(n)[0]),"diff"===n&&o.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+"].*(?:\r\n?|\n|(?![\\s\\S])))+","m"),alias:o}})),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})}(a),a.languages.git={comment:/^#.*/m,deleted:/^[-\u2013].*/m,inserted:/^\+.*/m,string:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m,command:{pattern:/^.*\$ git .*$/m,inside:{parameter:/\s--?\w+/m}},coord:/^@@.*@@$/m,commit_sha1:/^commit \w{40}$/m},a.languages.go=a.languages.extend("clike",{keyword:/\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/,builtin:/\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/,boolean:/\b(?:_|iota|nil|true|false)\b/,operator:/[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./,number:/(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i,string:{pattern:/(["'`])(\\[\s\S]|(?!\1)[^\\])*\1/,greedy:!0}}),delete a.languages.go["class-name"],function(e){e.languages.handlebars={comment:/\{\{![\s\S]*?\}\}/,delimiter:{pattern:/^\{\{\{?|\}\}\}?$/i,alias:"punctuation"},string:/(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/,number:/\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,boolean:/\b(?:true|false)\b/,block:{pattern:/^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i,lookbehind:!0,alias:"keyword"},brackets:{pattern:/\[[^\]]+\]/,inside:{punctuation:/\[|\]/,variable:/[\s\S]+/}},punctuation:/[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/,variable:/[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/},e.hooks.add("before-tokenize",(function(t){e.languages["markup-templating"].buildPlaceholders(t,"handlebars",/\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g)})),e.hooks.add("after-tokenize",(function(t){e.languages["markup-templating"].tokenizePlaceholders(t,"handlebars")}))}(a),a.languages.json={property:{pattern:/"(?:\\.|[^\\"\r\n])*"(?=\s*:)/,greedy:!0},string:{pattern:/"(?:\\.|[^\\"\r\n])*"(?!\s*:)/,greedy:!0},comment:/\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/,number:/-?\d+\.?\d*(e[+-]?\d+)?/i,punctuation:/[{}[\],]/,operator:/:/,boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"}},a.languages.less=a.languages.extend("css",{comment:[/\/\*[\s\S]*?\*\//,{pattern:/(^|[^\\])\/\/.*/,lookbehind:!0}],atrule:{pattern:/@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i,inside:{punctuation:/[:()]/}},selector:{pattern:/(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/,inside:{variable:/@+[\w-]+/}},property:/(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i,operator:/[+\-*\/]/}),a.languages.insertBefore("less","property",{variable:[{pattern:/@[\w-]+\s*:/,inside:{punctuation:/:/}},/@@?[\w-]+/],"mixin-usage":{pattern:/([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/,lookbehind:!0,alias:"function"}}),a.languages.makefile={comment:{pattern:/(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/,lookbehind:!0},string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},builtin:/\.[A-Z][^:#=\s]+(?=\s*:(?!=))/,symbol:{pattern:/^[^:=\r\n]+(?=\s*:(?!=))/m,inside:{variable:/\$+(?:[^(){}:#=\s]+|(?=[({]))/}},variable:/\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/,keyword:[/-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/,{pattern:/(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/,lookbehind:!0}],operator:/(?:::|[?:+!])?=|[|@]/,punctuation:/[:;(){}]/},a.languages.objectivec=a.languages.extend("c",{keyword:/\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,string:/("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete a.languages.objectivec["class-name"],a.languages.ocaml={comment:/\(\*[\s\S]*?\*\)/,string:[{pattern:/"(?:\\.|[^\\\r\n"])*"/,greedy:!0},{pattern:/(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i,greedy:!0}],number:/\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i,type:{pattern:/\B['`]\w*/,alias:"variable"},directive:{pattern:/\B#\w+/,alias:"function"},keyword:/\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/,boolean:/\b(?:false|true)\b/,operator:/:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/,punctuation:/[(){}\[\]|_.,:;]/},a.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},"string-interpolation":{pattern:/(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^\s*)@\w+(?:\.\w+)*/i,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:True|False|None)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},a.languages.python["string-interpolation"].inside.interpolation.inside.rest=a.languages.python,a.languages.py=a.languages.python,a.languages.reason=a.languages.extend("clike",{comment:{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,greedy:!0},"class-name":/\b[A-Z]\w*/,keyword:/\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/,operator:/\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/}),a.languages.insertBefore("reason","class-name",{character:{pattern:/'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/,alias:"string"},constructor:{pattern:/\b[A-Z]\w*\b(?!\s*\.)/,alias:"variable"},label:{pattern:/\b[a-z]\w*(?=::)/,alias:"symbol"}}),delete a.languages.reason.function,function(e){e.languages.sass=e.languages.extend("css",{comment:{pattern:/^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m,lookbehind:!0}}),e.languages.insertBefore("sass","atrule",{"atrule-line":{pattern:/^(?:[ \t]*)[@+=].+/m,inside:{atrule:/(?:@[\w-]+|[+=])/m}}}),delete e.languages.sass.atrule;var t=/\$[-\w]+|#\{\$[-\w]+\}/,n=[/[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/,{pattern:/(\s+)-(?=\s)/,lookbehind:!0}];e.languages.insertBefore("sass","property",{"variable-line":{pattern:/^[ \t]*\$.+/m,inside:{punctuation:/:/,variable:t,operator:n}},"property-line":{pattern:/^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m,inside:{property:[/[^:\s]+(?=\s*:)/,{pattern:/(:)[^:\s]+/,lookbehind:!0}],punctuation:/:/,variable:t,operator:n,important:e.languages.sass.important}}}),delete e.languages.sass.property,delete e.languages.sass.important,e.languages.insertBefore("sass","punctuation",{selector:{pattern:/([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/,lookbehind:!0}})}(a),a.languages.scss=a.languages.extend("css",{comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},atrule:{pattern:/@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/,inside:{rule:/@[\w-]+/}},url:/(?:[-a-z]+-)?url(?=\()/i,selector:{pattern:/(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m,inside:{parent:{pattern:/&/,alias:"important"},placeholder:/%[-\w]+/,variable:/\$[-\w]+|#\{\$[-\w]+\}/}},property:{pattern:/(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/,inside:{variable:/\$[-\w]+|#\{\$[-\w]+\}/}}}),a.languages.insertBefore("scss","atrule",{keyword:[/@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i,{pattern:/( +)(?:from|through)(?= )/,lookbehind:!0}]}),a.languages.insertBefore("scss","important",{variable:/\$[-\w]+|#\{\$[-\w]+\}/}),a.languages.insertBefore("scss","function",{placeholder:{pattern:/%[-\w]+/,alias:"selector"},statement:{pattern:/\B!(?:default|optional)\b/i,alias:"keyword"},boolean:/\b(?:true|false)\b/,null:{pattern:/\bnull\b/,alias:"keyword"},operator:{pattern:/(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/,lookbehind:!0}}),a.languages.scss.atrule.inside.rest=a.languages.scss,a.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:TRUE|FALSE|NULL)\b/i,number:/\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t={url:/url\((["']?).*?\1\)/i,string:{pattern:/("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/,greedy:!0},interpolation:null,func:null,important:/\B!(?:important|optional)\b/i,keyword:{pattern:/(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/,lookbehind:!0},hexcode:/#[\da-f]{3,6}/i,number:/\b\d+(?:\.\d+)?%?/,boolean:/\b(?:true|false)\b/,operator:[/~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/],punctuation:/[{}()\[\];:,]/};t.interpolation={pattern:/\{[^\r\n}:]+\}/,alias:"variable",inside:{delimiter:{pattern:/^{|}$/,alias:"punctuation"},rest:t}},t.func={pattern:/[\w-]+\([^)]*\).*/,inside:{function:/^[^(]+/,rest:t}},e.languages.stylus={comment:{pattern:/(^|[^\\])(\/\*[\s\S]*?\*\/|\/\/.*)/,lookbehind:!0},"atrule-declaration":{pattern:/(^\s*)@.+/m,lookbehind:!0,inside:{atrule:/^@[\w-]+/,rest:t}},"variable-declaration":{pattern:/(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m,lookbehind:!0,inside:{variable:/^\S+/,rest:t}},statement:{pattern:/(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m,lookbehind:!0,inside:{keyword:/^\S+/,rest:t}},"property-declaration":{pattern:/((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(\r?\n|\r)(?:\{|\2[ \t]+)))/m,lookbehind:!0,inside:{property:{pattern:/^[^\s:]+/,inside:{interpolation:t.interpolation}},rest:t}},selector:{pattern:/(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m,lookbehind:!0,inside:{interpolation:t.interpolation,punctuation:/[{},]/}},func:t.func,string:t.string,interpolation:t.interpolation,punctuation:/[{}()\[\];:.]/}}(a);var l=a.util.clone(a.languages.typescript);a.languages.tsx=a.languages.extend("jsx",l),a.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^_`|~]+/i,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/},a.languages.yaml={scalar:{pattern:/([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/,lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:/(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/,lookbehind:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m,lookbehind:!0,alias:"number"},boolean:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},null:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im,lookbehind:!0,alias:"important"},string:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}|\s*#))/m,lookbehind:!0,greedy:!0},number:{pattern:/([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im,lookbehind:!0},tag:/![^\s]+/,important:/[&*][\w]+/,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},a.languages.yml=a.languages.yaml,t.a=a},function(e,t,n){"use strict";var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(o){return!1}}()?Object.assign:function(e,t){for(var n,l,u=a(e),s=1;s<arguments.length;s++){for(var c in n=Object(arguments[s]))o.call(n,c)&&(u[c]=n[c]);if(r){l=r(n);for(var f=0;f<l.length;f++)i.call(n,l[f])&&(u[l[f]]=n[l[f]])}}return u}},function(e,t,n){"use strict";var r=n(64)(!0);e.exports=function(e,t,n){return t+(n?r(e,t).length:1)}},function(e,t,n){"use strict";var r=n(34),o=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==r(e))throw new TypeError("RegExp#exec called on incompatible receiver");return o.call(e,t)}},function(e,t,n){"use strict";n(93);var r=n(15),o=n(11),i=n(14),a=n(27),l=n(2),u=n(44),s=l("species"),c=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var p=l(e),d=!i((function(){var t={};return t[p]=function(){return 7},7!=""[e](t)})),m=d?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[s]=function(){return n}),n[p](""),!t})):void 0;if(!d||!m||"replace"===e&&!c||"split"===e&&!f){var h=/./[p],g=n(a,p,""[e],(function(e,t,n,r,o){return t.exec===u?d&&!o?{done:!0,value:h.call(t,n,r)}:{done:!0,value:e.call(n,t,r)}:{done:!1}})),v=g[0],y=g[1];r(String.prototype,e,v),o(RegExp.prototype,p,2==t?function(e,t){return y.call(e,this,t)}:function(e){return y.call(e,this)})}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(21);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){var r=n(31),o=n(23);n(101)("keys",(function(){return function(e){return o(r(e))}}))},function(e,t,n){"use strict";var r,o,i,a,l=n(42),u=n(5),s=n(25),c=n(34),f=n(12),p=n(13),d=n(32),m=n(113),h=n(114),g=n(63),v=n(70).set,y=n(119)(),b=n(71),w=n(120),k=n(121),E=n(122),x=u.TypeError,S=u.process,T=S&&S.versions,_=T&&T.v8||"",C=u.Promise,O="process"==c(S),P=function(){},A=o=b.f,R=!!function(){try{var e=C.resolve(1),t=(e.constructor={})[n(2)("species")]=function(e){e(P,P)};return(O||"function"==typeof PromiseRejectionEvent)&&e.then(P)instanceof t&&0!==_.indexOf("6.6")&&-1===k.indexOf("Chrome/66")}catch(r){}}(),N=function(e){var t;return!(!p(e)||"function"!=typeof(t=e.then))&&t},I=function(e,t){if(!e._n){e._n=!0;var n=e._c;y((function(){for(var r=e._v,o=1==e._s,i=0,a=function(t){var n,i,a,l=o?t.ok:t.fail,u=t.resolve,s=t.reject,c=t.domain;try{l?(o||(2==e._h&&F(e),e._h=1),!0===l?n=r:(c&&c.enter(),n=l(r),c&&(c.exit(),a=!0)),n===t.promise?s(x("Promise-chain cycle")):(i=N(n))?i.call(n,u,s):u(n)):s(r)}catch(f){c&&!a&&c.exit(),s(f)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&L(e)}))}},L=function(e){v.call(u,(function(){var t,n,r,o=e._v,i=j(e);if(i&&(t=w((function(){O?S.emit("unhandledRejection",o,e):(n=u.onunhandledrejection)?n({promise:e,reason:o}):(r=u.console)&&r.error&&r.error("Unhandled promise rejection",o)})),e._h=O||j(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},j=function(e){return 1!==e._h&&0===(e._a||e._c).length},F=function(e){v.call(u,(function(){var t;O?S.emit("rejectionHandled",e):(t=u.onrejectionhandled)&&t({promise:e,reason:e._v})}))},D=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),I(t,!0))},M=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw x("Promise can't be resolved itself");(t=N(e))?y((function(){var r={_w:n,_d:!1};try{t.call(e,s(M,r,1),s(D,r,1))}catch(o){D.call(r,o)}})):(n._v=e,n._s=1,I(n,!1))}catch(r){D.call({_w:n,_d:!1},r)}}};R||(C=function(e){m(this,C,"Promise","_h"),d(e),r.call(this);try{e(s(M,this,1),s(D,this,1))}catch(t){D.call(this,t)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(123)(C.prototype,{then:function(e,t){var n=A(g(this,C));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=O?S.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&I(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new r;this.promise=e,this.resolve=s(M,e,1),this.reject=s(D,e,1)},b.f=A=function(e){return e===C||e===a?new i(e):o(e)}),f(f.G+f.W+f.F*!R,{Promise:C}),n(47)(C,"Promise"),n(85)("Promise"),a=n(16).Promise,f(f.S+f.F*!R,"Promise",{reject:function(e){var t=A(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(l||!R),"Promise",{resolve:function(e){return E(l&&this===a?C:this,e)}}),f(f.S+f.F*!(R&&n(124)((function(e){C.all(e).catch(P)}))),"Promise",{all:function(e){var t=this,n=A(t),r=n.resolve,o=n.reject,i=w((function(){var n=[],i=0,a=1;h(e,!1,(function(e){var l=i++,u=!1;n.push(void 0),a++,t.resolve(e).then((function(e){u||(u=!0,n[l]=e,--a||r(n))}),o)})),--a||r(n)}));return i.e&&o(i.v),n.promise},race:function(e){var t=this,n=A(t),r=n.reject,o=w((function(){h(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return o.e&&r(o.v),n.promise}})},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var r=n(8),o=n(32),i=n(2)("species");e.exports=function(e,t){var n,a=r(e).constructor;return void 0===a||null==(n=r(a)[i])?t:o(n)}},function(e,t,n){var r=n(33),o=n(27);e.exports=function(e){return function(t,n){var i,a,l=String(o(t)),u=r(n),s=l.length;return u<0||u>=s?e?"":void 0:(i=l.charCodeAt(u))<55296||i>56319||u+1===s||(a=l.charCodeAt(u+1))<56320||a>57343?e?l.charAt(u):i:e?l.slice(u,u+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var r=n(42),o=n(12),i=n(15),a=n(11),l=n(22),u=n(96),s=n(47),c=n(100),f=n(2)("iterator"),p=!([].keys&&"next"in[].keys()),d=function(){return this};e.exports=function(e,t,n,m,h,g,v){u(n,t,m);var y,b,w,k=function(e){if(!p&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},E=t+" Iterator",x="values"==h,S=!1,T=e.prototype,_=T[f]||T["@@iterator"]||h&&T[h],C=_||k(h),O=h?x?k("entries"):C:void 0,P="Array"==t&&T.entries||_;if(P&&(w=c(P.call(new e)))!==Object.prototype&&w.next&&(s(w,E,!0),r||"function"==typeof w[f]||a(w,f,d)),x&&_&&"values"!==_.name&&(S=!0,C=function(){return _.call(this)}),r&&!v||!p&&!S&&T[f]||a(T,f,C),l[t]=C,l[E]=d,h)if(y={values:x?C:k("values"),keys:g?C:k("keys"),entries:O},v)for(b in y)b in T||i(T,b,y[b]);else o(o.P+o.F*(p||S),t,y);return y}},function(e,t,n){var r=n(5).document;e.exports=r&&r.documentElement},function(e,t,n){"use strict";var r=n(18);t.a=r.b},function(e,t,n){"use strict";e.exports=n(105)},function(e,t,n){"use strict";var r=n(0),o=n.n(r);t.a=o.a.createContext({})},function(e,t,n){var r,o,i,a=n(25),l=n(118),u=n(66),s=n(45),c=n(5),f=c.process,p=c.setImmediate,d=c.clearImmediate,m=c.MessageChannel,h=c.Dispatch,g=0,v={},y=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){y.call(e.data)};p&&d||(p=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++g]=function(){l("function"==typeof e?e:Function(e),t)},r(g),g},d=function(e){delete v[e]},"process"==n(21)(f)?r=function(e){f.nextTick(a(y,e,1))}:h&&h.now?r=function(e){h.now(a(y,e,1))}:m?(i=(o=new m).port2,o.port1.onmessage=b,r=a(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(r=function(e){c.postMessage(e+"","*")},c.addEventListener("message",b,!1)):r="onreadystatechange"in s("script")?function(e){u.appendChild(s("script")).onreadystatechange=function(){u.removeChild(this),y.call(e)}}:function(e){setTimeout(a(y,e,1),0)}),e.exports={set:p,clear:d}},function(e,t,n){"use strict";var r=n(32);function o(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new o(e)}},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}}(),e.exports=n(90)},function(e,t,n){"use strict";(function(t){var n="__global_unique_id__";e.exports=function(){return t[n]=(t[n]||0)+1}}).call(this,n(75))},function(e,t,n){"use strict";var r=n(68),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},l={};function u(e){return r.isMemo(e)?a:l[e.$$typeof]||o}l[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},l[r.Memo]=a;var s=Object.defineProperty,c=Object.getOwnPropertyNames,f=Object.getOwnPropertySymbols,p=Object.getOwnPropertyDescriptor,d=Object.getPrototypeOf,m=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(m){var o=d(n);o&&o!==m&&e(t,o,r)}var a=c(n);f&&(a=a.concat(f(n)));for(var l=u(t),h=u(n),g=0;g<a.length;++g){var v=a[g];if(!(i[v]||r&&r[v]||h&&h[v]||l&&l[v])){var y=p(n,v);try{s(t,v,y)}catch(b){}}}}return t}},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(13),o=n(21),i=n(2)("match");e.exports=function(e){var t;return r(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==o(e))}},function(e,t,n){var r=n(2)("unscopables"),o=Array.prototype;null==o[r]&&n(11)(o,r,{}),e.exports=function(e){o[r][e]=!0}},function(e,t,n){var r=n(12);r(r.S+r.F,"Object",{assign:n(125)})},function(e,t,n){"use strict";var r=n(76),o=n(8),i=n(63),a=n(54),l=n(24),u=n(55),s=n(44),c=n(14),f=Math.min,p=[].push,d="length",m=!c((function(){RegExp(4294967295,"y")}));n(56)("split",2,(function(e,t,n,c){var h;return h="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[d]||2!="ab".split(/(?:ab)*/)[d]||4!=".".split(/(.?)(.?)/)[d]||".".split(/()()/)[d]>1||"".split(/.?/)[d]?function(e,t){var o=String(this);if(void 0===e&&0===t)return[];if(!r(e))return n.call(o,e,t);for(var i,a,l,u=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,m=void 0===t?4294967295:t>>>0,h=new RegExp(e.source,c+"g");(i=s.call(h,o))&&!((a=h.lastIndex)>f&&(u.push(o.slice(f,i.index)),i[d]>1&&i.index<o[d]&&p.apply(u,i.slice(1)),l=i[0][d],f=a,u[d]>=m));)h.lastIndex===i.index&&h.lastIndex++;return f===o[d]?!l&&h.test("")||u.push(""):u.push(o.slice(f)),u[d]>m?u.slice(0,m):u}:"0".split(void 0,0)[d]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,r){var o=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,o,r):h.call(String(o),n,r)},function(e,t){var r=c(h,e,this,t,h!==n);if(r.done)return r.value;var s=o(e),p=String(this),d=i(s,RegExp),g=s.unicode,v=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(m?"y":"g"),y=new d(m?s:"^(?:"+s.source+")",v),b=void 0===t?4294967295:t>>>0;if(0===b)return[];if(0===p.length)return null===u(y,p)?[p]:[];for(var w=0,k=0,E=[];k<p.length;){y.lastIndex=m?k:0;var x,S=u(y,m?p:p.slice(k));if(null===S||(x=f(l(y.lastIndex+(m?0:k)),p.length))===w)k=a(p,k,g);else{if(E.push(p.slice(w,k)),E.length===b)return E;for(var T=1;T<=S.length-1;T++)if(E.push(S[T]),E.length===b)return E;k=w=x}}return E.push(p.slice(w)),E}]}))},function(e,t,n){"use strict";var r=n(8);e.exports=function(){var e=r(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){e.exports=!n(9)&&!n(14)((function(){return 7!=Object.defineProperty(n(45)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(13);e.exports=function(e,t){if(!r(e))return e;var n,o;if(t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;if("function"==typeof(n=e.valueOf)&&!r(o=n.call(e)))return o;if(!t&&"function"==typeof(n=e.toString)&&!r(o=n.call(e)))return o;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var r=n(29),o=n(30),i=n(84)(!1),a=n(46)("IE_PROTO");e.exports=function(e,t){var n,l=o(e),u=0,s=[];for(n in l)n!=a&&r(l,n)&&s.push(n);for(;t.length>u;)r(l,n=t[u++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){var r=n(30),o=n(24),i=n(99);e.exports=function(e){return function(t,n,a){var l,u=r(t),s=o(u.length),c=i(a,s);if(e&&n!=n){for(;s>c;)if((l=u[c++])!=l)return!0}else for(;s>c;c++)if((e||c in u)&&u[c]===n)return e||c||0;return!e&&-1}}},function(e,t,n){"use strict";var r=n(5),o=n(28),i=n(9),a=n(2)("species");e.exports=function(e){var t=r[e];i&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";var r=n(64)(!0);n(65)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var r=n(8),o=n(31),i=n(24),a=n(33),l=n(54),u=n(55),s=Math.max,c=Math.min,f=Math.floor,p=/\$([$&`']|\d\d?|<[^>]*>)/g,d=/\$([$&`']|\d\d?)/g;n(56)("replace",2,(function(e,t,n,m){return[function(r,o){var i=e(this),a=null==r?void 0:r[t];return void 0!==a?a.call(r,i,o):n.call(String(i),r,o)},function(e,t){var o=m(n,e,this,t);if(o.done)return o.value;var f=r(e),p=String(this),d="function"==typeof t;d||(t=String(t));var g=f.global;if(g){var v=f.unicode;f.lastIndex=0}for(var y=[];;){var b=u(f,p);if(null===b)break;if(y.push(b),!g)break;""===String(b[0])&&(f.lastIndex=l(p,i(f.lastIndex),v))}for(var w,k="",E=0,x=0;x<y.length;x++){b=y[x];for(var S=String(b[0]),T=s(c(a(b.index),p.length),0),_=[],C=1;C<b.length;C++)_.push(void 0===(w=b[C])?w:String(w));var O=b.groups;if(d){var P=[S].concat(_,T,p);void 0!==O&&P.push(O);var A=String(t.apply(void 0,P))}else A=h(S,p,T,_,O,t);T>=E&&(k+=p.slice(E,T)+A,E=T+S.length)}return k+p.slice(E)}];function h(e,t,r,i,a,l){var u=r+e.length,s=i.length,c=d;return void 0!==a&&(a=o(a),c=p),n.call(l,c,(function(n,o){var l;switch(o.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,r);case"'":return t.slice(u);case"<":l=a[o.slice(1,-1)];break;default:var c=+o;if(0===c)return n;if(c>s){var p=f(c/10);return 0===p?n:p<=s?void 0===i[p-1]?o.charAt(1):i[p-1]+o.charAt(1):n}l=i[c-1]}return void 0===l?"":l}))}}))},function(e,t,n){e.exports=n(130)},function(e,t,n){"use strict";var r=n(53),o="function"==typeof Symbol&&Symbol.for,i=o?Symbol.for("react.element"):60103,a=o?Symbol.for("react.portal"):60106,l=o?Symbol.for("react.fragment"):60107,u=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,c=o?Symbol.for("react.provider"):60109,f=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.forward_ref"):60112,d=o?Symbol.for("react.suspense"):60113,m=o?Symbol.for("react.memo"):60115,h=o?Symbol.for("react.lazy"):60116,g="function"==typeof Symbol&&Symbol.iterator;function v(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b={};function w(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}function k(){}function E(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||y}w.prototype.isReactComponent={},w.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(v(85));this.updater.enqueueSetState(this,e,t,"setState")},w.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=w.prototype;var x=E.prototype=new k;x.constructor=E,r(x,w.prototype),x.isPureReactComponent=!0;var S={current:null},T=Object.prototype.hasOwnProperty,_={key:!0,ref:!0,__self:!0,__source:!0};function C(e,t,n){var r,o={},a=null,l=null;if(null!=t)for(r in void 0!==t.ref&&(l=t.ref),void 0!==t.key&&(a=""+t.key),t)T.call(t,r)&&!_.hasOwnProperty(r)&&(o[r]=t[r]);var u=arguments.length-2;if(1===u)o.children=n;else if(1<u){for(var s=Array(u),c=0;c<u;c++)s[c]=arguments[c+2];o.children=s}if(e&&e.defaultProps)for(r in u=e.defaultProps)void 0===o[r]&&(o[r]=u[r]);return{$$typeof:i,type:e,key:a,ref:l,props:o,_owner:S.current}}function O(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var P=/\/+/g,A=[];function R(e,t,n,r){if(A.length){var o=A.pop();return o.result=e,o.keyPrefix=t,o.func=n,o.context=r,o.count=0,o}return{result:e,keyPrefix:t,func:n,context:r,count:0}}function N(e){e.result=null,e.keyPrefix=null,e.func=null,e.context=null,e.count=0,10>A.length&&A.push(e)}function I(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var u=!1;if(null===t)u=!0;else switch(l){case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case i:case a:u=!0}}if(u)return r(o,t,""===n?"."+L(t,0):n),1;if(u=0,n=""===n?".":n+":",Array.isArray(t))for(var s=0;s<t.length;s++){var c=n+L(l=t[s],s);u+=e(l,c,r,o)}else if(null===t||"object"!=typeof t?c=null:c="function"==typeof(c=g&&t[g]||t["@@iterator"])?c:null,"function"==typeof c)for(t=c.call(t),s=0;!(l=t.next()).done;)u+=e(l=l.value,c=n+L(l,s++),r,o);else if("object"===l)throw r=""+t,Error(v(31,"[object Object]"===r?"object with keys {"+Object.keys(t).join(", ")+"}":r,""));return u}(e,"",t,n)}function L(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+(""+e).replace(/[=:]/g,(function(e){return t[e]}))}(e.key):t.toString(36)}function j(e,t){e.func.call(e.context,t,e.count++)}function F(e,t,n){var r=e.result,o=e.keyPrefix;e=e.func.call(e.context,t,e.count++),Array.isArray(e)?D(e,r,n,(function(e){return e})):null!=e&&(O(e)&&(e=function(e,t){return{$$typeof:i,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(e,o+(!e.key||t&&t.key===e.key?"":(""+e.key).replace(P,"$&/")+"/")+n)),r.push(e))}function D(e,t,n,r,o){var i="";null!=n&&(i=(""+n).replace(P,"$&/")+"/"),I(e,F,t=R(t,i,r,o)),N(t)}var M={current:null};function z(){var e=M.current;if(null===e)throw Error(v(321));return e}var $={ReactCurrentDispatcher:M,ReactCurrentBatchConfig:{suspense:null},ReactCurrentOwner:S,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:function(e,t,n){if(null==e)return e;var r=[];return D(e,r,null,t,n),r},forEach:function(e,t,n){if(null==e)return e;I(e,j,t=R(null,null,t,n)),N(t)},count:function(e){return I(e,(function(){return null}),null)},toArray:function(e){var t=[];return D(e,t,null,(function(e){return e})),t},only:function(e){if(!O(e))throw Error(v(143));return e}},t.Component=w,t.Fragment=l,t.Profiler=s,t.PureComponent=E,t.StrictMode=u,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$,t.cloneElement=function(e,t,n){if(null==e)throw Error(v(267,e));var o=r({},e.props),a=e.key,l=e.ref,u=e._owner;if(null!=t){if(void 0!==t.ref&&(l=t.ref,u=S.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)T.call(t,c)&&!_.hasOwnProperty(c)&&(o[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)o.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];o.children=s}return{$$typeof:i,type:e.type,key:a,ref:l,props:o,_owner:u}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:f,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:c,_context:e},e.Consumer=e},t.createElement=C,t.createFactory=function(e){var t=C.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:p,render:e}},t.isValidElement=O,t.lazy=function(e){return{$$typeof:h,_ctor:e,_status:-1,_result:null}},t.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return z().useCallback(e,t)},t.useContext=function(e,t){return z().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return z().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return z().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return z().useLayoutEffect(e,t)},t.useMemo=function(e,t){return z().useMemo(e,t)},t.useReducer=function(e,t,n){return z().useReducer(e,t,n)},t.useRef=function(e){return z().useRef(e)},t.useState=function(e){return z().useState(e)},t.version="16.13.1"},function(e,t,n){"use strict";var r=n(0),o=n(53),i=n(91);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));function l(e,t,n,r,o,i,a,l,u){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(c){this.onError(c)}}var u=!1,s=null,c=!1,f=null,p={onError:function(e){u=!0,s=e}};function d(e,t,n,r,o,i,a,c,f){u=!1,s=null,l.apply(p,arguments)}var m=null,h=null,g=null;function v(e,t,n){var r=e.type||"unknown-event";e.currentTarget=g(n),function(e,t,n,r,o,i,l,p,m){if(d.apply(this,arguments),u){if(!u)throw Error(a(198));var h=s;u=!1,s=null,c||(c=!0,f=h)}}(r,t,void 0,e),e.currentTarget=null}var y=null,b={};function w(){if(y)for(var e in b){var t=b[e],n=y.indexOf(e);if(!(-1<n))throw Error(a(96,e));if(!E[n]){if(!t.extractEvents)throw Error(a(97,e));for(var r in E[n]=t,n=t.eventTypes){var o=void 0,i=n[r],l=t,u=r;if(x.hasOwnProperty(u))throw Error(a(99,u));x[u]=i;var s=i.phasedRegistrationNames;if(s){for(o in s)s.hasOwnProperty(o)&&k(s[o],l,u);o=!0}else i.registrationName?(k(i.registrationName,l,u),o=!0):o=!1;if(!o)throw Error(a(98,r,e))}}}}function k(e,t,n){if(S[e])throw Error(a(100,e));S[e]=t,T[e]=t.eventTypes[n].dependencies}var E=[],x={},S={},T={};function _(e){var t,n=!1;for(t in e)if(e.hasOwnProperty(t)){var r=e[t];if(!b.hasOwnProperty(t)||b[t]!==r){if(b[t])throw Error(a(102,t));b[t]=r,n=!0}}n&&w()}var C=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),O=null,P=null,A=null;function R(e){if(e=h(e)){if("function"!=typeof O)throw Error(a(280));var t=e.stateNode;t&&(t=m(t),O(e.stateNode,e.type,t))}}function N(e){P?A?A.push(e):A=[e]:P=e}function I(){if(P){var e=P,t=A;if(A=P=null,R(e),t)for(e=0;e<t.length;e++)R(t[e])}}function L(e,t){return e(t)}function j(e,t,n,r,o){return e(t,n,r,o)}function F(){}var D=L,M=!1,z=!1;function $(){null===P&&null===A||(F(),I())}function U(e,t,n){if(z)return e(t,n);z=!0;try{return D(e,t,n)}finally{z=!1,$()}}var B=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,G=Object.prototype.hasOwnProperty,q={},H={};function W(e,t,n,r,o,i){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i}var V={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){V[e]=new W(e,0,!1,e,null,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];V[t]=new W(t,1,!1,e[1],null,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){V[e]=new W(e,2,!1,e.toLowerCase(),null,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){V[e]=new W(e,2,!1,e,null,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){V[e]=new W(e,3,!1,e.toLowerCase(),null,!1)})),["checked","multiple","muted","selected"].forEach((function(e){V[e]=new W(e,3,!0,e,null,!1)})),["capture","download"].forEach((function(e){V[e]=new W(e,4,!1,e,null,!1)})),["cols","rows","size","span"].forEach((function(e){V[e]=new W(e,6,!1,e,null,!1)})),["rowSpan","start"].forEach((function(e){V[e]=new W(e,5,!1,e.toLowerCase(),null,!1)}));var K=/[\-:]([a-z])/g;function Q(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(K,Q);V[t]=new W(t,1,!1,e,null,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(K,Q);V[t]=new W(t,1,!1,e,"http://www.w3.org/1999/xlink",!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(K,Q);V[t]=new W(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1)})),["tabIndex","crossOrigin"].forEach((function(e){V[e]=new W(e,1,!1,e.toLowerCase(),null,!1)})),V.xlinkHref=new W("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0),["src","href","action","formAction"].forEach((function(e){V[e]=new W(e,1,!1,e.toLowerCase(),null,!0)}));var X=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function Y(e,t,n,r){var o=V.hasOwnProperty(t)?V[t]:null;(null!==o?0===o.type:!r&&(2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1])))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!G.call(H,e)||!G.call(q,e)&&(B.test(e)?H[e]=!0:(q[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}X.hasOwnProperty("ReactCurrentDispatcher")||(X.ReactCurrentDispatcher={current:null}),X.hasOwnProperty("ReactCurrentBatchConfig")||(X.ReactCurrentBatchConfig={suspense:null});var Z=/^(.*)[\\\/]/,J="function"==typeof Symbol&&Symbol.for,ee=J?Symbol.for("react.element"):60103,te=J?Symbol.for("react.portal"):60106,ne=J?Symbol.for("react.fragment"):60107,re=J?Symbol.for("react.strict_mode"):60108,oe=J?Symbol.for("react.profiler"):60114,ie=J?Symbol.for("react.provider"):60109,ae=J?Symbol.for("react.context"):60110,le=J?Symbol.for("react.concurrent_mode"):60111,ue=J?Symbol.for("react.forward_ref"):60112,se=J?Symbol.for("react.suspense"):60113,ce=J?Symbol.for("react.suspense_list"):60120,fe=J?Symbol.for("react.memo"):60115,pe=J?Symbol.for("react.lazy"):60116,de=J?Symbol.for("react.block"):60121,me="function"==typeof Symbol&&Symbol.iterator;function he(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=me&&e[me]||e["@@iterator"])?e:null}function ge(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ne:return"Fragment";case te:return"Portal";case oe:return"Profiler";case re:return"StrictMode";case se:return"Suspense";case ce:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ae:return"Context.Consumer";case ie:return"Context.Provider";case ue:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case fe:return ge(e.type);case de:return ge(e.render);case pe:if(e=1===e._status?e._result:null)return ge(e)}return null}function ve(e){var t="";do{e:switch(e.tag){case 3:case 4:case 6:case 7:case 10:case 9:var n="";break e;default:var r=e._debugOwner,o=e._debugSource,i=ge(e.type);n=null,r&&(n=ge(r.type)),r=i,i="",o?i=" (at "+o.fileName.replace(Z,"")+":"+o.lineNumber+")":n&&(i=" (created by "+n+")"),n="\n in "+(r||"Unknown")+i}t+=n,e=e.return}while(e);return t}function ye(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function be(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function we(e){e._valueTracker||(e._valueTracker=function(e){var t=be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function ke(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=be(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Ee(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function xe(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=ye(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Se(e,t){null!=(t=t.checked)&&Y(e,"checked",t,!1)}function Te(e,t){Se(e,t);var n=ye(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Ce(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ce(e,t.type,ye(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function _e(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Ce(e,t,n){"number"===t&&e.ownerDocument.activeElement===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function Oe(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function Pe(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ye(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function Ae(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:ye(n)}}function Ne(e,t){var n=ye(t.value),r=ye(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function Ie(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var Le="http://www.w3.org/1999/xhtml",je="http://www.w3.org/2000/svg";function Fe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function De(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?Fe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var Me,ze=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,o){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if(e.namespaceURI!==je||"innerHTML"in e)e.innerHTML=t;else{for((Me=Me||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Me.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function $e(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function Ue(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Be={animationend:Ue("Animation","AnimationEnd"),animationiteration:Ue("Animation","AnimationIteration"),animationstart:Ue("Animation","AnimationStart"),transitionend:Ue("Transition","TransitionEnd")},Ge={},qe={};function He(e){if(Ge[e])return Ge[e];if(!Be[e])return e;var t,n=Be[e];for(t in n)if(n.hasOwnProperty(t)&&t in qe)return Ge[e]=n[t];return e}C&&(qe=document.createElement("div").style,"AnimationEvent"in window||(delete Be.animationend.animation,delete Be.animationiteration.animation,delete Be.animationstart.animation),"TransitionEvent"in window||delete Be.transitionend.transition);var We=He("animationend"),Ve=He("animationiteration"),Ke=He("animationstart"),Qe=He("transitionend"),Xe="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ye=new("function"==typeof WeakMap?WeakMap:Map);function Ze(e){var t=Ye.get(e);return void 0===t&&(t=new Map,Ye.set(e,t)),t}function Je(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).effectTag)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function et(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function tt(e){if(Je(e)!==e)throw Error(a(188))}function nt(e){if(!(e=function(e){var t=e.alternate;if(!t){if(null===(t=Je(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return tt(o),e;if(i===r)return tt(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var l=!1,u=o.child;u;){if(u===n){l=!0,n=o,r=i;break}if(u===r){l=!0,r=o,n=i;break}u=u.sibling}if(!l){for(u=i.child;u;){if(u===n){l=!0,n=i,r=o;break}if(u===r){l=!0,r=i,n=o;break}u=u.sibling}if(!l)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e)))return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function rt(e,t){if(null==t)throw Error(a(30));return null==e?t:Array.isArray(e)?Array.isArray(t)?(e.push.apply(e,t),e):(e.push(t),e):Array.isArray(t)?[e].concat(t):[e,t]}function ot(e,t,n){Array.isArray(e)?e.forEach(t,n):e&&t.call(n,e)}var it=null;function at(e){if(e){var t=e._dispatchListeners,n=e._dispatchInstances;if(Array.isArray(t))for(var r=0;r<t.length&&!e.isPropagationStopped();r++)v(e,t[r],n[r]);else t&&v(e,t,n);e._dispatchListeners=null,e._dispatchInstances=null,e.isPersistent()||e.constructor.release(e)}}function lt(e){if(null!==e&&(it=rt(it,e)),e=it,it=null,e){if(ot(e,at),it)throw Error(a(95));if(c)throw e=f,c=!1,f=null,e}}function ut(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function st(e){if(!C)return!1;var t=(e="on"+e)in document;return t||((t=document.createElement("div")).setAttribute(e,"return;"),t="function"==typeof t[e]),t}var ct=[];function ft(e){e.topLevelType=null,e.nativeEvent=null,e.targetInst=null,e.ancestors.length=0,10>ct.length&&ct.push(e)}function pt(e,t,n,r){if(ct.length){var o=ct.pop();return o.topLevelType=e,o.eventSystemFlags=r,o.nativeEvent=t,o.targetInst=n,o}return{topLevelType:e,eventSystemFlags:r,nativeEvent:t,targetInst:n,ancestors:[]}}function dt(e){var t=e.targetInst,n=t;do{if(!n){e.ancestors.push(n);break}var r=n;if(3===r.tag)r=r.stateNode.containerInfo;else{for(;r.return;)r=r.return;r=3!==r.tag?null:r.stateNode.containerInfo}if(!r)break;5!==(t=n.tag)&&6!==t||e.ancestors.push(n),n=Cn(r)}while(n);for(n=0;n<e.ancestors.length;n++){t=e.ancestors[n];var o=ut(e.nativeEvent);r=e.topLevelType;var i=e.nativeEvent,a=e.eventSystemFlags;0===n&&(a|=64);for(var l=null,u=0;u<E.length;u++){var s=E[u];s&&(s=s.extractEvents(r,t,i,o,a))&&(l=rt(l,s))}lt(l)}}function mt(e,t,n){if(!n.has(e)){switch(e){case"scroll":Kt(t,"scroll",!0);break;case"focus":case"blur":Kt(t,"focus",!0),Kt(t,"blur",!0),n.set("blur",null),n.set("focus",null);break;case"cancel":case"close":st(e)&&Kt(t,e,!0);break;case"invalid":case"submit":case"reset":break;default:-1===Xe.indexOf(e)&&Vt(e,t)}n.set(e,null)}}var ht,gt,vt,yt=!1,bt=[],wt=null,kt=null,Et=null,xt=new Map,St=new Map,Tt=[],_t="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput close cancel copy cut paste click change contextmenu reset submit".split(" "),Ct="focus blur dragenter dragleave mouseover mouseout pointerover pointerout gotpointercapture lostpointercapture".split(" ");function Ot(e,t,n,r,o){return{blockedOn:e,topLevelType:t,eventSystemFlags:32|n,nativeEvent:o,container:r}}function Pt(e,t){switch(e){case"focus":case"blur":wt=null;break;case"dragenter":case"dragleave":kt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":xt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":St.delete(t.pointerId)}}function At(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=Ot(t,n,r,o,i),null!==t&&(null!==(t=On(t))&&gt(t)),e):(e.eventSystemFlags|=r,e)}function Rt(e){var t=Cn(e.target);if(null!==t){var n=Je(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=et(n)))return e.blockedOn=t,void i.unstable_runWithPriority(e.priority,(function(){vt(n)}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);if(null!==t){var n=On(t);return null!==n&&gt(n),e.blockedOn=t,!1}return!0}function It(e,t,n){Nt(e)&&n.delete(t)}function Lt(){for(yt=!1;0<bt.length;){var e=bt[0];if(null!==e.blockedOn){null!==(e=On(e.blockedOn))&&ht(e);break}var t=Zt(e.topLevelType,e.eventSystemFlags,e.container,e.nativeEvent);null!==t?e.blockedOn=t:bt.shift()}null!==wt&&Nt(wt)&&(wt=null),null!==kt&&Nt(kt)&&(kt=null),null!==Et&&Nt(Et)&&(Et=null),xt.forEach(It),St.forEach(It)}function jt(e,t){e.blockedOn===t&&(e.blockedOn=null,yt||(yt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Lt)))}function Ft(e){function t(t){return jt(t,e)}if(0<bt.length){jt(bt[0],e);for(var n=1;n<bt.length;n++){var r=bt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==wt&&jt(wt,e),null!==kt&&jt(kt,e),null!==Et&&jt(Et,e),xt.forEach(t),St.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)Rt(n),null===n.blockedOn&&Tt.shift()}var Dt={},Mt=new Map,zt=new Map,$t=["abort","abort",We,"animationEnd",Ve,"animationIteration",Ke,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Qe,"transitionEnd","waiting","waiting"];function Ut(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1],i="on"+(o[0].toUpperCase()+o.slice(1));i={phasedRegistrationNames:{bubbled:i,captured:i+"Capture"},dependencies:[r],eventPriority:t},zt.set(r,t),Mt.set(r,i),Dt[o]=i}}Ut("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Ut("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Ut($t,2);for(var Bt="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),Gt=0;Gt<Bt.length;Gt++)zt.set(Bt[Gt],0);var qt=i.unstable_UserBlockingPriority,Ht=i.unstable_runWithPriority,Wt=!0;function Vt(e,t){Kt(t,e,!1)}function Kt(e,t,n){var r=zt.get(t);switch(void 0===r?2:r){case 0:r=Qt.bind(null,t,1,e);break;case 1:r=Xt.bind(null,t,1,e);break;default:r=Yt.bind(null,t,1,e)}n?e.addEventListener(t,r,!0):e.addEventListener(t,r,!1)}function Qt(e,t,n,r){M||F();var o=Yt,i=M;M=!0;try{j(o,e,t,n,r)}finally{(M=i)||$()}}function Xt(e,t,n,r){Ht(qt,Yt.bind(null,e,t,n,r))}function Yt(e,t,n,r){if(Wt)if(0<bt.length&&-1<_t.indexOf(e))e=Ot(null,e,t,n,r),bt.push(e);else{var o=Zt(e,t,n,r);if(null===o)Pt(e,r);else if(-1<_t.indexOf(e))e=Ot(o,e,t,n,r),bt.push(e);else if(!function(e,t,n,r,o){switch(t){case"focus":return wt=At(wt,e,t,n,r,o),!0;case"dragenter":return kt=At(kt,e,t,n,r,o),!0;case"mouseover":return Et=At(Et,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return xt.set(i,At(xt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,St.set(i,At(St.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r)){Pt(e,r),e=pt(e,r,null,t);try{U(dt,e)}finally{ft(e)}}}}function Zt(e,t,n,r){if(null!==(n=Cn(n=ut(r)))){var o=Je(n);if(null===o)n=null;else{var i=o.tag;if(13===i){if(null!==(n=et(o)))return n;n=null}else if(3===i){if(o.stateNode.hydrate)return 3===o.tag?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null)}}e=pt(e,r,n,t);try{U(dt,e)}finally{ft(e)}return null}var Jt={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},en=["Webkit","ms","Moz","O"];function tn(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||Jt.hasOwnProperty(e)&&Jt[e]?(""+t).trim():t+"px"}function nn(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=tn(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(Jt).forEach((function(e){en.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Jt[t]=Jt[e]}))}));var rn=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function on(e,t){if(t){if(rn[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e,""));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62,""))}}function an(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ln=Le;function un(e,t){var n=Ze(e=9===e.nodeType||11===e.nodeType?e:e.ownerDocument);t=T[t];for(var r=0;r<t.length;r++)mt(t[r],e,n)}function sn(){}function cn(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(Wu){return e.body}}function fn(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function pn(e,t){var n,r=fn(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=fn(r)}}function dn(){for(var e=window,t=cn();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=cn((e=t.contentWindow).document)}return t}function mn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var hn=null,gn=null;function vn(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function yn(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var bn="function"==typeof setTimeout?setTimeout:void 0,wn="function"==typeof clearTimeout?clearTimeout:void 0;function kn(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function En(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var xn=Math.random().toString(36).slice(2),Sn="__reactInternalInstance$"+xn,Tn="__reactEventHandlers$"+xn,_n="__reactContainere$"+xn;function Cn(e){var t=e[Sn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[_n]||n[Sn]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=En(e);null!==e;){if(n=e[Sn])return n;e=En(e)}return t}n=(e=n).parentNode}return null}function On(e){return!(e=e[Sn]||e[_n])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function Pn(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function An(e){return e[Tn]||null}function Rn(e){do{e=e.return}while(e&&5!==e.tag);return e||null}function Nn(e,t){var n=e.stateNode;if(!n)return null;var r=m(n);if(!r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}function In(e,t,n){(t=Nn(e,n.dispatchConfig.phasedRegistrationNames[t]))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Ln(e){if(e&&e.dispatchConfig.phasedRegistrationNames){for(var t=e._targetInst,n=[];t;)n.push(t),t=Rn(t);for(t=n.length;0<t--;)In(n[t],"captured",e);for(t=0;t<n.length;t++)In(n[t],"bubbled",e)}}function jn(e,t,n){e&&n&&n.dispatchConfig.registrationName&&(t=Nn(e,n.dispatchConfig.registrationName))&&(n._dispatchListeners=rt(n._dispatchListeners,t),n._dispatchInstances=rt(n._dispatchInstances,e))}function Fn(e){e&&e.dispatchConfig.registrationName&&jn(e._targetInst,null,e)}function Dn(e){ot(e,Ln)}var Mn=null,zn=null,$n=null;function Un(){if($n)return $n;var e,t,n=zn,r=n.length,o="value"in Mn?Mn.value:Mn.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return $n=o.slice(e,1<t?1-t:void 0)}function Bn(){return!0}function Gn(){return!1}function qn(e,t,n,r){for(var o in this.dispatchConfig=e,this._targetInst=t,this.nativeEvent=n,e=this.constructor.Interface)e.hasOwnProperty(o)&&((t=e[o])?this[o]=t(n):"target"===o?this.target=r:this[o]=n[o]);return this.isDefaultPrevented=(null!=n.defaultPrevented?n.defaultPrevented:!1===n.returnValue)?Bn:Gn,this.isPropagationStopped=Gn,this}function Hn(e,t,n,r){if(this.eventPool.length){var o=this.eventPool.pop();return this.call(o,e,t,n,r),o}return new this(e,t,n,r)}function Wn(e){if(!(e instanceof this))throw Error(a(279));e.destructor(),10>this.eventPool.length&&this.eventPool.push(e)}function Vn(e){e.eventPool=[],e.getPooled=Hn,e.release=Wn}o(qn.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Bn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Bn)},persist:function(){this.isPersistent=Bn},isPersistent:Gn,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=Gn,this._dispatchInstances=this._dispatchListeners=null}}),qn.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},qn.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,Vn(n),n},Vn(qn);var Kn=qn.extend({data:null}),Qn=qn.extend({data:null}),Xn=[9,13,27,32],Yn=C&&"CompositionEvent"in window,Zn=null;C&&"documentMode"in document&&(Zn=document.documentMode);var Jn=C&&"TextEvent"in window&&!Zn,er=C&&(!Yn||Zn&&8<Zn&&11>=Zn),tr=String.fromCharCode(32),nr={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},rr=!1;function or(e,t){switch(e){case"keyup":return-1!==Xn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ir(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ar=!1;var lr={eventTypes:nr,extractEvents:function(e,t,n,r){var o;if(Yn)e:{switch(e){case"compositionstart":var i=nr.compositionStart;break e;case"compositionend":i=nr.compositionEnd;break e;case"compositionupdate":i=nr.compositionUpdate;break e}i=void 0}else ar?or(e,n)&&(i=nr.compositionEnd):"keydown"===e&&229===n.keyCode&&(i=nr.compositionStart);return i?(er&&"ko"!==n.locale&&(ar||i!==nr.compositionStart?i===nr.compositionEnd&&ar&&(o=Un()):(zn="value"in(Mn=r)?Mn.value:Mn.textContent,ar=!0)),i=Kn.getPooled(i,t,n,r),o?i.data=o:null!==(o=ir(n))&&(i.data=o),Dn(i),o=i):o=null,(e=Jn?function(e,t){switch(e){case"compositionend":return ir(t);case"keypress":return 32!==t.which?null:(rr=!0,tr);case"textInput":return(e=t.data)===tr&&rr?null:e;default:return null}}(e,n):function(e,t){if(ar)return"compositionend"===e||!Yn&&or(e,t)?(e=Un(),$n=zn=Mn=null,ar=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return er&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))?((t=Qn.getPooled(nr.beforeInput,t,n,r)).data=e,Dn(t)):t=null,null===o?t:null===t?o:[o,t]}},ur={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ur[e.type]:"textarea"===t}var cr={change:{phasedRegistrationNames:{bubbled:"onChange",captured:"onChangeCapture"},dependencies:"blur change click focus input keydown keyup selectionchange".split(" ")}};function fr(e,t,n){return(e=qn.getPooled(cr.change,e,t,n)).type="change",N(n),Dn(e),e}var pr=null,dr=null;function mr(e){lt(e)}function hr(e){if(ke(Pn(e)))return e}function gr(e,t){if("change"===e)return t}var vr=!1;function yr(){pr&&(pr.detachEvent("onpropertychange",br),dr=pr=null)}function br(e){if("value"===e.propertyName&&hr(dr))if(e=fr(dr,e,ut(e)),M)lt(e);else{M=!0;try{L(mr,e)}finally{M=!1,$()}}}function wr(e,t,n){"focus"===e?(yr(),dr=n,(pr=t).attachEvent("onpropertychange",br)):"blur"===e&&yr()}function kr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return hr(dr)}function Er(e,t){if("click"===e)return hr(t)}function xr(e,t){if("input"===e||"change"===e)return hr(t)}C&&(vr=st("input")&&(!document.documentMode||9<document.documentMode));var Sr={eventTypes:cr,_isInputEventSupported:vr,extractEvents:function(e,t,n,r){var o=t?Pn(t):window,i=o.nodeName&&o.nodeName.toLowerCase();if("select"===i||"input"===i&&"file"===o.type)var a=gr;else if(sr(o))if(vr)a=xr;else{a=kr;var l=wr}else(i=o.nodeName)&&"input"===i.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(a=Er);if(a&&(a=a(e,t)))return fr(a,n,r);l&&l(e,o,t),"blur"===e&&(e=o._wrapperState)&&e.controlled&&"number"===o.type&&Ce(o,"number",o.value)}},Tr=qn.extend({view:null,detail:null}),_r={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Cr(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=_r[e])&&!!t[e]}function Or(){return Cr}var Pr=0,Ar=0,Rr=!1,Nr=!1,Ir=Tr.extend({screenX:null,screenY:null,clientX:null,clientY:null,pageX:null,pageY:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,getModifierState:Or,button:null,buttons:null,relatedTarget:function(e){return e.relatedTarget||(e.fromElement===e.srcElement?e.toElement:e.fromElement)},movementX:function(e){if("movementX"in e)return e.movementX;var t=Pr;return Pr=e.screenX,Rr?"mousemove"===e.type?e.screenX-t:0:(Rr=!0,0)},movementY:function(e){if("movementY"in e)return e.movementY;var t=Ar;return Ar=e.screenY,Nr?"mousemove"===e.type?e.screenY-t:0:(Nr=!0,0)}}),Lr=Ir.extend({pointerId:null,width:null,height:null,pressure:null,tangentialPressure:null,tiltX:null,tiltY:null,twist:null,pointerType:null,isPrimary:null}),jr={mouseEnter:{registrationName:"onMouseEnter",dependencies:["mouseout","mouseover"]},mouseLeave:{registrationName:"onMouseLeave",dependencies:["mouseout","mouseover"]},pointerEnter:{registrationName:"onPointerEnter",dependencies:["pointerout","pointerover"]},pointerLeave:{registrationName:"onPointerLeave",dependencies:["pointerout","pointerover"]}},Fr={eventTypes:jr,extractEvents:function(e,t,n,r,o){var i="mouseover"===e||"pointerover"===e,a="mouseout"===e||"pointerout"===e;if(i&&0==(32&o)&&(n.relatedTarget||n.fromElement)||!a&&!i)return null;(i=r.window===r?r:(i=r.ownerDocument)?i.defaultView||i.parentWindow:window,a)?(a=t,null!==(t=(t=n.relatedTarget||n.toElement)?Cn(t):null)&&(t!==Je(t)||5!==t.tag&&6!==t.tag)&&(t=null)):a=null;if(a===t)return null;if("mouseout"===e||"mouseover"===e)var l=Ir,u=jr.mouseLeave,s=jr.mouseEnter,c="mouse";else"pointerout"!==e&&"pointerover"!==e||(l=Lr,u=jr.pointerLeave,s=jr.pointerEnter,c="pointer");if(e=null==a?i:Pn(a),i=null==t?i:Pn(t),(u=l.getPooled(u,a,n,r)).type=c+"leave",u.target=e,u.relatedTarget=i,(n=l.getPooled(s,t,n,r)).type=c+"enter",n.target=i,n.relatedTarget=e,c=t,(r=a)&&c)e:{for(s=c,a=0,e=l=r;e;e=Rn(e))a++;for(e=0,t=s;t;t=Rn(t))e++;for(;0<a-e;)l=Rn(l),a--;for(;0<e-a;)s=Rn(s),e--;for(;a--;){if(l===s||l===s.alternate)break e;l=Rn(l),s=Rn(s)}l=null}else l=null;for(s=l,l=[];r&&r!==s&&(null===(a=r.alternate)||a!==s);)l.push(r),r=Rn(r);for(r=[];c&&c!==s&&(null===(a=c.alternate)||a!==s);)r.push(c),c=Rn(c);for(c=0;c<l.length;c++)jn(l[c],"bubbled",u);for(c=r.length;0<c--;)jn(r[c],"captured",n);return 0==(64&o)?[u]:[u,n]}};var Dr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Mr=Object.prototype.hasOwnProperty;function zr(e,t){if(Dr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!Mr.call(t,n[r])||!Dr(e[n[r]],t[n[r]]))return!1;return!0}var $r=C&&"documentMode"in document&&11>=document.documentMode,Ur={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:"blur contextmenu dragend focus keydown keyup mousedown mouseup selectionchange".split(" ")}},Br=null,Gr=null,qr=null,Hr=!1;function Wr(e,t){var n=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;return Hr||null==Br||Br!==cn(n)?null:("selectionStart"in(n=Br)&&mn(n)?n={start:n.selectionStart,end:n.selectionEnd}:n={anchorNode:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset},qr&&zr(qr,n)?null:(qr=n,(e=qn.getPooled(Ur.select,Gr,e,t)).type="select",e.target=Br,Dn(e),e))}var Vr={eventTypes:Ur,extractEvents:function(e,t,n,r,o,i){if(!(i=!(o=i||(r.window===r?r.document:9===r.nodeType?r:r.ownerDocument)))){e:{o=Ze(o),i=T.onSelect;for(var a=0;a<i.length;a++)if(!o.has(i[a])){o=!1;break e}o=!0}i=!o}if(i)return null;switch(o=t?Pn(t):window,e){case"focus":(sr(o)||"true"===o.contentEditable)&&(Br=o,Gr=t,qr=null);break;case"blur":qr=Gr=Br=null;break;case"mousedown":Hr=!0;break;case"contextmenu":case"mouseup":case"dragend":return Hr=!1,Wr(n,r);case"selectionchange":if($r)break;case"keydown":case"keyup":return Wr(n,r)}return null}},Kr=qn.extend({animationName:null,elapsedTime:null,pseudoElement:null}),Qr=qn.extend({clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Xr=Tr.extend({relatedTarget:null});function Yr(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}var Zr={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jr={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},eo=Tr.extend({key:function(e){if(e.key){var t=Zr[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Yr(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?Jr[e.keyCode]||"Unidentified":""},location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:Or,charCode:function(e){return"keypress"===e.type?Yr(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Yr(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),to=Ir.extend({dataTransfer:null}),no=Tr.extend({touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:Or}),ro=qn.extend({propertyName:null,elapsedTime:null,pseudoElement:null}),oo=Ir.extend({deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:null,deltaMode:null}),io={eventTypes:Dt,extractEvents:function(e,t,n,r){var o=Mt.get(e);if(!o)return null;switch(e){case"keypress":if(0===Yr(n))return null;case"keydown":case"keyup":e=eo;break;case"blur":case"focus":e=Xr;break;case"click":if(2===n.button)return null;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":e=Ir;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":e=to;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":e=no;break;case We:case Ve:case Ke:e=Kr;break;case Qe:e=ro;break;case"scroll":e=Tr;break;case"wheel":e=oo;break;case"copy":case"cut":case"paste":e=Qr;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":e=Lr;break;default:e=qn}return Dn(t=e.getPooled(o,t,n,r)),t}};if(y)throw Error(a(101));y=Array.prototype.slice.call("ResponderEventPlugin SimpleEventPlugin EnterLeaveEventPlugin ChangeEventPlugin SelectEventPlugin BeforeInputEventPlugin".split(" ")),w(),m=An,h=On,g=Pn,_({SimpleEventPlugin:io,EnterLeaveEventPlugin:Fr,ChangeEventPlugin:Sr,SelectEventPlugin:Vr,BeforeInputEventPlugin:lr});var ao=[],lo=-1;function uo(e){0>lo||(e.current=ao[lo],ao[lo]=null,lo--)}function so(e,t){lo++,ao[lo]=e.current,e.current=t}var co={},fo={current:co},po={current:!1},mo=co;function ho(e,t){var n=e.type.contextTypes;if(!n)return co;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function go(e){return null!=(e=e.childContextTypes)}function vo(){uo(po),uo(fo)}function yo(e,t,n){if(fo.current!==co)throw Error(a(168));so(fo,t),so(po,n)}function bo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,ge(t)||"Unknown",i));return o({},n,{},r)}function wo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||co,mo=fo.current,so(fo,e),so(po,po.current),!0}function ko(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=bo(e,t,mo),r.__reactInternalMemoizedMergedChildContext=e,uo(po),uo(fo),so(fo,e)):uo(po),so(po,n)}var Eo=i.unstable_runWithPriority,xo=i.unstable_scheduleCallback,So=i.unstable_cancelCallback,To=i.unstable_requestPaint,_o=i.unstable_now,Co=i.unstable_getCurrentPriorityLevel,Oo=i.unstable_ImmediatePriority,Po=i.unstable_UserBlockingPriority,Ao=i.unstable_NormalPriority,Ro=i.unstable_LowPriority,No=i.unstable_IdlePriority,Io={},Lo=i.unstable_shouldYield,jo=void 0!==To?To:function(){},Fo=null,Do=null,Mo=!1,zo=_o(),$o=1e4>zo?_o:function(){return _o()-zo};function Uo(){switch(Co()){case Oo:return 99;case Po:return 98;case Ao:return 97;case Ro:return 96;case No:return 95;default:throw Error(a(332))}}function Bo(e){switch(e){case 99:return Oo;case 98:return Po;case 97:return Ao;case 96:return Ro;case 95:return No;default:throw Error(a(332))}}function Go(e,t){return e=Bo(e),Eo(e,t)}function qo(e,t,n){return e=Bo(e),xo(e,t,n)}function Ho(e){return null===Fo?(Fo=[e],Do=xo(Oo,Vo)):Fo.push(e),Io}function Wo(){if(null!==Do){var e=Do;Do=null,So(e)}Vo()}function Vo(){if(!Mo&&null!==Fo){Mo=!0;var e=0;try{var t=Fo;Go(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),Fo=null}catch(n){throw null!==Fo&&(Fo=Fo.slice(e+1)),xo(Oo,Wo),n}finally{Mo=!1}}}function Ko(e,t,n){return 1073741821-(1+((1073741821-e+t/10)/(n/=10)|0))*n}function Qo(e,t){if(e&&e.defaultProps)for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}var Xo={current:null},Yo=null,Zo=null,Jo=null;function ei(){Jo=Zo=Yo=null}function ti(e){var t=Xo.current;uo(Xo),e.type._context._currentValue=t}function ni(e,t){for(;null!==e;){var n=e.alternate;if(e.childExpirationTime<t)e.childExpirationTime=t,null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t);else{if(!(null!==n&&n.childExpirationTime<t))break;n.childExpirationTime=t}e=e.return}}function ri(e,t){Yo=e,Jo=Zo=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(e.expirationTime>=t&&(Aa=!0),e.firstContext=null)}function oi(e,t){if(Jo!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(Jo=e,t=1073741823),t={context:e,observedBits:t,next:null},null===Zo){if(null===Yo)throw Error(a(308));Zo=t,Yo.dependencies={expirationTime:0,firstContext:t,responders:null}}else Zo=Zo.next=t;return e._currentValue}var ii=!1;function ai(e){e.updateQueue={baseState:e.memoizedState,baseQueue:null,shared:{pending:null},effects:null}}function li(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,baseQueue:e.baseQueue,shared:e.shared,effects:e.effects})}function ui(e,t){return(e={expirationTime:e,suspenseConfig:t,tag:0,payload:null,callback:null,next:null}).next=e}function si(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function ci(e,t){var n=e.alternate;null!==n&&li(n,e),null===(n=(e=e.updateQueue).baseQueue)?(e.baseQueue=t.next=t,t.next=t):(t.next=n.next,n.next=t)}function fi(e,t,n,r){var i=e.updateQueue;ii=!1;var a=i.baseQueue,l=i.shared.pending;if(null!==l){if(null!==a){var u=a.next;a.next=l.next,l.next=u}a=l,i.shared.pending=null,null!==(u=e.alternate)&&(null!==(u=u.updateQueue)&&(u.baseQueue=l))}if(null!==a){u=a.next;var s=i.baseState,c=0,f=null,p=null,d=null;if(null!==u)for(var m=u;;){if((l=m.expirationTime)<r){var h={expirationTime:m.expirationTime,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null};null===d?(p=d=h,f=s):d=d.next=h,l>c&&(c=l)}else{null!==d&&(d=d.next={expirationTime:1073741823,suspenseConfig:m.suspenseConfig,tag:m.tag,payload:m.payload,callback:m.callback,next:null}),iu(l,m.suspenseConfig);e:{var g=e,v=m;switch(l=t,h=n,v.tag){case 1:if("function"==typeof(g=v.payload)){s=g.call(h,s,l);break e}s=g;break e;case 3:g.effectTag=-4097&g.effectTag|64;case 0:if(null==(l="function"==typeof(g=v.payload)?g.call(h,s,l):g))break e;s=o({},s,l);break e;case 2:ii=!0}}null!==m.callback&&(e.effectTag|=32,null===(l=i.effects)?i.effects=[m]:l.push(m))}if(null===(m=m.next)||m===u){if(null===(l=i.shared.pending))break;m=a.next=l.next,l.next=u,i.baseQueue=a=l,i.shared.pending=null}}null===d?f=s:d.next=p,i.baseState=f,i.baseQueue=d,au(c),e.expirationTime=c,e.memoizedState=s}}function pi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=o,o=n,"function"!=typeof r)throw Error(a(191,r));r.call(o)}}}var di=X.ReactCurrentBatchConfig,mi=(new r.Component).refs;function hi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.expirationTime&&(e.updateQueue.baseState=n)}var gi={isMounted:function(e){return!!(e=e._reactInternalFiber)&&Je(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternalFiber;var r=Wl(),o=di.suspense;(o=ui(r=Vl(r,e,o),o)).payload=t,null!=n&&(o.callback=n),si(e,o),Kl(e,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternalFiber;var r=Wl(),o=di.suspense;(o=ui(r=Vl(r,e,o),o)).tag=1,o.payload=t,null!=n&&(o.callback=n),si(e,o),Kl(e,r)},enqueueForceUpdate:function(e,t){e=e._reactInternalFiber;var n=Wl(),r=di.suspense;(r=ui(n=Vl(n,e,r),r)).tag=2,null!=t&&(r.callback=t),si(e,r),Kl(e,n)}};function vi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!zr(n,r)||!zr(o,i))}function yi(e,t,n){var r=!1,o=co,i=t.contextType;return"object"==typeof i&&null!==i?i=oi(i):(o=go(t)?mo:fo.current,i=(r=null!=(r=t.contextTypes))?ho(e,o):co),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=gi,e.stateNode=t,t._reactInternalFiber=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function bi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&gi.enqueueReplaceState(t,t.state,null)}function wi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=mi,ai(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=oi(i):(i=go(t)?mo:fo.current,o.context=ho(e,i)),fi(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(hi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&gi.enqueueReplaceState(o,o.state,null),fi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.effectTag|=4)}var ki=Array.isArray;function Ei(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:((t=function(e){var t=r.refs;t===mi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e})._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function xi(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t,""))}function Si(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.effectTag=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=_u(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.effectTag=2,n):r:(t.effectTag=2,n):n}function l(t){return e&&null===t.alternate&&(t.effectTag=2),t}function u(e,t,n,r){return null===t||6!==t.tag?((t=Pu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Ei(e,t,n),r.return=e,r):((r=Cu(n.type,n.key,n.props,null,e.mode,r)).ref=Ei(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Au(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Ou(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function p(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Pu(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case ee:return(n=Cu(t.type,t.key,t.props,null,e.mode,n)).ref=Ei(e,null,t),n.return=e,n;case te:return(t=Au(t,e.mode,n)).return=e,t}if(ki(t)||he(t))return(t=Ou(t,e.mode,n,null)).return=e,t;xi(e,t)}return null}function d(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:u(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case ee:return n.key===o?n.type===ne?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case te:return n.key===o?c(e,t,n,r):null}if(ki(n)||he(n))return null!==o?null:f(e,t,n,r,null);xi(e,n)}return null}function m(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return u(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case ee:return e=e.get(null===r.key?n:r.key)||null,r.type===ne?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case te:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(ki(r)||he(r))return f(t,e=e.get(n)||null,r,o,null);xi(t,r)}return null}function h(o,a,l,u){for(var s=null,c=null,f=a,h=a=0,g=null;null!==f&&h<l.length;h++){f.index>h?(g=f,f=null):g=f.sibling;var v=d(o,f,l[h],u);if(null===v){null===f&&(f=g);break}e&&f&&null===v.alternate&&t(o,f),a=i(v,a,h),null===c?s=v:c.sibling=v,c=v,f=g}if(h===l.length)return n(o,f),s;if(null===f){for(;h<l.length;h++)null!==(f=p(o,l[h],u))&&(a=i(f,a,h),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(o,f);h<l.length;h++)null!==(g=m(f,o,h,l[h],u))&&(e&&null!==g.alternate&&f.delete(null===g.key?h:g.key),a=i(g,a,h),null===c?s=g:c.sibling=g,c=g);return e&&f.forEach((function(e){return t(o,e)})),s}function g(o,l,u,s){var c=he(u);if("function"!=typeof c)throw Error(a(150));if(null==(u=c.call(u)))throw Error(a(151));for(var f=c=null,h=l,g=l=0,v=null,y=u.next();null!==h&&!y.done;g++,y=u.next()){h.index>g?(v=h,h=null):v=h.sibling;var b=d(o,h,y.value,s);if(null===b){null===h&&(h=v);break}e&&h&&null===b.alternate&&t(o,h),l=i(b,l,g),null===f?c=b:f.sibling=b,f=b,h=v}if(y.done)return n(o,h),c;if(null===h){for(;!y.done;g++,y=u.next())null!==(y=p(o,y.value,s))&&(l=i(y,l,g),null===f?c=y:f.sibling=y,f=y);return c}for(h=r(o,h);!y.done;g++,y=u.next())null!==(y=m(h,o,g,y.value,s))&&(e&&null!==y.alternate&&h.delete(null===y.key?g:y.key),l=i(y,l,g),null===f?c=y:f.sibling=y,f=y);return e&&h.forEach((function(e){return t(o,e)})),c}return function(e,r,i,u){var s="object"==typeof i&&null!==i&&i.type===ne&&null===i.key;s&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case ee:e:{for(c=i.key,s=r;null!==s;){if(s.key===c){switch(s.tag){case 7:if(i.type===ne){n(e,s.sibling),(r=o(s,i.props.children)).return=e,e=r;break e}break;default:if(s.elementType===i.type){n(e,s.sibling),(r=o(s,i.props)).ref=Ei(e,s,i),r.return=e,e=r;break e}}n(e,s);break}t(e,s),s=s.sibling}i.type===ne?((r=Ou(i.props.children,e.mode,u,i.key)).return=e,e=r):((u=Cu(i.type,i.key,i.props,null,e.mode,u)).ref=Ei(e,r,i),u.return=e,e=u)}return l(e);case te:e:{for(s=i.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Au(i,e.mode,u)).return=e,e=r}return l(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Pu(i,e.mode,u)).return=e,e=r),l(e);if(ki(i))return h(e,r,i,u);if(he(i))return g(e,r,i,u);if(c&&xi(e,i),void 0===i&&!s)switch(e.tag){case 1:case 0:throw e=e.type,Error(a(152,e.displayName||e.name||"Component"))}return n(e,r)}}var Ti=Si(!0),_i=Si(!1),Ci={},Oi={current:Ci},Pi={current:Ci},Ai={current:Ci};function Ri(e){if(e===Ci)throw Error(a(174));return e}function Ni(e,t){switch(so(Ai,t),so(Pi,e),so(Oi,Ci),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:De(null,"");break;default:t=De(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}uo(Oi),so(Oi,t)}function Ii(){uo(Oi),uo(Pi),uo(Ai)}function Li(e){Ri(Ai.current);var t=Ri(Oi.current),n=De(t,e.type);t!==n&&(so(Pi,e),so(Oi,n))}function ji(e){Pi.current===e&&(uo(Oi),uo(Pi))}var Fi={current:0};function Di(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.effectTag))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function Mi(e,t){return{responder:e,props:t}}var zi=X.ReactCurrentDispatcher,$i=X.ReactCurrentBatchConfig,Ui=0,Bi=null,Gi=null,qi=null,Hi=!1;function Wi(){throw Error(a(321))}function Vi(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Dr(e[n],t[n]))return!1;return!0}function Ki(e,t,n,r,o,i){if(Ui=i,Bi=t,t.memoizedState=null,t.updateQueue=null,t.expirationTime=0,zi.current=null===e||null===e.memoizedState?va:ya,e=n(r,o),t.expirationTime===Ui){i=0;do{if(t.expirationTime=0,!(25>i))throw Error(a(301));i+=1,qi=Gi=null,t.updateQueue=null,zi.current=ba,e=n(r,o)}while(t.expirationTime===Ui)}if(zi.current=ga,t=null!==Gi&&null!==Gi.next,Ui=0,qi=Gi=Bi=null,Hi=!1,t)throw Error(a(300));return e}function Qi(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===qi?Bi.memoizedState=qi=e:qi=qi.next=e,qi}function Xi(){if(null===Gi){var e=Bi.alternate;e=null!==e?e.memoizedState:null}else e=Gi.next;var t=null===qi?Bi.memoizedState:qi.next;if(null!==t)qi=t,Gi=e;else{if(null===e)throw Error(a(310));e={memoizedState:(Gi=e).memoizedState,baseState:Gi.baseState,baseQueue:Gi.baseQueue,queue:Gi.queue,next:null},null===qi?Bi.memoizedState=qi=e:qi=qi.next=e}return qi}function Yi(e,t){return"function"==typeof t?t(e):t}function Zi(e){var t=Xi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=Gi,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var l=o.next;o.next=i.next,i.next=l}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var u=l=i=null,s=o;do{var c=s.expirationTime;if(c<Ui){var f={expirationTime:s.expirationTime,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===u?(l=u=f,i=r):u=u.next=f,c>Bi.expirationTime&&(Bi.expirationTime=c,au(c))}else null!==u&&(u=u.next={expirationTime:1073741823,suspenseConfig:s.suspenseConfig,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),iu(c,s.suspenseConfig),r=s.eagerReducer===e?s.eagerState:e(r,s.action);s=s.next}while(null!==s&&s!==o);null===u?i=r:u.next=l,Dr(r,t.memoizedState)||(Aa=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=u,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function Ji(e){var t=Xi(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var l=o=o.next;do{i=e(i,l.action),l=l.next}while(l!==o);Dr(i,t.memoizedState)||(Aa=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function ea(e){var t=Qi();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:Yi,lastRenderedState:e}).dispatch=ha.bind(null,Bi,e),[t.memoizedState,e]}function ta(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Bi.updateQueue)?(t={lastEffect:null},Bi.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function na(){return Xi().memoizedState}function ra(e,t,n,r){var o=Qi();Bi.effectTag|=e,o.memoizedState=ta(1|t,n,void 0,void 0===r?null:r)}function oa(e,t,n,r){var o=Xi();r=void 0===r?null:r;var i=void 0;if(null!==Gi){var a=Gi.memoizedState;if(i=a.destroy,null!==r&&Vi(r,a.deps))return void ta(t,n,i,r)}Bi.effectTag|=e,o.memoizedState=ta(1|t,n,i,r)}function ia(e,t){return ra(516,4,e,t)}function aa(e,t){return oa(516,4,e,t)}function la(e,t){return oa(4,2,e,t)}function ua(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function sa(e,t,n){return n=null!=n?n.concat([e]):null,oa(4,2,ua.bind(null,t,e),n)}function ca(){}function fa(e,t){return Qi().memoizedState=[e,void 0===t?null:t],e}function pa(e,t){var n=Xi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Vi(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function da(e,t){var n=Xi();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Vi(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ma(e,t,n){var r=Uo();Go(98>r?98:r,(function(){e(!0)})),Go(97<r?97:r,(function(){var r=$i.suspense;$i.suspense=void 0===t?null:t;try{e(!1),n()}finally{$i.suspense=r}}))}function ha(e,t,n){var r=Wl(),o=di.suspense;o={expirationTime:r=Vl(r,e,o),suspenseConfig:o,action:n,eagerReducer:null,eagerState:null,next:null};var i=t.pending;if(null===i?o.next=o:(o.next=i.next,i.next=o),t.pending=o,i=e.alternate,e===Bi||null!==i&&i===Bi)Hi=!0,o.expirationTime=Ui,Bi.expirationTime=Ui;else{if(0===e.expirationTime&&(null===i||0===i.expirationTime)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,l=i(a,n);if(o.eagerReducer=i,o.eagerState=l,Dr(l,a))return}catch(u){}Kl(e,r)}}var ga={readContext:oi,useCallback:Wi,useContext:Wi,useEffect:Wi,useImperativeHandle:Wi,useLayoutEffect:Wi,useMemo:Wi,useReducer:Wi,useRef:Wi,useState:Wi,useDebugValue:Wi,useResponder:Wi,useDeferredValue:Wi,useTransition:Wi},va={readContext:oi,useCallback:fa,useContext:oi,useEffect:ia,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ra(4,2,ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ra(4,2,e,t)},useMemo:function(e,t){var n=Qi();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Qi();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=ha.bind(null,Bi,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Qi().memoizedState=e},useState:ea,useDebugValue:ca,useResponder:Mi,useDeferredValue:function(e,t){var n=ea(e),r=n[0],o=n[1];return ia((function(){var n=$i.suspense;$i.suspense=void 0===t?null:t;try{o(e)}finally{$i.suspense=n}}),[e,t]),r},useTransition:function(e){var t=ea(!1),n=t[0];return t=t[1],[fa(ma.bind(null,t,e),[t,e]),n]}},ya={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:sa,useLayoutEffect:la,useMemo:da,useReducer:Zi,useRef:na,useState:function(){return Zi(Yi)},useDebugValue:ca,useResponder:Mi,useDeferredValue:function(e,t){var n=Zi(Yi),r=n[0],o=n[1];return aa((function(){var n=$i.suspense;$i.suspense=void 0===t?null:t;try{o(e)}finally{$i.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Zi(Yi),n=t[0];return t=t[1],[pa(ma.bind(null,t,e),[t,e]),n]}},ba={readContext:oi,useCallback:pa,useContext:oi,useEffect:aa,useImperativeHandle:sa,useLayoutEffect:la,useMemo:da,useReducer:Ji,useRef:na,useState:function(){return Ji(Yi)},useDebugValue:ca,useResponder:Mi,useDeferredValue:function(e,t){var n=Ji(Yi),r=n[0],o=n[1];return aa((function(){var n=$i.suspense;$i.suspense=void 0===t?null:t;try{o(e)}finally{$i.suspense=n}}),[e,t]),r},useTransition:function(e){var t=Ji(Yi),n=t[0];return t=t[1],[pa(ma.bind(null,t,e),[t,e]),n]}},wa=null,ka=null,Ea=!1;function xa(e,t){var n=Su(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.effectTag=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Sa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Ta(e){if(Ea){var t=ka;if(t){var n=t;if(!Sa(e,t)){if(!(t=kn(n.nextSibling))||!Sa(e,t))return e.effectTag=-1025&e.effectTag|2,Ea=!1,void(wa=e);xa(wa,n)}wa=e,ka=kn(t.firstChild)}else e.effectTag=-1025&e.effectTag|2,Ea=!1,wa=e}}function _a(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;wa=e}function Ca(e){if(e!==wa)return!1;if(!Ea)return _a(e),Ea=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!yn(t,e.memoizedProps))for(t=ka;t;)xa(e,t),t=kn(t.nextSibling);if(_a(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ka=kn(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ka=null}}else ka=wa?kn(e.stateNode.nextSibling):null;return!0}function Oa(){ka=wa=null,Ea=!1}var Pa=X.ReactCurrentOwner,Aa=!1;function Ra(e,t,n,r){t.child=null===e?_i(t,null,n,r):Ti(t,e.child,n,r)}function Na(e,t,n,r,o){n=n.render;var i=t.ref;return ri(t,o),r=Ki(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ra(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ka(e,t,o))}function Ia(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Tu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Cu(n.type,null,r,null,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,La(e,t,a,r,o,i))}return a=e.child,o<i&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:zr)(o,r)&&e.ref===t.ref)?Ka(e,t,i):(t.effectTag|=1,(e=_u(a,r)).ref=t.ref,e.return=t,t.child=e)}function La(e,t,n,r,o,i){return null!==e&&zr(e.memoizedProps,r)&&e.ref===t.ref&&(Aa=!1,o<i)?(t.expirationTime=e.expirationTime,Ka(e,t,i)):Fa(e,t,n,r,i)}function ja(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.effectTag|=128)}function Fa(e,t,n,r,o){var i=go(n)?mo:fo.current;return i=ho(t,i),ri(t,o),n=Ki(e,t,n,r,i,o),null===e||Aa?(t.effectTag|=1,Ra(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.effectTag&=-517,e.expirationTime<=o&&(e.expirationTime=0),Ka(e,t,o))}function Da(e,t,n,r,o){if(go(n)){var i=!0;wo(t)}else i=!1;if(ri(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),yi(t,n,r),wi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,l=t.memoizedProps;a.props=l;var u=a.context,s=n.contextType;"object"==typeof s&&null!==s?s=oi(s):s=ho(t,s=go(n)?mo:fo.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l!==r||u!==s)&&bi(t,a,r,s),ii=!1;var p=t.memoizedState;a.state=p,fi(t,r,a,o),u=t.memoizedState,l!==r||p!==u||po.current||ii?("function"==typeof c&&(hi(t,n,c,r),u=t.memoizedState),(l=ii||vi(t,n,l,r,p,u,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.effectTag|=4)):("function"==typeof a.componentDidMount&&(t.effectTag|=4),t.memoizedProps=r,t.memoizedState=u),a.props=r,a.state=u,a.context=s,r=l):("function"==typeof a.componentDidMount&&(t.effectTag|=4),r=!1)}else a=t.stateNode,li(e,t),l=t.memoizedProps,a.props=t.type===t.elementType?l:Qo(t.type,l),u=a.context,"object"==typeof(s=n.contextType)&&null!==s?s=oi(s):s=ho(t,s=go(n)?mo:fo.current),(f="function"==typeof(c=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(l!==r||u!==s)&&bi(t,a,r,s),ii=!1,u=t.memoizedState,a.state=u,fi(t,r,a,o),p=t.memoizedState,l!==r||u!==p||po.current||ii?("function"==typeof c&&(hi(t,n,c,r),p=t.memoizedState),(c=ii||vi(t,n,l,r,u,p,s))?(f||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,s),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,s)),"function"==typeof a.componentDidUpdate&&(t.effectTag|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.effectTag|=256)):("function"!=typeof a.componentDidUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=s,r=c):("function"!=typeof a.componentDidUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=4),"function"!=typeof a.getSnapshotBeforeUpdate||l===e.memoizedProps&&u===e.memoizedState||(t.effectTag|=256),r=!1);return Ma(e,t,n,r,i,o)}function Ma(e,t,n,r,o,i){ja(e,t);var a=0!=(64&t.effectTag);if(!r&&!a)return o&&ko(t,n,!1),Ka(e,t,i);r=t.stateNode,Pa.current=t;var l=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.effectTag|=1,null!==e&&a?(t.child=Ti(t,e.child,null,i),t.child=Ti(t,null,l,i)):Ra(e,t,l,i),t.memoizedState=r.state,o&&ko(t,n,!0),t.child}function za(e){var t=e.stateNode;t.pendingContext?yo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&yo(0,t.context,!1),Ni(e,t.containerInfo)}var $a,Ua,Ba,Ga={dehydrated:null,retryTime:0};function qa(e,t,n){var r,o=t.mode,i=t.pendingProps,a=Fi.current,l=!1;if((r=0!=(64&t.effectTag))||(r=0!=(2&a)&&(null===e||null!==e.memoizedState)),r?(l=!0,t.effectTag&=-65):null!==e&&null===e.memoizedState||void 0===i.fallback||!0===i.unstable_avoidThisFallback||(a|=1),so(Fi,1&a),null===e){if(void 0!==i.fallback&&Ta(t),l){if(l=i.fallback,(i=Ou(null,o,0,null)).return=t,0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ou(l,o,n,null)).return=t,i.sibling=n,t.memoizedState=Ga,t.child=i,n}return o=i.children,t.memoizedState=null,t.child=_i(t,null,o,n)}if(null!==e.memoizedState){if(o=(e=e.child).sibling,l){if(i=i.fallback,(n=_u(e,e.pendingProps)).return=t,0==(2&t.mode)&&(l=null!==t.memoizedState?t.child.child:t.child)!==e.child)for(n.child=l;null!==l;)l.return=n,l=l.sibling;return(o=_u(o,i)).return=t,n.sibling=o,n.childExpirationTime=0,t.memoizedState=Ga,t.child=n,o}return n=Ti(t,e.child,i.children,n),t.memoizedState=null,t.child=n}if(e=e.child,l){if(l=i.fallback,(i=Ou(null,o,0,null)).return=t,i.child=e,null!==e&&(e.return=i),0==(2&t.mode))for(e=null!==t.memoizedState?t.child.child:t.child,i.child=e;null!==e;)e.return=i,e=e.sibling;return(n=Ou(l,o,n,null)).return=t,i.sibling=n,n.effectTag|=2,i.childExpirationTime=0,t.memoizedState=Ga,t.child=i,n}return t.memoizedState=null,t.child=Ti(t,e,i.children,n)}function Ha(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t),ni(e.return,t)}function Wa(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailExpiration:0,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailExpiration=0,a.tailMode=o,a.lastEffect=i)}function Va(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Ra(e,t,r.children,n),0!=(2&(r=Fi.current)))r=1&r|2,t.effectTag|=64;else{if(null!==e&&0!=(64&e.effectTag))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ha(e,n);else if(19===e.tag)Ha(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(so(Fi,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Di(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Wa(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Di(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Wa(t,!0,n,null,i,t.lastEffect);break;case"together":Wa(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function Ka(e,t,n){null!==e&&(t.dependencies=e.dependencies);var r=t.expirationTime;if(0!==r&&au(r),t.childExpirationTime<n)return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=_u(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=_u(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Qa(e,t){switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Xa(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:return go(t.type)&&vo(),null;case 3:return Ii(),uo(po),uo(fo),(n=t.stateNode).pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),null!==e&&null!==e.child||!Ca(t)||(t.effectTag|=4),null;case 5:ji(t),n=Ri(Ai.current);var i=t.type;if(null!==e&&null!=t.stateNode)Ua(e,t,i,r,n),e.ref!==t.ref&&(t.effectTag|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ri(Oi.current),Ca(t)){r=t.stateNode,i=t.type;var l=t.memoizedProps;switch(r[Sn]=t,r[Tn]=l,i){case"iframe":case"object":case"embed":Vt("load",r);break;case"video":case"audio":for(e=0;e<Xe.length;e++)Vt(Xe[e],r);break;case"source":Vt("error",r);break;case"img":case"image":case"link":Vt("error",r),Vt("load",r);break;case"form":Vt("reset",r),Vt("submit",r);break;case"details":Vt("toggle",r);break;case"input":xe(r,l),Vt("invalid",r),un(n,"onChange");break;case"select":r._wrapperState={wasMultiple:!!l.multiple},Vt("invalid",r),un(n,"onChange");break;case"textarea":Re(r,l),Vt("invalid",r),un(n,"onChange")}for(var u in on(i,l),e=null,l)if(l.hasOwnProperty(u)){var s=l[u];"children"===u?"string"==typeof s?r.textContent!==s&&(e=["children",s]):"number"==typeof s&&r.textContent!==""+s&&(e=["children",""+s]):S.hasOwnProperty(u)&&null!=s&&un(n,u)}switch(i){case"input":we(r),_e(r,l,!0);break;case"textarea":we(r),Ie(r);break;case"select":case"option":break;default:"function"==typeof l.onClick&&(r.onclick=sn)}n=e,t.updateQueue=n,null!==n&&(t.effectTag|=4)}else{switch(u=9===n.nodeType?n:n.ownerDocument,e===ln&&(e=Fe(i)),e===ln?"script"===i?((e=u.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=u.createElement(i,{is:r.is}):(e=u.createElement(i),"select"===i&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,i),e[Sn]=t,e[Tn]=r,$a(e,t),t.stateNode=e,u=an(i,r),i){case"iframe":case"object":case"embed":Vt("load",e),s=r;break;case"video":case"audio":for(s=0;s<Xe.length;s++)Vt(Xe[s],e);s=r;break;case"source":Vt("error",e),s=r;break;case"img":case"image":case"link":Vt("error",e),Vt("load",e),s=r;break;case"form":Vt("reset",e),Vt("submit",e),s=r;break;case"details":Vt("toggle",e),s=r;break;case"input":xe(e,r),s=Ee(e,r),Vt("invalid",e),un(n,"onChange");break;case"option":s=Oe(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=o({},r,{value:void 0}),Vt("invalid",e),un(n,"onChange");break;case"textarea":Re(e,r),s=Ae(e,r),Vt("invalid",e),un(n,"onChange");break;default:s=r}on(i,s);var c=s;for(l in c)if(c.hasOwnProperty(l)){var f=c[l];"style"===l?nn(e,f):"dangerouslySetInnerHTML"===l?null!=(f=f?f.__html:void 0)&&ze(e,f):"children"===l?"string"==typeof f?("textarea"!==i||""!==f)&&$e(e,f):"number"==typeof f&&$e(e,""+f):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(S.hasOwnProperty(l)?null!=f&&un(n,l):null!=f&&Y(e,l,f,u))}switch(i){case"input":we(e),_e(e,r,!1);break;case"textarea":we(e),Ie(e);break;case"option":null!=r.value&&e.setAttribute("value",""+ye(r.value));break;case"select":e.multiple=!!r.multiple,null!=(n=r.value)?Pe(e,!!r.multiple,n,!1):null!=r.defaultValue&&Pe(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof s.onClick&&(e.onclick=sn)}vn(i,r)&&(t.effectTag|=4)}null!==t.ref&&(t.effectTag|=128)}return null;case 6:if(e&&null!=t.stateNode)Ba(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ri(Ai.current),Ri(Oi.current),Ca(t)?(n=t.stateNode,r=t.memoizedProps,n[Sn]=t,n.nodeValue!==r&&(t.effectTag|=4)):((n=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Sn]=t,t.stateNode=n)}return null;case 13:return uo(Fi),r=t.memoizedState,0!=(64&t.effectTag)?(t.expirationTime=n,t):(n=null!==r,r=!1,null===e?void 0!==t.memoizedProps.fallback&&Ca(t):(r=null!==(i=e.memoizedState),n||null===i||null!==(i=e.child.sibling)&&(null!==(l=t.firstEffect)?(t.firstEffect=i,i.nextEffect=l):(t.firstEffect=t.lastEffect=i,i.nextEffect=null),i.effectTag=8)),n&&!r&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Fi.current)?Cl===wl&&(Cl=kl):(Cl!==wl&&Cl!==kl||(Cl=El),0!==Nl&&null!==Sl&&(Iu(Sl,_l),Lu(Sl,Nl)))),(n||r)&&(t.effectTag|=4),null);case 4:return Ii(),null;case 10:return ti(t),null;case 17:return go(t.type)&&vo(),null;case 19:if(uo(Fi),null===(r=t.memoizedState))return null;if(i=0!=(64&t.effectTag),null===(l=r.rendering)){if(i)Qa(r,!1);else if(Cl!==wl||null!==e&&0!=(64&e.effectTag))for(l=t.child;null!==l;){if(null!==(e=Di(l))){for(t.effectTag|=64,Qa(r,!1),null!==(i=e.updateQueue)&&(t.updateQueue=i,t.effectTag|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=t.child;null!==r;)l=n,(i=r).effectTag&=2,i.nextEffect=null,i.firstEffect=null,i.lastEffect=null,null===(e=i.alternate)?(i.childExpirationTime=0,i.expirationTime=l,i.child=null,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null):(i.childExpirationTime=e.childExpirationTime,i.expirationTime=e.expirationTime,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,l=e.dependencies,i.dependencies=null===l?null:{expirationTime:l.expirationTime,firstContext:l.firstContext,responders:l.responders}),r=r.sibling;return so(Fi,1&Fi.current|2),t.child}l=l.sibling}}else{if(!i)if(null!==(e=Di(l))){if(t.effectTag|=64,i=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.effectTag|=4),Qa(r,!0),null===r.tail&&"hidden"===r.tailMode&&!l.alternate)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*$o()-r.renderingStartTime>r.tailExpiration&&1<n&&(t.effectTag|=64,i=!0,Qa(r,!1),t.expirationTime=t.childExpirationTime=n-1);r.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=r.last)?n.sibling=l:t.child=l,r.last=l)}return null!==r.tail?(0===r.tailExpiration&&(r.tailExpiration=$o()+500),n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=$o(),n.sibling=null,t=Fi.current,so(Fi,i?1&t|2:1&t),n):null}throw Error(a(156,t.tag))}function Ya(e){switch(e.tag){case 1:go(e.type)&&vo();var t=e.effectTag;return 4096&t?(e.effectTag=-4097&t|64,e):null;case 3:if(Ii(),uo(po),uo(fo),0!=(64&(t=e.effectTag)))throw Error(a(285));return e.effectTag=-4097&t|64,e;case 5:return ji(e),null;case 13:return uo(Fi),4096&(t=e.effectTag)?(e.effectTag=-4097&t|64,e):null;case 19:return uo(Fi),null;case 4:return Ii(),null;case 10:return ti(e),null;default:return null}}function Za(e,t){return{value:e,source:t,stack:ve(t)}}$a=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ua=function(e,t,n,r,i){var a=e.memoizedProps;if(a!==r){var l,u,s=t.stateNode;switch(Ri(Oi.current),e=null,n){case"input":a=Ee(s,a),r=Ee(s,r),e=[];break;case"option":a=Oe(s,a),r=Oe(s,r),e=[];break;case"select":a=o({},a,{value:void 0}),r=o({},r,{value:void 0}),e=[];break;case"textarea":a=Ae(s,a),r=Ae(s,r),e=[];break;default:"function"!=typeof a.onClick&&"function"==typeof r.onClick&&(s.onclick=sn)}for(l in on(n,r),n=null,a)if(!r.hasOwnProperty(l)&&a.hasOwnProperty(l)&&null!=a[l])if("style"===l)for(u in s=a[l])s.hasOwnProperty(u)&&(n||(n={}),n[u]="");else"dangerouslySetInnerHTML"!==l&&"children"!==l&&"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&"autoFocus"!==l&&(S.hasOwnProperty(l)?e||(e=[]):(e=e||[]).push(l,null));for(l in r){var c=r[l];if(s=null!=a?a[l]:void 0,r.hasOwnProperty(l)&&c!==s&&(null!=c||null!=s))if("style"===l)if(s){for(u in s)!s.hasOwnProperty(u)||c&&c.hasOwnProperty(u)||(n||(n={}),n[u]="");for(u in c)c.hasOwnProperty(u)&&s[u]!==c[u]&&(n||(n={}),n[u]=c[u])}else n||(e||(e=[]),e.push(l,n)),n=c;else"dangerouslySetInnerHTML"===l?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(e=e||[]).push(l,c)):"children"===l?s===c||"string"!=typeof c&&"number"!=typeof c||(e=e||[]).push(l,""+c):"suppressContentEditableWarning"!==l&&"suppressHydrationWarning"!==l&&(S.hasOwnProperty(l)?(null!=c&&un(i,l),e||s===c||(e=[])):(e=e||[]).push(l,c))}n&&(e=e||[]).push("style",n),i=e,(t.updateQueue=i)&&(t.effectTag|=4)}},Ba=function(e,t,n,r){n!==r&&(t.effectTag|=4)};var Ja="function"==typeof WeakSet?WeakSet:Set;function el(e,t){var n=t.source,r=t.stack;null===r&&null!==n&&(r=ve(n)),null!==n&&ge(n.type),t=t.value,null!==e&&1===e.tag&&ge(e.type);try{console.error(t)}catch(o){setTimeout((function(){throw o}))}}function tl(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(n){yu(e,n)}else t.current=null}function nl(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.effectTag&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Qo(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:case 5:case 6:case 4:case 17:return}throw Error(a(163))}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.destroy;n.destroy=void 0,void 0!==r&&r()}n=n.next}while(n!==t)}}function ol(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:return void ol(3,n);case 1:if(e=n.stateNode,4&n.effectTag)if(null===t)e.componentDidMount();else{var r=n.elementType===n.type?t.memoizedProps:Qo(n.type,t.memoizedProps);e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate)}return void(null!==(t=n.updateQueue)&&pi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}pi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.effectTag&&vn(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&Ft(n)))));case 19:case 17:case 20:case 21:return}throw Error(a(163))}function al(e,t,n){switch("function"==typeof Eu&&Eu(t),t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e.next;Go(97<n?97:n,(function(){var e=r;do{var n=e.destroy;if(void 0!==n){var o=t;try{n()}catch(i){yu(o,i)}}e=e.next}while(e!==r)}))}break;case 1:tl(t),"function"==typeof(n=t.stateNode).componentWillUnmount&&function(e,t){try{t.props=e.memoizedProps,t.state=e.memoizedState,t.componentWillUnmount()}catch(n){yu(e,n)}}(t,n);break;case 5:tl(t);break;case 4:cl(e,t,n)}}function ll(e){var t=e.alternate;e.return=null,e.child=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.alternate=null,e.firstEffect=null,e.lastEffect=null,e.pendingProps=null,e.memoizedProps=null,e.stateNode=null,null!==t&&ll(t)}function ul(e){return 5===e.tag||3===e.tag||4===e.tag}function sl(e){e:{for(var t=e.return;null!==t;){if(ul(t)){var n=t;break e}t=t.return}throw Error(a(160))}switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.effectTag&&($e(t,""),n.effectTag&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||ul(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.effectTag)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.effectTag)){n=n.stateNode;break e}}r?function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!==(r=r._reactRootContainer)&&void 0!==r||null!==n.onclick||(n.onclick=sn));else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t):function e(t,n,r){var o=t.tag,i=5===o||6===o;if(i)t=i?t.stateNode:t.stateNode.instance,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==o&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n,t)}function cl(e,t,n){for(var r,o,i=t,l=!1;;){if(!l){l=i.return;e:for(;;){if(null===l)throw Error(a(160));switch(r=l.stateNode,l.tag){case 5:o=!1;break e;case 3:case 4:r=r.containerInfo,o=!0;break e}l=l.return}l=!0}if(5===i.tag||6===i.tag){e:for(var u=e,s=i,c=n,f=s;;)if(al(u,f,c),null!==f.child&&4!==f.tag)f.child.return=f,f=f.child;else{if(f===s)break e;for(;null===f.sibling;){if(null===f.return||f.return===s)break e;f=f.return}f.sibling.return=f.return,f=f.sibling}o?(u=r,s=i.stateNode,8===u.nodeType?u.parentNode.removeChild(s):u.removeChild(s)):r.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){r=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(al(e,i,n),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;4===(i=i.return).tag&&(l=!1)}i.sibling.return=i.return,i=i.sibling}}function fl(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:return void rl(3,t);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps,o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Tn]=r,"input"===e&&"radio"===r.type&&null!=r.name&&Se(n,r),an(e,o),t=an(e,r),o=0;o<i.length;o+=2){var l=i[o],u=i[o+1];"style"===l?nn(n,u):"dangerouslySetInnerHTML"===l?ze(n,u):"children"===l?$e(n,u):Y(n,l,u,t)}switch(e){case"input":Te(n,r);break;case"textarea":Ne(n,r);break;case"select":t=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(e=r.value)?Pe(n,!!r.multiple,e,!1):t!==!!r.multiple&&(null!=r.defaultValue?Pe(n,!!r.multiple,r.defaultValue,!0):Pe(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((t=t.stateNode).hydrate&&(t.hydrate=!1,Ft(t.containerInfo)));case 12:return;case 13:if(n=t,null===t.memoizedState?r=!1:(r=!0,n=t.child,Ll=$o()),null!==n)e:for(e=n;;){if(5===e.tag)i=e.stateNode,r?"function"==typeof(i=i.style).setProperty?i.setProperty("display","none","important"):i.display="none":(i=e.stateNode,o=null!=(o=e.memoizedProps.style)&&o.hasOwnProperty("display")?o.display:null,i.style.display=tn("display",o));else if(6===e.tag)e.stateNode.nodeValue=r?"":e.memoizedProps;else{if(13===e.tag&&null!==e.memoizedState&&null===e.memoizedState.dehydrated){(i=e.child.sibling).return=e,e=i;continue}if(null!==e.child){e.child.return=e,e=e.child;continue}}if(e===n)break;for(;null===e.sibling;){if(null===e.return||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}return void pl(t);case 19:return void pl(t);case 17:return}throw Error(a(163))}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ja),t.forEach((function(t){var r=wu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}var dl="function"==typeof WeakMap?WeakMap:Map;function ml(e,t,n){(n=ui(n,null)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Fl||(Fl=!0,Dl=r),el(e,t)},n}function hl(e,t,n){(n=ui(n,null)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return el(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Ml?Ml=new Set([this]):Ml.add(this),el(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}var gl,vl=Math.ceil,yl=X.ReactCurrentDispatcher,bl=X.ReactCurrentOwner,wl=0,kl=3,El=4,xl=0,Sl=null,Tl=null,_l=0,Cl=wl,Ol=null,Pl=1073741823,Al=1073741823,Rl=null,Nl=0,Il=!1,Ll=0,jl=null,Fl=!1,Dl=null,Ml=null,zl=!1,$l=null,Ul=90,Bl=null,Gl=0,ql=null,Hl=0;function Wl(){return 0!=(48&xl)?1073741821-($o()/10|0):0!==Hl?Hl:Hl=1073741821-($o()/10|0)}function Vl(e,t,n){if(0==(2&(t=t.mode)))return 1073741823;var r=Uo();if(0==(4&t))return 99===r?1073741823:1073741822;if(0!=(16&xl))return _l;if(null!==n)e=Ko(e,0|n.timeoutMs||5e3,250);else switch(r){case 99:e=1073741823;break;case 98:e=Ko(e,150,100);break;case 97:case 96:e=Ko(e,5e3,250);break;case 95:e=2;break;default:throw Error(a(326))}return null!==Sl&&e===_l&&--e,e}function Kl(e,t){if(50<Gl)throw Gl=0,ql=null,Error(a(185));if(null!==(e=Ql(e,t))){var n=Uo();1073741823===t?0!=(8&xl)&&0==(48&xl)?Jl(e):(Yl(e),0===xl&&Wo()):Yl(e),0==(4&xl)||98!==n&&99!==n||(null===Bl?Bl=new Map([[e,t]]):(void 0===(n=Bl.get(e))||n>t)&&Bl.set(e,t))}}function Ql(e,t){e.expirationTime<t&&(e.expirationTime=t);var n=e.alternate;null!==n&&n.expirationTime<t&&(n.expirationTime=t);var r=e.return,o=null;if(null===r&&3===e.tag)o=e.stateNode;else for(;null!==r;){if(n=r.alternate,r.childExpirationTime<t&&(r.childExpirationTime=t),null!==n&&n.childExpirationTime<t&&(n.childExpirationTime=t),null===r.return&&3===r.tag){o=r.stateNode;break}r=r.return}return null!==o&&(Sl===o&&(au(t),Cl===El&&Iu(o,_l)),Lu(o,t)),o}function Xl(e){var t=e.lastExpiredTime;if(0!==t)return t;if(!Nu(e,t=e.firstPendingTime))return t;var n=e.lastPingedTime;return 2>=(e=n>(e=e.nextKnownPendingLevel)?n:e)&&t!==e?0:e}function Yl(e){if(0!==e.lastExpiredTime)e.callbackExpirationTime=1073741823,e.callbackPriority=99,e.callbackNode=Ho(Jl.bind(null,e));else{var t=Xl(e),n=e.callbackNode;if(0===t)null!==n&&(e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90);else{var r=Wl();if(1073741823===t?r=99:1===t||2===t?r=95:r=0>=(r=10*(1073741821-t)-10*(1073741821-r))?99:250>=r?98:5250>=r?97:95,null!==n){var o=e.callbackPriority;if(e.callbackExpirationTime===t&&o>=r)return;n!==Io&&So(n)}e.callbackExpirationTime=t,e.callbackPriority=r,t=1073741823===t?Ho(Jl.bind(null,e)):qo(r,Zl.bind(null,e),{timeout:10*(1073741821-t)-$o()}),e.callbackNode=t}}}function Zl(e,t){if(Hl=0,t)return ju(e,t=Wl()),Yl(e),null;var n=Xl(e);if(0!==n){if(t=e.callbackNode,0!=(48&xl))throw Error(a(327));if(hu(),e===Sl&&n===_l||nu(e,n),null!==Tl){var r=xl;xl|=16;for(var o=ou();;)try{uu();break}catch(u){ru(e,u)}if(ei(),xl=r,yl.current=o,1===Cl)throw t=Ol,nu(e,n),Iu(e,n),Yl(e),t;if(null===Tl)switch(o=e.finishedWork=e.current.alternate,e.finishedExpirationTime=n,r=Cl,Sl=null,r){case wl:case 1:throw Error(a(345));case 2:ju(e,2<n?2:n);break;case kl:if(Iu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fu(o)),1073741823===Pl&&10<(o=Ll+500-$o())){if(Il){var i=e.lastPingedTime;if(0===i||i>=n){e.lastPingedTime=n,nu(e,n);break}}if(0!==(i=Xl(e))&&i!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}e.timeoutHandle=bn(pu.bind(null,e),o);break}pu(e);break;case El:if(Iu(e,n),n===(r=e.lastSuspendedTime)&&(e.nextKnownPendingLevel=fu(o)),Il&&(0===(o=e.lastPingedTime)||o>=n)){e.lastPingedTime=n,nu(e,n);break}if(0!==(o=Xl(e))&&o!==n)break;if(0!==r&&r!==n){e.lastPingedTime=r;break}if(1073741823!==Al?r=10*(1073741821-Al)-$o():1073741823===Pl?r=0:(r=10*(1073741821-Pl)-5e3,0>(r=(o=$o())-r)&&(r=0),(n=10*(1073741821-n)-o)<(r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vl(r/1960))-r)&&(r=n)),10<r){e.timeoutHandle=bn(pu.bind(null,e),r);break}pu(e);break;case 5:if(1073741823!==Pl&&null!==Rl){i=Pl;var l=Rl;if(0>=(r=0|l.busyMinDurationMs)?r=0:(o=0|l.busyDelayMs,r=(i=$o()-(10*(1073741821-i)-(0|l.timeoutMs||5e3)))<=o?0:o+r-i),10<r){Iu(e,n),e.timeoutHandle=bn(pu.bind(null,e),r);break}}pu(e);break;default:throw Error(a(329))}if(Yl(e),e.callbackNode===t)return Zl.bind(null,e)}}return null}function Jl(e){var t=e.lastExpiredTime;if(t=0!==t?t:1073741823,0!=(48&xl))throw Error(a(327));if(hu(),e===Sl&&t===_l||nu(e,t),null!==Tl){var n=xl;xl|=16;for(var r=ou();;)try{lu();break}catch(o){ru(e,o)}if(ei(),xl=n,yl.current=r,1===Cl)throw n=Ol,nu(e,t),Iu(e,t),Yl(e),n;if(null!==Tl)throw Error(a(261));e.finishedWork=e.current.alternate,e.finishedExpirationTime=t,Sl=null,pu(e),Yl(e)}return null}function eu(e,t){var n=xl;xl|=1;try{return e(t)}finally{0===(xl=n)&&Wo()}}function tu(e,t){var n=xl;xl&=-2,xl|=8;try{return e(t)}finally{0===(xl=n)&&Wo()}}function nu(e,t){e.finishedWork=null,e.finishedExpirationTime=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,wn(n)),null!==Tl)for(n=Tl.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&vo();break;case 3:Ii(),uo(po),uo(fo);break;case 5:ji(r);break;case 4:Ii();break;case 13:case 19:uo(Fi);break;case 10:ti(r)}n=n.return}Sl=e,Tl=_u(e.current,null),_l=t,Cl=wl,Ol=null,Al=Pl=1073741823,Rl=null,Nl=0,Il=!1}function ru(e,t){for(;;){try{if(ei(),zi.current=ga,Hi)for(var n=Bi.memoizedState;null!==n;){var r=n.queue;null!==r&&(r.pending=null),n=n.next}if(Ui=0,qi=Gi=Bi=null,Hi=!1,null===Tl||null===Tl.return)return Cl=1,Ol=t,Tl=null;e:{var o=e,i=Tl.return,a=Tl,l=t;if(t=_l,a.effectTag|=2048,a.firstEffect=a.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var u=l;if(0==(2&a.mode)){var s=a.alternate;s?(a.updateQueue=s.updateQueue,a.memoizedState=s.memoizedState,a.expirationTime=s.expirationTime):(a.updateQueue=null,a.memoizedState=null)}var c=0!=(1&Fi.current),f=i;do{var p;if(p=13===f.tag){var d=f.memoizedState;if(null!==d)p=null!==d.dehydrated;else{var m=f.memoizedProps;p=void 0!==m.fallback&&(!0!==m.unstable_avoidThisFallback||!c)}}if(p){var h=f.updateQueue;if(null===h){var g=new Set;g.add(u),f.updateQueue=g}else h.add(u);if(0==(2&f.mode)){if(f.effectTag|=64,a.effectTag&=-2981,1===a.tag)if(null===a.alternate)a.tag=17;else{var v=ui(1073741823,null);v.tag=2,si(a,v)}a.expirationTime=1073741823;break e}l=void 0,a=t;var y=o.pingCache;if(null===y?(y=o.pingCache=new dl,l=new Set,y.set(u,l)):void 0===(l=y.get(u))&&(l=new Set,y.set(u,l)),!l.has(a)){l.add(a);var b=bu.bind(null,o,u,a);u.then(b,b)}f.effectTag|=4096,f.expirationTime=t;break e}f=f.return}while(null!==f);l=Error((ge(a.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display."+ve(a))}5!==Cl&&(Cl=2),l=Za(l,a),f=i;do{switch(f.tag){case 3:u=l,f.effectTag|=4096,f.expirationTime=t,ci(f,ml(f,u,t));break e;case 1:u=l;var w=f.type,k=f.stateNode;if(0==(64&f.effectTag)&&("function"==typeof w.getDerivedStateFromError||null!==k&&"function"==typeof k.componentDidCatch&&(null===Ml||!Ml.has(k)))){f.effectTag|=4096,f.expirationTime=t,ci(f,hl(f,u,t));break e}}f=f.return}while(null!==f)}Tl=cu(Tl)}catch(E){t=E;continue}break}}function ou(){var e=yl.current;return yl.current=ga,null===e?ga:e}function iu(e,t){e<Pl&&2<e&&(Pl=e),null!==t&&e<Al&&2<e&&(Al=e,Rl=t)}function au(e){e>Nl&&(Nl=e)}function lu(){for(;null!==Tl;)Tl=su(Tl)}function uu(){for(;null!==Tl&&!Lo();)Tl=su(Tl)}function su(e){var t=gl(e.alternate,e,_l);return e.memoizedProps=e.pendingProps,null===t&&(t=cu(e)),bl.current=null,t}function cu(e){Tl=e;do{var t=Tl.alternate;if(e=Tl.return,0==(2048&Tl.effectTag)){if(t=Xa(t,Tl,_l),1===_l||1!==Tl.childExpirationTime){for(var n=0,r=Tl.child;null!==r;){var o=r.expirationTime,i=r.childExpirationTime;o>n&&(n=o),i>n&&(n=i),r=r.sibling}Tl.childExpirationTime=n}if(null!==t)return t;null!==e&&0==(2048&e.effectTag)&&(null===e.firstEffect&&(e.firstEffect=Tl.firstEffect),null!==Tl.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=Tl.firstEffect),e.lastEffect=Tl.lastEffect),1<Tl.effectTag&&(null!==e.lastEffect?e.lastEffect.nextEffect=Tl:e.firstEffect=Tl,e.lastEffect=Tl))}else{if(null!==(t=Ya(Tl)))return t.effectTag&=2047,t;null!==e&&(e.firstEffect=e.lastEffect=null,e.effectTag|=2048)}if(null!==(t=Tl.sibling))return t;Tl=e}while(null!==Tl);return Cl===wl&&(Cl=5),null}function fu(e){var t=e.expirationTime;return t>(e=e.childExpirationTime)?t:e}function pu(e){var t=Uo();return Go(99,du.bind(null,e,t)),null}function du(e,t){do{hu()}while(null!==$l);if(0!=(48&xl))throw Error(a(327));var n=e.finishedWork,r=e.finishedExpirationTime;if(null===n)return null;if(e.finishedWork=null,e.finishedExpirationTime=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackExpirationTime=0,e.callbackPriority=90,e.nextKnownPendingLevel=0;var o=fu(n);if(e.firstPendingTime=o,r<=e.lastSuspendedTime?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:r<=e.firstSuspendedTime&&(e.firstSuspendedTime=r-1),r<=e.lastPingedTime&&(e.lastPingedTime=0),r<=e.lastExpiredTime&&(e.lastExpiredTime=0),e===Sl&&(Tl=Sl=null,_l=0),1<n.effectTag?null!==n.lastEffect?(n.lastEffect.nextEffect=n,o=n.firstEffect):o=n:o=n.firstEffect,null!==o){var i=xl;xl|=32,bl.current=null,hn=Wt;var l=dn();if(mn(l)){if("selectionStart"in l)var u={start:l.selectionStart,end:l.selectionEnd};else e:{var s=(u=(u=l.ownerDocument)&&u.defaultView||window).getSelection&&u.getSelection();if(s&&0!==s.rangeCount){u=s.anchorNode;var c=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{u.nodeType,f.nodeType}catch(_){u=null;break e}var p=0,d=-1,m=-1,h=0,g=0,v=l,y=null;t:for(;;){for(var b;v!==u||0!==c&&3!==v.nodeType||(d=p+c),v!==f||0!==s&&3!==v.nodeType||(m=p+s),3===v.nodeType&&(p+=v.nodeValue.length),null!==(b=v.firstChild);)y=v,v=b;for(;;){if(v===l)break t;if(y===u&&++h===c&&(d=p),y===f&&++g===s&&(m=p),null!==(b=v.nextSibling))break;y=(v=y).parentNode}v=b}u=-1===d||-1===m?null:{start:d,end:m}}else u=null}u=u||{start:0,end:0}}else u=null;gn={activeElementDetached:null,focusedElem:l,selectionRange:u},Wt=!1,jl=o;do{try{mu()}catch(_){if(null===jl)throw Error(a(330));yu(jl,_),jl=jl.nextEffect}}while(null!==jl);jl=o;do{try{for(l=e,u=t;null!==jl;){var w=jl.effectTag;if(16&w&&$e(jl.stateNode,""),128&w){var k=jl.alternate;if(null!==k){var E=k.ref;null!==E&&("function"==typeof E?E(null):E.current=null)}}switch(1038&w){case 2:sl(jl),jl.effectTag&=-3;break;case 6:sl(jl),jl.effectTag&=-3,fl(jl.alternate,jl);break;case 1024:jl.effectTag&=-1025;break;case 1028:jl.effectTag&=-1025,fl(jl.alternate,jl);break;case 4:fl(jl.alternate,jl);break;case 8:cl(l,c=jl,u),ll(c)}jl=jl.nextEffect}}catch(_){if(null===jl)throw Error(a(330));yu(jl,_),jl=jl.nextEffect}}while(null!==jl);if(E=gn,k=dn(),w=E.focusedElem,u=E.selectionRange,k!==w&&w&&w.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(w.ownerDocument.documentElement,w)){null!==u&&mn(w)&&(k=u.start,void 0===(E=u.end)&&(E=k),"selectionStart"in w?(w.selectionStart=k,w.selectionEnd=Math.min(E,w.value.length)):(E=(k=w.ownerDocument||document)&&k.defaultView||window).getSelection&&(E=E.getSelection(),c=w.textContent.length,l=Math.min(u.start,c),u=void 0===u.end?l:Math.min(u.end,c),!E.extend&&l>u&&(c=u,u=l,l=c),c=pn(w,l),f=pn(w,u),c&&f&&(1!==E.rangeCount||E.anchorNode!==c.node||E.anchorOffset!==c.offset||E.focusNode!==f.node||E.focusOffset!==f.offset)&&((k=k.createRange()).setStart(c.node,c.offset),E.removeAllRanges(),l>u?(E.addRange(k),E.extend(f.node,f.offset)):(k.setEnd(f.node,f.offset),E.addRange(k))))),k=[];for(E=w;E=E.parentNode;)1===E.nodeType&&k.push({element:E,left:E.scrollLeft,top:E.scrollTop});for("function"==typeof w.focus&&w.focus(),w=0;w<k.length;w++)(E=k[w]).element.scrollLeft=E.left,E.element.scrollTop=E.top}Wt=!!hn,gn=hn=null,e.current=n,jl=o;do{try{for(w=e;null!==jl;){var x=jl.effectTag;if(36&x&&il(w,jl.alternate,jl),128&x){k=void 0;var S=jl.ref;if(null!==S){var T=jl.stateNode;switch(jl.tag){case 5:k=T;break;default:k=T}"function"==typeof S?S(k):S.current=k}}jl=jl.nextEffect}}catch(_){if(null===jl)throw Error(a(330));yu(jl,_),jl=jl.nextEffect}}while(null!==jl);jl=null,jo(),xl=i}else e.current=n;if(zl)zl=!1,$l=e,Ul=t;else for(jl=o;null!==jl;)t=jl.nextEffect,jl.nextEffect=null,jl=t;if(0===(t=e.firstPendingTime)&&(Ml=null),1073741823===t?e===ql?Gl++:(Gl=0,ql=e):Gl=0,"function"==typeof ku&&ku(n.stateNode,r),Yl(e),Fl)throw Fl=!1,e=Dl,Dl=null,e;return 0!=(8&xl)||Wo(),null}function mu(){for(;null!==jl;){var e=jl.effectTag;0!=(256&e)&&nl(jl.alternate,jl),0==(512&e)||zl||(zl=!0,qo(97,(function(){return hu(),null}))),jl=jl.nextEffect}}function hu(){if(90!==Ul){var e=97<Ul?97:Ul;return Ul=90,Go(e,gu)}}function gu(){if(null===$l)return!1;var e=$l;if($l=null,0!=(48&xl))throw Error(a(331));var t=xl;for(xl|=32,e=e.current.firstEffect;null!==e;){try{var n=e;if(0!=(512&n.effectTag))switch(n.tag){case 0:case 11:case 15:case 22:rl(5,n),ol(5,n)}}catch(r){if(null===e)throw Error(a(330));yu(e,r)}n=e.nextEffect,e.nextEffect=null,e=n}return xl=t,Wo(),!0}function vu(e,t,n){si(e,t=ml(e,t=Za(n,t),1073741823)),null!==(e=Ql(e,1073741823))&&Yl(e)}function yu(e,t){if(3===e.tag)vu(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){vu(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Ml||!Ml.has(r))){si(n,e=hl(n,e=Za(t,e),1073741823)),null!==(n=Ql(n,1073741823))&&Yl(n);break}}n=n.return}}function bu(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),Sl===e&&_l===n?Cl===El||Cl===kl&&1073741823===Pl&&$o()-Ll<500?nu(e,_l):Il=!0:Nu(e,n)&&(0!==(t=e.lastPingedTime)&&t<n||(e.lastPingedTime=n,Yl(e)))}function wu(e,t){var n=e.stateNode;null!==n&&n.delete(t),0===(t=0)&&(t=Vl(t=Wl(),e,null)),null!==(e=Ql(e,t))&&Yl(e)}gl=function(e,t,n){var r=t.expirationTime;if(null!==e){var o=t.pendingProps;if(e.memoizedProps!==o||po.current)Aa=!0;else{if(r<n){switch(Aa=!1,t.tag){case 3:za(t),Oa();break;case 5:if(Li(t),4&t.mode&&1!==n&&o.hidden)return t.expirationTime=t.childExpirationTime=1,null;break;case 1:go(t.type)&&wo(t);break;case 4:Ni(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value,o=t.type._context,so(Xo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!==(r=t.child.childExpirationTime)&&r>=n?qa(e,t,n):(so(Fi,1&Fi.current),null!==(t=Ka(e,t,n))?t.sibling:null);so(Fi,1&Fi.current);break;case 19:if(r=t.childExpirationTime>=n,0!=(64&e.effectTag)){if(r)return Va(e,t,n);t.effectTag|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null),so(Fi,Fi.current),!r)return null}return Ka(e,t,n)}Aa=!1}}else Aa=!1;switch(t.expirationTime=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,o=ho(t,fo.current),ri(t,n),o=Ki(null,t,r,e,o,n),t.effectTag|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,go(r)){var i=!0;wo(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ai(t);var l=r.getDerivedStateFromProps;"function"==typeof l&&hi(t,r,l,e),o.updater=gi,t.stateNode=o,o._reactInternalFiber=t,wi(t,r,e,n),t=Ma(null,t,r,!0,i,n)}else t.tag=0,Ra(null,t,o,n),t=t.child;return t;case 16:e:{if(o=t.elementType,null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),e=t.pendingProps,function(e){if(-1===e._status){e._status=0;var t=e._ctor;t=t(),e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}}(o),1!==o._status)throw o._result;switch(o=o._result,t.type=o,i=t.tag=function(e){if("function"==typeof e)return Tu(e)?1:0;if(null!=e){if((e=e.$$typeof)===ue)return 11;if(e===fe)return 14}return 2}(o),e=Qo(o,e),i){case 0:t=Fa(null,t,o,e,n);break e;case 1:t=Da(null,t,o,e,n);break e;case 11:t=Na(null,t,o,e,n);break e;case 14:t=Ia(null,t,o,Qo(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Fa(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Da(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 3:if(za(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,li(e,t),fi(t,r,null,n),(r=t.memoizedState.element)===o)Oa(),t=Ka(e,t,n);else{if((o=t.stateNode.hydrate)&&(ka=kn(t.stateNode.containerInfo.firstChild),wa=t,o=Ea=!0),o)for(n=_i(t,null,r,n),t.child=n;n;)n.effectTag=-3&n.effectTag|1024,n=n.sibling;else Ra(e,t,r,n),Oa();t=t.child}return t;case 5:return Li(t),null===e&&Ta(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,l=o.children,yn(r,o)?l=null:null!==i&&yn(r,i)&&(t.effectTag|=16),ja(e,t),4&t.mode&&1!==n&&o.hidden?(t.expirationTime=t.childExpirationTime=1,t=null):(Ra(e,t,l,n),t=t.child),t;case 6:return null===e&&Ta(t),null;case 13:return qa(e,t,n);case 4:return Ni(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Ti(t,null,r,n):Ra(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Na(e,t,r,o=t.elementType===r?o:Qo(r,o),n);case 7:return Ra(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ra(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,l=t.memoizedProps,i=o.value;var u=t.type._context;if(so(Xo,u._currentValue),u._currentValue=i,null!==l)if(u=l.value,0===(i=Dr(u,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(u,i):1073741823))){if(l.children===o.children&&!po.current){t=Ka(e,t,n);break e}}else for(null!==(u=t.child)&&(u.return=t);null!==u;){var s=u.dependencies;if(null!==s){l=u.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&i)){1===u.tag&&((c=ui(n,null)).tag=2,si(u,c)),u.expirationTime<n&&(u.expirationTime=n),null!==(c=u.alternate)&&c.expirationTime<n&&(c.expirationTime=n),ni(u.return,n),s.expirationTime<n&&(s.expirationTime=n);break}c=c.next}}else l=10===u.tag&&u.type===t.type?null:u.child;if(null!==l)l.return=u;else for(l=u;null!==l;){if(l===t){l=null;break}if(null!==(u=l.sibling)){u.return=l.return,l=u;break}l=l.return}u=l}Ra(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ri(t,n),r=r(o=oi(o,i.unstable_observedBits)),t.effectTag|=1,Ra(e,t,r,n),t.child;case 14:return i=Qo(o=t.type,t.pendingProps),Ia(e,t,o,i=Qo(o.type,i),r,n);case 15:return La(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Qo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.effectTag|=2),t.tag=1,go(r)?(e=!0,wo(t)):e=!1,ri(t,n),yi(t,r,o),wi(t,r,o,n),Ma(null,t,r,!0,e,n);case 19:return Va(e,t,n)}throw Error(a(156,t.tag))};var ku=null,Eu=null;function xu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Su(e,t,n,r){return new xu(e,t,n,r)}function Tu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function _u(e,t){var n=e.alternate;return null===n?((n=Su(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.effectTag=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childExpirationTime=e.childExpirationTime,n.expirationTime=e.expirationTime,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{expirationTime:t.expirationTime,firstContext:t.firstContext,responders:t.responders},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cu(e,t,n,r,o,i){var l=2;if(r=e,"function"==typeof e)Tu(e)&&(l=1);else if("string"==typeof e)l=5;else e:switch(e){case ne:return Ou(n.children,o,i,t);case le:l=8,o|=7;break;case re:l=8,o|=1;break;case oe:return(e=Su(12,n,t,8|o)).elementType=oe,e.type=oe,e.expirationTime=i,e;case se:return(e=Su(13,n,t,o)).type=se,e.elementType=se,e.expirationTime=i,e;case ce:return(e=Su(19,n,t,o)).elementType=ce,e.expirationTime=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case ie:l=10;break e;case ae:l=9;break e;case ue:l=11;break e;case fe:l=14;break e;case pe:l=16,r=null;break e;case de:l=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Su(l,n,t,o)).elementType=e,t.type=r,t.expirationTime=i,t}function Ou(e,t,n,r){return(e=Su(7,e,r,t)).expirationTime=n,e}function Pu(e,t,n){return(e=Su(6,e,null,t)).expirationTime=n,e}function Au(e,t,n){return(t=Su(4,null!==e.children?e.children:[],e.key,t)).expirationTime=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Ru(e,t,n){this.tag=t,this.current=null,this.containerInfo=e,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function Nu(e,t){var n=e.firstSuspendedTime;return e=e.lastSuspendedTime,0!==n&&n>=t&&e<=t}function Iu(e,t){var n=e.firstSuspendedTime,r=e.lastSuspendedTime;n<t&&(e.firstSuspendedTime=t),(r>t||0===n)&&(e.lastSuspendedTime=t),t<=e.lastPingedTime&&(e.lastPingedTime=0),t<=e.lastExpiredTime&&(e.lastExpiredTime=0)}function Lu(e,t){t>e.firstPendingTime&&(e.firstPendingTime=t);var n=e.firstSuspendedTime;0!==n&&(t>=n?e.firstSuspendedTime=e.lastSuspendedTime=e.nextKnownPendingLevel=0:t>=e.lastSuspendedTime&&(e.lastSuspendedTime=t+1),t>e.nextKnownPendingLevel&&(e.nextKnownPendingLevel=t))}function ju(e,t){var n=e.lastExpiredTime;(0===n||n>t)&&(e.lastExpiredTime=t)}function Fu(e,t,n,r){var o=t.current,i=Wl(),l=di.suspense;i=Vl(i,o,l);e:if(n){t:{if(Je(n=n._reactInternalFiber)!==n||1!==n.tag)throw Error(a(170));var u=n;do{switch(u.tag){case 3:u=u.stateNode.context;break t;case 1:if(go(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break t}}u=u.return}while(null!==u);throw Error(a(171))}if(1===n.tag){var s=n.type;if(go(s)){n=bo(n,s,u);break e}}n=u}else n=co;return null===t.context?t.context=n:t.pendingContext=n,(t=ui(i,l)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),si(o,t),Kl(o,i),i}function Du(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Mu(e,t){null!==(e=e.memoizedState)&&null!==e.dehydrated&&e.retryTime<t&&(e.retryTime=t)}function zu(e,t){Mu(e,t),(e=e.alternate)&&Mu(e,t)}function $u(e,t,n){var r=new Ru(e,t,n=null!=n&&!0===n.hydrate),o=Su(3,null,null,2===t?7:1===t?3:0);r.current=o,o.stateNode=r,ai(o),e[_n]=r.current,n&&0!==t&&function(e,t){var n=Ze(t);_t.forEach((function(e){mt(e,t,n)})),Ct.forEach((function(e){mt(e,t,n)}))}(0,9===e.nodeType?e:e.ownerDocument),this._internalRoot=r}function Uu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Bu(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var l=o;o=function(){var e=Du(a);l.call(e)}}Fu(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new $u(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var u=o;o=function(){var e=Du(a);u.call(e)}}tu((function(){Fu(t,a,e,o)}))}return Du(a)}function Gu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:te,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function qu(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Uu(t))throw Error(a(200));return Gu(e,t,null,n)}$u.prototype.render=function(e){Fu(e,this._internalRoot,null,null)},$u.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Fu(null,e,null,(function(){t[_n]=null}))},ht=function(e){if(13===e.tag){var t=Ko(Wl(),150,100);Kl(e,t),zu(e,t)}},gt=function(e){13===e.tag&&(Kl(e,3),zu(e,3))},vt=function(e){if(13===e.tag){var t=Wl();Kl(e,t=Vl(t,e,null)),zu(e,t)}},O=function(e,t,n){switch(t){case"input":if(Te(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=An(r);if(!o)throw Error(a(90));ke(r),Te(r,o)}}}break;case"textarea":Ne(e,n);break;case"select":null!=(t=n.value)&&Pe(e,!!n.multiple,t,!1)}},L=eu,j=function(e,t,n,r,o){var i=xl;xl|=4;try{return Go(98,e.bind(null,t,n,r,o))}finally{0===(xl=i)&&Wo()}},F=function(){0==(49&xl)&&(function(){if(null!==Bl){var e=Bl;Bl=null,e.forEach((function(e,t){ju(t,e),Yl(t)})),Wo()}}(),hu())},D=function(e,t){var n=xl;xl|=2;try{return e(t)}finally{0===(xl=n)&&Wo()}};var Hu,Wu,Vu={Events:[On,Pn,An,_,x,Dn,function(e){ot(e,Fn)},N,I,Yt,lt,hu,{current:!1}]};Wu=(Hu={findFiberByHostInstance:Cn,bundleType:0,version:"16.13.1",rendererPackageName:"react-dom"}).findFiberByHostInstance,function(e){if("undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)return!0;try{var n=t.inject(e);ku=function(e){try{t.onCommitFiberRoot(n,e,void 0,64==(64&e.current.effectTag))}catch(r){}},Eu=function(e){try{t.onCommitFiberUnmount(n,e)}catch(r){}}}catch(r){}}(o({},Hu,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:X.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=nt(e))?null:e.stateNode},findFiberByHostInstance:function(e){return Wu?Wu(e):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null})),t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Vu,t.createPortal=qu,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternalFiber;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return e=null===(e=nt(t))?null:e.stateNode},t.flushSync=function(e,t){if(0!=(48&xl))throw Error(a(187));var n=xl;xl|=1;try{return Go(99,e.bind(null,t))}finally{xl=n,Wo()}},t.hydrate=function(e,t,n){if(!Uu(t))throw Error(a(200));return Bu(null,e,t,!0,n)},t.render=function(e,t,n){if(!Uu(t))throw Error(a(200));return Bu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Uu(e))throw Error(a(40));return!!e._reactRootContainer&&(tu((function(){Bu(null,null,e,!1,(function(){e._reactRootContainer=null,e[_n]=null}))})),!0)},t.unstable_batchedUpdates=eu,t.unstable_createPortal=function(e,t){return qu(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Uu(n))throw Error(a(200));if(null==e||void 0===e._reactInternalFiber)throw Error(a(38));return Bu(e,t,n,!1,r)},t.version="16.13.1"},function(e,t,n){"use strict";e.exports=n(92)},function(e,t,n){"use strict";var r,o,i,a,l;if("undefined"==typeof window||"function"!=typeof MessageChannel){var u=null,s=null,c=function(){if(null!==u)try{var e=t.unstable_now();u(!0,e),u=null}catch(n){throw setTimeout(c,0),n}},f=Date.now();t.unstable_now=function(){return Date.now()-f},r=function(e){null!==u?setTimeout(r,0,e):(u=e,setTimeout(c,0))},o=function(e,t){s=setTimeout(e,t)},i=function(){clearTimeout(s)},a=function(){return!1},l=t.unstable_forceFrameRate=function(){}}else{var p=window.performance,d=window.Date,m=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var g=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),"function"!=typeof g&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")}if("object"==typeof p&&"function"==typeof p.now)t.unstable_now=function(){return p.now()};else{var v=d.now();t.unstable_now=function(){return d.now()-v}}var y=!1,b=null,w=-1,k=5,E=0;a=function(){return t.unstable_now()>=E},l=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported"):k=0<e?Math.floor(1e3/e):5};var x=new MessageChannel,S=x.port2;x.port1.onmessage=function(){if(null!==b){var e=t.unstable_now();E=e+k;try{b(!0,e)?S.postMessage(null):(y=!1,b=null)}catch(n){throw S.postMessage(null),n}}else y=!1},r=function(e){b=e,y||(y=!0,S.postMessage(null))},o=function(e,n){w=m((function(){e(t.unstable_now())}),n)},i=function(){h(w),w=-1}}function T(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<O(o,t)))break e;e[r]=t,e[n]=o,n=r}}function _(e){return void 0===(e=e[0])?null:e}function C(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],l=i+1,u=e[l];if(void 0!==a&&0>O(a,n))void 0!==u&&0>O(u,a)?(e[r]=u,e[l]=n,r=l):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==u&&0>O(u,n)))break e;e[r]=u,e[l]=n,r=l}}}return t}return null}function O(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var P=[],A=[],R=1,N=null,I=3,L=!1,j=!1,F=!1;function D(e){for(var t=_(A);null!==t;){if(null===t.callback)C(A);else{if(!(t.startTime<=e))break;C(A),t.sortIndex=t.expirationTime,T(P,t)}t=_(A)}}function M(e){if(F=!1,D(e),!j)if(null!==_(P))j=!0,r(z);else{var t=_(A);null!==t&&o(M,t.startTime-e)}}function z(e,n){j=!1,F&&(F=!1,i()),L=!0;var r=I;try{for(D(n),N=_(P);null!==N&&(!(N.expirationTime>n)||e&&!a());){var l=N.callback;if(null!==l){N.callback=null,I=N.priorityLevel;var u=l(N.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?N.callback=u:N===_(P)&&C(P),D(n)}else C(P);N=_(P)}if(null!==N)var s=!0;else{var c=_(A);null!==c&&o(M,c.startTime-n),s=!1}return s}finally{N=null,I=r,L=!1}}function $(e){switch(e){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var U=l;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){j||L||(j=!0,r(z))},t.unstable_getCurrentPriorityLevel=function(){return I},t.unstable_getFirstCallbackNode=function(){return _(P)},t.unstable_next=function(e){switch(I){case 1:case 2:case 3:var t=3;break;default:t=I}var n=I;I=t;try{return e()}finally{I=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=U,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=I;I=e;try{return t()}finally{I=n}},t.unstable_scheduleCallback=function(e,n,a){var l=t.unstable_now();if("object"==typeof a&&null!==a){var u=a.delay;u="number"==typeof u&&0<u?l+u:l,a="number"==typeof a.timeout?a.timeout:$(e)}else a=$(e),u=l;return e={id:R++,callback:n,priorityLevel:e,startTime:u,expirationTime:a=u+a,sortIndex:-1},u>l?(e.sortIndex=u,T(A,e),null===_(P)&&e===_(A)&&(F?i():F=!0,o(M,u-l))):(e.sortIndex=a,T(P,e),j||L||(j=!0,r(z))),e},t.unstable_shouldYield=function(){var e=t.unstable_now();D(e);var n=_(P);return n!==N&&null!==N&&null!==n&&null!==n.callback&&n.startTime<=e&&n.expirationTime<N.expirationTime||a()},t.unstable_wrapCallback=function(e){var t=I;return function(){var n=I;I=t;try{return e.apply(this,arguments)}finally{I=n}}}},function(e,t,n){"use strict";var r=n(44);n(12)({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},function(e,t,n){e.exports=n(41)("native-function-to-string",Function.toString)},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r=n(97),o=n(57),i=n(47),a={};n(11)(a,n(2)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:o(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var r=n(8),o=n(98),i=n(59),a=n(46)("IE_PROTO"),l=function(){},u=function(){var e,t=n(45)("iframe"),r=i.length;for(t.style.display="none",n(66).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),u=e.F;r--;)delete u.prototype[i[r]];return u()};e.exports=Object.create||function(e,t){var n;return null!==e?(l.prototype=r(e),n=new l,l.prototype=null,n[a]=e):n=u(),void 0===t?n:o(n,t)}},function(e,t,n){var r=n(28),o=n(8),i=n(23);e.exports=n(9)?Object.defineProperties:function(e,t){o(e);for(var n,a=i(t),l=a.length,u=0;l>u;)r.f(e,n=a[u++],t[n]);return e}},function(e,t,n){var r=n(33),o=Math.max,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?o(e+t,0):i(e,t)}},function(e,t,n){var r=n(29),o=n(31),i=n(46)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=o(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var r=n(12),o=n(16),i=n(14);e.exports=function(e,t){var n=(o.Object||{})[e]||Object[e],a={};a[e]=t(n),r(r.S+r.F*i((function(){n(1)})),"Object",a)}},function(e,t,n){"use strict";var r=n(103);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t){e.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,o=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,l=r?Symbol.for("react.strict_mode"):60108,u=r?Symbol.for("react.profiler"):60114,s=r?Symbol.for("react.provider"):60109,c=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,p=r?Symbol.for("react.concurrent_mode"):60111,d=r?Symbol.for("react.forward_ref"):60112,m=r?Symbol.for("react.suspense"):60113,h=r?Symbol.for("react.suspense_list"):60120,g=r?Symbol.for("react.memo"):60115,v=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,k=r?Symbol.for("react.scope"):60119;function E(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case o:switch(e=e.type){case f:case p:case a:case u:case l:case m:return e;default:switch(e=e&&e.$$typeof){case c:case d:case v:case g:case s:return e;default:return t}}case i:return t}}}function x(e){return E(e)===p}t.AsyncMode=f,t.ConcurrentMode=p,t.ContextConsumer=c,t.ContextProvider=s,t.Element=o,t.ForwardRef=d,t.Fragment=a,t.Lazy=v,t.Memo=g,t.Portal=i,t.Profiler=u,t.StrictMode=l,t.Suspense=m,t.isAsyncMode=function(e){return x(e)||E(e)===f},t.isConcurrentMode=x,t.isContextConsumer=function(e){return E(e)===c},t.isContextProvider=function(e){return E(e)===s},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===o},t.isForwardRef=function(e){return E(e)===d},t.isFragment=function(e){return E(e)===a},t.isLazy=function(e){return E(e)===v},t.isMemo=function(e){return E(e)===g},t.isPortal=function(e){return E(e)===i},t.isProfiler=function(e){return E(e)===u},t.isStrictMode=function(e){return E(e)===l},t.isSuspense=function(e){return E(e)===m},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===p||e===u||e===l||e===m||e===h||"object"==typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===g||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===b||e.$$typeof===w||e.$$typeof===k||e.$$typeof===y)},t.typeOf=E},,,,function(e,t,n){"use strict";n.r(t);var r=n(52),o=n(35),i=n.n(o),a=n(37);!function(){if(i.a.canUseDOM){var e=a.a.themeConfig.prism,t=(e=void 0===e?{}:e).additionalLanguages,o=void 0===t?[]:t;window.Prism=r.a,o.forEach((function(e){n(48)("./prism-"+e)})),delete window.Prism}}()},function(e,t,n){const r=n(111),o=n(112),i=new Set;function a(e){void 0===e?e=Object.keys(r.languages).filter(e=>"meta"!=e):Array.isArray(e)||(e=[e]);const t=[...i,...Object.keys(Prism.languages)];o(r,e,t).load(e=>{if(!(e in r.languages))return void(a.silent||console.warn("Language does not exist: "+e));const t="./prism-"+e;delete n.c[n(48).resolve(t)],delete Prism.languages[e],n(48)(t),i.add(e)})}a.silent=!1,e.exports=a},function(e,t,n){e.exports&&(e.exports={core:{meta:{path:"components/prism-core.js",option:"mandatory"},core:"Core"},themes:{meta:{path:"themes/{id}.css",link:"index.html?theme={id}",exclusive:!0},prism:{title:"Default",option:"default"},"prism-dark":"Dark","prism-funky":"Funky","prism-okaidia":{title:"Okaidia",owner:"ocodia"},"prism-twilight":{title:"Twilight",owner:"remybach"},"prism-coy":{title:"Coy",owner:"tshedor"},"prism-solarizedlight":{title:"Solarized Light",owner:"hectormatos2011 "},"prism-tomorrow":{title:"Tomorrow Night",owner:"Rosey"}},languages:{meta:{path:"components/prism-{id}",noCSS:!0,examplesPath:"examples/prism-{id}",addCheckAll:!0},markup:{title:"Markup",alias:["html","xml","svg","mathml"],aliasTitles:{html:"HTML",xml:"XML",svg:"SVG",mathml:"MathML"},option:"default"},css:{title:"CSS",option:"default",modify:"markup"},clike:{title:"C-like",option:"default"},javascript:{title:"JavaScript",require:"clike",modify:"markup",alias:"js",option:"default"},abap:{title:"ABAP",owner:"dellagustin"},abnf:{title:"Augmented Backus\u2013Naur form",owner:"RunDevelopment"},actionscript:{title:"ActionScript",require:"javascript",modify:"markup",owner:"Golmote"},ada:{title:"Ada",owner:"Lucretia"},antlr4:{title:"ANTLR4",alias:"g4",owner:"RunDevelopment"},apacheconf:{title:"Apache Configuration",owner:"GuiTeK"},apl:{title:"APL",owner:"ngn"},applescript:{title:"AppleScript",owner:"Golmote"},aql:{title:"AQL",owner:"RunDevelopment"},arduino:{title:"Arduino",require:"cpp",owner:"eisbehr-"},arff:{title:"ARFF",owner:"Golmote"},asciidoc:{alias:"adoc",title:"AsciiDoc",owner:"Golmote"},asm6502:{title:"6502 Assembly",owner:"kzurawel"},aspnet:{title:"ASP.NET (C#)",require:["markup","csharp"],owner:"nauzilus"},autohotkey:{title:"AutoHotkey",owner:"aviaryan"},autoit:{title:"AutoIt",owner:"Golmote"},bash:{title:"Bash",alias:"shell",aliasTitles:{shell:"Shell"},owner:"zeitgeist87"},basic:{title:"BASIC",owner:"Golmote"},batch:{title:"Batch",owner:"Golmote"},bbcode:{title:"BBcode",alias:"shortcode",aliasTitles:{shortcode:"Shortcode"},owner:"RunDevelopment"},bison:{title:"Bison",require:"c",owner:"Golmote"},bnf:{title:"Backus\u2013Naur form",alias:"rbnf",aliasTitles:{rbnf:"Routing Backus\u2013Naur form"},owner:"RunDevelopment"},brainfuck:{title:"Brainfuck",owner:"Golmote"},brightscript:{title:"BrightScript",owner:"RunDevelopment"},bro:{title:"Bro",owner:"wayward710"},c:{title:"C",require:"clike",owner:"zeitgeist87"},concurnas:{title:"Concurnas",alias:"conc",owner:"jasontatton"},csharp:{title:"C#",require:"clike",alias:["cs","dotnet"],owner:"mvalipour"},cpp:{title:"C++",require:"c",owner:"zeitgeist87"},cil:{title:"CIL",owner:"sbrl"},coffeescript:{title:"CoffeeScript",require:"javascript",alias:"coffee",owner:"R-osey"},cmake:{title:"CMake",owner:"mjrogozinski"},clojure:{title:"Clojure",owner:"troglotit"},crystal:{title:"Crystal",require:"ruby",owner:"MakeNowJust"},csp:{title:"Content-Security-Policy",owner:"ScottHelme"},"css-extras":{title:"CSS Extras",require:"css",modify:"css",owner:"milesj"},d:{title:"D",require:"clike",owner:"Golmote"},dart:{title:"Dart",require:"clike",owner:"Golmote"},dax:{title:"DAX",owner:"peterbud"},diff:{title:"Diff",owner:"uranusjr"},django:{title:"Django/Jinja2",require:"markup-templating",alias:"jinja2",owner:"romanvm"},"dns-zone-file":{title:"DNS zone file",owner:"RunDevelopment",alias:"dns-zone"},docker:{title:"Docker",alias:"dockerfile",owner:"JustinBeckwith"},ebnf:{title:"Extended Backus\u2013Naur form",owner:"RunDevelopment"},eiffel:{title:"Eiffel",owner:"Conaclos"},ejs:{title:"EJS",require:["javascript","markup-templating"],owner:"RunDevelopment"},elixir:{title:"Elixir",owner:"Golmote"},elm:{title:"Elm",owner:"zwilias"},etlua:{title:"Embedded Lua templating",require:["lua","markup-templating"],owner:"RunDevelopment"},erb:{title:"ERB",require:["ruby","markup-templating"],owner:"Golmote"},erlang:{title:"Erlang",owner:"Golmote"},"excel-formula":{title:"Excel Formula",alias:["xlsx","xls"],owner:"RunDevelopment"},fsharp:{title:"F#",require:"clike",owner:"simonreynolds7"},factor:{title:"Factor",owner:"catb0t"},"firestore-security-rules":{title:"Firestore security rules",require:"clike",owner:"RunDevelopment"},flow:{title:"Flow",require:"javascript",owner:"Golmote"},fortran:{title:"Fortran",owner:"Golmote"},ftl:{title:"FreeMarker Template Language",require:"markup-templating",owner:"RunDevelopment"},gcode:{title:"G-code",owner:"RunDevelopment"},gdscript:{title:"GDScript",owner:"RunDevelopment"},gedcom:{title:"GEDCOM",owner:"Golmote"},gherkin:{title:"Gherkin",owner:"hason"},git:{title:"Git",owner:"lgiraudel"},glsl:{title:"GLSL",require:"clike",owner:"Golmote"},gml:{title:"GameMaker Language",alias:"gamemakerlanguage",require:"clike",owner:"LiarOnce"},go:{title:"Go",require:"clike",owner:"arnehormann"},graphql:{title:"GraphQL",owner:"Golmote"},groovy:{title:"Groovy",require:"clike",owner:"robfletcher"},haml:{title:"Haml",require:"ruby",optional:["css","css-extras","coffeescript","erb","javascript","less","markdown","scss","textile"],owner:"Golmote"},handlebars:{title:"Handlebars",require:"markup-templating",owner:"Golmote"},haskell:{title:"Haskell",alias:"hs",owner:"bholst"},haxe:{title:"Haxe",require:"clike",owner:"Golmote"},hcl:{title:"HCL",owner:"outsideris"},http:{title:"HTTP",optional:["css","javascript","json","markup"],owner:"danielgtaylor"},hpkp:{title:"HTTP Public-Key-Pins",owner:"ScottHelme"},hsts:{title:"HTTP Strict-Transport-Security",owner:"ScottHelme"},ichigojam:{title:"IchigoJam",owner:"BlueCocoa"},icon:{title:"Icon",owner:"Golmote"},inform7:{title:"Inform 7",owner:"Golmote"},ini:{title:"Ini",owner:"aviaryan"},io:{title:"Io",owner:"AlesTsurko"},j:{title:"J",owner:"Golmote"},java:{title:"Java",require:"clike",owner:"sherblot"},javadoc:{title:"JavaDoc",require:["markup","java","javadoclike"],modify:"java",optional:"scala",owner:"RunDevelopment"},javadoclike:{title:"JavaDoc-like",modify:["java","javascript","php"],owner:"RunDevelopment"},javastacktrace:{title:"Java stack trace",owner:"RunDevelopment"},jolie:{title:"Jolie",require:"clike",owner:"thesave"},jq:{title:"JQ",owner:"RunDevelopment"},jsdoc:{title:"JSDoc",require:["javascript","javadoclike"],modify:"javascript",optional:["actionscript","coffeescript"],owner:"RunDevelopment"},"js-extras":{title:"JS Extras",require:"javascript",modify:"javascript",optional:["actionscript","coffeescript","flow","n4js","typescript"],owner:"RunDevelopment"},"js-templates":{title:"JS Templates",require:"javascript",modify:"javascript",optional:["css","css-extras","graphql","markdown","markup"],owner:"RunDevelopment"},json:{title:"JSON",owner:"CupOfTea696"},jsonp:{title:"JSONP",require:"json",owner:"RunDevelopment"},json5:{title:"JSON5",require:"json",owner:"RunDevelopment"},julia:{title:"Julia",owner:"cdagnino"},keyman:{title:"Keyman",owner:"mcdurdin"},kotlin:{title:"Kotlin",require:"clike",owner:"Golmote"},latex:{title:"LaTeX",alias:["tex","context"],aliasTitles:{tex:"TeX",context:"ConTeXt"},owner:"japborst"},latte:{title:"Latte",require:["clike","markup-templating","php"],owner:"nette"},less:{title:"Less",require:"css",optional:"css-extras",owner:"Golmote"},lilypond:{title:"LilyPond",require:"scheme",alias:"ly",owner:"RunDevelopment"},liquid:{title:"Liquid",owner:"cinhtau"},lisp:{title:"Lisp",alias:["emacs","elisp","emacs-lisp"],owner:"JuanCaicedo"},livescript:{title:"LiveScript",owner:"Golmote"},llvm:{title:"LLVM IR",owner:"porglezomp"},lolcode:{title:"LOLCODE",owner:"Golmote"},lua:{title:"Lua",owner:"Golmote"},makefile:{title:"Makefile",owner:"Golmote"},markdown:{title:"Markdown",require:"markup",alias:"md",owner:"Golmote"},"markup-templating":{title:"Markup templating",require:"markup",owner:"Golmote"},matlab:{title:"MATLAB",owner:"Golmote"},mel:{title:"MEL",owner:"Golmote"},mizar:{title:"Mizar",owner:"Golmote"},monkey:{title:"Monkey",owner:"Golmote"},moonscript:{title:"MoonScript",alias:"moon",owner:"RunDevelopment"},n1ql:{title:"N1QL",owner:"TMWilds"},n4js:{title:"N4JS",require:"javascript",optional:"jsdoc",alias:"n4jsd",owner:"bsmith-n4"},"nand2tetris-hdl":{title:"Nand To Tetris HDL",owner:"stephanmax"},nasm:{title:"NASM",owner:"rbmj"},neon:{title:"NEON",owner:"nette"},nginx:{title:"nginx",owner:"westonganger",require:"clike"},nim:{title:"Nim",owner:"Golmote"},nix:{title:"Nix",owner:"Golmote"},nsis:{title:"NSIS",owner:"idleberg"},objectivec:{title:"Objective-C",require:"c",owner:"uranusjr"},ocaml:{title:"OCaml",owner:"Golmote"},opencl:{title:"OpenCL",require:"c",modify:["c","cpp"],owner:"Milania1"},oz:{title:"Oz",owner:"Golmote"},parigp:{title:"PARI/GP",owner:"Golmote"},parser:{title:"Parser",require:"markup",owner:"Golmote"},pascal:{title:"Pascal",alias:"objectpascal",aliasTitles:{objectpascal:"Object Pascal"},owner:"Golmote"},pascaligo:{title:"Pascaligo",owner:"DefinitelyNotAGoat"},pcaxis:{title:"PC-Axis",alias:"px",owner:"RunDevelopment"},perl:{title:"Perl",owner:"Golmote"},php:{title:"PHP",require:["clike","markup-templating"],owner:"milesj"},phpdoc:{title:"PHPDoc",require:["php","javadoclike"],modify:"php",owner:"RunDevelopment"},"php-extras":{title:"PHP Extras",require:"php",modify:"php",owner:"milesj"},plsql:{title:"PL/SQL",require:"sql",owner:"Golmote"},powerquery:{title:"PowerQuery",alias:["pq","mscript"],owner:"peterbud"},powershell:{title:"PowerShell",owner:"nauzilus"},processing:{title:"Processing",require:"clike",owner:"Golmote"},prolog:{title:"Prolog",owner:"Golmote"},properties:{title:".properties",owner:"Golmote"},protobuf:{title:"Protocol Buffers",require:"clike",owner:"just-boris"},pug:{title:"Pug",require:["markup","javascript"],optional:["coffeescript","ejs","handlebars","less","livescript","markdown","scss","stylus","twig"],owner:"Golmote"},puppet:{title:"Puppet",owner:"Golmote"},pure:{title:"Pure",optional:["c","cpp","fortran"],owner:"Golmote"},python:{title:"Python",alias:"py",owner:"multipetros"},q:{title:"Q (kdb+ database)",owner:"Golmote"},qml:{title:"QML",require:"javascript",owner:"RunDevelopment"},qore:{title:"Qore",require:"clike",owner:"temnroegg"},r:{title:"R",owner:"Golmote"},jsx:{title:"React JSX",require:["markup","javascript"],optional:["jsdoc","js-extras","js-templates"],owner:"vkbansal"},tsx:{title:"React TSX",require:["jsx","typescript"]},renpy:{title:"Ren'py",owner:"HyuchiaDiego"},reason:{title:"Reason",require:"clike",owner:"Golmote"},regex:{title:"Regex",modify:["actionscript","coffeescript","flow","javascript","typescript","vala"],owner:"RunDevelopment"},rest:{title:"reST (reStructuredText)",owner:"Golmote"},rip:{title:"Rip",owner:"ravinggenius"},roboconf:{title:"Roboconf",owner:"Golmote"},robotframework:{title:"Robot Framework",alias:"robot",owner:"RunDevelopment"},ruby:{title:"Ruby",require:"clike",alias:"rb",owner:"samflores"},rust:{title:"Rust",owner:"Golmote"},sas:{title:"SAS",optional:["groovy","lua","sql"],owner:"Golmote"},sass:{title:"Sass (Sass)",require:"css",owner:"Golmote"},scss:{title:"Sass (Scss)",require:"css",optional:"css-extras",owner:"MoOx"},scala:{title:"Scala",require:"java",owner:"jozic"},scheme:{title:"Scheme",owner:"bacchus123"},"shell-session":{title:"Shell session",require:"bash",owner:"RunDevelopment"},smalltalk:{title:"Smalltalk",owner:"Golmote"},smarty:{title:"Smarty",require:"markup-templating",owner:"Golmote"},solidity:{title:"Solidity (Ethereum)",require:"clike",owner:"glachaud"},"solution-file":{title:"Solution file",alias:"sln",owner:"RunDevelopment"},soy:{title:"Soy (Closure Template)",require:"markup-templating",owner:"Golmote"},sparql:{title:"SPARQL",require:"turtle",owner:"Triply-Dev",alias:"rq"},"splunk-spl":{title:"Splunk SPL",owner:"RunDevelopment"},sqf:{title:"SQF: Status Quo Function (Arma 3)",require:"clike",owner:"RunDevelopment"},sql:{title:"SQL",owner:"multipetros"},stylus:{title:"Stylus",owner:"vkbansal"},swift:{title:"Swift",require:"clike",owner:"chrischares"},tap:{title:"TAP",owner:"isaacs",require:"yaml"},tcl:{title:"Tcl",owner:"PeterChaplin"},textile:{title:"Textile",require:"markup",optional:"css",owner:"Golmote"},toml:{title:"TOML",owner:"RunDevelopment"},tt2:{title:"Template Toolkit 2",require:["clike","markup-templating"],owner:"gflohr"},turtle:{title:"Turtle",alias:"trig",aliasTitles:{trig:"TriG"},owner:"jakubklimek"},twig:{title:"Twig",require:"markup",owner:"brandonkelly"},typescript:{title:"TypeScript",require:"javascript",optional:"js-templates",alias:"ts",owner:"vkbansal"},"t4-cs":{title:"T4 Text Templates (C#)",require:["t4-templating","csharp"],alias:"t4",owner:"RunDevelopment"},"t4-vb":{title:"T4 Text Templates (VB)",require:["t4-templating","visual-basic"],owner:"RunDevelopment"},"t4-templating":{title:"T4 templating",owner:"RunDevelopment"},vala:{title:"Vala",require:"clike",owner:"TemplarVolk"},vbnet:{title:"VB.Net",require:"basic",owner:"Bigsby"},velocity:{title:"Velocity",require:"markup",owner:"Golmote"},verilog:{title:"Verilog",owner:"a-rey"},vhdl:{title:"VHDL",owner:"a-rey"},vim:{title:"vim",owner:"westonganger"},"visual-basic":{title:"Visual Basic",alias:"vb",owner:"Golmote"},wasm:{title:"WebAssembly",owner:"Golmote"},wiki:{title:"Wiki markup",require:"markup",owner:"Golmote"},xeora:{title:"Xeora",require:"markup",alias:"xeoracube",aliasTitles:{xeoracube:"XeoraCube"},owner:"freakmaxi"},xojo:{title:"Xojo (REALbasic)",owner:"Golmote"},xquery:{title:"XQuery",require:"markup",owner:"Golmote"},yaml:{title:"YAML",alias:"yml",owner:"hason"},zig:{title:"Zig",owner:"RunDevelopment"}},plugins:{meta:{path:"plugins/{id}/prism-{id}",link:"plugins/{id}/"},"line-highlight":{title:"Line Highlight",description:"Highlights specific lines and/or line ranges."},"line-numbers":{title:"Line Numbers",description:"Line number at the beginning of code lines.",owner:"kuba-kubula"},"show-invisibles":{title:"Show Invisibles",description:"Show hidden characters such as tabs and line breaks.",optional:["autolinker","data-uri-highlight"]},autolinker:{title:"Autolinker",description:"Converts URLs and emails in code to clickable links. Parses Markdown links in comments."},wpd:{title:"WebPlatform Docs",description:'Makes tokens link to <a href="https://webplatform.github.io/docs/">WebPlatform.org documentation</a>. The links open in a new tab.'},"custom-class":{title:"Custom Class",description:"This plugin allows you to prefix Prism's default classes (<code>.comment</code> can become <code>.namespace--comment</code>) or replace them with your defined ones (like <code>.editor__comment</code>). You can even add new classes.",owner:"dvkndn",noCSS:!0},"file-highlight":{title:"File Highlight",description:"Fetch external files and highlight them with Prism. Used on the Prism website itself.",noCSS:!0},"show-language":{title:"Show Language",description:"Display the highlighted language in code blocks (inline code does not show the label).",owner:"nauzilus",noCSS:!0,require:"toolbar"},"jsonp-highlight":{title:"JSONP Highlight",description:"Fetch content with JSONP and highlight some interesting content (e.g. GitHub/Gists or Bitbucket API).",noCSS:!0,owner:"nauzilus"},"highlight-keywords":{title:"Highlight Keywords",description:"Adds special CSS classes for each keyword matched in the code. For example, the keyword <code>if</code> will have the class <code>keyword-if</code> as well. You can have fine grained control over the appearance of each keyword by providing your own CSS rules.",owner:"vkbansal",noCSS:!0},"remove-initial-line-feed":{title:"Remove initial line feed",description:"Removes the initial line feed in code blocks.",owner:"Golmote",noCSS:!0},"inline-color":{title:"Inline color",description:"Adds a small inline preview for colors in style sheets.",require:"css-extras",owner:"RunDevelopment"},previewers:{title:"Previewers",description:"Previewers for angles, colors, gradients, easing and time.",require:"css-extras",owner:"Golmote"},autoloader:{title:"Autoloader",description:"Automatically loads the needed languages to highlight the code blocks.",owner:"Golmote",noCSS:!0},"keep-markup":{title:"Keep Markup",description:"Prevents custom markup from being dropped out during highlighting.",owner:"Golmote",optional:"normalize-whitespace",noCSS:!0},"command-line":{title:"Command Line",description:"Display a command line with a prompt and, optionally, the output/response from the commands.",owner:"chriswells0"},"unescaped-markup":{title:"Unescaped Markup",description:"Write markup without having to escape anything."},"normalize-whitespace":{title:"Normalize Whitespace",description:"Supports multiple operations to normalize whitespace in code blocks.",owner:"zeitgeist87",optional:"unescaped-markup",noCSS:!0},"data-uri-highlight":{title:"Data-URI Highlight",description:"Highlights data-URI contents.",owner:"Golmote",noCSS:!0},toolbar:{title:"Toolbar",description:"Attach a toolbar for plugins to easily register buttons on the top of a code block.",owner:"mAAdhaTTah"},"copy-to-clipboard":{title:"Copy to Clipboard Button",description:"Add a button that copies the code block to the clipboard when clicked.",owner:"mAAdhaTTah",require:"toolbar",noCSS:!0},"download-button":{title:"Download Button",description:"A button in the toolbar of a code block adding a convenient way to download a code file.",owner:"Golmote",require:"toolbar",noCSS:!0},"match-braces":{title:"Match braces",description:"Highlights matching braces.",owner:"RunDevelopment"},"diff-highlight":{title:"Diff Highlight",description:"Highlights the code inside diff blocks.",owner:"RunDevelopment",require:"diff"},"filter-highlight-all":{title:"Filter highlightAll",description:"Filters the elements the <code>highlightAll</code> and <code>highlightAllUnder</code> methods actually highlight.",owner:"RunDevelopment",noCSS:!0},treeview:{title:"Treeview",description:"A language with special styles to highlight file system tree structures.",owner:"Golmote"}}})},function(e,t,n){"use strict";var r=function(){var e=function(){};function t(e,t){Array.isArray(e)?e.forEach(t):null!=e&&t(e,0)}function n(e){for(var t={},n=0,r=e.length;n<r;n++)t[e[n]]=!0;return t}function r(e){var n={},r=[];return function(o){var i=n[o];return i||(!function r(o,i){if(!(o in n)){i.push(o);var a=i.indexOf(o);if(a<i.length-1)throw new Error("Circular dependency: "+i.slice(a).join(" -> "));var l={},u=e[o];if(u){function s(t){if(!(t in e))throw new Error(o+" depends on an unknown component "+t);if(!(t in l))for(var a in r(t,i),l[t]=!0,n[t])l[a]=!0}t(u.require,s),t(u.optional,s),t(u.modify,s)}n[o]=l,i.pop()}}(o,r),i=n[o]),i}}function o(e){for(var t in e)return!0;return!1}return function(i,a,l){var u=function(e){var t={};for(var n in e){var r=e[n];for(var o in r)if("meta"!=o){var i=r[o];t[o]="string"==typeof i?{title:i}:i}}return t}(i),s=function(e){var n;return function(r){if(r in e)return r;if(!n)for(var o in n={},e){var i=e[o];t(i&&i.alias,(function(t){if(t in n)throw new Error(t+" cannot be alias for both "+o+" and "+n[t]);if(t in e)throw new Error(t+" cannot be alias of "+o+" because it is a component.");n[t]=o}))}return n[r]||r}}(u);a=a.map(s),l=(l||[]).map(s);var c=n(a),f=n(l);a.forEach((function e(n){var r=u[n];t(r&&r.require,(function(t){t in f||(c[t]=!0,e(t))}))}));for(var p,d=r(u),m=c;o(m);){for(var h in p={},m){var g=u[h];t(g&&g.modify,(function(e){e in f&&(p[e]=!0)}))}for(var v in f)if(!(v in c))for(var y in d(v))if(y in c){p[v]=!0;break}for(var b in m=p)c[b]=!0}var w={getIds:function(){var e=[];return w.load((function(t){e.push(t)})),e},load:function(t,n){return function(t,n,r,o){const i=o?o.series:void 0,a=o?o.parallel:e;var l={},u={};function s(e){if(e in l)return l[e];u[e]=!0;var o,c=[];for(var f in t(e))f in n&&c.push(f);if(0===c.length)o=r(e);else{var p=a(c.map((function(e){var t=s(e);return delete u[e],t})));i?o=i(p,(function(){return r(e)})):r(e)}return l[e]=o}for(var c in n)s(c);var f=[];for(var p in u)f.push(l[p]);return a(f)}(d,c,t,n)}};return w}}();e.exports=r},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(25),o=n(115),i=n(116),a=n(8),l=n(24),u=n(117),s={},c={};(t=e.exports=function(e,t,n,f,p){var d,m,h,g,v=p?function(){return e}:u(e),y=r(n,f,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(i(v)){for(d=l(e.length);d>b;b++)if((g=t?y(a(m=e[b])[0],m[1]):y(e[b]))===s||g===c)return g}else for(h=v.call(e);!(m=h.next()).done;)if((g=o(h,y,m.value,t))===s||g===c)return g}).BREAK=s,t.RETURN=c},function(e,t,n){var r=n(8);e.exports=function(e,t,n,o){try{return o?t(r(n)[0],n[1]):t(n)}catch(a){var i=e.return;throw void 0!==i&&r(i.call(e)),a}}},function(e,t,n){var r=n(22),o=n(2)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||i[o]===e)}},function(e,t,n){var r=n(34),o=n(2)("iterator"),i=n(22);e.exports=n(16).getIteratorMethod=function(e){if(null!=e)return e[o]||e["@@iterator"]||i[r(e)]}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(5),o=n(70).set,i=r.MutationObserver||r.WebKitMutationObserver,a=r.process,l=r.Promise,u="process"==n(21)(a);e.exports=function(){var e,t,n,s=function(){var r,o;for(u&&(r=a.domain)&&r.exit();e;){o=e.fn,e=e.next;try{o()}catch(i){throw e?n():t=void 0,i}}t=void 0,r&&r.enter()};if(u)n=function(){a.nextTick(s)};else if(!i||r.navigator&&r.navigator.standalone)if(l&&l.resolve){var c=l.resolve(void 0);n=function(){c.then(s)}}else n=function(){o.call(r,s)};else{var f=!0,p=document.createTextNode("");new i(s).observe(p,{characterData:!0}),n=function(){p.data=f=!f}}return function(r){var o={fn:r,next:void 0};t&&(t.next=o),e||(e=o,n()),t=o}}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(t){return{e:!0,v:t}}}},function(e,t,n){var r=n(5).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(8),o=n(13),i=n(71);e.exports=function(e,t){if(r(e),o(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){var r=n(15);e.exports=function(e,t,n){for(var o in t)r(e,o,t[o],n);return e}},function(e,t,n){var r=n(2)("iterator"),o=!1;try{var i=[7][r]();i.return=function(){o=!0},Array.from(i,(function(){throw 2}))}catch(a){}e.exports=function(e,t){if(!t&&!o)return!1;var n=!1;try{var i=[7],l=i[r]();l.next=function(){return{done:n=!0}},i[r]=function(){return l},e(i)}catch(a){}return n}},function(e,t,n){"use strict";var r=n(9),o=n(23),i=n(126),a=n(62),l=n(31),u=n(58),s=Object.assign;e.exports=!s||n(14)((function(){var e={},t={},n=Symbol(),r="abcdefghijklmnopqrst";return e[n]=7,r.split("").forEach((function(e){t[e]=e})),7!=s({},e)[n]||Object.keys(s({},t)).join("")!=r}))?function(e,t){for(var n=l(e),s=arguments.length,c=1,f=i.f,p=a.f;s>c;)for(var d,m=u(arguments[c++]),h=f?o(m).concat(f(m)):o(m),g=h.length,v=0;g>v;)d=h[v++],r&&!p.call(m,d)||(n[d]=m[d]);return n}:s},function(e,t){t.f=Object.getOwnPropertySymbols},,function(e,t,n){var r=n(12),o=n(129)(!1);r(r.S,"Object",{values:function(e){return o(e)}})},function(e,t,n){var r=n(9),o=n(23),i=n(30),a=n(62).f;e.exports=function(e){return function(t){for(var n,l=i(t),u=o(l),s=u.length,c=0,f=[];s>c;)n=u[c++],r&&!a.call(l,n)||f.push(e?[n,l[n]]:l[n]);return f}}},function(e,t,n){"use strict";n.r(t);var r=n(0),o=n.n(r),i=n(72),a=n(39),l=n(1),u=(n(79),n(26),n(19),n(20),n(60),n(49)),s=n.n(u),c=function(e){var t=e.error,n=e.retry,r=e.pastDelay;return t?o.a.createElement("div",{style:{align:"center",color:"#fff",backgroundColor:"#fa383e",borderColor:"#fa383e",borderStyle:"solid",borderRadius:"0.25rem",borderWidth:"1px",boxSizing:"border-box",display:"block",padding:"1rem",flex:"0 0 50%",marginLeft:"25%",marginRight:"25%",marginTop:"5rem",maxWidth:"50%",width:"100%"}},o.a.createElement("p",null,t.message),o.a.createElement("div",null,o.a.createElement("button",{type:"button",onClick:n},"Retry"))):r?o.a.createElement("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh"}},o.a.createElement("svg",{id:"loader",style:{width:128,height:110,position:"absolute",top:"calc(100vh - 64%)"},viewBox:"0 0 45 45",xmlns:"http://www.w3.org/2000/svg",stroke:"#61dafb"},o.a.createElement("g",{fill:"none",fillRule:"evenodd",transform:"translate(1 1)",strokeWidth:"2"},o.a.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},o.a.createElement("animate",{attributeName:"r",begin:"1.5s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),o.a.createElement("animate",{attributeName:"stroke-opacity",begin:"1.5s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),o.a.createElement("animate",{attributeName:"stroke-width",begin:"1.5s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),o.a.createElement("circle",{cx:"22",cy:"22",r:"6",strokeOpacity:"0"},o.a.createElement("animate",{attributeName:"r",begin:"3s",dur:"3s",values:"6;22",calcMode:"linear",repeatCount:"indefinite"}),o.a.createElement("animate",{attributeName:"stroke-opacity",begin:"3s",dur:"3s",values:"1;0",calcMode:"linear",repeatCount:"indefinite"}),o.a.createElement("animate",{attributeName:"stroke-width",begin:"3s",dur:"3s",values:"2;0",calcMode:"linear",repeatCount:"indefinite"})),o.a.createElement("circle",{cx:"22",cy:"22",r:"8"},o.a.createElement("animate",{attributeName:"r",begin:"0s",dur:"1.5s",values:"6;1;2;3;4;5;6",calcMode:"linear",repeatCount:"indefinite"}))))):null},f=n(36),p={"039a453e":[function(){return n.e(3).then(n.t.bind(null,137,3))},"~docs/learning-notes-route-573.json",137],17896441:[function(){return Promise.all([n.e(1),n.e(0),n.e(4)]).then(n.bind(null,151))},"@theme/DocItem",151],"1be78505":[function(){return Promise.all([n.e(1),n.e(0),n.e(2),n.e(14)]).then(n.bind(null,150))},"@theme/DocPage",150],"7f10a2a9":[function(){return Promise.all([n.e(0),n.e(5)]).then(n.bind(null,145))},"@site/docs/backend/background-jobs.md",145],a6a88a80:[function(){return Promise.all([n.e(0),n.e(6)]).then(n.bind(null,146))},"@site/docs/javascript/promises.md",146],c4f5d8e4:[function(){return Promise.all([n.e(0),n.e(8)]).then(n.bind(null,147))},"@site/src/pages/index.js",147],ceb5ae55:[function(){return Promise.all([n.e(0),n.e(9)]).then(n.bind(null,148))},"@site/docs/about/about.md",148],d5bc498f:[function(){return Promise.all([n.e(0),n.e(10)]).then(n.bind(null,149))},"@site/docs/about/contributing.md",149]};var d=function(e){var t={};return function e(n,r){Object.keys(n).forEach((function(o){var i=n[o],a=r?r+"."+o:o;"object"===typeof i&&!!i&&Object.keys(i).length?e(i,a):t[a]=i}))}(e),t};var m=function(e){if("*"===e)return s()({loading:c,loader:function(){return Promise.all([n.e(1),n.e(0),n.e(2)]).then(n.bind(null,191))}});var t=f[e],r=[],i=[],a={},u=d(t);return Object.keys(u).forEach((function(e){var t=p[u[e]];t&&(a[e]=t[0],r.push(t[1]),i.push(t[2]))})),s.a.Map({loading:c,loader:a,modules:r,webpack:function(){return i},render:function(e,n){var r=JSON.parse(JSON.stringify(t));Object.keys(e).forEach((function(t){for(var n=r,o=t.split("."),i=0;i<o.length-1;i+=1)n=n[o[i]];n[o[o.length-1]]=e[t].default;var a=Object.keys(e[t]).filter((function(e){return"default"!==e}));a&&a.length&&a.forEach((function(r){n[o[o.length-1]][r]=e[t][r]}))}));var i=r.component;return delete r.component,o.a.createElement(i,Object(l.a)({},r,n))}})},h=[{path:"/learning-notes/",component:m("/learning-notes/"),exact:!0},{path:"/learning-notes/:route",component:m("/learning-notes/:route"),routes:[{path:"/learning-notes/about/about",component:m("/learning-notes/about/about"),exact:!0},{path:"/learning-notes/about/contributing",component:m("/learning-notes/about/contributing"),exact:!0},{path:"/learning-notes/backend/background-jobs",component:m("/learning-notes/backend/background-jobs"),exact:!0},{path:"/learning-notes/javascript/promises",component:m("/learning-notes/javascript/promises"),exact:!0}]},{path:"*",component:m("*")}],g=n(35),v=n.n(g),y=n(37),b=n(67),w=n(69),k=n(6),E=n(3),x=n(38),S=n.n(x),T=[n(106),n(107),n(108),n(109)];function _(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];T.forEach((function(t){var r=t.__esModule?t.default:t;r&&r[e]&&r[e].apply(r,n)}))}var C=["onRouteUpdate","onRouteUpdateDelayed"].reduce((function(e,t){return e[t]=function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];_.apply(void 0,[t].concat(n))},e}),{}),O=(n(61),n(86),n(18));function P(e,t){var n=Object(O.a)(e,t);return Promise.all(n.map((function(e){var t=e.route.component;if(t&&t.preload)return t.preload()})))}n(87),n(78);var A={};var R=function(e){if(A[e.pathname])return Object.assign({},e,{pathname:A[e.pathname]});var t=e.pathname||"/";return""===(t=t.trim().replace(/\/index\.html$/,""))&&(t="/"),A[e.pathname]=t,Object.assign({},e,{pathname:t})};n(127);S.a.configure({showSpinner:!1});var N=function(e){function t(t){var n;return(n=e.call(this,t)||this).previousLocation=null,n.progressBarTimeout=null,n.state={nextRouteHasLoaded:!0},n}Object(k.a)(t,e);var n=t.prototype;return n.shouldComponentUpdate=function(e,t){var n=this,r=e.location!==this.props.location,o=this.props,i=o.routes,a=o.delay,l=void 0===a?1e3:a;if(r){var u=R(e.location);return this.startProgressBar(l),this.previousLocation=R(this.props.location),this.setState({nextRouteHasLoaded:!1}),P(i,u.pathname).then((function(){C.onRouteUpdate({previousLocation:n.previousLocation,location:u}),n.previousLocation=null,n.setState({nextRouteHasLoaded:!0},n.stopProgressBar);var e=u.hash;if(e){var t=e.substring(1),r=document.getElementById(t);r&&r.scrollIntoView()}else window.scrollTo(0,0)})).catch((function(e){return console.warn(e)})),!1}return!!t.nextRouteHasLoaded},n.clearProgressBarTimeout=function(){this.progressBarTimeout&&(clearTimeout(this.progressBarTimeout),this.progressBarTimeout=null)},n.startProgressBar=function(e){var t=this;this.clearProgressBarTimeout(),this.progressBarTimeout=setTimeout((function(){C.onRouteUpdateDelayed({location:R(t.props.location)}),S.a.start()}),e)},n.stopProgressBar=function(){this.clearProgressBarTimeout(),S.a.done()},n.render=function(){var e=this.props,t=e.children,n=e.location;return o.a.createElement(E.b,{location:R(n),render:function(){return t}})},t}(o.a.Component),I=Object(E.i)(N);var L=function(){var e=Object(r.useState)(!1),t=e[0],n=e[1];return Object(r.useEffect)((function(){n(!0)}),[]),o.a.createElement(w.a.Provider,{value:{siteConfig:y.a,isClient:t}},o.a.createElement(I,{routes:h},Object(b.a)(h)))};n(128);var j=function(e){if("undefined"==typeof document)return!1;var t=document.createElement("link");try{if(t.relList&&"function"==typeof t.relList.supports)return t.relList.supports(e)}catch(n){return!1}return!1}("prefetch")?function(e){return new Promise((function(t,n){if("undefined"!=typeof document){var r=document.createElement("link");r.setAttribute("rel","prefetch"),r.setAttribute("href",e),r.onload=t,r.onerror=n,(document.getElementsByTagName("head")[0]||document.getElementsByName("script")[0].parentNode).appendChild(r)}else n()}))}:function(e){return new Promise((function(t,n){var r=new XMLHttpRequest;r.open("GET",e,!0),r.withCredentials=!0,r.onload=function(){200===r.status?t():n()},r.send(null)}))},F={};var D=function(e){return new Promise((function(t){F[e]?t():j(e).then((function(){t(),F[e]=!0})).catch((function(){}))}))},M={},z={},$=function(){return!(!("connection"in navigator)||-1===(navigator.connection.effectiveType||"").indexOf("2g")||!navigator.connection.saveData)},U={prefetch:function(e){return!!function(e){return!$()&&!z[e]&&!M[e]}(e)&&(M[e]=!0,Object(O.a)(h,e).reduce((function(e,t){var n=f[t.route.path];if(!n)return e;var r=Object.values(d(n));return e.concat(r)}),[]).forEach((function(e){var t=n.gca(e);t&&!/undefined/.test(t)&&D(t)})),!0)},preload:function(e){return!!function(e){return!$()&&!z[e]}(e)&&(z[e]=!0,P(h,e),!0)}};if(v.a.canUseDOM){window.docusaurus=U;var B=i.hydrate;P(h,window.location.pathname).then((function(){B(o.a.createElement(a.a,null,o.a.createElement(L,null)),document.getElementById("__docusaurus"))}))}}],[[88,12,1]]]);
import React from "react"; import { MDBIcon, MDBAnimation } from "mdbreact"; const HPMouseComponent = () => { return ( <div className='col-md-12 text-center hide-mouse' style={{ padding: "2vh" }} > <div> <MDBAnimation type='bounce' infinite duration='2s' delay='2s'> <MDBIcon style={{ color: "#4285F4", right: "0", display: "flex", justifyContent: "center", alignItems: "center" }} icon='mouse' size='2x' /> <p className='text-center' style={{ color: "#4285F4", marginTop: "10px" }} > Or Scroll Down </p> </MDBAnimation> </div> </div> ); }; export default HPMouseComponent;
// // // "use strict"; var defs = require("./defs"); var inherits = require("util").inherits; var EventEmitter = require("events").EventEmitter; var BaseChannel = require("./channel").BaseChannel; var acceptMessage = require("./channel").acceptMessage; var Args = require("./api_args"); function ChannelModel(connection, options) { if (!(this instanceof ChannelModel)) return new ChannelModel(connection); EventEmitter.call(this); this.connection = connection; this.Promise = (options && options.Promise) || Promise; var self = this; ["error", "close", "blocked", "unblocked"].forEach(function (ev) { connection.on(ev, self.emit.bind(self, ev)); }); } inherits(ChannelModel, EventEmitter); module.exports.ChannelModel = ChannelModel; var CM = ChannelModel.prototype; CM.close = function () { var close = this.connection.close.bind(this.connection); return new this.Promise(function (resolve, reject) { close(function (err, result) { if (err) { reject(err); } else { resolve(result); } }); }); }; // Channels function Channel(connection, options) { BaseChannel.call(this, connection, options); this.on("delivery", this.handleDelivery.bind(this)); this.on("cancel", this.handleCancel.bind(this)); } inherits(Channel, BaseChannel); module.exports.Channel = Channel; CM.createChannel = function () { var options = { Promise: this.Promise }; var c = new Channel(this.connection, options); return c.open().then(function (openOk) { return c; }); }; var C = Channel.prototype; // An RPC that returns a 'proper' promise, which resolves to just the // response's fields; this is intended to be suitable for implementing // API procedures. C.rpc = function (method, fields, expect) { var self = this; return new this.Promise(function (resolve, reject) { self._rpc(method, fields, expect, function (err, result) { if (err) { reject(err); } else { resolve(result); } }); }).then(function (f) { return f.fields; }); }; // Do the remarkably simple channel open handshake C.open = function () { var allocate = this.allocate.bind(this); return new this.Promise(function (resolve) { resolve(allocate()); }).then(function (ch) { return ch.rpc(defs.ChannelOpen, { outOfBand: "" }, defs.ChannelOpenOk); }); // return Promise.try(this.allocate.bind(this)).then(function(ch) { // return ch.rpc(defs.ChannelOpen, { outOfBand: '' }, defs.ChannelOpenOk) // }) }; C.close = function () { var self = this; return new this.Promise(function (resolve, reject) { self.closeBecause("Goodbye", defs.constants.REPLY_SUCCESS, function (err, result) { if (err) { reject(err); } else { resolve(result); } }); }); }; // === Public API, declaring queues and stuff === C.assertQueue = function (queue, options) { return this.rpc(defs.QueueDeclare, Args.assertQueue(queue, options), defs.QueueDeclareOk); }; C.checkQueue = function (queue) { return this.rpc(defs.QueueDeclare, Args.checkQueue(queue), defs.QueueDeclareOk); }; C.deleteQueue = function (queue, options) { return this.rpc(defs.QueueDelete, Args.deleteQueue(queue, options), defs.QueueDeleteOk); }; C.purgeQueue = function (queue) { return this.rpc(defs.QueuePurge, Args.purgeQueue(queue), defs.QueuePurgeOk); }; C.bindQueue = function (queue, source, pattern, argt) { return this.rpc(defs.QueueBind, Args.bindQueue(queue, source, pattern, argt), defs.QueueBindOk); }; C.unbindQueue = function (queue, source, pattern, argt) { return this.rpc(defs.QueueUnbind, Args.unbindQueue(queue, source, pattern, argt), defs.QueueUnbindOk); }; C.assertExchange = function (exchange, type, options) { // The server reply is an empty set of fields, but it's convenient // to have the exchange name handed to the continuation. return this.rpc(defs.ExchangeDeclare, Args.assertExchange(exchange, type, options), defs.ExchangeDeclareOk).then(function (_ok) { return { exchange: exchange }; }); }; C.checkExchange = function (exchange) { return this.rpc(defs.ExchangeDeclare, Args.checkExchange(exchange), defs.ExchangeDeclareOk); }; C.deleteExchange = function (name, options) { return this.rpc(defs.ExchangeDelete, Args.deleteExchange(name, options), defs.ExchangeDeleteOk); }; C.bindExchange = function (dest, source, pattern, argt) { return this.rpc(defs.ExchangeBind, Args.bindExchange(dest, source, pattern, argt), defs.ExchangeBindOk); }; C.unbindExchange = function (dest, source, pattern, argt) { return this.rpc(defs.ExchangeUnbind, Args.unbindExchange(dest, source, pattern, argt), defs.ExchangeUnbindOk); }; // Working with messages C.publish = function (exchange, routingKey, content, options) { var fieldsAndProps = Args.publish(exchange, routingKey, options); return this.sendMessage(fieldsAndProps, fieldsAndProps, content); }; C.sendToQueue = function (queue, content, options) { return this.publish("", queue, content, options); }; C.consume = function (queue, callback, options) { var self = this; // NB we want the callback to be run synchronously, so that we've // registered the consumerTag before any messages can arrive. var fields = Args.consume(queue, options); return new this.Promise(function (resolve, reject) { self._rpc(defs.BasicConsume, fields, defs.BasicConsumeOk, function (err, result) { if (err) { reject(err); } else { self.registerConsumer(result.fields.consumerTag, callback); resolve(result.fields); } }); }); }; C.cancel = function (consumerTag) { var self = this; return new this.Promise(function (resolve, reject) { self._rpc(defs.BasicCancel, Args.cancel(consumerTag), defs.BasicCancelOk, function (err, result) { if (err) { reject(err); } else { resolve(result); } }); }).then(function (ok) { self.unregisterConsumer(consumerTag); return ok.fields; }); }; C.get = function (queue, options) { var self = this; var fields = Args.get(queue, options); return new this.Promise(function (resolve, reject) { self.sendOrEnqueue(defs.BasicGet, fields, function (err, result) { if (err) { reject(err); } else { resolve(result); } }); }).then(function (f) { if (f.id === defs.BasicGetEmpty) { return false; } else if (f.id === defs.BasicGetOk) { var fields = f.fields; return new this.Promise(function (resolve) { self.handleMessage = acceptMessage(function (m) { m.fields = fields; resolve(m); }); }); } else { throw new Error("Unexpected response to BasicGet: " + inspect(f)); } }); }; C.ack = function (message, allUpTo) { this.sendImmediately(defs.BasicAck, Args.ack(message.fields.deliveryTag, allUpTo)); }; C.ackAll = function () { this.sendImmediately(defs.BasicAck, Args.ack(0, true)); }; C.nack = function (message, allUpTo, requeue) { this.sendImmediately(defs.BasicNack, Args.nack(message.fields.deliveryTag, allUpTo, requeue)); }; C.nackAll = function (requeue) { this.sendImmediately(defs.BasicNack, Args.nack(0, true, requeue)); }; // `Basic.Nack` is not available in older RabbitMQ versions (or in the // AMQP specification), so you have to use the one-at-a-time // `Basic.Reject`. This is otherwise synonymous with // `#nack(message, false, requeue)`. C.reject = function (message, requeue) { this.sendImmediately(defs.BasicReject, Args.reject(message.fields.deliveryTag, requeue)); }; // There are more options in AMQP than exposed here; RabbitMQ only // implements prefetch based on message count, and only for individual // channels or consumers. RabbitMQ v3.3.0 and after treat prefetch // (without `global` set) as per-consumer (for consumers following), // and prefetch with `global` set as per-channel. C.prefetch = C.qos = function (count, global) { return this.rpc(defs.BasicQos, Args.prefetch(count, global), defs.BasicQosOk); }; C.recover = function () { return this.rpc(defs.BasicRecover, Args.recover(), defs.BasicRecoverOk); }; // Confirm channel. This is a channel with confirms 'switched on', // meaning sent messages will provoke a responding 'ack' or 'nack' // from the server. The upshot of this is that `publish` and // `sendToQueue` both take a callback, which will be called either // with `null` as its argument to signify 'ack', or an exception as // its argument to signify 'nack'. function ConfirmChannel(connection) { Channel.call(this, connection); } inherits(ConfirmChannel, Channel); module.exports.ConfirmChannel = ConfirmChannel; CM.createConfirmChannel = function () { var c = new ConfirmChannel(this.connection); return c .open() .then(function (openOk) { return c.rpc(defs.ConfirmSelect, { nowait: false }, defs.ConfirmSelectOk); }) .then(function () { return c; }); }; var CC = ConfirmChannel.prototype; CC.publish = function (exchange, routingKey, content, options, cb) { this.pushConfirmCallback(cb); return C.publish.call(this, exchange, routingKey, content, options); }; CC.sendToQueue = function (queue, content, options, cb) { return this.publish("", queue, content, options, cb); }; CC.waitForConfirms = function () { var awaiting = []; var unconfirmed = this.unconfirmed; unconfirmed.forEach(function (val, index) { if (val === null); else { // already confirmed var confirmed = new this.Promise(function (resolve, reject) { unconfirmed[index] = function (err) { if (val) val(err); if (err === null) resolve(); else reject(err); }; }); awaiting.push(confirmed); } }); return this.Promise.all(awaiting); };
/** @license * Copyright (c) 2013-2017 Ephox Corp. All rights reserved. * This software is provided "AS IS," without a warranty of any kind. */ !function(){var a=function(){return{a11y:{widget:{title:"Toegankelijkheidscontrole",running:"Bezig met controle...",issue:{counter:"Probleem {0} van {1}",help:"WCAG 2.0 referentie - opent in een nieuw venster",none:"Geen toegankelijkheidsproblemen gedetecteerd"},previous:"Vorig probleem",next:"Volgend probleem",repair:"Probleem oplossen",available:"Oplossing beschikbaar",ignore:"Negeren"},image:{alttext:{empty:"Afbeeldingen moeten een alternatieve tekstbeschrijving hebben",filenameduplicate:"De alternatieve tekst moet verschillen van de bestandsnaam van de afbeelding",set:"Geef een alternatieve tekst op:",validation:{empty:"Alternatieve tekst mag niet leeg zijn",filenameduplicate:"Alternatieve tekst mag niet gelijk aan de bestandsnaam zijn"}}},table:{caption:{empty:"Tabellen moeten een bijschrift hebben",summaryduplicate:"Bijschrift en samenvatting van tabel kunnen niet dezelfde waarde hebben",set:"Geef een bijschrift op:",validation:{empty:"Bijschrift mag niet leeg zijn",summaryduplicate:"Tabelbijschrift mag niet gelijk aan de samenvatting zijn"}},summary:{empty:"Complexe tabellen moeten een samenvatting hebben",set:"Geef een tabelsamenvatting op:",validation:{empty:"Samenvatting mag niet leeg zijn",captionduplicate:"Samenvatting tabel mag niet gelijk aan het bijschrift zijn"}},rowscells:{none:"Tabelelementen moeten <tr> en <td> tags bevatten"},headers:{none:"Tabellen moeten minstens \xe9\xe9n kopcel bevatten",set:"Kies een tabelkop:",validation:{none:"Selecteer een rij- of kolomkop"}},headerscope:{none:"Tabelkoppen moeten op een rij of kolom worden toegepast",set:"Selecteer bereik kop:",scope:{row:"Rij",col:"Kolom",rowgroup:"Rijgroep",colgroup:"Kolomgroep"}}},heading:{nonsequential:"Koppen moeten opeenvolgend worden toegepast. Bijvoorbeeld: kop 1 moet worden gevolgd door kop 2, niet door kop 3.",paragraphmisuse:"Deze paragraaf lijkt op een kop. Selecteer een kopniveau als het ook een kop is.",set:"Selecteer een kopniveau:"},link:{adjacent:"Naast elkaar staande links met dezelfde url moeten worden samengevoegd tot \xe9\xe9n hyperlink."},list:{paragraphmisuse:"De geselecteerde tekst lijkt op een lijst Lijsten moeten worden opgemaakt met een lijst-tag."},contrast:{smalltext:"Tekst moet een contrastverhouding van 4,5:1 of hoger hebben",largetext:"Grote tekst moet een contrastverhouding van 3:1 of hoger hebben"},severity:{error:"Fout",warning:"Waarschuwing",info:"Informatief"}},aria:{autocorrect:{announce:"Autocorrectie {0}"},label:{toolbar:"Tekst met Opmaak Bewerken Werkbalk",editor:"Textbox.io Tekst met Opmaak Bewerken - {0}",fullscreen:"Textbox.io Volledig scherm Tekst met Opmaak Bewerken - {0}",content:"Bewerkbare inhoud",more:"Klik hier om uit of samen te vouwen"},help:{mac:"Druk op \u2303\u2325H voor Help",ctrl:"Druk op CTRL SHIFT H voor Help"},color:{picker:"Kleurenkiezer",menu:"Menu Kleurenkiezer"},font:{color:"Tekstkleuren",highlight:"Markeerkleuren",palette:"Kleurenpalet"},context:{menu:{generic:"Contextmenu"}},stepper:{input:{invalid:"Waarde voor grootte is ongeldig"}},table:{headerdescription:"Druk op spatiebalk om instelling te activeren. Druk op Tab om terug te keren naar tabelkiezer.",cell:{border:{size:"Randbreedte"}}},input:{invalid:"Ongeldige invoer"},widget:{navigation:"Gebruik de pijltjestoetsen om te navigeren."},image:{crop:{size:"Bijsnijdgrootte is {0} pixels bij {1} pixels"}}},color:{white:"Wit",black:"Zwart",gray:"Grijs",metal:"Metaal",smoke:"Smoke",red:"Rood",darkred:"Donkerrood",darkorange:"Donkeroranje",orange:"Oranje",yellow:"Geel",green:"Groen",darkgreen:"Donkergroen",mediumseagreen:"Middel Zeegroen",lightgreen:"Lichtgroen",lime:"Lime",mediumblue:"Middel blauw",navy:"Marine",blue:"Blauw",lightblue:"Lichtblauw",violet:"Violet"},directionality:{rtldir:"Van rechts naar links",ltrdir:"Van links naar rechts"},parlance:{menu:"Menu Talen",set:"Taal instellen",ar:"Arabisch",ca:"Catalaans",zh_cn:"Chinees (Vereenvoudigd)",zh_tw:"Chinees (Traditioneel)",hr:"Kroatisch",cs:"Tsjechisch",da:"Deens",nl:"Nederlands",en:"Engels",en_au:"Engels (Australi\xeb)",en_ca:"Engels (Canada)",en_gb:"Engels (Verenigd Koninkrijk)",en_us:"Engels (Verenigde Staten)",fa:"Farsi",fi:"Fins",fr:"Frans",fr_ca:"Frans (Canada)",de:"Duits",el:"Grieks",he:"Hebreeuws",hu:"Hongaars",it:"Italiaans",ja:"Japans",kk:"Kazachstaans",ko:"Koreaans",no:"Noors",pl:"Pools",pt_br:"Portugees (Brazili\xeb)",pt_pt:"Portugees (Portugal)",ro:"Roemeens",ru:"Russisch",sk:"Slowaaks",sl:"Sloveens",es:"Spaans",es_419:"Spaans (Latijns Amerika)",es_es:"Spaans (Spanje)",sv:"Zweeds",tt:"Tataars",th:"Thais",tr:"Turks",uk:"Oekra\xefens"},taptoedit:"Tik om te bewerken",plaincode:{dialog:{title:"Codeweergave",editor:"HTML-teksteditor"}},help:{dialog:{accessibility:"Toetsenbordnavigatie",a11ycheck:"Toegankelijkheid controleren",about:"Info Textbox.io",markdown:"Markdown-opmaak",shortcuts:"Sneltoetsen"}},spelling:{context:{more:"Meer",morelabel:"Submenu Meer Spellingsopties"},none:"Geen",menu:"Spelling taal"},specialchar:{open:"Speciaal teken",dialog:"Speciaal teken invoegen",latin:"Latijn",insert:"Invoegen",punctuation:"Interpunctie",currency:"Valuta's","extended-latin-a":"Latijn A uitgebreid","extended-latin-b":"Latijn B uitgebreid",arrows:"Pijlen",mathematical:"Wiskundig",miscellaneous:"Diversen",selects:"Geselecteerde tekens",grid:"Speciale tekens"},insert:{"menu-button":"Menu Invoegen",menu:"Invoegen",link:"Koppeling",bookmark:"Bladwijzer",image:"Pictogram",table:"Tabel",horizontalrule:"Horizontale lijn",media:"Media"},media:{embed:"Media inbeddingscode",insert:"Invoegen",placeholder:"Plak inbeddingscode hier."},bookmark:{name:"Naam bladwijzer",insert:"Invoegen",placeholder:"Voer naam bladwijzer in"},wordcount:{open:"Woorden tellen",dialog:"Woorden tellen",counts:"Aantal",selection:"Selectie",document:"Document",characters:"Tekens",charactersnospaces:"Tekens (geen spaties)",words:"Woorden"},list:{unordered:{menu:"Opties Niet-geordende lijst",default:"Standaard Niet-geordend",circle:"Cirkel Niet-geordend",square:"Vierkant Niet-geordend",disc:"Schijf Niet-geordend"},ordered:{menu:"Opties Geordende lijst",default:"Standaard Geordend",decimal:"Decimaal Geordend","upper-alpha":"Hoofdletters Geordend","lower-alpha":"Kleine letters Geordend","upper-roman":"Grote Romeinse cijfers Geordend","lower-roman":"Kleine Romeinse cijfers Geordend","lower-greek":"Kleine Griekse letters Geordend"}},tag:{inline:{class:"span ({0})"},img:"afbeelding"},block:{normal:"Normaal",p:"Alinea",h1:"Kop 1",h2:"Kop 2",h3:"Kop 3",h4:"Kop 4",h5:"Kop 5",h6:"Kop 6",div:"Div",pre:"Pre",li:"Lijstitem",td:"Cel",th:"Kopcel",styles:"Menu Stijlen",dropdown:"Blokken",describe:"Huidige stijl {0}",menu:"Stijlen",label:{inline:"Inlinestijlen",table:"Tabelstijlen",line:"Lijnstijlen",media:"Mediastijlen",list:"Lijststijlen",link:"Koppelingstijlen"}},font:{"menu-button":"Menu Lettertype",menu:"Lettertype",face:"Lettertype",size:"Tekengrootte",coloroption:"Kleur",describe:"Huidig lettertype {0}",color:"Tekst",colorcustom:"Aangepast...",highlight:"Markering",stepper:{input:"Tekengrootte instellen",increase:"Tekengrootte vergroten",decrease:"Tekengrootte verkleinen"}},colorcustom:{button:"Aangepast",rgb:{red:{label:"R",description:"Rode component"},green:{label:"G",description:"Groene component"},blue:{label:"B",description:"Blauwe component"},hex:{label:"#",description:"Hexadecimale kleurcode"},range:"Bereik 0 tot 255"},sb:{saturation:"Verzadiging",brightness:"Helderheid",picker:"Kiezer verzadiging en helderheid",palette:"Palet verzadiging en helderheid",instructions:"Gebruik pijltoetsen om verzadiging en helderheid te selecteren op x- en y-assen"},hue:{hue:"Tint",slider:"Schuifregelaar tint",palette:"Tintenpalet",instructions:"Gebruik de pijltoetsen om een tint te selecteren"}},cog:{"menu-button":"Menu Instellingen",menu:"Instellingen",spellcheck:"Spellingcontrole",capitalisation:"Hoofdlettergebruik",autocorrect:"AutoCorrectie",linkpreviews:"Voorbeelden koppeling",help:"Help"},alignment:{toolbar:"Menu Uitlijning",menu:"Uitlijning",left:"Links uitlijnen",center:"Centreren",right:"Rechts uitlijnen",justify:"Uitvullen",describe:"Huidige uitlijning {0}"},category:{language:"Groep Talen",undo:"Groep Ongedaan maken en Opnieuw uitvoeren",insert:"Groep Invoegen",style:"Groep Stijlen",emphasis:"Groep Opmaak",align:"Groep Uitlijning",listindent:"Groep Lijst en Inspringing",format:"Groep Lettertype",tools:"Groep Extra",table:"Groep Tabel",image:"Groep Afbeelding bewerken"},action:{undo:"Ongedaan maken",redo:"Opnieuw uitvoeren",bold:"Vet",italic:"Cursief",underline:"Onderstrepen",strikethrough:"Doorhalen",subscript:"Subscript",superscript:"Superscript",removeformat:"Opmaak verwijderen",bullist:"Niet-geordende lijst",numlist:"Gesorteerde lijst",indent:"Inspringing vergroten",outdent:"Inspringing verkleinen",blockquote:"Blockquote",fullscreen:"Volledig scherm",search:"Dialoogvenster Zoeken en Vervangen",a11ycheck:"Toegankelijkheid controleren",toggle:{fullscreen:"Volledig scherm verlaten"}},table:{menu:"Tabel invoegen","column-header":"Koptekstkolom","row-header":"Koptekstrij",float:"Zwevende uitlijning",cell:{alignment:{top:"Boven uitlijnen",middle:"Midden uitlijnen",bottom:"Onder uitlijnen",toolbar:"Cel verticaal uitlijnen"},color:{border:"Randkleur",background:"Achtergrondkleur"},border:{width:"Randbreedte",stepper:{input:"Randbreedte instellen",increase:"Randbreedte vergroten",decrease:"Randbreedte verkleinen"}}},context:{row:{title:"Submenu Rij",menu:"Rij",insertabove:"Hierboven invoegen",insertbelow:"Hieronder invoegen"},column:{title:"Submenu Kolom",menu:"Kolom",insertleft:"Links invoegen",insertright:"Rechts invoegen"},cell:{merge:"Cellen samenvoegen",unmerge:"Cel splitsen","split-cols":"In kolommen splitsen","split-rows":"In rijen splitsen"},table:{title:"Submenu Tabel",menu:"Tabel",properties:"Eigenschappen",delete:"Verwijderen"},common:{delete:"Verwijderen",normal:"Als Normaal instellen",header:"Als Kop instellen"},palette:{show:"Opties tabelbewerking beschikbaar op werkbalk",hide:"Opties tabelbewerking niet meer beschikbaar"}},picker:{header:"Koptekst ingesteld",label:"Tabelkiezer",describepicker:"Gebruik de pijltjestoetsen om tabelgrootte in te stellen. Druk op Tab om naar tabelkopinstellingen te gaan. Druk op Spatie- of Entertoets om tabel in te voegen.",rows:"{0} hoog",cols:"{0} breed"},border:"Rand",summary:"Samenvatting",dialog:"Tabeleigenschappen",caption:"Tabelopschrift",width:"Breedte",height:"Hoogte"},align:{none:"Niet uitlijnen",center:"Centreren",left:"Links uitlijnen",right:"Rechts uitlijnen"},button:{ok:"OK",cancel:"Annuleren",close:"Dialoogvenster annuleren"},banner:{close:"Banner sluiten"},border:{on:"Aan",off:"Uit",labels:{on:"Rand aan",off:"Rand uit"}},loading:{wait:"Even wachten"},toolbar:{more:"Meer",backbutton:"Terug","switch-code":"Naar codeweergave overschakelen","switch-pencil":"Naar ontwerpweergave overschakelen"},link:{context:{edit:"Link bewerken",follow:"Koppeling openen",ignore:"Verbroken koppeling negeren",remove:"Koppeling verwijderen"},dialog:{aria:{update:"Link bijwerken",insert:"Link invoegen",properties:"Linkeigenschappen",quick:"Snelle opties"},autocomplete:{open:"Koppeling lijst automatisch aanvullen beschikbaar. Typ verder of gebruik toetsen omhoog en omlaag om suggesties te selecteren.",close:"Koppeling lijst automatisch aanvullen gesloten",accept:"Suggestie geselecteerde koppeling {0}"},edit:"Bewerken",remove:"Verwijderen",preview:"Voorbeeld",update:"Bijwerken",insert:"Invoegen",tooltip:"Koppeling"},properties:{dialog:{title:"Linkeigenschappen"},text:{label:"Weer te geven tekst",placeholder:"Schermtekst typen of plakken"},url:{label:"URL voor koppeling of bladwijzer",placeholder:"URL voor koppeling of bladwijzer invoeren",invalid:"Mogelijk is uw URL voor koppeling incorrect"},title:{label:"Titel",placeholder:"Titel koppeling typen of plakken"},button:{remove:"Verwijderen"},target:{label:"Doel",none:"Geen",blank:"Nieuw venster",top:"Hele pagina",self:"Zelfde frame",parent:"Bovenliggend frame"}},anchor:{top:"Bovenkant document",bottom:"Onderkant document"}},fileupload:{title:"Afbeeldingen invoegen",tablocal:"Lokale bestanden",tabweburl:"Web-URL",dropimages:"Afbeeldingen hier neerzetten",chooseimage:"Afbeelding voor uploaden kiezen",web:{url:"URL van webafbeelding:"},weburlhelp:"Typ uw URL om een voorbeeld van de afbeelding te zien. Bij grote afbeeldingen kan het even duren voordat ze worden weergegeven.",invalid1:"We kunnen geen afbeelding vinden bij de URL die u gebruikt.",invalid2:"Controleer uw URL op tikfouten.",invalid3:"Zorg ervoor dat de afbeelding die u opent openbaar is en niet met een wachtwoord is beveiligd of zich op een priv\xe9netwerk bevindt."},image:{context:{properties:"Eigenschappen afbeelding",palette:{show:"Opties bewerking afbeeldingen beschikbaar op werkbalk",hide:"Opties bewerking afbeeldingen niet meer beschikbaar"}},dialog:{title:"Eigenschappen afbeelding",fields:{align:"Zwevende uitlijning",url:"URL",urllocal:"Afbeelding nog niet opgeslagen",alt:"Alternatieve tekst",width:"Breedte",height:"Hoogte",constrain:{label:"Verhoudingen behouden",on:"Vergrendelde verhoudingen",off:"Ontgrendelde verhoudingen"}}},menu:"Afbeelding invoegen","menu-button":"Menu Afbeelding invoegen","from-url":"Web-URL","from-camera":"Camera-album",toolbar:{rotateleft:"Linksom draaien",rotateright:"Rechtsom draaien",fliphorizontal:"Horizontaal omkeren",flipvertical:"Verticaal omkeren",properties:"Eigenschappen afbeelding"},crop:{announce:"Interface Bijsnijden wordt geopend. Druk op Enter om toe te passen, op Escape om te annuleren.",cancel:"Bijsnijdbewerking annuleren",begin:"Afbeelding bijsnijden.",apply:"Bijsnijden toepassen",handle:{nw:"Bijsnijdgreep linksboven",ne:"Bijsnijdgreep rechtsboven",se:"Bijsnijdgreep rechtsonder",sw:"Bijsnijdgreep linksonder",shade:"Bijsnijdmasker"}}},units:{"amount-of-total":"{0} van {1}"},search:{menu:"Zoeken en Vervangen",field:{replace:"Veld Vervangen",search:"Veld Zoeken"},search:"Zoeken",previous:"Vorige",next:"Volgende",replace:"Vervangen","replace-all":"Alles vervangen",matchcase:"Identieke hoofdletters/kleine letters"},mentions:{initiated:"Vermelding aangemaakt, typ verder met zoeken tijdens typen",lookahead:{open:"Vervolgkeuzelijst met zoeken tijdens typen",cancelled:"Vermelding geannuleerd",searching:"Resultaten zoeken",selected:"Vermelding van {0} ingevoegd",noresults:"Geen resultaten"}},cement:{dialog:{paste:{title:"Opties voor opmaak plakken",instructions:"Kies of u de opmaak van de geplakte inhoud wilt behouden of verwijderen.",merge:"Opmaak behouden",clean:"Opmaak verwijderen"},flash:{title:"Importeren van lokale afbeelding","trigger-paste":"Druk opnieuw op Ctrl+V als u de inhoud inclusief afbeeldingen wilt plakken.",missing:'Voor het importeren van afbeeldingen uit Microsoft Office is Adobe Flash vereist. Installeer de <a href="http://get.adobe.com/flashplayer/" target="_blank">Adobe Flash Player</a>.',"press-escape":'Druk op <span class="ephox-polish-help-kbd">Esc</span> als u lokale afbeeldingen wilt negeren en door wilt gaan met bewerken.'}}},cloud:{error:{apikey:"Uw API-sleutel is ongeldig.",domain:"Uw domein ({0}) wordt niet ondersteund door uw API-sleutel.",plan:"U hebt het op uw plan beschikbare aantal editor downloads overschreden. Ga naar de website voor een upgrade."},dashboard:"Ga naar het beheerdersdashboard"},errors:{paste:{notready:"De functionaliteit Word importeren is niet geladen. Probeer na even wachten opnieuw.",generic:"Er is een fout opgetreden tijdens het plakken van content."},toolbar:{missing:{custom:{string:'Aangepaste opdrachten moeten de eigenschap "{0}" hebben en moeten een tekenreeks zijn'}},invalid:"De configuratie van de werkbalk is ongeldig ({0}). Raadpleeg de console voor meer informatie."},spelling:{missing:{service:"De service Spellingcontrole is niet gevonden: ({0})."}},images:{edit:{needsproxy:"Er is een proxy vereist om afbeeldingen voor dit domein te bewerken: ({0})",proxyerror:"Kan niet communiceren met de proxy om deze afbeelding te bewerken. Raadpleeg de console voor meer informatie.",generic:"Er is een fout opgetreden tijdens het uitvoeren van de afbeeldingsbewerking. Raadpleeg de console voor meer informatie."},disallowed:{local:"Lokale afbeelding plakken is gedeactiveerd. Lokale afbeeldingen zijn uit geplakte inhoud verwijderd.",dragdrop:"Slepen en neerzetten is gedeactiveerd."},upload:{unknown:"Uploaden van afbeelding mislukt",invalid:"Niet alle bestanden zijn verwerkt - sommige waren geen geldige afbeeldingen",failed:"Uploaden van afbeelding mislukt: ({0})",cors:"Kan geen contact krijgen met upload-service afbeeldingen. Mogelijke CORS-fout: ({0})"},missing:{service:"De service Afbeeldingen is niet gevonden: ({0}).",flash:"Afbeeldingen worden mogelijk niet ge\xefmporteerd vanwege de beveiligingsinstellingen van uw browser."},import:{failed:"Importeren van sommige afbeeldingen mislukt.",unsupported:"Niet-ondersteund afbeeldingstype.",invalid:"Afbeelding is ongeldig."}},webview:{image:"Rechtstreeks gekopieerde afbeeldingen kunnen niet worden geplakt."},safari:{image:"Het rechtstreeks plakken van afbeeldingen wordt door Safari niet ondersteund.",url:"Voorgestelde alternatieven",rtf:"Leer hoe","browser-settings":"Pas uw browser-instellingen aan om afbeeldingen te kunnen plakken."},flash:{crashed:"Afbeeldingen zijn niet ge\xefmporteerd omdat Adobe Flash vastgelopen lijkt te zijn. Dit kan het gevolg zijn van het plakken van grote documenten."},http:{400:"Ongeldige opdracht: {0}",401:"Niet geautoriseerd: {0}",403:"Verboden: {0}",404:"Niet gevonden: {0}",407:"Proxy-verificatie vereist: {0}",409:"Bestandsconflict: {0}",413:"Nettolading te groot: {0}",415:"Niet-ondersteund mediatype: {0}",500:"Interne serverfout: {0}",501:"Niet ge\xefmplementeerd: {0}"}}}},b=function(a,b){var c=a.src.indexOf("?");return a.src.indexOf(b)+b.length===c},c=function(a){for(var b=a.split("."),c=window,d=0;d<b.length&&void 0!==c&&null!==c;++d)c=c[b[d]];return c},d=function(a,b){if(a){var d=a.getAttribute("data-main");if(d){a.removeAttribute("data-main");var e=c(d);if("function"==typeof e)return e;console.warn("attribute on "+b+" does not reference a global method")}else console.warn("no data-main attribute found on "+b+" script tag")}};!function(a,c){var e=d(document.currentScript,c);if(e)return e;for(var f=document.getElementsByTagName("script"),g=0;g<f.length;g++)if(b(f[g],a)){var h=d(f[g],c);if(h)return h}throw"cannot locate "+c+" script tag"}("tbio_nl.js","strings for language nl")({version:"2.4.2",strings:a})}();
// @flow import { define } from "mamacro"; import { FSM, makeTransition } from "@webassemblyjs/helper-fsm"; import { codeFrameFromSource } from "@webassemblyjs/helper-code-frame"; declare function unexpectedCharacter(char: string): void; /** * Throw an error in case the current character is invalid */ define( unexpectedCharacter, (char) => `throw new Error(getCodeFrame(input, line, column) + "Unexpected character " + JSON.stringify(${char}));` ); // eslint-disable-next-line function getCodeFrame(source: string, line: number, column: number) { const loc = { start: { line, column }, }; return "\n" + codeFrameFromSource(source, loc) + "\n"; } const WHITESPACE = /\s/; const PARENS = /\(|\)/; const LETTERS = /[a-z0-9_/]/i; const idchar = /[a-z0-9!#$%&*+./:<=>?@\\[\]^_`|~-]/i; const valtypes = ["i32", "i64", "f32", "f64"]; const NUMBERS = /[0-9|.|_]/; const NUMBER_KEYWORDS = /nan|inf/; function isNewLine(char: string): boolean { return char.charCodeAt(0) === 10 || char.charCodeAt(0) === 13; } function Token(type, value, start, end, opts = {}) { const token = { type, value, loc: { start, end, }, }; if (Object.keys(opts).length > 0) { // $FlowIgnore token["opts"] = opts; } return token; } const tokenTypes = { openParen: "openParen", closeParen: "closeParen", number: "number", string: "string", name: "name", identifier: "identifier", valtype: "valtype", dot: "dot", comment: "comment", equal: "equal", keyword: "keyword", }; export const keywords = { module: "module", func: "func", param: "param", result: "result", export: "export", loop: "loop", block: "block", if: "if", then: "then", else: "else", call: "call", call_indirect: "call_indirect", import: "import", memory: "memory", shared: "shared", table: "table", global: "global", anyfunc: "anyfunc", mut: "mut", data: "data", type: "type", elem: "elem", start: "start", offset: "offset", }; const NUMERIC_SEPARATOR = "_"; /** * Build the FSM for number literals */ type NumberLiteralState = | "START" | "AFTER_SIGN" | "HEX" | "HEX_FRAC" | "NAN_HEX" | "DEC" | "DEC_EXP" | "DEC_FRAC" | "DEC_SIGNED_EXP" | "STOP" | "HEX_SIGNED_EXP" | "HEX_EXP"; // $FlowIgnore const numberLiteralFSM: FSM<NumberLiteralState> = new FSM( { START: [ makeTransition(/-|\+/, "AFTER_SIGN"), makeTransition(/nan:0x/, "NAN_HEX", { n: 6 }), makeTransition(/nan|inf/, "STOP", { n: 3 }), makeTransition(/0x/, "HEX", { n: 2 }), makeTransition(/[0-9]/, "DEC"), makeTransition(/\./, "DEC_FRAC"), ], AFTER_SIGN: [ makeTransition(/nan:0x/, "NAN_HEX", { n: 6 }), makeTransition(/nan|inf/, "STOP", { n: 3 }), makeTransition(/0x/, "HEX", { n: 2 }), makeTransition(/[0-9]/, "DEC"), makeTransition(/\./, "DEC_FRAC"), ], DEC_FRAC: [ makeTransition(/[0-9]/, "DEC_FRAC", { allowedSeparator: NUMERIC_SEPARATOR, }), makeTransition(/e|E/, "DEC_SIGNED_EXP"), ], DEC: [ makeTransition(/[0-9]/, "DEC", { allowedSeparator: NUMERIC_SEPARATOR }), makeTransition(/\./, "DEC_FRAC"), makeTransition(/e|E/, "DEC_SIGNED_EXP"), ], DEC_SIGNED_EXP: [ makeTransition(/\+|-/, "DEC_EXP"), makeTransition(/[0-9]/, "DEC_EXP"), ], DEC_EXP: [ makeTransition(/[0-9]/, "DEC_EXP", { allowedSeparator: NUMERIC_SEPARATOR, }), ], HEX: [ makeTransition(/[0-9|A-F|a-f]/, "HEX", { allowedSeparator: NUMERIC_SEPARATOR, }), makeTransition(/\./, "HEX_FRAC"), makeTransition(/p|P/, "HEX_SIGNED_EXP"), ], HEX_FRAC: [ makeTransition(/[0-9|A-F|a-f]/, "HEX_FRAC", { allowedSeparator: NUMERIC_SEPARATOR, }), makeTransition(/p|P|/, "HEX_SIGNED_EXP"), ], HEX_SIGNED_EXP: [makeTransition(/[0-9|+|-]/, "HEX_EXP")], HEX_EXP: [ makeTransition(/[0-9]/, "HEX_EXP", { allowedSeparator: NUMERIC_SEPARATOR, }), ], NAN_HEX: [ makeTransition(/[0-9|A-F|a-f]/, "NAN_HEX", { allowedSeparator: NUMERIC_SEPARATOR, }), ], STOP: [], }, "START", "STOP" ); export function tokenize(input: string): Array<any> { let current: number = 0; let char = input[current]; // Used by SourceLocation let column = 1; let line = 1; const tokens = []; /** * Creates a pushToken function for a given type */ function pushToken(type: string) { return function (v: string | number, opts: Object = {}) { const startColumn = opts.startColumn || column - String(v).length; delete opts.startColumn; const endColumn = opts.endColumn || startColumn + String(v).length - 1; delete opts.endColumn; const start = { line, column: startColumn }; const end = { line, column: endColumn }; tokens.push(Token(type, v, start, end, opts)); }; } /** * Functions to save newly encountered tokens */ const pushCloseParenToken = pushToken(tokenTypes.closeParen); const pushOpenParenToken = pushToken(tokenTypes.openParen); const pushNumberToken = pushToken(tokenTypes.number); const pushValtypeToken = pushToken(tokenTypes.valtype); const pushNameToken = pushToken(tokenTypes.name); const pushIdentifierToken = pushToken(tokenTypes.identifier); const pushKeywordToken = pushToken(tokenTypes.keyword); const pushDotToken = pushToken(tokenTypes.dot); const pushStringToken = pushToken(tokenTypes.string); const pushCommentToken = pushToken(tokenTypes.comment); const pushEqualToken = pushToken(tokenTypes.equal); /** * Can be used to look at the next character(s). * * The default behavior `lookahead()` simply returns the next character without consuming it. * Letters are always returned in lowercase. * * @param {number} length How many characters to query. Default = 1 * @param {number} offset How many characters to skip forward from current one. Default = 1 * */ function lookahead(length: number = 1, offset: number = 1): string { return input .substring(current + offset, current + offset + length) .toLowerCase(); } /** * Advances the cursor in the input by a certain amount * * @param {number} amount How many characters to consume. Default = 1 */ function eatCharacter(amount: number = 1): void { column += amount; current += amount; char = input[current]; } while (current < input.length) { // ;; if (char === ";" && lookahead() === ";") { const startColumn = column; eatCharacter(2); let text = ""; while (!isNewLine(char)) { text += char; eatCharacter(); if (char === undefined) { break; } } const endColumn = column; pushCommentToken(text, { type: "leading", startColumn, endColumn }); continue; } // (; if (char === "(" && lookahead() === ";") { const startColumn = column; eatCharacter(2); let text = ""; // ;) while (true) { char = input[current]; if (char === ";" && lookahead() === ")") { eatCharacter(2); break; } text += char; eatCharacter(); if (isNewLine(char)) { line++; column = 0; } } const endColumn = column; pushCommentToken(text, { type: "block", startColumn, endColumn }); continue; } if (char === "(") { pushOpenParenToken(char); eatCharacter(); continue; } if (char === "=") { pushEqualToken(char); eatCharacter(); continue; } if (char === ")") { pushCloseParenToken(char); eatCharacter(); continue; } if (isNewLine(char)) { line++; eatCharacter(); column = 0; continue; } if (WHITESPACE.test(char)) { eatCharacter(); continue; } if (char === "$") { const startColumn = column; eatCharacter(); let value = ""; while (idchar.test(char)) { value += char; eatCharacter(); } const endColumn = column; pushIdentifierToken(value, { startColumn, endColumn }); continue; } if ( NUMBERS.test(char) || NUMBER_KEYWORDS.test(lookahead(3, 0)) || char === "-" || char === "+" ) { const startColumn = column; const value = numberLiteralFSM.run(input.slice(current)); if (value === "") { unexpectedCharacter(char); } pushNumberToken(value, { startColumn }); eatCharacter(value.length); if (char && !PARENS.test(char) && !WHITESPACE.test(char)) { unexpectedCharacter(char); } continue; } if (char === '"') { const startColumn = column; let value = ""; eatCharacter(); // " while (char !== '"') { if (isNewLine(char)) { unexpectedCharacter(char); } value += char; eatCharacter(); // char } eatCharacter(); // " const endColumn = column; pushStringToken(value, { startColumn, endColumn }); continue; } if (LETTERS.test(char)) { let value = ""; const startColumn = column; while (char && LETTERS.test(char)) { value += char; eatCharacter(); } /* * Handle MemberAccess */ if (char === ".") { const dotStartColumn = column; if (valtypes.indexOf(value) !== -1) { pushValtypeToken(value, { startColumn }); } else { pushNameToken(value); } while (char === ".") { eatCharacter(); // Eat the dot value = ""; const nameStartColumn = column; while (LETTERS.test(char)) { value += char; eatCharacter(); } pushDotToken(".", { startColumn: dotStartColumn }); pushNameToken(value, { startColumn: nameStartColumn }); } continue; } /* * Handle keywords */ // $FlowIgnore if (typeof keywords[value] === "string") { pushKeywordToken(value, { startColumn }); continue; } /* * Handle types */ if (valtypes.indexOf(value) !== -1) { pushValtypeToken(value, { startColumn }); continue; } /* * Handle literals */ pushNameToken(value, { startColumn }); continue; } unexpectedCharacter(char); } return tokens; } export const tokens = tokenTypes;
$(function(){ $('.dropdown').hover(function(){ $(this).addClass('open'); }, function(){ $(this).removeClass('open'); }); $.datepicker.setDefaults({ dateFormat: 'dd-mm-yy', nextText: 'Sig', prevText: 'Ant', monthNames: ['Enero','Febrero','Marzo','Abril','Mayo','Junio','Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre'], monthNamesShort: ['Ene','Feb','Mar','Abr','May','Jun','Jul','Ago','Sep','Oct','Nov','Dic'], dayNames: ['Domingo','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado'], dayNamesMin: ['Do','Lu','Ma','Mi','Ju','Vi','Sa'], dayNamesShort: ['Dom','Lun','Mar','Mie','Jue','Vie','Sab'] }); $("#last_contact, #next_contact, #sale_date, #delivery_date, #filter_since, #filter_until").datepicker({changeMonth: true, changeYear: true}); }); function onlyI(evt){evt = (evt) ? evt : event;var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));var respuesta = true;if (charCode > 31 && (charCode < 48 || charCode > 57)){respuesta = false;}return respuesta;} function onlyC(evt){evt = (evt) ? evt : event;var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));var respuesta = true;if (!(charCode < 48 || charCode > 57)){respuesta = false;}return respuesta;} function onlyD(evt){evt = (evt) ? evt : event;var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : ((evt.which) ? evt.which : 0));var respuesta = true;if (charCode > 31 && (charCode < 48 || charCode > 57) && charCode!=46){respuesta = false;}return respuesta;} function exoPopuu(url,params) {window.open(url,'exo_window',params);} function exoCheckboxMon(form,checked){for (i=0; i<form.length; i++){if ((form.elements[i].type == "checkbox")) {form.elements[i].checked = checked;}}}
var _bsa={init:function(format,zoneKey,segment,options){var options=typeof options!=='undefined'?options:false;if(!this.isset(window['_bsa_queue']))window['_bsa_queue']=[];if(!this.isset(options.target)){if(options===false)options=new Object();options.target='body'}if(this.isset(options)&&this.isset(options.target)&&document.querySelectorAll(options.target).length>0){var forcebanner=this.getURLVar('bsaforcebanner',window.location.href),ignore=this.getURLVar('bsaignore',window.location.href),forwardedip=this.getURLVar('bsaforwardedip',window.location.href);ignoretargeting=this.getURLVar('bsaignoretargeting',window.location.href);var srv=document.createElement('script');srv.id='_bsa_srv-'+zoneKey+'_'+window['_bsa_queue'].length;srv.type='text/javascript';srv.src=(options&&options.path)?options.path:'//srv.buysellads.com/ads/'+zoneKey+'.json';srv.src=this.appendQueryString(srv.src,'callback','_bsa_go');options.script_id=srv.id;if(segment)srv.src=this.appendQueryString(srv.src,'segment',segment);if(options&&this.isset(options.ip))srv.src=this.appendQueryString(srv.src,'forwardedip',options.ip);if(options&&this.isset(options.country))srv.src=this.appendQueryString(srv.src,'country',options.country);if(options&&this.isset(options.number_of_ads))srv.src=this.appendQueryString(srv.src,'forcenads',options.number_of_ads);if(forcebanner)srv.src=this.appendQueryString(srv.src,'forcebanner',forcebanner);if(ignore)srv.src=this.appendQueryString(srv.src,'ignore',ignore);if(ignoretargeting)srv.src=this.appendQueryString(srv.src,'ignoretargeting',ignoretargeting);if(forwardedip)srv.src=this.appendQueryString(srv.src,'forwardedip',forwardedip);if(options&&!this.isset(options.platforms)||!this.isset(options))options.platforms=['desktop','mobile'];if(_bsa[format].readyToInit!=false||(options&&options.testMode)||!_bsa.objExists(zoneKey))window['_bsa_queue'].push([format,zoneKey,segment,options]);if(_bsa[format].readyToInit!=false&&!options.testMode){srv.src+=this.frequencyCap();if(_bsa.objExists(zoneKey)&&!_bsa.exists(document.getElementById(srv.id)))document.getElementsByTagName('head')[0].appendChild(srv)}else if((options&&options.testMode)||!_bsa.objExists(zoneKey))_bsa_go(_bsa[format].testData);else _bsa[format](zoneKey,segment,options)}},frequencyCap:function(){var day=_bsa.getCookie('_bsap_daycap'),life=_bsa.getCookie('_bsap_lifecap'),day=this.isset(day)?day.split(';')[0].split(','):[],life=this.isset(life)?life.split(';')[0].split(','):[];if(day.length||life.length){var freqcap=[];for(var i=0;i<day.length;i++){var adspot=day[i];for(var found=-1,find=0;find<freqcap.length&&found==-1;find++)if(freqcap[find][0]==adspot)found=find;if(found==-1)freqcap.push([adspot,1,0]);else freqcap[found][1]++}for(var i=0;i<life.length;i++){var adspot=day[i];for(var found=-1,find=0;find<freqcap.length&&found==-1;find++)if(freqcap[find][0]==adspot)found=find;if(found==-1)freqcap.push([adspot,0,1]);else freqcap[found][2]++}for(var i=0;i<freqcap.length;i++)freqcap[i]=freqcap[i][0]+':'+freqcap[i][1]+','+freqcap[i][2]}if(freqcap&&freqcap.length)return'&freqcap='+encodeURIComponent(freqcap.join(';'));else return''},appendQueryString:function(url,name,value){var re=new RegExp('([?&]'+name+'=)[^&]+','');function add(sep){url+=sep+name+'='+encodeURI(value)}function change(){url=url.replace(re,'$1'+encodeURI(value))}if(url.indexOf('?')===-1){add('?')}else{if(re.test(url)){change()}else{add('&')}}return url},clearQueue:function(index){window['_bsa_queue'].splice(index,1)},link:function(link,segment,domain,timestamp){var l=link.split('?encredirect='),fulllink;if(typeof l[1]!='undefined')fulllink=l[0]+'?segment='+segment+';&encredirect='+encodeURIComponent(l[1]);else if(l[0].search('srv.buysellads.com')>0)fulllink=l[0]+'?segment='+segment+';';else fulllink=l[0];fulllink=fulllink.replace('[placement]',segment);fulllink=fulllink.replace('[timestamp]',timestamp);if(domain)fulllink=fulllink.replace(/srv.buysellads.com/g,domain);return fulllink},pixel:function(p,timestamp){var c='';if(_bsa.isset(p)){var pixels=p.split('||');for(var j=0;j<pixels.length;j++)c+='<img src="'+pixels[j].replace('[timestamp]',timestamp)+'" style="display:none;" height="0" width="0" />'}return c},findInQueue:function(key){for(i=0;i<window['_bsa_queue'].length;i++)if(window['_bsa_queue'][i][1]==key)return i},drop:function(output,target,elType,idName,attributes){var div=document.createElement(elType);div.id=idName;div.innerHTML=output;if(attributes)div.setAttribute('data-attributes',JSON.stringify(attributes));var b=document.body.firstChild;for(i=0;i<document.querySelectorAll(target).length;i++)if(target=='body')b.parentNode.insertBefore(div,b);else document.querySelectorAll(target)[i].appendChild(div)},callback:function(a){typeof(BSANativeCallback)==='function'?BSANativeCallback(a):function(){}},hide:function(e){if(document.getElementById(e)){this.removeClass(document.getElementById(e),'_bsa_show');this.addClass(document.getElementById(e),'_bsa_hide')}},show:function(e){if(document.getElementById(e)){this.removeClass(document.getElementById(e),'_bsa_hide');this.addClass(document.getElementById(e),'_bsa_show')}},close:function(e,t){this.hide(e);if(this.isset(_bsa.setCookie))_bsa.setCookie(e,'hide',this.isset(t)?t:1000*60*60*24)},hasClass:function(el,name){return new RegExp('(\\s|^)'+name+'(\\s|$)').test(el.className)},addClass:function(el,name){if(!this.hasClass(el,name))el.className+=(el.className?' ':'')+name},removeClass:function(el,name){if(this.hasClass(el,name))el.className=el.className.replace(new RegExp('(\\s|^)'+name+'(\\s|$)'),' ').replace(/^\s+|\s+$/g,'')},removeElement:function(el){if(typeof el!=='undefined'&&el!=null)el.parentNode.removeChild(el)},emptyElement:function(el){while(el.firstChild)el.removeChild(el.firstChild)},reload:function(e){var el=document.querySelector(e);if(typeof el!=='undefined'&&el!=null){if(_bsa.isset(el.firstChild.getAttribute('data-attributes'))){var attributes=JSON.parse(el.firstChild.getAttribute('data-attributes'));this.removeElement(document.getElementById(attributes.options.script_id));this.emptyElement(el)}else{var attributes=JSON.parse(el.getAttribute('data-attributes'));this.removeElement(document.getElementById(attributes.options.script_id));this.removeElement(el)}this.init(attributes.type,attributes.key,attributes.segment,attributes.options)}},isHex:function(c){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(c)},isMobile:function(){var check=false;(function(a){if(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i.test(a.substr(0,4)))check=true})(navigator.userAgent||navigator.vendor||window.opera);return check},extend:function(target){for(var i=1;i<arguments.length;++i){var from=arguments[i];if(typeof from!=='object')continue;for(var j in from){if(from.hasOwnProperty(j)){target[j]=typeof from[j]==='object'?this.extend({},target[j],from[j]):from[j]}}}return target},isset:function(v){return typeof v!=='undefined'&&v!=null},exists:function(el){if(el===null)return false;return true},objExists:function(obj){var hasOwnProperty=Object.prototype.hasOwnProperty;if(obj==null)return false;if(obj.length>0)return true;if(obj.length===0)return false;for(var key in obj)if(hasOwnProperty.call(obj,key))return true;return false},getAttr:function(v,id){return document.getElementById(id).getAttribute('data-'+v)},getURLVar:function(name,url){name=name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");var regexS="[\\?&]"+name+"=([^&#]*)",regex=new RegExp(regexS),results=regex.exec(url);if(results==null)return'';else return results[1]},htmlEncode:function(v){if(typeof v==='undefined')v='';return v.replace(/&/g,'&amp;').replace(/"/g,'&quot;').replace(/'/g,'&apos;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/\//g,'&#x2F;')}};var _bsa_go=function(json){var queue_index=_bsa.findInQueue(json['ads'][0].zonekey);if(window['_bsa_queue'][queue_index])if((window['_bsa_queue'][queue_index][3]&&window['_bsa_queue'][queue_index][3].platforms.indexOf('mobile')>-1&&_bsa.isMobile())||(window['_bsa_queue'][queue_index][3]&&window['_bsa_queue'][queue_index][3].platforms.indexOf('desktop')>-1&&!_bsa.isMobile())){if(_bsa.isset(json))for(i=json['ads'].length-1;i>=0;i--)if(!_bsa.isset(json['ads'][i].statlink))json['ads'].splice(i,1);if(_bsa.isset(json)&&_bsa.isset(json['ads'])&&json['ads'].length>0&&_bsa.isset(json['ads'][0].statlink)){for(var i=0;i<json['ads'].length;i++)_bsa_serving_callback(json['ads'][i].bannerid,json['ads'][i].zonekey,json['ads'][i].freqcap);_bsa[window['_bsa_queue'][queue_index][0]](window['_bsa_queue'][queue_index][1],window['_bsa_queue'][queue_index][2],window['_bsa_queue'][queue_index][3],json['ads'])}}};_bsa.testData={ads:[{backgroundColor:'red',backgroundHoverColor:'#ffffff',callToAction:'Try now',company:'Company Name',ctaBackgroundColor:'#0072c6',ctaBackgroundHoverColor:'#0089ee',description:'We build widgets, and we think you should try them!',image:'https://cdn4.buysellads.net/uu/1/18/1504373058-32397.png',logo:'https://cdn4.buysellads.net/uu/1/18/1504373139-azure-1.png',statlink:'//www.buysellads.com/',textColor:'#ffffff',textColorHover:'#ffffff',timestamp:'1508185654',title:'The best widgets'}]};_bsa.getCookie=function(name){var nameEQ=name+'=',ca=document.cookie.split(';');for(var i=0;i<ca.length;i++){var c=ca[i];while(c.charAt(0)==' ')c=c.substring(1,c.length);if(c.indexOf(nameEQ)==0)return c.substring(nameEQ.length,c.length)}return null};_bsa.setCookie=function(name,value,seconds){if(seconds){var date=new Date();date.setTime(date.getTime()+seconds);var expires='; expires='+date.toGMTString()}else var expires='';document.cookie=name+'='+value+expires+'; path=/'};_bsa.removeCookie=function(name){this.setCookie(name,'',-1)};window['_bsa_serving_callback']=function(banner,zone,freqcap){var append=function(w,data,days){var c=document.cookie,i=c.indexOf(w+'='),existing=i>=0?c.substring(i+w.length+1).split(';')[0]+',':'',d=new Date();d.setTime(days*3600000+d);data=existing+data;data=data.substring(0,2048);document.cookie=w+'='+data+'; expires='+d.toGMTString()+'; path=\/'};if(freqcap){append('_bsap_daycap',banner,1);append('_bsap_lifecap',banner,365)}};_bsa.default=function(zoneKey,segment,options,ads){var disable_css=_bsa.isset(options)&&_bsa.isset(options.disable_css)?options.disable_css:false;var custom_domain=_bsa.isset(options)&&_bsa.isset(options.custom_domain)?options.custom_domain:false;var image_type=_bsa.isset(options)&&_bsa.isset(options.image)?options.image:false;_bsa.default.attributes={"type":"default","key":zoneKey,"segment":segment,"options":options,"ads":ads};_bsa.default.elID=function(options){return(options&&options.id)?options.id:'_default_'};_bsa.default.align=function(options){return(options&&options.align)?options.align:'vertical'};function css(colors){var c='<style type="text/css">',id=_bsa.default.elID(options);if(_bsa.default.align(options)=='vertical')c+='#'+id+'{flex-direction:column}#'+id+' ._default_{margin-bottom:10px;}';else c+='#'+id+'{flex-direction:row}#'+id+' a._default_{width:49%;}';c+='#'+id+'{position:relative;display:flex;}#'+id+' a._default_{display:block;position:relative;margin:5px;text-decoration:none;}#'+id+' a._default_:hover .default-title{text-decoration:underline;}#'+id+' .default-ad{position:absolute;right:0;top:0;background:#e1e1e1;color:#9a9a9a;padding:2px 3px;font-size:12.5px;border-radius:2px;font-weight:600;}#'+id+' a._default_ .default-image img{float:left;margin:0 10px 0 0;}#'+id+' a._default_ .default-title{display:block;margin:4px 0 0 0;font-size:16px;font-weight:600;padding:0 0 4px;}#'+id+' a._default_ .default-description{display:block;font-size:14px;color:#414141;margin-right:5%;}#'+id+' a._default_:hover .default-description{color:#111;}';c+='</style>';return c}function template(ads){var c='<span class="default-ad">'+(_bsa.isset(options)&&_bsa.isset(options.default_text)?options.default_text:'ad')+'</span>';for(var i=0;i<ads.length;i++){c+='<a href="'+_bsa.link(ads[i].statlink,segment,custom_domain,ads[i].timestamp)+'" target="_blank" rel="nofollow noopener" class="_default_"><span class="default-image"><img src="'+(_bsa.isset(ads[i].base64)?ads[i].base64:(image_type=='logo'?ads[i].logo:(_bsa.isset(ads[i].image)?ads[i].image:ads[i].logo)))+'" /></span><span class="default-title">'+_bsa.htmlEncode(ads[i].company)+'</span><span class="default-description">'+_bsa.htmlEncode(ads[i].description)+'</span></a>';c+=_bsa.pixel(ads[i].pixel,ads[i].timestamp)}return c}if(ads){_bsa.drop((disable_css?'':css(ads))+template(ads),options.target,'div',_bsa.default.elID(options),_bsa.default.attributes);_bsa.clearQueue(_bsa.findInQueue(zoneKey));_bsa.callback(_bsa.default.attributes)}};_bsa.default.readyToInit=true;_bsa.defaultcta=function(zoneKey,segment,options,ads){var disable_css=_bsa.isset(options)&&_bsa.isset(options.disable_css)?options.disable_css:false;var custom_domain=_bsa.isset(options)&&_bsa.isset(options.custom_domain)?options.custom_domain:false;var image_type=_bsa.isset(options)&&_bsa.isset(options.image)?options.image:false;_bsa.defaultcta.attributes={"type":"default","key":zoneKey,"segment":segment,"options":options,"ads":ads};_bsa.defaultcta.elID=function(options){return(options&&options.id)?options.id:'_defaultcta_'};_bsa.defaultcta.align=function(options){return(options&&options.align)?options.align:'vertical'};function css(colors){var c='<style type="text/css">',id=_bsa.defaultcta.elID(options);if(_bsa.defaultcta.align(options)=='vertical')c+='#'+id+'{flex-direction:column}#'+id+' ._default_{margin-bottom:10px;}';else c+='#'+id+'{flex-direction:row}#'+id+' a._default_{width:49%;}';c+='#'+id+'{position:relative;display:flex;box-shadow:0 0 10px #ccc;margin:0 0 40px;}#'+id+' a._defaultcta_{display:block;position:relative;text-decoration:none;padding:20px 20px 15px;}#'+id+' a._defaultcta_:nth-child(n+2){border-top:1px solid #f1f1f1;}#'+id+' a._default_ .default-title:hover{text-decoration:underline;}#'+id+' .default-ad{background:'+(_bsa.isset(options)&&_bsa.isset(options.heading_background)?options.heading_background:'#000000')+';color:'+(_bsa.isset(options)&&_bsa.isset(options.heading_text)?options.heading_text:'#000000')+';padding:10px;font-size:12.5px;font-weight:600;}#'+id+' a._defaultcta_ .default-image img{float:left;margin:0 20px 15px 0;height:60px;width:60px;}#'+id+' a._defaultcta_ .default-title{display:block;margin:4px 0 0 0;font-size:16px;font-weight:600;padding:0 0 4px;}#'+id+' a._defaultcta_ .default-description{display:block;font-size:14px;color:#414141;margin-right:5%;}#'+id+' a._defaultcta_ .default-cta{float:right;display:block;width:150px;padding:10px 10px;margin:10px 0 0 30px;border-radius:2px;text-align:center;background:'+(_bsa.isset(options)&&_bsa.isset(options.cta_background)?options.cta_background:'#000000')+';color:'+(_bsa.isset(options)&&_bsa.isset(options.cta_text)?options.cta_text:'#000000')+';}';c+='</style>';return c}function template(ads){var c='<span class="default-ad">'+(_bsa.isset(options)&&_bsa.isset(options.default_text)?options.default_text:'ad')+'</span>';for(var i=0;i<ads.length;i++){c+='<a href="'+_bsa.link(ads[i].statlink,segment,custom_domain,ads[i].timestamp)+'" target="_blank" rel="nofollow noopener" class="_defaultcta_"><span class="default-image"><img src="'+(_bsa.isset(ads[i].base64)?ads[i].base64:(image_type=='logo'?ads[i].logo:ads[i].image))+'" /></span><span class="default-cta">'+_bsa.htmlEncode(ads[i].callToAction)+'</span><span class="default-title">'+_bsa.htmlEncode(ads[i].company)+'</span><span class="default-description">'+_bsa.htmlEncode(ads[i].description)+'</span></a>';c+=_bsa.pixel(ads[i].pixel,ads[i].timestamp)}return c}if(ads){_bsa.drop((disable_css?'':css(ads))+template(ads),options.target,'div',_bsa.defaultcta.elID(options),_bsa.defaultcta.attributes);_bsa.clearQueue(_bsa.findInQueue(zoneKey));_bsa.callback(_bsa.defaultcta.attributes)}};_bsa.defaultcta.readyToInit=true;_bsa.fancybar=function(zoneKey,segment,options,ads){var disable_css=_bsa.isset(options)&&_bsa.isset(options.disable_css)?options.disable_css:false;var custom_domain=_bsa.isset(options)&&_bsa.isset(options.custom_domain)?options.custom_domain:false;_bsa.fancybar.attributes={"type":"fancybar","key":zoneKey,"segment":segment,"options":options,"ads":ads};function temp_zonekey(segment){var reroute=new Array();reroute['placement:coingecko']='CKYDKKQE';reroute['placement:bitcoincom']='CKYDKKQJ';reroute['placement:worldcoinindex']='CKYDKKQL';reroute['placement:bitinfocharts']='CKYDKKQI';reroute['placement:newsbtc']='CKYDKKQW';reroute['placement:bitcoinforecast']='CKYDKKQM';reroute['placement:coinmarketcal']='CKYDKKQN';reroute['placement:advfn']='CKYDKKQU';reroute['placement:coincodex']='CKYDKKQY';reroute['placement:thebitcoinpub']='CKYDKKQ7';reroute['placement:cryptoid']='CKYDKKJE';reroute['placement:99bitcoins']='CKYDKKJJ';reroute['placement:cryptocoinsnews']='CKYDKKJL';reroute['placement:weekinethereum']='CKYDKKJI';reroute['placement:flippeningwatch']='CKYDKKJW';reroute['placement:bitinfocharts']='CKYDKKQI';reroute['placement:geeksforgeeks']='CKYDL2JJ';reroute['placement:pastebin']='CKYDL2JL';reroute['placement:danstools']='CKYDL27W';reroute['placement:programiz']='CKYDL27L';reroute['placement:seeklogo']='CKYDL27J';reroute['placement:howtoforge']='CKYDL27E';reroute['placement:unixdotcom']='CKYDL2J7';reroute['placement:speckyboy']='CKYDL2JY';reroute['placement:jsonlint']='CKYDL2JU';reroute['placement:w3layouts']='CKYDL2JN';reroute['placement:graphicdesignjunction']='CKYDL53E';reroute['placement:htmlcom']='CKYDL2JW';reroute['placement:freevector']='CKYDL2JI';reroute['placement:java2novice']='CKYDL277';reroute['placement:coursetro']='CKYDL27Y';reroute['placement:1stwebdesigner']='CKYDL27U';reroute['placement:tinypaste']='CKYDL53J';reroute['placement:entityframeworktutorial']='CKYDL27N';reroute['placement:vandelaydesign']='CKYDL27M';reroute['placement:photoshoptutorials']='CKYDL2JM';reroute['placement:noobslab']='CKYDL5QM';reroute['placement:osboxes']='CKYDL5QW';reroute['placement:texblogorg']='CKYDL5QI';reroute['placement:vector4free']='CKYDL5QJ';reroute['placement:onlygfx']='CKYDL5QE';reroute['placement:developerdrive']='CKYDL537';reroute['placement:weandthecolor']='CKYDL53Y';reroute['placement:html5doctor']='CKYDL53U';reroute['placement:vectips']='CKYDL53N';reroute['placement:pydev']='CKYDL53M';reroute['placement:icons8com']='CKYITKQ7';reroute['placement:networktools']='CKYDL53I';reroute['placement:carlcheo']='CKYDL53L';reroute['placement:faqforge']='CKYITKQY';reroute['placement:digitalcom']='CKYITKQU';reroute['placement:designerdaily']='CKYITKQM';reroute['placement:creativenerds']='CKYITKJE';reroute['placement:inserthtml']='CKYITKQW';reroute['placement:go4expert']='CKYITKQI';reroute['placement:sanwebe']='CKYITKQL';reroute['placement:java4s']='CKYITKQJ';reroute['placement:spyrestudios']='CKYITKQE';reroute['placement:randomkeygen']='CKYITK37';reroute['placement:freewebtemplates']='CKYITK3Y';reroute['placement:photoshoplady']='CKYITK3U';reroute['placement:dreamcss']='CKYITK3N';reroute['placement:mygrafico']='CKYITK3M';reroute['placement:fromdev']='CKYITK3W';reroute['placement:queness']='CKYITK3I';reroute['placement:w3bin']='CKYITK3L';reroute['placement:psddd']='CKYITK3J';reroute['placement:webappers']='CKYITK3E';reroute['placement:icondeposit']='CKYDL5Q7';reroute['placement:cssplay']='CKYDL5QY';reroute['placement:snapmunk']='CKYDL5QU';reroute['placement:vecto2000']='CKYDL5QN';reroute['placement:cssmania']='CKYDL53W';reroute['placement:ctrlq']='CKYITKJJ';if(_bsa.isset(reroute[segment]))return reroute[segment];return zoneKey};var show_ads_via=false,cryptobar=['CKYIT2QE','CKYDL23E','CKYDKKQW','CKYIT2JI','CKYDKKQ7','CKYI4K3L','CKYDLK7Y','CKYDKKJI','CKYIT5QL','CKYDKKQL','CKYIT23L','CKYDKKJJ','CKYIT2JN','CKYIT2JU','CKYI427J','CKYDKKQJ','CKYDKKQM','CKYITK7W','CKYDKKQI','CKYI427E','CKYIT237','CKYDL23J','CKYDKKJE','CKYITK7N','CKYDKKQY','CKYDKKQE','CKYDKKQN','CKYDLK77','CKYITK7M','CKYIT537','CKYDKKJL','CK7D4K37','CKYDKKJW','CKYIT5QE','CKYDEKQL','CKYD55QY'];if(cryptobar.indexOf(zoneKey)>0)show_ads_via=true;if(zoneKey=='CKYDV2QM'||zoneKey=='C6ADVKE')zoneKey=temp_zonekey(segment);_bsa.fancybar.elID=function(options){return(options&&options.id)?options.id:'_fbn_'};function css(colors,show_ads_via){var c=colors[0],o='',backgroundColor=_bsa.isset(c)&&_bsa.isHex(c.barcolor)?c.barcolor:(_bsa.isset(c.backgroundColor)?c.backgroundColor:_bsa.testData.ads[0].backgroundColor),backgroundHoverColor=_bsa.isset(c)&&_bsa.isHex(c.barcolorHover)?c.barcolorHover:(_bsa.isset(c.backgroundHoverColor)?c.backgroundHoverColor:(_bsa.isset(c.backgroundHoverColor)?c.backgroundHoverColor:_bsa.testData.ads[0].backgroundHoverColor)),callToActionTextColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionTextColor)?c.callToActionTextColor:(_bsa.isset(c.ctaTextColor)?c.ctaTextColor:_bsa.testData.ads[0].callToActionTextColor),callToActionTextColorHover=_bsa.isset(c)&&_bsa.isHex(c.callToActionTextColorHover)?c.callToActionTextColorHover:(_bsa.isset(c.ctaTextColorHover)?c.ctaTextColorHover:_bsa.testData.ads[0].callToActionTextColorHover),ctaBackgroundColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionColor)?c.callToActionColor:(_bsa.isset(c.callToActionBackgroundColor)?c.callToActionBackgroundColor:(_bsa.isset(c.ctaBackgroundColor)?c.ctaBackgroundColor:_bsa.testData.ads[0].ctaBackgroundColor)),ctaBackgroundHoverColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionColorHover)?c.callToActionColorHover:(_bsa.isset(c.ctaBackgroundHoverColor)?c.ctaBackgroundHoverColor:_bsa.testData.ads[0].ctaBackgroundHoverColor),textColor=_bsa.isset(c)&&_bsa.isHex(c.textcolor)?c.textcolor:(_bsa.isset(c.textColor)?c.textColor:_bsa.testData.ads[0].textColor),textColorHover=_bsa.isset(c)&&_bsa.isHex(c.textcolorHover)?c.textcolorHover:(_bsa.isset(c.textColorHover)?c.textColorHover:_bsa.testData.ads[0].textColorHover);o='<style type="text/css">';o+='._bsa_hide ._bsa_fancybar { top: -100%;}._bsa_show ._bsa_fancybar {top: 0;}._bsa_fancybar {display: block;width: 100%;float: left;position: fixed;top: -80px;left: 0;right: 0;z-index: 100001;background-color: '+backgroundColor+';-webkit-transition: top 700ms;-moz-transition: top 700ms;-o-transition: top 700ms;transition: top 700ms;text-align: center;box-sizing: border-box;font-family: helvetica, arial, sans-serif;margin: 0 auto;box-shadow: 0 1px 10px rgba(0, 0, 0, .25);backface-visibility: hidden;}._bsa_fancybar a {display: flex;align-items: center;justify-content: space-between;text-align: left;text-decoration: none;margin: 0;width: 100%;padding: 5px 20px;box-sizing: border-box;}._bsa_fancybar a:hover {background: '+backgroundHoverColor+';}._bsa_fancybar .fancybar-left {display: flex;align-items: center;}._bsa_fancybar .fancybar-right {display: flex;align-items: center;}._bsa_fancybar a .fancybar-cta {color: '+callToActionTextColor+';background-color: '+ctaBackgroundColor+';border-radius: 2px;font-size: 14px;white-space: nowrap;box-sizing: border-box;margin: 0 35px 0 15px;padding: 10px 15px;}._bsa_fancybar a:hover .fancybar-cta {background: '+ctaBackgroundHoverColor+';color: '+callToActionTextColorHover+';}._bsa_fancybar a .fancybar-logo img {width: 110px;margin-right: 10px;}._bsa_fancybar a .fancybar-text {float: left;font-size: 15px;line-height: 15px;padding: 0 0 0 10px;color: '+textColor+';}._bsa_fancybar a:hover .fancybar-text {color: '+textColorHover+';}._bsa_fancybar .fancybar-close {position: absolute;right: 10px;top: 50%;-webkit-transform: translateY(-50%);-ms-transform: translateY(-50%);transform: translateY(-50%);padding: 10px;color: '+textColor+';margin: 0;font-size: 14px;}._bsa_fancybar .fancybar-close:hover {cursor: pointer;color: '+textColorHover+';}._bsa_fancybar a._bsa_ads_via {position: absolute;bottom: -24px;right: 10px;display: block;width: 98px;font-size: 11px;color: #7e7e7e;padding: 0;margin: 0;text-align: right;background: rgba(255, 255, 255, .7);}@media all and (max-width: 1024px) {._bsa_fancybar a {padding: 5px 12px;}._bsa_fancybar a .fancybar-logo img {width: 115px;margin-right: 10px;}._bsa_fancybar a .fancybar-cta {font-size: 13px;padding: 8px 10px;}._bsa_fancybar .fancybar-close {right: 7px;padding: 8px;font-size: 13px;}._bsa_fancybar a .fancybar-text {font-size: 14px;line-height: 16px;padding: 0 0 0 10px;}}@media all and (max-width: 768px) {._bsa_fancybar a {padding: 5px 8px;}._bsa_fancybar a .fancybar-logo img {width: 100px;margin-right: 4px;}._bsa_fancybar a .fancybar-cta {display: none;}._bsa_fancybar .fancybar-close {padding: 20px 10px;margin: 0;}._bsa_fancybar a .fancybar-text {font-size: 11px;line-height: 13px;padding: 0 25px 0 8px;}._bsa_fancybar a .fancybar-text:after {font-size: 10px;padding: 2px 0 0 0;}._bsa_fancybar a._bsa_ads_via {bottom: -22px;right: 8px;width: 98px;font-size: 10px;}}._bsa_fancybar a .fancybar-disclaimer{display: block;font-size: 11px;opacity: .6;padding: 6px 0 0 0;font-style: italic;letter-spacing: 0.25px;}@media all and (max-width: 1024px) {._bsa_fancybar a .fancybar-disclaimer {padding: 2px 0 0 0;width:85%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;}}';o+='</style>';return o}function template(ads){var a=ads[0],callToAction=(_bsa.isset(a.calltoaction)?a.calltoaction:(_bsa.isset(a.callToAction)?a.callToAction:a.cta)),company=_bsa.isset(a.heading)?a.heading:a.company,description=_bsa.isset(a.text)?a.text:a.description,image=_bsa.isset(a.base64)?a.base64:(_bsa.isset(a.image)?a.image:a.logo),logo=_bsa.isset(a.base64)?a.base64:(_bsa.isset(a.logo)?a.logo:a.image),statlink=_bsa.link(a.statlink,segment,custom_domain,a.timestamp),timestamp=a.timestamp,pixel=a.pixel,title=a.title,c='';c+='<div class="_bsa_fancybar">';c+='<span class="fancybar-close" onclick="_bsa.close(\''+_bsa.fancybar.elID(options)+'\')">&#10005;</span>';c+='<a href="'+statlink+'" target="_blank" rel="nofollow noopener"><span class="fancybar-left"><span class="fancybar-logo"><img src="'+logo+'" /></span><span class="fancybar-text">'+_bsa.htmlEncode(description)+'';if(show_ads_via&&title.length>30)c+='<span class="fancybar-disclaimer" title="'+_bsa.htmlEncode(title)+'">'+_bsa.htmlEncode(title)+'</span>';c+='</span></span><span class="fancybar-right"><span class="fancybar-cta">'+_bsa.htmlEncode(callToAction)+'</span></span></a>';c+=_bsa.pixel(pixel,timestamp);c+='</div>';return c}if(!_bsa.getCookie(_bsa.fancybar.elID(options))){var _fancybar_didScroll;var _fancybar_didDrop=false;window.onscroll=function(){_fancybar_didScroll=true};var _fancybar_scrollInterval=setInterval(function(){if(_fancybar_didScroll&&!_bsa.getCookie(_bsa.fancybar.elID(options))){_fancybar_didScroll=false;var scrollTop=(window.pageYOffset!==undefined)?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;if(scrollTop>=100&&!document.getElementById(options.script_id)){_bsa.fancybar.readyToInit=true;_bsa.init('fancybar',zoneKey,segment,options)}else if(scrollTop>=100){_bsa.show(_bsa.fancybar.elID(options))}if(scrollTop<100){_bsa.hide(_bsa.fancybar.elID(options))}}},500)}if(ads){_bsa.drop((disable_css?'':css(ads,show_ads_via))+template(ads),'body','div',_bsa.fancybar.elID(options),_bsa.fancybar.attributes);_bsa.clearQueue(_bsa.findInQueue(zoneKey));_bsa.callback(_bsa.fancybar.attributes)}};_bsa.fancybar.readyToInit=false;_bsa.flexbar=function(zoneKey,segment,options,ads){var disable_css=_bsa.isset(options)&&_bsa.isset(options.disable_css)?options.disable_css:false;var custom_domain=_bsa.isset(options)&&_bsa.isset(options.custom_domain)?options.custom_domain:false;_bsa.flexbar.elID=function(options){return(options&&options.id)?options.id:'_flexbar_'};_bsa.flexbar.attributes={"type":"flexbar","key":zoneKey,"segment":segment,"options":options,"ads":ads};function css(colors){var c=colors[0],backgroundColor=_bsa.isset(c)&&_bsa.isHex(c.barcolor)?c.barcolor:(_bsa.isset(c.backgroundColor)?c.backgroundColor:_bsa.testData.ads[0].backgroundColor),backgroundHoverColor=_bsa.isset(c)&&_bsa.isHex(c.barcolorHover)?c.barcolorHover:(_bsa.isset(c.backgroundHoverColor)?c.backgroundHoverColor:(_bsa.isset(c.backgroundHoverColor)?c.backgroundHoverColor:_bsa.testData.ads[0].backgroundHoverColor)),callToActionTextColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionTextColor)?c.callToActionTextColor:(_bsa.isset(c.ctaTextColor)?c.ctaTextColor:_bsa.testData.ads[0].callToActionTextColor),callToActionTextColorHover=_bsa.isset(c)&&_bsa.isHex(c.callToActionTextColorHover)?c.callToActionTextColorHover:(_bsa.isset(c.ctaTextColorHover)?c.ctaTextColorHover:_bsa.testData.ads[0].callToActionTextColorHover),ctaBackgroundColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionColor)?c.callToActionColor:(_bsa.isset(c.callToActionBackgroundColor)?c.callToActionBackgroundColor:(_bsa.isset(c.ctaBackgroundColor)?c.ctaBackgroundColor:_bsa.testData.ads[0].ctaBackgroundColor)),ctaBackgroundHoverColor=_bsa.isset(c)&&_bsa.isHex(c.callToActionColorHover)?c.callToActionColorHover:(_bsa.isset(c.ctaBackgroundHoverColor)?c.ctaBackgroundHoverColor:_bsa.testData.ads[0].ctaBackgroundHoverColor),textColor=_bsa.isset(c)&&_bsa.isHex(c.textcolor)?c.textcolor:(_bsa.isset(c.textColor)?c.textColor:_bsa.testData.ads[0].textColor),textColorHover=_bsa.isset(c)&&_bsa.isHex(c.textcolorHover)?c.textcolorHover:_bsa.testData.ads[0].textColorHover,id=_bsa.flexbar.elID(options);return'<style type="text/css">._bsa_hide ._bsa_flexbar{display:none}._bsa_show ._bsa_flexbar{display:block}#'+id+'{display:block}#'+id+'._bsa_hide{margin-bottom:0}._bsa_flexbar{font-family:"Helvetica Neue", Helvetica, Arial, Sans-Serif !important;width:100%;z-index:999999;color:#fff;position:relative;height:95px;background:'+backgroundColor+';-webkit-animation:fadein 2s;-moz-animation:fadein 2s;-ms-animation:fadein 2s;-o-animation:fadein 2s;animation:fadein 2s}._bsa_flexbar:hover{background:'+backgroundHoverColor+'}._bsa_flexbar > a{display:flex;align-items:center;justify-content:space-between;padding:20px 30px;text-decoration:none}._bsa_flexbar .flexbar-left{display:flex;align-items:center;justify-content:flex-start}._bsa_flexbar .flexbar-close{position:absolute;top:50%;right:30px;margin:-20px 0 0 0;padding:0;color:rgba(255,255,255,0.5);background:rgba(0,0,0,0.1);display:block;float:right;width:40px;height:40px;border-radius:50px;font-size:20px;text-align:center;line-height:40px;text-decoration:none}._bsa_flexbar .flexbar-heading{font-size:10px;letter-spacing:3px;color:'+textColor+';width:100%;padding-bottom:4px;line-height:180%;float:left;text-transform:uppercase;font-weight:500}._bsa_flexbar .flexbar-desc{font-weight:600;font-size:14px;max-width:768px;letter-spacing:1px;color:'+textColor+';width:100%;line-height:160%;float:left;}._bsa_flexbar .flexbar-logo img{float:left;max-width:130px;margin:0 30px 0 0}._bsa_flexbar .flexbar-cta{text-align:center;float:right;color:'+callToActionTextColor+';background:'+ctaBackgroundColor+';text-decoration:none;border-radius:3px;font-weight:300;margin-right:70px;line-height:100%;padding:15px 20px;border:none;white-space:nowrap}._bsa_flexbar .flexbar-close:hover{color:rgba(255,255,255,0.8);background:rgba(0,0,0,0.3);cursor:pointer}@media all and (max-width: 1024px){._bsa_flexbar > a{padding:25px 100px 25px 25px}._bsa_flexbar .flexbar-logo{max-width:48px;margin:10px 20px 10px 0}}@media all and (max-width: 768px){._bsa_flexbar .flexbar-desc{font-size:13px}._bsa_flexbar > a{padding:20px 80px 20px 20px}._bsa_flexbar .flexbar-close{right:20px;margin:-15px 0 0 0;width:30px;height:30px;font-size:18px;line-height:30px}}@media all and (max-width: 1024px){._bsa_flexbar .flexbar-cta{display:none}._bsa_flexbar > a{padding:20px}._bsa_flexbar > a{padding-right:80px}._bsa_flexbar .flexbar-close{right:20px}._bsa_flexbar .flexbar-logo{max-width:130px;margin:10px 20px 10px 0}}@media all and (max-width: 568px){._bsa_flexbar .flexbar-logo{display:none}._bsa_flexbar .flexbar-cta{display:none}._bsa_flexbar .flexbar-heading{font-size:8px}._bsa_flexbar .flexbar-desc{font-size:12px}._bsa_flexbar > a{padding:15px}}@keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-moz-keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-ms-keyframes fadein{from { opacity:0}to{opacity:1}} @-o-keyframes fadein{from { opacity:0}to{opacity:1}</style>'}function template(ads){var a=ads[0],callToAction=(_bsa.isset(a.calltoaction)?a.calltoaction:(_bsa.isset(a.callToAction)?a.callToAction:a.cta)),company=_bsa.isset(a.heading)?a.heading:a.company,description=_bsa.isset(a.text)?a.text:a.description,image=_bsa.isset(a.base64)?a.base64:(_bsa.isset(a.image)?a.image:a.logo),logo=_bsa.isset(a.base64)?a.base64:(_bsa.isset(a.logo)?a.logo:a.image),statlink=_bsa.link(a.statlink,segment,custom_domain,a.timestamp),timestamp=a.timestamp,pixel=a.pixel,title=a.title,c='';c+='<div class="_bsa_flexbar"><a href="'+statlink+'" target="_blank" rel="nofollow noopener"><span class="flexbar-left"><span class="flexbar-logo"><img src="'+logo+'" /></span><span class="flexbar-text"><span class="flexbar-heading">'+_bsa.htmlEncode(company)+'</span><span class="flexbar-desc">'+_bsa.htmlEncode(description)+'</span></span></span><span class="flexbar-cta">'+_bsa.htmlEncode(callToAction)+'</span></a><span class="flexbar-close" onclick="_bsa.close(\''+_bsa.flexbar.elID(options)+'\')">&#10005;</span>';c+=_bsa.pixel(pixel,timestamp);c+='</div>';return c}if(!_bsa.getCookie(_bsa.flexbar.elID(options)))if(ads){_bsa.drop((disable_css?'':css(ads))+template(ads),'body','div',_bsa.flexbar.elID(options),_bsa.flexbar.attributes);_bsa.clearQueue(_bsa.findInQueue(zoneKey));_bsa.callback(_bsa.flexbar.attributes)}};_bsa.flexbar.readyToInit=true;_bsa.stickybox=function(zoneKey,segment,options,ads){var disable_css=_bsa.isset(options)&&_bsa.isset(options.disable_css)?options.disable_css:false;var custom_domain=_bsa.isset(options)&&_bsa.isset(options.custom_domain)?options.custom_domain:false;_bsa.stickybox.elID=function(options){return(options&&options.id)?options.id:'_stickybox_'};_bsa.stickybox.align=function(options){return(options&&options.align)?options.align:'vertical'};_bsa.stickybox.attributes={"type":"stickybox","key":zoneKey,"segment":segment,"options":options,"ads":ads};function css(colors){var c='<style type="text/css">',id=_bsa.stickybox.elID(options);if(_bsa.stickybox.align(options)=='vertical')c+='#'+id+'{flex-direction:column}#'+id+' ._stickybox_{margin-bottom:10px;}';else c+='#'+id+'{flex-direction:row}#'+id+' a._stickybox_{width:49%;}';c+='#'+id+'._bsa_hide{display:none;}#'+id+'._bsa_show{display:flex;}#'+id+'{position:relative;display:flex;box-shadow:rgba(0,0,0,.10) 1px 1px 15px 0;position:fixed;z-index:999 !important;bottom:20px;right:20px;background:rgba(255,255,255,.95);border-radius:2px;border:1px solid #eaeaea;-webkit-animation:fadein 1.2s;-moz-animation:fadein 1.2s;-ms-animation:fadein 1.2s;-o-animation:fadein 1.2s;animation:fadein 1.2s;}#'+id+' a._stickybox_{display:block;position:relative;margin:5px;text-decoration:none;}#'+id+' a._stickybox_:hover .stickybox-title{text-decoration:underline;}#'+id+' .stickybox-ad{position:absolute;text-decoration:none;left:-18px;bottom:57px;background:rgba(0,0,0,.1);color:#6e6e6e;padding:2px 0;font-size:11px;border-radius:2px 0 0 2px;display:block;text-align:center;width:18px;}#'+id+' .stickybox-ad:hover{background:rgba(0,0,0,.2);}#'+id+' a._stickybox_ .stickybox-image img{float:left;margin:8px 18px 8px 8px;max-width:56px;border-radius:2px;}#'+id+' a._stickybox_ .stickybox-title{display:block;margin:7px 5% 0 0;font-size:14px;font-weight:600;padding:0 0 4px;}#'+id+' a._stickybox_ .stickybox-description{display:block;font-size:13px;color:#414141;margin-right:5%;max-width:350px;}#'+id+' a._stickybox_:hover .stickybox-description{color:#111;}#'+id+' .stickybox-close{position:absolute;top:7px;right:7px;color:#fff;background:rgba(0,0,0,0.1);display:block;float:right;width:18px;height:18px;border-radius:50px;font-size:12px;text-align:center;line-height:150%;font-weight:bold;text-decoration:none}#'+id+' .stickybox-close:hover{color:rgba(255,255,255,0.8);background:rgba(0,0,0,0.3);cursor:pointer}@keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-moz-keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-webkit-keyframes "fadein"{from{opacity:0;}to{opacity:1;}}@-ms-keyframes fadein{from { opacity:0}to{opacity:1}} @-o-keyframes fadein{from { opacity:0}to{opacity:1}';c+='</style>';return c}function template(ads){var c='<a href="https://www.buysellads.com/advertisers/nativeperformance?utm_campaign=in_unit&utm_source=stickybox&utm_medium=ad_via_link" rel="nofollow noopener" target="_blank" class="stickybox-ad">'+(_bsa.isset(options)&&_bsa.isset(options.stickybox_text)?options.stickybox_text:'ad')+'</a>';for(var i=0;i<1;i++){c+='<a href="'+_bsa.link(ads[i].statlink,segment,custom_domain,ads[i].timestamp)+'" target="_blank" rel="nofollow noopener" class="_stickybox_"><span class="stickybox-image"><img src="'+(_bsa.isset(ads[i].base64)?ads[i].base64:ads[i].image)+'" /></span><span class="stickybox-title">'+_bsa.htmlEncode(ads[i].title)+'</span><span class="stickybox-description">'+_bsa.htmlEncode(ads[i].description)+'</span></a><span class="stickybox-close" onclick="_bsa.close(\''+_bsa.stickybox.elID(options)+'\')">&#10005;</span>';c+=_bsa.pixel(ads[i].pixel,ads[i].timestamp)}return c}if(!_bsa.getCookie(_bsa.stickybox.elID(options)))if(ads){_bsa.drop((disable_css?'':css(ads))+template(ads),options.target,'div',_bsa.stickybox.elID(options),_bsa.stickybox.attributes);_bsa.clearQueue(_bsa.findInQueue(zoneKey));_bsa.callback(_bsa.stickybox.attributes)}};_bsa.stickybox.readyToInit=true;
// dynamic programming question. // Write a function that, given: // an amount of money // an array of coin denominations // computes the number of ways to make the amount of money with coins of the available denominations. var amount1 = 4; var denominations1 = [1,2,3]; console.log(makeChange(amount1, denominations1)); function makeChange(amount, denominations){ } // brute force approach is to see if we can get to amount with repeatedly doing e
/* * adonis-bodyparser * * (c) Harminder Virk <virk@adonisjs.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ const File = require('../Multipart/File') const _ = require('lodash') /** * Validates a single file instance. If validation has error, then error * message will be returned as string, else null is returned. * * @method validateFile * * @param {File} file * @param {Object} options * * @return {String|Null} */ async function validateFile (file, options) { if (file instanceof File === false) { return null } await file.setOptions(Object.assign(file.validationOptions, options)).runValidations() return _.size(file.error()) ? file.error().message : null } module.exports = function (Validator) { /** * Ensure field is a valid File object */ Validator.extend('file', async function (data, field, message, args, get) { if (get(data, field) instanceof File === false) { throw message } }) /** * Validate file size */ Validator.extend('fileSize', async function (data, field, message, args, get) { const error = await validateFile(get(data, field), { size: args[0] }) if (error) { throw error } }) /** * Validate file extension */ Validator.extend('fileExt', async function (data, field, message, args, get) { const error = await validateFile(get(data, field), { extnames: args }) if (error) { throw error } }) /** * Validate file types */ Validator.extend('fileTypes', async function (data, field, message, args, get) { const error = await validateFile(get(data, field), { types: args }) if (error) { throw error } }) }
import React, { useEffect, useState } from "react"; import { Redirect } from "react-router-dom"; import intl from 'react-intl-universal'; import { Form, Icon, Input, Button, message, Rate, Select } from "antd"; import { connect } from "react-redux"; import "./index.less"; import { login, getUserInfo } from "@/store/actions"; const categoryType = localStorage.getItem('categoryType') const { Option } = Select; const ColorItemContent = (props) => { const { yanseList = [], onChose } = props; const [loading, setLoading] = useState(false); const [isShow, setShow] = useState(false); return ( loading ? <div>loading</div> : <div className='render-left-item'> {yanseList && <div className={`color-father showFahter ${isShow && 'showAll'}`} > <div className='top-message' onClick={() => setShow(!isShow)}> <span>颜色</span> <i className='jian-tou'></i> </div> <div className='bottom-child'> {yanseList.map((item, index) => ( <div className='child-item' key={`child-category-${index}`}> <img src={item.icon} onClick={() => onChose(item.id)} className='color' width={40} height={40} /> </div> ))} </div> </div> } </div> ); }; const ColorContent = Form.create()(ColorItemContent); export default connect((state) => state.user, { login })( ColorContent );
import moment from 'moment'; function objectToArray(obj) { return Object.values(obj); } function copyObjectProperties(fromObj, toObj) { for(let i in fromObj) { if(fromObj.hasOwnProperty(i) && toObj.hasOwnProperty(i)) { toObj[i] = fromObj[i]; } } } function copyObjectPropertiesAndApply(fromObj, toObj, apply, props = []) { for(let i in fromObj) { if(fromObj.hasOwnProperty(i) && toObj.hasOwnProperty(i)) { if(props.includes(i) || props.length === 0) { toObj[i] = apply(fromObj[i]); continue; } toObj[i] = fromObj[i]; } } } function numberToString(number) { if(Number(number).toFixed(2) !== "NaN" && number !== "" && number !== null) { return Number(number).toFixed(2); } return ""; } function emptyStringToNull(string) { return string === "" ? null : string; } function otherIfNull(obj, attr, otherAttr) { return obj[attr] === null ? obj[otherAttr] : obj[attr]; } function dateToString(year, month, day = null) { let returnString = "" + year + "-" + (month > 9 ? month : "0" + month); if(day === null) { return returnString; } return returnString + "-" + (day > 9 ? day : "0" + day); } function dateToFormatedString(date, format = "ddd, MMM D") { return moment(date).format(format); } function capitalize(word) { return word[0].toUpperCase() + word.substring(1); } export { emptyStringToNull, objectToArray, copyObjectProperties, copyObjectPropertiesAndApply, numberToString, otherIfNull, dateToString, dateToFormatedString, capitalize, };
describe('Core canvas behavior', () => { let container; beforeEach(async () => { await LoadCanvasKit; container = document.createElement('div'); container.innerHTML = ` <canvas width=600 height=600 id=test></canvas> <canvas width=600 height=600 id=report></canvas>`; document.body.appendChild(container); }); afterEach(() => { document.body.removeChild(container); }); gm('picture_test', (canvas) => { const spr = new CanvasKit.SkPictureRecorder(); const rcanvas = spr.beginRecording( CanvasKit.LTRBRect(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT)); const paint = new CanvasKit.SkPaint(); paint.setStrokeWidth(2.0); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); paint.setStyle(CanvasKit.PaintStyle.Stroke); rcanvas.drawRoundRect(CanvasKit.LTRBRect(5, 35, 45, 80), 15, 10, paint); const font = new CanvasKit.SkFont(null, 20); rcanvas.drawText('this picture has a round rect', 5, 100, paint, font); const pic = spr.finishRecordingAsPicture(); spr.delete(); paint.delete(); canvas.drawPicture(pic); // test that file saving functionality throws no errors // Unfortunately jasmine spy objects can't fake their type so we can't verify it downloads // a nonzero sized file. pic.saveAsFile('foo.skp'); pic.delete(); }); const uIntColorToCanvasKitColor = (c) => { return CanvasKit.Color( (c >> 16) & 0xFF, (c >> 8) & 0xFF, (c >> 0) & 0xFF, ((c >> 24) & 0xFF) / 255 ); } it('can compute tonal colors', () => { const input = { ambient: CanvasKit.BLUE, spot: CanvasKit.RED, }; const out = CanvasKit.computeTonalColors(input); expect(new Float32Array(out.ambient)).toEqual(CanvasKit.BLACK); const expectedSpot = [0.173, 0, 0, 0.969]; expect(out.spot.length).toEqual(4); expect(out.spot[0]).toBeCloseTo(expectedSpot[0], 3); expect(out.spot[1]).toBeCloseTo(expectedSpot[1], 3); expect(out.spot[2]).toBeCloseTo(expectedSpot[2], 3); expect(out.spot[3]).toBeCloseTo(expectedSpot[3], 3); }); // This helper is used for all the MakeImageFromEncoded tests. // TODO(kjlubick): rewrite this and callers to use gm function decodeAndDrawSingleFrameImage(imgName, goldName, done) { const imgPromise = fetch(imgName) .then((response) => response.arrayBuffer()); Promise.all([imgPromise, LoadCanvasKit]).then((values) => { const imgData = values[0]; expect(imgData).toBeTruthy(); catchException(done, () => { let img = CanvasKit.MakeImageFromEncoded(imgData); expect(img).toBeTruthy(); const surface = CanvasKit.MakeCanvasSurface('test'); expect(surface).toBeTruthy('Could not make surface'); if (!surface) { done(); return; } const canvas = surface.getCanvas(); let paint = new CanvasKit.SkPaint(); canvas.drawImage(img, 0, 0, paint); paint.delete(); img.delete(); reportSurface(surface, goldName, done); })(); }); } it('can decode and draw a png', (done) => { decodeAndDrawSingleFrameImage('/assets/mandrill_512.png', 'drawImage_png', done); }); it('can decode and draw a jpg', (done) => { decodeAndDrawSingleFrameImage('/assets/mandrill_h1v1.jpg', 'drawImage_jpg', done); }); it('can decode and draw a (still) gif', (done) => { decodeAndDrawSingleFrameImage('/assets/flightAnim.gif', 'drawImage_gif', done); }); it('can decode and draw a still webp', (done) => { decodeAndDrawSingleFrameImage('/assets/color_wheel.webp', 'drawImage_webp', done); }); it('can readPixels from an SkImage', (done) => { const imgPromise = fetch('/assets/mandrill_512.png') .then((response) => response.arrayBuffer()); Promise.all([imgPromise, LoadCanvasKit]).then((values) => { const imgData = values[0]; expect(imgData).toBeTruthy(); catchException(done, () => { let img = CanvasKit.MakeImageFromEncoded(imgData); expect(img).toBeTruthy(); const imageInfo = { alphaType: CanvasKit.AlphaType.Unpremul, colorType: CanvasKit.ColorType.RGBA_8888, colorSpace: CanvasKit.SkColorSpace.SRGB, width: img.width(), height: img.height(), }; const pixels = img.readPixels(imageInfo, 0, 0); // We know the image is 512 by 512 pixels in size, each pixel // requires 4 bytes (R, G, B, A). expect(pixels.length).toEqual(512 * 512 * 4); img.delete(); done(); })(); }); }); gm('drawDrawable_animated_gif', (canvas, fetchedByteBuffers) => { let aImg = CanvasKit.MakeAnimatedImageFromEncoded(fetchedByteBuffers[0]); expect(aImg).toBeTruthy(); expect(aImg.getRepetitionCount()).toEqual(-1); // infinite loop expect(aImg.width()).toEqual(320); expect(aImg.height()).toEqual(240); expect(aImg.getFrameCount()).toEqual(60); // TODO(kjlubick): deprecate drawAnimatedImage and have it just snap off // an SkImage at the desired frame. canvas.drawAnimatedImage(aImg, 0, 0); let c = aImg.decodeNextFrame(); expect(c).not.toEqual(-1); canvas.drawAnimatedImage(aImg, 300, 0); for(let i = 0; i < 10; i++) { c = aImg.decodeNextFrame(); expect(c).not.toEqual(-1); } canvas.drawAnimatedImage(aImg, 0, 300); for(let i = 0; i < 10; i++) { c = aImg.decodeNextFrame(); expect(c).not.toEqual(-1); } canvas.drawAnimatedImage(aImg, 300, 300); aImg.delete(); }, '/assets/flightAnim.gif'); gm('1x4_from_scratch', (canvas) => { canvas.clear(CanvasKit.WHITE); const paint = new CanvasKit.SkPaint(); // This creates and draws an SkImage that is 1 pixel wide, 4 pixels tall with // the colors listed below. const pixels = Uint8Array.from([ 255, 0, 0, 255, // opaque red 0, 255, 0, 255, // opaque green 0, 0, 255, 255, // opaque blue 255, 0, 255, 100, // transparent purple ]); const img = CanvasKit.MakeImage(pixels, 1, 4, CanvasKit.AlphaType.Unpremul, CanvasKit.ColorType.RGBA_8888, CanvasKit.SkColorSpace.SRGB); canvas.drawImage(img, 1, 1, paint); img.delete(); }); gm('sweep_gradient', (canvas) => { const paint = new CanvasKit.SkPaint(); const shader = CanvasKit.SkShader.MakeSweepGradient( 100, 100, // X, Y coordinates [CanvasKit.GREEN, CanvasKit.BLUE], [0.0, 1.0], CanvasKit.TileMode.Clamp, ); expect(shader).toBeTruthy('Could not make shader'); paint.setShader(shader); canvas.drawPaint(paint); paint.delete(); shader.delete(); }); // TODO(kjlubick): There's a lot of shared code between the gradient gms // It would be best to deduplicate that in a nice DAMP way. // Inspired by https://fiddle.skia.org/c/b29ce50a341510784ac7d5281586d076 gm('linear_gradients', (canvas) => { canvas.clear(CanvasKit.WHITE); canvas.scale(2, 2); const strokePaint = new CanvasKit.SkPaint(); strokePaint.setStyle(CanvasKit.PaintStyle.Stroke); strokePaint.setColor(CanvasKit.BLACK); const paint = new CanvasKit.SkPaint(); paint.setStyle(CanvasKit.PaintStyle.Fill); const transparentGreen = CanvasKit.Color(0, 255, 255, 0); const lgs = CanvasKit.SkShader.MakeLinearGradient( [0, 0], [50, 100], // start and stop points [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror ); paint.setShader(lgs); let r = CanvasKit.LTRBRect(0, 0, 100, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const lgsPremul = CanvasKit.SkShader.MakeLinearGradient( [100, 0], [150, 100], // start and stop points [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, null, // no local matrix 1 // interpolate colors in premul ); paint.setShader(lgsPremul); r = CanvasKit.LTRBRect(100, 0, 200, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const lgs45 = CanvasKit.SkShader.MakeLinearGradient( [0, 100], [50, 200], // start and stop points [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.rotated(Math.PI/4, 0, 100), ); paint.setShader(lgs45); r = CanvasKit.LTRBRect(0, 100, 100, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const lgs45Premul = CanvasKit.SkShader.MakeLinearGradient( [100, 100], [150, 200], // start and stop points [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.rotated(Math.PI/4, 100, 100), 1 // interpolate colors in premul ); paint.setShader(lgs45Premul); r = CanvasKit.LTRBRect(100, 100, 200, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); lgs.delete(); lgs45.delete(); lgsPremul.delete(); lgs45Premul.delete(); strokePaint.delete(); paint.delete(); }); gm('radial_gradients', (canvas) => { canvas.clear(CanvasKit.WHITE); canvas.scale(2, 2); const strokePaint = new CanvasKit.SkPaint(); strokePaint.setStyle(CanvasKit.PaintStyle.Stroke); strokePaint.setColor(CanvasKit.BLACK); const paint = new CanvasKit.SkPaint(); paint.setStyle(CanvasKit.PaintStyle.Fill); const transparentGreen = CanvasKit.Color(0, 255, 255, 0); const rgs = CanvasKit.SkShader.MakeRadialGradient( [50, 50], 50, // center, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror ); paint.setShader(rgs); let r = CanvasKit.LTRBRect(0, 0, 100, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const rgsPremul = CanvasKit.SkShader.MakeRadialGradient( [150, 50], 50, // center, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, null, // no local matrix 1 // interpolate colors in premul ); paint.setShader(rgsPremul); r = CanvasKit.LTRBRect(100, 0, 200, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const rgsSkew = CanvasKit.SkShader.MakeRadialGradient( [50, 150], 50, // center, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.skewed(0.5, 0, 100, 100), null, // color space ); paint.setShader(rgsSkew); r = CanvasKit.LTRBRect(0, 100, 100, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const rgsSkewPremul = CanvasKit.SkShader.MakeRadialGradient( [150, 150], 50, // center, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.skewed(0.5, 0, 100, 100), 1, // interpolate colors in premul null, // color space ); paint.setShader(rgsSkewPremul); r = CanvasKit.LTRBRect(100, 100, 200, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); rgs.delete(); rgsPremul.delete(); rgsSkew.delete(); rgsSkewPremul.delete(); strokePaint.delete(); paint.delete(); }); gm('conical_gradients', (canvas) => { canvas.clear(CanvasKit.WHITE); canvas.scale(2, 2); const strokePaint = new CanvasKit.SkPaint(); strokePaint.setStyle(CanvasKit.PaintStyle.Stroke); strokePaint.setColor(CanvasKit.BLACK); const paint = new CanvasKit.SkPaint(); paint.setStyle(CanvasKit.PaintStyle.Fill); paint.setAntiAlias(true); const transparentGreen = CanvasKit.Color(0, 255, 255, 0); const cgs = CanvasKit.SkShader.MakeTwoPointConicalGradient( [80, 10], 15, // start, radius [10, 110], 60, // end, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, null, // color space ); paint.setShader(cgs); let r = CanvasKit.LTRBRect(0, 0, 100, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const cgsPremul = CanvasKit.SkShader.MakeTwoPointConicalGradient( [180, 10], 15, // start, radius [110, 110], 60, // end, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, null, // no local matrix 1, // interpolate colors in premul null, // color space ); paint.setShader(cgsPremul); r = CanvasKit.LTRBRect(100, 0, 200, 100); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const cgs45 = CanvasKit.SkShader.MakeTwoPointConicalGradient( [80, 110], 15, // start, radius [10, 210], 60, // end, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.rotated(Math.PI/4, 0, 100), null, // color space ); paint.setShader(cgs45); r = CanvasKit.LTRBRect(0, 100, 100, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); const cgs45Premul = CanvasKit.SkShader.MakeTwoPointConicalGradient( [180, 110], 15, // start, radius [110, 210], 60, // end, radius [transparentGreen, CanvasKit.BLUE, CanvasKit.RED], [0, 0.65, 1.0], CanvasKit.TileMode.Mirror, CanvasKit.SkMatrix.rotated(Math.PI/4, 100, 100), 1, // interpolate colors in premul null, // color space ); paint.setShader(cgs45Premul); r = CanvasKit.LTRBRect(100, 100, 200, 200); canvas.drawRect(r, paint); canvas.drawRect(r, strokePaint); cgs.delete(); cgsPremul.delete(); cgs45.delete(); strokePaint.delete(); paint.delete(); }); gm('blur_filters', (canvas) => { const pathUL = starPath(CanvasKit, 100, 100, 80); const pathBR = starPath(CanvasKit, 400, 300, 80); const paint = new CanvasKit.SkPaint(); const textFont = new CanvasKit.SkFont(null, 24); canvas.drawText('Above: MaskFilter', 20, 220, paint, textFont); canvas.drawText('Right: ImageFilter', 20, 260, paint, textFont); paint.setColor(CanvasKit.BLUE); const blurMask = CanvasKit.SkMaskFilter.MakeBlur(CanvasKit.BlurStyle.Normal, 5, true); paint.setMaskFilter(blurMask); canvas.drawPath(pathUL, paint); const blurIF = CanvasKit.SkImageFilter.MakeBlur(8, 1, CanvasKit.TileMode.Decal, null); paint.setImageFilter(blurIF); canvas.drawPath(pathBR, paint); pathUL.delete(); pathBR.delete(); paint.delete(); blurMask.delete(); blurIF.delete(); textFont.delete(); }); gm('combined_filters', (canvas, fetchedByteBuffers) => { const img = CanvasKit.MakeImageFromEncoded(fetchedByteBuffers[0]); expect(img).toBeTruthy(); canvas.clear(CanvasKit.WHITE); const paint = new CanvasKit.SkPaint(); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 255, 0, 1.0)); const redCF = CanvasKit.SkColorFilter.MakeBlend( CanvasKit.Color(255, 0, 0, 0.1), CanvasKit.BlendMode.SrcOver); const redIF = CanvasKit.SkImageFilter.MakeColorFilter(redCF, null); const blurIF = CanvasKit.SkImageFilter.MakeBlur(8, 0.2, CanvasKit.TileMode.Decal, null); const combined = CanvasKit.SkImageFilter.MakeCompose(redIF, blurIF); // rotate 10 degrees centered on 200, 200 const m = CanvasKit.SkMatrix.rotated(Math.PI/18, 200, 200); const rotated = CanvasKit.SkImageFilter.MakeMatrixTransform(m, CanvasKit.FilterQuality.Medium, combined); paint.setImageFilter(rotated); //canvas.rotate(10, 200, 200); canvas.drawImage(img, 0, 0, paint); canvas.drawRect(CanvasKit.LTRBRect(5, 35, 45, 80), paint); paint.delete(); redIF.delete(); redCF.delete(); blurIF.delete(); combined.delete(); rotated.delete(); img.delete(); }, '/assets/mandrill_512.png'); gm('animated_filters', (canvas, fetchedByteBuffers) => { const img = CanvasKit.MakeAnimatedImageFromEncoded(fetchedByteBuffers[0]); expect(img).toBeTruthy(); img.decodeNextFrame(); img.decodeNextFrame(); canvas.clear(CanvasKit.WHITE); const paint = new CanvasKit.SkPaint(); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 255, 0, 1.0)); const redCF = CanvasKit.SkColorFilter.MakeBlend( CanvasKit.Color(255, 0, 0, 0.1), CanvasKit.BlendMode.SrcOver); const redIF = CanvasKit.SkImageFilter.MakeColorFilter(redCF, null); const blurIF = CanvasKit.SkImageFilter.MakeBlur(8, 0.2, CanvasKit.TileMode.Decal, null); const combined = CanvasKit.SkImageFilter.MakeCompose(redIF, blurIF); paint.setImageFilter(combined); const frame = img.getCurrentFrame(); canvas.drawImage(frame, 100, 50, paint); paint.delete(); redIF.delete(); redCF.delete(); blurIF.delete(); combined.delete(); frame.delete(); img.delete(); }, '/assets/flightAnim.gif'); gm('drawImage_skp', (canvas, fetchedByteBuffers) => { const pic = CanvasKit.MakeSkPicture(fetchedByteBuffers[0]); expect(pic).toBeTruthy(); canvas.clear(CanvasKit.TRANSPARENT); canvas.drawPicture(pic); }, '/assets/red_line.skp'); it('can draw once using drawOnce utility method', (done) => { const surface = CanvasKit.MakeCanvasSurface('test'); expect(surface).toBeTruthy('Could not make surface'); if (!surface) { done(); return; } const drawFrame = (canvas) => { const paint = new CanvasKit.SkPaint(); paint.setStrokeWidth(1.0); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); paint.setStyle(CanvasKit.PaintStyle.Stroke); const path = new CanvasKit.SkPath(); path.moveTo(20, 5); path.lineTo(30, 20); path.lineTo(40, 10); canvas.drawPath(path, paint); path.delete(); paint.delete(); // surface hasn't been flushed yet (nor should we call flush // ourselves), so reportSurface would likely be blank if we // were to call it. done(); } surface.drawOnce(drawFrame); // Reminder: drawOnce is async. In this test, we are just making // sure the drawOnce function is there and doesn't crash, so we can // just call done() when the frame is rendered. }); it('can draw client-supplied dirty rects', (done) => { // dirty rects are only honored by software (CPU) canvases today. const surface = CanvasKit.MakeSWCanvasSurface('test'); expect(surface).toBeTruthy('Could not make surface'); if (!surface) { done(); return; } const drawFrame = (canvas) => { const paint = new CanvasKit.SkPaint(); paint.setStrokeWidth(1.0); paint.setAntiAlias(true); paint.setColor(CanvasKit.Color(0, 0, 0, 1.0)); paint.setStyle(CanvasKit.PaintStyle.Stroke); const path = new CanvasKit.SkPath(); path.moveTo(20, 5); path.lineTo(30, 20); path.lineTo(40, 10); canvas.drawPath(path, paint); path.delete(); paint.delete(); done(); } const dirtyRect = CanvasKit.XYWHRect(10, 10, 15, 15); surface.drawOnce(drawFrame, dirtyRect); // We simply ensure that passing a dirty rect doesn't crash. }); it('can use DecodeCache APIs', () => { const initialLimit = CanvasKit.getDecodeCacheLimitBytes(); expect(initialLimit).toBeGreaterThan(1024 * 1024); const newLimit = 42 * 1024 * 1024; CanvasKit.setDecodeCacheLimitBytes(newLimit); expect(CanvasKit.getDecodeCacheLimitBytes()).toEqual(newLimit); // We cannot make any assumptions about this value, // so we just make sure it doesn't crash. CanvasKit.getDecodeCacheUsedBytes(); }); gm('combined_shaders', (canvas) => { const rShader = CanvasKit.SkShader.Color(CanvasKit.Color(255, 0, 0, 1.0)); const gShader = CanvasKit.SkShader.Color(CanvasKit.Color(0, 255, 0, 0.6)); const bShader = CanvasKit.SkShader.Color(CanvasKit.Color(0, 0, 255, 1.0)); const rgShader = CanvasKit.SkShader.Blend(CanvasKit.BlendMode.SrcOver, rShader, gShader); const p = new CanvasKit.SkPaint(); p.setShader(rgShader); canvas.drawPaint(p); const gbShader = CanvasKit.SkShader.Lerp(0.5, gShader, bShader); p.setShader(gbShader); canvas.drawRect(CanvasKit.LTRBRect(5, 100, 300, 400), p); rShader.delete(); gShader.delete(); bShader.delete(); rgShader.delete(); gbShader.delete(); p.delete(); }); it('exports consts correctly', () => { expect(CanvasKit.TRANSPARENT).toEqual(Float32Array.of(0, 0, 0, 0)); expect(CanvasKit.RED).toEqual(Float32Array.of(1, 0, 0, 1)); expect(CanvasKit.QUAD_VERB).toEqual(2); expect(CanvasKit.CONIC_VERB).toEqual(3); expect(CanvasKit.SaveLayerInitWithPrevious).toEqual(4); expect(CanvasKit.SaveLayerF16ColorType).toEqual(16); }); it('can set and get a 4f color on a paint', () => { const paint = new CanvasKit.SkPaint(); paint.setColor(CanvasKit.Color4f(3.3, 2.2, 1.1, 0.5)); expect(paint.getColor()).toEqual(Float32Array.of(3.3, 2.2, 1.1, 0.5)); }); gm('draw shadow', (canvas) => { const lightRadius = 30; const flags = 0; const lightPos = [250,150,300]; const zPlaneParams = [0,0,1]; const path = starPath(CanvasKit); canvas.drawShadow(path, zPlaneParams, lightPos, lightRadius, CanvasKit.RED, CanvasKit.MAGENTA, flags); }) describe('ColorSpace Support', () => { it('Can create an SRGB 8888 surface', () => { const colorSpace = CanvasKit.SkColorSpace.SRGB; const surface = CanvasKit.MakeCanvasSurface('test', CanvasKit.SkColorSpace.SRGB); expect(surface).toBeTruthy('Could not make surface'); let info = surface.imageInfo() expect(info.alphaType).toEqual(CanvasKit.AlphaType.Unpremul); expect(info.colorType).toEqual(CanvasKit.ColorType.RGBA_8888); expect(CanvasKit.SkColorSpace.Equals(info.colorSpace, colorSpace)) .toBeTruthy("Surface not created with correct color space."); const pixels = surface.getCanvas().readPixels(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, CanvasKit.AlphaType.Unpremul, CanvasKit.ColorType.RGBA_8888, colorSpace); expect(pixels).toBeTruthy('Could not read pixels from surface'); }); it('Can create a Display P3 surface', () => { const colorSpace = CanvasKit.SkColorSpace.DISPLAY_P3; const surface = CanvasKit.MakeCanvasSurface('test', CanvasKit.SkColorSpace.DISPLAY_P3); expect(surface).toBeTruthy('Could not make surface'); if (surface.reportBackendType() !== 'GPU') { console.log('Not expecting color space support in cpu backed suface.'); return; } let info = surface.imageInfo() expect(info.alphaType).toEqual(CanvasKit.AlphaType.Unpremul); expect(info.colorType).toEqual(CanvasKit.ColorType.RGBA_F16); expect(CanvasKit.SkColorSpace.Equals(info.colorSpace, colorSpace)) .toBeTruthy("Surface not created with correct color space."); const pixels = surface.getCanvas().readPixels(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, CanvasKit.AlphaType.Unpremul, CanvasKit.ColorType.RGBA_F16, colorSpace); expect(pixels).toBeTruthy('Could not read pixels from surface'); }); it('Can create an Adobe RGB surface', () => { const colorSpace = CanvasKit.SkColorSpace.ADOBE_RGB; const surface = CanvasKit.MakeCanvasSurface('test', CanvasKit.SkColorSpace.ADOBE_RGB); expect(surface).toBeTruthy('Could not make surface'); if (surface.reportBackendType() !== 'GPU') { console.log('Not expecting color space support in cpu backed suface.'); return; } let info = surface.imageInfo() expect(info.alphaType).toEqual(CanvasKit.AlphaType.Unpremul); expect(info.colorType).toEqual(CanvasKit.ColorType.RGBA_F16); expect(CanvasKit.SkColorSpace.Equals(info.colorSpace, colorSpace)) .toBeTruthy("Surface not created with correct color space."); const pixels = surface.getCanvas().readPixels(0, 0, CANVAS_WIDTH, CANVAS_HEIGHT, CanvasKit.AlphaType.Unpremul, CanvasKit.ColorType.RGBA_F16, colorSpace); expect(pixels).toBeTruthy('Could not read pixels from surface'); }); it('combine draws from several color spaces', () => { const surface = CanvasKit.MakeCanvasSurface('test', CanvasKit.SkColorSpace.ADOBE_RGB); expect(surface).toBeTruthy('Could not make surface'); if (surface.reportBackendType() !== 'GPU') { console.log('Not expecting color space support in cpu backed suface.'); return; } const canvas = surface.getCanvas(); let paint = new CanvasKit.SkPaint(); paint.setColor(CanvasKit.RED, CanvasKit.SkColorSpace.ADOBE_RGB); canvas.drawPaint(paint); paint.setColor(CanvasKit.RED, CanvasKit.SkColorSpace.DISPLAY_P3); // 93.7 in adobeRGB canvas.drawRect(CanvasKit.LTRBRect(200, 0, 400, 600), paint); paint.setColor(CanvasKit.RED, CanvasKit.SkColorSpace.SRGB); // 85.9 in adobeRGB canvas.drawRect(CanvasKit.LTRBRect(400, 0, 600, 600), paint); // this test paints three bands of red, each the maximum red that a color space supports. // They are each represented by skia by some color in the Adobe RGB space of the surface, // as floats between 0 and 1. // TODO(nifong) readpixels and verify correctness after f32 readpixels bug is fixed }); }); // end describe('ColorSpace Support') describe('DOMMatrix support', () => { gm('sweep_gradient_dommatrix', (canvas) => { const paint = new CanvasKit.SkPaint(); const shader = CanvasKit.SkShader.MakeSweepGradient( 100, 100, // x y coordinates [CanvasKit.GREEN, CanvasKit.BLUE], [0.0, 1.0], CanvasKit.TileMode.Clamp, new DOMMatrix().translate(-10, 100), ); expect(shader).toBeTruthy('Could not make shader'); if (!shader) { return; } paint.setShader(shader); canvas.drawPaint(paint); paint.delete(); shader.delete(); }); const radiansToDegrees = (rad) => { return (rad / Math.PI) * 180; } // this should draw the same as concat_with4x4_canvas gm('concat_dommatrix', (canvas) => { const path = starPath(CanvasKit, CANVAS_WIDTH/2, CANVAS_HEIGHT/2); const paint = new CanvasKit.SkPaint(); paint.setAntiAlias(true); canvas.clear(CanvasKit.WHITE); canvas.concat(new DOMMatrix().translate(CANVAS_WIDTH/2, 0, 0)); canvas.concat(new DOMMatrix().rotateAxisAngle(1, 0, 0, radiansToDegrees(Math.PI/3))); canvas.concat(new DOMMatrix().rotateAxisAngle(0, 1, 0, radiansToDegrees(Math.PI/4))); canvas.concat(new DOMMatrix().rotateAxisAngle(0, 0, 1, radiansToDegrees(Math.PI/16))); canvas.concat(new DOMMatrix().translate(-CANVAS_WIDTH/2, 0, 0)); // Draw some stripes to help the eye detect the turn const stripeWidth = 10; paint.setColor(CanvasKit.BLACK); for (let i = 0; i < CANVAS_WIDTH; i += 2*stripeWidth) { canvas.drawRect(CanvasKit.LTRBRect(i, 0, i + stripeWidth, CANVAS_HEIGHT), paint); } paint.setColor(CanvasKit.YELLOW); canvas.drawPath(path, paint); paint.delete(); path.delete(); }); }); // end describe('DOMMatrix support') });
/* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ "use strict"; const formatLocation = require("../formatLocation"); const { LogType } = require("../logging/Logger"); const AggressiveSplittingPlugin = require("../optimize/AggressiveSplittingPlugin"); const ConcatenatedModule = require("../optimize/ConcatenatedModule"); const SizeLimitsPlugin = require("../performance/SizeLimitsPlugin"); const { compareLocations, compareChunksById, compareNumbers, compareIds, concatComparators, compareSelect, compareModulesByIdentifier } = require("../util/comparators"); const identifierUtils = require("../util/identifier"); /** @typedef {import("webpack-sources").Source} Source */ /** @typedef {import("../Chunk")} Chunk */ /** @typedef {import("../ChunkGroup")} ChunkGroup */ /** @typedef {import("../ChunkGroup").OriginRecord} OriginRecord */ /** @typedef {import("../Compilation")} Compilation */ /** @typedef {import("../Compilation").Asset} Asset */ /** @typedef {import("../Compiler")} Compiler */ /** @typedef {import("../Dependency")} Dependency */ /** @typedef {import("../Dependency").DependencyLocation} DependencyLocation */ /** @typedef {import("../Module")} Module */ /** @typedef {import("../ModuleGraphConnection")} ModuleGraphConnection */ /** @typedef {import("../ModuleProfile")} ModuleProfile */ /** @typedef {import("../RequestShortener")} RequestShortener */ /** @typedef {import("../WebpackError")} WebpackError */ /** @template T @typedef {import("../util/comparators").Comparator<T>} Comparator<T> */ /** @typedef {import("./StatsFactory")} StatsFactory */ /** * @typedef {Object} UsualContext * @property {string} type * @property {Compilation} compilation * @property {Map<string,Chunk[]>} compilationFileToChunks * @property {Map<string,Chunk[]>} compilationAuxiliaryFileToChunks * @property {number} startTime * @property {number} endTime */ /** * @typedef {Object} UsualOptions * @property {string} context * @property {RequestShortener} requestShortener * @property {string} chunksSort * @property {string} modulesSort * @property {string} chunkRootModulesSort * @property {string} chunkModulesSort * @property {string} nestedModulesSort * @property {string} assetsSort * @property {Function[]} excludeAssets * @property {Function[]} excludeModules * @property {Function[]} warningsFilter * @property {number} maxModules * @property {false|"none"|"error"|"warn"|"info"|"log"|"verbose"} logging * @property {Function[]} loggingDebug * @property {boolean} loggingTrace * @property {any} _env */ /** @template T @typedef {Record<string, (object: Object, data: T, context: UsualContext, options: UsualOptions, factory: StatsFactory) => void>} ExtractorsByOption */ /** * @typedef {Object} SimpleExtractors * @property {ExtractorsByOption<Compilation>} compilation * @property {ExtractorsByOption<Asset>} asset * @property {ExtractorsByOption<{ name: string, chunkGroup: ChunkGroup }>} chunkGroup * @property {ExtractorsByOption<Module>} module * @property {ExtractorsByOption<Module>} moduleIssuer * @property {ExtractorsByOption<ModuleProfile>} profile * @property {ExtractorsByOption<ModuleGraphConnection>} moduleReason * @property {ExtractorsByOption<Chunk>} chunk * @property {ExtractorsByOption<OriginRecord>} chunkOrigin * @property {ExtractorsByOption<WebpackError>} error * @property {ExtractorsByOption<WebpackError>} warning * @property {ExtractorsByOption<{ origin: Module, module: Module }>} moduleTraceItem * @property {ExtractorsByOption<Dependency>} moduleTraceDependency */ /** * @template T * @template I * @param {Iterable<T>} items items to select from * @param {function(T): Iterable<I>} selector selector function to select values from item * @returns {I[]} array of values */ const uniqueArray = (items, selector) => { /** @type {Set<I>} */ const set = new Set(); for (const item of items) { for (const i of selector(item)) { set.add(i); } } return Array.from(set); }; /** * @template T * @template I * @param {Iterable<T>} items items to select from * @param {function(T): Iterable<I>} selector selector function to select values from item * @param {Comparator<I>} comparator comparator function * @returns {I[]} array of values */ const uniqueOrderedArray = (items, selector, comparator) => { return uniqueArray(items, selector).sort(comparator); }; /** @template T @template R @typedef {{ [P in keyof T]: R }} MappedValues<T, R> */ /** * @template T * @template R * @param {T} obj object to be mapped * @param {function(T[keyof T], keyof T): R} fn mapping function * @returns {MappedValues<T, R>} mapped object */ const mapObject = (obj, fn) => { const newObj = Object.create(null); for (const key of Object.keys(obj)) { newObj[key] = fn(obj[key], /** @type {keyof T} */ (key)); } return newObj; }; /** * @template T * @param {Iterable<T>} iterable an iterable * @returns {number} count of items */ const countIterable = iterable => { let i = 0; // eslint-disable-next-line no-unused-vars for (const _ of iterable) i++; return i; }; /** @type {ExtractorsByOption<WebpackError | string>} */ const EXTRACT_ERROR = { _: (object, error, context, { requestShortener }) => { // TODO webpack 6 disallow strings in the errors/warnings list if (typeof error === "string") { object.message = error; } else { if (error.chunk) { object.chunkName = error.chunk.name; object.chunkEntry = error.chunk.hasRuntime(); object.chunkInitial = error.chunk.canBeInitial(); } if (error.file) { object.file = error.file; } if (error.module) { object.moduleIdentifier = error.module.identifier(); object.moduleName = error.module.readableIdentifier(requestShortener); } if (error.loc) { object.loc = formatLocation(error.loc); } object.message = error.message; } }, ids: (object, error, { compilation: { chunkGraph } }) => { if (typeof error !== "string") { if (error.chunk) { object.chunkId = error.chunk.id; } if (error.module) { object.moduleId = chunkGraph.getModuleId(error.module); } } }, moduleTrace: (object, error, context, options, factory) => { if (typeof error !== "string" && error.module) { const { type, compilation: { moduleGraph } } = context; /** @type {Set<Module>} */ const visitedModules = new Set(); const moduleTrace = []; let current = error.module; while (current) { if (visitedModules.has(current)) break; // circular (technically impossible, but how knows) visitedModules.add(current); const origin = moduleGraph.getIssuer(current); if (!origin) break; moduleTrace.push({ origin, module: current }); current = origin; } object.moduleTrace = factory.create( `${type}.moduleTrace`, moduleTrace, context ); } }, errorDetails: (object, error) => { if (typeof error !== "string") { object.details = error.details; } }, errorStack: (object, error) => { if (typeof error !== "string") { object.stack = error.stack; } } }; /** @type {SimpleExtractors} */ const SIMPLE_EXTRACTORS = { compilation: { _: (object, compilation) => { if (compilation.name) { object.name = compilation.name; } if (compilation.needAdditionalPass) { object.needAdditionalPass = true; } }, hash: (object, compilation) => { object.hash = compilation.hash; }, version: object => { object.version = require("../../package.json").version; }, env: (object, compilation, context, { _env }) => { object.env = _env; }, timings: (object, compilation, { startTime, endTime }) => { object.time = endTime - startTime; }, builtAt: (object, compilation, { endTime }) => { object.builtAt = endTime; }, publicPath: (object, compilation) => { object.publicPath = compilation.getPath( compilation.outputOptions.publicPath ); }, outputPath: (object, compilation) => { object.outputPath = compilation.outputOptions.path; }, assets: (object, compilation, context, options, factory) => { const { type } = context; const array = compilation.getAssets(); /** @type {Map<string, Chunk[]>} */ const compilationFileToChunks = new Map(); /** @type {Map<string, Chunk[]>} */ const compilationAuxiliaryFileToChunks = new Map(); for (const chunk of compilation.chunks) { for (const file of chunk.files) { let array = compilationFileToChunks.get(file); if (array === undefined) { array = []; compilationFileToChunks.set(file, array); } array.push(chunk); } for (const file of chunk.auxiliaryFiles) { let array = compilationAuxiliaryFileToChunks.get(file); if (array === undefined) { array = []; compilationAuxiliaryFileToChunks.set(file, array); } array.push(chunk); } } object.assets = factory.create(`${type}.assets`, array, { ...context, compilationFileToChunks, compilationAuxiliaryFileToChunks }); object.filteredAssets = array.length - object.assets.length; object.assetsByChunkName = {}; for (const asset of object.assets) { for (const name of asset.chunkNames) { if ( !Object.prototype.hasOwnProperty.call( object.assetsByChunkName, name ) ) { object.assetsByChunkName[name] = []; } object.assetsByChunkName[name].push(asset.name); } } }, chunks: (object, compilation, context, options, factory) => { const { type } = context; object.chunks = factory.create( `${type}.chunks`, Array.from(compilation.chunks), context ); }, modules: (object, compilation, context, options, factory) => { const { type } = context; const array = Array.from(compilation.modules); object.modules = factory.create(`${type}.modules`, array, context); object.filteredModules = array.length - object.modules.length; }, entrypoints: (object, compilation, context, options, factory) => { const { type } = context; const array = Array.from(compilation.entrypoints, ([key, value]) => ({ name: key, chunkGroup: value })); object.entrypoints = factory.create( `${type}.entrypoints`, array, context ); }, chunkGroups: (object, compilation, context, options, factory) => { const { type } = context; const array = Array.from( compilation.namedChunkGroups, ([key, value]) => ({ name: key, chunkGroup: value }) ); object.namedChunkGroups = factory.create( `${type}.namedChunkGroups`, array, context ); }, errors: (object, compilation, context, options, factory) => { const { type } = context; object.errors = factory.create( `${type}.errors`, compilation.errors, context ); }, warnings: (object, compilation, context, options, factory) => { const { type } = context; object.warnings = factory.create( `${type}.warnings`, compilation.warnings, context ); }, logging: (object, compilation, _context, options, factory) => { const util = require("util"); const { loggingDebug, loggingTrace, context } = options; object.logging = {}; let acceptedTypes; let collapsedGroups = false; switch (options.logging) { case "none": acceptedTypes = new Set([]); break; case "error": acceptedTypes = new Set([LogType.error]); break; case "warn": acceptedTypes = new Set([LogType.error, LogType.warn]); break; case "info": acceptedTypes = new Set([LogType.error, LogType.warn, LogType.info]); break; case "log": acceptedTypes = new Set([ LogType.error, LogType.warn, LogType.info, LogType.log, LogType.group, LogType.groupEnd, LogType.groupCollapsed, LogType.clear ]); break; case "verbose": acceptedTypes = new Set([ LogType.error, LogType.warn, LogType.info, LogType.log, LogType.group, LogType.groupEnd, LogType.groupCollapsed, LogType.profile, LogType.profileEnd, LogType.time, LogType.status, LogType.clear ]); collapsedGroups = true; break; } const makePathsRelative = identifierUtils.makePathsRelative.bindContextCache( context, compilation.compiler.root ); let depthInCollapsedGroup = 0; for (const [origin, logEntries] of compilation.logging) { const debugMode = loggingDebug.some(fn => fn(origin)); const groupStack = []; const rootList = []; let currentList = rootList; let processedLogEntries = 0; for (const entry of logEntries) { let type = entry.type; if (!debugMode && !acceptedTypes.has(type)) continue; // Expand groups in verbose and debug modes if (type === LogType.groupCollapsed && (debugMode || collapsedGroups)) type = LogType.group; if (depthInCollapsedGroup === 0) { processedLogEntries++; } if (type === LogType.groupEnd) { groupStack.pop(); if (groupStack.length > 0) { currentList = groupStack[groupStack.length - 1].children; } else { currentList = rootList; } if (depthInCollapsedGroup > 0) depthInCollapsedGroup--; continue; } let message = undefined; if (entry.type === LogType.time) { message = `${entry.args[0]}: ${ entry.args[1] * 1000 + entry.args[2] / 1000000 } ms`; } else if (entry.args && entry.args.length > 0) { message = util.format(entry.args[0], ...entry.args.slice(1)); } const newEntry = { ...entry, type, message, trace: loggingTrace ? entry.trace : undefined, children: type === LogType.group || type === LogType.groupCollapsed ? [] : undefined }; currentList.push(newEntry); if (newEntry.children) { groupStack.push(newEntry); currentList = newEntry.children; if (depthInCollapsedGroup > 0) { depthInCollapsedGroup++; } else if (type === LogType.groupCollapsed) { depthInCollapsedGroup = 1; } } } let name = makePathsRelative(origin).replace(/\|/g, " "); if (name in object.logging) { let i = 1; while (`${name}#${i}` in object.logging) { i++; } name = `${name}#${i}`; } object.logging[name] = { entries: rootList, filteredEntries: logEntries.length - processedLogEntries, debug: debugMode }; } }, children: (object, compilation, context, options, factory) => { const { type } = context; object.children = factory.create( `${type}.children`, compilation.children, context ); } }, asset: { _: ( object, asset, { compilation, compilationFileToChunks, compilationAuxiliaryFileToChunks } ) => { object.name = asset.name; object.size = asset.source.size(); const chunks = compilationFileToChunks.get(asset.name) || []; const auxiliaryChunks = compilationAuxiliaryFileToChunks.get(asset.name) || []; object.chunkNames = uniqueOrderedArray( chunks, c => (c.name ? [c.name] : []), compareIds ); object.chunkIdHints = uniqueOrderedArray( chunks, c => Array.from(c.idNameHints), compareIds ); object.auxiliaryChunkNames = uniqueOrderedArray( auxiliaryChunks, c => (c.name ? [c.name] : []), compareIds ); object.auxiliaryChunkIdHints = uniqueOrderedArray( auxiliaryChunks, c => Array.from(c.idNameHints), compareIds ); object.emitted = compilation.emittedAssets.has(asset.name); object.comparedForEmit = compilation.comparedForEmitAssets.has( asset.name ); object.info = asset.info; }, ids: ( object, asset, { compilationFileToChunks, compilationAuxiliaryFileToChunks } ) => { const chunks = compilationFileToChunks.get(asset.name) || []; const auxiliaryChunks = compilationAuxiliaryFileToChunks.get(asset.name) || []; object.chunks = uniqueOrderedArray(chunks, c => c.ids, compareIds); object.auxiliaryChunks = uniqueOrderedArray( auxiliaryChunks, c => c.ids, compareIds ); }, performance: (object, asset) => { object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(asset.source); } }, chunkGroup: { _: ( object, { name, chunkGroup }, { compilation: { moduleGraph, chunkGraph } } ) => { const children = chunkGroup.getChildrenByOrders(moduleGraph, chunkGraph); Object.assign(object, { name, chunks: chunkGroup.chunks.map(c => c.id), assets: uniqueArray(chunkGroup.chunks, c => c.files), auxiliaryAssets: uniqueOrderedArray( chunkGroup.chunks, c => c.auxiliaryFiles, compareIds ), children: mapObject(children, groups => groups.map(group => ({ name: group.name, chunks: group.chunks.map(c => c.id), assets: uniqueArray(group.chunks, c => c.files), auxiliaryAssets: uniqueOrderedArray( group.chunks, c => c.auxiliaryFiles, compareIds ) })) ), childAssets: mapObject(children, groups => { /** @type {Set<string>} */ const set = new Set(); for (const group of groups) { for (const chunk of group.chunks) { for (const asset of chunk.files) { set.add(asset); } } } return Array.from(set); }) }); }, performance: (object, { chunkGroup }) => { object.isOverSizeLimit = SizeLimitsPlugin.isOverSizeLimit(chunkGroup); } }, module: { _: (object, module, context, { requestShortener }, factory) => { const { compilation, type } = context; const { moduleGraph } = compilation; /** @type {Module[]} */ const path = []; const issuer = moduleGraph.getIssuer(module); let current = issuer; while (current) { path.push(current); current = moduleGraph.getIssuer(current); } path.reverse(); const profile = moduleGraph.getProfile(module); const errors = module.getErrors(); const errorsCount = errors !== undefined ? countIterable(errors) : 0; const warnings = module.getWarnings(); const warningsCount = warnings !== undefined ? countIterable(warnings) : 0; const sizes = {}; for (const sourceType of module.getSourceTypes()) { sizes[sourceType] = module.size(sourceType); } Object.assign(object, { identifier: module.identifier(), name: module.readableIdentifier(requestShortener), index: moduleGraph.getPreOrderIndex(module), preOrderIndex: moduleGraph.getPreOrderIndex(module), index2: moduleGraph.getPostOrderIndex(module), postOrderIndex: moduleGraph.getPostOrderIndex(module), size: module.size(), sizes, cacheable: module.buildInfo.cacheable, built: compilation.builtModules.has(module), optional: module.isOptional(moduleGraph), runtime: module.type === "runtime", issuer: issuer && issuer.identifier(), issuerName: issuer && issuer.readableIdentifier(requestShortener), issuerPath: issuer && factory.create(`${type}.issuerPath`, path, context), failed: errorsCount > 0, errors: errorsCount, warnings: warningsCount }); if (profile) { object.profile = factory.create(`${type}.profile`, profile, context); } }, ids: (object, module, { compilation: { chunkGraph, moduleGraph } }) => { object.id = chunkGraph.getModuleId(module); const issuer = moduleGraph.getIssuer(module); object.issuerId = issuer && chunkGraph.getModuleId(issuer); object.chunks = Array.from( chunkGraph.getOrderedModuleChunksIterable(module, compareChunksById), chunk => chunk.id ); }, orphanModules: (object, module, { compilation, type }) => { if (!type.endsWith("module.modules[].module")) { object.orphan = compilation.chunkGraph.getNumberOfModuleChunks(module) === 0; } }, moduleAssets: (object, module) => { object.assets = module.buildInfo.assets ? Object.keys(module.buildInfo.assets) : []; }, reasons: (object, module, context, options, factory) => { const { type, compilation: { moduleGraph } } = context; object.reasons = factory.create( `${type}.reasons`, Array.from(moduleGraph.getIncomingConnections(module)), context ); }, usedExports: (object, module, { compilation: { moduleGraph } }) => { const usedExports = moduleGraph.getUsedExports(module); if (usedExports === null) { object.usedExports = null; } else if (typeof usedExports === "boolean") { object.usedExports = usedExports; } else { object.usedExports = Array.from(usedExports); } }, providedExports: (object, module, { compilation: { moduleGraph } }) => { const providedExports = moduleGraph.getProvidedExports(module); object.providedExports = Array.isArray(providedExports) ? providedExports : null; }, optimizationBailout: ( object, module, { compilation: { moduleGraph } }, { requestShortener } ) => { object.optimizationBailout = moduleGraph .getOptimizationBailout(module) .map(item => { if (typeof item === "function") return item(requestShortener); return item; }); }, depth: (object, module, { compilation: { moduleGraph } }) => { object.depth = moduleGraph.getDepth(module); }, nestedModules: (object, module, context, options, factory) => { const { type } = context; if (module instanceof ConcatenatedModule) { const modules = module.modules; object.modules = factory.create(`${type}.modules`, modules, context); object.filteredModules = modules.length - object.modules.length; } }, source: (object, module) => { const originalSource = module.originalSource(); if (originalSource) { object.source = originalSource.source(); } } }, profile: { _: (object, profile) => { Object.assign(object, { total: profile.factory + profile.restoring + profile.integration + profile.building + profile.storing, resolving: profile.factory, restoring: profile.restoring, building: profile.building, integration: profile.integration, storing: profile.storing, additionalResolving: profile.additionalFactories, additionalIntegration: profile.additionalIntegration, // TODO remove this in webpack 6 factory: profile.factory, // TODO remove this in webpack 6 dependencies: profile.additionalFactories }); } }, moduleIssuer: { _: (object, module, context, { requestShortener }, factory) => { const { compilation, type } = context; const { moduleGraph } = compilation; const profile = moduleGraph.getProfile(module); Object.assign(object, { identifier: module.identifier(), name: module.readableIdentifier(requestShortener) }); if (profile) { object.profile = factory.create(`${type}.profile`, profile, context); } }, ids: (object, module, { compilation: { chunkGraph } }) => { object.id = chunkGraph.getModuleId(module); } }, moduleReason: { _: (object, reason, context, { requestShortener }) => { const depAsAny = /** @type {TODO} */ (reason.dependency); Object.assign(object, { moduleIdentifier: reason.originModule ? reason.originModule.identifier() : null, module: reason.originModule ? reason.originModule.readableIdentifier(requestShortener) : null, moduleName: reason.originModule ? reason.originModule.readableIdentifier(requestShortener) : null, resolvedModuleIdentifier: reason.resolvedOriginModule ? reason.resolvedOriginModule.identifier() : null, resolvedModule: reason.resolvedOriginModule ? reason.resolvedOriginModule.readableIdentifier(requestShortener) : null, type: reason.dependency ? reason.dependency.type : null, active: reason.active, explanation: reason.explanation, userRequest: depAsAny && "userRequest" in depAsAny ? depAsAny.userRequest : null }); if (reason.dependency) { const locInfo = formatLocation(reason.dependency.loc); if (locInfo) { object.loc = locInfo; } } }, ids: (object, reason, { compilation: { chunkGraph } }) => { object.moduleId = reason.originModule ? chunkGraph.getModuleId(reason.originModule) : null; object.resolvedModuleId = reason.resolvedOriginModule ? chunkGraph.getModuleId(reason.resolvedOriginModule) : null; } }, chunk: { _: (object, chunk, { compilation: { chunkGraph } }) => { const childIdByOrder = chunk.getChildIdsByOrders(chunkGraph); Object.assign(object, { rendered: chunk.rendered, initial: chunk.canBeInitial(), entry: chunk.hasRuntime(), recorded: AggressiveSplittingPlugin.wasChunkRecorded(chunk), reason: chunk.chunkReason, size: chunkGraph.getChunkModulesSize(chunk), sizes: chunkGraph.getChunkModulesSizes(chunk), names: chunk.name ? [chunk.name] : [], idHints: Array.from(chunk.idNameHints), files: Array.from(chunk.files), auxiliaryFiles: Array.from(chunk.auxiliaryFiles).sort(compareIds), hash: chunk.renderedHash, childrenByOrder: childIdByOrder }); }, ids: (object, chunk) => { object.id = chunk.id; }, chunkRelations: (object, chunk, { compilation: { chunkGraph } }) => { /** @type {Set<string|number>} */ const parents = new Set(); /** @type {Set<string|number>} */ const children = new Set(); /** @type {Set<string|number>} */ const siblings = new Set(); for (const chunkGroup of chunk.groupsIterable) { for (const parentGroup of chunkGroup.parentsIterable) { for (const chunk of parentGroup.chunks) { parents.add(chunk.id); } } for (const childGroup of chunkGroup.childrenIterable) { for (const chunk of childGroup.chunks) { children.add(chunk.id); } } for (const sibling of chunkGroup.chunks) { if (sibling !== chunk) siblings.add(sibling.id); } } object.siblings = Array.from(siblings).sort(compareIds); object.parents = Array.from(parents).sort(compareIds); object.children = Array.from(children).sort(compareIds); }, chunkModules: (object, chunk, context, options, factory) => { const { type, compilation: { chunkGraph } } = context; const array = chunkGraph.getChunkModules(chunk); object.modules = factory.create(`${type}.modules`, array, context); object.filteredModules = array.length - object.modules.length; }, chunkRootModules: (object, chunk, context, options, factory) => { const { type, compilation: { chunkGraph } } = context; const array = chunkGraph.getChunkRootModules(chunk); object.rootModules = factory.create( `${type}.rootModules`, array, context ); object.filteredRootModules = array.length - object.rootModules.length; object.nonRootModules = chunkGraph.getNumberOfChunkModules(chunk) - array.length; }, chunkOrigins: (object, chunk, context, options, factory) => { const { type, compilation: { chunkGraph } } = context; /** @type {Set<string>} */ const originsKeySet = new Set(); const origins = []; for (const g of chunk.groupsIterable) { origins.push(...g.origins); } const array = origins.filter(origin => { const key = [ origin.module ? chunkGraph.getModuleId(origin.module) : undefined, formatLocation(origin.loc), origin.request ].join(); if (originsKeySet.has(key)) return false; originsKeySet.add(key); return true; }); object.origins = factory.create(`${type}.origins`, array, context); } }, chunkOrigin: { _: (object, origin, context, { requestShortener }) => { Object.assign(object, { module: origin.module ? origin.module.identifier() : "", moduleIdentifier: origin.module ? origin.module.identifier() : "", moduleName: origin.module ? origin.module.readableIdentifier(requestShortener) : "", loc: formatLocation(origin.loc), request: origin.request }); }, ids: (object, origin, { compilation: { chunkGraph } }) => { object.moduleId = origin.module ? chunkGraph.getModuleId(origin.module) : undefined; } }, error: EXTRACT_ERROR, warning: EXTRACT_ERROR, moduleTraceItem: { _: (object, { origin, module }, context, { requestShortener }, factory) => { const { type, compilation: { moduleGraph } } = context; object.originIdentifier = origin.identifier(); object.originName = origin.readableIdentifier(requestShortener); object.moduleIdentifier = module.identifier(); object.moduleName = module.readableIdentifier(requestShortener); const dependencies = Array.from( moduleGraph.getIncomingConnections(module) ) .filter(c => c.resolvedOriginModule === origin && c.dependency) .map(c => c.dependency); object.dependencies = factory.create( `${type}.dependencies`, dependencies, context ); }, ids: (object, { origin, module }, { compilation: { chunkGraph } }) => { object.originId = chunkGraph.getModuleId(origin); object.moduleId = chunkGraph.getModuleId(module); } }, moduleTraceDependency: { _: (object, dependency) => { object.loc = formatLocation(dependency.loc); } } }; const EXCLUDE_MODULES_FILTER = type => ( module, context, { excludeModules, requestShortener } ) => { const name = module.nameForCondition(); if (!name) return; const ident = requestShortener.shorten(name); const excluded = excludeModules.some(fn => fn(ident, module, type)); if (excluded) return false; }; /** @type {Record<string, (module: Module, context: UsualContext) => boolean | undefined>} */ const BASE_MODULES_FILTER = { "!cached": (module, { compilation }) => { if (!compilation.builtModules.has(module)) return false; }, "!runtime": module => { if (module.type === "runtime") return false; } }; /** @type {Record<string, Record<string, (thing: any, context: UsualContext, options: UsualOptions) => boolean | undefined>>} */ const FILTER = { "compilation.assets": { excludeAssets: (asset, context, { excludeAssets }) => { const ident = asset.name; const excluded = excludeAssets.some(fn => fn(ident, asset)); if (excluded) return false; }, "!cachedAssets": (asset, { compilation }) => { if ( !compilation.emittedAssets.has(asset.name) && !compilation.comparedForEmitAssets.has(asset.name) ) { return false; } } }, "compilation.modules": { excludeModules: EXCLUDE_MODULES_FILTER("module"), "!orphanModules": (module, { compilation: { chunkGraph } }) => { if (chunkGraph.getNumberOfModuleChunks(module) === 0) return false; }, ...BASE_MODULES_FILTER }, "module.modules": { excludeModules: EXCLUDE_MODULES_FILTER("nested"), ...BASE_MODULES_FILTER }, "chunk.modules": { excludeModules: EXCLUDE_MODULES_FILTER("chunk"), ...BASE_MODULES_FILTER }, "chunk.rootModules": { excludeModules: EXCLUDE_MODULES_FILTER("root-of-chunk"), ...BASE_MODULES_FILTER } }; /** @type {Record<string, (module: Module, context: UsualContext, options: UsualOptions, idx: number, i: number) => boolean | undefined>} */ const FILTER_SORTED_MODULES = { maxModules: (module, context, { maxModules }, idx, i) => { if (i >= maxModules) return false; } }; /** @type {Record<string, Record<string, (thing: any, context: UsualContext, options: UsualOptions, idx: number, i: number) => boolean | undefined>>} */ const FILTER_SORTED = { "compilation.modules": FILTER_SORTED_MODULES, "modules.modules": FILTER_SORTED_MODULES, "chunk.modules": FILTER_SORTED_MODULES, "chunk.rootModules": FILTER_SORTED_MODULES }; /** @type {Record<string, Record<string, (thing: Object, context: UsualContext, options: UsualOptions) => boolean | undefined>>} */ const FILTER_RESULTS = { "compilation.warnings": { warningsFilter: (warning, context, { warningsFilter }) => { const warningString = Object.keys(warning) .map(key => `${warning[key]}`) .join("\n"); return !warningsFilter.some(filter => filter(warning, warningString)); } } }; /** @type {Record<string, (comparators: Function[], context: UsualContext) => void>} */ const MODULES_SORTER = { _: (comparators, { compilation: { moduleGraph } }) => { comparators.push( compareSelect( /** * @param {Module} m module * @returns {number} depth */ m => moduleGraph.getDepth(m), compareNumbers ), compareSelect( /** * @param {Module} m module * @returns {number} index */ m => moduleGraph.getPreOrderIndex(m), compareNumbers ), compareSelect( /** * @param {Module} m module * @returns {string} identifier */ m => m.identifier(), compareIds ) ); } }; /** @type {Record<string, Record<string, (comparators: Function[], context: UsualContext) => void>>} */ const SORTERS = { "compilation.chunks": { _: comparators => { comparators.push(compareSelect(c => c.id, compareIds)); } }, "compilation.modules": MODULES_SORTER, "chunk.rootModules": MODULES_SORTER, "chunk.modules": MODULES_SORTER, "module.reasons": { _: (comparators, { compilation: { chunkGraph } }) => { comparators.push( compareSelect(x => x.originModule, compareModulesByIdentifier) ); comparators.push( compareSelect(x => x.resolvedOriginModule, compareModulesByIdentifier) ); comparators.push( compareSelect( x => x.dependency, concatComparators( compareSelect( /** * @param {Dependency} x dependency * @returns {DependencyLocation} location */ x => x.loc, compareLocations ), compareSelect(x => x.type, compareIds) ) ) ); } }, "chunk.origins": { _: (comparators, { compilation: { chunkGraph } }) => { comparators.push( compareSelect( origin => origin.module ? chunkGraph.getModuleId(origin.module) : undefined, compareIds ), compareSelect(origin => formatLocation(origin.loc), compareIds), compareSelect(origin => origin.request, compareIds) ); } } }; // remove a prefixed "!" that can be specified to reverse sort order const normalizeFieldKey = field => { if (field[0] === "!") { return field.substr(1); } return field; }; // if a field is prefixed by a "!" reverse sort order const sortOrderRegular = field => { if (field[0] === "!") { return false; } return true; }; /** * @param {string} field field name * @returns {function(Object, Object): number} comparators */ const sortByField = field => { if (!field) { /** * @param {any} a first * @param {any} b second * @returns {-1|0|1} zero */ const noSort = (a, b) => 0; return noSort; } const fieldKey = normalizeFieldKey(field); let sortFn = compareSelect(m => m[fieldKey], compareIds); // if a field is prefixed with a "!" the sort is reversed! const sortIsRegular = sortOrderRegular(field); if (!sortIsRegular) { const oldSortFn = sortFn; sortFn = (a, b) => oldSortFn(b, a); } return sortFn; }; /** @type {Record<string, Record<string, (comparators: Function[], context: UsualContext, options: UsualOptions) => void>>} */ const RESULT_SORTERS = { "compilation.chunks": { chunksSort: (comparators, context, { chunksSort }) => { comparators.push(sortByField(chunksSort)); } }, "compilation.modules": { modulesSort: (comparators, context, { modulesSort }) => { comparators.push(sortByField(modulesSort)); } }, "chunk.rootModules": { chunkRootModulesSort: (comparators, context, { chunkRootModulesSort }) => { comparators.push(sortByField(chunkRootModulesSort)); } }, "chunk.modules": { chunkModulesSort: (comparators, context, { chunkModulesSort }) => { comparators.push(sortByField(chunkModulesSort)); } }, "module.modules": { nestedModulesSort: (comparators, context, { nestedModulesSort }) => { comparators.push(sortByField(nestedModulesSort)); } }, "compilation.assets": { assetsSort: (comparators, context, { assetsSort }) => { comparators.push(sortByField(assetsSort)); }, _: comparators => { comparators.push(compareSelect(a => a.name, compareIds)); } } }; /** * @param {Record<string, Record<string, Function>>} config the config see above * @param {UsualOptions} options stats options * @param {function(string, Function): void} fn handler function called for every active line in config * @returns {void} */ const iterateConfig = (config, options, fn) => { for (const hookFor of Object.keys(config)) { const subConfig = config[hookFor]; for (const option of Object.keys(subConfig)) { if (option !== "_") { if (option.startsWith("!")) { if (options[option.slice(1)]) continue; } else { const value = options[option]; if ( value === false || value === undefined || (Array.isArray(value) && value.length === 0) ) continue; } } fn(hookFor, subConfig[option]); } } }; /** @type {Record<string, string>} */ const ITEM_NAMES = { "compilation.children[]": "compilation", "compilation.modules[]": "module", "compilation.entrypoints[]": "chunkGroup", "compilation.namedChunkGroups[]": "chunkGroup", "compilation.errors[]": "error", "compilation.warnings[]": "warning", "chunk.modules[]": "module", "chunk.rootModules[]": "module", "chunk.origins[]": "chunkOrigin", "compilation.chunks[]": "chunk", "compilation.assets[]": "asset", "module.issuerPath[]": "moduleIssuer", "module.reasons[]": "moduleReason", "module.modules[]": "module", "moduleTrace[]": "moduleTraceItem", "moduleTraceItem.dependencies[]": "moduleTraceDependency" }; /** * @param {Object[]} items items to be merged * @returns {Object} an object */ const mergeToObject = items => { const obj = Object.create(null); for (const item of items) { obj[item.name] = item; } return obj; }; /** @type {Record<string, (items: Object[]) => any>} */ const MERGER = { "compilation.entrypoints": mergeToObject, "compilation.namedChunkGroups": mergeToObject }; class DefaultStatsFactoryPlugin { /** * @param {Compiler} compiler webpack compiler * @returns {void} */ apply(compiler) { compiler.hooks.compilation.tap("DefaultStatsFactoryPlugin", compilation => { compilation.hooks.statsFactory.tap( "DefaultStatsFactoryPlugin", (stats, options, context) => { iterateConfig(SIMPLE_EXTRACTORS, options, (hookFor, fn) => { stats.hooks.extract .for(hookFor) .tap("DefaultStatsFactoryPlugin", (obj, data, ctx) => fn(obj, data, ctx, options, stats) ); }); iterateConfig(FILTER, options, (hookFor, fn) => { stats.hooks.filter .for(hookFor) .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => fn(item, ctx, options, idx, i) ); }); iterateConfig(FILTER_SORTED, options, (hookFor, fn) => { stats.hooks.filterSorted .for(hookFor) .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => fn(item, ctx, options, idx, i) ); }); iterateConfig(FILTER_RESULTS, options, (hookFor, fn) => { stats.hooks.filterResults .for(hookFor) .tap("DefaultStatsFactoryPlugin", (item, ctx, idx, i) => fn(item, ctx, options, idx, i) ); }); iterateConfig(SORTERS, options, (hookFor, fn) => { stats.hooks.sort .for(hookFor) .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => fn(comparators, ctx, options) ); }); iterateConfig(RESULT_SORTERS, options, (hookFor, fn) => { stats.hooks.sortResults .for(hookFor) .tap("DefaultStatsFactoryPlugin", (comparators, ctx) => fn(comparators, ctx, options) ); }); for (const key of Object.keys(ITEM_NAMES)) { const itemName = ITEM_NAMES[key]; stats.hooks.getItemName .for(key) .tap("DefaultStatsFactoryPlugin", () => itemName); } for (const key of Object.keys(MERGER)) { const merger = MERGER[key]; stats.hooks.merge.for(key).tap("DefaultStatsFactoryPlugin", merger); } if (options.children) { if (Array.isArray(options.children)) { stats.hooks.getItemFactory .for("compilation.children[].compilation") .tap("DefaultStatsFactoryPlugin", (comp, { _index: idx }) => { if (idx < options.children.length) { return compilation.createStatsFactory( compilation.createStatsOptions( options.children[idx], context ) ); } }); } else if (options.children !== true) { const childFactory = compilation.createStatsFactory( compilation.createStatsOptions(options.children, context) ); stats.hooks.getItemFactory .for("compilation.children[].compilation") .tap("DefaultStatsFactoryPlugin", () => { return childFactory; }); } } } ); }); } } module.exports = DefaultStatsFactoryPlugin;
const Discord = require("discord.js"); const ms = require("ms"); let config = require("../botconfig.json"); let helpFile = require("../utils/help.json"); module.exports.run = async (bot, message, args) => { message.delete(); //!tempmute @user 1s/m/h/d if (args[0] == "help") { message.reply(`${helpFile.tempmute.name} ${helpFile.tempmute.command}`); return; } let toMute = message.guild.member(message.mentions.users.first() || message.guild.members.get(args[0])); if (!toMute) return message.reply("Couldn't find user."); if (toMute.hasPermission("MANAGE_MESSAGES")) return message.reply("Can't mute them!"); let muteRole = message.guild.roles.find(`name`, "muted"); //start of create role if (!muteRole) { try { muteRole = await message.guild.createRole({ name: "muted", color: "#000000", permissions: [] }) message.guild.channels.forEach(async (channel, id) => { await channel.overwritePermissions(muteRole, { SEND_MESSAGES: false, ADD_REACTIONS: false }); }); } catch (e) { console.log(e.stack); } } //end of create role let muteTime = args[1]; if (!muteTime) return message.reply("You didn't specify a time!"); await (toMute.addRole(muteRole.id)); message.reply(`<@${toMute.id}> has been muted for ${ms(ms(muteTime))}`).then(msg => msg.delete(3000)); setTimeout(function() { toMute.removeRole(muteRole.id); message.channel.send(`<@${toMute.id}> has been unmuted!`).then(msg => msg.delete(3000)); }, ms(muteTime)); //end of module } module.exports.help = { name: "tempmute" }
import VxeTableFooter from './src/footer' VxeTableFooter.install = function (Vue) { Vue.component(VxeTableFooter.name, VxeTableFooter) } export const Footer = VxeTableFooter export default VxeTableFooter
module.exports = [ // 安排排班表查询 { url: '/zbms/pb/dayList.do', type: 'get', response: config => { return DAY_LIST } } ] const DAY_LIST = { code: '0000', msg: '', data: [ { id: 1, processInstId: '1234567890', activityDefId: '1', createTime: 1595750162, createDate: 1595750162, activityDefName: '发起申请', createUserName: 'lixx', createTrueName: '李XX', formActiviteRelId: '1' }, { id: 2, processInstId: '1234567890', createTime: 1595750162, activityDefId: '2', createDate: 1595750162, activityDefName: '领导审批', createUserName: 'lixx', createTrueName: '李XX', formActiviteRelId: '2' }, { id: 3, processInstId: '1234567890', createTime: 1595750162, activityDefId: '3', createDate: 1595750162, activityDefName: '归档', createUserName: 'lixx', createTrueName: '李XX', formActiviteRelId: '3' } ] }
/*! * PSPDFKit for Web 2021.2.0 (https://pspdfkit.com/web) * * Copyright (c) 2016-2019 PSPDFKit GmbH. All rights reserved. * * THIS SOURCE CODE AND ANY ACCOMPANYING DOCUMENTATION ARE PROTECTED BY INTERNATIONAL COPYRIGHT LAW * AND MAY NOT BE RESOLD OR REDISTRIBUTED. USAGE IS BOUND TO THE PSPDFKIT LICENSE AGREEMENT. * UNAUTHORIZED REPRODUCTION OR DISTRIBUTION IS SUBJECT TO CIVIL AND CRIMINAL PENALTIES. * This notice may not be removed from this file. * * PSPDFKit uses several open source third-party components: https://pspdfkit.com/acknowledgements/web/ */ (window.__PSPDFKitChunk=window.__PSPDFKitChunk||[]).push([[9],{902:function(e){e.exports=JSON.parse('{"thumbnails":"Vignettes","pageXofY":"Page {arg0} sur {arg1}","XofY":"{arg0} sur {arg1}","prevPage":"Page précédente","nextPage":"Page suivante","goToPage":"Aller à la page","gotoPageX":"Aller à la page {arg0}","pageX":"Page {arg0}","pageLayout":"Mise en page","pageMode":"Mode de page","pageModeSingle":"Unique","pageModeDouble":"Double","pageModeAutomatic":"Automatique","pageTransition":"Transition de page","pageTransitionContinuous":"Continu","pageTransitionJump":"Saut","pageRotation":"Rotation de la page","pageRotationLeft":"Faire pivoter vers la gauche","pageRotationRight":"Faire pivoter vers la droite","zoomIn":"Zoom avant","zoomOut":"Zoom arrière","marqueeZoom":"Outil Zoom de sélection","panMode":"Mode Panoramique","fitPage":"Adapter la page","fitWidth":"Adapter la largeur","annotations":"Annotations","noAnnotations":"Aucune annotation","bookmark":"Signet","bookmarks":"Signets","noBookmarks":"Aucun signet","newBookmark":"Nouveau signet","addBookmark":"Ajouter un signet","removeBookmark":"Supprimer le signet","loadingBookmarks":"Chargement des signets","deleteBookmarkConfirmMessage":"Voulez-vous vraiment supprimer ce signet ?","deleteBookmarkConfirmAccessibilityLabel":"Confirmer la suppression du signet","annotation":"Annotation","noteAnnotation":"Note","textAnnotation":"Texte","inkAnnotation":"Dessin","highlightAnnotation":"Surlignage de texte","underlineAnnotation":"Souligné","squiggleAnnotation":"Tire-bouchon","strikeOutAnnotation":"Barré","print":"Imprimer","printPrepare":"Préparation du document en vue de l\'impression…","searchDocument":"Rechercher dans le document","searchPreviousMatch":"Précédent","searchNextMatch":"Suivant","searchResultOf":"{arg0} sur {arg1}","accessibilityLabelDropdownGroupToggle":"Outils {arg0}, activer/désactiver le menu","save":"Enregistrer","edit":"Modifier","delete":"Supprimer","close":"Fermer","cancel":"Annuler","ok":"OK","done":"Terminé","clear":"Effacer","date":"Date","time":"Heure","name":"Nom","color":"Couleur","black":"Noir","white":"Blanc","blue":"Bleu","red":"Rouge","green":"Vert","orange":"Orange","lightOrange":"Orange clair","yellow":"Jaune","lightYellow":"Jaune clair","lightBlue":"Bleu clair","lightRed":"Rouge clair","lightGreen":"Vert clair","fuchsia":"Fuchsia","purple":"Violet","pink":"Rose","mauve":"Mauve","lightGrey":"Gris clair","grey":"Gris","darkGrey":"Gris foncé","noColor":"Aucune","transparent":"Transparent","darkBlue":"Bleu foncé","opacity":"Opacité","thickness":"Épaisseur","size":"Taille","numberInPt":"{arg0} pt","font":"Police","fonts":"Polices","allFonts":"Toutes les polices","alignment":"Alignement","alignmentLeft":"À gauche","alignmentRight":"À droite","alignmentCenter":"Centre","verticalAlignment":"Alignement vertical","horizontalAlignment":"Alignement horizontal","top":"Haut","bottom":"Bas","deleteAnnotationConfirmMessage":"Voulez-vous vraiment supprimer cette annotation ?","deleteAnnotationConfirmAccessibilityLabel":"Confirmer la suppression de l\'annotation","fontFamilyUnsupported":"{arg0} (non compatible)","sign":"Signature","signed":"Signé","signatures":"Signatures","addSignature":"Ajouter une signature","clearSignature":"Effacer la signature","storeSignature":"Stocker la signature","pleaseSignHere":"Veuillez signer ici","signing":"Signature…","password":"Mot de passe","unlock":"Déverrouiller","passwordRequired":"Mot de passe obligatoire","unlockThisDocument":"Pour pouvoir consulter ce document, vous devez le déverrouiller. Veuillez saisir le mot de passe dans le champ ci-dessous.","incorrectPassword":"Le mot de passe saisi est incorrect. Veuillez réessayer.","blendMode":"Mode de fusion","normal":"Normal","multiply":"Multiplication","screenBlend":"Écran","overlay":"Superposition","darken":"Obscurcir","lighten":"Éclaircir","colorDodge":"Densité couleur -","colorBurn":"Densité couleur +","hardLight":"Lumière crue","softLight":"Lumière tamisée","difference":"Différence","exclusion":"Exclusion","multiple":"Multiple","linecaps-dasharray":"Style de ligne","dasharray":"Style de ligne","startLineCap":"Début de ligne","strokeDashArray":"Style de ligne","endLineCap":"Fin de ligne","lineAnnotation":"Ligne","rectangleAnnotation":"Rectangle","ellipseAnnotation":"Ellipse","polygonAnnotation":"Polygone","polylineAnnotation":"Polyligne","solid":"Uni","narrowDots":"Petits points","wideDots":"Grands points","narrowDashes":"Petits traits","wideDashes":"Grands traits","none":"Aucune","square":"Carré","circle":"Cercle","diamond":"Losange","openArrow":"Flèche simple","closedArrow":"Flèche pleine","butt":"Butée","reverseOpenArrow":"Flèche simple inversée","reverseClosedArrow":"Flèche pleine inversée","slash":"Barre oblique","fillColor":"Couleur de remplissage","cloudy":"Nuageux","arrow":"Flèche","filePath":"Chemin du fichier","unsupportedImageFormat":"Type non compatible pour l\'annotation des images : {arg0}. Veuillez utiliser un fichier JPEG ou PNG.","noOutline":"Aucun plan","outline":"Plan","imageAnnotation":"Image","selectImage":"Sélectionner une image","stampAnnotation":"Tampon","highlighter":"Surlignage libre","textHighlighter":"Surligneur de texte","pen":"Dessin","eraser":"Gomme","export":"Exportation","useAnExistingStampDesign":"Utiliser un modèle de tampon existant","createStamp":"Créer un tampon","stampText":"Texte du tampon","chooseColor":"Choisir une couleur","rejected":"Refusé","accepted":"Accepté","approved":"Approuvé","notApproved":"Non approuvé","draft":"Ébauche","final":"Version finale","completed":"Terminé","confidential":"Confidentiel","forPublicRelease":"Pour publication","notForPublicRelease":"Ne pas publier","forComment":"À commenter","void":"Nul","preliminaryResults":"Résultats préliminaires","informationOnly":"Pour information","initialHere":"Initiales ici","signHere":"Signer ici","witness":"Certifier","asIs":"Conforme","departmental":"Interne au service","experimental":"Expérimental","expired":"Expiré","sold":"Vendu","topSecret":"Top secret","revised":"Revu","custom":"Personnaliser","customStamp":"Tampon personnalisé","icon":"Icône","iconRightPointer":"Pointeur droit","iconRightArrow":"Flèche droite","iconCheck":"Coche","iconCircle":"Ellipse","iconCross":"Croix","iconInsert":"Insertion de texte","iconNewParagraph":"Nouveau paragraphe","iconNote":"Note de texte","iconComment":"Commentaire","iconParagraph":"Paragraphe","iconHelp":"Aide","iconStar":"Étoile","iconKey":"Clé","documentEditor":"Éditeur de document","newPage":"Nouvelle page","removePage":"Supprimer les pages","duplicatePage":"Dupliquer","rotatePageLeft":"Faire pivoter vers la gauche","rotatePageRight":"Faire pivoter vers la droite","moveBefore":"Déplacer avant","moveAfter":"Déplacer après","selectNone":"Ne rien sélectionner","selectAll":"Tout sélectionner","saveAs":"Enregistrer sous…","mergeDocument":"Importer un document","undo":"Annuler","redo":"Rétablir","instantModifiedWarning":"Le document a été modifié et est maintenant en lecture seule. Pour résoudre ce problème, actualisez la page.","documentMergedHere":"Le document sera fusionné ici","digitalSignaturesAllValid":"Le document a été signé numériquement et toutes les signatures sont valides.","digitalSignaturesDocModified":"Le document a été signé numériquement, mais il a été modifié depuis la signature.","digitalSignaturesSignatureWarning":"Le document a été signé numériquement, mais au moins une signature présente des problèmes.","digitalSignaturesSignatureWarningDocModified":"Le document a été signé numériquement, mais il a été modifié depuis la signature et au moins une signature présente des problèmes.","digitalSignaturesSignatureError":"Le document a été signé numériquement, mais au moins une signature n\'est pas valide.","digitalSignaturesSignatureErrorDocModified":"Le document a été signé numériquement, mais il a été modifié depuis la signature et au moins une signature n\'est pas valide.","signingInProgress":"Connexion en cours…","signingModalDesc":"Indique que le document actuel est en cours de signature","discardChanges":"Annuler les modifications","commentEditorLabel":"Ajoutez votre commentaire…","reply":"Répondre","comment":"Commentaire","comments":"Commentaires","showMore":"Afficher plus","showLess":"Afficher moins","deleteComment":"Supprimer le commentaire","deleteCommentConfirmMessage":"Voulez-vous vraiment supprimer ce commentaire ?","deleteCommentConfirmAccessibilityLabel":"Confirmer la suppression du commentaire","areaRedaction":"Biffure de zone","textRedaction":"Biffure de texte","redactionAnnotation":"Biffure","applyingRedactions":"Application des biffures","overlayTextPlaceholder":"Insérer un texte de superposition","outlineColor":"Couleur de contour","overlayText":"Texte de superposition","repeatText":"Répéter le texte","preview":"Aperçu","markupAnnotationToolbar":"Barre d\'outils des annotations de marquage","documentViewport":"Fenêtre d\'affichage du document","redactionInProgress":"Biffure en cours","redactionModalDesc":"Indique que des biffures sont en cours dans le document actuel","commentAction":"Commenter","printProgressModalDesc":"Indique qu\'un document est en cours de préparation en vue de l\'impression","printProgressModal":"Impression en cours","documentEditorDesc":"Apportez des modifications au document actuel","reloadDocumentDialog":"Confirmer l\'actualisation du document","reloadDocumentDialogDesc":"Boîte de dialogue invitant l\'utilisateur à confirmer l\'actualisation du document.","signatureDialog":"Signature","signatureDialogDesc":"Cette boîte de dialogue vous permet de sélectionner une signature manuscrite à insérer dans le document. Si vous n\'avez pas de signature stockée, vous pouvez en créer une dans la zone de travail.","stampAnnotationTemplatesDialog":"Modèles d\'annotation par tampon","stampAnnotationTemplatesDialogDesc":"Cette boîte de dialogue vous permet de sélectionner une annotation par tampon à insérer dans le document, ou de créer une annotation par tampon personnalisée avec votre propre texte.","selectedAnnotation":"Annotation {arg0} sélectionnée","commentThread":"{arg0, plural,\\none {{arg0} réponse}\\nother {{arg0} réponses}\\n}","selectedAnnotationWithText":"Annotation {arg0} contenant {arg1} sélectionnée","linesCount":"{arg0, plural,\\n=0 {{arg0} ligne}\\none {{arg0} ligne}\\nother {{arg0} lignes}\\n}","annotationsCount":"{arg0, plural,\\n=0 {Aucune annotation}\\none {{arg0} annotation}\\nother {{arg0} annotations}\\n}","pagesSelected":"{arg0, plural,\\none {{arg0} page sélectionnée}\\nother {{arg0} pages sélectionnées}\\n}","commentsCount":"{arg0, plural,\\n=0 {{arg0} commentaire}\\none {{arg0} commentaire}\\nother {{arg0} commentaires}\\n}","deleteNComments":"{arg0, plural,\\n=0 {{arg0} commentaire}\\none {{arg0} commentaire}\\nother {{arg0} commentaires}\\n}"}')}}]);
// Copyright (c) 2021, matbrgz and contributors // For license information, please see license.txt frappe.ui.form.on('Campaign Log', { // refresh: function(frm) { // } });
// 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. import { mergeParams, removeOverflowDocsAndCalculateHasNext, validateBulkDelete, processBulkDeleteResponse } from '../index-results/actions/fetch'; import {queryAllDocs, postToBulkDocs} from '../index-results/api'; import fetchMock from 'fetch-mock'; import app from '../../../app'; import sinon from 'sinon'; import SidebarActions from '../sidebar/actions'; import FauxtonAPI from '../../../core/api'; import '../base'; import Constants from '../constants'; describe('Docs Fetch API', () => { describe('mergeParams', () => { let fetchParams, queryOptionsParams; beforeEach(() => { fetchParams = { skip: 0, limit: 21 }; queryOptionsParams = {}; }); it('supports default fetch and queryOptions params', () => { expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 0, limit: 21 }, totalDocsRemaining: NaN }); }); it('supports a manual skip in queryOptionsParams', () => { queryOptionsParams.skip = 5; expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 5, limit: 21 }, totalDocsRemaining: NaN }); }); it('manual limit in queryOptionsParams does not affect merge limit', () => { queryOptionsParams.limit = 50; expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 0, limit: 21 }, totalDocsRemaining: 50 }); }); it('totalDocsRemaining is determined by queryOptions limit and skip on first page', () => { queryOptionsParams.skip = 10; queryOptionsParams.limit = 200; expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 10, limit: 21 }, totalDocsRemaining: 200 }); }); it('totalDocsRemaining is determined by queryOptions limit and fetch skip on later pages', () => { queryOptionsParams.skip = 10; queryOptionsParams.limit = 200; fetchParams.skip = 30; expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 30, limit: 21 }, totalDocsRemaining: 180 }); }); it('include conflicts if requested in fetchParams', () => { fetchParams.conflicts = true; expect(mergeParams(fetchParams, queryOptionsParams)).toEqual({ params: { skip: 0, limit: 21, conflicts: true }, totalDocsRemaining: NaN }); }); }); describe('removeOverflowDocsAndCalculateHasNext', () => { let docs; beforeEach(() => { docs = [ { _id: 'foo', _rev: 'bar' }, { _id: 'xyz', _rev: 'abc' }, { _id: 'test', _rev: 'value' } ]; }); it('truncates last doc and has next if length equal to fetch limit', () => { const totalDocsRemaining = NaN; const fetchLimit = 3; expect(removeOverflowDocsAndCalculateHasNext(docs, totalDocsRemaining, fetchLimit)).toEqual({ finalDocList: [ { _id: 'foo', _rev: 'bar' }, { _id: 'xyz', _rev: 'abc' } ], canShowNext: true }); }); it('does not truncate and does not have next if length less than fetch limit', () => { const totalDocsRemaining = NaN; const fetchLimit = 4; expect(removeOverflowDocsAndCalculateHasNext(docs, totalDocsRemaining, fetchLimit)).toEqual({ finalDocList: [ { _id: 'foo', _rev: 'bar' }, { _id: 'xyz', _rev: 'abc' }, { _id: 'test', _rev: 'value' } ], canShowNext: false }); }); it('truncates all extra docs if length is greater than totalDocsRemaining', () => { const totalDocsRemaining = 1; const fetchLimit = 3; expect(removeOverflowDocsAndCalculateHasNext(docs, totalDocsRemaining, fetchLimit)).toEqual({ finalDocList: [ { _id: 'foo', _rev: 'bar' } ], canShowNext: false }); }); }); describe('queryAllDocs', () => { const docs = { "total_rows": 2, "offset": 0, "rows": [ { "id": "foo", "key": "foo", "value": { "rev": "1-1390740c4877979dbe8998382876556c" } }, { "id": "foo2", "key": "foo2", "value": { "rev": "2-1390740c4877979dbe8998382876556c" } } ] }; it('queries _all_docs with default params', () => { const params = { limit: 21, skip: 0 }; const fetchUrl = '/testdb/_all_docs'; const query = app.utils.queryString(params); const url = `${fetchUrl}?${query}`; fetchMock.getOnce(url, docs); return queryAllDocs(fetchUrl, '', params).then((res) => { expect(res).toEqual({ docType: Constants.INDEX_RESULTS_DOC_TYPE.VIEW, docs: [ { id: "foo", key: "foo", value: { rev: "1-1390740c4877979dbe8998382876556c" } }, { id: "foo2", key: "foo2", value: { rev: "2-1390740c4877979dbe8998382876556c" } }] }); }); }); it('queries _all_docs with a partition key', () => { const partitionKey = 'key1'; const params = { limit: 21, skip: 0, inclusive_end: false, start_key: `"${partitionKey}:"`, end_key: `"${partitionKey}:\ufff0"` }; const fetchUrl = '/testdb/_all_docs'; const query = app.utils.queryString(params); const url = `${fetchUrl}?${query}`; fetchMock.getOnce(url, docs); return queryAllDocs(fetchUrl, partitionKey, params).then((res) => { expect(res).toEqual({ docType: Constants.INDEX_RESULTS_DOC_TYPE.VIEW, docs: [ { id: "foo", key: "foo", value: { rev: "1-1390740c4877979dbe8998382876556c" } }, { id: "foo2", key: "foo2", value: { rev: "2-1390740c4877979dbe8998382876556c" } }] }); }); }); }); describe('Bulk Delete', () => { describe('validation', () => { let selectedDocs; beforeEach(() => { selectedDocs = [ { _id: 'foo', _rev: 'bar', _deleted: true } ]; }); it('validation fails if no docs selected', () => { selectedDocs = []; expect(validateBulkDelete(selectedDocs)).toBe(false); }); it('validation fails if user does not wish to continue', () => { global.confirm = () => false; expect(validateBulkDelete(selectedDocs)).toBe(false); }); it('validation succeeds otherwise', () => { global.confirm = () => true; expect(validateBulkDelete(selectedDocs)).toBe(true); }); }); describe('postToBulkDocs', () => { it('deletes list of docs', () => { const payload = { docs: [ { _id: 'foo', _rev: 'bar', _deleted: true } ] }; const res = [ { "ok": true, "id":"foo", "rev":"2-fe3a51be430401d97872d14a40f590dd" } ]; const databaseName = 'testdb'; fetchMock.postOnce(FauxtonAPI.urls('bulk_docs', 'server', databaseName), res); return postToBulkDocs(databaseName, payload).then((json) => { expect(json).toEqual(res); }); }); }); describe('processBulkDeleteResponse', () => { let notificationSpy, sidebarSpy; beforeEach(() => { notificationSpy = sinon.spy(FauxtonAPI, 'addNotification'); sidebarSpy = sinon.stub(SidebarActions, 'dispatchUpdateDesignDocs'); }); afterEach(() => { notificationSpy.restore(); sidebarSpy.restore(); }); it('creates two notifications when number of failed docs is positive', () => { const res = [ { id: 'foo', error: 'conflict', reason: 'Document update conflict' } ]; const originalDocs = [ { _id: 'foo', _rev: 'bar', _deleted: true } ]; const designDocs = []; processBulkDeleteResponse(res, originalDocs, designDocs); expect(notificationSpy.calledTwice).toBe(true); expect(sidebarSpy.calledOnce).toBe(false); }); it('calls dispatchUpdateDesignDocs when one of the deleted docs is a ddoc', () => { const res = [ { id: '_design/foo', rev: 'bar', ok: true } ]; const originalDocs = [ { _id: '_design/foo', _rev: 'bar', _deleted: true } ]; const designDocs = ['_design/foo']; processBulkDeleteResponse(res, originalDocs, designDocs); expect(notificationSpy.calledOnce).toBe(true); expect(sidebarSpy.calledOnce).toBe(true); }); }); }); });
document.querySelector('.stopwatch').onclick = (() => { let isRunning = false; let elapsedTime = { mm: 0, ss: 0, ms: 0 }; let laps = []; const [$btnStartOrStop, $btnResetOrLap] = document.querySelectorAll('.stopwatch > .control'); // 스톱워치의 경과 시간을 '00:00:00' 형식의 문자열로 변환한다. const formatElapsedTime = (() => { // 1 => '01', 10 => '10' const format = n => (n < 10 ? '0' + n : n + ''); return ({ mm, ss, ms }) => `${format(mm)}:${format(ss)}:${format(ms)}`; })(); // 스톱워치의 경과 시간을 렌더링한다. const renderElapsedTime = (() => { const $display = document.querySelector('.stopwatch > .display'); return () => { $display.textContent = formatElapsedTime(elapsedTime); }; })(); // 랩 타임을 렌더링한다. const renderLaps = (() => { const $laps = document.querySelector('.stopwatch > .laps'); // 랩 타임을 생성하고 DOM에 반영한다. const createLapElement = (newLap, index) => { const $fragment = document.createDocumentFragment(); const $index = document.createElement('div'); $index.textContent = index; $fragment.appendChild($index); const $newLab = document.createElement('div'); $newLab.textContent = formatElapsedTime(newLap); $fragment.appendChild($newLab); $laps.appendChild($fragment); $laps.style.display = 'grid'; }; // 랩 타임을 초기화(DOM에서 모두 제거)한다. const removeAllLapElement = () => { document.querySelectorAll('.laps > div:not(.lap-title)').forEach($lap => $lap.remove()); $laps.style.display = 'none'; }; return () => { const { length } = laps; if (length) { const newLap = laps[length - 1]; // 마지막 lap을 DOM에 append한다. createLapElement(newLap, length); } else { removeAllLapElement(); } }; })(); // Start/Stop 버튼 클릭 이벤트 핸들러 const handleBtnStartOrStop = (() => { let timerId = null; // Stop => Start const start = () => { let { mm, ss, ms } = elapsedTime; timerId = setInterval(() => { ms += 1; if (ms >= 100) { ss += 1; ms = 0; } if (ss >= 60) { mm += 1; ss = 0; } // $btnResetOrLap의 disabled 상태 변경 $btnResetOrLap.disabled = !(mm + ss + ms); elapsedTime = { mm, ss, ms }; renderElapsedTime(); }, 10); // 10ms 단위로 증가 }; // Start => Stop const stop = () => clearInterval(timerId); return () => { isRunning ? stop() : start(); isRunning = !isRunning; // isRunning이 변경되면 버튼 텍스트를 변경한다. $btnStartOrStop.textContent = isRunning ? 'Stop' : 'Start'; $btnResetOrLap.textContent = isRunning ? 'Lap' : 'Reset'; }; })(); // Reset/Lap 버튼 클릭 이벤트 핸들러 const handleBtnResetOrLap = (() => { // elapsedTime과 laps를 초기화한다. const reset = () => { // $btnResetOrLap의 disabled 상태 변경 $btnResetOrLap.disabled = true; elapsedTime = { mm: 0, ss: 0, ms: 0 }; renderElapsedTime(); laps = []; renderLaps(); }; // elapsedTime을 laps에 추가한다. const addLap = () => { laps = [...laps, elapsedTime]; renderLaps(); }; return () => { isRunning ? addLap() : reset(); }; })(); return ({ target }) => { if (!target.classList.contains('control')) return; target === $btnStartOrStop ? handleBtnStartOrStop() : handleBtnResetOrLap(); }; })();
/** * 该方法存在一个风险, 当存在 < || > 符号时, 其后面内容也同样被置空 */ export function replaceHtmlTag(str) { return str.toString().replace(/<[^>]*>/g, ''); }
import React, { Component } from 'react'; class SearchBar extends Component { constructor(props) { super(props); this.state = { term: '' }; } render() { return ( <div> <input value={this.state.term} onChange={event => { this.setState({ term: event.target.value }); }} /> <br /> Value of the input: {this.state.term} </div> ); } } export default SearchBar;
"use strict"; //# sourceMappingURL=outlined-flushed-icon.d.js.map
/** * */ function deleteWps(){ var deleteRows = $("#cardTable").datagrid('getSelections'); //获取删除的数据 if(deleteRows){ if(deleteRows[0].flag == 1){ alert("该参数从MES获取,无法进行修改删除操作!!!"); return; } var c=confirm("该操作将删除所选数据及其关联数据,并且无法撤销,是否继续?") if (c == true) { $.ajax({ type : "post", async : false, url : "weldtask/deleteCard?fid="+deleteRows[0].fid, data : {}, dataType : "json", //返回数据形式为json success : function(result) { if (result) { if (!result.success) { $.messager.show( { title : 'Error', msg : result.msg }); } else { alert("删除成功!"); $('#cardTable').datagrid('reload'); } } }, error : function(errorMsg) { alert("数据请求失败,请联系系统管理员!"); } }); } }else{ alert("请先选择一条数据。"); } }
import Wrapper from '../Wrapper/Wrapper.vue' import Breadcrumb from '../Breadcrumb/Breadcrumb.vue' import { remote } from 'electron' import { readFileSync, statSync } from 'fs' import { Parser } from './parser' import Globals from '../../globals' import { Notify } from './notify' import { isValid } from './dfa' function readAndParseFile (path, $router) { const stats = statSync(path) if (stats && stats.size >= 1000000) { const notify = new Notify() notify.setContent('حجم فایل ورودی خیلی زیاده!') notify.open() return } const data = readFileSync(path, 'utf8') const parser = new Parser(data) if (!parser.IsValid()) { console.error('invalid file') const notify = new Notify() notify.setContent('فایل وروردی معتبر نیست.') notify.open() return false } Globals.DFA = parser.Parse() if (!isValid(Globals.DFA)) { const notify = new Notify() notify.setContent('ماشین از نوع DFA نیست.') notify.open() return } $router.push({ path: '/form' }) } export default { name: 'Home', components: { Wrapper, Breadcrumb }, methods: { uploadButtonClicked: function (e) { const files = remote.dialog.showOpenDialog({ properties: ['openFile'], title: 'Select Your File', filters: [{ extensions: ['txt'], name: 'dfa' }] }) || [] if (files.length !== 1 || files[0].type !== 'text/plain') { const notify = new Notify() notify.setContent('فایل وروردی معتبر نیست.') notify.open() return false } readAndParseFile(files[0], this.$router) }, ondrop: function (e) { e.preventDefault() const files = e.dataTransfer.files if (files.length === 1) { readAndParseFile(files[0].path, this.$router) } return false }, ondrag: e => { e.preventDefault() return false } } }
/** * Parses the toml files located in templates/meta_data and takes the JS in * 'code' field and placing it in templates/javascript */ const fs = require('fs') //requiring path and fs modules const path = require('path') const toml = require('toml') const TOML = require('@iarna/toml') //joining path of directory const DIRECTORYPATH = path.join(__dirname, 'templates/meta_data') const JSDIRECTORYPATH = path.join(__dirname, 'templates/javascript') const createFile = (filePath, content) => { // write to a new file named 2pac.txt fs.writeFile(filePath, content, err => { // throws an error, you could also catch it here if (err) throw err console.log('Content saved!') }) } //read in all the toml files fs.readdir(DIRECTORYPATH, function(err, files) { if (err) { return console.log('Unable to scan directory: ' + err) } files.forEach(function(file) { const filePath = DIRECTORYPATH + '/' + file const jsFilePath = JSDIRECTORYPATH + '/' + file.replace('.toml', '.js') // Do whatever you want to do with the file fs.readFile(filePath, (err, data) => { if (err) throw err jsonData = toml.parse(data.toString()) if (jsonData.code) { createFile(jsFilePath, jsonData.code) } delete jsonData.code const tomlData = TOML.stringify(jsonData) createFile(filePath, tomlData) }) }) })
// ------------------------------------------- // Serves the client library /ripple.js // ------------------------------------------- module.exports = function serve(ripple, { server, serve, client = 'ripple' } = {}){ log('creating') const { http = server } = ripple.server || {} if (!http) return ripple const app = expressify(http) , path = local(serve, client) , compress = compression() app.use(`/${client}.js`, compress, send(path('js'))) app.use(`/${client}.min.js`, compress, send(path('min.js'))) return ripple } const expressify = server => server.express || key('_events.request')(server) || server.on('request', express())._events.request const local = (path, client) => ext => resolve(path, `./${client}.${ext}`) const compression = require('compression') , send = require('utilise/send') , key = require('utilise/key') , { resolve } = require('path') , express = require('express') , log = require('utilise/log')('[ri/serve]')
import convert from './convert.js'; import omit from '../omit.js'; var func = convert('omit', omit); import placeholder from './placeholder.js'; func.placeholder = placeholder export default func;
/* * decaffeinate suggestions: * DS102: Remove unnecessary code created because of implicit returns * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md */ const benv = require("benv") const rewire = require("rewire") const sinon = require("sinon") const Backbone = require("backbone") describe("JSONPageEditor", function () { beforeEach(function (done) { return benv.setup(() => { benv.expose({ $: benv.require("jquery"), jQuery: benv.require("jquery"), Blob: sinon.stub(), }) jQuery.widget = sinon.stub() $.hulk = sinon.stub() Backbone.$ = $ this.JSONPageEditor = rewire("../client/editor") this.view = new this.JSONPageEditor({ $el: $("<div></div>"), data: { jobs: [{ category: "engineering" }, { category: "finance" }], }, paths: [], }) return done() }) }) afterEach(() => benv.teardown()) return describe("#addSortingArrows", function () { it("adds arrows for sorting array items", function () { this.view.setup() this.view.$el .find(".hulk-editor") .append('<div class="hulk-array-element"></div>') this.view.addSortingArrows() return this.view.$el .find(".json-page-array-header-up") .length.should.be.above(0) }) return it("moves items around in arrays", function () { this.view.setup() this.view.$el.find(".hulk-editor").html(`\ <div class="hulk-map"> \ <div class="hulk-map"> \ <div class="hulk-map-value-container"></div> \ <input class="hulk-map-key" value="jobs" /> \ <div class="hulk-array"> \ <div class="hulk-array-element">engineering</div> \ <div class="hulk-array-element">finance</div> \ </div> \ </div> \ </div>\ `) this.view.addSortingArrows() this.view.$el.find(".json-page-array-header-down").click() return this.view.data.jobs .map(j => j.category) .join(",") .should.equal("finance,engineering") }) }) })
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=11)}([function(e,t){e.exports=React},function(e,t,r){"use strict";r.r(t),function(e){r.d(t,"flush",(function(){return o})),r.d(t,"hydrate",(function(){return c})),r.d(t,"cx",(function(){return s})),r.d(t,"merge",(function(){return l})),r.d(t,"getRegisteredStyles",(function(){return u})),r.d(t,"injectGlobal",(function(){return f})),r.d(t,"keyframes",(function(){return d})),r.d(t,"css",(function(){return p})),r.d(t,"sheet",(function(){return h})),r.d(t,"caches",(function(){return g}));var n=r(10),i="undefined"!==typeof e?e:{},a=Object(n.a)(i),o=a.flush,c=a.hydrate,s=a.cx,l=a.merge,u=a.getRegisteredStyles,f=a.injectGlobal,d=a.keyframes,p=a.css,h=a.sheet,g=a.caches}.call(this,r(16))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(12);t.loadPlugin=n.loadPlugin,t.FlexPlugin=n.FlexPlugin;var i=r(13);t.getAssetsUrl=i.getAssetsUrl,t.getRuntimeUrl=i.getRuntimeUrl;var a=r(14);t.loadJS=a.loadJS;var o=r(15);t.loadCSS=o.loadCSS},function(e,t){e.exports=Redux},function(e,t,r){"use strict";t.a=function(e){var t={};return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return Math.random().toString(26).slice(2)}},function(e,t){e.exports=window.Twilio.Flex},function(e,t){e.exports=ReactRedux},function(e,t,r){e.exports=function(){"use strict";return function(e){function t(t){if(t)try{e(t+"}")}catch(r){}}return function(r,n,i,a,o,c,s,l,u,f){switch(r){case 1:if(0===u&&64===n.charCodeAt(0))return e(n+";"),"";break;case 2:if(0===l)return n+"/*|*/";break;case 3:switch(l){case 102:case 112:return e(i[0]+n),"";default:return n+(0===f?"/*|*/":"")}case-2:n.split("/*|*/}").forEach(t)}}}}()},function(e,t,r){e.exports=r(17)()},function(e,t,r){"use strict";var n=r(4),i={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var a=function(e){for(var t,r=e.length,n=r^r,i=0;r>=4;)t=1540483477*(65535&(t=255&e.charCodeAt(i)|(255&e.charCodeAt(++i))<<8|(255&e.charCodeAt(++i))<<16|(255&e.charCodeAt(++i))<<24))+((1540483477*(t>>>16)&65535)<<16),n=1540483477*(65535&n)+((1540483477*(n>>>16)&65535)<<16)^(t=1540483477*(65535&(t^=t>>>24))+((1540483477*(t>>>16)&65535)<<16)),r-=4,++i;switch(r){case 3:n^=(255&e.charCodeAt(i+2))<<16;case 2:n^=(255&e.charCodeAt(i+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(i)))+((1540483477*(n>>>16)&65535)<<16)}return n=1540483477*(65535&(n^=n>>>13))+((1540483477*(n>>>16)&65535)<<16),((n^=n>>>15)>>>0).toString(36)};var o=function(e){function t(e,t,n){var i=t.trim().split(h);t=i;var a=i.length,o=e.length;switch(o){case 0:case 1:var c=0;for(e=0===o?"":e[0]+" ";c<a;++c)t[c]=r(e,t[c],n).trim();break;default:var s=c=0;for(t=[];c<a;++c)for(var l=0;l<o;++l)t[s++]=r(e[l]+" ",i[c],n).trim()}return t}function r(e,t,r){var n=t.charCodeAt(0);switch(33>n&&(n=(t=t.trim()).charCodeAt(0)),n){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*r&&0<t.indexOf("\f"))return t.replace(g,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function n(e,t,r,a){var o=e+";",c=2*t+3*r+4*a;if(944===c){e=o.indexOf(":",9)+1;var s=o.substring(e,o.length-1).trim();return s=o.substring(0,e).trim()+s+";",1===j||2===j&&i(s,1)?"-webkit-"+s+s:s}if(0===j||2===j&&!i(o,1))return o;switch(c){case 1015:return 97===o.charCodeAt(10)?"-webkit-"+o+o:o;case 951:return 116===o.charCodeAt(3)?"-webkit-"+o+o:o;case 963:return 110===o.charCodeAt(5)?"-webkit-"+o+o:o;case 1009:if(100!==o.charCodeAt(4))break;case 969:case 942:return"-webkit-"+o+o;case 978:return"-webkit-"+o+"-moz-"+o+o;case 1019:case 983:return"-webkit-"+o+"-moz-"+o+"-ms-"+o+o;case 883:if(45===o.charCodeAt(8))return"-webkit-"+o+o;if(0<o.indexOf("image-set(",11))return o.replace(A,"$1-webkit-$2")+o;break;case 932:if(45===o.charCodeAt(4))switch(o.charCodeAt(5)){case 103:return"-webkit-box-"+o.replace("-grow","")+"-webkit-"+o+"-ms-"+o.replace("grow","positive")+o;case 115:return"-webkit-"+o+"-ms-"+o.replace("shrink","negative")+o;case 98:return"-webkit-"+o+"-ms-"+o.replace("basis","preferred-size")+o}return"-webkit-"+o+"-ms-"+o+o;case 964:return"-webkit-"+o+"-ms-flex-"+o+o;case 1023:if(99!==o.charCodeAt(8))break;return"-webkit-box-pack"+(s=o.substring(o.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+o+"-ms-flex-pack"+s+o;case 1005:return d.test(o)?o.replace(f,":-webkit-")+o.replace(f,":-moz-")+o:o;case 1e3:switch(t=(s=o.substring(13).trim()).indexOf("-")+1,s.charCodeAt(0)+s.charCodeAt(t)){case 226:s=o.replace(v,"tb");break;case 232:s=o.replace(v,"tb-rl");break;case 220:s=o.replace(v,"lr");break;default:return o}return"-webkit-"+o+"-ms-"+s+o;case 1017:if(-1===o.indexOf("sticky",9))break;case 975:switch(t=(o=e).length-10,c=(s=(33===o.charCodeAt(t)?o.substring(0,t):o).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|s.charCodeAt(7))){case 203:if(111>s.charCodeAt(8))break;case 115:o=o.replace(s,"-webkit-"+s)+";"+o;break;case 207:case 102:o=o.replace(s,"-webkit-"+(102<c?"inline-":"")+"box")+";"+o.replace(s,"-webkit-"+s)+";"+o.replace(s,"-ms-"+s+"box")+";"+o}return o+";";case 938:if(45===o.charCodeAt(5))switch(o.charCodeAt(6)){case 105:return s=o.replace("-items",""),"-webkit-"+o+"-webkit-box-"+s+"-ms-flex-"+s+o;case 115:return"-webkit-"+o+"-ms-flex-item-"+o.replace(x,"")+o;default:return"-webkit-"+o+"-ms-flex-line-pack"+o.replace("align-content","").replace(x,"")+o}break;case 973:case 989:if(45!==o.charCodeAt(3)||122===o.charCodeAt(4))break;case 931:case 953:if(!0===C.test(e))return 115===(s=e.substring(e.indexOf(":")+1)).charCodeAt(0)?n(e.replace("stretch","fill-available"),t,r,a).replace(":fill-available",":stretch"):o.replace(s,"-webkit-"+s)+o.replace(s,"-moz-"+s.replace("fill-",""))+o;break;case 962:if(o="-webkit-"+o+(102===o.charCodeAt(5)?"-ms-"+o:"")+o,211===r+a&&105===o.charCodeAt(13)&&0<o.indexOf("transform",10))return o.substring(0,o.indexOf(";",27)+1).replace(p,"$1-webkit-$2")+o}return o}function i(e,t){var r=e.indexOf(1===t?":":"{"),n=e.substring(0,3!==t?r:10);return r=e.substring(r+1,e.length-1),M(2!==t?n:n.replace(O,"$1"),r,t)}function a(e,t){var r=n(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return r!==t+";"?r.replace(w," or ($1)").substring(4):"("+t+")"}function o(e,t,r,n,i,a,o,c,l,u){for(var f,d=0,p=t;d<E;++d)switch(f=T[d].call(s,e,p,r,n,i,a,o,c,l,u)){case void 0:case!1:case!0:case null:break;default:p=f}if(p!==t)return p}function c(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!==typeof e?j=1:(j=2,M=e):j=0),c}function s(e,r){var c=e;if(33>c.charCodeAt(0)&&(c=c.trim()),c=[c],0<E){var s=o(-1,r,c,c,S,_,0,0,0,0);void 0!==s&&"string"===typeof s&&(r=s)}var f=function e(r,c,s,f,d){for(var p,h,g,v,w,x=0,O=0,C=0,A=0,T=0,M=0,N=g=p=0,F=0,z=0,D=0,L=0,U=s.length,$=U-1,B="",W="",H="",V="";F<U;){if(h=s.charCodeAt(F),F===$&&0!==O+A+C+x&&(0!==O&&(h=47===O?10:47),A=C=x=0,U++,$++),0===O+A+C+x){if(F===$&&(0<z&&(B=B.replace(u,"")),0<B.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:B+=s.charAt(F)}h=59}switch(h){case 123:for(p=(B=B.trim()).charCodeAt(0),g=1,L=++F;F<U;){switch(h=s.charCodeAt(F)){case 123:g++;break;case 125:g--;break;case 47:switch(h=s.charCodeAt(F+1)){case 42:case 47:e:{for(N=F+1;N<$;++N)switch(s.charCodeAt(N)){case 47:if(42===h&&42===s.charCodeAt(N-1)&&F+2!==N){F=N+1;break e}break;case 10:if(47===h){F=N+1;break e}}F=N}}break;case 91:h++;case 40:h++;case 34:case 39:for(;F++<$&&s.charCodeAt(F)!==h;);}if(0===g)break;F++}switch(g=s.substring(L,F),0===p&&(p=(B=B.replace(l,"").trim()).charCodeAt(0)),p){case 64:switch(0<z&&(B=B.replace(u,"")),h=B.charCodeAt(1)){case 100:case 109:case 115:case 45:z=c;break;default:z=R}if(L=(g=e(c,z,g,h,d+1)).length,0<E&&(w=o(3,g,z=t(R,B,D),c,S,_,L,h,d,f),B=z.join(""),void 0!==w&&0===(L=(g=w.trim()).length)&&(h=0,g="")),0<L)switch(h){case 115:B=B.replace(k,a);case 100:case 109:case 45:g=B+"{"+g+"}";break;case 107:g=(B=B.replace(b,"$1 $2"))+"{"+g+"}",g=1===j||2===j&&i("@"+g,3)?"@-webkit-"+g+"@"+g:"@"+g;break;default:g=B+g,112===f&&(W+=g,g="")}else g="";break;default:g=e(c,t(c,B,D),g,f,d+1)}H+=g,g=D=z=N=p=0,B="",h=s.charCodeAt(++F);break;case 125:case 59:if(1<(L=(B=(0<z?B.replace(u,""):B).trim()).length))switch(0===N&&(p=B.charCodeAt(0),45===p||96<p&&123>p)&&(L=(B=B.replace(" ",":")).length),0<E&&void 0!==(w=o(1,B,c,r,S,_,W.length,f,d,f))&&0===(L=(B=w.trim()).length)&&(B="\0\0"),p=B.charCodeAt(0),h=B.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){V+=B+s.charAt(F);break}default:58!==B.charCodeAt(L-1)&&(W+=n(B,p,h,B.charCodeAt(2)))}D=z=N=p=0,B="",h=s.charCodeAt(++F)}}switch(h){case 13:case 10:47===O?O=0:0===1+p&&107!==f&&0<B.length&&(z=1,B+="\0"),0<E*I&&o(0,B,c,r,S,_,W.length,f,d,f),_=1,S++;break;case 59:case 125:if(0===O+A+C+x){_++;break}default:switch(_++,v=s.charAt(F),h){case 9:case 32:if(0===A+x+O)switch(T){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===A+O+x&&(z=D=1,v="\f"+v);break;case 108:if(0===A+O+x+P&&0<N)switch(F-N){case 2:112===T&&58===s.charCodeAt(F-3)&&(P=T);case 8:111===M&&(P=M)}break;case 58:0===A+O+x&&(N=F);break;case 44:0===O+C+A+x&&(z=1,v+="\r");break;case 34:case 39:0===O&&(A=A===h?0:0===A?h:A);break;case 91:0===A+O+C&&x++;break;case 93:0===A+O+C&&x--;break;case 41:0===A+O+x&&C--;break;case 40:if(0===A+O+x){if(0===p)switch(2*T+3*M){case 533:break;default:p=1}C++}break;case 64:0===O+C+A+x+N+g&&(g=1);break;case 42:case 47:if(!(0<A+x+C))switch(O){case 0:switch(2*h+3*s.charCodeAt(F+1)){case 235:O=47;break;case 220:L=F,O=42}break;case 42:47===h&&42===T&&L+2!==F&&(33===s.charCodeAt(L+2)&&(W+=s.substring(L,F+1)),v="",O=0)}}0===O&&(B+=v)}M=T,T=h,F++}if(0<(L=W.length)){if(z=c,0<E&&(void 0!==(w=o(2,W,z,r,S,_,L,f,d,f))&&0===(W=w).length))return V+W+H;if(W=z.join(",")+"{"+W+"}",0!==j*P){switch(2!==j||i(W,2)||(P=0),P){case 111:W=W.replace(y,":-moz-$1")+W;break;case 112:W=W.replace(m,"::-webkit-input-$1")+W.replace(m,"::-moz-$1")+W.replace(m,":-ms-input-$1")+W}P=0}}return V+W+H}(R,c,r,0,0);return 0<E&&(void 0!==(s=o(-2,f,c,c,S,_,f.length,0,0,0))&&(f=s)),"",P=0,_=S=1,f}var l=/^\0+/g,u=/[\0\r\f]/g,f=/: */g,d=/zoo|gra/,p=/([,: ])(transform)/g,h=/,\r+?/g,g=/([\t\r\n ])*\f?&/g,b=/@(k\w+)\s*(\S*)\s*/,m=/::(place)/g,y=/:(read-only)/g,v=/[svh]\w+-[tblr]{2}/,k=/\(\s*(.*)\s*\)/g,w=/([\s\S]*?);/g,x=/-self|flex-/g,O=/[^]*?(:[rp][el]a[\w-]+)[^]*/,C=/stretch|:\s*\w+\-(?:conte|avail)/,A=/([^-])(image-set\()/,_=1,S=1,P=0,j=1,R=[],T=[],E=0,M=null,I=0;return s.use=function e(t){switch(t){case void 0:case null:E=T.length=0;break;default:switch(t.constructor){case Array:for(var r=0,n=t.length;r<n;++r)e(t[r]);break;case Function:T[E++]=t;break;case Boolean:I=0|!!t}}return e},s.set=c,void 0!==e&&c(e),s},c=r(8),s=r.n(c),l=/[A-Z]|^ms/g,u=Object(n.a)((function(e){return e.replace(l,"-$&").toLowerCase()})),f=function(e,t){return null==t||"boolean"===typeof t?"":1===i[e]||45===e.charCodeAt(1)||isNaN(t)||0===t?t:t+"px"},d=function e(t){for(var r=t.length,n=0,i="";n<r;n++){var a=t[n];if(null!=a){var o=void 0;switch(typeof a){case"boolean":break;case"function":0,o=e([a()]);break;case"object":if(Array.isArray(a))o=e(a);else for(var c in o="",a)a[c]&&c&&(o&&(o+=" "),o+=c);break;default:o=a}o&&(i&&(i+=" "),i+=o)}}return i},p="undefined"!==typeof document;function h(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key||""),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),(void 0!==e.container?e.container:document.head).appendChild(t),t}var g=function(){function e(e){this.isSpeedy=!0,this.tags=[],this.ctr=0,this.opts=e}var t=e.prototype;return t.inject=function(){if(this.injected)throw new Error("already injected!");this.tags[0]=h(this.opts),this.injected=!0},t.speedy=function(e){if(0!==this.ctr)throw new Error("cannot change speedy now");this.isSpeedy=!!e},t.insert=function(e,t){if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(this.tags[this.tags.length-1]);try{r.insertRule(e,r.cssRules.length)}catch(i){0}}else{var n=h(this.opts);this.tags.push(n),n.appendChild(document.createTextNode(e+(t||"")))}this.ctr++,this.ctr%65e3===0&&this.tags.push(h(this.opts))},t.flush=function(){this.tags.forEach((function(e){return e.parentNode.removeChild(e)})),this.tags=[],this.ctr=0,this.injected=!1},e}();t.a=function(e,t){if(void 0!==e.__SECRET_EMOTION__)return e.__SECRET_EMOTION__;void 0===t&&(t={});var r,n,i=t.key||"css",c=s()((function(e){r+=e,p&&h.insert(e,m)}));void 0!==t.prefix&&(n={prefix:t.prefix});var l={registered:{},inserted:{},nonce:t.nonce,key:i},h=new g(t);p&&h.inject();var b=new o(n);b.use(t.stylisPlugins)(c);var m="";function y(e,t){if(null==e)return"";switch(typeof e){case"boolean":return"";case"function":if(void 0!==e.__emotion_styles){var r=e.toString();return r}return y.call(this,void 0===this?e():e(this.mergedProps,this.context),t);case"object":return x.call(this,e);default:var n=l.registered[e];return!1===t&&void 0!==n?n:e}}var v,k,w=new WeakMap;function x(e){if(w.has(e))return w.get(e);var t="";return Array.isArray(e)?e.forEach((function(e){t+=y.call(this,e,!1)}),this):Object.keys(e).forEach((function(r){"object"!==typeof e[r]?void 0!==l.registered[e[r]]?t+=r+"{"+l.registered[e[r]]+"}":t+=u(r)+":"+f(r,e[r])+";":Array.isArray(e[r])&&"string"===typeof e[r][0]&&void 0===l.registered[e[r][0]]?e[r].forEach((function(e){t+=u(r)+":"+f(r,e)+";"})):t+=r+"{"+y.call(this,e[r],!1)+"}"}),this),w.set(e,t),t}var O=/label:\s*([^\s;\n{]+)\s*;/g,C=function(e,t){return a(e+t)+t},A=function(e){var t=!0,r="",n="";null==e||void 0===e.raw?(t=!1,r+=y.call(this,e,!1)):r+=e[0];for(var i=arguments.length,a=new Array(i>1?i-1:0),o=1;o<i;o++)a[o-1]=arguments[o];return a.forEach((function(n,i){r+=y.call(this,n,46===r.charCodeAt(r.length-1)),!0===t&&void 0!==e[i+1]&&(r+=e[i+1])}),this),k=r,r=r.replace(O,(function(e,t){return n+="-"+t,""})),v=C(r,n),r};function _(e,t){void 0===l.inserted[v]&&(r="",b(e,t),l.inserted[v]=r)}var S=function(){var e=A.apply(this,arguments),t=i+"-"+v;return void 0===l.registered[t]&&(l.registered[t]=k),_("."+t,e),t};function P(e,t){var r="";return t.split(" ").forEach((function(t){void 0!==l.registered[t]?e.push(t):r+=t+" "})),r}function j(e,t){var r=[],n=P(r,e);return r.length<2?e:n+S(r,t)}function R(e){l.inserted[e]=!0}if(p){var T=document.querySelectorAll("[data-emotion-"+i+"]");Array.prototype.forEach.call(T,(function(e){h.tags[0].parentNode.insertBefore(e,h.tags[0]),e.getAttribute("data-emotion-"+i).split(" ").forEach(R)}))}var E={flush:function(){p&&(h.flush(),h.inject()),l.inserted={},l.registered={}},hydrate:function(e){e.forEach(R)},cx:function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return j(d(t))},merge:j,getRegisteredStyles:P,injectGlobal:function(){var e=A.apply(this,arguments);_("",e)},keyframes:function(){var e=A.apply(this,arguments),t="animation-"+v;return _("","@keyframes "+t+"{"+e+"}"),t},css:S,sheet:h,caches:l};return e.__SECRET_EMOTION__=E,E}},function(e,t,r){e.exports=r(19)},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){this.uniqueName="plugin-external-remote-json",this.version="0.0.0",this.dependencies={"flex-plugin-scripts":"3.5.0","flex-plugin":"3.5.0","craco-config-flex-plugin":"3.5.0","flex-ui":"1.17.2",react:"16.5.2","react-dom":"16.5.2"},this.name=e,console.log("loading "+this.name+"@"+this.version+" plugin")};t.FlexPlugin=n,t.loadPlugin=function(e){Twilio&&Twilio.Flex&&Twilio.Flex.Plugins?Twilio.Flex.Plugins.init(e):console.warn("This version of Flex does not appear to support plugins.")}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRuntimeUrl=function(){if(document&&document.currentScript){var e=document.currentScript;if("string"===typeof e.src){var t=e.src;return t.substr(0,t.lastIndexOf("/"))}}return""},t.getAssetsUrl=function(){return t.getRuntimeUrl()+"/assets"}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(5));t.loadJS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach((function(e){var t=document.createElement("script");t.id="external-js-"+i.default(),t.type="text/javascript",t.src=e,document.body.appendChild(t)}))}},function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=n(r(5));t.loadCSS=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];e.forEach((function(e){var t=document.createElement("link");t.id="external-css-"+i.default(),t.rel="stylesheet",t.type="text/css",t.media="all",t.href=e,document.head.appendChild(t)}))}},function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(n){"object"===typeof window&&(r=window)}e.exports=r},function(e,t,r){"use strict";var n=r(18);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var r={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return r.PropTypes=r,r}},function(e,t,r){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,r){"use strict";r.r(t);var n=r(2);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function o(e){return(o=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function l(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function u(e,t){return(u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var f=r(0),d=r.n(f),p=r(6),h=r(7),g=r(3);function b(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function y(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){b(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var v={isOpen:!0},k=function e(){i(this,e)};k.dismissBar=function(){return{type:"DISMISS_BAR"}};var w=r(1),x=r(9),O=r.n(x),C=r(4),A=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class)|(on[A-Z].*)|((data|aria|x)-.*))$/i,_=Object(C.a)(A.test.bind(A));function S(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var P,j="__EMOTION_THEMING__",R=((P={})[j]=O.a.object,P);function T(e){this.setState({theme:e})}var E=_,M=function(e){return"theme"!==e&&"innerRef"!==e},I=function(){return!0},N=function(e,t){for(var r=2,n=arguments.length;r<n;r++){var i=arguments[r],a=void 0;for(a in i)e(a)&&(t[a]=i[a])}return t};function F(){var e,t,r=(e=["\n padding: 10px;\n margin: 0px;\n color: #fff;\n background: #09457a;\n display: inline-block;\n width: 20%;\n\n .accented {\n color: red;\n cursor: pointer;\n float: right;\n }\n"],t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}})));return F=function(){return r},r}var z=function(e,t){var r=function(n,i){var a,o,c,s;void 0!==i&&(a=i.e,o=i.label,c=i.target,s=n.__emotion_forwardProp&&i.shouldForwardProp?function(e){return n.__emotion_forwardProp(e)&&i.shouldForwardProp(e)}:i.shouldForwardProp);var l=n.__emotion_real===n,u=void 0===a&&l&&n.__emotion_base||n;return"function"!==typeof s&&(s="string"===typeof u&&u.charAt(0)===u.charAt(0).toLowerCase()?E:M),function(){var f=arguments,d=l&&void 0!==n.__emotion_styles?n.__emotion_styles.slice(0):[];if(void 0!==o&&d.push("label:"+o+";"),void 0===a)if(null==f[0]||void 0===f[0].raw)d.push.apply(d,f);else{d.push(f[0][0]);for(var p=f.length,h=1;h<p;h++)d.push(f[h],f[0][h])}else 0;var g=function(r){function n(){return r.apply(this,arguments)||this}S(n,r);var i=n.prototype;return i.componentWillMount=function(){void 0!==this.context[j]&&(this.unsubscribe=this.context[j].subscribe(T.bind(this)))},i.componentWillUnmount=function(){void 0!==this.unsubscribe&&this.context[j].unsubscribe(this.unsubscribe)},i.render=function(){var r=this.props,n=this.state;this.mergedProps=N(I,{},r,{theme:null!==n&&n.theme||r.theme||{}});var i="",o=[];return r.className&&(i+=void 0===a?e.getRegisteredStyles(o,r.className):r.className+" "),i+=void 0===a?e.css.apply(this,d.concat(o)):a,void 0!==c&&(i+=" "+c),t.createElement(u,N(s,{},r,{className:i,ref:r.innerRef}))},n}(t.Component);return g.displayName=void 0!==o?o:"Styled("+("string"===typeof u?u:u.displayName||u.name||"Component")+")",void 0!==n.defaultProps&&(g.defaultProps=n.defaultProps),g.contextTypes=R,g.__emotion_styles=d,g.__emotion_base=u,g.__emotion_real=g,g.__emotion_forwardProp=s,Object.defineProperty(g,"toString",{value:function(){return"."+c}}),g.withComponent=function(e,t){return r(e,void 0!==t?N(I,{},i,t):i).apply(void 0,d)},g}};return r}(w,d.a)("div")(F()),D=function(e){return e.isOpen?d.a.createElement(z,{id:"remote-json-external-plugin"},"Remote JSON external plugin"):null},L=Object(h.connect)((function(e){return{isOpen:e["private-v2"].customTaskList.isOpen}}),(function(e){return{dismissBar:Object(g.bindActionCreators)(k.dismissBar,e)}}))(D),U=Object(g.combineReducers)({customTaskList:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:v,t=arguments.length>1?arguments[1]:void 0;switch(t.type){case"DISMISS_BAR":return y({},e,{isOpen:!1});default:return e}}}),$=function(e){!function(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(h,e);var t,r,n,s,f=(t=h,function(){var e,r=o(t);if(c()){var n=o(this).constructor;e=Reflect.construct(r,arguments,n)}else e=r.apply(this,arguments);return l(this,e)});function h(){return i(this,h),f.call(this,"PrivateV2Plugin")}return r=h,(n=[{key:"init",value:function(e,t){this.registerReducers(t),e.AgentDesktopView.Panel1.Content.add(d.a.createElement(L,{key:"remote-json-external-plugin"}),{sortOrder:-1})}},{key:"registerReducers",value:function(e){e.store.addReducer?e.store.addReducer("private-v2",U):console.error("You need FlexUI > 1.9.0 to use built-in redux; you are currently on ".concat(p.VERSION))}}])&&a(r.prototype,n),s&&a(r,s),h}(n.FlexPlugin);n.loadPlugin($)}]); //# sourceMappingURL=bundle.js.map
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var Observable_1 = require("../Observable"); var noop_1 = require("../util/noop"); /** * We need this JSDoc comment for affecting ESDoc. * @extends {Ignored} * @hide true */ var NeverObservable = /** @class */ (function (_super) { __extends(NeverObservable, _super); function NeverObservable() { return _super.call(this) || this; } /** * Creates an Observable that emits no items to the Observer. * * <span class="informal">An Observable that never emits anything.</span> * * <img src="./img/never.png" width="100%"> * * This static operator is useful for creating a simple Observable that emits * neither values nor errors nor the completion notification. It can be used * for testing purposes or for composing with other Observables. Please note * that by never emitting a complete notification, this Observable keeps the * subscription from being disposed automatically. Subscriptions need to be * manually disposed. * * @example <caption>Emit the number 7, then never emit anything else (not even complete).</caption> * function info() { * console.log('Will not be called'); * } * var result = Rx.Observable.never().startWith(7); * result.subscribe(x => console.log(x), info, info); * * @see {@link create} * @see {@link empty} * @see {@link of} * @see {@link throw} * * @return {Observable} A "never" Observable: never emits anything. * @static true * @name never * @owner Observable */ NeverObservable.create = function () { return new NeverObservable(); }; /** @deprecated internal use only */ NeverObservable.prototype._subscribe = function (subscriber) { noop_1.noop(); }; return NeverObservable; }(Observable_1.Observable)); exports.NeverObservable = NeverObservable; //# sourceMappingURL=NeverObservable.js.map
/** * * srvMain Object for handler main page * * @author Peerapong Srisom <peerapong@haii.co.th> * @license HAII * */ var srvMain = { cache: {} }; /** * Initial srvMain * @param {object} trans - translate object from laravel */ srvMain.init = function (trans) { //set dafault datatable $.extend(true, $.fn.dataTable.defaults, { "dom": 't', "iDisplayLength": 200, "language": g_dataTablesTranslator }); srvMain.translator = trans; srvMain.waterlevelInit = true; srvMain.waterlevelCache = []; srvMain.currentDatatable = null; srvMain.initVar(); srvMain.initLoad(); srvMain.Disaster_delete(); srvMain.btnDisasterAddClick(); srvMain.initEventDate(); srvMain.Disaster_Submit(); srvMain.geoThailandJs(); } /** * Initial variable in srvMain */ srvMain.initVar = function () { srvMain.service = "thaiwater30/public/disaster/list"; // Data table Disaster srvMain.Disaster_table = $("#disaster_table"); srvMain.Disaster_DataTable = srvMain.Disaster_table.DataTable({ fixedHeader: false, columnDefs: [ { className: 'text-center', targets: [0, 1, 2, 3, 4, 6] }, { className: 'text-left', targets: [5] }, ], columns: [ { data: 'id' }, { data: 'event_datetime' }, { data: 'tumbon' }, { data: 'amphur' }, { data: 'province' }, { data: 'warning_description' }, { data: 'created_at' }, { data: srvMain.Disaster_render_button_del } ], order: [[0, 'desc']], language: { emptyTable: srvMain.translator["data_empty_table"] }, "searching": true }); } srvMain.Disaster_delete = function () { $('#disaster_table tbody').on('click', '.btn-disasater-del', function () { var row_id = $(this).attr('data-row'); var disasterUrl = './disaster/del'; if(confirm("ยืนยันลบข้อมูล รหัส "+row_id+" ?")) { // load data and render $.ajax({ type: "POST", crossDomain: true, url: disasterUrl, data: { id: row_id, _token: TOKEN }, dataType: "json", success: function () { $('#dlgAdd').modal('hide'); srvMain.initLoad(); }, error: function (err) { console.log('Connection fail'); } }); } }); } /** * Initial load data in srvMain */ srvMain.initLoad = function () { // apiService.SendRequest( "GET", srvMain.service , {} , function(rs){ // srvMain.handlerSrvDisaster( rs ); // } ); var disasterUrl = './disaster/list'; var data = '--'; // load data and render $.ajax({ type: "GET", crossDomain: true, url: disasterUrl, dataType: "json", success: srvMain.handlerSrvDisaster, error: function (err) { console.log('Connection fail'); } }); } srvMain.handlerSrvDisaster = function (rs) { srvMain.Disaster_genTable(rs); } srvMain.Disaster_genTable = function (data) { srvMain.Disaster_DataTable.clear().draw(); for (i = 0; i < data.length; i++) { srvMain.Disaster_DataTable.row.add(data[i]); } srvMain.Disaster_DataTable.draw(); } srvMain.Disaster_render_button_del = function (row) { return '<a class="btn-disasater-del btn btn-danger btn-sm" data-row="' + JH.GetJsonLangValue(row, "id") + '" ><i class="fa fa-trash"></i></a>'; } srvMain.Disaster_render_dowload = function (row) { return '<center><a href="/images/' + row.province_code + '.zip" class="disabled" title="' + srvMain.translator["dowload"] + '" download ><span class="glyphicon glyphicon-download-alt" aria-hidden="true"></span></a></center>'; } $('#disaster_input').on('keyup', function () { srvMain.Disaster_DataTable.search(this.value).draw(); }); srvMain.btnDisasterAddClick = function () { $('#btn-disaster-add').on('click', function () { $('#dlgAdd').modal('show'); }); } /** * Setting input datetime */ srvMain.initEventDate = function () { $("#disasterEventDatetime").datetimepicker({ useCurrent: true, }); }; /** * Submmit button */ srvMain.Disaster_Submit = function () { $('.btn-disaster-submit').on('click', function () { var disasterUrl = './disaster/add'; var datas = $('#disasterForm').serialize(); console.log(datas); $.ajax({ type: "POST", url: disasterUrl, data: datas, dataType: "json", success: function (res) { $('#dlgAdd').modal('hide'); srvMain.initLoad(); }, error: function () { alert('error handling here'); } }); return false; }); } /** * Autocomplete */ srvMain.geoThailandJs = function () { $.Thailand({ $district: $('#disasterDistrict'), // input ของตำบล $amphoe: $('#disasterAmphoe'), // input ของอำเภอ $province: $('#disasterProvince'), // input ของจังหวัด $zipcode: $('#disasterZipcode'), // input ของรหัสไปรษณีย์ $search: $('#disasterForm [name="search"]'), database: './resources/js/jquery.Thailand.js/database/db.json', onDataFill: function (data) { console.log(data) var html = '<b>ที่อยู่:</b> ตำบล' + data.district + ' อำเภอ' + data.amphoe + ' จังหวัด' + data.province + ' ' + data.zipcode; $('#output').html('<div class="uk-alert-warning" uk-alert><a class="uk-alert-close" uk-close></a>' + html + '</div>'); }, onLoad: function () { //console.info('Autocomplete is ready!'); } }); }
(function() { 'use strict'; function F2(fun) { function wrapper(a) { return function(b) { return fun(a,b); }; } wrapper.arity = 2; wrapper.func = fun; return wrapper; } function F3(fun) { function wrapper(a) { return function(b) { return function(c) { return fun(a, b, c); }; }; } wrapper.arity = 3; wrapper.func = fun; return wrapper; } function F4(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return fun(a, b, c, d); }; }; }; } wrapper.arity = 4; wrapper.func = fun; return wrapper; } function F5(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return function(e) { return fun(a, b, c, d, e); }; }; }; }; } wrapper.arity = 5; wrapper.func = fun; return wrapper; } function F6(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return fun(a, b, c, d, e, f); }; }; }; }; }; } wrapper.arity = 6; wrapper.func = fun; return wrapper; } function F7(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return fun(a, b, c, d, e, f, g); }; }; }; }; }; }; } wrapper.arity = 7; wrapper.func = fun; return wrapper; } function F8(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return function(h) { return fun(a, b, c, d, e, f, g, h); }; }; }; }; }; }; }; } wrapper.arity = 8; wrapper.func = fun; return wrapper; } function F9(fun) { function wrapper(a) { return function(b) { return function(c) { return function(d) { return function(e) { return function(f) { return function(g) { return function(h) { return function(i) { return fun(a, b, c, d, e, f, g, h, i); }; }; }; }; }; }; }; }; } wrapper.arity = 9; wrapper.func = fun; return wrapper; } function A2(fun, a, b) { return fun.arity === 2 ? fun.func(a, b) : fun(a)(b); } function A3(fun, a, b, c) { return fun.arity === 3 ? fun.func(a, b, c) : fun(a)(b)(c); } function A4(fun, a, b, c, d) { return fun.arity === 4 ? fun.func(a, b, c, d) : fun(a)(b)(c)(d); } function A5(fun, a, b, c, d, e) { return fun.arity === 5 ? fun.func(a, b, c, d, e) : fun(a)(b)(c)(d)(e); } function A6(fun, a, b, c, d, e, f) { return fun.arity === 6 ? fun.func(a, b, c, d, e, f) : fun(a)(b)(c)(d)(e)(f); } function A7(fun, a, b, c, d, e, f, g) { return fun.arity === 7 ? fun.func(a, b, c, d, e, f, g) : fun(a)(b)(c)(d)(e)(f)(g); } function A8(fun, a, b, c, d, e, f, g, h) { return fun.arity === 8 ? fun.func(a, b, c, d, e, f, g, h) : fun(a)(b)(c)(d)(e)(f)(g)(h); } function A9(fun, a, b, c, d, e, f, g, h, i) { return fun.arity === 9 ? fun.func(a, b, c, d, e, f, g, h, i) : fun(a)(b)(c)(d)(e)(f)(g)(h)(i); } //import Native.List // var _elm_lang$core$Native_Array = function() { // A RRB-Tree has two distinct data types. // Leaf -> "height" is always 0 // "table" is an array of elements // Node -> "height" is always greater than 0 // "table" is an array of child nodes // "lengths" is an array of accumulated lengths of the child nodes // M is the maximal table size. 32 seems fast. E is the allowed increase // of search steps when concatting to find an index. Lower values will // decrease balancing, but will increase search steps. var M = 32; var E = 2; // An empty array. var empty = { ctor: '_Array', height: 0, table: [] }; function get(i, array) { if (i < 0 || i >= length(array)) { throw new Error( 'Index ' + i + ' is out of range. Check the length of ' + 'your array first or use getMaybe or getWithDefault.'); } return unsafeGet(i, array); } function unsafeGet(i, array) { for (var x = array.height; x > 0; x--) { var slot = i >> (x * 5); while (array.lengths[slot] <= i) { slot++; } if (slot > 0) { i -= array.lengths[slot - 1]; } array = array.table[slot]; } return array.table[i]; } // Sets the value at the index i. Only the nodes leading to i will get // copied and updated. function set(i, item, array) { if (i < 0 || length(array) <= i) { return array; } return unsafeSet(i, item, array); } function unsafeSet(i, item, array) { array = nodeCopy(array); if (array.height === 0) { array.table[i] = item; } else { var slot = getSlot(i, array); if (slot > 0) { i -= array.lengths[slot - 1]; } array.table[slot] = unsafeSet(i, item, array.table[slot]); } return array; } function initialize(len, f) { if (len <= 0) { return empty; } var h = Math.floor( Math.log(len) / Math.log(M) ); return initialize_(f, h, 0, len); } function initialize_(f, h, from, to) { if (h === 0) { var table = new Array((to - from) % (M + 1)); for (var i = 0; i < table.length; i++) { table[i] = f(from + i); } return { ctor: '_Array', height: 0, table: table }; } var step = Math.pow(M, h); var table = new Array(Math.ceil((to - from) / step)); var lengths = new Array(table.length); for (var i = 0; i < table.length; i++) { table[i] = initialize_(f, h - 1, from + (i * step), Math.min(from + ((i + 1) * step), to)); lengths[i] = length(table[i]) + (i > 0 ? lengths[i-1] : 0); } return { ctor: '_Array', height: h, table: table, lengths: lengths }; } function fromList(list) { if (list.ctor === '[]') { return empty; } // Allocate M sized blocks (table) and write list elements to it. var table = new Array(M); var nodes = []; var i = 0; while (list.ctor !== '[]') { table[i] = list._0; list = list._1; i++; // table is full, so we can push a leaf containing it into the // next node. if (i === M) { var leaf = { ctor: '_Array', height: 0, table: table }; fromListPush(leaf, nodes); table = new Array(M); i = 0; } } // Maybe there is something left on the table. if (i > 0) { var leaf = { ctor: '_Array', height: 0, table: table.splice(0, i) }; fromListPush(leaf, nodes); } // Go through all of the nodes and eventually push them into higher nodes. for (var h = 0; h < nodes.length - 1; h++) { if (nodes[h].table.length > 0) { fromListPush(nodes[h], nodes); } } var head = nodes[nodes.length - 1]; if (head.height > 0 && head.table.length === 1) { return head.table[0]; } else { return head; } } // Push a node into a higher node as a child. function fromListPush(toPush, nodes) { var h = toPush.height; // Maybe the node on this height does not exist. if (nodes.length === h) { var node = { ctor: '_Array', height: h + 1, table: [], lengths: [] }; nodes.push(node); } nodes[h].table.push(toPush); var len = length(toPush); if (nodes[h].lengths.length > 0) { len += nodes[h].lengths[nodes[h].lengths.length - 1]; } nodes[h].lengths.push(len); if (nodes[h].table.length === M) { fromListPush(nodes[h], nodes); nodes[h] = { ctor: '_Array', height: h + 1, table: [], lengths: [] }; } } // Pushes an item via push_ to the bottom right of a tree. function push(item, a) { var pushed = push_(item, a); if (pushed !== null) { return pushed; } var newTree = create(item, a.height); return siblise(a, newTree); } // Recursively tries to push an item to the bottom-right most // tree possible. If there is no space left for the item, // null will be returned. function push_(item, a) { // Handle resursion stop at leaf level. if (a.height === 0) { if (a.table.length < M) { var newA = { ctor: '_Array', height: 0, table: a.table.slice() }; newA.table.push(item); return newA; } else { return null; } } // Recursively push var pushed = push_(item, botRight(a)); // There was space in the bottom right tree, so the slot will // be updated. if (pushed !== null) { var newA = nodeCopy(a); newA.table[newA.table.length - 1] = pushed; newA.lengths[newA.lengths.length - 1]++; return newA; } // When there was no space left, check if there is space left // for a new slot with a tree which contains only the item // at the bottom. if (a.table.length < M) { var newSlot = create(item, a.height - 1); var newA = nodeCopy(a); newA.table.push(newSlot); newA.lengths.push(newA.lengths[newA.lengths.length - 1] + length(newSlot)); return newA; } else { return null; } } // Converts an array into a list of elements. function toList(a) { return toList_(_elm_lang$core$Native_List.Nil, a); } function toList_(list, a) { for (var i = a.table.length - 1; i >= 0; i--) { list = a.height === 0 ? _elm_lang$core$Native_List.Cons(a.table[i], list) : toList_(list, a.table[i]); } return list; } // Maps a function over the elements of an array. function map(f, a) { var newA = { ctor: '_Array', height: a.height, table: new Array(a.table.length) }; if (a.height > 0) { newA.lengths = a.lengths; } for (var i = 0; i < a.table.length; i++) { newA.table[i] = a.height === 0 ? f(a.table[i]) : map(f, a.table[i]); } return newA; } // Maps a function over the elements with their index as first argument. function indexedMap(f, a) { return indexedMap_(f, a, 0); } function indexedMap_(f, a, from) { var newA = { ctor: '_Array', height: a.height, table: new Array(a.table.length) }; if (a.height > 0) { newA.lengths = a.lengths; } for (var i = 0; i < a.table.length; i++) { newA.table[i] = a.height === 0 ? A2(f, from + i, a.table[i]) : indexedMap_(f, a.table[i], i == 0 ? from : from + a.lengths[i - 1]); } return newA; } function foldl(f, b, a) { if (a.height === 0) { for (var i = 0; i < a.table.length; i++) { b = A2(f, a.table[i], b); } } else { for (var i = 0; i < a.table.length; i++) { b = foldl(f, b, a.table[i]); } } return b; } function foldr(f, b, a) { if (a.height === 0) { for (var i = a.table.length; i--; ) { b = A2(f, a.table[i], b); } } else { for (var i = a.table.length; i--; ) { b = foldr(f, b, a.table[i]); } } return b; } // TODO: currently, it slices the right, then the left. This can be // optimized. function slice(from, to, a) { if (from < 0) { from += length(a); } if (to < 0) { to += length(a); } return sliceLeft(from, sliceRight(to, a)); } function sliceRight(to, a) { if (to === length(a)) { return a; } // Handle leaf level. if (a.height === 0) { var newA = { ctor:'_Array', height:0 }; newA.table = a.table.slice(0, to); return newA; } // Slice the right recursively. var right = getSlot(to, a); var sliced = sliceRight(to - (right > 0 ? a.lengths[right - 1] : 0), a.table[right]); // Maybe the a node is not even needed, as sliced contains the whole slice. if (right === 0) { return sliced; } // Create new node. var newA = { ctor: '_Array', height: a.height, table: a.table.slice(0, right), lengths: a.lengths.slice(0, right) }; if (sliced.table.length > 0) { newA.table[right] = sliced; newA.lengths[right] = length(sliced) + (right > 0 ? newA.lengths[right - 1] : 0); } return newA; } function sliceLeft(from, a) { if (from === 0) { return a; } // Handle leaf level. if (a.height === 0) { var newA = { ctor:'_Array', height:0 }; newA.table = a.table.slice(from, a.table.length + 1); return newA; } // Slice the left recursively. var left = getSlot(from, a); var sliced = sliceLeft(from - (left > 0 ? a.lengths[left - 1] : 0), a.table[left]); // Maybe the a node is not even needed, as sliced contains the whole slice. if (left === a.table.length - 1) { return sliced; } // Create new node. var newA = { ctor: '_Array', height: a.height, table: a.table.slice(left, a.table.length + 1), lengths: new Array(a.table.length - left) }; newA.table[0] = sliced; var len = 0; for (var i = 0; i < newA.table.length; i++) { len += length(newA.table[i]); newA.lengths[i] = len; } return newA; } // Appends two trees. function append(a,b) { if (a.table.length === 0) { return b; } if (b.table.length === 0) { return a; } var c = append_(a, b); // Check if both nodes can be crunshed together. if (c[0].table.length + c[1].table.length <= M) { if (c[0].table.length === 0) { return c[1]; } if (c[1].table.length === 0) { return c[0]; } // Adjust .table and .lengths c[0].table = c[0].table.concat(c[1].table); if (c[0].height > 0) { var len = length(c[0]); for (var i = 0; i < c[1].lengths.length; i++) { c[1].lengths[i] += len; } c[0].lengths = c[0].lengths.concat(c[1].lengths); } return c[0]; } if (c[0].height > 0) { var toRemove = calcToRemove(a, b); if (toRemove > E) { c = shuffle(c[0], c[1], toRemove); } } return siblise(c[0], c[1]); } // Returns an array of two nodes; right and left. One node _may_ be empty. function append_(a, b) { if (a.height === 0 && b.height === 0) { return [a, b]; } if (a.height !== 1 || b.height !== 1) { if (a.height === b.height) { a = nodeCopy(a); b = nodeCopy(b); var appended = append_(botRight(a), botLeft(b)); insertRight(a, appended[1]); insertLeft(b, appended[0]); } else if (a.height > b.height) { a = nodeCopy(a); var appended = append_(botRight(a), b); insertRight(a, appended[0]); b = parentise(appended[1], appended[1].height + 1); } else { b = nodeCopy(b); var appended = append_(a, botLeft(b)); var left = appended[0].table.length === 0 ? 0 : 1; var right = left === 0 ? 1 : 0; insertLeft(b, appended[left]); a = parentise(appended[right], appended[right].height + 1); } } // Check if balancing is needed and return based on that. if (a.table.length === 0 || b.table.length === 0) { return [a, b]; } var toRemove = calcToRemove(a, b); if (toRemove <= E) { return [a, b]; } return shuffle(a, b, toRemove); } // Helperfunctions for append_. Replaces a child node at the side of the parent. function insertRight(parent, node) { var index = parent.table.length - 1; parent.table[index] = node; parent.lengths[index] = length(node); parent.lengths[index] += index > 0 ? parent.lengths[index - 1] : 0; } function insertLeft(parent, node) { if (node.table.length > 0) { parent.table[0] = node; parent.lengths[0] = length(node); var len = length(parent.table[0]); for (var i = 1; i < parent.lengths.length; i++) { len += length(parent.table[i]); parent.lengths[i] = len; } } else { parent.table.shift(); for (var i = 1; i < parent.lengths.length; i++) { parent.lengths[i] = parent.lengths[i] - parent.lengths[0]; } parent.lengths.shift(); } } // Returns the extra search steps for E. Refer to the paper. function calcToRemove(a, b) { var subLengths = 0; for (var i = 0; i < a.table.length; i++) { subLengths += a.table[i].table.length; } for (var i = 0; i < b.table.length; i++) { subLengths += b.table[i].table.length; } var toRemove = a.table.length + b.table.length; return toRemove - (Math.floor((subLengths - 1) / M) + 1); } // get2, set2 and saveSlot are helpers for accessing elements over two arrays. function get2(a, b, index) { return index < a.length ? a[index] : b[index - a.length]; } function set2(a, b, index, value) { if (index < a.length) { a[index] = value; } else { b[index - a.length] = value; } } function saveSlot(a, b, index, slot) { set2(a.table, b.table, index, slot); var l = (index === 0 || index === a.lengths.length) ? 0 : get2(a.lengths, a.lengths, index - 1); set2(a.lengths, b.lengths, index, l + length(slot)); } // Creates a node or leaf with a given length at their arrays for perfomance. // Is only used by shuffle. function createNode(h, length) { if (length < 0) { length = 0; } var a = { ctor: '_Array', height: h, table: new Array(length) }; if (h > 0) { a.lengths = new Array(length); } return a; } // Returns an array of two balanced nodes. function shuffle(a, b, toRemove) { var newA = createNode(a.height, Math.min(M, a.table.length + b.table.length - toRemove)); var newB = createNode(a.height, newA.table.length - (a.table.length + b.table.length - toRemove)); // Skip the slots with size M. More precise: copy the slot references // to the new node var read = 0; while (get2(a.table, b.table, read).table.length % M === 0) { set2(newA.table, newB.table, read, get2(a.table, b.table, read)); set2(newA.lengths, newB.lengths, read, get2(a.lengths, b.lengths, read)); read++; } // Pulling items from left to right, caching in a slot before writing // it into the new nodes. var write = read; var slot = new createNode(a.height - 1, 0); var from = 0; // If the current slot is still containing data, then there will be at // least one more write, so we do not break this loop yet. while (read - write - (slot.table.length > 0 ? 1 : 0) < toRemove) { // Find out the max possible items for copying. var source = get2(a.table, b.table, read); var to = Math.min(M - slot.table.length, source.table.length); // Copy and adjust size table. slot.table = slot.table.concat(source.table.slice(from, to)); if (slot.height > 0) { var len = slot.lengths.length; for (var i = len; i < len + to - from; i++) { slot.lengths[i] = length(slot.table[i]); slot.lengths[i] += (i > 0 ? slot.lengths[i - 1] : 0); } } from += to; // Only proceed to next slots[i] if the current one was // fully copied. if (source.table.length <= to) { read++; from = 0; } // Only create a new slot if the current one is filled up. if (slot.table.length === M) { saveSlot(newA, newB, write, slot); slot = createNode(a.height - 1, 0); write++; } } // Cleanup after the loop. Copy the last slot into the new nodes. if (slot.table.length > 0) { saveSlot(newA, newB, write, slot); write++; } // Shift the untouched slots to the left while (read < a.table.length + b.table.length ) { saveSlot(newA, newB, write, get2(a.table, b.table, read)); read++; write++; } return [newA, newB]; } // Navigation functions function botRight(a) { return a.table[a.table.length - 1]; } function botLeft(a) { return a.table[0]; } // Copies a node for updating. Note that you should not use this if // only updating only one of "table" or "lengths" for performance reasons. function nodeCopy(a) { var newA = { ctor: '_Array', height: a.height, table: a.table.slice() }; if (a.height > 0) { newA.lengths = a.lengths.slice(); } return newA; } // Returns how many items are in the tree. function length(array) { if (array.height === 0) { return array.table.length; } else { return array.lengths[array.lengths.length - 1]; } } // Calculates in which slot of "table" the item probably is, then // find the exact slot via forward searching in "lengths". Returns the index. function getSlot(i, a) { var slot = i >> (5 * a.height); while (a.lengths[slot] <= i) { slot++; } return slot; } // Recursively creates a tree with a given height containing // only the given item. function create(item, h) { if (h === 0) { return { ctor: '_Array', height: 0, table: [item] }; } return { ctor: '_Array', height: h, table: [create(item, h - 1)], lengths: [1] }; } // Recursively creates a tree that contains the given tree. function parentise(tree, h) { if (h === tree.height) { return tree; } return { ctor: '_Array', height: h, table: [parentise(tree, h - 1)], lengths: [length(tree)] }; } // Emphasizes blood brotherhood beneath two trees. function siblise(a, b) { return { ctor: '_Array', height: a.height + 1, table: [a, b], lengths: [length(a), length(a) + length(b)] }; } function toJSArray(a) { var jsArray = new Array(length(a)); toJSArray_(jsArray, 0, a); return jsArray; } function toJSArray_(jsArray, i, a) { for (var t = 0; t < a.table.length; t++) { if (a.height === 0) { jsArray[i + t] = a.table[t]; } else { var inc = t === 0 ? 0 : a.lengths[t - 1]; toJSArray_(jsArray, i + inc, a.table[t]); } } } function fromJSArray(jsArray) { if (jsArray.length === 0) { return empty; } var h = Math.floor(Math.log(jsArray.length) / Math.log(M)); return fromJSArray_(jsArray, h, 0, jsArray.length); } function fromJSArray_(jsArray, h, from, to) { if (h === 0) { return { ctor: '_Array', height: 0, table: jsArray.slice(from, to) }; } var step = Math.pow(M, h); var table = new Array(Math.ceil((to - from) / step)); var lengths = new Array(table.length); for (var i = 0; i < table.length; i++) { table[i] = fromJSArray_(jsArray, h - 1, from + (i * step), Math.min(from + ((i + 1) * step), to)); lengths[i] = length(table[i]) + (i > 0 ? lengths[i - 1] : 0); } return { ctor: '_Array', height: h, table: table, lengths: lengths }; } return { empty: empty, fromList: fromList, toList: toList, initialize: F2(initialize), append: F2(append), push: F2(push), slice: F3(slice), get: F2(get), set: F3(set), map: F2(map), indexedMap: F2(indexedMap), foldl: F3(foldl), foldr: F3(foldr), length: length, toJSArray: toJSArray, fromJSArray: fromJSArray }; }(); //import Native.Utils // var _elm_lang$core$Native_Basics = function() { function div(a, b) { return (a / b) | 0; } function rem(a, b) { return a % b; } function mod(a, b) { if (b === 0) { throw new Error('Cannot perform mod 0. Division by zero error.'); } var r = a % b; var m = a === 0 ? 0 : (b > 0 ? (a >= 0 ? r : r + b) : -mod(-a, -b)); return m === b ? 0 : m; } function logBase(base, n) { return Math.log(n) / Math.log(base); } function negate(n) { return -n; } function abs(n) { return n < 0 ? -n : n; } function min(a, b) { return _elm_lang$core$Native_Utils.cmp(a, b) < 0 ? a : b; } function max(a, b) { return _elm_lang$core$Native_Utils.cmp(a, b) > 0 ? a : b; } function clamp(lo, hi, n) { return _elm_lang$core$Native_Utils.cmp(n, lo) < 0 ? lo : _elm_lang$core$Native_Utils.cmp(n, hi) > 0 ? hi : n; } var ord = ['LT', 'EQ', 'GT']; function compare(x, y) { return { ctor: ord[_elm_lang$core$Native_Utils.cmp(x, y) + 1] }; } function xor(a, b) { return a !== b; } function not(b) { return !b; } function isInfinite(n) { return n === Infinity || n === -Infinity; } function truncate(n) { return n | 0; } function degrees(d) { return d * Math.PI / 180; } function turns(t) { return 2 * Math.PI * t; } function fromPolar(point) { var r = point._0; var t = point._1; return _elm_lang$core$Native_Utils.Tuple2(r * Math.cos(t), r * Math.sin(t)); } function toPolar(point) { var x = point._0; var y = point._1; return _elm_lang$core$Native_Utils.Tuple2(Math.sqrt(x * x + y * y), Math.atan2(y, x)); } return { div: F2(div), rem: F2(rem), mod: F2(mod), pi: Math.PI, e: Math.E, cos: Math.cos, sin: Math.sin, tan: Math.tan, acos: Math.acos, asin: Math.asin, atan: Math.atan, atan2: F2(Math.atan2), degrees: degrees, turns: turns, fromPolar: fromPolar, toPolar: toPolar, sqrt: Math.sqrt, logBase: F2(logBase), negate: negate, abs: abs, min: F2(min), max: F2(max), clamp: F3(clamp), compare: F2(compare), xor: F2(xor), not: not, truncate: truncate, ceiling: Math.ceil, floor: Math.floor, round: Math.round, toFloat: function(x) { return x; }, isNaN: isNaN, isInfinite: isInfinite }; }(); //import // var _elm_lang$core$Native_Utils = function() { // COMPARISONS function eq(x, y) { var stack = []; var isEqual = eqHelp(x, y, 0, stack); var pair; while (isEqual && (pair = stack.pop())) { isEqual = eqHelp(pair.x, pair.y, 0, stack); } return isEqual; } function eqHelp(x, y, depth, stack) { if (depth > 100) { stack.push({ x: x, y: y }); return true; } if (x === y) { return true; } if (typeof x !== 'object') { if (typeof x === 'function') { throw new Error( 'Trying to use `(==)` on functions. There is no way to know if functions are "the same" in the Elm sense.' + ' Read more about this at http://package.elm-lang.org/packages/elm-lang/core/latest/Basics#==' + ' which describes why it is this way and what the better version will look like.' ); } return false; } if (x === null || y === null) { return false } if (x instanceof Date) { return x.getTime() === y.getTime(); } if (!('ctor' in x)) { for (var key in x) { if (!eqHelp(x[key], y[key], depth + 1, stack)) { return false; } } return true; } // convert Dicts and Sets to lists if (x.ctor === 'RBNode_elm_builtin' || x.ctor === 'RBEmpty_elm_builtin') { x = _elm_lang$core$Dict$toList(x); y = _elm_lang$core$Dict$toList(y); } if (x.ctor === 'Set_elm_builtin') { x = _elm_lang$core$Set$toList(x); y = _elm_lang$core$Set$toList(y); } // check if lists are equal without recursion if (x.ctor === '::') { var a = x; var b = y; while (a.ctor === '::' && b.ctor === '::') { if (!eqHelp(a._0, b._0, depth + 1, stack)) { return false; } a = a._1; b = b._1; } return a.ctor === b.ctor; } // check if Arrays are equal if (x.ctor === '_Array') { var xs = _elm_lang$core$Native_Array.toJSArray(x); var ys = _elm_lang$core$Native_Array.toJSArray(y); if (xs.length !== ys.length) { return false; } for (var i = 0; i < xs.length; i++) { if (!eqHelp(xs[i], ys[i], depth + 1, stack)) { return false; } } return true; } if (!eqHelp(x.ctor, y.ctor, depth + 1, stack)) { return false; } for (var key in x) { if (!eqHelp(x[key], y[key], depth + 1, stack)) { return false; } } return true; } // Code in Generate/JavaScript.hs, Basics.js, and List.js depends on // the particular integer values assigned to LT, EQ, and GT. var LT = -1, EQ = 0, GT = 1; function cmp(x, y) { if (typeof x !== 'object') { return x === y ? EQ : x < y ? LT : GT; } if (x instanceof String) { var a = x.valueOf(); var b = y.valueOf(); return a === b ? EQ : a < b ? LT : GT; } if (x.ctor === '::' || x.ctor === '[]') { while (x.ctor === '::' && y.ctor === '::') { var ord = cmp(x._0, y._0); if (ord !== EQ) { return ord; } x = x._1; y = y._1; } return x.ctor === y.ctor ? EQ : x.ctor === '[]' ? LT : GT; } if (x.ctor.slice(0, 6) === '_Tuple') { var ord; var n = x.ctor.slice(6) - 0; var err = 'cannot compare tuples with more than 6 elements.'; if (n === 0) return EQ; if (n >= 1) { ord = cmp(x._0, y._0); if (ord !== EQ) return ord; if (n >= 2) { ord = cmp(x._1, y._1); if (ord !== EQ) return ord; if (n >= 3) { ord = cmp(x._2, y._2); if (ord !== EQ) return ord; if (n >= 4) { ord = cmp(x._3, y._3); if (ord !== EQ) return ord; if (n >= 5) { ord = cmp(x._4, y._4); if (ord !== EQ) return ord; if (n >= 6) { ord = cmp(x._5, y._5); if (ord !== EQ) return ord; if (n >= 7) throw new Error('Comparison error: ' + err); } } } } } } return EQ; } throw new Error( 'Comparison error: comparison is only defined on ints, ' + 'floats, times, chars, strings, lists of comparable values, ' + 'and tuples of comparable values.' ); } // COMMON VALUES var Tuple0 = { ctor: '_Tuple0' }; function Tuple2(x, y) { return { ctor: '_Tuple2', _0: x, _1: y }; } function chr(c) { return new String(c); } // GUID var count = 0; function guid(_) { return count++; } // RECORDS function update(oldRecord, updatedFields) { var newRecord = {}; for (var key in oldRecord) { newRecord[key] = oldRecord[key]; } for (var key in updatedFields) { newRecord[key] = updatedFields[key]; } return newRecord; } //// LIST STUFF //// var Nil = { ctor: '[]' }; function Cons(hd, tl) { return { ctor: '::', _0: hd, _1: tl }; } function append(xs, ys) { // append Strings if (typeof xs === 'string') { return xs + ys; } // append Lists if (xs.ctor === '[]') { return ys; } var root = Cons(xs._0, Nil); var curr = root; xs = xs._1; while (xs.ctor !== '[]') { curr._1 = Cons(xs._0, Nil); xs = xs._1; curr = curr._1; } curr._1 = ys; return root; } // CRASHES function crash(moduleName, region) { return function(message) { throw new Error( 'Ran into a `Debug.crash` in module `' + moduleName + '` ' + regionToString(region) + '\n' + 'The message provided by the code author is:\n\n ' + message ); }; } function crashCase(moduleName, region, value) { return function(message) { throw new Error( 'Ran into a `Debug.crash` in module `' + moduleName + '`\n\n' + 'This was caused by the `case` expression ' + regionToString(region) + '.\n' + 'One of the branches ended with a crash and the following value got through:\n\n ' + toString(value) + '\n\n' + 'The message provided by the code author is:\n\n ' + message ); }; } function regionToString(region) { if (region.start.line == region.end.line) { return 'on line ' + region.start.line; } return 'between lines ' + region.start.line + ' and ' + region.end.line; } // TO STRING function toString(v) { var type = typeof v; if (type === 'function') { return '<function>'; } if (type === 'boolean') { return v ? 'True' : 'False'; } if (type === 'number') { return v + ''; } if (v instanceof String) { return '\'' + addSlashes(v, true) + '\''; } if (type === 'string') { return '"' + addSlashes(v, false) + '"'; } if (v === null) { return 'null'; } if (type === 'object' && 'ctor' in v) { var ctorStarter = v.ctor.substring(0, 5); if (ctorStarter === '_Tupl') { var output = []; for (var k in v) { if (k === 'ctor') continue; output.push(toString(v[k])); } return '(' + output.join(',') + ')'; } if (ctorStarter === '_Task') { return '<task>' } if (v.ctor === '_Array') { var list = _elm_lang$core$Array$toList(v); return 'Array.fromList ' + toString(list); } if (v.ctor === '<decoder>') { return '<decoder>'; } if (v.ctor === '_Process') { return '<process:' + v.id + '>'; } if (v.ctor === '::') { var output = '[' + toString(v._0); v = v._1; while (v.ctor === '::') { output += ',' + toString(v._0); v = v._1; } return output + ']'; } if (v.ctor === '[]') { return '[]'; } if (v.ctor === 'Set_elm_builtin') { return 'Set.fromList ' + toString(_elm_lang$core$Set$toList(v)); } if (v.ctor === 'RBNode_elm_builtin' || v.ctor === 'RBEmpty_elm_builtin') { return 'Dict.fromList ' + toString(_elm_lang$core$Dict$toList(v)); } var output = ''; for (var i in v) { if (i === 'ctor') continue; var str = toString(v[i]); var c0 = str[0]; var parenless = c0 === '{' || c0 === '(' || c0 === '<' || c0 === '"' || str.indexOf(' ') < 0; output += ' ' + (parenless ? str : '(' + str + ')'); } return v.ctor + output; } if (type === 'object') { if (v instanceof Date) { return '<' + v.toString() + '>'; } if (v.elm_web_socket) { return '<websocket>'; } var output = []; for (var k in v) { output.push(k + ' = ' + toString(v[k])); } if (output.length === 0) { return '{}'; } return '{ ' + output.join(', ') + ' }'; } return '<internal structure>'; } function addSlashes(str, isChar) { var s = str.replace(/\\/g, '\\\\') .replace(/\n/g, '\\n') .replace(/\t/g, '\\t') .replace(/\r/g, '\\r') .replace(/\v/g, '\\v') .replace(/\0/g, '\\0'); if (isChar) { return s.replace(/\'/g, '\\\''); } else { return s.replace(/\"/g, '\\"'); } } return { eq: eq, cmp: cmp, Tuple0: Tuple0, Tuple2: Tuple2, chr: chr, update: update, guid: guid, append: F2(append), crash: crash, crashCase: crashCase, toString: toString }; }(); var _elm_lang$core$Basics$never = function (_p0) { never: while (true) { var _p1 = _p0; var _v1 = _p1._0; _p0 = _v1; continue never; } }; var _elm_lang$core$Basics$uncurry = F2( function (f, _p2) { var _p3 = _p2; return A2(f, _p3._0, _p3._1); }); var _elm_lang$core$Basics$curry = F3( function (f, a, b) { return f( {ctor: '_Tuple2', _0: a, _1: b}); }); var _elm_lang$core$Basics$flip = F3( function (f, b, a) { return A2(f, a, b); }); var _elm_lang$core$Basics$always = F2( function (a, _p4) { return a; }); var _elm_lang$core$Basics$identity = function (x) { return x; }; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['<|'] = F2( function (f, x) { return f(x); }); var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['|>'] = F2( function (x, f) { return f(x); }); var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['>>'] = F3( function (f, g, x) { return g( f(x)); }); var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['<<'] = F3( function (g, f, x) { return g( f(x)); }); var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['++'] = _elm_lang$core$Native_Utils.append; var _elm_lang$core$Basics$toString = _elm_lang$core$Native_Utils.toString; var _elm_lang$core$Basics$isInfinite = _elm_lang$core$Native_Basics.isInfinite; var _elm_lang$core$Basics$isNaN = _elm_lang$core$Native_Basics.isNaN; var _elm_lang$core$Basics$toFloat = _elm_lang$core$Native_Basics.toFloat; var _elm_lang$core$Basics$ceiling = _elm_lang$core$Native_Basics.ceiling; var _elm_lang$core$Basics$floor = _elm_lang$core$Native_Basics.floor; var _elm_lang$core$Basics$truncate = _elm_lang$core$Native_Basics.truncate; var _elm_lang$core$Basics$round = _elm_lang$core$Native_Basics.round; var _elm_lang$core$Basics$not = _elm_lang$core$Native_Basics.not; var _elm_lang$core$Basics$xor = _elm_lang$core$Native_Basics.xor; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['||'] = _elm_lang$core$Native_Basics.or; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['&&'] = _elm_lang$core$Native_Basics.and; var _elm_lang$core$Basics$max = _elm_lang$core$Native_Basics.max; var _elm_lang$core$Basics$min = _elm_lang$core$Native_Basics.min; var _elm_lang$core$Basics$compare = _elm_lang$core$Native_Basics.compare; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['>='] = _elm_lang$core$Native_Basics.ge; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['<='] = _elm_lang$core$Native_Basics.le; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['>'] = _elm_lang$core$Native_Basics.gt; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['<'] = _elm_lang$core$Native_Basics.lt; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['/='] = _elm_lang$core$Native_Basics.neq; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['=='] = _elm_lang$core$Native_Basics.eq; var _elm_lang$core$Basics$e = _elm_lang$core$Native_Basics.e; var _elm_lang$core$Basics$pi = _elm_lang$core$Native_Basics.pi; var _elm_lang$core$Basics$clamp = _elm_lang$core$Native_Basics.clamp; var _elm_lang$core$Basics$logBase = _elm_lang$core$Native_Basics.logBase; var _elm_lang$core$Basics$abs = _elm_lang$core$Native_Basics.abs; var _elm_lang$core$Basics$negate = _elm_lang$core$Native_Basics.negate; var _elm_lang$core$Basics$sqrt = _elm_lang$core$Native_Basics.sqrt; var _elm_lang$core$Basics$atan2 = _elm_lang$core$Native_Basics.atan2; var _elm_lang$core$Basics$atan = _elm_lang$core$Native_Basics.atan; var _elm_lang$core$Basics$asin = _elm_lang$core$Native_Basics.asin; var _elm_lang$core$Basics$acos = _elm_lang$core$Native_Basics.acos; var _elm_lang$core$Basics$tan = _elm_lang$core$Native_Basics.tan; var _elm_lang$core$Basics$sin = _elm_lang$core$Native_Basics.sin; var _elm_lang$core$Basics$cos = _elm_lang$core$Native_Basics.cos; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['^'] = _elm_lang$core$Native_Basics.exp; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['%'] = _elm_lang$core$Native_Basics.mod; var _elm_lang$core$Basics$rem = _elm_lang$core$Native_Basics.rem; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['//'] = _elm_lang$core$Native_Basics.div; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['/'] = _elm_lang$core$Native_Basics.floatDiv; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['*'] = _elm_lang$core$Native_Basics.mul; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['-'] = _elm_lang$core$Native_Basics.sub; var _elm_lang$core$Basics_ops = _elm_lang$core$Basics_ops || {}; _elm_lang$core$Basics_ops['+'] = _elm_lang$core$Native_Basics.add; var _elm_lang$core$Basics$toPolar = _elm_lang$core$Native_Basics.toPolar; var _elm_lang$core$Basics$fromPolar = _elm_lang$core$Native_Basics.fromPolar; var _elm_lang$core$Basics$turns = _elm_lang$core$Native_Basics.turns; var _elm_lang$core$Basics$degrees = _elm_lang$core$Native_Basics.degrees; var _elm_lang$core$Basics$radians = function (t) { return t; }; var _elm_lang$core$Basics$GT = {ctor: 'GT'}; var _elm_lang$core$Basics$EQ = {ctor: 'EQ'}; var _elm_lang$core$Basics$LT = {ctor: 'LT'}; var _elm_lang$core$Basics$JustOneMore = function (a) { return {ctor: 'JustOneMore', _0: a}; }; var _elm_lang$core$Maybe$withDefault = F2( function ($default, maybe) { var _p0 = maybe; if (_p0.ctor === 'Just') { return _p0._0; } else { return $default; } }); var _elm_lang$core$Maybe$Nothing = {ctor: 'Nothing'}; var _elm_lang$core$Maybe$andThen = F2( function (callback, maybeValue) { var _p1 = maybeValue; if (_p1.ctor === 'Just') { return callback(_p1._0); } else { return _elm_lang$core$Maybe$Nothing; } }); var _elm_lang$core$Maybe$Just = function (a) { return {ctor: 'Just', _0: a}; }; var _elm_lang$core$Maybe$map = F2( function (f, maybe) { var _p2 = maybe; if (_p2.ctor === 'Just') { return _elm_lang$core$Maybe$Just( f(_p2._0)); } else { return _elm_lang$core$Maybe$Nothing; } }); var _elm_lang$core$Maybe$map2 = F3( function (func, ma, mb) { var _p3 = {ctor: '_Tuple2', _0: ma, _1: mb}; if (((_p3.ctor === '_Tuple2') && (_p3._0.ctor === 'Just')) && (_p3._1.ctor === 'Just')) { return _elm_lang$core$Maybe$Just( A2(func, _p3._0._0, _p3._1._0)); } else { return _elm_lang$core$Maybe$Nothing; } }); var _elm_lang$core$Maybe$map3 = F4( function (func, ma, mb, mc) { var _p4 = {ctor: '_Tuple3', _0: ma, _1: mb, _2: mc}; if ((((_p4.ctor === '_Tuple3') && (_p4._0.ctor === 'Just')) && (_p4._1.ctor === 'Just')) && (_p4._2.ctor === 'Just')) { return _elm_lang$core$Maybe$Just( A3(func, _p4._0._0, _p4._1._0, _p4._2._0)); } else { return _elm_lang$core$Maybe$Nothing; } }); var _elm_lang$core$Maybe$map4 = F5( function (func, ma, mb, mc, md) { var _p5 = {ctor: '_Tuple4', _0: ma, _1: mb, _2: mc, _3: md}; if (((((_p5.ctor === '_Tuple4') && (_p5._0.ctor === 'Just')) && (_p5._1.ctor === 'Just')) && (_p5._2.ctor === 'Just')) && (_p5._3.ctor === 'Just')) { return _elm_lang$core$Maybe$Just( A4(func, _p5._0._0, _p5._1._0, _p5._2._0, _p5._3._0)); } else { return _elm_lang$core$Maybe$Nothing; } }); var _elm_lang$core$Maybe$map5 = F6( function (func, ma, mb, mc, md, me) { var _p6 = {ctor: '_Tuple5', _0: ma, _1: mb, _2: mc, _3: md, _4: me}; if ((((((_p6.ctor === '_Tuple5') && (_p6._0.ctor === 'Just')) && (_p6._1.ctor === 'Just')) && (_p6._2.ctor === 'Just')) && (_p6._3.ctor === 'Just')) && (_p6._4.ctor === 'Just')) { return _elm_lang$core$Maybe$Just( A5(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0, _p6._4._0)); } else { return _elm_lang$core$Maybe$Nothing; } }); //import Native.Utils // var _elm_lang$core$Native_List = function() { var Nil = { ctor: '[]' }; function Cons(hd, tl) { return { ctor: '::', _0: hd, _1: tl }; } function fromArray(arr) { var out = Nil; for (var i = arr.length; i--; ) { out = Cons(arr[i], out); } return out; } function toArray(xs) { var out = []; while (xs.ctor !== '[]') { out.push(xs._0); xs = xs._1; } return out; } function foldr(f, b, xs) { var arr = toArray(xs); var acc = b; for (var i = arr.length; i--; ) { acc = A2(f, arr[i], acc); } return acc; } function map2(f, xs, ys) { var arr = []; while (xs.ctor !== '[]' && ys.ctor !== '[]') { arr.push(A2(f, xs._0, ys._0)); xs = xs._1; ys = ys._1; } return fromArray(arr); } function map3(f, xs, ys, zs) { var arr = []; while (xs.ctor !== '[]' && ys.ctor !== '[]' && zs.ctor !== '[]') { arr.push(A3(f, xs._0, ys._0, zs._0)); xs = xs._1; ys = ys._1; zs = zs._1; } return fromArray(arr); } function map4(f, ws, xs, ys, zs) { var arr = []; while ( ws.ctor !== '[]' && xs.ctor !== '[]' && ys.ctor !== '[]' && zs.ctor !== '[]') { arr.push(A4(f, ws._0, xs._0, ys._0, zs._0)); ws = ws._1; xs = xs._1; ys = ys._1; zs = zs._1; } return fromArray(arr); } function map5(f, vs, ws, xs, ys, zs) { var arr = []; while ( vs.ctor !== '[]' && ws.ctor !== '[]' && xs.ctor !== '[]' && ys.ctor !== '[]' && zs.ctor !== '[]') { arr.push(A5(f, vs._0, ws._0, xs._0, ys._0, zs._0)); vs = vs._1; ws = ws._1; xs = xs._1; ys = ys._1; zs = zs._1; } return fromArray(arr); } function sortBy(f, xs) { return fromArray(toArray(xs).sort(function(a, b) { return _elm_lang$core$Native_Utils.cmp(f(a), f(b)); })); } function sortWith(f, xs) { return fromArray(toArray(xs).sort(function(a, b) { var ord = f(a)(b).ctor; return ord === 'EQ' ? 0 : ord === 'LT' ? -1 : 1; })); } return { Nil: Nil, Cons: Cons, cons: F2(Cons), toArray: toArray, fromArray: fromArray, foldr: F3(foldr), map2: F3(map2), map3: F4(map3), map4: F5(map4), map5: F6(map5), sortBy: F2(sortBy), sortWith: F2(sortWith) }; }(); var _elm_lang$core$List$sortWith = _elm_lang$core$Native_List.sortWith; var _elm_lang$core$List$sortBy = _elm_lang$core$Native_List.sortBy; var _elm_lang$core$List$sort = function (xs) { return A2(_elm_lang$core$List$sortBy, _elm_lang$core$Basics$identity, xs); }; var _elm_lang$core$List$singleton = function (value) { return { ctor: '::', _0: value, _1: {ctor: '[]'} }; }; var _elm_lang$core$List$drop = F2( function (n, list) { drop: while (true) { if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { return list; } else { var _p0 = list; if (_p0.ctor === '[]') { return list; } else { var _v1 = n - 1, _v2 = _p0._1; n = _v1; list = _v2; continue drop; } } } }); var _elm_lang$core$List$map5 = _elm_lang$core$Native_List.map5; var _elm_lang$core$List$map4 = _elm_lang$core$Native_List.map4; var _elm_lang$core$List$map3 = _elm_lang$core$Native_List.map3; var _elm_lang$core$List$map2 = _elm_lang$core$Native_List.map2; var _elm_lang$core$List$any = F2( function (isOkay, list) { any: while (true) { var _p1 = list; if (_p1.ctor === '[]') { return false; } else { if (isOkay(_p1._0)) { return true; } else { var _v4 = isOkay, _v5 = _p1._1; isOkay = _v4; list = _v5; continue any; } } } }); var _elm_lang$core$List$all = F2( function (isOkay, list) { return !A2( _elm_lang$core$List$any, function (_p2) { return !isOkay(_p2); }, list); }); var _elm_lang$core$List$foldr = _elm_lang$core$Native_List.foldr; var _elm_lang$core$List$foldl = F3( function (func, acc, list) { foldl: while (true) { var _p3 = list; if (_p3.ctor === '[]') { return acc; } else { var _v7 = func, _v8 = A2(func, _p3._0, acc), _v9 = _p3._1; func = _v7; acc = _v8; list = _v9; continue foldl; } } }); var _elm_lang$core$List$length = function (xs) { return A3( _elm_lang$core$List$foldl, F2( function (_p4, i) { return i + 1; }), 0, xs); }; var _elm_lang$core$List$sum = function (numbers) { return A3( _elm_lang$core$List$foldl, F2( function (x, y) { return x + y; }), 0, numbers); }; var _elm_lang$core$List$product = function (numbers) { return A3( _elm_lang$core$List$foldl, F2( function (x, y) { return x * y; }), 1, numbers); }; var _elm_lang$core$List$maximum = function (list) { var _p5 = list; if (_p5.ctor === '::') { return _elm_lang$core$Maybe$Just( A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$max, _p5._0, _p5._1)); } else { return _elm_lang$core$Maybe$Nothing; } }; var _elm_lang$core$List$minimum = function (list) { var _p6 = list; if (_p6.ctor === '::') { return _elm_lang$core$Maybe$Just( A3(_elm_lang$core$List$foldl, _elm_lang$core$Basics$min, _p6._0, _p6._1)); } else { return _elm_lang$core$Maybe$Nothing; } }; var _elm_lang$core$List$member = F2( function (x, xs) { return A2( _elm_lang$core$List$any, function (a) { return _elm_lang$core$Native_Utils.eq(a, x); }, xs); }); var _elm_lang$core$List$isEmpty = function (xs) { var _p7 = xs; if (_p7.ctor === '[]') { return true; } else { return false; } }; var _elm_lang$core$List$tail = function (list) { var _p8 = list; if (_p8.ctor === '::') { return _elm_lang$core$Maybe$Just(_p8._1); } else { return _elm_lang$core$Maybe$Nothing; } }; var _elm_lang$core$List$head = function (list) { var _p9 = list; if (_p9.ctor === '::') { return _elm_lang$core$Maybe$Just(_p9._0); } else { return _elm_lang$core$Maybe$Nothing; } }; var _elm_lang$core$List_ops = _elm_lang$core$List_ops || {}; _elm_lang$core$List_ops['::'] = _elm_lang$core$Native_List.cons; var _elm_lang$core$List$map = F2( function (f, xs) { return A3( _elm_lang$core$List$foldr, F2( function (x, acc) { return { ctor: '::', _0: f(x), _1: acc }; }), {ctor: '[]'}, xs); }); var _elm_lang$core$List$filter = F2( function (pred, xs) { var conditionalCons = F2( function (front, back) { return pred(front) ? {ctor: '::', _0: front, _1: back} : back; }); return A3( _elm_lang$core$List$foldr, conditionalCons, {ctor: '[]'}, xs); }); var _elm_lang$core$List$maybeCons = F3( function (f, mx, xs) { var _p10 = f(mx); if (_p10.ctor === 'Just') { return {ctor: '::', _0: _p10._0, _1: xs}; } else { return xs; } }); var _elm_lang$core$List$filterMap = F2( function (f, xs) { return A3( _elm_lang$core$List$foldr, _elm_lang$core$List$maybeCons(f), {ctor: '[]'}, xs); }); var _elm_lang$core$List$reverse = function (list) { return A3( _elm_lang$core$List$foldl, F2( function (x, y) { return {ctor: '::', _0: x, _1: y}; }), {ctor: '[]'}, list); }; var _elm_lang$core$List$scanl = F3( function (f, b, xs) { var scan1 = F2( function (x, accAcc) { var _p11 = accAcc; if (_p11.ctor === '::') { return { ctor: '::', _0: A2(f, x, _p11._0), _1: accAcc }; } else { return {ctor: '[]'}; } }); return _elm_lang$core$List$reverse( A3( _elm_lang$core$List$foldl, scan1, { ctor: '::', _0: b, _1: {ctor: '[]'} }, xs)); }); var _elm_lang$core$List$append = F2( function (xs, ys) { var _p12 = ys; if (_p12.ctor === '[]') { return xs; } else { return A3( _elm_lang$core$List$foldr, F2( function (x, y) { return {ctor: '::', _0: x, _1: y}; }), ys, xs); } }); var _elm_lang$core$List$concat = function (lists) { return A3( _elm_lang$core$List$foldr, _elm_lang$core$List$append, {ctor: '[]'}, lists); }; var _elm_lang$core$List$concatMap = F2( function (f, list) { return _elm_lang$core$List$concat( A2(_elm_lang$core$List$map, f, list)); }); var _elm_lang$core$List$partition = F2( function (pred, list) { var step = F2( function (x, _p13) { var _p14 = _p13; var _p16 = _p14._0; var _p15 = _p14._1; return pred(x) ? { ctor: '_Tuple2', _0: {ctor: '::', _0: x, _1: _p16}, _1: _p15 } : { ctor: '_Tuple2', _0: _p16, _1: {ctor: '::', _0: x, _1: _p15} }; }); return A3( _elm_lang$core$List$foldr, step, { ctor: '_Tuple2', _0: {ctor: '[]'}, _1: {ctor: '[]'} }, list); }); var _elm_lang$core$List$unzip = function (pairs) { var step = F2( function (_p18, _p17) { var _p19 = _p18; var _p20 = _p17; return { ctor: '_Tuple2', _0: {ctor: '::', _0: _p19._0, _1: _p20._0}, _1: {ctor: '::', _0: _p19._1, _1: _p20._1} }; }); return A3( _elm_lang$core$List$foldr, step, { ctor: '_Tuple2', _0: {ctor: '[]'}, _1: {ctor: '[]'} }, pairs); }; var _elm_lang$core$List$intersperse = F2( function (sep, xs) { var _p21 = xs; if (_p21.ctor === '[]') { return {ctor: '[]'}; } else { var step = F2( function (x, rest) { return { ctor: '::', _0: sep, _1: {ctor: '::', _0: x, _1: rest} }; }); var spersed = A3( _elm_lang$core$List$foldr, step, {ctor: '[]'}, _p21._1); return {ctor: '::', _0: _p21._0, _1: spersed}; } }); var _elm_lang$core$List$takeReverse = F3( function (n, list, taken) { takeReverse: while (true) { if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { return taken; } else { var _p22 = list; if (_p22.ctor === '[]') { return taken; } else { var _v23 = n - 1, _v24 = _p22._1, _v25 = {ctor: '::', _0: _p22._0, _1: taken}; n = _v23; list = _v24; taken = _v25; continue takeReverse; } } } }); var _elm_lang$core$List$takeTailRec = F2( function (n, list) { return _elm_lang$core$List$reverse( A3( _elm_lang$core$List$takeReverse, n, list, {ctor: '[]'})); }); var _elm_lang$core$List$takeFast = F3( function (ctr, n, list) { if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { return {ctor: '[]'}; } else { var _p23 = {ctor: '_Tuple2', _0: n, _1: list}; _v26_5: do { _v26_1: do { if (_p23.ctor === '_Tuple2') { if (_p23._1.ctor === '[]') { return list; } else { if (_p23._1._1.ctor === '::') { switch (_p23._0) { case 1: break _v26_1; case 2: return { ctor: '::', _0: _p23._1._0, _1: { ctor: '::', _0: _p23._1._1._0, _1: {ctor: '[]'} } }; case 3: if (_p23._1._1._1.ctor === '::') { return { ctor: '::', _0: _p23._1._0, _1: { ctor: '::', _0: _p23._1._1._0, _1: { ctor: '::', _0: _p23._1._1._1._0, _1: {ctor: '[]'} } } }; } else { break _v26_5; } default: if ((_p23._1._1._1.ctor === '::') && (_p23._1._1._1._1.ctor === '::')) { var _p28 = _p23._1._1._1._0; var _p27 = _p23._1._1._0; var _p26 = _p23._1._0; var _p25 = _p23._1._1._1._1._0; var _p24 = _p23._1._1._1._1._1; return (_elm_lang$core$Native_Utils.cmp(ctr, 1000) > 0) ? { ctor: '::', _0: _p26, _1: { ctor: '::', _0: _p27, _1: { ctor: '::', _0: _p28, _1: { ctor: '::', _0: _p25, _1: A2(_elm_lang$core$List$takeTailRec, n - 4, _p24) } } } } : { ctor: '::', _0: _p26, _1: { ctor: '::', _0: _p27, _1: { ctor: '::', _0: _p28, _1: { ctor: '::', _0: _p25, _1: A3(_elm_lang$core$List$takeFast, ctr + 1, n - 4, _p24) } } } }; } else { break _v26_5; } } } else { if (_p23._0 === 1) { break _v26_1; } else { break _v26_5; } } } } else { break _v26_5; } } while(false); return { ctor: '::', _0: _p23._1._0, _1: {ctor: '[]'} }; } while(false); return list; } }); var _elm_lang$core$List$take = F2( function (n, list) { return A3(_elm_lang$core$List$takeFast, 0, n, list); }); var _elm_lang$core$List$repeatHelp = F3( function (result, n, value) { repeatHelp: while (true) { if (_elm_lang$core$Native_Utils.cmp(n, 0) < 1) { return result; } else { var _v27 = {ctor: '::', _0: value, _1: result}, _v28 = n - 1, _v29 = value; result = _v27; n = _v28; value = _v29; continue repeatHelp; } } }); var _elm_lang$core$List$repeat = F2( function (n, value) { return A3( _elm_lang$core$List$repeatHelp, {ctor: '[]'}, n, value); }); var _elm_lang$core$List$rangeHelp = F3( function (lo, hi, list) { rangeHelp: while (true) { if (_elm_lang$core$Native_Utils.cmp(lo, hi) < 1) { var _v30 = lo, _v31 = hi - 1, _v32 = {ctor: '::', _0: hi, _1: list}; lo = _v30; hi = _v31; list = _v32; continue rangeHelp; } else { return list; } } }); var _elm_lang$core$List$range = F2( function (lo, hi) { return A3( _elm_lang$core$List$rangeHelp, lo, hi, {ctor: '[]'}); }); var _elm_lang$core$List$indexedMap = F2( function (f, xs) { return A3( _elm_lang$core$List$map2, f, A2( _elm_lang$core$List$range, 0, _elm_lang$core$List$length(xs) - 1), xs); }); var _elm_lang$core$Array$append = _elm_lang$core$Native_Array.append; var _elm_lang$core$Array$length = _elm_lang$core$Native_Array.length; var _elm_lang$core$Array$isEmpty = function (array) { return _elm_lang$core$Native_Utils.eq( _elm_lang$core$Array$length(array), 0); }; var _elm_lang$core$Array$slice = _elm_lang$core$Native_Array.slice; var _elm_lang$core$Array$set = _elm_lang$core$Native_Array.set; var _elm_lang$core$Array$get = F2( function (i, array) { return ((_elm_lang$core$Native_Utils.cmp(0, i) < 1) && (_elm_lang$core$Native_Utils.cmp( i, _elm_lang$core$Native_Array.length(array)) < 0)) ? _elm_lang$core$Maybe$Just( A2(_elm_lang$core$Native_Array.get, i, array)) : _elm_lang$core$Maybe$Nothing; }); var _elm_lang$core$Array$push = _elm_lang$core$Native_Array.push; var _elm_lang$core$Array$empty = _elm_lang$core$Native_Array.empty; var _elm_lang$core$Array$filter = F2( function (isOkay, arr) { var update = F2( function (x, xs) { return isOkay(x) ? A2(_elm_lang$core$Native_Array.push, x, xs) : xs; }); return A3(_elm_lang$core$Native_Array.foldl, update, _elm_lang$core$Native_Array.empty, arr); }); var _elm_lang$core$Array$foldr = _elm_lang$core$Native_Array.foldr; var _elm_lang$core$Array$foldl = _elm_lang$core$Native_Array.foldl; var _elm_lang$core$Array$indexedMap = _elm_lang$core$Native_Array.indexedMap; var _elm_lang$core$Array$map = _elm_lang$core$Native_Array.map; var _elm_lang$core$Array$toIndexedList = function (array) { return A3( _elm_lang$core$List$map2, F2( function (v0, v1) { return {ctor: '_Tuple2', _0: v0, _1: v1}; }), A2( _elm_lang$core$List$range, 0, _elm_lang$core$Native_Array.length(array) - 1), _elm_lang$core$Native_Array.toList(array)); }; var _elm_lang$core$Array$toList = _elm_lang$core$Native_Array.toList; var _elm_lang$core$Array$fromList = _elm_lang$core$Native_Array.fromList; var _elm_lang$core$Array$initialize = _elm_lang$core$Native_Array.initialize; var _elm_lang$core$Array$repeat = F2( function (n, e) { return A2( _elm_lang$core$Array$initialize, n, _elm_lang$core$Basics$always(e)); }); var _elm_lang$core$Array$Array = {ctor: 'Array'}; //import Native.Utils // var _elm_lang$core$Native_Char = function() { return { fromCode: function(c) { return _elm_lang$core$Native_Utils.chr(String.fromCharCode(c)); }, toCode: function(c) { return c.charCodeAt(0); }, toUpper: function(c) { return _elm_lang$core$Native_Utils.chr(c.toUpperCase()); }, toLower: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLowerCase()); }, toLocaleUpper: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLocaleUpperCase()); }, toLocaleLower: function(c) { return _elm_lang$core$Native_Utils.chr(c.toLocaleLowerCase()); } }; }(); var _elm_lang$core$Char$fromCode = _elm_lang$core$Native_Char.fromCode; var _elm_lang$core$Char$toCode = _elm_lang$core$Native_Char.toCode; var _elm_lang$core$Char$toLocaleLower = _elm_lang$core$Native_Char.toLocaleLower; var _elm_lang$core$Char$toLocaleUpper = _elm_lang$core$Native_Char.toLocaleUpper; var _elm_lang$core$Char$toLower = _elm_lang$core$Native_Char.toLower; var _elm_lang$core$Char$toUpper = _elm_lang$core$Native_Char.toUpper; var _elm_lang$core$Char$isBetween = F3( function (low, high, $char) { var code = _elm_lang$core$Char$toCode($char); return (_elm_lang$core$Native_Utils.cmp( code, _elm_lang$core$Char$toCode(low)) > -1) && (_elm_lang$core$Native_Utils.cmp( code, _elm_lang$core$Char$toCode(high)) < 1); }); var _elm_lang$core$Char$isUpper = A2( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('A'), _elm_lang$core$Native_Utils.chr('Z')); var _elm_lang$core$Char$isLower = A2( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('a'), _elm_lang$core$Native_Utils.chr('z')); var _elm_lang$core$Char$isDigit = A2( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('0'), _elm_lang$core$Native_Utils.chr('9')); var _elm_lang$core$Char$isOctDigit = A2( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('0'), _elm_lang$core$Native_Utils.chr('7')); var _elm_lang$core$Char$isHexDigit = function ($char) { return _elm_lang$core$Char$isDigit($char) || (A3( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('a'), _elm_lang$core$Native_Utils.chr('f'), $char) || A3( _elm_lang$core$Char$isBetween, _elm_lang$core$Native_Utils.chr('A'), _elm_lang$core$Native_Utils.chr('F'), $char)); }; //import Native.Utils // var _elm_lang$core$Native_Scheduler = function() { var MAX_STEPS = 10000; // TASKS function succeed(value) { return { ctor: '_Task_succeed', value: value }; } function fail(error) { return { ctor: '_Task_fail', value: error }; } function nativeBinding(callback) { return { ctor: '_Task_nativeBinding', callback: callback, cancel: null }; } function andThen(callback, task) { return { ctor: '_Task_andThen', callback: callback, task: task }; } function onError(callback, task) { return { ctor: '_Task_onError', callback: callback, task: task }; } function receive(callback) { return { ctor: '_Task_receive', callback: callback }; } // PROCESSES function rawSpawn(task) { var process = { ctor: '_Process', id: _elm_lang$core$Native_Utils.guid(), root: task, stack: null, mailbox: [] }; enqueue(process); return process; } function spawn(task) { return nativeBinding(function(callback) { var process = rawSpawn(task); callback(succeed(process)); }); } function rawSend(process, msg) { process.mailbox.push(msg); enqueue(process); } function send(process, msg) { return nativeBinding(function(callback) { rawSend(process, msg); callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); }); } function kill(process) { return nativeBinding(function(callback) { var root = process.root; if (root.ctor === '_Task_nativeBinding' && root.cancel) { root.cancel(); } process.root = null; callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); }); } function sleep(time) { return nativeBinding(function(callback) { var id = setTimeout(function() { callback(succeed(_elm_lang$core$Native_Utils.Tuple0)); }, time); return function() { clearTimeout(id); }; }); } // STEP PROCESSES function step(numSteps, process) { while (numSteps < MAX_STEPS) { var ctor = process.root.ctor; if (ctor === '_Task_succeed') { while (process.stack && process.stack.ctor === '_Task_onError') { process.stack = process.stack.rest; } if (process.stack === null) { break; } process.root = process.stack.callback(process.root.value); process.stack = process.stack.rest; ++numSteps; continue; } if (ctor === '_Task_fail') { while (process.stack && process.stack.ctor === '_Task_andThen') { process.stack = process.stack.rest; } if (process.stack === null) { break; } process.root = process.stack.callback(process.root.value); process.stack = process.stack.rest; ++numSteps; continue; } if (ctor === '_Task_andThen') { process.stack = { ctor: '_Task_andThen', callback: process.root.callback, rest: process.stack }; process.root = process.root.task; ++numSteps; continue; } if (ctor === '_Task_onError') { process.stack = { ctor: '_Task_onError', callback: process.root.callback, rest: process.stack }; process.root = process.root.task; ++numSteps; continue; } if (ctor === '_Task_nativeBinding') { process.root.cancel = process.root.callback(function(newRoot) { process.root = newRoot; enqueue(process); }); break; } if (ctor === '_Task_receive') { var mailbox = process.mailbox; if (mailbox.length === 0) { break; } process.root = process.root.callback(mailbox.shift()); ++numSteps; continue; } throw new Error(ctor); } if (numSteps < MAX_STEPS) { return numSteps + 1; } enqueue(process); return numSteps; } // WORK QUEUE var working = false; var workQueue = []; function enqueue(process) { workQueue.push(process); if (!working) { setTimeout(work, 0); working = true; } } function work() { var numSteps = 0; var process; while (numSteps < MAX_STEPS && (process = workQueue.shift())) { if (process.root) { numSteps = step(numSteps, process); } } if (!process) { working = false; return; } setTimeout(work, 0); } return { succeed: succeed, fail: fail, nativeBinding: nativeBinding, andThen: F2(andThen), onError: F2(onError), receive: receive, spawn: spawn, kill: kill, sleep: sleep, send: F2(send), rawSpawn: rawSpawn, rawSend: rawSend }; }(); //import // var _elm_lang$core$Native_Platform = function() { // PROGRAMS function program(impl) { return function(flagDecoder) { return function(object, moduleName) { object['worker'] = function worker(flags) { if (typeof flags !== 'undefined') { throw new Error( 'The `' + moduleName + '` module does not need flags.\n' + 'Call ' + moduleName + '.worker() with no arguments and you should be all set!' ); } return initialize( impl.init, impl.update, impl.subscriptions, renderer ); }; }; }; } function programWithFlags(impl) { return function(flagDecoder) { return function(object, moduleName) { object['worker'] = function worker(flags) { if (typeof flagDecoder === 'undefined') { throw new Error( 'Are you trying to sneak a Never value into Elm? Trickster!\n' + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n' + 'Use `program` instead if you do not want flags.' ); } var result = A2(_elm_lang$core$Native_Json.run, flagDecoder, flags); if (result.ctor === 'Err') { throw new Error( moduleName + '.worker(...) was called with an unexpected argument.\n' + 'I tried to convert it to an Elm value, but ran into this problem:\n\n' + result._0 ); } return initialize( impl.init(result._0), impl.update, impl.subscriptions, renderer ); }; }; }; } function renderer(enqueue, _) { return function(_) {}; } // HTML TO PROGRAM function htmlToProgram(vnode) { var emptyBag = batch(_elm_lang$core$Native_List.Nil); var noChange = _elm_lang$core$Native_Utils.Tuple2( _elm_lang$core$Native_Utils.Tuple0, emptyBag ); return _elm_lang$virtual_dom$VirtualDom$program({ init: noChange, view: function(model) { return main; }, update: F2(function(msg, model) { return noChange; }), subscriptions: function (model) { return emptyBag; } }); } // INITIALIZE A PROGRAM function initialize(init, update, subscriptions, renderer) { // ambient state var managers = {}; var updateView; // init and update state in main process var initApp = _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { var model = init._0; updateView = renderer(enqueue, model); var cmds = init._1; var subs = subscriptions(model); dispatchEffects(managers, cmds, subs); callback(_elm_lang$core$Native_Scheduler.succeed(model)); }); function onMessage(msg, model) { return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { var results = A2(update, msg, model); model = results._0; updateView(model); var cmds = results._1; var subs = subscriptions(model); dispatchEffects(managers, cmds, subs); callback(_elm_lang$core$Native_Scheduler.succeed(model)); }); } var mainProcess = spawnLoop(initApp, onMessage); function enqueue(msg) { _elm_lang$core$Native_Scheduler.rawSend(mainProcess, msg); } var ports = setupEffects(managers, enqueue); return ports ? { ports: ports } : {}; } // EFFECT MANAGERS var effectManagers = {}; function setupEffects(managers, callback) { var ports; // setup all necessary effect managers for (var key in effectManagers) { var manager = effectManagers[key]; if (manager.isForeign) { ports = ports || {}; ports[key] = manager.tag === 'cmd' ? setupOutgoingPort(key) : setupIncomingPort(key, callback); } managers[key] = makeManager(manager, callback); } return ports; } function makeManager(info, callback) { var router = { main: callback, self: undefined }; var tag = info.tag; var onEffects = info.onEffects; var onSelfMsg = info.onSelfMsg; function onMessage(msg, state) { if (msg.ctor === 'self') { return A3(onSelfMsg, router, msg._0, state); } var fx = msg._0; switch (tag) { case 'cmd': return A3(onEffects, router, fx.cmds, state); case 'sub': return A3(onEffects, router, fx.subs, state); case 'fx': return A4(onEffects, router, fx.cmds, fx.subs, state); } } var process = spawnLoop(info.init, onMessage); router.self = process; return process; } function sendToApp(router, msg) { return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { router.main(msg); callback(_elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0)); }); } function sendToSelf(router, msg) { return A2(_elm_lang$core$Native_Scheduler.send, router.self, { ctor: 'self', _0: msg }); } // HELPER for STATEFUL LOOPS function spawnLoop(init, onMessage) { var andThen = _elm_lang$core$Native_Scheduler.andThen; function loop(state) { var handleMsg = _elm_lang$core$Native_Scheduler.receive(function(msg) { return onMessage(msg, state); }); return A2(andThen, loop, handleMsg); } var task = A2(andThen, loop, init); return _elm_lang$core$Native_Scheduler.rawSpawn(task); } // BAGS function leaf(home) { return function(value) { return { type: 'leaf', home: home, value: value }; }; } function batch(list) { return { type: 'node', branches: list }; } function map(tagger, bag) { return { type: 'map', tagger: tagger, tree: bag } } // PIPE BAGS INTO EFFECT MANAGERS function dispatchEffects(managers, cmdBag, subBag) { var effectsDict = {}; gatherEffects(true, cmdBag, effectsDict, null); gatherEffects(false, subBag, effectsDict, null); for (var home in managers) { var fx = home in effectsDict ? effectsDict[home] : { cmds: _elm_lang$core$Native_List.Nil, subs: _elm_lang$core$Native_List.Nil }; _elm_lang$core$Native_Scheduler.rawSend(managers[home], { ctor: 'fx', _0: fx }); } } function gatherEffects(isCmd, bag, effectsDict, taggers) { switch (bag.type) { case 'leaf': var home = bag.home; var effect = toEffect(isCmd, home, taggers, bag.value); effectsDict[home] = insert(isCmd, effect, effectsDict[home]); return; case 'node': var list = bag.branches; while (list.ctor !== '[]') { gatherEffects(isCmd, list._0, effectsDict, taggers); list = list._1; } return; case 'map': gatherEffects(isCmd, bag.tree, effectsDict, { tagger: bag.tagger, rest: taggers }); return; } } function toEffect(isCmd, home, taggers, value) { function applyTaggers(x) { var temp = taggers; while (temp) { x = temp.tagger(x); temp = temp.rest; } return x; } var map = isCmd ? effectManagers[home].cmdMap : effectManagers[home].subMap; return A2(map, applyTaggers, value) } function insert(isCmd, newEffect, effects) { effects = effects || { cmds: _elm_lang$core$Native_List.Nil, subs: _elm_lang$core$Native_List.Nil }; if (isCmd) { effects.cmds = _elm_lang$core$Native_List.Cons(newEffect, effects.cmds); return effects; } effects.subs = _elm_lang$core$Native_List.Cons(newEffect, effects.subs); return effects; } // PORTS function checkPortName(name) { if (name in effectManagers) { throw new Error('There can only be one port named `' + name + '`, but your program has multiple.'); } } // OUTGOING PORTS function outgoingPort(name, converter) { checkPortName(name); effectManagers[name] = { tag: 'cmd', cmdMap: outgoingPortMap, converter: converter, isForeign: true }; return leaf(name); } var outgoingPortMap = F2(function cmdMap(tagger, value) { return value; }); function setupOutgoingPort(name) { var subs = []; var converter = effectManagers[name].converter; // CREATE MANAGER var init = _elm_lang$core$Native_Scheduler.succeed(null); function onEffects(router, cmdList, state) { while (cmdList.ctor !== '[]') { // grab a separate reference to subs in case unsubscribe is called var currentSubs = subs; var value = converter(cmdList._0); for (var i = 0; i < currentSubs.length; i++) { currentSubs[i](value); } cmdList = cmdList._1; } return init; } effectManagers[name].init = init; effectManagers[name].onEffects = F3(onEffects); // PUBLIC API function subscribe(callback) { subs.push(callback); } function unsubscribe(callback) { // copy subs into a new array in case unsubscribe is called within a // subscribed callback subs = subs.slice(); var index = subs.indexOf(callback); if (index >= 0) { subs.splice(index, 1); } } return { subscribe: subscribe, unsubscribe: unsubscribe }; } // INCOMING PORTS function incomingPort(name, converter) { checkPortName(name); effectManagers[name] = { tag: 'sub', subMap: incomingPortMap, converter: converter, isForeign: true }; return leaf(name); } var incomingPortMap = F2(function subMap(tagger, finalTagger) { return function(value) { return tagger(finalTagger(value)); }; }); function setupIncomingPort(name, callback) { var sentBeforeInit = []; var subs = _elm_lang$core$Native_List.Nil; var converter = effectManagers[name].converter; var currentOnEffects = preInitOnEffects; var currentSend = preInitSend; // CREATE MANAGER var init = _elm_lang$core$Native_Scheduler.succeed(null); function preInitOnEffects(router, subList, state) { var postInitResult = postInitOnEffects(router, subList, state); for(var i = 0; i < sentBeforeInit.length; i++) { postInitSend(sentBeforeInit[i]); } sentBeforeInit = null; // to release objects held in queue currentSend = postInitSend; currentOnEffects = postInitOnEffects; return postInitResult; } function postInitOnEffects(router, subList, state) { subs = subList; return init; } function onEffects(router, subList, state) { return currentOnEffects(router, subList, state); } effectManagers[name].init = init; effectManagers[name].onEffects = F3(onEffects); // PUBLIC API function preInitSend(value) { sentBeforeInit.push(value); } function postInitSend(value) { var temp = subs; while (temp.ctor !== '[]') { callback(temp._0(value)); temp = temp._1; } } function send(incomingValue) { var result = A2(_elm_lang$core$Json_Decode$decodeValue, converter, incomingValue); if (result.ctor === 'Err') { throw new Error('Trying to send an unexpected type of value through port `' + name + '`:\n' + result._0); } currentSend(result._0); } return { send: send }; } return { // routers sendToApp: F2(sendToApp), sendToSelf: F2(sendToSelf), // global setup effectManagers: effectManagers, outgoingPort: outgoingPort, incomingPort: incomingPort, htmlToProgram: htmlToProgram, program: program, programWithFlags: programWithFlags, initialize: initialize, // effect bags leaf: leaf, batch: batch, map: F2(map) }; }(); var _elm_lang$core$Platform_Cmd$batch = _elm_lang$core$Native_Platform.batch; var _elm_lang$core$Platform_Cmd$none = _elm_lang$core$Platform_Cmd$batch( {ctor: '[]'}); var _elm_lang$core$Platform_Cmd_ops = _elm_lang$core$Platform_Cmd_ops || {}; _elm_lang$core$Platform_Cmd_ops['!'] = F2( function (model, commands) { return { ctor: '_Tuple2', _0: model, _1: _elm_lang$core$Platform_Cmd$batch(commands) }; }); var _elm_lang$core$Platform_Cmd$map = _elm_lang$core$Native_Platform.map; var _elm_lang$core$Platform_Cmd$Cmd = {ctor: 'Cmd'}; var _elm_lang$core$Platform_Sub$batch = _elm_lang$core$Native_Platform.batch; var _elm_lang$core$Platform_Sub$none = _elm_lang$core$Platform_Sub$batch( {ctor: '[]'}); var _elm_lang$core$Platform_Sub$map = _elm_lang$core$Native_Platform.map; var _elm_lang$core$Platform_Sub$Sub = {ctor: 'Sub'}; var _elm_lang$core$Platform$hack = _elm_lang$core$Native_Scheduler.succeed; var _elm_lang$core$Platform$sendToSelf = _elm_lang$core$Native_Platform.sendToSelf; var _elm_lang$core$Platform$sendToApp = _elm_lang$core$Native_Platform.sendToApp; var _elm_lang$core$Platform$programWithFlags = _elm_lang$core$Native_Platform.programWithFlags; var _elm_lang$core$Platform$program = _elm_lang$core$Native_Platform.program; var _elm_lang$core$Platform$Program = {ctor: 'Program'}; var _elm_lang$core$Platform$Task = {ctor: 'Task'}; var _elm_lang$core$Platform$ProcessId = {ctor: 'ProcessId'}; var _elm_lang$core$Platform$Router = {ctor: 'Router'}; var _elm_lang$core$Result$toMaybe = function (result) { var _p0 = result; if (_p0.ctor === 'Ok') { return _elm_lang$core$Maybe$Just(_p0._0); } else { return _elm_lang$core$Maybe$Nothing; } }; var _elm_lang$core$Result$withDefault = F2( function (def, result) { var _p1 = result; if (_p1.ctor === 'Ok') { return _p1._0; } else { return def; } }); var _elm_lang$core$Result$Err = function (a) { return {ctor: 'Err', _0: a}; }; var _elm_lang$core$Result$andThen = F2( function (callback, result) { var _p2 = result; if (_p2.ctor === 'Ok') { return callback(_p2._0); } else { return _elm_lang$core$Result$Err(_p2._0); } }); var _elm_lang$core$Result$Ok = function (a) { return {ctor: 'Ok', _0: a}; }; var _elm_lang$core$Result$map = F2( function (func, ra) { var _p3 = ra; if (_p3.ctor === 'Ok') { return _elm_lang$core$Result$Ok( func(_p3._0)); } else { return _elm_lang$core$Result$Err(_p3._0); } }); var _elm_lang$core$Result$map2 = F3( function (func, ra, rb) { var _p4 = {ctor: '_Tuple2', _0: ra, _1: rb}; if (_p4._0.ctor === 'Ok') { if (_p4._1.ctor === 'Ok') { return _elm_lang$core$Result$Ok( A2(func, _p4._0._0, _p4._1._0)); } else { return _elm_lang$core$Result$Err(_p4._1._0); } } else { return _elm_lang$core$Result$Err(_p4._0._0); } }); var _elm_lang$core$Result$map3 = F4( function (func, ra, rb, rc) { var _p5 = {ctor: '_Tuple3', _0: ra, _1: rb, _2: rc}; if (_p5._0.ctor === 'Ok') { if (_p5._1.ctor === 'Ok') { if (_p5._2.ctor === 'Ok') { return _elm_lang$core$Result$Ok( A3(func, _p5._0._0, _p5._1._0, _p5._2._0)); } else { return _elm_lang$core$Result$Err(_p5._2._0); } } else { return _elm_lang$core$Result$Err(_p5._1._0); } } else { return _elm_lang$core$Result$Err(_p5._0._0); } }); var _elm_lang$core$Result$map4 = F5( function (func, ra, rb, rc, rd) { var _p6 = {ctor: '_Tuple4', _0: ra, _1: rb, _2: rc, _3: rd}; if (_p6._0.ctor === 'Ok') { if (_p6._1.ctor === 'Ok') { if (_p6._2.ctor === 'Ok') { if (_p6._3.ctor === 'Ok') { return _elm_lang$core$Result$Ok( A4(func, _p6._0._0, _p6._1._0, _p6._2._0, _p6._3._0)); } else { return _elm_lang$core$Result$Err(_p6._3._0); } } else { return _elm_lang$core$Result$Err(_p6._2._0); } } else { return _elm_lang$core$Result$Err(_p6._1._0); } } else { return _elm_lang$core$Result$Err(_p6._0._0); } }); var _elm_lang$core$Result$map5 = F6( function (func, ra, rb, rc, rd, re) { var _p7 = {ctor: '_Tuple5', _0: ra, _1: rb, _2: rc, _3: rd, _4: re}; if (_p7._0.ctor === 'Ok') { if (_p7._1.ctor === 'Ok') { if (_p7._2.ctor === 'Ok') { if (_p7._3.ctor === 'Ok') { if (_p7._4.ctor === 'Ok') { return _elm_lang$core$Result$Ok( A5(func, _p7._0._0, _p7._1._0, _p7._2._0, _p7._3._0, _p7._4._0)); } else { return _elm_lang$core$Result$Err(_p7._4._0); } } else { return _elm_lang$core$Result$Err(_p7._3._0); } } else { return _elm_lang$core$Result$Err(_p7._2._0); } } else { return _elm_lang$core$Result$Err(_p7._1._0); } } else { return _elm_lang$core$Result$Err(_p7._0._0); } }); var _elm_lang$core$Result$mapError = F2( function (f, result) { var _p8 = result; if (_p8.ctor === 'Ok') { return _elm_lang$core$Result$Ok(_p8._0); } else { return _elm_lang$core$Result$Err( f(_p8._0)); } }); var _elm_lang$core$Result$fromMaybe = F2( function (err, maybe) { var _p9 = maybe; if (_p9.ctor === 'Just') { return _elm_lang$core$Result$Ok(_p9._0); } else { return _elm_lang$core$Result$Err(err); } }); //import Native.Utils // var _elm_lang$core$Native_Debug = function() { function log(tag, value) { var msg = tag + ': ' + _elm_lang$core$Native_Utils.toString(value); var process = process || {}; if (process.stdout) { process.stdout.write(msg); } else { console.log(msg); } return value; } function crash(message) { throw new Error(message); } return { crash: crash, log: F2(log) }; }(); //import Maybe, Native.List, Native.Utils, Result // var _elm_lang$core$Native_String = function() { function isEmpty(str) { return str.length === 0; } function cons(chr, str) { return chr + str; } function uncons(str) { var hd = str[0]; if (hd) { return _elm_lang$core$Maybe$Just(_elm_lang$core$Native_Utils.Tuple2(_elm_lang$core$Native_Utils.chr(hd), str.slice(1))); } return _elm_lang$core$Maybe$Nothing; } function append(a, b) { return a + b; } function concat(strs) { return _elm_lang$core$Native_List.toArray(strs).join(''); } function length(str) { return str.length; } function map(f, str) { var out = str.split(''); for (var i = out.length; i--; ) { out[i] = f(_elm_lang$core$Native_Utils.chr(out[i])); } return out.join(''); } function filter(pred, str) { return str.split('').map(_elm_lang$core$Native_Utils.chr).filter(pred).join(''); } function reverse(str) { return str.split('').reverse().join(''); } function foldl(f, b, str) { var len = str.length; for (var i = 0; i < len; ++i) { b = A2(f, _elm_lang$core$Native_Utils.chr(str[i]), b); } return b; } function foldr(f, b, str) { for (var i = str.length; i--; ) { b = A2(f, _elm_lang$core$Native_Utils.chr(str[i]), b); } return b; } function split(sep, str) { return _elm_lang$core$Native_List.fromArray(str.split(sep)); } function join(sep, strs) { return _elm_lang$core$Native_List.toArray(strs).join(sep); } function repeat(n, str) { var result = ''; while (n > 0) { if (n & 1) { result += str; } n >>= 1, str += str; } return result; } function slice(start, end, str) { return str.slice(start, end); } function left(n, str) { return n < 1 ? '' : str.slice(0, n); } function right(n, str) { return n < 1 ? '' : str.slice(-n); } function dropLeft(n, str) { return n < 1 ? str : str.slice(n); } function dropRight(n, str) { return n < 1 ? str : str.slice(0, -n); } function pad(n, chr, str) { var half = (n - str.length) / 2; return repeat(Math.ceil(half), chr) + str + repeat(half | 0, chr); } function padRight(n, chr, str) { return str + repeat(n - str.length, chr); } function padLeft(n, chr, str) { return repeat(n - str.length, chr) + str; } function trim(str) { return str.trim(); } function trimLeft(str) { return str.replace(/^\s+/, ''); } function trimRight(str) { return str.replace(/\s+$/, ''); } function words(str) { return _elm_lang$core$Native_List.fromArray(str.trim().split(/\s+/g)); } function lines(str) { return _elm_lang$core$Native_List.fromArray(str.split(/\r\n|\r|\n/g)); } function toUpper(str) { return str.toUpperCase(); } function toLower(str) { return str.toLowerCase(); } function any(pred, str) { for (var i = str.length; i--; ) { if (pred(_elm_lang$core$Native_Utils.chr(str[i]))) { return true; } } return false; } function all(pred, str) { for (var i = str.length; i--; ) { if (!pred(_elm_lang$core$Native_Utils.chr(str[i]))) { return false; } } return true; } function contains(sub, str) { return str.indexOf(sub) > -1; } function startsWith(sub, str) { return str.indexOf(sub) === 0; } function endsWith(sub, str) { return str.length >= sub.length && str.lastIndexOf(sub) === str.length - sub.length; } function indexes(sub, str) { var subLen = sub.length; if (subLen < 1) { return _elm_lang$core$Native_List.Nil; } var i = 0; var is = []; while ((i = str.indexOf(sub, i)) > -1) { is.push(i); i = i + subLen; } return _elm_lang$core$Native_List.fromArray(is); } function toInt(s) { var len = s.length; // if empty if (len === 0) { return intErr(s); } // if hex var c = s[0]; if (c === '0' && s[1] === 'x') { for (var i = 2; i < len; ++i) { var c = s[i]; if (('0' <= c && c <= '9') || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f')) { continue; } return intErr(s); } return _elm_lang$core$Result$Ok(parseInt(s, 16)); } // is decimal if (c > '9' || (c < '0' && c !== '-' && c !== '+')) { return intErr(s); } for (var i = 1; i < len; ++i) { var c = s[i]; if (c < '0' || '9' < c) { return intErr(s); } } return _elm_lang$core$Result$Ok(parseInt(s, 10)); } function intErr(s) { return _elm_lang$core$Result$Err("could not convert string '" + s + "' to an Int"); } function toFloat(s) { // check if it is a hex, octal, or binary number if (s.length === 0 || /[\sxbo]/.test(s)) { return floatErr(s); } var n = +s; // faster isNaN check return n === n ? _elm_lang$core$Result$Ok(n) : floatErr(s); } function floatErr(s) { return _elm_lang$core$Result$Err("could not convert string '" + s + "' to a Float"); } function toList(str) { return _elm_lang$core$Native_List.fromArray(str.split('').map(_elm_lang$core$Native_Utils.chr)); } function fromList(chars) { return _elm_lang$core$Native_List.toArray(chars).join(''); } return { isEmpty: isEmpty, cons: F2(cons), uncons: uncons, append: F2(append), concat: concat, length: length, map: F2(map), filter: F2(filter), reverse: reverse, foldl: F3(foldl), foldr: F3(foldr), split: F2(split), join: F2(join), repeat: F2(repeat), slice: F3(slice), left: F2(left), right: F2(right), dropLeft: F2(dropLeft), dropRight: F2(dropRight), pad: F3(pad), padLeft: F3(padLeft), padRight: F3(padRight), trim: trim, trimLeft: trimLeft, trimRight: trimRight, words: words, lines: lines, toUpper: toUpper, toLower: toLower, any: F2(any), all: F2(all), contains: F2(contains), startsWith: F2(startsWith), endsWith: F2(endsWith), indexes: F2(indexes), toInt: toInt, toFloat: toFloat, toList: toList, fromList: fromList }; }(); var _elm_lang$core$String$fromList = _elm_lang$core$Native_String.fromList; var _elm_lang$core$String$toList = _elm_lang$core$Native_String.toList; var _elm_lang$core$String$toFloat = _elm_lang$core$Native_String.toFloat; var _elm_lang$core$String$toInt = _elm_lang$core$Native_String.toInt; var _elm_lang$core$String$indices = _elm_lang$core$Native_String.indexes; var _elm_lang$core$String$indexes = _elm_lang$core$Native_String.indexes; var _elm_lang$core$String$endsWith = _elm_lang$core$Native_String.endsWith; var _elm_lang$core$String$startsWith = _elm_lang$core$Native_String.startsWith; var _elm_lang$core$String$contains = _elm_lang$core$Native_String.contains; var _elm_lang$core$String$all = _elm_lang$core$Native_String.all; var _elm_lang$core$String$any = _elm_lang$core$Native_String.any; var _elm_lang$core$String$toLower = _elm_lang$core$Native_String.toLower; var _elm_lang$core$String$toUpper = _elm_lang$core$Native_String.toUpper; var _elm_lang$core$String$lines = _elm_lang$core$Native_String.lines; var _elm_lang$core$String$words = _elm_lang$core$Native_String.words; var _elm_lang$core$String$trimRight = _elm_lang$core$Native_String.trimRight; var _elm_lang$core$String$trimLeft = _elm_lang$core$Native_String.trimLeft; var _elm_lang$core$String$trim = _elm_lang$core$Native_String.trim; var _elm_lang$core$String$padRight = _elm_lang$core$Native_String.padRight; var _elm_lang$core$String$padLeft = _elm_lang$core$Native_String.padLeft; var _elm_lang$core$String$pad = _elm_lang$core$Native_String.pad; var _elm_lang$core$String$dropRight = _elm_lang$core$Native_String.dropRight; var _elm_lang$core$String$dropLeft = _elm_lang$core$Native_String.dropLeft; var _elm_lang$core$String$right = _elm_lang$core$Native_String.right; var _elm_lang$core$String$left = _elm_lang$core$Native_String.left; var _elm_lang$core$String$slice = _elm_lang$core$Native_String.slice; var _elm_lang$core$String$repeat = _elm_lang$core$Native_String.repeat; var _elm_lang$core$String$join = _elm_lang$core$Native_String.join; var _elm_lang$core$String$split = _elm_lang$core$Native_String.split; var _elm_lang$core$String$foldr = _elm_lang$core$Native_String.foldr; var _elm_lang$core$String$foldl = _elm_lang$core$Native_String.foldl; var _elm_lang$core$String$reverse = _elm_lang$core$Native_String.reverse; var _elm_lang$core$String$filter = _elm_lang$core$Native_String.filter; var _elm_lang$core$String$map = _elm_lang$core$Native_String.map; var _elm_lang$core$String$length = _elm_lang$core$Native_String.length; var _elm_lang$core$String$concat = _elm_lang$core$Native_String.concat; var _elm_lang$core$String$append = _elm_lang$core$Native_String.append; var _elm_lang$core$String$uncons = _elm_lang$core$Native_String.uncons; var _elm_lang$core$String$cons = _elm_lang$core$Native_String.cons; var _elm_lang$core$String$fromChar = function ($char) { return A2(_elm_lang$core$String$cons, $char, ''); }; var _elm_lang$core$String$isEmpty = _elm_lang$core$Native_String.isEmpty; var _elm_lang$core$Dict$foldr = F3( function (f, acc, t) { foldr: while (true) { var _p0 = t; if (_p0.ctor === 'RBEmpty_elm_builtin') { return acc; } else { var _v1 = f, _v2 = A3( f, _p0._1, _p0._2, A3(_elm_lang$core$Dict$foldr, f, acc, _p0._4)), _v3 = _p0._3; f = _v1; acc = _v2; t = _v3; continue foldr; } } }); var _elm_lang$core$Dict$keys = function (dict) { return A3( _elm_lang$core$Dict$foldr, F3( function (key, value, keyList) { return {ctor: '::', _0: key, _1: keyList}; }), {ctor: '[]'}, dict); }; var _elm_lang$core$Dict$values = function (dict) { return A3( _elm_lang$core$Dict$foldr, F3( function (key, value, valueList) { return {ctor: '::', _0: value, _1: valueList}; }), {ctor: '[]'}, dict); }; var _elm_lang$core$Dict$toList = function (dict) { return A3( _elm_lang$core$Dict$foldr, F3( function (key, value, list) { return { ctor: '::', _0: {ctor: '_Tuple2', _0: key, _1: value}, _1: list }; }), {ctor: '[]'}, dict); }; var _elm_lang$core$Dict$foldl = F3( function (f, acc, dict) { foldl: while (true) { var _p1 = dict; if (_p1.ctor === 'RBEmpty_elm_builtin') { return acc; } else { var _v5 = f, _v6 = A3( f, _p1._1, _p1._2, A3(_elm_lang$core$Dict$foldl, f, acc, _p1._3)), _v7 = _p1._4; f = _v5; acc = _v6; dict = _v7; continue foldl; } } }); var _elm_lang$core$Dict$merge = F6( function (leftStep, bothStep, rightStep, leftDict, rightDict, initialResult) { var stepState = F3( function (rKey, rValue, _p2) { stepState: while (true) { var _p3 = _p2; var _p9 = _p3._1; var _p8 = _p3._0; var _p4 = _p8; if (_p4.ctor === '[]') { return { ctor: '_Tuple2', _0: _p8, _1: A3(rightStep, rKey, rValue, _p9) }; } else { var _p7 = _p4._1; var _p6 = _p4._0._1; var _p5 = _p4._0._0; if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) < 0) { var _v10 = rKey, _v11 = rValue, _v12 = { ctor: '_Tuple2', _0: _p7, _1: A3(leftStep, _p5, _p6, _p9) }; rKey = _v10; rValue = _v11; _p2 = _v12; continue stepState; } else { if (_elm_lang$core$Native_Utils.cmp(_p5, rKey) > 0) { return { ctor: '_Tuple2', _0: _p8, _1: A3(rightStep, rKey, rValue, _p9) }; } else { return { ctor: '_Tuple2', _0: _p7, _1: A4(bothStep, _p5, _p6, rValue, _p9) }; } } } } }); var _p10 = A3( _elm_lang$core$Dict$foldl, stepState, { ctor: '_Tuple2', _0: _elm_lang$core$Dict$toList(leftDict), _1: initialResult }, rightDict); var leftovers = _p10._0; var intermediateResult = _p10._1; return A3( _elm_lang$core$List$foldl, F2( function (_p11, result) { var _p12 = _p11; return A3(leftStep, _p12._0, _p12._1, result); }), intermediateResult, leftovers); }); var _elm_lang$core$Dict$reportRemBug = F4( function (msg, c, lgot, rgot) { return _elm_lang$core$Native_Debug.crash( _elm_lang$core$String$concat( { ctor: '::', _0: 'Internal red-black tree invariant violated, expected ', _1: { ctor: '::', _0: msg, _1: { ctor: '::', _0: ' and got ', _1: { ctor: '::', _0: _elm_lang$core$Basics$toString(c), _1: { ctor: '::', _0: '/', _1: { ctor: '::', _0: lgot, _1: { ctor: '::', _0: '/', _1: { ctor: '::', _0: rgot, _1: { ctor: '::', _0: '\nPlease report this bug to <https://github.com/elm-lang/core/issues>', _1: {ctor: '[]'} } } } } } } } } })); }); var _elm_lang$core$Dict$isBBlack = function (dict) { var _p13 = dict; _v14_2: do { if (_p13.ctor === 'RBNode_elm_builtin') { if (_p13._0.ctor === 'BBlack') { return true; } else { break _v14_2; } } else { if (_p13._0.ctor === 'LBBlack') { return true; } else { break _v14_2; } } } while(false); return false; }; var _elm_lang$core$Dict$sizeHelp = F2( function (n, dict) { sizeHelp: while (true) { var _p14 = dict; if (_p14.ctor === 'RBEmpty_elm_builtin') { return n; } else { var _v16 = A2(_elm_lang$core$Dict$sizeHelp, n + 1, _p14._4), _v17 = _p14._3; n = _v16; dict = _v17; continue sizeHelp; } } }); var _elm_lang$core$Dict$size = function (dict) { return A2(_elm_lang$core$Dict$sizeHelp, 0, dict); }; var _elm_lang$core$Dict$get = F2( function (targetKey, dict) { get: while (true) { var _p15 = dict; if (_p15.ctor === 'RBEmpty_elm_builtin') { return _elm_lang$core$Maybe$Nothing; } else { var _p16 = A2(_elm_lang$core$Basics$compare, targetKey, _p15._1); switch (_p16.ctor) { case 'LT': var _v20 = targetKey, _v21 = _p15._3; targetKey = _v20; dict = _v21; continue get; case 'EQ': return _elm_lang$core$Maybe$Just(_p15._2); default: var _v22 = targetKey, _v23 = _p15._4; targetKey = _v22; dict = _v23; continue get; } } } }); var _elm_lang$core$Dict$member = F2( function (key, dict) { var _p17 = A2(_elm_lang$core$Dict$get, key, dict); if (_p17.ctor === 'Just') { return true; } else { return false; } }); var _elm_lang$core$Dict$maxWithDefault = F3( function (k, v, r) { maxWithDefault: while (true) { var _p18 = r; if (_p18.ctor === 'RBEmpty_elm_builtin') { return {ctor: '_Tuple2', _0: k, _1: v}; } else { var _v26 = _p18._1, _v27 = _p18._2, _v28 = _p18._4; k = _v26; v = _v27; r = _v28; continue maxWithDefault; } } }); var _elm_lang$core$Dict$NBlack = {ctor: 'NBlack'}; var _elm_lang$core$Dict$BBlack = {ctor: 'BBlack'}; var _elm_lang$core$Dict$Black = {ctor: 'Black'}; var _elm_lang$core$Dict$blackish = function (t) { var _p19 = t; if (_p19.ctor === 'RBNode_elm_builtin') { var _p20 = _p19._0; return _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$Black) || _elm_lang$core$Native_Utils.eq(_p20, _elm_lang$core$Dict$BBlack); } else { return true; } }; var _elm_lang$core$Dict$Red = {ctor: 'Red'}; var _elm_lang$core$Dict$moreBlack = function (color) { var _p21 = color; switch (_p21.ctor) { case 'Black': return _elm_lang$core$Dict$BBlack; case 'Red': return _elm_lang$core$Dict$Black; case 'NBlack': return _elm_lang$core$Dict$Red; default: return _elm_lang$core$Native_Debug.crash('Can\'t make a double black node more black!'); } }; var _elm_lang$core$Dict$lessBlack = function (color) { var _p22 = color; switch (_p22.ctor) { case 'BBlack': return _elm_lang$core$Dict$Black; case 'Black': return _elm_lang$core$Dict$Red; case 'Red': return _elm_lang$core$Dict$NBlack; default: return _elm_lang$core$Native_Debug.crash('Can\'t make a negative black node less black!'); } }; var _elm_lang$core$Dict$LBBlack = {ctor: 'LBBlack'}; var _elm_lang$core$Dict$LBlack = {ctor: 'LBlack'}; var _elm_lang$core$Dict$RBEmpty_elm_builtin = function (a) { return {ctor: 'RBEmpty_elm_builtin', _0: a}; }; var _elm_lang$core$Dict$empty = _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); var _elm_lang$core$Dict$isEmpty = function (dict) { return _elm_lang$core$Native_Utils.eq(dict, _elm_lang$core$Dict$empty); }; var _elm_lang$core$Dict$RBNode_elm_builtin = F5( function (a, b, c, d, e) { return {ctor: 'RBNode_elm_builtin', _0: a, _1: b, _2: c, _3: d, _4: e}; }); var _elm_lang$core$Dict$ensureBlackRoot = function (dict) { var _p23 = dict; if ((_p23.ctor === 'RBNode_elm_builtin') && (_p23._0.ctor === 'Red')) { return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p23._1, _p23._2, _p23._3, _p23._4); } else { return dict; } }; var _elm_lang$core$Dict$lessBlackTree = function (dict) { var _p24 = dict; if (_p24.ctor === 'RBNode_elm_builtin') { return A5( _elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$lessBlack(_p24._0), _p24._1, _p24._2, _p24._3, _p24._4); } else { return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); } }; var _elm_lang$core$Dict$balancedTree = function (col) { return function (xk) { return function (xv) { return function (yk) { return function (yv) { return function (zk) { return function (zv) { return function (a) { return function (b) { return function (c) { return function (d) { return A5( _elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$lessBlack(col), yk, yv, A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, xk, xv, a, b), A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, zk, zv, c, d)); }; }; }; }; }; }; }; }; }; }; }; var _elm_lang$core$Dict$blacken = function (t) { var _p25 = t; if (_p25.ctor === 'RBEmpty_elm_builtin') { return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); } else { return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p25._1, _p25._2, _p25._3, _p25._4); } }; var _elm_lang$core$Dict$redden = function (t) { var _p26 = t; if (_p26.ctor === 'RBEmpty_elm_builtin') { return _elm_lang$core$Native_Debug.crash('can\'t make a Leaf red'); } else { return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, _p26._1, _p26._2, _p26._3, _p26._4); } }; var _elm_lang$core$Dict$balanceHelp = function (tree) { var _p27 = tree; _v36_6: do { _v36_5: do { _v36_4: do { _v36_3: do { _v36_2: do { _v36_1: do { _v36_0: do { if (_p27.ctor === 'RBNode_elm_builtin') { if (_p27._3.ctor === 'RBNode_elm_builtin') { if (_p27._4.ctor === 'RBNode_elm_builtin') { switch (_p27._3._0.ctor) { case 'Red': switch (_p27._4._0.ctor) { case 'Red': if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { break _v36_0; } else { if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { break _v36_1; } else { if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { break _v36_2; } else { if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { break _v36_3; } else { break _v36_6; } } } } case 'NBlack': if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { break _v36_0; } else { if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { break _v36_1; } else { if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { break _v36_4; } else { break _v36_6; } } } default: if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { break _v36_0; } else { if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { break _v36_1; } else { break _v36_6; } } } case 'NBlack': switch (_p27._4._0.ctor) { case 'Red': if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { break _v36_2; } else { if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { break _v36_3; } else { if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { break _v36_5; } else { break _v36_6; } } } case 'NBlack': if (_p27._0.ctor === 'BBlack') { if ((((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { break _v36_4; } else { if ((((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { break _v36_5; } else { break _v36_6; } } } else { break _v36_6; } default: if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { break _v36_5; } else { break _v36_6; } } default: switch (_p27._4._0.ctor) { case 'Red': if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { break _v36_2; } else { if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { break _v36_3; } else { break _v36_6; } } case 'NBlack': if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { break _v36_4; } else { break _v36_6; } default: break _v36_6; } } } else { switch (_p27._3._0.ctor) { case 'Red': if ((_p27._3._3.ctor === 'RBNode_elm_builtin') && (_p27._3._3._0.ctor === 'Red')) { break _v36_0; } else { if ((_p27._3._4.ctor === 'RBNode_elm_builtin') && (_p27._3._4._0.ctor === 'Red')) { break _v36_1; } else { break _v36_6; } } case 'NBlack': if (((((_p27._0.ctor === 'BBlack') && (_p27._3._3.ctor === 'RBNode_elm_builtin')) && (_p27._3._3._0.ctor === 'Black')) && (_p27._3._4.ctor === 'RBNode_elm_builtin')) && (_p27._3._4._0.ctor === 'Black')) { break _v36_5; } else { break _v36_6; } default: break _v36_6; } } } else { if (_p27._4.ctor === 'RBNode_elm_builtin') { switch (_p27._4._0.ctor) { case 'Red': if ((_p27._4._3.ctor === 'RBNode_elm_builtin') && (_p27._4._3._0.ctor === 'Red')) { break _v36_2; } else { if ((_p27._4._4.ctor === 'RBNode_elm_builtin') && (_p27._4._4._0.ctor === 'Red')) { break _v36_3; } else { break _v36_6; } } case 'NBlack': if (((((_p27._0.ctor === 'BBlack') && (_p27._4._3.ctor === 'RBNode_elm_builtin')) && (_p27._4._3._0.ctor === 'Black')) && (_p27._4._4.ctor === 'RBNode_elm_builtin')) && (_p27._4._4._0.ctor === 'Black')) { break _v36_4; } else { break _v36_6; } default: break _v36_6; } } else { break _v36_6; } } } else { break _v36_6; } } while(false); return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._3._1)(_p27._3._3._2)(_p27._3._1)(_p27._3._2)(_p27._1)(_p27._2)(_p27._3._3._3)(_p27._3._3._4)(_p27._3._4)(_p27._4); } while(false); return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._3._1)(_p27._3._2)(_p27._3._4._1)(_p27._3._4._2)(_p27._1)(_p27._2)(_p27._3._3)(_p27._3._4._3)(_p27._3._4._4)(_p27._4); } while(false); return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._3._1)(_p27._4._3._2)(_p27._4._1)(_p27._4._2)(_p27._3)(_p27._4._3._3)(_p27._4._3._4)(_p27._4._4); } while(false); return _elm_lang$core$Dict$balancedTree(_p27._0)(_p27._1)(_p27._2)(_p27._4._1)(_p27._4._2)(_p27._4._4._1)(_p27._4._4._2)(_p27._3)(_p27._4._3)(_p27._4._4._3)(_p27._4._4._4); } while(false); return A5( _elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._4._3._1, _p27._4._3._2, A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3, _p27._4._3._3), A5( _elm_lang$core$Dict$balance, _elm_lang$core$Dict$Black, _p27._4._1, _p27._4._2, _p27._4._3._4, _elm_lang$core$Dict$redden(_p27._4._4))); } while(false); return A5( _elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._3._4._1, _p27._3._4._2, A5( _elm_lang$core$Dict$balance, _elm_lang$core$Dict$Black, _p27._3._1, _p27._3._2, _elm_lang$core$Dict$redden(_p27._3._3), _p27._3._4._3), A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p27._1, _p27._2, _p27._3._4._4, _p27._4)); } while(false); return tree; }; var _elm_lang$core$Dict$balance = F5( function (c, k, v, l, r) { var tree = A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); return _elm_lang$core$Dict$blackish(tree) ? _elm_lang$core$Dict$balanceHelp(tree) : tree; }); var _elm_lang$core$Dict$bubble = F5( function (c, k, v, l, r) { return (_elm_lang$core$Dict$isBBlack(l) || _elm_lang$core$Dict$isBBlack(r)) ? A5( _elm_lang$core$Dict$balance, _elm_lang$core$Dict$moreBlack(c), k, v, _elm_lang$core$Dict$lessBlackTree(l), _elm_lang$core$Dict$lessBlackTree(r)) : A5(_elm_lang$core$Dict$RBNode_elm_builtin, c, k, v, l, r); }); var _elm_lang$core$Dict$removeMax = F5( function (c, k, v, l, r) { var _p28 = r; if (_p28.ctor === 'RBEmpty_elm_builtin') { return A3(_elm_lang$core$Dict$rem, c, l, r); } else { return A5( _elm_lang$core$Dict$bubble, c, k, v, l, A5(_elm_lang$core$Dict$removeMax, _p28._0, _p28._1, _p28._2, _p28._3, _p28._4)); } }); var _elm_lang$core$Dict$rem = F3( function (color, left, right) { var _p29 = {ctor: '_Tuple2', _0: left, _1: right}; if (_p29._0.ctor === 'RBEmpty_elm_builtin') { if (_p29._1.ctor === 'RBEmpty_elm_builtin') { var _p30 = color; switch (_p30.ctor) { case 'Red': return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); case 'Black': return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBBlack); default: return _elm_lang$core$Native_Debug.crash('cannot have bblack or nblack nodes at this point'); } } else { var _p33 = _p29._1._0; var _p32 = _p29._0._0; var _p31 = {ctor: '_Tuple3', _0: color, _1: _p32, _2: _p33}; if ((((_p31.ctor === '_Tuple3') && (_p31._0.ctor === 'Black')) && (_p31._1.ctor === 'LBlack')) && (_p31._2.ctor === 'Red')) { return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._1._1, _p29._1._2, _p29._1._3, _p29._1._4); } else { return A4( _elm_lang$core$Dict$reportRemBug, 'Black/LBlack/Red', color, _elm_lang$core$Basics$toString(_p32), _elm_lang$core$Basics$toString(_p33)); } } } else { if (_p29._1.ctor === 'RBEmpty_elm_builtin') { var _p36 = _p29._1._0; var _p35 = _p29._0._0; var _p34 = {ctor: '_Tuple3', _0: color, _1: _p35, _2: _p36}; if ((((_p34.ctor === '_Tuple3') && (_p34._0.ctor === 'Black')) && (_p34._1.ctor === 'Red')) && (_p34._2.ctor === 'LBlack')) { return A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Black, _p29._0._1, _p29._0._2, _p29._0._3, _p29._0._4); } else { return A4( _elm_lang$core$Dict$reportRemBug, 'Black/Red/LBlack', color, _elm_lang$core$Basics$toString(_p35), _elm_lang$core$Basics$toString(_p36)); } } else { var _p40 = _p29._0._2; var _p39 = _p29._0._4; var _p38 = _p29._0._1; var newLeft = A5(_elm_lang$core$Dict$removeMax, _p29._0._0, _p38, _p40, _p29._0._3, _p39); var _p37 = A3(_elm_lang$core$Dict$maxWithDefault, _p38, _p40, _p39); var k = _p37._0; var v = _p37._1; return A5(_elm_lang$core$Dict$bubble, color, k, v, newLeft, right); } } }); var _elm_lang$core$Dict$map = F2( function (f, dict) { var _p41 = dict; if (_p41.ctor === 'RBEmpty_elm_builtin') { return _elm_lang$core$Dict$RBEmpty_elm_builtin(_elm_lang$core$Dict$LBlack); } else { var _p42 = _p41._1; return A5( _elm_lang$core$Dict$RBNode_elm_builtin, _p41._0, _p42, A2(f, _p42, _p41._2), A2(_elm_lang$core$Dict$map, f, _p41._3), A2(_elm_lang$core$Dict$map, f, _p41._4)); } }); var _elm_lang$core$Dict$Same = {ctor: 'Same'}; var _elm_lang$core$Dict$Remove = {ctor: 'Remove'}; var _elm_lang$core$Dict$Insert = {ctor: 'Insert'}; var _elm_lang$core$Dict$update = F3( function (k, alter, dict) { var up = function (dict) { var _p43 = dict; if (_p43.ctor === 'RBEmpty_elm_builtin') { var _p44 = alter(_elm_lang$core$Maybe$Nothing); if (_p44.ctor === 'Nothing') { return {ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: _elm_lang$core$Dict$empty}; } else { return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Insert, _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _elm_lang$core$Dict$Red, k, _p44._0, _elm_lang$core$Dict$empty, _elm_lang$core$Dict$empty) }; } } else { var _p55 = _p43._2; var _p54 = _p43._4; var _p53 = _p43._3; var _p52 = _p43._1; var _p51 = _p43._0; var _p45 = A2(_elm_lang$core$Basics$compare, k, _p52); switch (_p45.ctor) { case 'EQ': var _p46 = alter( _elm_lang$core$Maybe$Just(_p55)); if (_p46.ctor === 'Nothing') { return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Remove, _1: A3(_elm_lang$core$Dict$rem, _p51, _p53, _p54) }; } else { return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p46._0, _p53, _p54) }; } case 'LT': var _p47 = up(_p53); var flag = _p47._0; var newLeft = _p47._1; var _p48 = flag; switch (_p48.ctor) { case 'Same': return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, newLeft, _p54) }; case 'Insert': return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Insert, _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, newLeft, _p54) }; default: return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Remove, _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, newLeft, _p54) }; } default: var _p49 = up(_p54); var flag = _p49._0; var newRight = _p49._1; var _p50 = flag; switch (_p50.ctor) { case 'Same': return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Same, _1: A5(_elm_lang$core$Dict$RBNode_elm_builtin, _p51, _p52, _p55, _p53, newRight) }; case 'Insert': return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Insert, _1: A5(_elm_lang$core$Dict$balance, _p51, _p52, _p55, _p53, newRight) }; default: return { ctor: '_Tuple2', _0: _elm_lang$core$Dict$Remove, _1: A5(_elm_lang$core$Dict$bubble, _p51, _p52, _p55, _p53, newRight) }; } } } }; var _p56 = up(dict); var flag = _p56._0; var updatedDict = _p56._1; var _p57 = flag; switch (_p57.ctor) { case 'Same': return updatedDict; case 'Insert': return _elm_lang$core$Dict$ensureBlackRoot(updatedDict); default: return _elm_lang$core$Dict$blacken(updatedDict); } }); var _elm_lang$core$Dict$insert = F3( function (key, value, dict) { return A3( _elm_lang$core$Dict$update, key, _elm_lang$core$Basics$always( _elm_lang$core$Maybe$Just(value)), dict); }); var _elm_lang$core$Dict$singleton = F2( function (key, value) { return A3(_elm_lang$core$Dict$insert, key, value, _elm_lang$core$Dict$empty); }); var _elm_lang$core$Dict$union = F2( function (t1, t2) { return A3(_elm_lang$core$Dict$foldl, _elm_lang$core$Dict$insert, t2, t1); }); var _elm_lang$core$Dict$filter = F2( function (predicate, dictionary) { var add = F3( function (key, value, dict) { return A2(predicate, key, value) ? A3(_elm_lang$core$Dict$insert, key, value, dict) : dict; }); return A3(_elm_lang$core$Dict$foldl, add, _elm_lang$core$Dict$empty, dictionary); }); var _elm_lang$core$Dict$intersect = F2( function (t1, t2) { return A2( _elm_lang$core$Dict$filter, F2( function (k, _p58) { return A2(_elm_lang$core$Dict$member, k, t2); }), t1); }); var _elm_lang$core$Dict$partition = F2( function (predicate, dict) { var add = F3( function (key, value, _p59) { var _p60 = _p59; var _p62 = _p60._1; var _p61 = _p60._0; return A2(predicate, key, value) ? { ctor: '_Tuple2', _0: A3(_elm_lang$core$Dict$insert, key, value, _p61), _1: _p62 } : { ctor: '_Tuple2', _0: _p61, _1: A3(_elm_lang$core$Dict$insert, key, value, _p62) }; }); return A3( _elm_lang$core$Dict$foldl, add, {ctor: '_Tuple2', _0: _elm_lang$core$Dict$empty, _1: _elm_lang$core$Dict$empty}, dict); }); var _elm_lang$core$Dict$fromList = function (assocs) { return A3( _elm_lang$core$List$foldl, F2( function (_p63, dict) { var _p64 = _p63; return A3(_elm_lang$core$Dict$insert, _p64._0, _p64._1, dict); }), _elm_lang$core$Dict$empty, assocs); }; var _elm_lang$core$Dict$remove = F2( function (key, dict) { return A3( _elm_lang$core$Dict$update, key, _elm_lang$core$Basics$always(_elm_lang$core$Maybe$Nothing), dict); }); var _elm_lang$core$Dict$diff = F2( function (t1, t2) { return A3( _elm_lang$core$Dict$foldl, F3( function (k, v, t) { return A2(_elm_lang$core$Dict$remove, k, t); }), t1, t2); }); var _elm_lang$core$Debug$crash = _elm_lang$core$Native_Debug.crash; var _elm_lang$core$Debug$log = _elm_lang$core$Native_Debug.log; //import Maybe, Native.Array, Native.List, Native.Utils, Result // var _elm_lang$core$Native_Json = function() { // CORE DECODERS function succeed(msg) { return { ctor: '<decoder>', tag: 'succeed', msg: msg }; } function fail(msg) { return { ctor: '<decoder>', tag: 'fail', msg: msg }; } function decodePrimitive(tag) { return { ctor: '<decoder>', tag: tag }; } function decodeContainer(tag, decoder) { return { ctor: '<decoder>', tag: tag, decoder: decoder }; } function decodeNull(value) { return { ctor: '<decoder>', tag: 'null', value: value }; } function decodeField(field, decoder) { return { ctor: '<decoder>', tag: 'field', field: field, decoder: decoder }; } function decodeIndex(index, decoder) { return { ctor: '<decoder>', tag: 'index', index: index, decoder: decoder }; } function decodeKeyValuePairs(decoder) { return { ctor: '<decoder>', tag: 'key-value', decoder: decoder }; } function mapMany(f, decoders) { return { ctor: '<decoder>', tag: 'map-many', func: f, decoders: decoders }; } function andThen(callback, decoder) { return { ctor: '<decoder>', tag: 'andThen', decoder: decoder, callback: callback }; } function oneOf(decoders) { return { ctor: '<decoder>', tag: 'oneOf', decoders: decoders }; } // DECODING OBJECTS function map1(f, d1) { return mapMany(f, [d1]); } function map2(f, d1, d2) { return mapMany(f, [d1, d2]); } function map3(f, d1, d2, d3) { return mapMany(f, [d1, d2, d3]); } function map4(f, d1, d2, d3, d4) { return mapMany(f, [d1, d2, d3, d4]); } function map5(f, d1, d2, d3, d4, d5) { return mapMany(f, [d1, d2, d3, d4, d5]); } function map6(f, d1, d2, d3, d4, d5, d6) { return mapMany(f, [d1, d2, d3, d4, d5, d6]); } function map7(f, d1, d2, d3, d4, d5, d6, d7) { return mapMany(f, [d1, d2, d3, d4, d5, d6, d7]); } function map8(f, d1, d2, d3, d4, d5, d6, d7, d8) { return mapMany(f, [d1, d2, d3, d4, d5, d6, d7, d8]); } // DECODE HELPERS function ok(value) { return { tag: 'ok', value: value }; } function badPrimitive(type, value) { return { tag: 'primitive', type: type, value: value }; } function badIndex(index, nestedProblems) { return { tag: 'index', index: index, rest: nestedProblems }; } function badField(field, nestedProblems) { return { tag: 'field', field: field, rest: nestedProblems }; } function badIndex(index, nestedProblems) { return { tag: 'index', index: index, rest: nestedProblems }; } function badOneOf(problems) { return { tag: 'oneOf', problems: problems }; } function bad(msg) { return { tag: 'fail', msg: msg }; } function badToString(problem) { var context = '_'; while (problem) { switch (problem.tag) { case 'primitive': return 'Expecting ' + problem.type + (context === '_' ? '' : ' at ' + context) + ' but instead got: ' + jsToString(problem.value); case 'index': context += '[' + problem.index + ']'; problem = problem.rest; break; case 'field': context += '.' + problem.field; problem = problem.rest; break; case 'oneOf': var problems = problem.problems; for (var i = 0; i < problems.length; i++) { problems[i] = badToString(problems[i]); } return 'I ran into the following problems' + (context === '_' ? '' : ' at ' + context) + ':\n\n' + problems.join('\n'); case 'fail': return 'I ran into a `fail` decoder' + (context === '_' ? '' : ' at ' + context) + ': ' + problem.msg; } } } function jsToString(value) { return value === undefined ? 'undefined' : JSON.stringify(value); } // DECODE function runOnString(decoder, string) { var json; try { json = JSON.parse(string); } catch (e) { return _elm_lang$core$Result$Err('Given an invalid JSON: ' + e.message); } return run(decoder, json); } function run(decoder, value) { var result = runHelp(decoder, value); return (result.tag === 'ok') ? _elm_lang$core$Result$Ok(result.value) : _elm_lang$core$Result$Err(badToString(result)); } function runHelp(decoder, value) { switch (decoder.tag) { case 'bool': return (typeof value === 'boolean') ? ok(value) : badPrimitive('a Bool', value); case 'int': if (typeof value !== 'number') { return badPrimitive('an Int', value); } if (-2147483647 < value && value < 2147483647 && (value | 0) === value) { return ok(value); } if (isFinite(value) && !(value % 1)) { return ok(value); } return badPrimitive('an Int', value); case 'float': return (typeof value === 'number') ? ok(value) : badPrimitive('a Float', value); case 'string': return (typeof value === 'string') ? ok(value) : (value instanceof String) ? ok(value + '') : badPrimitive('a String', value); case 'null': return (value === null) ? ok(decoder.value) : badPrimitive('null', value); case 'value': return ok(value); case 'list': if (!(value instanceof Array)) { return badPrimitive('a List', value); } var list = _elm_lang$core$Native_List.Nil; for (var i = value.length; i--; ) { var result = runHelp(decoder.decoder, value[i]); if (result.tag !== 'ok') { return badIndex(i, result) } list = _elm_lang$core$Native_List.Cons(result.value, list); } return ok(list); case 'array': if (!(value instanceof Array)) { return badPrimitive('an Array', value); } var len = value.length; var array = new Array(len); for (var i = len; i--; ) { var result = runHelp(decoder.decoder, value[i]); if (result.tag !== 'ok') { return badIndex(i, result); } array[i] = result.value; } return ok(_elm_lang$core$Native_Array.fromJSArray(array)); case 'maybe': var result = runHelp(decoder.decoder, value); return (result.tag === 'ok') ? ok(_elm_lang$core$Maybe$Just(result.value)) : ok(_elm_lang$core$Maybe$Nothing); case 'field': var field = decoder.field; if (typeof value !== 'object' || value === null || !(field in value)) { return badPrimitive('an object with a field named `' + field + '`', value); } var result = runHelp(decoder.decoder, value[field]); return (result.tag === 'ok') ? result : badField(field, result); case 'index': var index = decoder.index; if (!(value instanceof Array)) { return badPrimitive('an array', value); } if (index >= value.length) { return badPrimitive('a longer array. Need index ' + index + ' but there are only ' + value.length + ' entries', value); } var result = runHelp(decoder.decoder, value[index]); return (result.tag === 'ok') ? result : badIndex(index, result); case 'key-value': if (typeof value !== 'object' || value === null || value instanceof Array) { return badPrimitive('an object', value); } var keyValuePairs = _elm_lang$core$Native_List.Nil; for (var key in value) { var result = runHelp(decoder.decoder, value[key]); if (result.tag !== 'ok') { return badField(key, result); } var pair = _elm_lang$core$Native_Utils.Tuple2(key, result.value); keyValuePairs = _elm_lang$core$Native_List.Cons(pair, keyValuePairs); } return ok(keyValuePairs); case 'map-many': var answer = decoder.func; var decoders = decoder.decoders; for (var i = 0; i < decoders.length; i++) { var result = runHelp(decoders[i], value); if (result.tag !== 'ok') { return result; } answer = answer(result.value); } return ok(answer); case 'andThen': var result = runHelp(decoder.decoder, value); return (result.tag !== 'ok') ? result : runHelp(decoder.callback(result.value), value); case 'oneOf': var errors = []; var temp = decoder.decoders; while (temp.ctor !== '[]') { var result = runHelp(temp._0, value); if (result.tag === 'ok') { return result; } errors.push(result); temp = temp._1; } return badOneOf(errors); case 'fail': return bad(decoder.msg); case 'succeed': return ok(decoder.msg); } } // EQUALITY function equality(a, b) { if (a === b) { return true; } if (a.tag !== b.tag) { return false; } switch (a.tag) { case 'succeed': case 'fail': return a.msg === b.msg; case 'bool': case 'int': case 'float': case 'string': case 'value': return true; case 'null': return a.value === b.value; case 'list': case 'array': case 'maybe': case 'key-value': return equality(a.decoder, b.decoder); case 'field': return a.field === b.field && equality(a.decoder, b.decoder); case 'index': return a.index === b.index && equality(a.decoder, b.decoder); case 'map-many': if (a.func !== b.func) { return false; } return listEquality(a.decoders, b.decoders); case 'andThen': return a.callback === b.callback && equality(a.decoder, b.decoder); case 'oneOf': return listEquality(a.decoders, b.decoders); } } function listEquality(aDecoders, bDecoders) { var len = aDecoders.length; if (len !== bDecoders.length) { return false; } for (var i = 0; i < len; i++) { if (!equality(aDecoders[i], bDecoders[i])) { return false; } } return true; } // ENCODE function encode(indentLevel, value) { return JSON.stringify(value, null, indentLevel); } function identity(value) { return value; } function encodeObject(keyValuePairs) { var obj = {}; while (keyValuePairs.ctor !== '[]') { var pair = keyValuePairs._0; obj[pair._0] = pair._1; keyValuePairs = keyValuePairs._1; } return obj; } return { encode: F2(encode), runOnString: F2(runOnString), run: F2(run), decodeNull: decodeNull, decodePrimitive: decodePrimitive, decodeContainer: F2(decodeContainer), decodeField: F2(decodeField), decodeIndex: F2(decodeIndex), map1: F2(map1), map2: F3(map2), map3: F4(map3), map4: F5(map4), map5: F6(map5), map6: F7(map6), map7: F8(map7), map8: F9(map8), decodeKeyValuePairs: decodeKeyValuePairs, andThen: F2(andThen), fail: fail, succeed: succeed, oneOf: oneOf, identity: identity, encodeNull: null, encodeArray: _elm_lang$core$Native_Array.toJSArray, encodeList: _elm_lang$core$Native_List.toArray, encodeObject: encodeObject, equality: equality }; }(); var _elm_lang$core$Json_Encode$list = _elm_lang$core$Native_Json.encodeList; var _elm_lang$core$Json_Encode$array = _elm_lang$core$Native_Json.encodeArray; var _elm_lang$core$Json_Encode$object = _elm_lang$core$Native_Json.encodeObject; var _elm_lang$core$Json_Encode$null = _elm_lang$core$Native_Json.encodeNull; var _elm_lang$core$Json_Encode$bool = _elm_lang$core$Native_Json.identity; var _elm_lang$core$Json_Encode$float = _elm_lang$core$Native_Json.identity; var _elm_lang$core$Json_Encode$int = _elm_lang$core$Native_Json.identity; var _elm_lang$core$Json_Encode$string = _elm_lang$core$Native_Json.identity; var _elm_lang$core$Json_Encode$encode = _elm_lang$core$Native_Json.encode; var _elm_lang$core$Json_Encode$Value = {ctor: 'Value'}; var _elm_lang$core$Json_Decode$null = _elm_lang$core$Native_Json.decodeNull; var _elm_lang$core$Json_Decode$value = _elm_lang$core$Native_Json.decodePrimitive('value'); var _elm_lang$core$Json_Decode$andThen = _elm_lang$core$Native_Json.andThen; var _elm_lang$core$Json_Decode$fail = _elm_lang$core$Native_Json.fail; var _elm_lang$core$Json_Decode$succeed = _elm_lang$core$Native_Json.succeed; var _elm_lang$core$Json_Decode$lazy = function (thunk) { return A2( _elm_lang$core$Json_Decode$andThen, thunk, _elm_lang$core$Json_Decode$succeed( {ctor: '_Tuple0'})); }; var _elm_lang$core$Json_Decode$decodeValue = _elm_lang$core$Native_Json.run; var _elm_lang$core$Json_Decode$decodeString = _elm_lang$core$Native_Json.runOnString; var _elm_lang$core$Json_Decode$map8 = _elm_lang$core$Native_Json.map8; var _elm_lang$core$Json_Decode$map7 = _elm_lang$core$Native_Json.map7; var _elm_lang$core$Json_Decode$map6 = _elm_lang$core$Native_Json.map6; var _elm_lang$core$Json_Decode$map5 = _elm_lang$core$Native_Json.map5; var _elm_lang$core$Json_Decode$map4 = _elm_lang$core$Native_Json.map4; var _elm_lang$core$Json_Decode$map3 = _elm_lang$core$Native_Json.map3; var _elm_lang$core$Json_Decode$map2 = _elm_lang$core$Native_Json.map2; var _elm_lang$core$Json_Decode$map = _elm_lang$core$Native_Json.map1; var _elm_lang$core$Json_Decode$oneOf = _elm_lang$core$Native_Json.oneOf; var _elm_lang$core$Json_Decode$maybe = function (decoder) { return A2(_elm_lang$core$Native_Json.decodeContainer, 'maybe', decoder); }; var _elm_lang$core$Json_Decode$index = _elm_lang$core$Native_Json.decodeIndex; var _elm_lang$core$Json_Decode$field = _elm_lang$core$Native_Json.decodeField; var _elm_lang$core$Json_Decode$at = F2( function (fields, decoder) { return A3(_elm_lang$core$List$foldr, _elm_lang$core$Json_Decode$field, decoder, fields); }); var _elm_lang$core$Json_Decode$keyValuePairs = _elm_lang$core$Native_Json.decodeKeyValuePairs; var _elm_lang$core$Json_Decode$dict = function (decoder) { return A2( _elm_lang$core$Json_Decode$map, _elm_lang$core$Dict$fromList, _elm_lang$core$Json_Decode$keyValuePairs(decoder)); }; var _elm_lang$core$Json_Decode$array = function (decoder) { return A2(_elm_lang$core$Native_Json.decodeContainer, 'array', decoder); }; var _elm_lang$core$Json_Decode$list = function (decoder) { return A2(_elm_lang$core$Native_Json.decodeContainer, 'list', decoder); }; var _elm_lang$core$Json_Decode$nullable = function (decoder) { return _elm_lang$core$Json_Decode$oneOf( { ctor: '::', _0: _elm_lang$core$Json_Decode$null(_elm_lang$core$Maybe$Nothing), _1: { ctor: '::', _0: A2(_elm_lang$core$Json_Decode$map, _elm_lang$core$Maybe$Just, decoder), _1: {ctor: '[]'} } }); }; var _elm_lang$core$Json_Decode$float = _elm_lang$core$Native_Json.decodePrimitive('float'); var _elm_lang$core$Json_Decode$int = _elm_lang$core$Native_Json.decodePrimitive('int'); var _elm_lang$core$Json_Decode$bool = _elm_lang$core$Native_Json.decodePrimitive('bool'); var _elm_lang$core$Json_Decode$string = _elm_lang$core$Native_Json.decodePrimitive('string'); var _elm_lang$core$Json_Decode$Decoder = {ctor: 'Decoder'}; var _elm_lang$core$Tuple$mapSecond = F2( function (func, _p0) { var _p1 = _p0; return { ctor: '_Tuple2', _0: _p1._0, _1: func(_p1._1) }; }); var _elm_lang$core$Tuple$mapFirst = F2( function (func, _p2) { var _p3 = _p2; return { ctor: '_Tuple2', _0: func(_p3._0), _1: _p3._1 }; }); var _elm_lang$core$Tuple$second = function (_p4) { var _p5 = _p4; return _p5._1; }; var _elm_lang$core$Tuple$first = function (_p6) { var _p7 = _p6; return _p7._0; }; var _elm_lang$virtual_dom$VirtualDom_Debug$wrap; var _elm_lang$virtual_dom$VirtualDom_Debug$wrapWithFlags; var _elm_lang$virtual_dom$Native_VirtualDom = function() { var STYLE_KEY = 'STYLE'; var EVENT_KEY = 'EVENT'; var ATTR_KEY = 'ATTR'; var ATTR_NS_KEY = 'ATTR_NS'; var localDoc = typeof document !== 'undefined' ? document : {}; //////////// VIRTUAL DOM NODES //////////// function text(string) { return { type: 'text', text: string }; } function node(tag) { return F2(function(factList, kidList) { return nodeHelp(tag, factList, kidList); }); } function nodeHelp(tag, factList, kidList) { var organized = organizeFacts(factList); var namespace = organized.namespace; var facts = organized.facts; var children = []; var descendantsCount = 0; while (kidList.ctor !== '[]') { var kid = kidList._0; descendantsCount += (kid.descendantsCount || 0); children.push(kid); kidList = kidList._1; } descendantsCount += children.length; return { type: 'node', tag: tag, facts: facts, children: children, namespace: namespace, descendantsCount: descendantsCount }; } function keyedNode(tag, factList, kidList) { var organized = organizeFacts(factList); var namespace = organized.namespace; var facts = organized.facts; var children = []; var descendantsCount = 0; while (kidList.ctor !== '[]') { var kid = kidList._0; descendantsCount += (kid._1.descendantsCount || 0); children.push(kid); kidList = kidList._1; } descendantsCount += children.length; return { type: 'keyed-node', tag: tag, facts: facts, children: children, namespace: namespace, descendantsCount: descendantsCount }; } function custom(factList, model, impl) { var facts = organizeFacts(factList).facts; return { type: 'custom', facts: facts, model: model, impl: impl }; } function map(tagger, node) { return { type: 'tagger', tagger: tagger, node: node, descendantsCount: 1 + (node.descendantsCount || 0) }; } function thunk(func, args, thunk) { return { type: 'thunk', func: func, args: args, thunk: thunk, node: undefined }; } function lazy(fn, a) { return thunk(fn, [a], function() { return fn(a); }); } function lazy2(fn, a, b) { return thunk(fn, [a,b], function() { return A2(fn, a, b); }); } function lazy3(fn, a, b, c) { return thunk(fn, [a,b,c], function() { return A3(fn, a, b, c); }); } // FACTS function organizeFacts(factList) { var namespace, facts = {}; while (factList.ctor !== '[]') { var entry = factList._0; var key = entry.key; if (key === ATTR_KEY || key === ATTR_NS_KEY || key === EVENT_KEY) { var subFacts = facts[key] || {}; subFacts[entry.realKey] = entry.value; facts[key] = subFacts; } else if (key === STYLE_KEY) { var styles = facts[key] || {}; var styleList = entry.value; while (styleList.ctor !== '[]') { var style = styleList._0; styles[style._0] = style._1; styleList = styleList._1; } facts[key] = styles; } else if (key === 'namespace') { namespace = entry.value; } else if (key === 'className') { var classes = facts[key]; facts[key] = typeof classes === 'undefined' ? entry.value : classes + ' ' + entry.value; } else { facts[key] = entry.value; } factList = factList._1; } return { facts: facts, namespace: namespace }; } //////////// PROPERTIES AND ATTRIBUTES //////////// function style(value) { return { key: STYLE_KEY, value: value }; } function property(key, value) { return { key: key, value: value }; } function attribute(key, value) { return { key: ATTR_KEY, realKey: key, value: value }; } function attributeNS(namespace, key, value) { return { key: ATTR_NS_KEY, realKey: key, value: { value: value, namespace: namespace } }; } function on(name, options, decoder) { return { key: EVENT_KEY, realKey: name, value: { options: options, decoder: decoder } }; } function equalEvents(a, b) { if (a.options !== b.options) { if (a.options.stopPropagation !== b.options.stopPropagation || a.options.preventDefault !== b.options.preventDefault) { return false; } } return _elm_lang$core$Native_Json.equality(a.decoder, b.decoder); } function mapProperty(func, property) { if (property.key !== EVENT_KEY) { return property; } return on( property.realKey, property.value.options, A2(_elm_lang$core$Json_Decode$map, func, property.value.decoder) ); } //////////// RENDER //////////// function render(vNode, eventNode) { switch (vNode.type) { case 'thunk': if (!vNode.node) { vNode.node = vNode.thunk(); } return render(vNode.node, eventNode); case 'tagger': var subNode = vNode.node; var tagger = vNode.tagger; while (subNode.type === 'tagger') { typeof tagger !== 'object' ? tagger = [tagger, subNode.tagger] : tagger.push(subNode.tagger); subNode = subNode.node; } var subEventRoot = { tagger: tagger, parent: eventNode }; var domNode = render(subNode, subEventRoot); domNode.elm_event_node_ref = subEventRoot; return domNode; case 'text': return localDoc.createTextNode(vNode.text); case 'node': var domNode = vNode.namespace ? localDoc.createElementNS(vNode.namespace, vNode.tag) : localDoc.createElement(vNode.tag); applyFacts(domNode, eventNode, vNode.facts); var children = vNode.children; for (var i = 0; i < children.length; i++) { domNode.appendChild(render(children[i], eventNode)); } return domNode; case 'keyed-node': var domNode = vNode.namespace ? localDoc.createElementNS(vNode.namespace, vNode.tag) : localDoc.createElement(vNode.tag); applyFacts(domNode, eventNode, vNode.facts); var children = vNode.children; for (var i = 0; i < children.length; i++) { domNode.appendChild(render(children[i]._1, eventNode)); } return domNode; case 'custom': var domNode = vNode.impl.render(vNode.model); applyFacts(domNode, eventNode, vNode.facts); return domNode; } } //////////// APPLY FACTS //////////// function applyFacts(domNode, eventNode, facts) { for (var key in facts) { var value = facts[key]; switch (key) { case STYLE_KEY: applyStyles(domNode, value); break; case EVENT_KEY: applyEvents(domNode, eventNode, value); break; case ATTR_KEY: applyAttrs(domNode, value); break; case ATTR_NS_KEY: applyAttrsNS(domNode, value); break; case 'value': if (domNode[key] !== value) { domNode[key] = value; } break; default: domNode[key] = value; break; } } } function applyStyles(domNode, styles) { var domNodeStyle = domNode.style; for (var key in styles) { domNodeStyle[key] = styles[key]; } } function applyEvents(domNode, eventNode, events) { var allHandlers = domNode.elm_handlers || {}; for (var key in events) { var handler = allHandlers[key]; var value = events[key]; if (typeof value === 'undefined') { domNode.removeEventListener(key, handler); allHandlers[key] = undefined; } else if (typeof handler === 'undefined') { var handler = makeEventHandler(eventNode, value); domNode.addEventListener(key, handler); allHandlers[key] = handler; } else { handler.info = value; } } domNode.elm_handlers = allHandlers; } function makeEventHandler(eventNode, info) { function eventHandler(event) { var info = eventHandler.info; var value = A2(_elm_lang$core$Native_Json.run, info.decoder, event); if (value.ctor === 'Ok') { var options = info.options; if (options.stopPropagation) { event.stopPropagation(); } if (options.preventDefault) { event.preventDefault(); } var message = value._0; var currentEventNode = eventNode; while (currentEventNode) { var tagger = currentEventNode.tagger; if (typeof tagger === 'function') { message = tagger(message); } else { for (var i = tagger.length; i--; ) { message = tagger[i](message); } } currentEventNode = currentEventNode.parent; } } }; eventHandler.info = info; return eventHandler; } function applyAttrs(domNode, attrs) { for (var key in attrs) { var value = attrs[key]; if (typeof value === 'undefined') { domNode.removeAttribute(key); } else { domNode.setAttribute(key, value); } } } function applyAttrsNS(domNode, nsAttrs) { for (var key in nsAttrs) { var pair = nsAttrs[key]; var namespace = pair.namespace; var value = pair.value; if (typeof value === 'undefined') { domNode.removeAttributeNS(namespace, key); } else { domNode.setAttributeNS(namespace, key, value); } } } //////////// DIFF //////////// function diff(a, b) { var patches = []; diffHelp(a, b, patches, 0); return patches; } function makePatch(type, index, data) { return { index: index, type: type, data: data, domNode: undefined, eventNode: undefined }; } function diffHelp(a, b, patches, index) { if (a === b) { return; } var aType = a.type; var bType = b.type; // Bail if you run into different types of nodes. Implies that the // structure has changed significantly and it's not worth a diff. if (aType !== bType) { patches.push(makePatch('p-redraw', index, b)); return; } // Now we know that both nodes are the same type. switch (bType) { case 'thunk': var aArgs = a.args; var bArgs = b.args; var i = aArgs.length; var same = a.func === b.func && i === bArgs.length; while (same && i--) { same = aArgs[i] === bArgs[i]; } if (same) { b.node = a.node; return; } b.node = b.thunk(); var subPatches = []; diffHelp(a.node, b.node, subPatches, 0); if (subPatches.length > 0) { patches.push(makePatch('p-thunk', index, subPatches)); } return; case 'tagger': // gather nested taggers var aTaggers = a.tagger; var bTaggers = b.tagger; var nesting = false; var aSubNode = a.node; while (aSubNode.type === 'tagger') { nesting = true; typeof aTaggers !== 'object' ? aTaggers = [aTaggers, aSubNode.tagger] : aTaggers.push(aSubNode.tagger); aSubNode = aSubNode.node; } var bSubNode = b.node; while (bSubNode.type === 'tagger') { nesting = true; typeof bTaggers !== 'object' ? bTaggers = [bTaggers, bSubNode.tagger] : bTaggers.push(bSubNode.tagger); bSubNode = bSubNode.node; } // Just bail if different numbers of taggers. This implies the // structure of the virtual DOM has changed. if (nesting && aTaggers.length !== bTaggers.length) { patches.push(makePatch('p-redraw', index, b)); return; } // check if taggers are "the same" if (nesting ? !pairwiseRefEqual(aTaggers, bTaggers) : aTaggers !== bTaggers) { patches.push(makePatch('p-tagger', index, bTaggers)); } // diff everything below the taggers diffHelp(aSubNode, bSubNode, patches, index + 1); return; case 'text': if (a.text !== b.text) { patches.push(makePatch('p-text', index, b.text)); return; } return; case 'node': // Bail if obvious indicators have changed. Implies more serious // structural changes such that it's not worth it to diff. if (a.tag !== b.tag || a.namespace !== b.namespace) { patches.push(makePatch('p-redraw', index, b)); return; } var factsDiff = diffFacts(a.facts, b.facts); if (typeof factsDiff !== 'undefined') { patches.push(makePatch('p-facts', index, factsDiff)); } diffChildren(a, b, patches, index); return; case 'keyed-node': // Bail if obvious indicators have changed. Implies more serious // structural changes such that it's not worth it to diff. if (a.tag !== b.tag || a.namespace !== b.namespace) { patches.push(makePatch('p-redraw', index, b)); return; } var factsDiff = diffFacts(a.facts, b.facts); if (typeof factsDiff !== 'undefined') { patches.push(makePatch('p-facts', index, factsDiff)); } diffKeyedChildren(a, b, patches, index); return; case 'custom': if (a.impl !== b.impl) { patches.push(makePatch('p-redraw', index, b)); return; } var factsDiff = diffFacts(a.facts, b.facts); if (typeof factsDiff !== 'undefined') { patches.push(makePatch('p-facts', index, factsDiff)); } var patch = b.impl.diff(a,b); if (patch) { patches.push(makePatch('p-custom', index, patch)); return; } return; } } // assumes the incoming arrays are the same length function pairwiseRefEqual(as, bs) { for (var i = 0; i < as.length; i++) { if (as[i] !== bs[i]) { return false; } } return true; } // TODO Instead of creating a new diff object, it's possible to just test if // there *is* a diff. During the actual patch, do the diff again and make the // modifications directly. This way, there's no new allocations. Worth it? function diffFacts(a, b, category) { var diff; // look for changes and removals for (var aKey in a) { if (aKey === STYLE_KEY || aKey === EVENT_KEY || aKey === ATTR_KEY || aKey === ATTR_NS_KEY) { var subDiff = diffFacts(a[aKey], b[aKey] || {}, aKey); if (subDiff) { diff = diff || {}; diff[aKey] = subDiff; } continue; } // remove if not in the new facts if (!(aKey in b)) { diff = diff || {}; diff[aKey] = (typeof category === 'undefined') ? (typeof a[aKey] === 'string' ? '' : null) : (category === STYLE_KEY) ? '' : (category === EVENT_KEY || category === ATTR_KEY) ? undefined : { namespace: a[aKey].namespace, value: undefined }; continue; } var aValue = a[aKey]; var bValue = b[aKey]; // reference equal, so don't worry about it if (aValue === bValue && aKey !== 'value' || category === EVENT_KEY && equalEvents(aValue, bValue)) { continue; } diff = diff || {}; diff[aKey] = bValue; } // add new stuff for (var bKey in b) { if (!(bKey in a)) { diff = diff || {}; diff[bKey] = b[bKey]; } } return diff; } function diffChildren(aParent, bParent, patches, rootIndex) { var aChildren = aParent.children; var bChildren = bParent.children; var aLen = aChildren.length; var bLen = bChildren.length; // FIGURE OUT IF THERE ARE INSERTS OR REMOVALS if (aLen > bLen) { patches.push(makePatch('p-remove-last', rootIndex, aLen - bLen)); } else if (aLen < bLen) { patches.push(makePatch('p-append', rootIndex, bChildren.slice(aLen))); } // PAIRWISE DIFF EVERYTHING ELSE var index = rootIndex; var minLen = aLen < bLen ? aLen : bLen; for (var i = 0; i < minLen; i++) { index++; var aChild = aChildren[i]; diffHelp(aChild, bChildren[i], patches, index); index += aChild.descendantsCount || 0; } } //////////// KEYED DIFF //////////// function diffKeyedChildren(aParent, bParent, patches, rootIndex) { var localPatches = []; var changes = {}; // Dict String Entry var inserts = []; // Array { index : Int, entry : Entry } // type Entry = { tag : String, vnode : VNode, index : Int, data : _ } var aChildren = aParent.children; var bChildren = bParent.children; var aLen = aChildren.length; var bLen = bChildren.length; var aIndex = 0; var bIndex = 0; var index = rootIndex; while (aIndex < aLen && bIndex < bLen) { var a = aChildren[aIndex]; var b = bChildren[bIndex]; var aKey = a._0; var bKey = b._0; var aNode = a._1; var bNode = b._1; // check if keys match if (aKey === bKey) { index++; diffHelp(aNode, bNode, localPatches, index); index += aNode.descendantsCount || 0; aIndex++; bIndex++; continue; } // look ahead 1 to detect insertions and removals. var aLookAhead = aIndex + 1 < aLen; var bLookAhead = bIndex + 1 < bLen; if (aLookAhead) { var aNext = aChildren[aIndex + 1]; var aNextKey = aNext._0; var aNextNode = aNext._1; var oldMatch = bKey === aNextKey; } if (bLookAhead) { var bNext = bChildren[bIndex + 1]; var bNextKey = bNext._0; var bNextNode = bNext._1; var newMatch = aKey === bNextKey; } // swap a and b if (aLookAhead && bLookAhead && newMatch && oldMatch) { index++; diffHelp(aNode, bNextNode, localPatches, index); insertNode(changes, localPatches, aKey, bNode, bIndex, inserts); index += aNode.descendantsCount || 0; index++; removeNode(changes, localPatches, aKey, aNextNode, index); index += aNextNode.descendantsCount || 0; aIndex += 2; bIndex += 2; continue; } // insert b if (bLookAhead && newMatch) { index++; insertNode(changes, localPatches, bKey, bNode, bIndex, inserts); diffHelp(aNode, bNextNode, localPatches, index); index += aNode.descendantsCount || 0; aIndex += 1; bIndex += 2; continue; } // remove a if (aLookAhead && oldMatch) { index++; removeNode(changes, localPatches, aKey, aNode, index); index += aNode.descendantsCount || 0; index++; diffHelp(aNextNode, bNode, localPatches, index); index += aNextNode.descendantsCount || 0; aIndex += 2; bIndex += 1; continue; } // remove a, insert b if (aLookAhead && bLookAhead && aNextKey === bNextKey) { index++; removeNode(changes, localPatches, aKey, aNode, index); insertNode(changes, localPatches, bKey, bNode, bIndex, inserts); index += aNode.descendantsCount || 0; index++; diffHelp(aNextNode, bNextNode, localPatches, index); index += aNextNode.descendantsCount || 0; aIndex += 2; bIndex += 2; continue; } break; } // eat up any remaining nodes with removeNode and insertNode while (aIndex < aLen) { index++; var a = aChildren[aIndex]; var aNode = a._1; removeNode(changes, localPatches, a._0, aNode, index); index += aNode.descendantsCount || 0; aIndex++; } var endInserts; while (bIndex < bLen) { endInserts = endInserts || []; var b = bChildren[bIndex]; insertNode(changes, localPatches, b._0, b._1, undefined, endInserts); bIndex++; } if (localPatches.length > 0 || inserts.length > 0 || typeof endInserts !== 'undefined') { patches.push(makePatch('p-reorder', rootIndex, { patches: localPatches, inserts: inserts, endInserts: endInserts })); } } //////////// CHANGES FROM KEYED DIFF //////////// var POSTFIX = '_elmW6BL'; function insertNode(changes, localPatches, key, vnode, bIndex, inserts) { var entry = changes[key]; // never seen this key before if (typeof entry === 'undefined') { entry = { tag: 'insert', vnode: vnode, index: bIndex, data: undefined }; inserts.push({ index: bIndex, entry: entry }); changes[key] = entry; return; } // this key was removed earlier, a match! if (entry.tag === 'remove') { inserts.push({ index: bIndex, entry: entry }); entry.tag = 'move'; var subPatches = []; diffHelp(entry.vnode, vnode, subPatches, entry.index); entry.index = bIndex; entry.data.data = { patches: subPatches, entry: entry }; return; } // this key has already been inserted or moved, a duplicate! insertNode(changes, localPatches, key + POSTFIX, vnode, bIndex, inserts); } function removeNode(changes, localPatches, key, vnode, index) { var entry = changes[key]; // never seen this key before if (typeof entry === 'undefined') { var patch = makePatch('p-remove', index, undefined); localPatches.push(patch); changes[key] = { tag: 'remove', vnode: vnode, index: index, data: patch }; return; } // this key was inserted earlier, a match! if (entry.tag === 'insert') { entry.tag = 'move'; var subPatches = []; diffHelp(vnode, entry.vnode, subPatches, index); var patch = makePatch('p-remove', index, { patches: subPatches, entry: entry }); localPatches.push(patch); return; } // this key has already been removed or moved, a duplicate! removeNode(changes, localPatches, key + POSTFIX, vnode, index); } //////////// ADD DOM NODES //////////// // // Each DOM node has an "index" assigned in order of traversal. It is important // to minimize our crawl over the actual DOM, so these indexes (along with the // descendantsCount of virtual nodes) let us skip touching entire subtrees of // the DOM if we know there are no patches there. function addDomNodes(domNode, vNode, patches, eventNode) { addDomNodesHelp(domNode, vNode, patches, 0, 0, vNode.descendantsCount, eventNode); } // assumes `patches` is non-empty and indexes increase monotonically. function addDomNodesHelp(domNode, vNode, patches, i, low, high, eventNode) { var patch = patches[i]; var index = patch.index; while (index === low) { var patchType = patch.type; if (patchType === 'p-thunk') { addDomNodes(domNode, vNode.node, patch.data, eventNode); } else if (patchType === 'p-reorder') { patch.domNode = domNode; patch.eventNode = eventNode; var subPatches = patch.data.patches; if (subPatches.length > 0) { addDomNodesHelp(domNode, vNode, subPatches, 0, low, high, eventNode); } } else if (patchType === 'p-remove') { patch.domNode = domNode; patch.eventNode = eventNode; var data = patch.data; if (typeof data !== 'undefined') { data.entry.data = domNode; var subPatches = data.patches; if (subPatches.length > 0) { addDomNodesHelp(domNode, vNode, subPatches, 0, low, high, eventNode); } } } else { patch.domNode = domNode; patch.eventNode = eventNode; } i++; if (!(patch = patches[i]) || (index = patch.index) > high) { return i; } } switch (vNode.type) { case 'tagger': var subNode = vNode.node; while (subNode.type === "tagger") { subNode = subNode.node; } return addDomNodesHelp(domNode, subNode, patches, i, low + 1, high, domNode.elm_event_node_ref); case 'node': var vChildren = vNode.children; var childNodes = domNode.childNodes; for (var j = 0; j < vChildren.length; j++) { low++; var vChild = vChildren[j]; var nextLow = low + (vChild.descendantsCount || 0); if (low <= index && index <= nextLow) { i = addDomNodesHelp(childNodes[j], vChild, patches, i, low, nextLow, eventNode); if (!(patch = patches[i]) || (index = patch.index) > high) { return i; } } low = nextLow; } return i; case 'keyed-node': var vChildren = vNode.children; var childNodes = domNode.childNodes; for (var j = 0; j < vChildren.length; j++) { low++; var vChild = vChildren[j]._1; var nextLow = low + (vChild.descendantsCount || 0); if (low <= index && index <= nextLow) { i = addDomNodesHelp(childNodes[j], vChild, patches, i, low, nextLow, eventNode); if (!(patch = patches[i]) || (index = patch.index) > high) { return i; } } low = nextLow; } return i; case 'text': case 'thunk': throw new Error('should never traverse `text` or `thunk` nodes like this'); } } //////////// APPLY PATCHES //////////// function applyPatches(rootDomNode, oldVirtualNode, patches, eventNode) { if (patches.length === 0) { return rootDomNode; } addDomNodes(rootDomNode, oldVirtualNode, patches, eventNode); return applyPatchesHelp(rootDomNode, patches); } function applyPatchesHelp(rootDomNode, patches) { for (var i = 0; i < patches.length; i++) { var patch = patches[i]; var localDomNode = patch.domNode var newNode = applyPatch(localDomNode, patch); if (localDomNode === rootDomNode) { rootDomNode = newNode; } } return rootDomNode; } function applyPatch(domNode, patch) { switch (patch.type) { case 'p-redraw': return applyPatchRedraw(domNode, patch.data, patch.eventNode); case 'p-facts': applyFacts(domNode, patch.eventNode, patch.data); return domNode; case 'p-text': domNode.replaceData(0, domNode.length, patch.data); return domNode; case 'p-thunk': return applyPatchesHelp(domNode, patch.data); case 'p-tagger': if (typeof domNode.elm_event_node_ref !== 'undefined') { domNode.elm_event_node_ref.tagger = patch.data; } else { domNode.elm_event_node_ref = { tagger: patch.data, parent: patch.eventNode }; } return domNode; case 'p-remove-last': var i = patch.data; while (i--) { domNode.removeChild(domNode.lastChild); } return domNode; case 'p-append': var newNodes = patch.data; for (var i = 0; i < newNodes.length; i++) { domNode.appendChild(render(newNodes[i], patch.eventNode)); } return domNode; case 'p-remove': var data = patch.data; if (typeof data === 'undefined') { domNode.parentNode.removeChild(domNode); return domNode; } var entry = data.entry; if (typeof entry.index !== 'undefined') { domNode.parentNode.removeChild(domNode); } entry.data = applyPatchesHelp(domNode, data.patches); return domNode; case 'p-reorder': return applyPatchReorder(domNode, patch); case 'p-custom': var impl = patch.data; return impl.applyPatch(domNode, impl.data); default: throw new Error('Ran into an unknown patch!'); } } function applyPatchRedraw(domNode, vNode, eventNode) { var parentNode = domNode.parentNode; var newNode = render(vNode, eventNode); if (typeof newNode.elm_event_node_ref === 'undefined') { newNode.elm_event_node_ref = domNode.elm_event_node_ref; } if (parentNode && newNode !== domNode) { parentNode.replaceChild(newNode, domNode); } return newNode; } function applyPatchReorder(domNode, patch) { var data = patch.data; // remove end inserts var frag = applyPatchReorderEndInsertsHelp(data.endInserts, patch); // removals domNode = applyPatchesHelp(domNode, data.patches); // inserts var inserts = data.inserts; for (var i = 0; i < inserts.length; i++) { var insert = inserts[i]; var entry = insert.entry; var node = entry.tag === 'move' ? entry.data : render(entry.vnode, patch.eventNode); domNode.insertBefore(node, domNode.childNodes[insert.index]); } // add end inserts if (typeof frag !== 'undefined') { domNode.appendChild(frag); } return domNode; } function applyPatchReorderEndInsertsHelp(endInserts, patch) { if (typeof endInserts === 'undefined') { return; } var frag = localDoc.createDocumentFragment(); for (var i = 0; i < endInserts.length; i++) { var insert = endInserts[i]; var entry = insert.entry; frag.appendChild(entry.tag === 'move' ? entry.data : render(entry.vnode, patch.eventNode) ); } return frag; } // PROGRAMS var program = makeProgram(checkNoFlags); var programWithFlags = makeProgram(checkYesFlags); function makeProgram(flagChecker) { return F2(function(debugWrap, impl) { return function(flagDecoder) { return function(object, moduleName, debugMetadata) { var checker = flagChecker(flagDecoder, moduleName); if (typeof debugMetadata === 'undefined') { normalSetup(impl, object, moduleName, checker); } else { debugSetup(A2(debugWrap, debugMetadata, impl), object, moduleName, checker); } }; }; }); } function staticProgram(vNode) { var nothing = _elm_lang$core$Native_Utils.Tuple2( _elm_lang$core$Native_Utils.Tuple0, _elm_lang$core$Platform_Cmd$none ); return A2(program, _elm_lang$virtual_dom$VirtualDom_Debug$wrap, { init: nothing, view: function() { return vNode; }, update: F2(function() { return nothing; }), subscriptions: function() { return _elm_lang$core$Platform_Sub$none; } })(); } // FLAG CHECKERS function checkNoFlags(flagDecoder, moduleName) { return function(init, flags, domNode) { if (typeof flags === 'undefined') { return init; } var errorMessage = 'The `' + moduleName + '` module does not need flags.\n' + 'Initialize it with no arguments and you should be all set!'; crash(errorMessage, domNode); }; } function checkYesFlags(flagDecoder, moduleName) { return function(init, flags, domNode) { if (typeof flagDecoder === 'undefined') { var errorMessage = 'Are you trying to sneak a Never value into Elm? Trickster!\n' + 'It looks like ' + moduleName + '.main is defined with `programWithFlags` but has type `Program Never`.\n' + 'Use `program` instead if you do not want flags.' crash(errorMessage, domNode); } var result = A2(_elm_lang$core$Native_Json.run, flagDecoder, flags); if (result.ctor === 'Ok') { return init(result._0); } var errorMessage = 'Trying to initialize the `' + moduleName + '` module with an unexpected flag.\n' + 'I tried to convert it to an Elm value, but ran into this problem:\n\n' + result._0; crash(errorMessage, domNode); }; } function crash(errorMessage, domNode) { if (domNode) { domNode.innerHTML = '<div style="padding-left:1em;">' + '<h2 style="font-weight:normal;"><b>Oops!</b> Something went wrong when starting your Elm program.</h2>' + '<pre style="padding-left:1em;">' + errorMessage + '</pre>' + '</div>'; } throw new Error(errorMessage); } // NORMAL SETUP function normalSetup(impl, object, moduleName, flagChecker) { object['embed'] = function embed(node, flags) { while (node.lastChild) { node.removeChild(node.lastChild); } return _elm_lang$core$Native_Platform.initialize( flagChecker(impl.init, flags, node), impl.update, impl.subscriptions, normalRenderer(node, impl.view) ); }; object['fullscreen'] = function fullscreen(flags) { return _elm_lang$core$Native_Platform.initialize( flagChecker(impl.init, flags, document.body), impl.update, impl.subscriptions, normalRenderer(document.body, impl.view) ); }; } function normalRenderer(parentNode, view) { return function(tagger, initialModel) { var eventNode = { tagger: tagger, parent: undefined }; var initialVirtualNode = view(initialModel); var domNode = render(initialVirtualNode, eventNode); parentNode.appendChild(domNode); return makeStepper(domNode, view, initialVirtualNode, eventNode); }; } // STEPPER var rAF = typeof requestAnimationFrame !== 'undefined' ? requestAnimationFrame : function(callback) { setTimeout(callback, 1000 / 60); }; function makeStepper(domNode, view, initialVirtualNode, eventNode) { var state = 'NO_REQUEST'; var currNode = initialVirtualNode; var nextModel; function updateIfNeeded() { switch (state) { case 'NO_REQUEST': throw new Error( 'Unexpected draw callback.\n' + 'Please report this to <https://github.com/elm-lang/virtual-dom/issues>.' ); case 'PENDING_REQUEST': rAF(updateIfNeeded); state = 'EXTRA_REQUEST'; var nextNode = view(nextModel); var patches = diff(currNode, nextNode); domNode = applyPatches(domNode, currNode, patches, eventNode); currNode = nextNode; return; case 'EXTRA_REQUEST': state = 'NO_REQUEST'; return; } } return function stepper(model) { if (state === 'NO_REQUEST') { rAF(updateIfNeeded); } state = 'PENDING_REQUEST'; nextModel = model; }; } // DEBUG SETUP function debugSetup(impl, object, moduleName, flagChecker) { object['fullscreen'] = function fullscreen(flags) { var popoutRef = { doc: undefined }; return _elm_lang$core$Native_Platform.initialize( flagChecker(impl.init, flags, document.body), impl.update(scrollTask(popoutRef)), impl.subscriptions, debugRenderer(moduleName, document.body, popoutRef, impl.view, impl.viewIn, impl.viewOut) ); }; object['embed'] = function fullscreen(node, flags) { var popoutRef = { doc: undefined }; return _elm_lang$core$Native_Platform.initialize( flagChecker(impl.init, flags, node), impl.update(scrollTask(popoutRef)), impl.subscriptions, debugRenderer(moduleName, node, popoutRef, impl.view, impl.viewIn, impl.viewOut) ); }; } function scrollTask(popoutRef) { return _elm_lang$core$Native_Scheduler.nativeBinding(function(callback) { var doc = popoutRef.doc; if (doc) { var msgs = doc.getElementsByClassName('debugger-sidebar-messages')[0]; if (msgs) { msgs.scrollTop = msgs.scrollHeight; } } callback(_elm_lang$core$Native_Scheduler.succeed(_elm_lang$core$Native_Utils.Tuple0)); }); } function debugRenderer(moduleName, parentNode, popoutRef, view, viewIn, viewOut) { return function(tagger, initialModel) { var appEventNode = { tagger: tagger, parent: undefined }; var eventNode = { tagger: tagger, parent: undefined }; // make normal stepper var appVirtualNode = view(initialModel); var appNode = render(appVirtualNode, appEventNode); parentNode.appendChild(appNode); var appStepper = makeStepper(appNode, view, appVirtualNode, appEventNode); // make overlay stepper var overVirtualNode = viewIn(initialModel)._1; var overNode = render(overVirtualNode, eventNode); parentNode.appendChild(overNode); var wrappedViewIn = wrapViewIn(appEventNode, overNode, viewIn); var overStepper = makeStepper(overNode, wrappedViewIn, overVirtualNode, eventNode); // make debugger stepper var debugStepper = makeDebugStepper(initialModel, viewOut, eventNode, parentNode, moduleName, popoutRef); return function stepper(model) { appStepper(model); overStepper(model); debugStepper(model); } }; } function makeDebugStepper(initialModel, view, eventNode, parentNode, moduleName, popoutRef) { var curr; var domNode; return function stepper(model) { if (!model.isDebuggerOpen) { return; } if (!popoutRef.doc) { curr = view(model); domNode = openDebugWindow(moduleName, popoutRef, curr, eventNode); return; } // switch to document of popout localDoc = popoutRef.doc; var next = view(model); var patches = diff(curr, next); domNode = applyPatches(domNode, curr, patches, eventNode); curr = next; // switch back to normal document localDoc = document; }; } function openDebugWindow(moduleName, popoutRef, virtualNode, eventNode) { var w = 900; var h = 360; var x = screen.width - w; var y = screen.height - h; var debugWindow = window.open('', '', 'width=' + w + ',height=' + h + ',left=' + x + ',top=' + y); // switch to window document localDoc = debugWindow.document; popoutRef.doc = localDoc; localDoc.title = 'Debugger - ' + moduleName; localDoc.body.style.margin = '0'; localDoc.body.style.padding = '0'; var domNode = render(virtualNode, eventNode); localDoc.body.appendChild(domNode); localDoc.addEventListener('keydown', function(event) { if (event.metaKey && event.which === 82) { window.location.reload(); } if (event.which === 38) { eventNode.tagger({ ctor: 'Up' }); event.preventDefault(); } if (event.which === 40) { eventNode.tagger({ ctor: 'Down' }); event.preventDefault(); } }); function close() { popoutRef.doc = undefined; debugWindow.close(); } window.addEventListener('unload', close); debugWindow.addEventListener('unload', function() { popoutRef.doc = undefined; window.removeEventListener('unload', close); eventNode.tagger({ ctor: 'Close' }); }); // switch back to the normal document localDoc = document; return domNode; } // BLOCK EVENTS function wrapViewIn(appEventNode, overlayNode, viewIn) { var ignorer = makeIgnorer(overlayNode); var blocking = 'Normal'; var overflow; var normalTagger = appEventNode.tagger; var blockTagger = function() {}; return function(model) { var tuple = viewIn(model); var newBlocking = tuple._0.ctor; appEventNode.tagger = newBlocking === 'Normal' ? normalTagger : blockTagger; if (blocking !== newBlocking) { traverse('removeEventListener', ignorer, blocking); traverse('addEventListener', ignorer, newBlocking); if (blocking === 'Normal') { overflow = document.body.style.overflow; document.body.style.overflow = 'hidden'; } if (newBlocking === 'Normal') { document.body.style.overflow = overflow; } blocking = newBlocking; } return tuple._1; } } function traverse(verbEventListener, ignorer, blocking) { switch(blocking) { case 'Normal': return; case 'Pause': return traverseHelp(verbEventListener, ignorer, mostEvents); case 'Message': return traverseHelp(verbEventListener, ignorer, allEvents); } } function traverseHelp(verbEventListener, handler, eventNames) { for (var i = 0; i < eventNames.length; i++) { document.body[verbEventListener](eventNames[i], handler, true); } } function makeIgnorer(overlayNode) { return function(event) { if (event.type === 'keydown' && event.metaKey && event.which === 82) { return; } var isScroll = event.type === 'scroll' || event.type === 'wheel'; var node = event.target; while (node !== null) { if (node.className === 'elm-overlay-message-details' && isScroll) { return; } if (node === overlayNode && !isScroll) { return; } node = node.parentNode; } event.stopPropagation(); event.preventDefault(); } } var mostEvents = [ 'click', 'dblclick', 'mousemove', 'mouseup', 'mousedown', 'mouseenter', 'mouseleave', 'touchstart', 'touchend', 'touchcancel', 'touchmove', 'pointerdown', 'pointerup', 'pointerover', 'pointerout', 'pointerenter', 'pointerleave', 'pointermove', 'pointercancel', 'dragstart', 'drag', 'dragend', 'dragenter', 'dragover', 'dragleave', 'drop', 'keyup', 'keydown', 'keypress', 'input', 'change', 'focus', 'blur' ]; var allEvents = mostEvents.concat('wheel', 'scroll'); return { node: node, text: text, custom: custom, map: F2(map), on: F3(on), style: style, property: F2(property), attribute: F2(attribute), attributeNS: F3(attributeNS), mapProperty: F2(mapProperty), lazy: F2(lazy), lazy2: F3(lazy2), lazy3: F4(lazy3), keyedNode: F3(keyedNode), program: program, programWithFlags: programWithFlags, staticProgram: staticProgram }; }(); var _elm_lang$virtual_dom$VirtualDom$programWithFlags = function (impl) { return A2(_elm_lang$virtual_dom$Native_VirtualDom.programWithFlags, _elm_lang$virtual_dom$VirtualDom_Debug$wrapWithFlags, impl); }; var _elm_lang$virtual_dom$VirtualDom$program = function (impl) { return A2(_elm_lang$virtual_dom$Native_VirtualDom.program, _elm_lang$virtual_dom$VirtualDom_Debug$wrap, impl); }; var _elm_lang$virtual_dom$VirtualDom$keyedNode = _elm_lang$virtual_dom$Native_VirtualDom.keyedNode; var _elm_lang$virtual_dom$VirtualDom$lazy3 = _elm_lang$virtual_dom$Native_VirtualDom.lazy3; var _elm_lang$virtual_dom$VirtualDom$lazy2 = _elm_lang$virtual_dom$Native_VirtualDom.lazy2; var _elm_lang$virtual_dom$VirtualDom$lazy = _elm_lang$virtual_dom$Native_VirtualDom.lazy; var _elm_lang$virtual_dom$VirtualDom$defaultOptions = {stopPropagation: false, preventDefault: false}; var _elm_lang$virtual_dom$VirtualDom$onWithOptions = _elm_lang$virtual_dom$Native_VirtualDom.on; var _elm_lang$virtual_dom$VirtualDom$on = F2( function (eventName, decoder) { return A3(_elm_lang$virtual_dom$VirtualDom$onWithOptions, eventName, _elm_lang$virtual_dom$VirtualDom$defaultOptions, decoder); }); var _elm_lang$virtual_dom$VirtualDom$style = _elm_lang$virtual_dom$Native_VirtualDom.style; var _elm_lang$virtual_dom$VirtualDom$mapProperty = _elm_lang$virtual_dom$Native_VirtualDom.mapProperty; var _elm_lang$virtual_dom$VirtualDom$attributeNS = _elm_lang$virtual_dom$Native_VirtualDom.attributeNS; var _elm_lang$virtual_dom$VirtualDom$attribute = _elm_lang$virtual_dom$Native_VirtualDom.attribute; var _elm_lang$virtual_dom$VirtualDom$property = _elm_lang$virtual_dom$Native_VirtualDom.property; var _elm_lang$virtual_dom$VirtualDom$map = _elm_lang$virtual_dom$Native_VirtualDom.map; var _elm_lang$virtual_dom$VirtualDom$text = _elm_lang$virtual_dom$Native_VirtualDom.text; var _elm_lang$virtual_dom$VirtualDom$node = _elm_lang$virtual_dom$Native_VirtualDom.node; var _elm_lang$virtual_dom$VirtualDom$Options = F2( function (a, b) { return {stopPropagation: a, preventDefault: b}; }); var _elm_lang$virtual_dom$VirtualDom$Node = {ctor: 'Node'}; var _elm_lang$virtual_dom$VirtualDom$Property = {ctor: 'Property'}; var _elm_lang$html$Html$programWithFlags = _elm_lang$virtual_dom$VirtualDom$programWithFlags; var _elm_lang$html$Html$program = _elm_lang$virtual_dom$VirtualDom$program; var _elm_lang$html$Html$beginnerProgram = function (_p0) { var _p1 = _p0; return _elm_lang$html$Html$program( { init: A2( _elm_lang$core$Platform_Cmd_ops['!'], _p1.model, {ctor: '[]'}), update: F2( function (msg, model) { return A2( _elm_lang$core$Platform_Cmd_ops['!'], A2(_p1.update, msg, model), {ctor: '[]'}); }), view: _p1.view, subscriptions: function (_p2) { return _elm_lang$core$Platform_Sub$none; } }); }; var _elm_lang$html$Html$map = _elm_lang$virtual_dom$VirtualDom$map; var _elm_lang$html$Html$text = _elm_lang$virtual_dom$VirtualDom$text; var _elm_lang$html$Html$node = _elm_lang$virtual_dom$VirtualDom$node; var _elm_lang$html$Html$body = _elm_lang$html$Html$node('body'); var _elm_lang$html$Html$section = _elm_lang$html$Html$node('section'); var _elm_lang$html$Html$nav = _elm_lang$html$Html$node('nav'); var _elm_lang$html$Html$article = _elm_lang$html$Html$node('article'); var _elm_lang$html$Html$aside = _elm_lang$html$Html$node('aside'); var _elm_lang$html$Html$h1 = _elm_lang$html$Html$node('h1'); var _elm_lang$html$Html$h2 = _elm_lang$html$Html$node('h2'); var _elm_lang$html$Html$h3 = _elm_lang$html$Html$node('h3'); var _elm_lang$html$Html$h4 = _elm_lang$html$Html$node('h4'); var _elm_lang$html$Html$h5 = _elm_lang$html$Html$node('h5'); var _elm_lang$html$Html$h6 = _elm_lang$html$Html$node('h6'); var _elm_lang$html$Html$header = _elm_lang$html$Html$node('header'); var _elm_lang$html$Html$footer = _elm_lang$html$Html$node('footer'); var _elm_lang$html$Html$address = _elm_lang$html$Html$node('address'); var _elm_lang$html$Html$main_ = _elm_lang$html$Html$node('main'); var _elm_lang$html$Html$p = _elm_lang$html$Html$node('p'); var _elm_lang$html$Html$hr = _elm_lang$html$Html$node('hr'); var _elm_lang$html$Html$pre = _elm_lang$html$Html$node('pre'); var _elm_lang$html$Html$blockquote = _elm_lang$html$Html$node('blockquote'); var _elm_lang$html$Html$ol = _elm_lang$html$Html$node('ol'); var _elm_lang$html$Html$ul = _elm_lang$html$Html$node('ul'); var _elm_lang$html$Html$li = _elm_lang$html$Html$node('li'); var _elm_lang$html$Html$dl = _elm_lang$html$Html$node('dl'); var _elm_lang$html$Html$dt = _elm_lang$html$Html$node('dt'); var _elm_lang$html$Html$dd = _elm_lang$html$Html$node('dd'); var _elm_lang$html$Html$figure = _elm_lang$html$Html$node('figure'); var _elm_lang$html$Html$figcaption = _elm_lang$html$Html$node('figcaption'); var _elm_lang$html$Html$div = _elm_lang$html$Html$node('div'); var _elm_lang$html$Html$a = _elm_lang$html$Html$node('a'); var _elm_lang$html$Html$em = _elm_lang$html$Html$node('em'); var _elm_lang$html$Html$strong = _elm_lang$html$Html$node('strong'); var _elm_lang$html$Html$small = _elm_lang$html$Html$node('small'); var _elm_lang$html$Html$s = _elm_lang$html$Html$node('s'); var _elm_lang$html$Html$cite = _elm_lang$html$Html$node('cite'); var _elm_lang$html$Html$q = _elm_lang$html$Html$node('q'); var _elm_lang$html$Html$dfn = _elm_lang$html$Html$node('dfn'); var _elm_lang$html$Html$abbr = _elm_lang$html$Html$node('abbr'); var _elm_lang$html$Html$time = _elm_lang$html$Html$node('time'); var _elm_lang$html$Html$code = _elm_lang$html$Html$node('code'); var _elm_lang$html$Html$var = _elm_lang$html$Html$node('var'); var _elm_lang$html$Html$samp = _elm_lang$html$Html$node('samp'); var _elm_lang$html$Html$kbd = _elm_lang$html$Html$node('kbd'); var _elm_lang$html$Html$sub = _elm_lang$html$Html$node('sub'); var _elm_lang$html$Html$sup = _elm_lang$html$Html$node('sup'); var _elm_lang$html$Html$i = _elm_lang$html$Html$node('i'); var _elm_lang$html$Html$b = _elm_lang$html$Html$node('b'); var _elm_lang$html$Html$u = _elm_lang$html$Html$node('u'); var _elm_lang$html$Html$mark = _elm_lang$html$Html$node('mark'); var _elm_lang$html$Html$ruby = _elm_lang$html$Html$node('ruby'); var _elm_lang$html$Html$rt = _elm_lang$html$Html$node('rt'); var _elm_lang$html$Html$rp = _elm_lang$html$Html$node('rp'); var _elm_lang$html$Html$bdi = _elm_lang$html$Html$node('bdi'); var _elm_lang$html$Html$bdo = _elm_lang$html$Html$node('bdo'); var _elm_lang$html$Html$span = _elm_lang$html$Html$node('span'); var _elm_lang$html$Html$br = _elm_lang$html$Html$node('br'); var _elm_lang$html$Html$wbr = _elm_lang$html$Html$node('wbr'); var _elm_lang$html$Html$ins = _elm_lang$html$Html$node('ins'); var _elm_lang$html$Html$del = _elm_lang$html$Html$node('del'); var _elm_lang$html$Html$img = _elm_lang$html$Html$node('img'); var _elm_lang$html$Html$iframe = _elm_lang$html$Html$node('iframe'); var _elm_lang$html$Html$embed = _elm_lang$html$Html$node('embed'); var _elm_lang$html$Html$object = _elm_lang$html$Html$node('object'); var _elm_lang$html$Html$param = _elm_lang$html$Html$node('param'); var _elm_lang$html$Html$video = _elm_lang$html$Html$node('video'); var _elm_lang$html$Html$audio = _elm_lang$html$Html$node('audio'); var _elm_lang$html$Html$source = _elm_lang$html$Html$node('source'); var _elm_lang$html$Html$track = _elm_lang$html$Html$node('track'); var _elm_lang$html$Html$canvas = _elm_lang$html$Html$node('canvas'); var _elm_lang$html$Html$math = _elm_lang$html$Html$node('math'); var _elm_lang$html$Html$table = _elm_lang$html$Html$node('table'); var _elm_lang$html$Html$caption = _elm_lang$html$Html$node('caption'); var _elm_lang$html$Html$colgroup = _elm_lang$html$Html$node('colgroup'); var _elm_lang$html$Html$col = _elm_lang$html$Html$node('col'); var _elm_lang$html$Html$tbody = _elm_lang$html$Html$node('tbody'); var _elm_lang$html$Html$thead = _elm_lang$html$Html$node('thead'); var _elm_lang$html$Html$tfoot = _elm_lang$html$Html$node('tfoot'); var _elm_lang$html$Html$tr = _elm_lang$html$Html$node('tr'); var _elm_lang$html$Html$td = _elm_lang$html$Html$node('td'); var _elm_lang$html$Html$th = _elm_lang$html$Html$node('th'); var _elm_lang$html$Html$form = _elm_lang$html$Html$node('form'); var _elm_lang$html$Html$fieldset = _elm_lang$html$Html$node('fieldset'); var _elm_lang$html$Html$legend = _elm_lang$html$Html$node('legend'); var _elm_lang$html$Html$label = _elm_lang$html$Html$node('label'); var _elm_lang$html$Html$input = _elm_lang$html$Html$node('input'); var _elm_lang$html$Html$button = _elm_lang$html$Html$node('button'); var _elm_lang$html$Html$select = _elm_lang$html$Html$node('select'); var _elm_lang$html$Html$datalist = _elm_lang$html$Html$node('datalist'); var _elm_lang$html$Html$optgroup = _elm_lang$html$Html$node('optgroup'); var _elm_lang$html$Html$option = _elm_lang$html$Html$node('option'); var _elm_lang$html$Html$textarea = _elm_lang$html$Html$node('textarea'); var _elm_lang$html$Html$keygen = _elm_lang$html$Html$node('keygen'); var _elm_lang$html$Html$output = _elm_lang$html$Html$node('output'); var _elm_lang$html$Html$progress = _elm_lang$html$Html$node('progress'); var _elm_lang$html$Html$meter = _elm_lang$html$Html$node('meter'); var _elm_lang$html$Html$details = _elm_lang$html$Html$node('details'); var _elm_lang$html$Html$summary = _elm_lang$html$Html$node('summary'); var _elm_lang$html$Html$menuitem = _elm_lang$html$Html$node('menuitem'); var _elm_lang$html$Html$menu = _elm_lang$html$Html$node('menu'); var _elm_lang$html$Html_Attributes$map = _elm_lang$virtual_dom$VirtualDom$mapProperty; var _elm_lang$html$Html_Attributes$attribute = _elm_lang$virtual_dom$VirtualDom$attribute; var _elm_lang$html$Html_Attributes$contextmenu = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'contextmenu', value); }; var _elm_lang$html$Html_Attributes$draggable = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'draggable', value); }; var _elm_lang$html$Html_Attributes$itemprop = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'itemprop', value); }; var _elm_lang$html$Html_Attributes$tabindex = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'tabIndex', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$charset = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'charset', value); }; var _elm_lang$html$Html_Attributes$height = function (value) { return A2( _elm_lang$html$Html_Attributes$attribute, 'height', _elm_lang$core$Basics$toString(value)); }; var _elm_lang$html$Html_Attributes$width = function (value) { return A2( _elm_lang$html$Html_Attributes$attribute, 'width', _elm_lang$core$Basics$toString(value)); }; var _elm_lang$html$Html_Attributes$formaction = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'formAction', value); }; var _elm_lang$html$Html_Attributes$list = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'list', value); }; var _elm_lang$html$Html_Attributes$minlength = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'minLength', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$maxlength = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'maxlength', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$size = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'size', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$form = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'form', value); }; var _elm_lang$html$Html_Attributes$cols = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'cols', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$rows = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'rows', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$challenge = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'challenge', value); }; var _elm_lang$html$Html_Attributes$media = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'media', value); }; var _elm_lang$html$Html_Attributes$rel = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'rel', value); }; var _elm_lang$html$Html_Attributes$datetime = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'datetime', value); }; var _elm_lang$html$Html_Attributes$pubdate = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'pubdate', value); }; var _elm_lang$html$Html_Attributes$colspan = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'colspan', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$rowspan = function (n) { return A2( _elm_lang$html$Html_Attributes$attribute, 'rowspan', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$manifest = function (value) { return A2(_elm_lang$html$Html_Attributes$attribute, 'manifest', value); }; var _elm_lang$html$Html_Attributes$property = _elm_lang$virtual_dom$VirtualDom$property; var _elm_lang$html$Html_Attributes$stringProperty = F2( function (name, string) { return A2( _elm_lang$html$Html_Attributes$property, name, _elm_lang$core$Json_Encode$string(string)); }); var _elm_lang$html$Html_Attributes$class = function (name) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'className', name); }; var _elm_lang$html$Html_Attributes$id = function (name) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'id', name); }; var _elm_lang$html$Html_Attributes$title = function (name) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'title', name); }; var _elm_lang$html$Html_Attributes$accesskey = function ($char) { return A2( _elm_lang$html$Html_Attributes$stringProperty, 'accessKey', _elm_lang$core$String$fromChar($char)); }; var _elm_lang$html$Html_Attributes$dir = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'dir', value); }; var _elm_lang$html$Html_Attributes$dropzone = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'dropzone', value); }; var _elm_lang$html$Html_Attributes$lang = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'lang', value); }; var _elm_lang$html$Html_Attributes$content = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'content', value); }; var _elm_lang$html$Html_Attributes$httpEquiv = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'httpEquiv', value); }; var _elm_lang$html$Html_Attributes$language = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'language', value); }; var _elm_lang$html$Html_Attributes$src = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'src', value); }; var _elm_lang$html$Html_Attributes$alt = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'alt', value); }; var _elm_lang$html$Html_Attributes$preload = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'preload', value); }; var _elm_lang$html$Html_Attributes$poster = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'poster', value); }; var _elm_lang$html$Html_Attributes$kind = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'kind', value); }; var _elm_lang$html$Html_Attributes$srclang = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'srclang', value); }; var _elm_lang$html$Html_Attributes$sandbox = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'sandbox', value); }; var _elm_lang$html$Html_Attributes$srcdoc = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'srcdoc', value); }; var _elm_lang$html$Html_Attributes$type_ = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'type', value); }; var _elm_lang$html$Html_Attributes$value = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'value', value); }; var _elm_lang$html$Html_Attributes$defaultValue = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'defaultValue', value); }; var _elm_lang$html$Html_Attributes$placeholder = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'placeholder', value); }; var _elm_lang$html$Html_Attributes$accept = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'accept', value); }; var _elm_lang$html$Html_Attributes$acceptCharset = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'acceptCharset', value); }; var _elm_lang$html$Html_Attributes$action = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'action', value); }; var _elm_lang$html$Html_Attributes$autocomplete = function (bool) { return A2( _elm_lang$html$Html_Attributes$stringProperty, 'autocomplete', bool ? 'on' : 'off'); }; var _elm_lang$html$Html_Attributes$enctype = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'enctype', value); }; var _elm_lang$html$Html_Attributes$method = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'method', value); }; var _elm_lang$html$Html_Attributes$name = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'name', value); }; var _elm_lang$html$Html_Attributes$pattern = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'pattern', value); }; var _elm_lang$html$Html_Attributes$for = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'htmlFor', value); }; var _elm_lang$html$Html_Attributes$max = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'max', value); }; var _elm_lang$html$Html_Attributes$min = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'min', value); }; var _elm_lang$html$Html_Attributes$step = function (n) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'step', n); }; var _elm_lang$html$Html_Attributes$wrap = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'wrap', value); }; var _elm_lang$html$Html_Attributes$usemap = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'useMap', value); }; var _elm_lang$html$Html_Attributes$shape = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'shape', value); }; var _elm_lang$html$Html_Attributes$coords = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'coords', value); }; var _elm_lang$html$Html_Attributes$keytype = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'keytype', value); }; var _elm_lang$html$Html_Attributes$align = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'align', value); }; var _elm_lang$html$Html_Attributes$cite = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'cite', value); }; var _elm_lang$html$Html_Attributes$href = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'href', value); }; var _elm_lang$html$Html_Attributes$target = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'target', value); }; var _elm_lang$html$Html_Attributes$downloadAs = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'download', value); }; var _elm_lang$html$Html_Attributes$hreflang = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'hreflang', value); }; var _elm_lang$html$Html_Attributes$ping = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'ping', value); }; var _elm_lang$html$Html_Attributes$start = function (n) { return A2( _elm_lang$html$Html_Attributes$stringProperty, 'start', _elm_lang$core$Basics$toString(n)); }; var _elm_lang$html$Html_Attributes$headers = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'headers', value); }; var _elm_lang$html$Html_Attributes$scope = function (value) { return A2(_elm_lang$html$Html_Attributes$stringProperty, 'scope', value); }; var _elm_lang$html$Html_Attributes$boolProperty = F2( function (name, bool) { return A2( _elm_lang$html$Html_Attributes$property, name, _elm_lang$core$Json_Encode$bool(bool)); }); var _elm_lang$html$Html_Attributes$hidden = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'hidden', bool); }; var _elm_lang$html$Html_Attributes$contenteditable = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'contentEditable', bool); }; var _elm_lang$html$Html_Attributes$spellcheck = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'spellcheck', bool); }; var _elm_lang$html$Html_Attributes$async = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'async', bool); }; var _elm_lang$html$Html_Attributes$defer = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'defer', bool); }; var _elm_lang$html$Html_Attributes$scoped = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'scoped', bool); }; var _elm_lang$html$Html_Attributes$autoplay = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'autoplay', bool); }; var _elm_lang$html$Html_Attributes$controls = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'controls', bool); }; var _elm_lang$html$Html_Attributes$loop = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'loop', bool); }; var _elm_lang$html$Html_Attributes$default = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'default', bool); }; var _elm_lang$html$Html_Attributes$seamless = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'seamless', bool); }; var _elm_lang$html$Html_Attributes$checked = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'checked', bool); }; var _elm_lang$html$Html_Attributes$selected = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'selected', bool); }; var _elm_lang$html$Html_Attributes$autofocus = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'autofocus', bool); }; var _elm_lang$html$Html_Attributes$disabled = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'disabled', bool); }; var _elm_lang$html$Html_Attributes$multiple = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'multiple', bool); }; var _elm_lang$html$Html_Attributes$novalidate = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'noValidate', bool); }; var _elm_lang$html$Html_Attributes$readonly = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'readOnly', bool); }; var _elm_lang$html$Html_Attributes$required = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'required', bool); }; var _elm_lang$html$Html_Attributes$ismap = function (value) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'isMap', value); }; var _elm_lang$html$Html_Attributes$download = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'download', bool); }; var _elm_lang$html$Html_Attributes$reversed = function (bool) { return A2(_elm_lang$html$Html_Attributes$boolProperty, 'reversed', bool); }; var _elm_lang$html$Html_Attributes$classList = function (list) { return _elm_lang$html$Html_Attributes$class( A2( _elm_lang$core$String$join, ' ', A2( _elm_lang$core$List$map, _elm_lang$core$Tuple$first, A2(_elm_lang$core$List$filter, _elm_lang$core$Tuple$second, list)))); }; var _elm_lang$html$Html_Attributes$style = _elm_lang$virtual_dom$VirtualDom$style; var _elm_lang$html$Html_Events$keyCode = A2(_elm_lang$core$Json_Decode$field, 'keyCode', _elm_lang$core$Json_Decode$int); var _elm_lang$html$Html_Events$targetChecked = A2( _elm_lang$core$Json_Decode$at, { ctor: '::', _0: 'target', _1: { ctor: '::', _0: 'checked', _1: {ctor: '[]'} } }, _elm_lang$core$Json_Decode$bool); var _elm_lang$html$Html_Events$targetValue = A2( _elm_lang$core$Json_Decode$at, { ctor: '::', _0: 'target', _1: { ctor: '::', _0: 'value', _1: {ctor: '[]'} } }, _elm_lang$core$Json_Decode$string); var _elm_lang$html$Html_Events$defaultOptions = _elm_lang$virtual_dom$VirtualDom$defaultOptions; var _elm_lang$html$Html_Events$onWithOptions = _elm_lang$virtual_dom$VirtualDom$onWithOptions; var _elm_lang$html$Html_Events$on = _elm_lang$virtual_dom$VirtualDom$on; var _elm_lang$html$Html_Events$onFocus = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'focus', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onBlur = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'blur', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onSubmitOptions = _elm_lang$core$Native_Utils.update( _elm_lang$html$Html_Events$defaultOptions, {preventDefault: true}); var _elm_lang$html$Html_Events$onSubmit = function (msg) { return A3( _elm_lang$html$Html_Events$onWithOptions, 'submit', _elm_lang$html$Html_Events$onSubmitOptions, _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onCheck = function (tagger) { return A2( _elm_lang$html$Html_Events$on, 'change', A2(_elm_lang$core$Json_Decode$map, tagger, _elm_lang$html$Html_Events$targetChecked)); }; var _elm_lang$html$Html_Events$onInput = function (tagger) { return A2( _elm_lang$html$Html_Events$on, 'input', A2(_elm_lang$core$Json_Decode$map, tagger, _elm_lang$html$Html_Events$targetValue)); }; var _elm_lang$html$Html_Events$onMouseOut = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mouseout', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onMouseOver = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mouseover', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onMouseLeave = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mouseleave', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onMouseEnter = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mouseenter', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onMouseUp = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mouseup', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onMouseDown = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'mousedown', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onDoubleClick = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'dblclick', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$onClick = function (msg) { return A2( _elm_lang$html$Html_Events$on, 'click', _elm_lang$core$Json_Decode$succeed(msg)); }; var _elm_lang$html$Html_Events$Options = F2( function (a, b) { return {stopPropagation: a, preventDefault: b}; }); var _user$project$Main$viewMessage = function (message) { return A2( _elm_lang$html$Html$li, {ctor: '[]'}, { ctor: '::', _0: A2( _elm_lang$html$Html$b, {ctor: '[]'}, { ctor: '::', _0: _elm_lang$html$Html$text( A2(_elm_lang$core$Basics_ops['++'], message.who, ': ')), _1: {ctor: '[]'} }), _1: { ctor: '::', _0: _elm_lang$html$Html$text(message.content), _1: {ctor: '[]'} } }); }; var _user$project$Main$viewMessages = function (messages) { return A2( _elm_lang$html$Html$ul, { ctor: '::', _0: _elm_lang$html$Html_Attributes$style( { ctor: '::', _0: {ctor: '_Tuple2', _0: 'list-style', _1: 'none'}, _1: {ctor: '[]'} }), _1: {ctor: '[]'} }, A2(_elm_lang$core$List$map, _user$project$Main$viewMessage, messages)); }; var _user$project$Main$init = { ctor: '_Tuple2', _0: { username: '', message: '', messages: {ctor: '[]'}, id: 'Not connected yet', rooms: {ctor: '[]'} }, _1: _elm_lang$core$Platform_Cmd$none }; var _user$project$Main$connect = _elm_lang$core$Native_Platform.outgoingPort( 'connect', function (v) { return {username: v.username}; }); var _user$project$Main$loginSuccess = _elm_lang$core$Native_Platform.incomingPort('loginSuccess', _elm_lang$core$Json_Decode$string); var _user$project$Main$refreshRoomList = _elm_lang$core$Native_Platform.outgoingPort( 'refreshRoomList', function (v) { return null; }); var _user$project$Main$roomList = _elm_lang$core$Native_Platform.incomingPort( 'roomList', _elm_lang$core$Json_Decode$list(_elm_lang$core$Json_Decode$string)); var _user$project$Main$addRoom = _elm_lang$core$Native_Platform.incomingPort('addRoom', _elm_lang$core$Json_Decode$string); var _user$project$Main$sendMessage = _elm_lang$core$Native_Platform.outgoingPort( 'sendMessage', function (v) { return {message: v.message, room: v.room}; }); var _user$project$Main$update = F2( function (msg, model) { var _p0 = msg; switch (_p0.ctor) { case 'UpdateUsername': return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, {username: _p0._0}), _1: _elm_lang$core$Platform_Cmd$none }; case 'Connect': return { ctor: '_Tuple2', _0: model, _1: _user$project$Main$connect( {username: model.username}) }; case 'LoginSuccess': return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, {id: _p0._0}), _1: _user$project$Main$refreshRoomList( {ctor: '_Tuple0'}) }; case 'RoomList': return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, {rooms: _p0._0}), _1: _elm_lang$core$Platform_Cmd$none }; case 'AddRoom': return { ctor: '_Tuple2', _0: A2( _elm_lang$core$Debug$log, 'model', _elm_lang$core$Native_Utils.update( model, { rooms: {ctor: '::', _0: _p0._0, _1: model.rooms} })), _1: _elm_lang$core$Platform_Cmd$none }; case 'UpdateMessage': return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, {message: _p0._0}), _1: _elm_lang$core$Platform_Cmd$none }; case 'SendMessage': return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, {message: ''}), _1: _user$project$Main$sendMessage( {room: _p0._0, message: model.message}) }; default: return { ctor: '_Tuple2', _0: _elm_lang$core$Native_Utils.update( model, { messages: A2( _elm_lang$core$Basics_ops['++'], model.messages, { ctor: '::', _0: _p0._0, _1: {ctor: '[]'} }) }), _1: _elm_lang$core$Platform_Cmd$none }; } }); var _user$project$Main$recvMessage = _elm_lang$core$Native_Platform.incomingPort( 'recvMessage', A2( _elm_lang$core$Json_Decode$andThen, function (content) { return A2( _elm_lang$core$Json_Decode$andThen, function (who) { return _elm_lang$core$Json_Decode$succeed( {content: content, who: who}); }, A2(_elm_lang$core$Json_Decode$field, 'who', _elm_lang$core$Json_Decode$string)); }, A2(_elm_lang$core$Json_Decode$field, 'content', _elm_lang$core$Json_Decode$string))); var _user$project$Main$Model = F5( function (a, b, c, d, e) { return {username: a, message: b, messages: c, id: d, rooms: e}; }); var _user$project$Main$Credentials = function (a) { return {username: a}; }; var _user$project$Main$Send = F2( function (a, b) { return {message: a, room: b}; }); var _user$project$Main$Message = F2( function (a, b) { return {content: a, who: b}; }); var _user$project$Main$RecvMessage = function (a) { return {ctor: 'RecvMessage', _0: a}; }; var _user$project$Main$SendMessage = function (a) { return {ctor: 'SendMessage', _0: a}; }; var _user$project$Main$room = function (name) { return A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id(name), _1: { ctor: '::', _0: _elm_lang$html$Html_Attributes$class('roomDiv'), _1: {ctor: '[]'} } }, { ctor: '::', _0: A2( _elm_lang$html$Html$button, { ctor: '::', _0: _elm_lang$html$Html_Events$onClick( _user$project$Main$SendMessage(name)), _1: {ctor: '[]'} }, { ctor: '::', _0: _elm_lang$html$Html$text(name), _1: {ctor: '[]'} }), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id( A2(_elm_lang$core$Basics_ops['++'], 'roomOccupant_', name)), _1: { ctor: '::', _0: _elm_lang$html$Html_Attributes$class('roomOccupants'), _1: {ctor: '[]'} } }, {ctor: '[]'}), _1: {ctor: '[]'} } }); }; var _user$project$Main$rooms = function (model) { return A2(_elm_lang$core$List$map, _user$project$Main$room, model.rooms); }; var _user$project$Main$AddRoom = function (a) { return {ctor: 'AddRoom', _0: a}; }; var _user$project$Main$RoomList = function (a) { return {ctor: 'RoomList', _0: a}; }; var _user$project$Main$LoginSuccess = function (a) { return {ctor: 'LoginSuccess', _0: a}; }; var _user$project$Main$subscriptions = function (model) { return _elm_lang$core$Platform_Sub$batch( { ctor: '::', _0: _user$project$Main$loginSuccess(_user$project$Main$LoginSuccess), _1: { ctor: '::', _0: _user$project$Main$roomList(_user$project$Main$RoomList), _1: { ctor: '::', _0: _user$project$Main$addRoom(_user$project$Main$AddRoom), _1: { ctor: '::', _0: _user$project$Main$recvMessage(_user$project$Main$RecvMessage), _1: {ctor: '[]'} } } } }); }; var _user$project$Main$Connect = {ctor: 'Connect'}; var _user$project$Main$UpdateMessage = function (a) { return {ctor: 'UpdateMessage', _0: a}; }; var _user$project$Main$UpdateUsername = function (a) { return {ctor: 'UpdateUsername', _0: a}; }; var _user$project$Main$view = function (model) { return A2( _elm_lang$html$Html$div, {ctor: '[]'}, { ctor: '::', _0: A2( _elm_lang$html$Html$h2, {ctor: '[]'}, { ctor: '::', _0: _elm_lang$html$Html$text('The Demo'), _1: {ctor: '[]'} }), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$class('preconnection'), _1: {ctor: '[]'} }, { ctor: '::', _0: _elm_lang$html$Html$text('Username: '), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$input, { ctor: '::', _0: _elm_lang$html$Html_Attributes$type_('text'), _1: { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('userNameField'), _1: { ctor: '::', _0: _elm_lang$html$Html_Events$onInput(_user$project$Main$UpdateUsername), _1: {ctor: '[]'} } } }, {ctor: '[]'}), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, {ctor: '[]'}, { ctor: '::', _0: A2( _elm_lang$html$Html$button, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('connectButton'), _1: { ctor: '::', _0: _elm_lang$html$Html_Events$onClick(_user$project$Main$Connect), _1: {ctor: '[]'} } }, { ctor: '::', _0: _elm_lang$html$Html$text('Connect'), _1: {ctor: '[]'} }), _1: {ctor: '[]'} }), _1: {ctor: '[]'} } } }), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$class('postconnection'), _1: {ctor: '[]'} }, { ctor: '::', _0: A2( _elm_lang$html$Html$hr, {ctor: '[]'}, {ctor: '[]'}), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('sendMessageArea'), _1: {ctor: '[]'} }, { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('iam'), _1: {ctor: '[]'} }, { ctor: '::', _0: _elm_lang$html$Html$text(model.id), _1: {ctor: '[]'} }), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$textarea, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('sendMessageText'), _1: { ctor: '::', _0: _elm_lang$html$Html_Attributes$placeholder('Enter your message here'), _1: { ctor: '::', _0: _elm_lang$html$Html_Events$onInput(_user$project$Main$UpdateMessage), _1: { ctor: '::', _0: _elm_lang$html$Html_Attributes$value(model.message), _1: {ctor: '[]'} } } } }, {ctor: '[]'}), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('rooms'), _1: {ctor: '[]'} }, _user$project$Main$rooms(model)), _1: {ctor: '[]'} } } }), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('receiveMessageArea'), _1: {ctor: '[]'} }, { ctor: '::', _0: _elm_lang$html$Html$text('Received Messages:'), _1: { ctor: '::', _0: A2( _elm_lang$html$Html$div, { ctor: '::', _0: _elm_lang$html$Html_Attributes$id('conversation'), _1: {ctor: '[]'} }, { ctor: '::', _0: _user$project$Main$viewMessages(model.messages), _1: {ctor: '[]'} }), _1: {ctor: '[]'} } }), _1: {ctor: '[]'} } } }), _1: {ctor: '[]'} } } }); }; var _user$project$Main$main = _elm_lang$html$Html$program( {init: _user$project$Main$init, update: _user$project$Main$update, view: _user$project$Main$view, subscriptions: _user$project$Main$subscriptions})(); var Elm = {}; Elm['Main'] = Elm['Main'] || {}; if (typeof _user$project$Main$main !== 'undefined') { _user$project$Main$main(Elm['Main'], 'Main', undefined); } if (typeof define === "function" && define['amd']) { define([], function() { return Elm; }); return; } if (typeof module === "object") { module['exports'] = Elm; return; } var globalElm = this['Elm']; if (typeof globalElm === "undefined") { this['Elm'] = Elm; return; } for (var publicModule in Elm) { if (publicModule in globalElm) { throw new Error('There are two Elm modules called `' + publicModule + '` on this page! Rename one of them.'); } globalElm[publicModule] = Elm[publicModule]; } }).call(this);
/* ======================================================================== * NIFTY ADMIN TEMPLATE V2.7.3 * ------------------------------------------------------------------------- * - themeOn.net - * ========================================================================*/ /* REQUIRED PLUGINS /* ======================================================================== /*! nanoScrollerJS - v0.8.7 - (c) 2015 James Florentino; Licensed MIT */ !function(a){return"function"==typeof define&&define.amd?define(["jquery"],function(b){return a(b,window,document)}):"object"==typeof exports?module.exports=a(require("jquery"),window,document):a(jQuery,window,document)}(function(a,b,c){"use strict";var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H;z={paneClass:"nano-pane",sliderClass:"nano-slider",contentClass:"nano-content",iOSNativeScrolling:!1,preventPageScrolling:!1,disableResize:!1,alwaysVisible:!1,flashDelay:1500,sliderMinHeight:20,sliderMaxHeight:null,documentContext:null,windowContext:null},u="scrollbar",t="scroll",l="mousedown",m="mouseenter",n="mousemove",p="mousewheel",o="mouseup",s="resize",h="drag",i="enter",w="up",r="panedown",f="DOMMouseScroll",g="down",x="wheel",j="keydown",k="keyup",v="touchmove",d="Microsoft Internet Explorer"===b.navigator.appName&&/msie 7./i.test(b.navigator.appVersion)&&b.ActiveXObject,e=null,D=b.requestAnimationFrame,y=b.cancelAnimationFrame,F=c.createElement("div").style,H=function(){var a,b,c,d,e,f;for(d=["t","webkitT","MozT","msT","OT"],a=e=0,f=d.length;f>e;a=++e)if(c=d[a],b=d[a]+"ransform",b in F)return d[a].substr(0,d[a].length-1);return!1}(),G=function(a){return H===!1?!1:""===H?a:H+a.charAt(0).toUpperCase()+a.substr(1)},E=G("transform"),B=E!==!1,A=function(){var a,b,d;return a=c.createElement("div"),b=a.style,b.position="absolute",b.width="100px",b.height="100px",b.overflow=t,b.top="-9999px",c.body.appendChild(a),d=a.offsetWidth-a.clientWidth,c.body.removeChild(a),d},C=function(){var a,c,d;return c=b.navigator.userAgent,(a=/(?=.+Mac OS X)(?=.+Firefox)/.test(c))?(d=/Firefox\/\d{2}\./.exec(c),d&&(d=d[0].replace(/\D+/g,"")),a&&+d>23):!1},q=function(){function j(d,f){this.el=d,this.options=f,e||(e=A()),this.$el=a(this.el),this.doc=a(this.options.documentContext||c),this.win=a(this.options.windowContext||b),this.body=this.doc.find("body"),this.$content=this.$el.children("."+this.options.contentClass),this.$content.attr("tabindex",this.options.tabIndex||0),this.content=this.$content[0],this.previousPosition=0,this.options.iOSNativeScrolling&&null!=this.el.style.WebkitOverflowScrolling?this.nativeScrolling():this.generate(),this.createEvents(),this.addEvents(),this.reset()}return j.prototype.preventScrolling=function(a,b){if(this.isActive)if(a.type===f)(b===g&&a.originalEvent.detail>0||b===w&&a.originalEvent.detail<0)&&a.preventDefault();else if(a.type===p){if(!a.originalEvent||!a.originalEvent.wheelDelta)return;(b===g&&a.originalEvent.wheelDelta<0||b===w&&a.originalEvent.wheelDelta>0)&&a.preventDefault()}},j.prototype.nativeScrolling=function(){this.$content.css({WebkitOverflowScrolling:"touch"}),this.iOSNativeScrolling=!0,this.isActive=!0},j.prototype.updateScrollValues=function(){var a,b;a=this.content,this.maxScrollTop=a.scrollHeight-a.clientHeight,this.prevScrollTop=this.contentScrollTop||0,this.contentScrollTop=a.scrollTop,b=this.contentScrollTop>this.previousPosition?"down":this.contentScrollTop<this.previousPosition?"up":"same",this.previousPosition=this.contentScrollTop,"same"!==b&&this.$el.trigger("update",{position:this.contentScrollTop,maximum:this.maxScrollTop,direction:b}),this.iOSNativeScrolling||(this.maxSliderTop=this.paneHeight-this.sliderHeight,this.sliderTop=0===this.maxScrollTop?0:this.contentScrollTop*this.maxSliderTop/this.maxScrollTop)},j.prototype.setOnScrollStyles=function(){var a;B?(a={},a[E]="translate(0, "+this.sliderTop+"px)"):a={top:this.sliderTop},D?(y&&this.scrollRAF&&y(this.scrollRAF),this.scrollRAF=D(function(b){return function(){return b.scrollRAF=null,b.slider.css(a)}}(this))):this.slider.css(a)},j.prototype.createEvents=function(){this.events={down:function(a){return function(b){return a.isBeingDragged=!0,a.offsetY=b.pageY-a.slider.offset().top,a.slider.is(b.target)||(a.offsetY=0),a.pane.addClass("active"),a.doc.bind(n,a.events[h]).bind(o,a.events[w]),a.body.bind(m,a.events[i]),!1}}(this),drag:function(a){return function(b){return a.sliderY=b.pageY-a.$el.offset().top-a.paneTop-(a.offsetY||.5*a.sliderHeight),a.scroll(),a.contentScrollTop>=a.maxScrollTop&&a.prevScrollTop!==a.maxScrollTop?a.$el.trigger("scrollend"):0===a.contentScrollTop&&0!==a.prevScrollTop&&a.$el.trigger("scrolltop"),!1}}(this),up:function(a){return function(b){return a.isBeingDragged=!1,a.pane.removeClass("active"),a.doc.unbind(n,a.events[h]).unbind(o,a.events[w]),a.body.unbind(m,a.events[i]),!1}}(this),resize:function(a){return function(b){a.reset()}}(this),panedown:function(a){return function(b){return a.sliderY=(b.offsetY||b.originalEvent.layerY)-.5*a.sliderHeight,a.scroll(),a.events.down(b),!1}}(this),scroll:function(a){return function(b){a.updateScrollValues(),a.isBeingDragged||(a.iOSNativeScrolling||(a.sliderY=a.sliderTop,a.setOnScrollStyles()),null!=b&&(a.contentScrollTop>=a.maxScrollTop?(a.options.preventPageScrolling&&a.preventScrolling(b,g),a.prevScrollTop!==a.maxScrollTop&&a.$el.trigger("scrollend")):0===a.contentScrollTop&&(a.options.preventPageScrolling&&a.preventScrolling(b,w),0!==a.prevScrollTop&&a.$el.trigger("scrolltop"))))}}(this),wheel:function(a){return function(b){var c;if(null!=b)return c=b.delta||b.wheelDelta||b.originalEvent&&b.originalEvent.wheelDelta||-b.detail||b.originalEvent&&-b.originalEvent.detail,c&&(a.sliderY+=-c/3),a.scroll(),!1}}(this),enter:function(a){return function(b){var c;if(a.isBeingDragged)return 1!==(b.buttons||b.which)?(c=a.events)[w].apply(c,arguments):void 0}}(this)}},j.prototype.addEvents=function(){var a;this.removeEvents(),a=this.events,this.options.disableResize||this.win.bind(s,a[s]),this.iOSNativeScrolling||(this.slider.bind(l,a[g]),this.pane.bind(l,a[r]).bind(""+p+" "+f,a[x])),this.$content.bind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.removeEvents=function(){var a;a=this.events,this.win.unbind(s,a[s]),this.iOSNativeScrolling||(this.slider.unbind(),this.pane.unbind()),this.$content.unbind(""+t+" "+p+" "+f+" "+v,a[t])},j.prototype.generate=function(){var a,c,d,f,g,h,i;return f=this.options,h=f.paneClass,i=f.sliderClass,a=f.contentClass,(g=this.$el.children("."+h)).length||g.children("."+i).length||this.$el.append('<div class="'+h+'"><div class="'+i+'" /></div>'),this.pane=this.$el.children("."+h),this.slider=this.pane.find("."+i),0===e&&C()?(d=b.getComputedStyle(this.content,null).getPropertyValue("padding-right").replace(/[^0-9.]+/g,""),c={right:-14,paddingRight:+d+14}):e&&(c={right:-e},this.$el.addClass("has-scrollbar")),null!=c&&this.$content.css(c),this},j.prototype.restore=function(){this.stopped=!1,this.iOSNativeScrolling||this.pane.show(),this.addEvents()},j.prototype.reset=function(){var a,b,c,f,g,h,i,j,k,l,m,n;return this.iOSNativeScrolling?void(this.contentHeight=this.content.scrollHeight):(this.$el.find("."+this.options.paneClass).length||this.generate().stop(),this.stopped&&this.restore(),a=this.content,f=a.style,g=f.overflowY,d&&this.$content.css({height:this.$content.height()}),b=a.scrollHeight+e,l=parseInt(this.$el.css("max-height"),10),l>0&&(this.$el.height(""),this.$el.height(a.scrollHeight>l?l:a.scrollHeight)),i=this.pane.outerHeight(!1),k=parseInt(this.pane.css("top"),10),h=parseInt(this.pane.css("bottom"),10),j=i+k+h,n=Math.round(j/b*i),n<this.options.sliderMinHeight?n=this.options.sliderMinHeight:null!=this.options.sliderMaxHeight&&n>this.options.sliderMaxHeight&&(n=this.options.sliderMaxHeight),g===t&&f.overflowX!==t&&(n+=e),this.maxSliderTop=j-n,this.contentHeight=b,this.paneHeight=i,this.paneOuterHeight=j,this.sliderHeight=n,this.paneTop=k,this.slider.height(n),this.events.scroll(),this.pane.show(),this.isActive=!0,a.scrollHeight===a.clientHeight||this.pane.outerHeight(!0)>=a.scrollHeight&&g!==t?(this.pane.hide(),this.isActive=!1):this.el.clientHeight===a.scrollHeight&&g===t?this.slider.hide():this.slider.show(),this.pane.css({opacity:this.options.alwaysVisible?1:"",visibility:this.options.alwaysVisible?"visible":""}),c=this.$content.css("position"),("static"===c||"relative"===c)&&(m=parseInt(this.$content.css("right"),10),m&&this.$content.css({right:"",marginRight:m})),this)},j.prototype.scroll=function(){return this.isActive?(this.sliderY=Math.max(0,this.sliderY),this.sliderY=Math.min(this.maxSliderTop,this.sliderY),this.$content.scrollTop(this.maxScrollTop*this.sliderY/this.maxSliderTop),this.iOSNativeScrolling||(this.updateScrollValues(),this.setOnScrollStyles()),this):void 0},j.prototype.scrollBottom=function(a){return this.isActive?(this.$content.scrollTop(this.contentHeight-this.$content.height()-a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTop=function(a){return this.isActive?(this.$content.scrollTop(+a).trigger(p),this.stop().restore(),this):void 0},j.prototype.scrollTo=function(a){return this.isActive?(this.scrollTop(this.$el.find(a).get(0).offsetTop),this):void 0},j.prototype.stop=function(){return y&&this.scrollRAF&&(y(this.scrollRAF),this.scrollRAF=null),this.stopped=!0,this.removeEvents(),this.iOSNativeScrolling||this.pane.hide(),this},j.prototype.destroy=function(){return this.stopped||this.stop(),!this.iOSNativeScrolling&&this.pane.length&&this.pane.remove(),d&&this.$content.height(""),this.$content.removeAttr("tabindex"),this.$el.hasClass("has-scrollbar")&&(this.$el.removeClass("has-scrollbar"),this.$content.css({right:""})),this},j.prototype.flash=function(){return!this.iOSNativeScrolling&&this.isActive?(this.reset(),this.pane.addClass("flashed"),setTimeout(function(a){return function(){a.pane.removeClass("flashed")}}(this),this.options.flashDelay),this):void 0},j}(),a.fn.nanoScroller=function(b){return this.each(function(){var c,d;if((d=this.nanoscroller)||(c=a.extend({},z,b),this.nanoscroller=d=new q(this,c)),b&&"object"==typeof b){if(a.extend(d.options,b),null!=b.scrollBottom)return d.scrollBottom(b.scrollBottom);if(null!=b.scrollTop)return d.scrollTop(b.scrollTop);if(b.scrollTo)return d.scrollTo(b.scrollTo);if("bottom"===b.scroll)return d.scrollBottom(0);if("top"===b.scroll)return d.scrollTop(0);if(b.scroll&&b.scroll instanceof a)return d.scrollTo(b.scroll);if(b.stop)return d.stop();if(b.destroy)return d.destroy();if(b.flash)return d.flash()}return d.reset()})},a.fn.nanoScroller.Constructor=q}); /* REQUIRED PLUGINS /*! ======================================================================== * metismenu - v2.7.2 * A jQuery menu plugin * https://github.com/onokumus/metisMenu#readme * * Made by Osman Nuri Okumuş <onokumus@gmail.com> (https://github.com/onokumus) * Under MIT License */ !function(a,b){if("function"==typeof define&&define.amd)define(["jquery"],b);else if("undefined"!=typeof exports)b(require("jquery"));else{var c={exports:{}};b(a.jquery),a.metisMenu=c.exports}}(this,function(a){"use strict";function b(a){return a&&a.__esModule?a:{default:a}}function c(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}var d=(b(a),"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a}),e=function(a){function b(){return{bindType:f.end,delegateType:f.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}}function c(){if(window.QUnit)return!1;var a=document.createElement("mm");for(var b in g)if(void 0!==a.style[b])return{end:g[b]};return!1}function d(b){var c=this,d=!1;return a(this).one(h.TRANSITION_END,function(){d=!0}),setTimeout(function(){d||h.triggerTransitionEnd(c)},b),this}function e(){f=c(),a.fn.emulateTransitionEnd=d,h.supportsTransitionEnd()&&(a.event.special[h.TRANSITION_END]=b())}var f=!1,g={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"},h={TRANSITION_END:"mmTransitionEnd",triggerTransitionEnd:function(b){a(b).trigger(f.end)},supportsTransitionEnd:function(){return Boolean(f)}};return e(),h}(jQuery);(function(a){var b="metisMenu",f="metisMenu",g="."+f,h=".data-api",i=a.fn[b],j=350,k={toggle:!0,preventDefault:!0,activeClass:"active",collapseClass:"collapse",collapseInClass:"in",collapsingClass:"collapsing",triggerElement:"a",parentTrigger:"li",subMenu:"ul"},l={SHOW:"show"+g,SHOWN:"shown"+g,HIDE:"hide"+g,HIDDEN:"hidden"+g,CLICK_DATA_API:"click"+g+h},m=function(){function b(a,d){c(this,b),this._element=a,this._config=this._getConfig(d),this._transitioning=null,this.init()}return b.prototype.init=function(){var b=this;a(this._element).find(this._config.parentTrigger+"."+this._config.activeClass).has(this._config.subMenu).children(this._config.subMenu).attr("aria-expanded",!0).addClass(this._config.collapseClass+" "+this._config.collapseInClass),a(this._element).find(this._config.parentTrigger).not("."+this._config.activeClass).has(this._config.subMenu).children(this._config.subMenu).attr("aria-expanded",!1).addClass(this._config.collapseClass),a(this._element).find(this._config.parentTrigger).has(this._config.subMenu).children(this._config.triggerElement).on(l.CLICK_DATA_API,function(c){var d=a(this),e=d.parent(b._config.parentTrigger),f=e.siblings(b._config.parentTrigger).children(b._config.triggerElement),g=e.children(b._config.subMenu);b._config.preventDefault&&c.preventDefault(),"true"!==d.attr("aria-disabled")&&(e.hasClass(b._config.activeClass)?(d.attr("aria-expanded",!1),b._hide(g)):(b._show(g),d.attr("aria-expanded",!0),b._config.toggle&&f.attr("aria-expanded",!1)),b._config.onTransitionStart&&b._config.onTransitionStart(c))})},b.prototype._show=function(b){if(!this._transitioning&&!a(b).hasClass(this._config.collapsingClass)){var c=this,d=a(b),f=a.Event(l.SHOW);if(d.trigger(f),!f.isDefaultPrevented()){d.parent(this._config.parentTrigger).addClass(this._config.activeClass),this._config.toggle&&this._hide(d.parent(this._config.parentTrigger).siblings().children(this._config.subMenu+"."+this._config.collapseInClass).attr("aria-expanded",!1)),d.removeClass(this._config.collapseClass).addClass(this._config.collapsingClass).height(0),this.setTransitioning(!0);var g=function(){d.removeClass(c._config.collapsingClass).addClass(c._config.collapseClass+" "+c._config.collapseInClass).height("").attr("aria-expanded",!0),c.setTransitioning(!1),d.trigger(l.SHOWN)};return e.supportsTransitionEnd()?void d.height(d[0].scrollHeight).one(e.TRANSITION_END,g).emulateTransitionEnd(j):void g()}}},b.prototype._hide=function(b){if(!this._transitioning&&a(b).hasClass(this._config.collapseInClass)){var c=this,d=a(b),f=a.Event(l.HIDE);if(d.trigger(f),!f.isDefaultPrevented()){d.parent(this._config.parentTrigger).removeClass(this._config.activeClass),d.height(d.height())[0].offsetHeight,d.addClass(this._config.collapsingClass).removeClass(this._config.collapseClass).removeClass(this._config.collapseInClass),this.setTransitioning(!0);var g=function(){c._transitioning&&c._config.onTransitionEnd&&c._config.onTransitionEnd(),c.setTransitioning(!1),d.trigger(l.HIDDEN),d.removeClass(c._config.collapsingClass).addClass(c._config.collapseClass).attr("aria-expanded",!1)};return e.supportsTransitionEnd()?void(0==d.height()||"none"==d.css("display")?g():d.height(0).one(e.TRANSITION_END,g).emulateTransitionEnd(j)):void g()}}},b.prototype.setTransitioning=function(a){this._transitioning=a},b.prototype.dispose=function(){a.removeData(this._element,f),a(this._element).find(this._config.parentTrigger).has(this._config.subMenu).children(this._config.triggerElement).off("click"),this._transitioning=null,this._config=null,this._element=null},b.prototype._getConfig=function(b){return b=a.extend({},k,b)},b._jQueryInterface=function(c){return this.each(function(){var e=a(this),g=e.data(f),h=a.extend({},k,e.data(),"object"===("undefined"==typeof c?"undefined":d(c))&&c);if(!g&&/dispose/.test(c)&&this.dispose(),g||(g=new b(this,h),e.data(f,g)),"string"==typeof c){if(void 0===g[c])throw new Error('No method named "'+c+'"');g[c]()}})},b}();return a.fn[b]=m._jQueryInterface,a.fn[b].Constructor=m,a.fn[b].noConflict=function(){return a.fn[b]=i,m._jQueryInterface},m})(jQuery)}); /*! jQuery resizeEnd Event v1.0.1 - Copyright (c) 2013 Giuseppe Gurgone - License http://git.io/iRQs3g */ !function($,e){var t={};t.eventName="resizeEnd",t.delay=250,t.poll=function(){var n=$(this),a=n.data(t.eventName);a.timeoutId&&e.clearTimeout(a.timeoutId),a.timeoutId=e.setTimeout(function(){n.trigger(t.eventName)},t.delay)},$.event.special[t.eventName]={setup:function(){var e=$(this);e.data(t.eventName,{}),e.on("resize",t.poll)},teardown:function(){var n=$(this),a=n.data(t.eventName);a.timeoutId&&e.clearTimeout(a.timeoutId),n.removeData(t.eventName),n.off("resize",t.poll)}},$.fn[t.eventName]=function(e,n){return arguments.length>0?this.on(t.eventName,null,e,n):this.trigger(t.eventName)}}(jQuery,this); /* ======================================================================== * INITIALIZED * ------------------------------------------------------------------------- * - themeOn.net - * ========================================================================*/ !function ($) { "use strict"; $(document).ready(function(){ $(document).trigger('nifty.ready'); }); $(document).on('nifty.ready', function(){ var dropdownAnim = function(dropup, margin, opacity, block = false){ var margin_prop = 'margin-top', styles = {}; if(dropup) margin_prop = 'margin-bottom'; styles[margin_prop]= margin + 'px'; styles['opacity']= opacity; if (block){ styles['display']= 'block'; } return styles; }; // Add slideup & fadein animation to dropdown $('.dropdown').on('show.bs.dropdown', function(e){ var $dropdown = $(this).find('.dropdown-menu'), dropup = $(this).hasClass('dropup'), ori_margin = parseInt($dropdown.css((dropup)?'margin-bottom':'margin-top')); $dropdown.css(dropdownAnim(dropup, ori_margin - 15, 0 )).animate(dropdownAnim(dropup, ori_margin, 1 ), 250, function(){ $(this).css({'margin-top':'', 'margin-bottom': ''}); }); }); // Add slidedown & fadeout animation to dropdown $('.dropdown').on('hide.bs.dropdown', function(e){ var $dropdown = $(this).find('.dropdown-menu'), dropup = $(this).hasClass('dropup'), ori_margin = parseInt($dropdown.css((dropup)?'margin-bottom':'margin-top')); $dropdown.css(dropdownAnim(dropup, ori_margin, 1, true)).animate(dropdownAnim(dropup, ori_margin + 15, 0 ), 250, function(){ $(this).css({'margin-top':'', 'margin-bottom': '', display:'', opacity:''}); }); }); //Activate the Bootstrap tooltips var tooltip = $('.add-tooltip'); if (tooltip.length)tooltip.tooltip(); var popover = $('.add-popover'); if (popover.length)popover.popover(); // Update nancoscroller $('#navbar-container .navbar-top-links').on('shown.bs.dropdown', '.dropdown', function () { $(this).find('.nano').nanoScroller({preventPageScrolling: true}); }); var nano = $('.nano'); if(nano.length) nano.nanoScroller({preventPageScrolling: true}); $.niftyNav('bind'); $.niftyAside('bind'); }); }(jQuery); /* ======================================================================== * MEGA DROPDOWN v1.3 * ------------------------------------------------------------------------ * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; var megadropdown = null, mega = function(el){ var megaBtn = el.find('.mega-dropdown-toggle'), megaMenu = el.find('.mega-dropdown-menu'); megaBtn.on('click', function(e){ e.preventDefault(); el.toggleClass('open'); if(el.hasClass('open')){ animIn(megaMenu); }else{ animOut(megaMenu); } }); }, animIn = function(menu){ menu.css({'margin-top': '-15px', opacity: 0}).animate({'margin-top': '0px', opacity: 1}, 250, function(){ $(this).css({'margin-top':''}); }); }, animOut = function(menu){ menu.css({'margin-top': '0px', opacity: 1, display: 'block'}).animate({'margin-top': '15px', opacity: 0}, 250, function(){ $(this).css({'margin-top':'', display:''}); }); }, methods = { toggle : function(){ this.toggleClass('open'); if(el.hasClass('open')){ animIn(this.find('.mega-dropdown-menu')); }else{ animOut(this.find('.mega-dropdown-menu')); } return null; }, show : function(){ this.addClass('open'); animIn(this.find('.mega-dropdown-menu')); return null; }, hide : function(){ console.log(this); this.removeClass('open'); animOut(this.find('.mega-dropdown-menu')); return null; } }; $.fn.niftyMega = function(method){ var chk = false; this.each(function(){ if(methods[method]){ chk = methods[method].apply($(this),Array.prototype.slice.call(arguments, 1)); }else if (typeof method === 'object' || !method) { mega($(this)); }; }); return chk; }; $(document).on('nifty.ready', function(){ megadropdown = $('.mega-dropdown'); if(megadropdown.length){ megadropdown.niftyMega(); $('html').on('click', function(e) { if (!$(e.target).closest('.mega-dropdown').length && megadropdown.hasClass('open')) { megadropdown.removeClass('open'); animOut(megadropdown.find('.mega-dropdown-menu')); } }); }; }); }(jQuery); /* ======================================================================== * PANEL REMOVAL v1.1 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; $(document).on('nifty.ready', function() { var closebtn = $('[data-dismiss="panel"]'); if (closebtn.length) { closebtn.one('click', function(e){ e.preventDefault(); var el = $(this).parents('.panel'); el.addClass('remove').on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e){ if (e.originalEvent.propertyName == "opacity") { el.remove(); } }); }); }else{closebtn = null} }); }(jQuery); /* ======================================================================== * SCROLL TO TOP BUTTON v1.3.1 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; $(document).one('nifty.ready', function(){ var niftyScrollTop = $('.scroll-top'), niftyWindow = $(window), isMobile = function(){ return ( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) }(); if (niftyScrollTop.length && !isMobile) { var isVisible = false, offsetTop = 250, calcScroll = function (){ if (niftyWindow.scrollTop() > offsetTop && !isVisible) { niftyScrollTop.addClass('in').stop(true, true).css({'animation':'none'}).show(0).css({ "animation" : "jellyIn .8s" }); isVisible = true; }else if (niftyWindow.scrollTop() < offsetTop && isVisible) { niftyScrollTop.removeClass('in'); isVisible = false; } }; calcScroll(); niftyWindow.scroll(calcScroll); niftyScrollTop.on('click', function(e){ e.preventDefault(); $('body, html').animate({scrollTop : 0}, 500); }); }else{ niftyScrollTop = null; niftyWindow = null; } isMobile = null; }); }(jQuery) /* ======================================================================== * NIFTY OVERLAY v1.1 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; var defaults = { 'displayIcon' : true, // DESC : Should we display the icon or not. // VALUE : true or false // TYPE : Boolean 'iconColor' : 'text-dark', // DESC : The color of the icon.. // VALUE : text-light || text-primary || text-info || text-success || text-warning || text-danger || text-mint || text-purple || text-pink || text-dark // TYPE : String 'iconClass' : 'fa fa-refresh fa-spin fa-2x', // DESC : Class name of the font awesome icons", Currently we use font-awesome for default value. // VALUE : (Icon Class Name) // TYPE : String 'title' : '', // DESC : Overlay title // TYPE : String 'desc' : '' // DESC : Descrition // TYPE : String }, uID = function() { return (((1+Math.random())*0x10000)|0).toString(16).substring(1); }, methods = { 'show' : function(el){ var target = $(el.attr('data-target')), ovId = 'nifty-overlay-' + uID() + uID()+"-" + uID(), panelOv = $('<div id="'+ ovId +'" class="panel-overlay"></div>'); el.prop('disabled', true).data('niftyOverlay',ovId); target.addClass('panel-overlay-wrap'); panelOv.appendTo(target).html(el.data('overlayTemplate')); return null; }, 'hide': function(el){ var target = $(el.attr('data-target')); var boxLoad = $('#'+ el.data('niftyOverlay')); if (boxLoad.length) { el.prop('disabled', false); target.removeClass('panel-overlay-wrap'); boxLoad.hide().remove(); } return null; } }, loadBox = function(el,options){ if (el.data('overlayTemplate')) { return null; } var opt = $.extend({},defaults,options), icon = (opt.displayIcon)?'<span class="panel-overlay-icon '+opt.iconColor+'"><i class="'+opt.iconClass+'"></i></span>':''; el.data('overlayTemplate', '<div class="panel-overlay-content pad-all unselectable">'+icon+'<h4 class="panel-overlay-title">'+opt.title+'</h4><p>'+opt.desc+'</p></div>'); return null; }; $.fn.niftyOverlay = function(method){ if (methods[method]){ return methods[method](this); }else if (typeof method === 'object' || !method) { return this.each(function () { loadBox($(this), method); }); } return null; }; }(jQuery); /* ======================================================================== * NIFTY NOTIFICATION v1.3 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; var pageHolder, floatContainer = {}, notyContainer, niftyContainer, niftyContentContainer, addNew = false, supportTransition = function(){ var thisBody = document.body || document.documentElement, thisStyle = thisBody.style, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined; return support; }(); $.niftyNoty = function(options){ var defaults = { type : 'primary', // DESC : Specify style for the alerts. // VALUE : primary || info || success || warning || danger || mint || purple || pink || dark // TYPE : String icon : '', // DESC : Icon class names // VALUE : (Icon Class Name) // TYPE : String title : '', // VALUE : (The title of the alert) // TYPE : String message : '', // VALUE : (Message of the alert.) // TYPE : String closeBtn : true, // VALUE : Show or hide the close button. // TYPE : Boolean container : 'page', // DESC : This option is particularly useful in that it allows you to position the notification. // VALUE : page || floating || "specified target name" // TYPE : STRING floating : { position : 'top-right', // Floating position. // Currently only supports "top-right". We will make further development for the next version. animationIn : 'jellyIn', // Please use the animated class name from animate.css animationOut: 'fadeOut' // Please use the animated class name from animate.css }, html : null, // Insert HTML into the notification. If false, jQuery's text method will be used to insert content into the DOM. focus : true, //Scroll to the notification timer : 0, // DESC : To enable the "auto close" alerts, please specify the time to show the alert before it closed. // VALUE : Value is in milliseconds. (0 to disable the autoclose.) // TYPE : Number //EVENTS / CALLBACK FUNCTIONS onShow : function(){}, // This event fires immediately when the show instance method is called. onShown : function(){}, // This event is fired when the modal has been made visible to the user (will wait for CSS transitions to complete). onHide : function(){}, // This event is fired immediately when the hide instance method has been called. onHidden : function(){} // This event is fired when the notification has finished being hidden from the user (will wait for CSS transitions to complete). }, opt = $.extend({},defaults, options ), el = $('<div class="alert-wrap"></div>'), iconTemplate = function(){ var icon = ''; if (options && options.icon) { icon = '<div class="media-left alert-icon"><i class="'+ opt.icon +'"></i></div>'; } return icon; }, alertTimer, template = function(){ var clsBtn = opt.closeBtn ? '<button class="close" type="button"><i class="pci-cross pci-circle"></i></button>' : ''; var defTemplate = '<div class="alert alert-'+ opt.type + '" role="alert">'+ clsBtn + '<div class="media">'; if (!opt.html) { return defTemplate + iconTemplate() + '<div class="media-body"><h4 class="alert-title">'+ opt.title +'</h4><p class="alert-message">'+ opt.message +'</p></div></div>'; } return defTemplate + opt.html +'</div></div>'; }(), closeAlert = function(e){ opt.onHide(); if (opt.container === 'floating' && opt.floating.animationOut) { el.removeClass(opt.floating.animationIn).addClass(opt.floating.animationOut); if (!supportTransition) { opt.onHidden(); el.remove(); } } el.removeClass('in').on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e){ if (e.originalEvent.propertyName == "max-height") { opt.onHidden(); el.remove(); } }); clearInterval(alertTimer); return null; }, focusElement = function(pos){ $('body, html').animate({scrollTop: pos}, 300, function(){ el.addClass('in'); }); }, init = function(){ opt.onShow(); if (opt.container === 'page') { if (!pageHolder) { pageHolder = $('<div id="page-alert"></div>'); if(!niftyContentContainer || !niftyContentContainer.length) niftyContentContainer = $('#content-container'); niftyContentContainer.prepend(pageHolder); }; notyContainer = pageHolder; if (opt.focus) focusElement(0); }else if (opt.container === 'floating') { if (!floatContainer[opt.floating.position]) { floatContainer[opt.floating.position] = $('<div id="floating-' + opt.floating.position + '" class="floating-container"></div>'); if(!niftyContainer || !niftyContentContainer.length) niftyContainer = $('#container'); niftyContainer.append(floatContainer[opt.floating.position]); } notyContainer = floatContainer[opt.floating.position]; if (opt.floating.animationIn) el.addClass('in animated ' + opt.floating.animationIn ); opt.focus = false; }else { var $ct = $(opt.container); var $panelct = $ct.children('.panel-alert'); var $panelhd = $ct.children('.panel-heading'); if (!$ct.length) { addNew = false; return false; } if(!$panelct.length){ notyContainer = $('<div class="panel-alert"></div>'); if($panelhd.length){ $panelhd.after(notyContainer); }else{ $ct.prepend(notyContainer) } }else{ notyContainer = $panelct; } if (opt.focus) focusElement($ct.offset().top - 30); } addNew = true; return false; }(); if (addNew) { notyContainer.append(el.html(template)); el.find('[data-dismiss="noty"]').one('click', closeAlert); if(opt.closeBtn) el.find('.close').one('click', closeAlert); if (opt.timer > 0)alertTimer = setInterval(closeAlert, opt.timer); if (!opt.focus) var addIn = setInterval(function(){el.addClass('in');clearInterval(addIn);},200); el.one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd animationend webkitAnimationEnd oAnimationEnd MSAnimationEnd', function(e){ if ((e.originalEvent.propertyName == "max-height" || e.type == "animationend") && addNew) { opt.onShown(); addNew = false; } }); } }; }(jQuery); /* ======================================================================== * NIFTY LANGUAGE SELECTOR v1.1 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * * REQUIRE BOOTSTRAP DROPDOWNS * http://getbootstrap.com/components/#dropdowns * ========================================================================*/ !function ($) { "use strict"; var defaults = { 'dynamicMode' : true, 'selectedOn' : null, 'onChange' : null }, langSelector = function(el, opt){ var options = $.extend({},defaults, opt ); var $el = el.find('.lang-selected'), $langMenu = $el.parent('.lang-selector').siblings('.dropdown-menu'), $langBtn = $langMenu.find('a'), selectedID = $langBtn.filter('.active').find('.lang-id').text(), selectedName = $langBtn.filter('.active').find('.lang-name').text(); var changeTo = function(te){ $langBtn.removeClass('active'); te.addClass('active'); $el.html(te.html()); selectedID = te.find('.lang-id').text(); selectedName = te.find('.lang-name').text(); el.trigger('onChange', [{id:selectedID, name : selectedName}]); if(typeof options.onChange == 'function'){ options.onChange.call(this, {id:selectedID, name : selectedName}); } }; $langBtn.on('click', function(e){ if (options.dynamicMode) { e.preventDefault(); e.stopPropagation(); }; el.dropdown('toggle'); changeTo($(this)); }); if (options.selectedOn) changeTo( $(options.selectedOn) ); }, methods = { 'getSelectedID' : function(){ return $(this).find('.lang-id').text(); }, 'getSelectedName' : function(){ return $(this).find('.lang-name').text(); }, 'getSelected' :function(){ var el = $(this); return {id:el.find('.lang-id').text() ,name:el.find('.lang-name').text()}; }, 'setDisable' : function(){ $(this).addClass('disabled'); return null; }, 'setEnable' : function(el){ $(this).removeClass('disabled'); return null; } }; $.fn.niftyLanguage = function(method){ var chk = false; this.each(function(){ if(methods[method]){ chk = methods[method].apply(this,Array.prototype.slice.call(arguments, 1)); }else if (typeof method === 'object' || !method) { langSelector($(this), method); }; }); return chk; } }(jQuery); /* ======================================================================== * NIFTY CHECK v1.2 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; var allFormEl, formElement = function(el){ if (el.data('nifty-check')){ return; }else{ el.data('nifty-check', true); if (el.text().trim().length){ el.addClass("form-text"); }else{ el.removeClass("form-text"); } } var input = el.find('input')[0], groupName = input.name, $groupInput = function(){ if (input.type == 'radio' && groupName) { //return $('.form-radio').not(el).find('input').filter('input[name='+groupName+']').parent(); return $('.form-radio').not(el).find('input').filter('input[name="' + groupName + '"]').parent(); }else{ return false; } }(), changed = function(){ if(input.type == 'radio' && $groupInput.length) { $groupInput.each(function(){ var $gi = $(this); if ($gi.hasClass('active')) $gi.trigger('nifty.ch.unchecked'); $gi.removeClass('active'); }); } if (input.checked) { el.addClass('active').trigger('nifty.ch.checked'); }else{ el.removeClass('active').trigger('nifty.ch.unchecked'); } }; if (input.checked) { el.addClass('active'); }else{ el.removeClass('active'); } $(input).on('change', changed); }, methods = { isChecked : function(){ return this[0].checked; }, toggle : function(){ this[0].checked = !this[0].checked; this.trigger('change'); return null; }, toggleOn : function(){ if(!this[0].checked){ this[0].checked = true; this.trigger('change'); } return null; }, toggleOff : function(){ if(this[0].checked && this[0].type == 'checkbox'){ this[0].checked = false; this.trigger('change'); } return null; } }, bindForm = function(){ allFormEl = $('.form-checkbox, .form-radio'); if(allFormEl.length) allFormEl.niftyCheck(); } $.fn.niftyCheck = function(method){ var chk = false; this.each(function(){ if(methods[method]){ chk = methods[method].apply($(this).find('input'),Array.prototype.slice.call(arguments, 1)); }else if (typeof method === 'object' || !method) { formElement($(this)); }; }); return chk; }; $(document).on('nifty.ready',bindForm).on('change', '.form-checkbox, .form-radio', bindForm).on('change', '.btn-file :file', function() { var input = $(this), numFiles = input.get(0).files ? input.get(0).files.length : 1, label = input.val().replace(/\\/g, '/').replace(/.*\//, ''), size = function(){ try{ return input[0].files[0].size; }catch(err){ return 'Nan'; } }(), fileSize = function(){ if (size == 'Nan' ) { return "Unknown"; } var rSize = Math.floor( Math.log(size) / Math.log(1024) ); return ( size / Math.pow(1024, rSize) ).toFixed(2) * 1 + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][rSize]; }(); input.trigger('fileselect', [numFiles, label, fileSize]); }); }(jQuery); /* ======================================================================== * NAVIGATION SHORTCUT BUTTONS * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { $(document).on('nifty.ready', function() { var shortcutBtn = $('#mainnav-shortcut'); if (shortcutBtn.length) { shortcutBtn.find('li').each(function () { var $el = $(this); $el.popover({ animation:false, trigger: 'hover', placement: 'bottom', container: '#mainnav-container', viewport: '#mainnav-container', template: '<div class="popover mainnav-shortcut"><div class="arrow"></div><div class="popover-content"></div>' }); }); }else{ shortcutBtn = null; } }); }(jQuery); /* ======================================================================== * NIFTY NAVIGATION v1.5 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * Remove it if you don't use the Main Navigation. * ======================================================================== * * REQUIRE BOOTSTRAP POPOVER * http://getbootstrap.com/javascript/#popovers * * REQUIRE JQUERY RESIZEEND * https://github.com/nielse63/jQuery-ResizeEnd * * ========================================================================*/ !function ($) { "use strict"; var $menulink = null, niftyContainer = null, boxedContainer = null, niftyMainNav = null, mainNavHeight = null, scrollbar = null, updateMethod = false, isSmallNav = false, screenSize = null, screenCat = null, defaultSize = null, niftyWindow = $(window), ignoreAffix = false, // Determine and bind hover or "touch" event // =============================================== bindSmallNav = function(){ var hidePopover, $menulink = $('#mainnav-menu > li > a, #mainnav-menu-wrap .mainnav-widget a[data-toggle="menu-widget"]'); $menulink.each(function(){ var $el = $(this), $listTitle = $el.children('.menu-title'), $listSub = $el.siblings('.collapse'), $listWidget = $($el.attr('data-target')), $listWidgetParent = ($listWidget.length)?$listWidget.parent():null, $popover = null, $poptitle = null, $popcontent = null, $popoverSub = null, popoverPosBottom = 0, popoverCssBottom = 0, elPadding = $el.outerHeight() - $el.height()/4, listSubScroll = false, elHasSub = function(){ if ($listWidget.length){ $el.on('click', function(e){e.preventDefault()}); } if ($listSub.length){ //$listSub.removeClass('in').removeAttr('style'); $el.on('click', function(e){e.preventDefault()}).parent('li').removeClass('active'); return true; }else{ return false; } }(), updateScrollInterval = null, updateScrollBar = function(el){ clearInterval(updateScrollInterval); updateScrollInterval = setInterval(function(){ el.nanoScroller({ preventPageScrolling : true, alwaysVisible: true }); clearInterval(updateScrollInterval); },100); }; $(document).click(function(event) { if(!$(event.target).closest('#mainnav-container').length) { $el.removeClass('hover').popover('hide'); } }); $('#mainnav-menu-wrap > .nano').on("update", function(event, values){ $el.removeClass('hover').popover('hide'); }); $el.popover({ animation : false, trigger : 'manual', container : '#mainnav', viewport : $el, html : true, title : function(){ if (elHasSub) return $listTitle.html(); return null }, content : function(){ var $content; if (elHasSub){ $content = $('<div class="sub-menu"></div>'); $listSub.addClass('pop-in').wrap('<div class="nano-content"></div>').parent().appendTo($content); }else if($listWidget.length){ $content = $('<div class="sidebar-widget-popover"></div>'); $listWidget.wrap('<div class="nano-content"></div>').parent().appendTo($content); }else{ $content = '<span class="single-content">' + $listTitle.html() + '</span>'; } return $content; }, template: '<div class="popover menu-popover"><h4 class="popover-title"></h4><div class="popover-content"></div></div>' }).on('show.bs.popover', function () { if(!$popover){ $popover = $el.data('bs.popover').tip(); $poptitle = $popover.find('.popover-title'); $popcontent = $popover.children('.popover-content'); if (!elHasSub && $listWidget.length == 0)return; $popoverSub = $popcontent.children('.sub-menu'); } if (!elHasSub && $listWidget.length == 0)return; }). on('shown.bs.popover', function () { if (!elHasSub && $listWidget.length == 0){ var margintop = 0 - (0.5 * $el.outerHeight()); $popcontent.css({'margin-top': margintop + 'px', 'width' : 'auto'}); return; } var offsetTop = parseInt($popover.css('top')), elHeight = $el.outerHeight(), offsetBottom = function(){ if(niftyContainer.hasClass('mainnav-fixed')){ return $(window).outerHeight() - offsetTop - elHeight; }else{ return $(document).height() - offsetTop - elHeight; } }(), popoverHeight = $popcontent.find('.nano-content').children().css('height','auto').outerHeight(); $popcontent.find('.nano-content').children().css('height',''); if( offsetTop > offsetBottom){ if($poptitle.length && !$poptitle.is(':visible')) elHeight = Math.round(0 - (0.5 * elHeight)); offsetTop -= 5; $popcontent.css({'top': '','bottom': elHeight+'px', 'height': offsetTop}).children().addClass('nano').css({'width':'100%'}).nanoScroller({ preventPageScrolling : true }); updateScrollBar($popcontent.find('.nano')); }else{ if(!niftyContainer.hasClass('navbar-fixed') && niftyMainNav.hasClass('affix-top')) offsetBottom -= 50; if(popoverHeight > offsetBottom){ if(niftyContainer.hasClass('navbar-fixed') || niftyMainNav.hasClass('affix-top')) offsetBottom -= (elHeight + 5); offsetBottom -= 5; $popcontent.css({'top':elHeight+'px', 'bottom':'', 'height': offsetBottom}).children().addClass('nano').css({'width':'100%'}).nanoScroller({ preventPageScrolling : true }); updateScrollBar($popcontent.find('.nano')); }else{ if($poptitle.length && !$poptitle.is(':visible')) elHeight = Math.round(0 - (0.5 * elHeight)); $popcontent.css({'top':elHeight+'px', 'bottom':'', 'height': 'auto'}); } } if($poptitle.length) $poptitle.css('height',$el.outerHeight()); $popcontent.on('click', function(){ $popcontent.find('.nano-pane').hide(); updateScrollBar($popcontent.find('.nano')); }); }) .on('click', function(){ if(!niftyContainer.hasClass('mainnav-sm')) return; $menulink.popover('hide'); $el.addClass('hover').popover('show'); }) .hover( function(){ $menulink.popover('hide'); $el.addClass('hover').popover('show').one('hidden.bs.popover', function () { // detach from popover, fire event then clean up data $el.removeClass('hover'); if (elHasSub) { $listSub.removeAttr('style').appendTo($el.parent()); }else if($listWidget.length){ $listWidget.appendTo($listWidgetParent); } clearInterval(hidePopover); }) }, function(){ clearInterval(hidePopover); hidePopover = setInterval(function(){ if ($popover) { $popover.one('mouseleave', function(){ $el.removeClass('hover').popover('hide'); }); if(!$popover.is(":hover")){ $el.removeClass('hover').popover('hide'); } }; clearInterval(hidePopover); }, 100); } ); }); isSmallNav = true; }, unbindSmallNav = function(){ var colapsed = $('#mainnav-menu').find('.collapse'); if(colapsed.length){ colapsed.each(function(){ var cl = $(this); if (cl.hasClass('in')){ cl.parent('li').addClass('active'); }else{ cl.parent('li').removeClass('active'); } }); } /*if(scrollbar != null && scrollbar.length){ scrollbar.nanoScroller({stop : true}); }*/ $menulink.popover('destroy').unbind('mouseenter mouseleave'); isSmallNav = false; }, updateSize = function(){ //if(!defaultSize) return; var sw = niftyContainer.width(), currentScreen; if (sw <= 740) { currentScreen = 'xs'; }else if (sw > 740 && sw < 992) { currentScreen = 'sm'; }else if (sw >= 992 && sw <= 1200 ) { currentScreen = 'md'; }else{ currentScreen = 'lg'; } if (screenCat != currentScreen){ screenCat = currentScreen; screenSize = currentScreen; if(screenSize == 'sm' && niftyContainer.hasClass('mainnav-lg')){ niftyContainer.addClass('lg-mainnav-lg'); $.niftyNav('collapse'); }else if(screenSize == "xs" && niftyContainer.hasClass('mainnav-lg')){ niftyContainer.removeClass('mainnav-sm mainnav-out mainnav-lg').addClass('mainnav-sm lg-mainnav-lg'); } else if((screenSize == "md" || screenSize == "lg") && niftyContainer.hasClass('lg-mainnav-lg')){ niftyContainer.removeClass('lg-mainnav-lg'); $.niftyNav('expand'); } } }, boxedPosition = function(){ if(niftyContainer.hasClass('boxed-layout') && niftyContainer.hasClass('mainnav-fixed') && boxedContainer.length){ niftyMainNav.css({ 'left' : boxedContainer.offset().left + 'px' }); }else{ niftyMainNav.css({ 'left' :'' }); } }, updateAffix = function(){ if(!ignoreAffix){ try{ niftyMainNav.niftyAffix('update'); }catch(err){ ignoreAffix = true; } } }, updateNav = function(e){ updateAffix(); unbindSmallNav(); updateSize(); boxedPosition(); if (updateMethod == 'collapse' || niftyContainer.hasClass('mainnav-sm') ) { niftyContainer.removeClass('mainnav-in mainnav-out mainnav-lg'); bindSmallNav(); } mainNavHeight = $('#mainnav').height(); updateMethod = false; return null; }, init = function(){ if (!defaultSize) { defaultSize = { xs : 'mainnav-out', sm : niftyMainNav.data('sm') || niftyMainNav.data('all'), md : niftyMainNav.data('md') || niftyMainNav.data('all'), lg : niftyMainNav.data('lg') || niftyMainNav.data('all') } var hasData = false; for (var item in defaultSize) { if (defaultSize[item]) { hasData = true; break; } } if (!hasData) defaultSize = null; updateSize(); } }, methods = { 'revealToggle' : function(){ if (!niftyContainer.hasClass('reveal')) niftyContainer.addClass('reveal'); niftyContainer.toggleClass('mainnav-in mainnav-out').removeClass('mainnav-lg mainnav-sm') if(isSmallNav) unbindSmallNav(); return; }, 'revealIn' : function(){ if (!niftyContainer.hasClass('reveal')) niftyContainer.addClass('reveal'); niftyContainer.addClass('mainnav-in').removeClass('mainnav-out mainnav-lg mainnav-sm'); if(isSmallNav) unbindSmallNav(); return; }, 'revealOut' : function(){ if (!niftyContainer.hasClass('reveal')) niftyContainer.addClass('reveal'); niftyContainer.removeClass('mainnav-in mainnav-lg mainnav-sm').addClass('mainnav-out'); if(isSmallNav) unbindSmallNav(); return; }, 'slideToggle' : function(){ if (!niftyContainer.hasClass('slide')) niftyContainer.addClass('slide'); niftyContainer.toggleClass('mainnav-in mainnav-out').removeClass('mainnav-lg mainnav-sm') if(isSmallNav) unbindSmallNav(); return; }, 'slideIn' : function(){ if (!niftyContainer.hasClass('slide')) niftyContainer.addClass('slide'); niftyContainer.addClass('mainnav-in').removeClass('mainnav-out mainnav-lg mainnav-sm'); if(isSmallNav) unbindSmallNav(); return; }, 'slideOut' : function(){ if (!niftyContainer.hasClass('slide')) niftyContainer.addClass('slide'); niftyContainer.removeClass('mainnav-in mainnav-lg mainnav-sm').addClass('mainnav-out'); if(isSmallNav) unbindSmallNav(); return; }, 'pushToggle' : function(){ niftyContainer.toggleClass('mainnav-in mainnav-out').removeClass('mainnav-lg mainnav-sm'); if (niftyContainer.hasClass('mainnav-in mainnav-out')) niftyContainer.removeClass('mainnav-in'); if(isSmallNav) unbindSmallNav(); return; }, 'pushIn' : function(){ niftyContainer.addClass('mainnav-in').removeClass('mainnav-out mainnav-lg mainnav-sm'); if(isSmallNav) unbindSmallNav(); return; }, 'pushOut' : function(){ niftyContainer.removeClass('mainnav-in mainnav-lg mainnav-sm').addClass('mainnav-out'); if(isSmallNav) unbindSmallNav(); return; }, 'colExpToggle' : function(){ if (niftyContainer.hasClass('mainnav-lg mainnav-sm')) niftyContainer.removeClass('mainnav-lg'); niftyContainer.toggleClass('mainnav-lg mainnav-sm').removeClass('mainnav-in mainnav-out'); return niftyWindow.trigger('resize'); }, 'collapse' : function(){ niftyContainer.addClass('mainnav-sm').removeClass('mainnav-lg mainnav-in mainnav-out'); updateMethod = 'collapse'; return niftyWindow.trigger('resize'); }, 'expand' : function(){ niftyContainer.removeClass('mainnav-sm mainnav-in mainnav-out').addClass('mainnav-lg'); return niftyWindow.trigger('resize'); }, 'togglePosition' : function(){ niftyContainer.toggleClass('mainnav-fixed'); updateAffix(); }, 'fixedPosition' : function(){ niftyContainer.addClass('mainnav-fixed'); scrollbar.nanoScroller({preventPageScrolling : true}); updateAffix(); }, 'staticPosition' : function(){ niftyContainer.removeClass('mainnav-fixed'); scrollbar.nanoScroller({preventPageScrolling : false}); updateAffix(); }, 'update' : updateNav, 'refresh' : updateNav, 'getScreenSize' : function(){ return screenCat }, 'bind' : function(){ var menu = $('#mainnav-menu'); if (menu.length == 0) return false; $menulink = $('#mainnav-menu > li > a, #mainnav-menu-wrap .mainnav-widget a[data-toggle="menu-widget"]'); niftyContainer = $('#container'); boxedContainer = niftyContainer.children('.boxed'); niftyMainNav = $('#mainnav-container'); mainNavHeight = $('#mainnav').height(); var transitionNav = null; niftyMainNav.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e){ if(transitionNav || e.target === niftyMainNav[0]){ clearInterval(transitionNav); transitionNav = setInterval(function(){ $(window).trigger('resize'); clearInterval(transitionNav); transitionNav = null; }, 300); } }); var toggleBtn = $('.mainnav-toggle'); if(toggleBtn.length){ toggleBtn.on('click', function(e){ e.preventDefault(); e.stopPropagation(); if(toggleBtn.hasClass('push')){ $.niftyNav('pushToggle'); }else if(toggleBtn.hasClass('slide')){ $.niftyNav('slideToggle'); }else if(toggleBtn.hasClass('reveal')){ $.niftyNav('revealToggle'); }else{ $.niftyNav('colExpToggle'); } } )}; // COLLAPSIBLE MENU LIST // ================================================================= // Require MetisMenu // http://demo.onokumus.com/metisMenu/ // ================================================================= try { menu.metisMenu({ toggle: true }); }catch(err) { console.error(err.message); } // STYLEABLE SCROLLBARS // ================================================================= // Require nanoScroller // http://jamesflorentino.github.io/nanoScrollerJS/ // ================================================================= try { scrollbar = $('#mainnav-menu-wrap > .nano'); if(scrollbar.length) scrollbar.nanoScroller({ preventPageScrolling : (niftyContainer.hasClass('mainnav-fixed')?true:false)}); }catch(err) { console.error(err.message); } $(window).on('resizeEnd',updateNav).trigger('resize'); } }; $.niftyNav = function(method,complete){ if (methods[method]){ if(method == 'colExpToggle' || method == 'expand' || method == 'collapse'){ if(screenSize == 'xs' && method == 'collapse'){ method = 'pushOut'; }else if((screenSize == 'xs' || screenSize == 'sm') && (method=='colExpToggle' || method == 'expand') && niftyContainer.hasClass('mainnav-sm')){ method = 'pushIn'; } } var val = methods[method].apply(this,Array.prototype.slice.call(arguments, 1)); if(method != 'bind') updateNav(); if(complete) return complete(); else if (val) return val; } return null; }; $.fn.isOnScreen = function(){ var viewport = { top : niftyWindow.scrollTop(), left : niftyWindow.scrollLeft() }; viewport.right = viewport.left + niftyWindow.width(); viewport.bottom = viewport.top + niftyWindow.height(); var bounds = this.offset(); bounds.right = bounds.left + this.outerWidth(); bounds.bottom = bounds.top + this.outerHeight(); return (!(viewport.right < bounds.left || viewport.left > bounds.right || viewport.bottom < bounds.bottom || viewport.top > bounds.top)); }; }(jQuery); /* ======================================================================== * NIFTY ASIDE v1.4.1 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * ========================================================================*/ !function ($) { "use strict"; var niftyAside = null, niftyContainer, niftyWindow = $(window), asideMethods = { 'toggleHideShow' : function(){ niftyContainer.toggleClass('aside-in'); niftyWindow.trigger('resize'); if(niftyContainer.hasClass('aside-in')){ toggleNav(); } }, 'show' : function(){ niftyContainer.addClass('aside-in'); niftyWindow.trigger('resize'); toggleNav(); }, 'hide' : function(){ niftyContainer.removeClass('aside-in'); niftyWindow.trigger('resize'); }, 'toggleAlign' : function(){ niftyContainer.toggleClass('aside-left'); updateAside(); }, 'alignLeft' : function(){ niftyContainer.addClass('aside-left'); updateAside(); }, 'alignRight' : function(){ niftyContainer.removeClass('aside-left'); updateAside(); }, 'togglePosition' : function(){ niftyContainer.toggleClass('aside-fixed'); updateAside(); }, 'fixedPosition' : function(){ niftyContainer.addClass('aside-fixed'); updateAside(); }, 'staticPosition' : function(){ niftyContainer.removeClass('aside-fixed'); updateAside(); }, 'toggleTheme' : function(){ niftyContainer.toggleClass('aside-bright'); }, 'brightTheme' : function(){ niftyContainer.addClass('aside-bright'); }, 'darkTheme' : function(){ niftyContainer.removeClass('aside-bright'); }, 'update' : function(){ updateAside(); }, 'bind' : function(){ bindAside(); } }, toggleNav = function(){ var sw = niftyContainer.width(); if(niftyContainer.hasClass('mainnav-in') && sw > 740){ if(sw > 740 && sw < 992){ $.niftyNav('collapse'); }else{ niftyContainer.removeClass('mainnav-in mainnav-lg mainnav-sm').addClass('mainnav-out'); } } }, boxedContainer = $('#container').children('.boxed'), navlg = 0, navsm = 0, updateAside = function(){ try{ niftyAside.niftyAffix('update'); }catch(err){} var cssProp = {}; if(niftyContainer.hasClass('boxed-layout') && niftyContainer.hasClass('aside-fixed') && boxedContainer.length){ if(niftyContainer.hasClass('aside-left')){ cssProp ={ '-ms-transform' : 'translateX(' + boxedContainer.offset().left + 'px)', '-webkit-transform' : 'translateX(' + boxedContainer.offset().left + 'px)', 'transform' : 'translateX(' + boxedContainer.offset().left + 'px)' } }else{ cssProp = { '-ms-transform' : 'translateX(' + ( 0 - boxedContainer.offset().left) + 'px)', '-webkit-transform' : 'translateX(' + (0 - boxedContainer.offset().left) + 'px)', 'transform' : 'translateX(' + (0 - boxedContainer.offset().left) + 'px)' } } }else{ cssProp = { '-ms-transform' : '', '-webkit-transform' : '', 'transform' : '', 'right':'' } } niftyAside.css(cssProp); }, bindAside = function(){ niftyAside = $('#aside-container'); if(niftyAside.length){ niftyContainer = $('#container'); niftyWindow.on('resizeEnd',updateAside); niftyAside.on('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function(e){ if(e.target == niftyAside[0]){ niftyWindow.trigger('resize'); } }); // STYLEABLE SCROLLBARS // ================================================================= // Require nanoScroller // http://jamesflorentino.github.io/nanoScrollerJS/ // ================================================================= niftyAside.find('.nano').nanoScroller({preventPageScrolling : (niftyContainer.hasClass('aside-fixed')?true:false)}); var toggleBtn = $('.aside-toggle'); if(toggleBtn.length){ toggleBtn.on('click', function(e){ e.preventDefault(); e.stopPropagation(); $(".dropdown.open").removeClass("open"); $.niftyAside('toggleHideShow'); $(this).parent('li').toggleClass('open'); }) } } }; $.niftyAside = function(method,complete){ if (asideMethods[method]){ asideMethods[method].apply(this,Array.prototype.slice.call(arguments, 1)); if(complete) return complete(); } return null; } }(jQuery); /* ======================================================================== * NIFTY AFFIX v1.3 * ------------------------------------------------------------------------- * Nifty Exclusive Plugins - ThemeOn.net * ------------------------------------------------------------------------- * * PLEASE REMOVE THIS PLUGIN WHEN YOU DIDN'T USE THE NAVIGATION OR ASIDE WITH FIXED STATE. * * * * OPTIONAL PLUGINS. * You may choose whether to include it in your project or not. * * * * REQUIRE BOOTSTRAP AFFIX * http://getbootstrap.com/javascript/#affix * ========================================================================*/ !function ($) { "use strict"; var niftyMainNav, niftyAside, niftyContainer, niftyMainnavScroll, niftyAsideScroll, updateScrollInterval, updateScroll = function(e){ clearInterval(updateScrollInterval); updateScrollInterval = setInterval(function(){ if(e[0] == niftyMainNav[0]){ niftyMainnavScroll.nanoScroller({flash : true, preventPageScrolling: (niftyContainer.hasClass('mainnav-fixed')?true:false)}); }else if(e[0] == niftyAside[0]){ niftyAsideScroll.nanoScroller({preventPageScrolling: (niftyContainer.hasClass('aside-fixed')?true:false)}); } clearInterval(updateScrollInterval); updateScrollInterval = null; }, 500); }, bindAffix = function(){ niftyContainer = $('#container') niftyMainNav = $('#mainnav-container'); niftyAside = $('#aside-container'); niftyMainnavScroll = $('#mainnav-menu-wrap > .nano'); niftyAsideScroll = $('#aside > .nano'); if (niftyMainNav.length) niftyMainNav.niftyAffix({className : 'mainnav-fixed'}); if (niftyAside.length) niftyAside.niftyAffix({className : 'aside-fixed'}); }; $.fn.niftyAffix = function(method){ return this.each(function(){ var el = $(this), className; if (typeof method === 'object' || !method){ className = method.className; el.data('nifty.af.class', method.className); }else if (method == 'update') { if(!el.data('nifty.af.class')) bindAffix(); className = el.data('nifty.af.class'); updateScroll(el); }else if(method == 'bind'){ bindAffix(); } if (niftyContainer.hasClass(className) && !niftyContainer.hasClass('navbar-fixed') ) { el.affix({ offset:{ top:$('#navbar').outerHeight() } }).on('affixed.bs.affix affix.bs.affix', function(){ updateScroll(el); }); }else if (!niftyContainer.hasClass(className) || niftyContainer.hasClass('navbar-fixed')) { $(window).off(el.attr('id') +'.affix'); el.removeClass('affix affix-top affix-bottom').removeData('bs.affix'); } }); } }(jQuery);
// mcpe_viz javascript helper file -- created by bedrock_viz program var worldName = 'HaneulCity'; var worldSeed = 1118007487; var creationTime = 'Fri Apr 22 21:01:36 2022'; var creationBedrockVizVersion = '0.1.7'; var loadGeoJSONFlag = false; var fnGeoJSON = 'output.geojson'; var useTilesFlag = true; var tileW = 2048; var tileH = 2048; var dimensionInfo = { '0': { minWorldX: -6224, maxWorldX: 2992 + 15, minWorldY: -8336, maxWorldY: 4224 + 15, playerPosX: 6601.489807, playerPosY: 5501.747681, geojsonBlocks: [ ], spawnableFlag: false, fnLayerTop: 'tiles/bedrock_viz.overworld.map.png.{y}.{x}.png', fnLayerBiome: 'tiles/bedrock_viz.overworld.biome.png.{y}.{x}.png', fnLayerHeight: 'tiles/bedrock_viz.overworld.height_col.png.{y}.{x}.png', fnLayerHeightGrayscale: 'tiles/bedrock_viz.overworld.height_col_grayscale.png.{y}.{x}.png', fnLayerHeightAlpha: 'tiles/bedrock_viz.overworld.height_col_alpha.png.{y}.{x}.png', fnLayerShadedRelief: 'tiles/bedrock_viz.overworld.shaded_relief.png.{y}.{x}.png', fnLayerSlimeChunks: 'tiles/bedrock_viz.overworld.slime_chunks.png.{y}.{x}.png', bottomLayer: -64, topLayer: 319, listLayers: [ '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ] }, '1': { minWorldX: -32, maxWorldX: 224 + 15, minWorldY: -160, maxWorldY: 160 + 15, playerPosX: 0.000000, playerPosY: 0.000000, geojsonBlocks: [ ], spawnableFlag: false, fnLayerTop: 'tiles/bedrock_viz.nether.map.png.{y}.{x}.png', fnLayerBiome: 'tiles/bedrock_viz.nether.biome.png.{y}.{x}.png', fnLayerHeight: 'tiles/bedrock_viz.nether.height_col.png.{y}.{x}.png', fnLayerHeightGrayscale: 'tiles/bedrock_viz.nether.height_col_grayscale.png.{y}.{x}.png', fnLayerHeightAlpha: 'tiles/bedrock_viz.nether.height_col_alpha.png.{y}.{x}.png', fnLayerShadedRelief: 'tiles/bedrock_viz.nether.shaded_relief.png.{y}.{x}.png', fnLayerSlimeChunks: '', bottomLayer: 0, topLayer: 127, listLayers: [ '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ] }, '2': { minWorldX: -112, maxWorldX: 1456 + 15, minWorldY: -992, maxWorldY: 3024 + 15, playerPosX: 0.000000, playerPosY: 0.000000, geojsonBlocks: [ ], spawnableFlag: false, fnLayerTop: 'tiles/bedrock_viz.the-end.map.png.{y}.{x}.png', fnLayerBiome: 'tiles/bedrock_viz.the-end.biome.png.{y}.{x}.png', fnLayerHeight: 'tiles/bedrock_viz.the-end.height_col.png.{y}.{x}.png', fnLayerHeightGrayscale: 'tiles/bedrock_viz.the-end.height_col_grayscale.png.{y}.{x}.png', fnLayerHeightAlpha: 'tiles/bedrock_viz.the-end.height_col_alpha.png.{y}.{x}.png', fnLayerShadedRelief: 'tiles/bedrock_viz.the-end.shaded_relief.png.{y}.{x}.png', fnLayerSlimeChunks: '', bottomLayer: 0, topLayer: 127, listLayers: [ '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', ] } }; // a lookup table for identifying blocks in the web app // key is color (decimal), value is block name // hacky? it sure is! var blockColorLUT = { '65793': { name: 'Air', id: 0, blockdata: 0 }, '10527136': { name: 'Stone', id: 1, blockdata: 0 }, '10527137': { name: 'Granite', id: 1, blockdata: 1 }, '10527138': { name: 'Granite, Polished', id: 1, blockdata: 2 }, '10527139': { name: 'Diorite', id: 1, blockdata: 3 }, '10527140': { name: 'Diorite, Polished', id: 1, blockdata: 4 }, '10527141': { name: 'Andesite', id: 1, blockdata: 5 }, '10527142': { name: 'Andesite, Polished', id: 1, blockdata: 6 }, '2069822': { name: 'Grass Block', id: 2, blockdata: 0 }, '8149766': { name: 'Dirt', id: 3, blockdata: 0 }, '8149767': { name: 'Dirt, Coarse', id: 3, blockdata: 1 }, '12632256': { name: 'Cobblestone', id: 4, blockdata: 0 }, '6908461': { name: 'Planks, Oak', id: 5, blockdata: 0 }, '6908462': { name: 'Planks, Spruce', id: 5, blockdata: 1 }, '6908463': { name: 'Planks, Birch', id: 5, blockdata: 2 }, '6908464': { name: 'Planks, Jungle', id: 5, blockdata: 3 }, '6908465': { name: 'Planks, Acacia', id: 5, blockdata: 4 }, '6908466': { name: 'Planks, Dark Oak', id: 5, blockdata: 5 }, '9108631': { name: 'Sapling, Oak', id: 6, blockdata: 0 }, '9108632': { name: 'Sapling, Spruce', id: 6, blockdata: 1 }, '9108633': { name: 'Sapling, Birch', id: 6, blockdata: 2 }, '9108634': { name: 'Sapling, Jungle', id: 6, blockdata: 3 }, '9108635': { name: 'Sapling, Acacia', id: 6, blockdata: 4 }, '9108636': { name: 'Sapling, Dark Oak', id: 6, blockdata: 5 }, '9108639': { name: 'Sapling, Oak', id: 6, blockdata: 8 }, '9108640': { name: 'Sapling, Spruce', id: 6, blockdata: 9 }, '9108641': { name: 'Sapling, Birch', id: 6, blockdata: 10 }, '9108642': { name: 'Sapling, Jungle', id: 6, blockdata: 11 }, '9108643': { name: 'Sapling, Acacia', id: 6, blockdata: 12 }, '9108644': { name: 'Sapling, Dark Oak', id: 6, blockdata: 13 }, '2105376': { name: 'Bedrock', id: 7, blockdata: 0 }, '6383257': { name: 'Water', id: 8, blockdata: 0 }, '9147101': { name: 'Stationary Water', id: 9, blockdata: 0 }, '16525866': { name: 'Lava', id: 10, blockdata: 0 }, '16525867': { name: 'Stationary Lava', id: 11, blockdata: 0 }, '15591046': { name: 'Sand', id: 12, blockdata: 0 }, '15580806': { name: 'Sand, Red', id: 12, blockdata: 1 }, '8421504': { name: 'Gravel', id: 13, blockdata: 0 }, '16119611': { name: 'Gold Ore', id: 14, blockdata: 0 }, '14401057': { name: 'Iron Ore', id: 15, blockdata: 0 }, '5263440': { name: 'Coal Ore', id: 16, blockdata: 0 }, '9529097': { name: 'Log, Oak (Up/Down)', id: 17, blockdata: 0 }, '9529098': { name: 'Log, Spruce (Up/Down)', id: 17, blockdata: 1 }, '9529099': { name: 'Log, Birch (Up/Down)', id: 17, blockdata: 2 }, '9529100': { name: 'Log, Jungle (Up/Down)', id: 17, blockdata: 3 }, '9529101': { name: 'Log, Oak (East/West)', id: 17, blockdata: 4 }, '9529102': { name: 'Log, Spruce (East/West)', id: 17, blockdata: 5 }, '9529103': { name: 'Log, Birch (East/West)', id: 17, blockdata: 6 }, '9529104': { name: 'Log, Jungle (East/West)', id: 17, blockdata: 7 }, '9529105': { name: 'Log, Oak (North/South)', id: 17, blockdata: 8 }, '9529106': { name: 'Log, Spruce (North/South)', id: 17, blockdata: 9 }, '9529107': { name: 'Log, Birch (North/South)', id: 17, blockdata: 10 }, '9529108': { name: 'Log, Jungle (North/South)', id: 17, blockdata: 11 }, '9529109': { name: 'Log, Oak (Bark Only)', id: 17, blockdata: 12 }, '9529110': { name: 'Log, Spruce (Bark Only)', id: 17, blockdata: 13 }, '9529111': { name: 'Log, Birch (Bark Only)', id: 17, blockdata: 14 }, '9529112': { name: 'Log, Jungle (Bark Only)', id: 17, blockdata: 15 }, '1592862': { name: 'Leaves, Oak', id: 18, blockdata: 0 }, '1592863': { name: 'Leaves, Spruce', id: 18, blockdata: 1 }, '1592864': { name: 'Leaves, Birch', id: 18, blockdata: 2 }, '1592865': { name: 'Leaves, Jungle', id: 18, blockdata: 3 }, '1592866': { name: 'Leaves, Oak (no decay)', id: 18, blockdata: 4 }, '1592867': { name: 'Leaves, Spruce (no decay)', id: 18, blockdata: 5 }, '1592868': { name: 'Leaves, Birch (no decay)', id: 18, blockdata: 6 }, '1592869': { name: 'Leaves, Jungle (no decay)', id: 18, blockdata: 7 }, '1592870': { name: 'Leaves, Oak (check decay', id: 18, blockdata: 8 }, '1592871': { name: 'Leaves, Spruce (check decay)', id: 18, blockdata: 9 }, '1592872': { name: 'Leaves, Birch (check decay)', id: 18, blockdata: 10 }, '1592873': { name: 'Leaves, Jungle (check decay)', id: 18, blockdata: 11 }, '1592874': { name: 'Leaves, Oak (no + check decay', id: 18, blockdata: 12 }, '1592875': { name: 'Leaves, Spruce (no + check decay)', id: 18, blockdata: 13 }, '1592876': { name: 'Leaves, Birch (no + check decay)', id: 18, blockdata: 14 }, '1592877': { name: 'Leaves, Jungle (no + check decay)', id: 18, blockdata: 15 }, '11775841': { name: 'Sponge, Dry', id: 19, blockdata: 0 }, '11775842': { name: 'Sponge, Wet', id: 19, blockdata: 1 }, '15790320': { name: 'Glass', id: 20, blockdata: 0 }, '346024': { name: 'Lapis Lazuli Ore', id: 21, blockdata: 0 }, '346025': { name: 'Lapis Lazuli Block', id: 22, blockdata: 0 }, '9605778': { name: 'Dispenser', id: 23, blockdata: 0 }, '16513460': { name: 'Sandstone', id: 24, blockdata: 0 }, '16513461': { name: 'Sandstone, Chiseled', id: 24, blockdata: 1 }, '16513462': { name: 'Sandstone, Cut', id: 24, blockdata: 2 }, '16513463': { name: 'Smooth Sandstone', id: 24, blockdata: 3 }, '11895562': { name: 'Note Block', id: 25, blockdata: 0 }, '16711680': { name: 'Bed', id: 26, blockdata: 0 }, '16664834': { name: 'Powered Rail', id: 27, blockdata: 0 }, '13527105': { name: 'Detector Rail', id: 28, blockdata: 0 }, '7656843': { name: 'Piston, Sticky (Down)', id: 29, blockdata: 0 }, '7656844': { name: 'Piston, Sticky (Up)', id: 29, blockdata: 1 }, '7656845': { name: 'Piston, Sticky (South)', id: 29, blockdata: 2 }, '7656846': { name: 'Piston, Sticky (North)', id: 29, blockdata: 3 }, '7656847': { name: 'Piston, Sticky (East)', id: 29, blockdata: 4 }, '7656848': { name: 'Piston, Sticky (West)', id: 29, blockdata: 5 }, '14737632': { name: 'Cobweb', id: 30, blockdata: 0 }, '2070079': { name: 'Grass named Fern', id: 31, blockdata: 0 }, '2070080': { name: 'Tall Grass', id: 31, blockdata: 1 }, '2070081': { name: 'Fern', id: 31, blockdata: 2 }, '2070082': { name: 'Fern With Snow', id: 31, blockdata: 3 }, '4671006': { name: 'Dead Bush', id: 32, blockdata: 0 }, '6725747': { name: 'Piston (Down)', id: 33, blockdata: 0 }, '6725748': { name: 'Piston (Up)', id: 33, blockdata: 1 }, '6725749': { name: 'Piston (North)', id: 33, blockdata: 2 }, '6725750': { name: 'Piston (South)', id: 33, blockdata: 3 }, '6725751': { name: 'Piston (West)', id: 33, blockdata: 4 }, '6725752': { name: 'Piston (East)', id: 33, blockdata: 5 }, '6725753': { name: 'Piston (6-sided)', id: 33, blockdata: 6 }, '6725754': { name: 'Piston (6-sided)', id: 33, blockdata: 7 }, '6725755': { name: 'Piston (Extended)', id: 33, blockdata: 8 }, '9407820': { name: 'Piston Head', id: 34, blockdata: 0 }, '14540510': { name: 'Wool, White', id: 35, blockdata: 0 }, '14384703': { name: 'Wool, Orange', id: 35, blockdata: 1 }, '11751869': { name: 'Wool, Magenta', id: 35, blockdata: 2 }, '7048138': { name: 'Wool, Light Blue', id: 35, blockdata: 3 }, '11642664': { name: 'Wool, Yellow', id: 35, blockdata: 4 }, '4304697': { name: 'Wool, Lime', id: 35, blockdata: 5 }, '13665690': { name: 'Wool, Pink', id: 35, blockdata: 6 }, '4211009': { name: 'Wool, Gray', id: 35, blockdata: 7 }, '10134178': { name: 'Wool, Light Gray', id: 35, blockdata: 8 }, '3043210': { name: 'Wool, Cyan', id: 35, blockdata: 9 }, '8273590': { name: 'Wool, Purple', id: 35, blockdata: 10 }, '3029390': { name: 'Wool, Blue', id: 35, blockdata: 11 }, '5190432': { name: 'Wool, Brown', id: 35, blockdata: 12 }, '3491612': { name: 'Wool, Green', id: 35, blockdata: 13 }, '9844017': { name: 'Wool, Red', id: 35, blockdata: 14 }, '1644311': { name: 'Wool, Black', id: 35, blockdata: 15 }, '2105379': { name: 'Element 0', id: 36, blockdata: 0 }, '13290548': { name: 'Dandelion', id: 37, blockdata: 0 }, '15305882': { name: 'Poppy', id: 38, blockdata: 0 }, '15305883': { name: 'Blue Orchid', id: 38, blockdata: 1 }, '15305884': { name: 'Allium', id: 38, blockdata: 2 }, '15305885': { name: 'Azure Bluet', id: 38, blockdata: 3 }, '15305886': { name: 'Red Tulip', id: 38, blockdata: 4 }, '15305887': { name: 'Orange Tulip', id: 38, blockdata: 5 }, '15305888': { name: 'White Tulip', id: 38, blockdata: 6 }, '15305889': { name: 'Pink Tulip', id: 38, blockdata: 7 }, '15305890': { name: 'Oxeye Daisy', id: 38, blockdata: 8 }, '15305891': { name: 'Cornflower', id: 38, blockdata: 9 }, '15305892': { name: 'Lily of the Valley', id: 38, blockdata: 10 }, '13281122': { name: 'Brown Mushroom', id: 39, blockdata: 0 }, '16686236': { name: 'Red Mushroom', id: 40, blockdata: 0 }, '16580176': { name: 'Block of Gold', id: 41, blockdata: 0 }, '14540251': { name: 'Block of Iron', id: 42, blockdata: 0 }, '9540241': { name: 'Double Slab, Stone', id: 43, blockdata: 0 }, '9540242': { name: 'Double Slab, Sandstone', id: 43, blockdata: 1 }, '9540243': { name: 'Double Slab, Wooden', id: 43, blockdata: 2 }, '9540244': { name: 'Double Slab, Cobblestone', id: 43, blockdata: 3 }, '9540245': { name: 'Double Slab, Bricks', id: 43, blockdata: 4 }, '9540246': { name: 'Double Slab, Stone Brick', id: 43, blockdata: 5 }, '9540247': { name: 'Double Slab, Quartz', id: 43, blockdata: 6 }, '9540248': { name: 'Double Slab, Nether Brick', id: 43, blockdata: 7 }, '9540249': { name: 'Double Slab, Smooth Stone', id: 43, blockdata: 8 }, '9540250': { name: 'Double Slab, Smooth Sandstone', id: 43, blockdata: 9 }, '9540256': { name: 'Double Slab, Tile Quartz', id: 43, blockdata: 15 }, '9474448': { name: 'Slab, Stone', id: 44, blockdata: 0 }, '9474449': { name: 'Slab, Sandstone', id: 44, blockdata: 1 }, '9474450': { name: 'Slab, Wooden', id: 44, blockdata: 2 }, '9474451': { name: 'Slab, Cobblestone', id: 44, blockdata: 3 }, '9474452': { name: 'Slab, Bricks', id: 44, blockdata: 4 }, '9474453': { name: 'Slab, Stone Brick', id: 44, blockdata: 5 }, '9474454': { name: 'Slab, Quartz', id: 44, blockdata: 6 }, '9474455': { name: 'Slab, Nether Brick', id: 44, blockdata: 7 }, '9474456': { name: 'Upper Slab, Stone', id: 44, blockdata: 8 }, '9474457': { name: 'Upper Slab, Sandstone', id: 44, blockdata: 9 }, '9474458': { name: 'Upper Slab, Wooden', id: 44, blockdata: 10 }, '9474459': { name: 'Upper Slab, Cobblestone', id: 44, blockdata: 11 }, '9474460': { name: 'Upper Slab, Bricks', id: 44, blockdata: 12 }, '9474461': { name: 'Upper Slab, Stone Brick', id: 44, blockdata: 13 }, '9474462': { name: 'Upper Slab, Quartz', id: 44, blockdata: 14 }, '9474463': { name: 'Upper Slab, Nether Brick', id: 44, blockdata: 15 }, '10095384': { name: 'Brick Block', id: 45, blockdata: 0 }, '15626086': { name: 'TNT', id: 46, blockdata: 0 }, '10647590': { name: 'Bookshelf', id: 47, blockdata: 0 }, '9084319': { name: 'Mossy Cobblestone', id: 48, blockdata: 0 }, '12756673': { name: 'Obsidian', id: 49, blockdata: 0 }, '16776704': { name: 'Torch', id: 50, blockdata: 0 }, '16776705': { name: 'Torch, Facing West', id: 50, blockdata: 1 }, '16776706': { name: 'Torch, Facing East', id: 50, blockdata: 2 }, '16776707': { name: 'Torch, Facing North', id: 50, blockdata: 3 }, '16776708': { name: 'Torch, Facing South', id: 50, blockdata: 4 }, '16776709': { name: 'Torch, Facing Up', id: 50, blockdata: 5 }, '16719154': { name: 'Fire', id: 51, blockdata: 0 }, '9636497': { name: 'Spawner', id: 52, blockdata: 0 }, '6908704': { name: 'Oak Stairs, East', id: 53, blockdata: 0 }, '6908705': { name: 'Oak Stairs, West', id: 53, blockdata: 1 }, '6908706': { name: 'Oak Stairs, South', id: 53, blockdata: 2 }, '6908707': { name: 'Oak Stairs, North', id: 53, blockdata: 3 }, '6908708': { name: 'Oak Stairs, East (Upside-down)', id: 53, blockdata: 4 }, '6908709': { name: 'Oak Stairs, West (Upside-down)', id: 53, blockdata: 5 }, '6908710': { name: 'Oak Stairs, South (Upside-down)', id: 53, blockdata: 6 }, '6908711': { name: 'Oak Stairs, North (Upside-down)', id: 53, blockdata: 7 }, '11768143': { name: 'Chest', id: 54, blockdata: 0 }, '15350844': { name: 'Redstone Wire', id: 55, blockdata: 0 }, '7855320': { name: 'Diamond Ore', id: 56, blockdata: 0 }, '8646892': { name: 'Block of Diamond', id: 57, blockdata: 0 }, '9002022': { name: 'Crafting Table', id: 58, blockdata: 0 }, '4112217': { name: 'Wheat Crops', id: 59, blockdata: 0 }, '6578981': { name: 'Farmland', id: 60, blockdata: 0 }, '15027750': { name: 'Furnace', id: 61, blockdata: 0 }, '16602924': { name: 'Burning Lit Furnace', id: 62, blockdata: 0 }, '9273418': { name: 'Oak Standing Sign', id: 63, blockdata: 0 }, '7823406': { name: 'Oak Door', id: 64, blockdata: 0 }, '11379056': { name: 'Ladder', id: 65, blockdata: 0 }, '8810043': { name: 'Rail', id: 66, blockdata: 0 }, '13685200': { name: 'Cobblestone Stairs, East', id: 67, blockdata: 0 }, '13685201': { name: 'Cobblestone Stairs, West', id: 67, blockdata: 1 }, '13685202': { name: 'Cobblestone Stairs, South', id: 67, blockdata: 2 }, '13685203': { name: 'Cobblestone Stairs, North', id: 67, blockdata: 3 }, '13685204': { name: 'Cobblestone Stairs, East (Upside-down)', id: 67, blockdata: 4 }, '13685205': { name: 'Cobblestone Stairs, West (Upside-down)', id: 67, blockdata: 5 }, '13685206': { name: 'Cobblestone Stairs, South (Upside-down)', id: 67, blockdata: 6 }, '13685207': { name: 'Cobblestone Stairs, North (Upside-down)', id: 67, blockdata: 7 }, '9273419': { name: 'Oak Wall Sign', id: 68, blockdata: 0 }, '14145464': { name: 'Lever', id: 69, blockdata: 0 }, '13421766': { name: 'Stone Pressure Plate', id: 70, blockdata: 0 }, '13159628': { name: 'Iron Door', id: 71, blockdata: 0 }, '11247191': { name: 'Oak Pressure Plate', id: 72, blockdata: 0 }, '11216936': { name: 'Redstone Ore', id: 73, blockdata: 0 }, '11216937': { name: 'Glowing Redstone Ore', id: 74, blockdata: 0 }, '11282472': { name: 'Unlit Redstone Torch', id: 75, blockdata: 0 }, '13379624': { name: 'Redstone Torch', id: 76, blockdata: 0 }, '13224393': { name: 'Stone Button', id: 77, blockdata: 0 }, '15724543': { name: 'Top Snow', id: 78, blockdata: 0 }, '849389': { name: 'Ice', id: 79, blockdata: 0 }, '14737648': { name: 'Snow', id: 80, blockdata: 0 }, '1140499': { name: 'Cactus', id: 81, blockdata: 0 }, '9547444': { name: 'Clay', id: 82, blockdata: 0 }, '5170503': { name: 'Sugar Cane', id: 83, blockdata: 0 }, '394754': { name: 'Jukebox', id: 84, blockdata: 0 }, '12356374': { name: 'Oak Fence', id: 85, blockdata: 0 }, '12356375': { name: 'Spruce Fence', id: 85, blockdata: 1 }, '12356376': { name: 'Birch Fence', id: 85, blockdata: 2 }, '12356377': { name: 'Jungle Fence', id: 85, blockdata: 3 }, '12356378': { name: 'Acacia Fence', id: 85, blockdata: 4 }, '12356379': { name: 'Dark Oak Fence', id: 85, blockdata: 5 }, '16683776': { name: 'Pumpkin', id: 86, blockdata: 0 }, '12994399': { name: 'Netherrack', id: 87, blockdata: 0 }, '10447209': { name: 'Soul Sand', id: 88, blockdata: 0 }, '16448156': { name: 'Glowstone', id: 89, blockdata: 0 }, '16752895': { name: 'Portal', id: 90, blockdata: 0 }, '16758868': { name: 'Jack o\'Lantern', id: 91, blockdata: 0 }, '14989508': { name: 'Cake', id: 92, blockdata: 0 }, '15354956': { name: 'Redstone Repeater', id: 93, blockdata: 0 }, '15359068': { name: 'Active Redstone Repeater', id: 94, blockdata: 0 }, '2631720': { name: 'Invisible Bedrock', id: 95, blockdata: 0 }, '10393208': { name: 'Oak Trapdoor', id: 96, blockdata: 0 }, '15132666': { name: 'Infested Stone', id: 97, blockdata: 0 }, '15132667': { name: 'Infested Cobblestone', id: 97, blockdata: 1 }, '15132668': { name: 'Infested Stone Bricks', id: 97, blockdata: 2 }, '15132669': { name: 'Infested Mossy Stone Bricks', id: 97, blockdata: 3 }, '15132670': { name: 'Infested Cracked Stone Bricks', id: 97, blockdata: 4 }, '15132671': { name: 'Infested Chiseled Stone Bricks', id: 97, blockdata: 5 }, '11974576': { name: 'Brick, Stone', id: 98, blockdata: 0 }, '11974577': { name: 'Brick, Mossy Stone', id: 98, blockdata: 1 }, '11974578': { name: 'Brick, Cracked Stone', id: 98, blockdata: 2 }, '11974579': { name: 'Brick, Chiseled Stone', id: 98, blockdata: 3 }, '11974580': { name: 'Brick, Smooth Stone', id: 98, blockdata: 4 }, '13281121': { name: 'Brown Mushroom Block', id: 99, blockdata: 0 }, '16686235': { name: 'Red Mushroom Block', id: 100, blockdata: 0 }, '14079443': { name: 'Iron Bars', id: 101, blockdata: 0 }, '16316664': { name: 'Glass Pane', id: 102, blockdata: 0 }, '7592044': { name: 'Melon', id: 103, blockdata: 0 }, '10922351': { name: 'Pumpkin Stem', id: 104, blockdata: 0 }, '10922350': { name: 'Melon Stem', id: 105, blockdata: 0 }, '2514476': { name: 'Vines', id: 106, blockdata: 0 }, '5723451': { name: 'Oak Fence Gate', id: 107, blockdata: 0 }, '10755882': { name: 'Brick Stairs, East', id: 108, blockdata: 0 }, '10755883': { name: 'Brick Stairs, West', id: 108, blockdata: 1 }, '10755884': { name: 'Brick Stairs, South', id: 108, blockdata: 2 }, '10755885': { name: 'Brick Stairs, North', id: 108, blockdata: 3 }, '10755886': { name: 'Brick Stairs, East (Upside-down)', id: 108, blockdata: 4 }, '10755887': { name: 'Brick Stairs, West (Upside-down)', id: 108, blockdata: 5 }, '10755888': { name: 'Brick Stairs, South (Upside-down)', id: 108, blockdata: 6 }, '10755889': { name: 'Brick Stairs, North (Upside-down)', id: 108, blockdata: 7 }, '10527386': { name: 'Stairs, Stone Brick, East', id: 109, blockdata: 0 }, '10527387': { name: 'Stairs, Stone Brick, West', id: 109, blockdata: 1 }, '10527388': { name: 'Stairs, Stone Brick, South', id: 109, blockdata: 2 }, '10527389': { name: 'Stairs, Stone Brick, North', id: 109, blockdata: 3 }, '10527390': { name: 'Stairs, Stone Brick, East (Upside-down)', id: 109, blockdata: 4 }, '10527391': { name: 'Stairs, Stone Brick, West (Upside-down)', id: 109, blockdata: 5 }, '10527392': { name: 'Stairs, Stone Brick, South (Upside-down)', id: 109, blockdata: 6 }, '10527393': { name: 'Stairs, Stone Brick, North (Upside-down)', id: 109, blockdata: 7 }, '12303289': { name: 'Mycelium', id: 110, blockdata: 0 }, '6725994': { name: 'Lily Pad', id: 111, blockdata: 0 }, '7417390': { name: 'Nether Brick', id: 112, blockdata: 0 }, '9189689': { name: 'Fence, Nether Brick', id: 113, blockdata: 0 }, '10963529': { name: 'Stairs, Nether Brick, East', id: 114, blockdata: 0 }, '10963530': { name: 'Stairs, Nether Brick, West', id: 114, blockdata: 1 }, '10963531': { name: 'Stairs, Nether Brick, South', id: 114, blockdata: 2 }, '10963532': { name: 'Stairs, Nether Brick, North', id: 114, blockdata: 3 }, '10963533': { name: 'Stairs, Nether Brick, East (Upside-down)', id: 114, blockdata: 4 }, '10963534': { name: 'Stairs, Nether Brick, West (Upside-down)', id: 114, blockdata: 5 }, '10963535': { name: 'Stairs, Nether Brick, South (Upside-down)', id: 114, blockdata: 6 }, '10963536': { name: 'Stairs, Nether Brick, North (Upside-down)', id: 114, blockdata: 7 }, '11014193': { name: 'Nether Wart', id: 115, blockdata: 0 }, '12749450': { name: 'Enchantment Table', id: 116, blockdata: 0 }, '15263401': { name: 'Brewing Stand', id: 117, blockdata: 0 }, '9671571': { name: 'Cauldron', id: 118, blockdata: 0 }, '8363905': { name: 'End Portal', id: 119, blockdata: 0 }, '9416593': { name: 'End Portal Frame', id: 120, blockdata: 0 }, '15722915': { name: 'End Stone', id: 121, blockdata: 0 }, '3618615': { name: 'Dragon Egg', id: 122, blockdata: 0 }, '10498096': { name: 'Redstone Lamp, Inactive', id: 123, blockdata: 0 }, '12595248': { name: 'Redstone Lamp, Active', id: 124, blockdata: 0 }, '9737364': { name: 'Dropper', id: 125, blockdata: 0 }, '15166267': { name: 'Activator Rail', id: 126, blockdata: 0 }, '11898391': { name: 'Cocoa', id: 127, blockdata: 0 }, '13552777': { name: 'Stairs, Sandstone, East', id: 128, blockdata: 0 }, '13552778': { name: 'Stairs, Sandstone, West', id: 128, blockdata: 1 }, '13552779': { name: 'Stairs, Sandstone, South', id: 128, blockdata: 2 }, '13552780': { name: 'Stairs, Sandstone, North', id: 128, blockdata: 3 }, '13552781': { name: 'Stairs, Sandstone, East (Upside-down)', id: 128, blockdata: 4 }, '13552782': { name: 'Stairs, Sandstone, West (Upside-down)', id: 128, blockdata: 5 }, '13552783': { name: 'Stairs, Sandstone, South (Upside-down)', id: 128, blockdata: 6 }, '13552784': { name: 'Stairs, Sandstone, North (Upside-down)', id: 128, blockdata: 7 }, '7852413': { name: 'Emerald Ore', id: 129, blockdata: 0 }, '4737096': { name: 'Ender Chest', id: 130, blockdata: 0 }, '4539717': { name: 'Tripwire Hook', id: 131, blockdata: 0 }, '10987431': { name: 'Tripwire', id: 132, blockdata: 0 }, '7191667': { name: 'Block of Emerald', id: 133, blockdata: 0 }, '6908713': { name: 'Stairs, Spruce Wood, East', id: 134, blockdata: 0 }, '6908714': { name: 'Stairs, Spruce Wood, West', id: 134, blockdata: 1 }, '6908715': { name: 'Stairs, Spruce Wood, South', id: 134, blockdata: 2 }, '6908716': { name: 'Stairs, Spruce Wood, North', id: 134, blockdata: 3 }, '6908717': { name: 'Stairs, Spruce Wood, East (Upside-down)', id: 134, blockdata: 4 }, '6908718': { name: 'Stairs, Spruce Wood, West (Upside-down)', id: 134, blockdata: 5 }, '6908719': { name: 'Stairs, Spruce Wood, South (Upside-down)', id: 134, blockdata: 6 }, '6908720': { name: 'Stairs, Spruce Wood, North (Upside-down)', id: 134, blockdata: 7 }, '6909472': { name: 'Stairs, Birch Wood, East', id: 135, blockdata: 0 }, '6909473': { name: 'Stairs, Birch Wood, West', id: 135, blockdata: 1 }, '6909474': { name: 'Stairs, Birch Wood, South', id: 135, blockdata: 2 }, '6909475': { name: 'Stairs, Birch Wood, North', id: 135, blockdata: 3 }, '6909476': { name: 'Stairs, Birch Wood, East (Upside-down)', id: 135, blockdata: 4 }, '6909477': { name: 'Stairs, Birch Wood, West (Upside-down)', id: 135, blockdata: 5 }, '6909478': { name: 'Stairs, Birch Wood, South (Upside-down)', id: 135, blockdata: 6 }, '6909479': { name: 'Stairs, Birch Wood, North (Upside-down)', id: 135, blockdata: 7 }, '6909481': { name: 'Stairs, Jungle Wood, East', id: 136, blockdata: 0 }, '6909482': { name: 'Stairs, Jungle Wood, West', id: 136, blockdata: 1 }, '6909483': { name: 'Stairs, Jungle Wood, South', id: 136, blockdata: 2 }, '6909484': { name: 'Stairs, Jungle Wood, North', id: 136, blockdata: 3 }, '6909485': { name: 'Stairs, Jungle Wood, East (Upside-down)', id: 136, blockdata: 4 }, '6909486': { name: 'Stairs, Jungle Wood, West (Upside-down)', id: 136, blockdata: 5 }, '6909487': { name: 'Stairs, Jungle Wood, South (Upside-down)', id: 136, blockdata: 6 }, '6909488': { name: 'Stairs, Jungle Wood, North (Upside-down)', id: 136, blockdata: 7 }, '7707553': { name: 'Impulse Command Block', id: 137, blockdata: 0 }, '9013706': { name: 'Beacon', id: 138, blockdata: 0 }, '11579824': { name: 'Cobblestone Wall', id: 139, blockdata: 0 }, '11579825': { name: 'Mossy Cobblestone Wall', id: 139, blockdata: 1 }, '11579826': { name: 'Granite Wall', id: 139, blockdata: 2 }, '11579827': { name: 'Diorite Wall', id: 139, blockdata: 3 }, '11579828': { name: 'Andesite Wall', id: 139, blockdata: 4 }, '11579829': { name: 'Sandstone Wall', id: 139, blockdata: 5 }, '11579830': { name: 'Brick Wall', id: 139, blockdata: 6 }, '11579831': { name: 'Stone Brick Wall', id: 139, blockdata: 7 }, '11579832': { name: 'Mossy Stone Brick Wall', id: 139, blockdata: 8 }, '11579833': { name: 'End Stone Brick Wall', id: 139, blockdata: 9 }, '11579834': { name: 'Nether Brick Wall', id: 139, blockdata: 10 }, '11579835': { name: 'Prismarine Wall', id: 139, blockdata: 11 }, '11579836': { name: 'Red Sandstone Wall', id: 139, blockdata: 12 }, '11579837': { name: 'Red Nether Brick Wall', id: 139, blockdata: 13 }, '14522916': { name: 'Flower Pot, Empty', id: 140, blockdata: 0 }, '14522917': { name: 'Flower Pot, Poppy', id: 140, blockdata: 1 }, '14522918': { name: 'Flower Pot, Dandelion', id: 140, blockdata: 2 }, '14522919': { name: 'Flower Pot, Oak Sapling', id: 140, blockdata: 3 }, '14522920': { name: 'Flower Pot, Spruce Sapling', id: 140, blockdata: 4 }, '14522921': { name: 'Flower Pot, Birch Sapling', id: 140, blockdata: 5 }, '14522922': { name: 'Flower Pot, Jungle Sapling', id: 140, blockdata: 6 }, '14522923': { name: 'Flower Pot, Red Mushroom', id: 140, blockdata: 7 }, '14522924': { name: 'Flower Pot, Brown Mushroom', id: 140, blockdata: 8 }, '14522925': { name: 'Flower Pot, Cactus', id: 140, blockdata: 9 }, '14522926': { name: 'Flower Pot, Dead Bush', id: 140, blockdata: 10 }, '14522927': { name: 'Flower Pot, Fern', id: 140, blockdata: 11 }, '14522928': { name: 'Flower Pot, Acacia Sapling', id: 140, blockdata: 12 }, '14522929': { name: 'Flower Pot, Dark Oak Sapling', id: 140, blockdata: 13 }, '15245370': { name: 'Carrots', id: 141, blockdata: 0 }, '11841308': { name: 'Potatos', id: 142, blockdata: 0 }, '13614714': { name: 'Button, Wooden', id: 143, blockdata: 0 }, '14692832': { name: 'Mob Head', id: 144, blockdata: 0 }, '14692833': { name: 'Mob Head, On the floor', id: 144, blockdata: 1 }, '14692834': { name: 'Mob Head, On a wall, facing North', id: 144, blockdata: 2 }, '14692835': { name: 'Mob Head, On a wall, facing South', id: 144, blockdata: 3 }, '14692836': { name: 'Mob Head, On a wall, facing East', id: 144, blockdata: 4 }, '14692837': { name: 'Mob Head, On a wall, facing West', id: 144, blockdata: 5 }, '6316384': { name: 'Anvil, Intact', id: 145, blockdata: 0 }, '6316385': { name: 'Anvil, Intact', id: 145, blockdata: 1 }, '6316386': { name: 'Anvil, Intact', id: 145, blockdata: 2 }, '6316387': { name: 'Anvil, Intact', id: 145, blockdata: 3 }, '6316388': { name: 'Anvil, Slightly Damaged', id: 145, blockdata: 4 }, '6316389': { name: 'Anvil, Slightly Damaged', id: 145, blockdata: 5 }, '6316390': { name: 'Anvil, Slightly Damaged', id: 145, blockdata: 6 }, '6316391': { name: 'Anvil, Slightly Damaged', id: 145, blockdata: 7 }, '6316392': { name: 'Anvil, Very Damaged', id: 145, blockdata: 8 }, '6316393': { name: 'Anvil, Very Damaged', id: 145, blockdata: 9 }, '6316394': { name: 'Anvil, Very Damaged', id: 145, blockdata: 10 }, '6316395': { name: 'Anvil, Very Damaged', id: 145, blockdata: 11 }, '11762767': { name: 'Trapped Chest', id: 146, blockdata: 0 }, '13882662': { name: 'Pressure Plate, Weighted Light', id: 147, blockdata: 0 }, '5723991': { name: 'Pressure Plate, Weighted Heavy', id: 148, blockdata: 0 }, '15682636': { name: 'Redstone Comparator, Inactive', id: 149, blockdata: 0 }, '15686748': { name: 'Redstone Comparator, Active', id: 150, blockdata: 0 }, '10000536': { name: 'Daylight Sensor', id: 151, blockdata: 0 }, '13458524': { name: 'Block of Redstone', id: 152, blockdata: 0 }, '14077389': { name: 'Nether Quartz Ore', id: 153, blockdata: 0 }, '10855845': { name: 'Hopper', id: 154, blockdata: 0 }, '16777201': { name: 'Block of Quartz', id: 155, blockdata: 0 }, '16777202': { name: 'Chiseled Quartz Block (Vertical)', id: 155, blockdata: 1 }, '16777203': { name: 'Pillar Quartz Block (Vertical)', id: 155, blockdata: 2 }, '16777204': { name: 'Smooth Quartz Block', id: 155, blockdata: 3 }, '16777206': { name: 'Chiseled Quartz Block (East/West)', id: 155, blockdata: 5 }, '16777207': { name: 'Pillar Quartz Block (East/West)', id: 155, blockdata: 6 }, '16777210': { name: 'Chiseled Quartz Block (North/South)', id: 155, blockdata: 9 }, '16777211': { name: 'Pillar Quartz Block (North/South)', id: 155, blockdata: 10 }, '16777214': { name: 'Chiseled Quartz Block(all side texture)', id: 155, blockdata: 13 }, '16777215': { name: 'Pillar Quartz Block(all side texture)', id: 155, blockdata: 14 }, '15263975': { name: 'Stairs, Quartz, East', id: 156, blockdata: 0 }, '15263976': { name: 'Stairs, Quartz, West', id: 156, blockdata: 1 }, '15263977': { name: 'Stairs, Quartz, South', id: 156, blockdata: 2 }, '15263978': { name: 'Stairs, Quartz, North', id: 156, blockdata: 3 }, '15263979': { name: 'Stairs, Quartz, East (Upside-down)', id: 156, blockdata: 4 }, '15263980': { name: 'Stairs, Quartz, West (Upside-down)', id: 156, blockdata: 5 }, '15263981': { name: 'Stairs, Quartz, South (Upside-down)', id: 156, blockdata: 6 }, '15263982': { name: 'Stairs, Quartz, North (Upside-down)', id: 156, blockdata: 7 }, '6844460': { name: 'Double Slab, Oak Wood', id: 157, blockdata: 0 }, '6844461': { name: 'Double Slab, Spruce Wood', id: 157, blockdata: 1 }, '6844462': { name: 'Double Slab, Birch Wood', id: 157, blockdata: 2 }, '6844463': { name: 'Double Slab, Jungle Wood', id: 157, blockdata: 3 }, '6844464': { name: 'Double Slab, Acacia Wood', id: 157, blockdata: 4 }, '6844465': { name: 'Double Slab, Dark Oak Wood', id: 157, blockdata: 5 }, '6844468': { name: 'Double Slab, Upper Oak Wood', id: 157, blockdata: 8 }, '6844469': { name: 'Double Slab, Upper Spruce Wood', id: 157, blockdata: 9 }, '6844470': { name: 'Double Slab, Upper Birch Wood', id: 157, blockdata: 10 }, '6844471': { name: 'Double Slab, Upper Jungle Wood', id: 157, blockdata: 11 }, '6844472': { name: 'Double Slab, Upper Acacia Wood', id: 157, blockdata: 12 }, '6844473': { name: 'Double Slab, Upper Dark Oak Wood', id: 157, blockdata: 13 }, '6845472': { name: 'Slab, Oak Wood', id: 158, blockdata: 0 }, '6845473': { name: 'Slab, Spruce Wood', id: 158, blockdata: 1 }, '6845474': { name: 'Slab, Birch Wood', id: 158, blockdata: 2 }, '6845475': { name: 'Slab, Jungle Wood', id: 158, blockdata: 3 }, '6845476': { name: 'Slab, Acacia Wood', id: 158, blockdata: 4 }, '6845477': { name: 'Slab, Dark Oak Wood', id: 158, blockdata: 5 }, '6845480': { name: 'Upper Slab, Oak Wood', id: 158, blockdata: 8 }, '6845481': { name: 'Upper Slab, Spruce Wood', id: 158, blockdata: 9 }, '6845482': { name: 'Upper Slab, Birch Wood', id: 158, blockdata: 10 }, '6845483': { name: 'Upper Slab, Jungle Wood', id: 158, blockdata: 11 }, '6845484': { name: 'Upper Slab, Acacia Wood', id: 158, blockdata: 12 }, '6845485': { name: 'Upper Slab, Dark Oak Wood', id: 158, blockdata: 13 }, '14540509': { name: 'White Terracotta', id: 159, blockdata: 0 }, '14384702': { name: 'Orange Terracotta', id: 159, blockdata: 1 }, '11751868': { name: 'Magenta Terracotta', id: 159, blockdata: 2 }, '7048137': { name: 'Light Blue Terracotta', id: 159, blockdata: 3 }, '11642663': { name: 'Yellow Terracotta', id: 159, blockdata: 4 }, '4304696': { name: 'Lime Terracotta', id: 159, blockdata: 5 }, '13665689': { name: 'Pink Terracotta', id: 159, blockdata: 6 }, '4211008': { name: 'Gray Terracotta', id: 159, blockdata: 7 }, '10134177': { name: 'Light Gray Terracotta', id: 159, blockdata: 8 }, '3043209': { name: 'Cyan Terracotta', id: 159, blockdata: 9 }, '8273589': { name: 'Purple Terracotta', id: 159, blockdata: 10 }, '3029389': { name: 'Blue Terracotta', id: 159, blockdata: 11 }, '5190431': { name: 'Brown Terracotta', id: 159, blockdata: 12 }, '3491611': { name: 'Green Terracotta', id: 159, blockdata: 13 }, '9844016': { name: 'Red Terracotta', id: 159, blockdata: 14 }, '1644310': { name: 'Black Terracotta', id: 159, blockdata: 15 }, '14540511': { name: 'Stained Glass Pane, White', id: 160, blockdata: 0 }, '14384704': { name: 'Stained Glass Pane, Orange', id: 160, blockdata: 1 }, '11751870': { name: 'Stained Glass Pane, Magenta', id: 160, blockdata: 2 }, '7048139': { name: 'Stained Glass Pane, Light Blue', id: 160, blockdata: 3 }, '11642665': { name: 'Stained Glass Pane, Yellow', id: 160, blockdata: 4 }, '4304698': { name: 'Stained Glass Pane, Lime', id: 160, blockdata: 5 }, '13665691': { name: 'Stained Glass Pane, Pink', id: 160, blockdata: 6 }, '4211010': { name: 'Stained Glass Pane, Gray', id: 160, blockdata: 7 }, '10134179': { name: 'Stained Glass Pane, Light Gray', id: 160, blockdata: 8 }, '3043211': { name: 'Stained Glass Pane, Cyan', id: 160, blockdata: 9 }, '8273591': { name: 'Stained Glass Pane, Purple', id: 160, blockdata: 10 }, '3029391': { name: 'Stained Glass Pane, Blue', id: 160, blockdata: 11 }, '5190433': { name: 'Stained Glass Pane, Brown', id: 160, blockdata: 12 }, '3491613': { name: 'Stained Glass Pane, Green', id: 160, blockdata: 13 }, '9844018': { name: 'Stained Glass Pane, Red', id: 160, blockdata: 14 }, '1644312': { name: 'Stained Glass Pane, Black', id: 160, blockdata: 15 }, '8959366': { name: 'Leaves, Acacia', id: 161, blockdata: 0 }, '8959367': { name: 'Leaves, Dark Oak', id: 161, blockdata: 1 }, '8959370': { name: 'Leaves, Acacia (no decay)', id: 161, blockdata: 4 }, '8959371': { name: 'Leaves, Dark Oak (no decay)', id: 161, blockdata: 5 }, '8959374': { name: 'Leaves, Acacia (check decay)', id: 161, blockdata: 8 }, '8959375': { name: 'Leaves, Dark Oak (check decay)', id: 161, blockdata: 9 }, '8959378': { name: 'Leaves, Acacia (no + check decay)', id: 161, blockdata: 12 }, '8959379': { name: 'Leaves, Dark Oak (no + check decay)', id: 161, blockdata: 13 }, '6910240': { name: 'Wood, Acacia (Up/Down)', id: 162, blockdata: 0 }, '6910241': { name: 'Wood, Dark Oak (Up/Down)', id: 162, blockdata: 1 }, '6910244': { name: 'Wood, Acacia (East/West)', id: 162, blockdata: 4 }, '6910245': { name: 'Wood, Dark Oak (East/West)', id: 162, blockdata: 5 }, '6910248': { name: 'Wood, Acacia (North/South)', id: 162, blockdata: 8 }, '6910249': { name: 'Wood, Dark Oak (North/South)', id: 162, blockdata: 9 }, '6910252': { name: 'Wood, Acacia (Bark Only)', id: 162, blockdata: 12 }, '6910253': { name: 'Wood, Dark Oak (Bark Only)', id: 162, blockdata: 13 }, '6910752': { name: 'Stairs, Acacia Wood, East', id: 163, blockdata: 0 }, '6910753': { name: 'Stairs, Acacia Wood, West', id: 163, blockdata: 1 }, '6910754': { name: 'Stairs, Acacia Wood, South', id: 163, blockdata: 2 }, '6910755': { name: 'Stairs, Acacia Wood, North', id: 163, blockdata: 3 }, '6910756': { name: 'Stairs, Acacia Wood, East (Upside-down)', id: 163, blockdata: 4 }, '6910757': { name: 'Stairs, Acacia Wood, West (Upside-down)', id: 163, blockdata: 5 }, '6910758': { name: 'Stairs, Acacia Wood, South (Upside-down)', id: 163, blockdata: 6 }, '6910759': { name: 'Stairs, Acacia Wood, North (Upside-down)', id: 163, blockdata: 7 }, '6911273': { name: 'Stairs, Dark Oak Wood, East', id: 164, blockdata: 0 }, '6911274': { name: 'Stairs, Dark Oak Wood, West', id: 164, blockdata: 1 }, '6911275': { name: 'Stairs, Dark Oak Wood, South', id: 164, blockdata: 2 }, '6911276': { name: 'Stairs, Dark Oak Wood, North', id: 164, blockdata: 3 }, '6911277': { name: 'Stairs, Dark Oak Wood, East (Upside-down)', id: 164, blockdata: 4 }, '6911278': { name: 'Stairs, Dark Oak Wood, West (Upside-down)', id: 164, blockdata: 5 }, '6911279': { name: 'Stairs, Dark Oak Wood, South (Upside-down)', id: 164, blockdata: 6 }, '6911280': { name: 'Stairs, Dark Oak Wood, North (Upside-down)', id: 164, blockdata: 7 }, '3467060': { name: 'Slime Block', id: 165, blockdata: 0 }, '8388352': { name: 'Glow Stick', id: 166, blockdata: 0 }, '13618380': { name: 'Trapdoor, Iron', id: 167, blockdata: 0 }, '32896': { name: 'Prismarine, Rough', id: 168, blockdata: 0 }, '16448': { name: 'Prismarine, Dark', id: 168, blockdata: 1 }, '24672': { name: 'Prismarine, Bricks', id: 168, blockdata: 2 }, '52428': { name: 'Sea Lantern', id: 169, blockdata: 0 }, '14209925': { name: 'Hay Bale', id: 170, blockdata: 0 }, '14540516': { name: 'Carpet, White', id: 171, blockdata: 0 }, '14384709': { name: 'Carpet, Orange', id: 171, blockdata: 1 }, '11751875': { name: 'Carpet, Magenta', id: 171, blockdata: 2 }, '7048144': { name: 'Carpet, Light Blue', id: 171, blockdata: 3 }, '11642670': { name: 'Carpet, Yellow', id: 171, blockdata: 4 }, '4304703': { name: 'Carpet, Lime', id: 171, blockdata: 5 }, '13665696': { name: 'Carpet, Pink', id: 171, blockdata: 6 }, '4211015': { name: 'Carpet, Gray', id: 171, blockdata: 7 }, '10134184': { name: 'Carpet, Light Gray', id: 171, blockdata: 8 }, '3043216': { name: 'Carpet, Cyan', id: 171, blockdata: 9 }, '8273596': { name: 'Carpet, Purple', id: 171, blockdata: 10 }, '3029396': { name: 'Carpet, Blue', id: 171, blockdata: 11 }, '5190438': { name: 'Carpet, Brown', id: 171, blockdata: 12 }, '3491618': { name: 'Carpet, Green', id: 171, blockdata: 13 }, '9844023': { name: 'Carpet, Red', id: 171, blockdata: 14 }, '1644317': { name: 'Carpet, Black', id: 171, blockdata: 15 }, '12014162': { name: 'Terracotta', id: 172, blockdata: 0 }, '5789784': { name: 'Block of Coal', id: 173, blockdata: 0 }, '184316': { name: 'Packed Ice', id: 174, blockdata: 0 }, '5756503': { name: 'Sunflower', id: 175, blockdata: 0 }, '2064927': { name: 'Lilac', id: 175, blockdata: 1 }, '6266528': { name: 'Double Tallgrass', id: 175, blockdata: 2 }, '6266530': { name: 'Large Fern', id: 175, blockdata: 3 }, '12357519': { name: 'Rose Bush', id: 175, blockdata: 4 }, '2996781': { name: 'Peony', id: 175, blockdata: 5 }, '16776960': { name: 'Sunflower (top)', id: 175, blockdata: 8 }, '15631086': { name: 'Lilac (top)', id: 175, blockdata: 9 }, '6266529': { name: 'Double Tallgrass (top)', id: 175, blockdata: 10 }, '6266531': { name: 'Large Fern (top)', id: 175, blockdata: 11 }, '14423100': { name: 'Rose Bush (top)', id: 175, blockdata: 12 }, '14184595': { name: 'Peony (top)', id: 175, blockdata: 13 }, '16711935': { name: 'Unknown Tall Flower (0xE)', id: 175, blockdata: 14 }, '16580860': { name: 'Unknown Tall Flower (0xF)', id: 175, blockdata: 15 }, '14903092': { name: 'Standing Banner', id: 176, blockdata: 0 }, '14903093': { name: 'Wall Banner', id: 177, blockdata: 0 }, '10000535': { name: 'Daylight Sensor, Inverted', id: 178, blockdata: 0 }, '13680518': { name: 'Red Sandstone', id: 179, blockdata: 0 }, '13680519': { name: 'Red Sandstone, Chiseled', id: 179, blockdata: 1 }, '13680520': { name: 'Red Sandstone, Smooth', id: 179, blockdata: 2 }, '13483910': { name: 'Stairs, Red Sandstone, East', id: 180, blockdata: 0 }, '13483911': { name: 'Stairs, Red Sandstone, West', id: 180, blockdata: 1 }, '13483912': { name: 'Stairs, Red Sandstone, South', id: 180, blockdata: 2 }, '13483913': { name: 'Stairs, Red Sandstone, North', id: 180, blockdata: 3 }, '13483914': { name: 'Stairs, Red Sandstone, East (Upside-down)', id: 180, blockdata: 4 }, '13483915': { name: 'Stairs, Red Sandstone, West (Upside-down)', id: 180, blockdata: 5 }, '13483916': { name: 'Stairs, Red Sandstone, South (Upside-down)', id: 180, blockdata: 6 }, '13483917': { name: 'Stairs, Red Sandstone, North (Upside-down)', id: 180, blockdata: 7 }, '13549455': { name: 'Double Slab, Red Sandstone', id: 181, blockdata: 0 }, '13549456': { name: 'Double Slab, Purpur', id: 181, blockdata: 1 }, '13549457': { name: 'Double Slab, Prismarine', id: 181, blockdata: 2 }, '13549458': { name: 'Double Slab, Prismarine Brick', id: 181, blockdata: 3 }, '13549459': { name: 'Double Slab, Dark Prismarine', id: 181, blockdata: 4 }, '13549460': { name: 'Double Slab, Mossy Cobblestone', id: 181, blockdata: 5 }, '13549461': { name: 'Double Slab, Smooth Sandstone', id: 181, blockdata: 6 }, '13549462': { name: 'Double Slab, Red Nether Brick', id: 181, blockdata: 7 }, '13549463': { name: 'Double Slab, Smooth Red Sandstone', id: 181, blockdata: 8 }, '13549464': { name: 'Double Slab, Red Sandstone', id: 181, blockdata: 9 }, '13549465': { name: 'Double Slab, Purpur', id: 181, blockdata: 10 }, '13549466': { name: 'Double Slab, Prismarine', id: 181, blockdata: 11 }, '13549467': { name: 'Double Slab, Prismarine Brick', id: 181, blockdata: 12 }, '13549468': { name: 'Double Slab, Dark Prismarine', id: 181, blockdata: 13 }, '13549469': { name: 'Double Slab, Mossy Cobblestone', id: 181, blockdata: 14 }, '13549470': { name: 'Double Slab, Smooth Sandstone', id: 181, blockdata: 15 }, '13614984': { name: 'Slab, Red Sandstone', id: 182, blockdata: 0 }, '13614985': { name: 'Slab, Purpur', id: 182, blockdata: 1 }, '13614986': { name: 'Slab, Prismarine', id: 182, blockdata: 2 }, '13614987': { name: 'Slab, Prismarine Brick', id: 182, blockdata: 3 }, '13614988': { name: 'Slab, Dark Prismarine', id: 182, blockdata: 4 }, '13614989': { name: 'Slab, Mossy Cobblestone', id: 182, blockdata: 5 }, '13614990': { name: 'Slab, Smooth Sandstone', id: 182, blockdata: 6 }, '13614991': { name: 'Slab, Red Nether Brick', id: 182, blockdata: 7 }, '13614992': { name: 'Upper Slab, Red Sandstone', id: 182, blockdata: 8 }, '13614993': { name: 'Upper Slab, Purpur', id: 182, blockdata: 9 }, '13614994': { name: 'Upper Slab, Prismarine', id: 182, blockdata: 10 }, '13614995': { name: 'Upper Slab, Prismarine Brick', id: 182, blockdata: 11 }, '13614996': { name: 'Upper Slab, Dark Prismarine', id: 182, blockdata: 12 }, '13614997': { name: 'Upper Slab, Mossy Cobblestone', id: 182, blockdata: 13 }, '13614998': { name: 'Upper Slab, Smooth Sandstone', id: 182, blockdata: 14 }, '13614999': { name: 'Upper Slab, Red Nether Brick', id: 182, blockdata: 15 }, '10976016': { name: 'Fence Gate, Spruce', id: 183, blockdata: 0 }, '10976017': { name: 'Fence Gate, Birch', id: 184, blockdata: 0 }, '10976018': { name: 'Fence Gate, Jungle', id: 185, blockdata: 0 }, '10976019': { name: 'Fence Gate, Dark Oak', id: 186, blockdata: 0 }, '10976020': { name: 'Fence Gate, Acacia', id: 187, blockdata: 0 }, '8171189': { name: 'Repeating Command Block', id: 188, blockdata: 0 }, '10145751': { name: 'Chain Command Block', id: 189, blockdata: 0 }, '12508127': { name: 'Hardened Glass Pane', id: 190, blockdata: 0 }, '14540517': { name: 'Hardened Stained Glass Pane, White', id: 191, blockdata: 0 }, '14384710': { name: 'Hardened Stained Glass Pane, Orange', id: 191, blockdata: 1 }, '11751876': { name: 'Hardened Stained Glass Pane, Magenta', id: 191, blockdata: 2 }, '7048145': { name: 'Hardened Stained Glass Pane, Light Blue', id: 191, blockdata: 3 }, '11642671': { name: 'Hardened Stained Glass Pane, Yellow', id: 191, blockdata: 4 }, '4304704': { name: 'Hardened Stained Glass Pane, Lime', id: 191, blockdata: 5 }, '13665697': { name: 'Hardened Stained Glass Pane, Pink', id: 191, blockdata: 6 }, '4211016': { name: 'Hardened Stained Glass Pane, Gray', id: 191, blockdata: 7 }, '10134185': { name: 'Hardened Stained Glass Pane, Light Gray', id: 191, blockdata: 8 }, '3043217': { name: 'Hardened Stained Glass Pane, Cyan', id: 191, blockdata: 9 }, '8273597': { name: 'Hardened Stained Glass Pane, Purple', id: 191, blockdata: 10 }, '3029397': { name: 'Hardened Stained Glass Pane, Blue', id: 191, blockdata: 11 }, '5190439': { name: 'Hardened Stained Glass Pane, Brown', id: 191, blockdata: 12 }, '3491619': { name: 'Hardened Stained Glass Pane, Green', id: 191, blockdata: 13 }, '9844024': { name: 'Hardened Stained Glass Pane, Red', id: 191, blockdata: 14 }, '1644318': { name: 'Hardened Stained Glass Pane, Black', id: 191, blockdata: 15 }, '16538654': { name: 'Heat Block', id: 192, blockdata: 0 }, '8412941': { name: 'Door, Spruce', id: 193, blockdata: 0 }, '7823918': { name: 'Door, Birch', id: 194, blockdata: 0 }, '7824174': { name: 'Door, Jungle', id: 195, blockdata: 0 }, '7824430': { name: 'Door, Acacia', id: 196, blockdata: 0 }, '7824686': { name: 'Door, Dark Oak', id: 197, blockdata: 0 }, '12084021': { name: 'Grass Path', id: 198, blockdata: 0 }, '14903089': { name: 'Item Frame', id: 199, blockdata: 0 }, '14903090': { name: 'Chorus Flower', id: 200, blockdata: 0 }, '15778288': { name: 'Purpur', id: 201, blockdata: 0 }, '15778289': { name: 'Purpur, Chiseled', id: 201, blockdata: 1 }, '15778290': { name: 'Purpur, Pillar (Vertical)', id: 201, blockdata: 2 }, '15778294': { name: 'Purpur, Pillar (East/West)', id: 201, blockdata: 6 }, '15778298': { name: 'Purpur, Pillar (North/South)', id: 201, blockdata: 10 }, '9843752': { name: 'Red Torch', id: 202, blockdata: 0 }, '16041460': { name: 'Stairs, Purpur, East', id: 203, blockdata: 0 }, '16041461': { name: 'Stairs, Purpur, West', id: 203, blockdata: 1 }, '16041462': { name: 'Stairs, Purpur, South', id: 203, blockdata: 2 }, '16041463': { name: 'Stairs, Purpur, North', id: 203, blockdata: 3 }, '16041464': { name: 'Stairs, Purpur, East (Upside-down)', id: 203, blockdata: 4 }, '16041465': { name: 'Stairs, Purpur, West (Upside-down)', id: 203, blockdata: 5 }, '16041466': { name: 'Stairs, Purpur, South (Upside-down)', id: 203, blockdata: 6 }, '16041467': { name: 'Stairs, Purpur, North (Upside-down)', id: 203, blockdata: 7 }, '3029131': { name: 'Blue Torch', id: 204, blockdata: 0 }, '11829946': { name: 'Shulker Box, Undyed', id: 205, blockdata: 0 }, '14604702': { name: 'End Bricks', id: 206, blockdata: 0 }, '14737649': { name: 'Frosted Ice', id: 207, blockdata: 0 }, '16250870': { name: 'End Rod', id: 208, blockdata: 0 }, '5526612': { name: 'End Gateway', id: 209, blockdata: 0 }, '196354': { name: 'Allow Block', id: 210, blockdata: 0 }, '16712194': { name: 'Deny Block', id: 211, blockdata: 0 }, '8947848': { name: 'Border Block', id: 212, blockdata: 0 }, '14048267': { name: 'Magma Block', id: 213, blockdata: 0 }, '14048268': { name: 'Nether wart Block', id: 214, blockdata: 0 }, '2294275': { name: 'Red Nether Brick', id: 215, blockdata: 0 }, '14540250': { name: 'Bone Block', id: 216, blockdata: 0 }, '14540513': { name: 'Shulker Box, White', id: 218, blockdata: 0 }, '14384706': { name: 'Shulker Box, Orange', id: 218, blockdata: 1 }, '11751872': { name: 'Shulker Box, Magenta', id: 218, blockdata: 2 }, '7048141': { name: 'Shulker Box, Light Blue', id: 218, blockdata: 3 }, '11642667': { name: 'Shulker Box, Yellow', id: 218, blockdata: 4 }, '4304700': { name: 'Shulker Box, Lime', id: 218, blockdata: 5 }, '13665693': { name: 'Shulker Box, Pink', id: 218, blockdata: 6 }, '4211012': { name: 'Shulker Box, Gray', id: 218, blockdata: 7 }, '10134181': { name: 'Shulker Box, Light Gray', id: 218, blockdata: 8 }, '3043213': { name: 'Shulker Box, Cyan', id: 218, blockdata: 9 }, '8273593': { name: 'Shulker Box, Purple', id: 218, blockdata: 10 }, '3029393': { name: 'Shulker Box, Blue', id: 218, blockdata: 11 }, '5190435': { name: 'Shulker Box, Brown', id: 218, blockdata: 12 }, '3491615': { name: 'Shulker Box, Green', id: 218, blockdata: 13 }, '9844020': { name: 'Shulker Box, Red', id: 218, blockdata: 14 }, '1644314': { name: 'Shulker Box, Black', id: 218, blockdata: 15 }, '8273332': { name: 'Glazed Terracotta, Purple', id: 219, blockdata: 0 }, '14540252': { name: 'Glazed Terracotta, White', id: 220, blockdata: 0 }, '14384445': { name: 'Glazed Terracotta, Orange', id: 221, blockdata: 0 }, '11751611': { name: 'Glazed Terracotta, Magenta', id: 222, blockdata: 0 }, '7047880': { name: 'Glazed Terracotta, Light Blue', id: 223, blockdata: 0 }, '11642406': { name: 'Glazed Terracotta, Yellow', id: 224, blockdata: 0 }, '4304439': { name: 'Glazed Terracotta, Lime', id: 225, blockdata: 0 }, '13665432': { name: 'Glazed Terracotta, Pink', id: 226, blockdata: 0 }, '4210745': { name: 'Glazed Terracotta, Gray', id: 227, blockdata: 0 }, '10133920': { name: 'Glazed Terracotta, Light Gray', id: 228, blockdata: 0 }, '3042952': { name: 'Glazed Terracotta, Cyan', id: 229, blockdata: 0 }, '24393': { name: 'Glazed Terracotta, Chalkboard', id: 230, blockdata: 0 }, '3029132': { name: 'Glazed Terracotta, Blue', id: 231, blockdata: 0 }, '5190173': { name: 'Glazed Terracotta, Brown', id: 232, blockdata: 0 }, '3491354': { name: 'Glazed Terracotta, Green', id: 233, blockdata: 0 }, '9843753': { name: 'Glazed Terracotta, Red', id: 234, blockdata: 0 }, '1644053': { name: 'Glazed Terracotta, Black', id: 235, blockdata: 0 }, '14540514': { name: 'Concrete, White', id: 236, blockdata: 0 }, '14384707': { name: 'Concrete, Orange', id: 236, blockdata: 1 }, '11751873': { name: 'Concrete, Magenta', id: 236, blockdata: 2 }, '7048142': { name: 'Concrete, Light Blue', id: 236, blockdata: 3 }, '11642668': { name: 'Concrete, Yellow', id: 236, blockdata: 4 }, '4304701': { name: 'Concrete, Lime', id: 236, blockdata: 5 }, '13665694': { name: 'Concrete, Pink', id: 236, blockdata: 6 }, '4211013': { name: 'Concrete, Gray', id: 236, blockdata: 7 }, '10134182': { name: 'Concrete, Light Gray', id: 236, blockdata: 8 }, '3043214': { name: 'Concrete, Cyan', id: 236, blockdata: 9 }, '8273594': { name: 'Concrete, Purple', id: 236, blockdata: 10 }, '3029394': { name: 'Concrete, Blue', id: 236, blockdata: 11 }, '5190436': { name: 'Concrete, Brown', id: 236, blockdata: 12 }, '3491616': { name: 'Concrete, Green', id: 236, blockdata: 13 }, '9844021': { name: 'Concrete, Red', id: 236, blockdata: 14 }, '1644315': { name: 'Concrete, Black', id: 236, blockdata: 15 }, '14540515': { name: 'Concrete Powder, White', id: 237, blockdata: 0 }, '14384708': { name: 'Concrete Powder, Orange', id: 237, blockdata: 1 }, '11751874': { name: 'Concrete Powder, Magenta', id: 237, blockdata: 2 }, '7048143': { name: 'Concrete Powder, Light Blue', id: 237, blockdata: 3 }, '11642669': { name: 'Concrete Powder, Yellow', id: 237, blockdata: 4 }, '4304702': { name: 'Concrete Powder, Lime', id: 237, blockdata: 5 }, '13665695': { name: 'Concrete Powder, Pink', id: 237, blockdata: 6 }, '4211014': { name: 'Concrete Powder, Gray', id: 237, blockdata: 7 }, '10134183': { name: 'Concrete Powder, Light Gray', id: 237, blockdata: 8 }, '3043215': { name: 'Concrete Powder, Cyan', id: 237, blockdata: 9 }, '8273595': { name: 'Concrete Powder, Purple', id: 237, blockdata: 10 }, '3029395': { name: 'Concrete Powder, Blue', id: 237, blockdata: 11 }, '5190437': { name: 'Concrete Powder, Brown', id: 237, blockdata: 12 }, '3491617': { name: 'Concrete Powder, Green', id: 237, blockdata: 13 }, '9844022': { name: 'Concrete Powder, Red', id: 237, blockdata: 14 }, '1644316': { name: 'Concrete Powder, Black', id: 237, blockdata: 15 }, '10133921': { name: 'Compound Creator', id: 238, blockdata: 0 }, '14384444': { name: 'Underwater Torch', id: 239, blockdata: 0 }, '5836898': { name: 'Chorus Plant', id: 240, blockdata: 0 }, '14540512': { name: 'Stained Glass, White', id: 241, blockdata: 0 }, '14384705': { name: 'Stained Glass, Orange', id: 241, blockdata: 1 }, '11751871': { name: 'Stained Glass, Magenta', id: 241, blockdata: 2 }, '7048140': { name: 'Stained Glass, Light Blue', id: 241, blockdata: 3 }, '11642666': { name: 'Stained Glass, Yellow', id: 241, blockdata: 4 }, '4304699': { name: 'Stained Glass, Lime', id: 241, blockdata: 5 }, '13665692': { name: 'Stained Glass, Pink', id: 241, blockdata: 6 }, '4211011': { name: 'Stained Glass, Gray', id: 241, blockdata: 7 }, '10134180': { name: 'Stained Glass, Light Gray', id: 241, blockdata: 8 }, '3043212': { name: 'Stained Glass, Cyan', id: 241, blockdata: 9 }, '8273592': { name: 'Stained Glass, Purple', id: 241, blockdata: 10 }, '3029392': { name: 'Stained Glass, Blue', id: 241, blockdata: 11 }, '5190434': { name: 'Stained Glass, Brown', id: 241, blockdata: 12 }, '3491614': { name: 'Stained Glass, Green', id: 241, blockdata: 13 }, '9844019': { name: 'Stained Glass, Red', id: 241, blockdata: 14 }, '1644313': { name: 'Stained Glass, Black', id: 241, blockdata: 15 }, '13369344': { name: 'Camera', id: 242, blockdata: 0 }, '4536586': { name: 'Podzol', id: 243, blockdata: 0 }, '13644680': { name: 'Beetroot', id: 244, blockdata: 0 }, '11710117': { name: 'Stone Cutter', id: 245, blockdata: 0 }, '9109504': { name: 'Glowing Obsidian', id: 246, blockdata: 0 }, '12252913': { name: 'Nether Reactor Core (Default)', id: 247, blockdata: 0 }, '12252914': { name: 'Nether Reactor Core (Active)', id: 247, blockdata: 1 }, '12252915': { name: 'Nether Reactor Core (Cooled)', id: 247, blockdata: 2 }, '13369345': { name: 'Update Game Block (update!) [note 1]', id: 248, blockdata: 0 }, '13369600': { name: 'Update Game Block (ate!upd)', id: 249, blockdata: 0 }, '9084314': { name: 'Block moved by Piston', id: 250, blockdata: 0 }, '10567229': { name: 'Observer (Down)', id: 251, blockdata: 0 }, '10567230': { name: 'Observer (Up)', id: 251, blockdata: 1 }, '10567231': { name: 'Observer (North)', id: 251, blockdata: 2 }, '10567232': { name: 'Observer (South)', id: 251, blockdata: 3 }, '10567233': { name: 'Observer (West)', id: 251, blockdata: 4 }, '10567234': { name: 'Observer (East)', id: 251, blockdata: 5 }, '7200943': { name: 'Structure Block', id: 252, blockdata: 0 }, '7200942': { name: 'Hardened Glass', id: 253, blockdata: 0 }, '6733207': { name: 'Hard Stained Glass', id: 254, blockdata: 0 }, '9226782': { name: 'info_reserved6', id: 255, blockdata: 0 }, '1866325': { name: 'Prismarine Stairs, East', id: 257, blockdata: 0 }, '1866326': { name: 'Prismarine Stairs, West', id: 257, blockdata: 1 }, '1866327': { name: 'Prismarine Stairs, South', id: 257, blockdata: 2 }, '1866328': { name: 'Prismarine Stairs, North', id: 257, blockdata: 3 }, '1866329': { name: 'Prismarine Stairs, East (Upside-down)', id: 257, blockdata: 4 }, '1866330': { name: 'Prismarine Stairs, West (Upside-down)', id: 257, blockdata: 5 }, '1866331': { name: 'Prismarine Stairs, South (Upside-down)', id: 257, blockdata: 6 }, '1866332': { name: 'Prismarine Stairs, North (Upside-down)', id: 257, blockdata: 7 }, '1462585': { name: 'Dark Prismarine Stairs, East', id: 258, blockdata: 0 }, '1462586': { name: 'Dark Prismarine Stairs, West', id: 258, blockdata: 1 }, '1462587': { name: 'Dark Prismarine Stairs, South', id: 258, blockdata: 2 }, '1462588': { name: 'Dark Prismarine Stairs, North', id: 258, blockdata: 3 }, '1462589': { name: 'Dark Prismarine Stairs, East (Upside-down)', id: 258, blockdata: 4 }, '1462590': { name: 'Dark Prismarine Stairs, West (Upside-down)', id: 258, blockdata: 5 }, '1462591': { name: 'Dark Prismarine Stairs, South (Upside-down)', id: 258, blockdata: 6 }, '1462592': { name: 'Dark Prismarine Stairs, North (Upside-down)', id: 258, blockdata: 7 }, '817230': { name: 'Prismarine Brick Stairs, East', id: 259, blockdata: 0 }, '817231': { name: 'Prismarine Brick Stairs, West', id: 259, blockdata: 1 }, '817232': { name: 'Prismarine Brick Stairs, South', id: 259, blockdata: 2 }, '817233': { name: 'Prismarine Brick Stairs, North', id: 259, blockdata: 3 }, '817234': { name: 'Prismarine Brick Stairs, East (Upside-down)', id: 259, blockdata: 4 }, '817235': { name: 'Prismarine Brick Stairs, West (Upside-down)', id: 259, blockdata: 5 }, '817236': { name: 'Prismarine Brick Stairs, South (Upside-down)', id: 259, blockdata: 6 }, '817237': { name: 'Prismarine Brick Stairs, North (Upside-down)', id: 259, blockdata: 7 }, '10451277': { name: 'Stripped Spruce Log', id: 260, blockdata: 0 }, '12885101': { name: 'Stripped Birch Log', id: 261, blockdata: 0 }, '12089647': { name: 'Stripped Jungle Log', id: 262, blockdata: 0 }, '12413191': { name: 'Stripped Acacia Log', id: 263, blockdata: 0 }, '6109455': { name: 'Stripped Dark Oak Log', id: 264, blockdata: 0 }, '10778693': { name: 'Stripped Oak Log', id: 265, blockdata: 0 }, '6998762': { name: 'Blue Ice', id: 266, blockdata: 0 }, '11957677': { name: 'Hydrogen', id: 267, blockdata: 0 }, '11957678': { name: 'Helium', id: 268, blockdata: 0 }, '11957679': { name: 'Lithium', id: 269, blockdata: 0 }, '11957680': { name: 'Beryllium', id: 270, blockdata: 0 }, '11957681': { name: 'Boron', id: 271, blockdata: 0 }, '11957682': { name: 'Carbon', id: 272, blockdata: 0 }, '11957683': { name: 'Nitrogen', id: 273, blockdata: 0 }, '11957684': { name: 'Oxygen', id: 274, blockdata: 0 }, '11957685': { name: 'Fluorine', id: 275, blockdata: 0 }, '11957686': { name: 'Neon', id: 276, blockdata: 0 }, '11957687': { name: 'Sodium', id: 277, blockdata: 0 }, '11957688': { name: 'Magnesium', id: 278, blockdata: 0 }, '11957689': { name: 'Aluminum', id: 279, blockdata: 0 }, '11957690': { name: 'Silicon', id: 280, blockdata: 0 }, '11957691': { name: 'Phosphorus', id: 281, blockdata: 0 }, '11957692': { name: 'Sulfur', id: 282, blockdata: 0 }, '11957693': { name: 'Chlorine', id: 283, blockdata: 0 }, '11957694': { name: 'Argon', id: 284, blockdata: 0 }, '11957695': { name: 'Potassium', id: 285, blockdata: 0 }, '11957696': { name: 'Calcium', id: 286, blockdata: 0 }, '11957697': { name: 'Scandium', id: 287, blockdata: 0 }, '11957698': { name: 'Titanium', id: 288, blockdata: 0 }, '11957699': { name: 'Vanadium', id: 289, blockdata: 0 }, '11957700': { name: 'Chromium', id: 290, blockdata: 0 }, '11957701': { name: 'Manganese', id: 291, blockdata: 0 }, '11957702': { name: 'Iron', id: 292, blockdata: 0 }, '11957703': { name: 'Cobalt', id: 293, blockdata: 0 }, '11957704': { name: 'Nickel', id: 294, blockdata: 0 }, '11957705': { name: 'Copper', id: 295, blockdata: 0 }, '11957706': { name: 'Zinc', id: 296, blockdata: 0 }, '11957707': { name: 'Gallium', id: 297, blockdata: 0 }, '11957708': { name: 'Germanium', id: 298, blockdata: 0 }, '11957709': { name: 'Arsenic', id: 299, blockdata: 0 }, '11957710': { name: 'Selenium', id: 300, blockdata: 0 }, '11957711': { name: 'Bromine', id: 301, blockdata: 0 }, '11957712': { name: 'Krypton', id: 302, blockdata: 0 }, '11957713': { name: 'Rubidium', id: 303, blockdata: 0 }, '11957714': { name: 'Strontium', id: 304, blockdata: 0 }, '11957715': { name: 'Yttrium', id: 305, blockdata: 0 }, '11957716': { name: 'Zirconium', id: 306, blockdata: 0 }, '11957717': { name: 'Niobium', id: 307, blockdata: 0 }, '11957718': { name: 'Molybdenum', id: 308, blockdata: 0 }, '11957719': { name: 'Technetium', id: 309, blockdata: 0 }, '11957720': { name: 'Ruthenium', id: 310, blockdata: 0 }, '11957721': { name: 'Rhodium', id: 311, blockdata: 0 }, '11957722': { name: 'Palladium', id: 312, blockdata: 0 }, '11957723': { name: 'Silver', id: 313, blockdata: 0 }, '11957724': { name: 'Cadmium', id: 314, blockdata: 0 }, '11957725': { name: 'Indium', id: 315, blockdata: 0 }, '11957726': { name: 'Tin', id: 316, blockdata: 0 }, '11957727': { name: 'Antimony', id: 317, blockdata: 0 }, '11957728': { name: 'Tellurium', id: 318, blockdata: 0 }, '11957729': { name: 'Iodine', id: 319, blockdata: 0 }, '11957730': { name: 'Xenon', id: 320, blockdata: 0 }, '11957731': { name: 'Cesium', id: 321, blockdata: 0 }, '11957732': { name: 'Barium', id: 322, blockdata: 0 }, '11957733': { name: 'Lanthanum', id: 323, blockdata: 0 }, '11957734': { name: 'Cerium', id: 324, blockdata: 0 }, '11957735': { name: 'Praseodymium', id: 325, blockdata: 0 }, '11957736': { name: 'Neodymium', id: 326, blockdata: 0 }, '11957737': { name: 'Promethium', id: 327, blockdata: 0 }, '11957738': { name: 'Samarium', id: 328, blockdata: 0 }, '11957739': { name: 'Europium', id: 329, blockdata: 0 }, '11957740': { name: 'Gadolinium', id: 330, blockdata: 0 }, '11957741': { name: 'Terbium', id: 331, blockdata: 0 }, '11957742': { name: 'Dysprosium', id: 332, blockdata: 0 }, '11957743': { name: 'Holmium', id: 333, blockdata: 0 }, '11957744': { name: 'Erbium', id: 334, blockdata: 0 }, '11957745': { name: 'Thulium', id: 335, blockdata: 0 }, '11957746': { name: 'Ytterbium', id: 336, blockdata: 0 }, '11957747': { name: 'Lutetium', id: 337, blockdata: 0 }, '11957748': { name: 'Hafnium', id: 338, blockdata: 0 }, '11957749': { name: 'Tantalum', id: 339, blockdata: 0 }, '11957750': { name: 'Tungsten', id: 340, blockdata: 0 }, '11957751': { name: 'Rhenium', id: 341, blockdata: 0 }, '11957752': { name: 'Osmium', id: 342, blockdata: 0 }, '11957753': { name: 'Iridium', id: 343, blockdata: 0 }, '11957754': { name: 'Platinum', id: 344, blockdata: 0 }, '11957755': { name: 'Gold', id: 345, blockdata: 0 }, '11957756': { name: 'Mercury', id: 346, blockdata: 0 }, '11957757': { name: 'Thallium', id: 347, blockdata: 0 }, '11957758': { name: 'Lead', id: 348, blockdata: 0 }, '11957759': { name: 'Bismuth', id: 349, blockdata: 0 }, '11957760': { name: 'Polonium', id: 350, blockdata: 0 }, '11957761': { name: 'Astatine', id: 351, blockdata: 0 }, '11957762': { name: 'Radon', id: 352, blockdata: 0 }, '11957763': { name: 'Francium', id: 353, blockdata: 0 }, '11957764': { name: 'Radium', id: 354, blockdata: 0 }, '11957765': { name: 'Actinium', id: 355, blockdata: 0 }, '11957766': { name: 'Thorium', id: 356, blockdata: 0 }, '11957767': { name: 'Protactinium', id: 357, blockdata: 0 }, '11957768': { name: 'Uranium', id: 358, blockdata: 0 }, '11957769': { name: 'Neptunium', id: 359, blockdata: 0 }, '11957770': { name: 'Plutonium', id: 360, blockdata: 0 }, '11957771': { name: 'Americium', id: 361, blockdata: 0 }, '11957772': { name: 'Curium', id: 362, blockdata: 0 }, '11957773': { name: 'Berkelium', id: 363, blockdata: 0 }, '11957774': { name: 'Californium', id: 364, blockdata: 0 }, '11957775': { name: 'Einsteinium', id: 365, blockdata: 0 }, '11957776': { name: 'Fermium', id: 366, blockdata: 0 }, '11957777': { name: 'Mendelevium', id: 367, blockdata: 0 }, '11957778': { name: 'Nobelium', id: 368, blockdata: 0 }, '11957779': { name: 'Lawrencium', id: 369, blockdata: 0 }, '11957780': { name: 'Rutherfordium', id: 370, blockdata: 0 }, '11957781': { name: 'Dubnium', id: 371, blockdata: 0 }, '11957782': { name: 'Seaborgium', id: 372, blockdata: 0 }, '11957783': { name: 'Bohrium', id: 373, blockdata: 0 }, '11957784': { name: 'Hassium', id: 374, blockdata: 0 }, '11957785': { name: 'Meitnerium', id: 375, blockdata: 0 }, '11957786': { name: 'Darmstadtium', id: 376, blockdata: 0 }, '11957787': { name: 'Roentgenium', id: 377, blockdata: 0 }, '11957788': { name: 'Copernicium', id: 378, blockdata: 0 }, '11957789': { name: 'Nihonium', id: 379, blockdata: 0 }, '11957790': { name: 'Flerovium', id: 380, blockdata: 0 }, '11957791': { name: 'Moscovium', id: 381, blockdata: 0 }, '11957792': { name: 'Livermorium', id: 382, blockdata: 0 }, '11957793': { name: 'Tennessine', id: 383, blockdata: 0 }, '11957794': { name: 'Oganesson', id: 384, blockdata: 0 }, '3491612': { name: 'Sea Grass0', id: 385, blockdata: 0 }, '3491613': { name: 'Sea grass1', id: 385, blockdata: 1 }, '3491614': { name: 'Sea Grass2', id: 385, blockdata: 2 }, '924736': { name: 'Coral', id: 386, blockdata: 0 }, '924737': { name: 'Coral Block', id: 387, blockdata: 0 }, '924738': { name: 'Coral Fan', id: 388, blockdata: 0 }, '2631204': { name: 'Dead Coral Fan', id: 389, blockdata: 0 }, '924739': { name: 'Coral Wall Fan', id: 390, blockdata: 0 }, '924740': { name: 'Coral Wall Fan (2)', id: 391, blockdata: 0 }, '924997': { name: 'Coral Fan', id: 392, blockdata: 0 }, '924998': { name: 'Coral Fan', id: 392, blockdata: 1 }, '925001': { name: 'Horn Coral Wall Fan facing east', id: 392, blockdata: 4 }, '925002': { name: 'Coral Fan', id: 392, blockdata: 5 }, '925005': { name: 'Horn Coral Wall Fan facing north', id: 392, blockdata: 8 }, '925006': { name: 'Coral Fan', id: 392, blockdata: 9 }, '925009': { name: 'Horn Coral Wall Fan facing south', id: 392, blockdata: 12 }, '925010': { name: 'Horn Coral Wall Fan facing west', id: 392, blockdata: 13 }, '2307344': { name: 'Kelp', id: 393, blockdata: 0 }, '2307345': { name: 'Kelp', id: 393, blockdata: 1 }, '2307346': { name: 'Kelp', id: 393, blockdata: 2 }, '2307347': { name: 'Kelp', id: 393, blockdata: 3 }, '2307348': { name: 'Kelp', id: 393, blockdata: 4 }, '2307349': { name: 'Kelp', id: 393, blockdata: 5 }, '2307350': { name: 'Kelp', id: 393, blockdata: 6 }, '2307351': { name: 'Kelp', id: 393, blockdata: 7 }, '2307352': { name: 'Kelp', id: 393, blockdata: 8 }, '2307353': { name: 'Kelp', id: 393, blockdata: 9 }, '2307354': { name: 'Kelp', id: 393, blockdata: 10 }, '2307355': { name: 'Kelp', id: 393, blockdata: 11 }, '2307356': { name: 'Kelp', id: 393, blockdata: 12 }, '2307357': { name: 'Kelp', id: 393, blockdata: 13 }, '2307358': { name: 'Kelp', id: 393, blockdata: 14 }, '2307359': { name: 'Kelp', id: 393, blockdata: 15 }, '554540': { name: 'Dried Kelp Block', id: 394, blockdata: 0 }, '12412940': { name: 'Button, Acacia', id: 395, blockdata: 0 }, '14067573': { name: 'Button, Birch', id: 396, blockdata: 0 }, '9466191': { name: 'Button, Dark Oak', id: 397, blockdata: 0 }, '8805166': { name: 'Button, Jungle', id: 398, blockdata: 0 }, '6832148': { name: 'Button, Spruce', id: 399, blockdata: 0 }, '13088161': { name: 'Trapdoor, Acacia', id: 400, blockdata: 0 }, '14004875': { name: 'Trapdoor, Birch', id: 401, blockdata: 0 }, '10455409': { name: 'Trapdoor, Dark Oak', id: 402, blockdata: 0 }, '10846295': { name: 'Trapdoor, Jungle', id: 403, blockdata: 0 }, '7954243': { name: 'Trapdoor, Spruce', id: 404, blockdata: 0 }, '13088162': { name: 'Pressure Plate, Acacia', id: 405, blockdata: 0 }, '14004876': { name: 'Pressure Plate, Birch', id: 406, blockdata: 0 }, '10455410': { name: 'Pressure Plate, Dark Oak', id: 407, blockdata: 0 }, '10846296': { name: 'Pressure Plate, Jungle', id: 408, blockdata: 0 }, '7954242': { name: 'Pressure Plate, Spruce', id: 409, blockdata: 0 }, '13730837': { name: 'Carved Pumpkin', id: 410, blockdata: 0 }, '4309575': { name: 'Sea Pickle', id: 411, blockdata: 0 }, '6185058': { name: 'Conduit', id: 412, blockdata: 0 }, '5081157': { name: 'Turtle Egg', id: 414, blockdata: 0 }, '184317': { name: 'Bubble Column', id: 415, blockdata: 0 }, '16255537': { name: 'Barrier', id: 416, blockdata: 0 }, '15723173': { name: 'Slab, End Brick', id: 417, blockdata: 0 }, '15723174': { name: 'Slab, Smooth Red Sandstone', id: 417, blockdata: 1 }, '15723175': { name: 'Slab, Polished Andesite', id: 417, blockdata: 2 }, '15723176': { name: 'Slab, Andesite', id: 417, blockdata: 3 }, '15723177': { name: 'Slab, Diorite', id: 417, blockdata: 4 }, '15723178': { name: 'Slab, Polished Diorite', id: 417, blockdata: 5 }, '15723179': { name: 'Slab, Granite', id: 417, blockdata: 6 }, '15723180': { name: 'Slab, Polished Granite', id: 417, blockdata: 7 }, '15723181': { name: 'Upper Slab, End Brick', id: 417, blockdata: 8 }, '15723182': { name: 'Upper Slab, Smooth Red Sandstone', id: 417, blockdata: 9 }, '15723183': { name: 'Upper Slab, Polished Andesite', id: 417, blockdata: 10 }, '15723184': { name: 'Upper Slab, Andesite', id: 417, blockdata: 11 }, '15723185': { name: 'Upper Slab, Diorite', id: 417, blockdata: 12 }, '15723186': { name: 'Upper Slab, Polished Diorite', id: 417, blockdata: 13 }, '15723187': { name: 'Upper Slab, Granite', id: 417, blockdata: 14 }, '15723188': { name: 'Upper Slab, Polished Granite', id: 417, blockdata: 15 }, '1953330': { name: 'Bamboo', id: 418, blockdata: 0 }, '1953331': { name: 'Bamboo Sapling', id: 419, blockdata: 0 }, '12955683': { name: 'Scaffolding', id: 420, blockdata: 0 }, '9150353': { name: 'Slab, Mossy Stone Brick', id: 421, blockdata: 0 }, '9150354': { name: 'Slab, Smooth Quartz', id: 421, blockdata: 1 }, '9150355': { name: 'Slab, Stone', id: 421, blockdata: 2 }, '9150356': { name: 'Slab, Cut Sandstone', id: 421, blockdata: 3 }, '9150357': { name: 'Slab, Cut Red Sandstone', id: 421, blockdata: 4 }, '9150361': { name: 'Upper Slab, Mossy Stone Brick', id: 421, blockdata: 8 }, '9150362': { name: 'Upper Slab, Smooth Quartz', id: 421, blockdata: 9 }, '9150363': { name: 'Upper Slab, Stone', id: 421, blockdata: 10 }, '9150364': { name: 'Upper Slab, Cut Sandstone', id: 421, blockdata: 11 }, '9150365': { name: 'Upper Slab, Cut Red Sandstone', id: 421, blockdata: 12 }, '14604957': { name: 'Double Slab, End Stone Brick', id: 422, blockdata: 0 }, '14604958': { name: 'Double Slab, Smooth Red Sandstone', id: 422, blockdata: 1 }, '14604959': { name: 'Double Slab, Polished Andesite', id: 422, blockdata: 2 }, '14604960': { name: 'Double Slab, Andesite', id: 422, blockdata: 3 }, '14604961': { name: 'Double Slab, Diorite', id: 422, blockdata: 4 }, '14604962': { name: 'Double Slab, Polished Diorite', id: 422, blockdata: 5 }, '14604963': { name: 'Double Slab, Granite', id: 422, blockdata: 6 }, '14604964': { name: 'Double Slab, Polished Granite', id: 422, blockdata: 7 }, '9084824': { name: 'Double Slab, Mossy Stone Brick', id: 423, blockdata: 0 }, '9084825': { name: 'Double Slab, Smooth Quartz', id: 423, blockdata: 1 }, '9084826': { name: 'Double Slab, Stone', id: 423, blockdata: 2 }, '9084827': { name: 'Double Slab, Cut Sandstone', id: 423, blockdata: 3 }, '9084828': { name: 'Double Slab, Cut Red Sandstone', id: 423, blockdata: 4 }, '8149600': { name: 'Stairs, Granite, East', id: 424, blockdata: 0 }, '8149601': { name: 'Stairs, Granite, West', id: 424, blockdata: 1 }, '8149602': { name: 'Stairs, Granite, South', id: 424, blockdata: 2 }, '8149603': { name: 'Stairs, Granite, North', id: 424, blockdata: 3 }, '8149604': { name: 'Stairs, Granite, East (Upside-down)', id: 424, blockdata: 4 }, '8149605': { name: 'Stairs, Granite, West (Upside-down)', id: 424, blockdata: 5 }, '8149606': { name: 'Stairs, Granite, South (Upside-down)', id: 424, blockdata: 6 }, '8149607': { name: 'Stairs, Granite, North (Upside-down)', id: 424, blockdata: 7 }, '16579824': { name: 'Stairs, Diorite, East', id: 425, blockdata: 0 }, '16579825': { name: 'Stairs, Diorite, West', id: 425, blockdata: 1 }, '16579826': { name: 'Stairs, Diorite, South', id: 425, blockdata: 2 }, '16579827': { name: 'Stairs, Diorite, North', id: 425, blockdata: 3 }, '16579828': { name: 'Stairs, Diorite, East (Upside-down)', id: 425, blockdata: 4 }, '16579829': { name: 'Stairs, Diorite, West (Upside-down)', id: 425, blockdata: 5 }, '16579830': { name: 'Stairs, Diorite, South (Upside-down)', id: 425, blockdata: 6 }, '16579831': { name: 'Stairs, Diorite, North (Upside-down)', id: 425, blockdata: 7 }, '16579832': { name: 'Stairs, Andesite, East', id: 426, blockdata: 0 }, '16579833': { name: 'Stairs, Andesite, West', id: 426, blockdata: 1 }, '16579834': { name: 'Stairs, Andesite, South', id: 426, blockdata: 2 }, '16579835': { name: 'Stairs, Andesite, North', id: 426, blockdata: 3 }, '16579836': { name: 'Stairs, Andesite, East (Upside-down)', id: 426, blockdata: 4 }, '16579837': { name: 'Stairs, Andesite, West (Upside-down)', id: 426, blockdata: 5 }, '16579838': { name: 'Stairs, Andesite, South (Upside-down)', id: 426, blockdata: 6 }, '16579839': { name: 'Stairs, Andesite, North (Upside-down)', id: 426, blockdata: 7 }, '12813367': { name: 'Polished Granite Stairs', id: 427, blockdata: 0 }, '16579567': { name: 'Polished Diorite Stairs', id: 428, blockdata: 0 }, '16579566': { name: 'Polished Andesite Stairs', id: 429, blockdata: 0 }, '12813368': { name: 'Mossy Stone Brick Stairs', id: 430, blockdata: 0 }, '12813369': { name: 'Smooth Red SandStone Stairs', id: 431, blockdata: 0 }, '12813370': { name: 'Smooth SandStone Stairs', id: 432, blockdata: 0 }, '15722916': { name: 'End Stone Brick Stairs', id: 433, blockdata: 0 }, '9088659': { name: 'Mossy Cobblestone Stairs', id: 434, blockdata: 0 }, '9084816': { name: 'Stairs, Stone, East', id: 435, blockdata: 0 }, '9084817': { name: 'Stairs, Stone, West', id: 435, blockdata: 1 }, '9084818': { name: 'Stairs, Stone, South', id: 435, blockdata: 2 }, '9084819': { name: 'Stairs, Stone, North', id: 435, blockdata: 3 }, '9084820': { name: 'Stairs, Stone, East (Upside-down)', id: 435, blockdata: 4 }, '9084821': { name: 'Stairs, Stone, West (Upside-down)', id: 435, blockdata: 5 }, '9084822': { name: 'Stairs, Stone, South (Upside-down)', id: 435, blockdata: 6 }, '9084823': { name: 'Stairs, Stone, North (Upside-down)', id: 435, blockdata: 7 }, '7953987': { name: 'Spruce Standing Sign', id: 436, blockdata: 0 }, '7954244': { name: 'Spruce Wall Sign', id: 437, blockdata: 0 }, '9084563': { name: 'Smooth Stone', id: 438, blockdata: 0 }, '12252658': { name: 'Red Nether Brick Stairs', id: 439, blockdata: 0 }, '16776946': { name: 'Smooth Quartz Stairs', id: 440, blockdata: 0 }, '9528833': { name: 'Birch Standing Sign', id: 441, blockdata: 0 }, '9528834': { name: 'Birch Wall Sign', id: 442, blockdata: 0 }, '9594371': { name: 'Jungle Standing Sign', id: 443, blockdata: 0 }, '9594372': { name: 'Jungle Wall Sign', id: 444, blockdata: 0 }, '7368747': { name: 'Acacia Standing Sign', id: 445, blockdata: 0 }, '7368750': { name: 'Acacia Wall Sign', id: 446, blockdata: 0 }, '6844970': { name: 'Darkoak Standing Sign', id: 447, blockdata: 0 }, '6844973': { name: 'Darkoak Wall Sign', id: 448, blockdata: 0 }, '9002023': { name: 'Lectern', id: 449, blockdata: 0 }, '8421760': { name: 'Grindstone', id: 450, blockdata: 0 }, '15027751': { name: 'Blast Furnace', id: 451, blockdata: 0 }, '9076864': { name: 'Stonecutter Block', id: 452, blockdata: 0 }, '9002024': { name: 'Smoker', id: 453, blockdata: 0 }, '16602909': { name: 'Lit Smoker', id: 454, blockdata: 0 }, '9002025': { name: 'Cartography Table', id: 455, blockdata: 0 }, '9002026': { name: 'Fletching Table', id: 456, blockdata: 0 }, '9002027': { name: 'Smithing Table', id: 457, blockdata: 0 }, '9002028': { name: 'Barrel', id: 458, blockdata: 0 }, '9150106': { name: 'Loom', id: 459, blockdata: 0 }, '16776970': { name: 'Bell', id: 461, blockdata: 0 }, '16711937': { name: 'Sweet Berry Bush', id: 462, blockdata: 0 }, '16602908': { name: 'Lantern', id: 463, blockdata: 0 }, '16602907': { name: 'Campfire', id: 464, blockdata: 0 }, '16602890': { name: 'Lava Cauldron', id: 465, blockdata: 0 }, '16711938': { name: 'Jigsaw', id: 466, blockdata: 0 }, '10824490': { name: 'Oak Wood', id: 467, blockdata: 0 }, '10824491': { name: 'Spruce Wood', id: 467, blockdata: 1 }, '10824492': { name: 'Birch Wood', id: 467, blockdata: 2 }, '10824493': { name: 'Jungle Wood', id: 467, blockdata: 3 }, '10824494': { name: 'Acacia Wood', id: 467, blockdata: 4 }, '10824495': { name: 'Dark Oak Wood', id: 467, blockdata: 5 }, '10824498': { name: 'Stripped Oak Wood', id: 467, blockdata: 8 }, '10824499': { name: 'Stripped Spruce Wood', id: 467, blockdata: 9 }, '10824500': { name: 'Stripped Birch Wood', id: 467, blockdata: 10 }, '10824501': { name: 'Stripped Jungle Wood', id: 467, blockdata: 11 }, '10824502': { name: 'Stripped Acacia Wood', id: 467, blockdata: 12 }, '10824503': { name: 'Stripped Dark Oak Wood', id: 467, blockdata: 13 }, '9002021': { name: 'Composter', id: 468, blockdata: 0 }, '16602891': { name: 'Lit Blast Furnace', id: 469, blockdata: 0 }, '16602923': { name: 'Light Block', id: 470, blockdata: 0 }, '10824250': { name: 'Wither Rose', id: 471, blockdata: 0 }, '9150107': { name: 'Sticky Piston Head ', id: 472, blockdata: 0 }, '5789527': { name: 'Bee Nest', id: 473, blockdata: 0 }, '5789528': { name: 'BeeHive', id: 474, blockdata: 0 }, '5789529': { name: 'Honey Block', id: 475, blockdata: 0 }, '5789530': { name: 'Honeycomb Block', id: 476, blockdata: 0 }, '14145496': { name: 'Lodestone', id: 477, blockdata: 0 }, '26626': { name: 'Crimson Roots', id: 478, blockdata: 0 }, '26629': { name: 'Warped Roots', id: 479, blockdata: 0 }, '5380126': { name: 'Crimson Stem', id: 480, blockdata: 0 }, '1128509': { name: 'Warped Stem', id: 481, blockdata: 0 }, '1128511': { name: 'Warped Wart Block', id: 482, blockdata: 0 }, '26625': { name: 'Crimson Fungus', id: 483, blockdata: 0 }, '26628': { name: 'Warped Fungus', id: 484, blockdata: 0 }, '14123265': { name: 'Shroomlight', id: 485, blockdata: 0 }, '26627': { name: 'Weeping Vines', id: 486, blockdata: 0 }, '9509402': { name: 'Crimson Nylium', id: 487, blockdata: 0 }, '950895': { name: 'Warped Nylium', id: 488, blockdata: 0 }, '1779264': { name: 'Basalt', id: 489, blockdata: 0 }, '1779265': { name: 'Polished Basalt', id: 490, blockdata: 0 }, '6042411': { name: 'Soul Soil', id: 491, blockdata: 0 }, '1152875': { name: 'Soul Fire', id: 492, blockdata: 0 }, '1152879': { name: 'Nether Sprouts', id: 493, blockdata: 0 }, '14145497': { name: 'Target', id: 494, blockdata: 0 }, '5380127': { name: 'Stripped Crimson Stem', id: 495, blockdata: 0 }, '1128498': { name: 'Stripped Warped Stem', id: 496, blockdata: 0 }, '5380117': { name: 'Crimson Planks', id: 497, blockdata: 0 }, '1128504': { name: 'Warped Planks', id: 498, blockdata: 0 }, '5380114': { name: 'Crimson Door', id: 499, blockdata: 0 }, '1128500': { name: 'Warped Door', id: 500, blockdata: 0 }, '5380123': { name: 'Crimson Trapdoor', id: 501, blockdata: 0 }, '1128510': { name: 'Warped Trapdoor', id: 502, blockdata: 0 }, '5380122': { name: 'Crimson Standing Sign', id: 505, blockdata: 0 }, '1128508': { name: 'Warped Standing Sign', id: 506, blockdata: 0 }, '5380121': { name: 'Crimson Wall Sign', id: 507, blockdata: 0 }, '1128513': { name: 'Warped Wall Sign', id: 508, blockdata: 0 }, '5380120': { name: 'Crimson Stairs', id: 509, blockdata: 0 }, '1128507': { name: 'Warped Stairs', id: 510, blockdata: 0 }, '5380115': { name: 'Crimson Fence', id: 511, blockdata: 0 }, '1128501': { name: 'Warped Fence', id: 512, blockdata: 0 }, '5380116': { name: 'Crimson Fence Gate', id: 513, blockdata: 0 }, '1128502': { name: 'Warped Fence Gate', id: 514, blockdata: 0 }, '5380113': { name: 'Crimson Button', id: 515, blockdata: 0 }, '1128499': { name: 'Warped Button', id: 516, blockdata: 0 }, '5380118': { name: 'Crimson Pressure Plate', id: 517, blockdata: 0 }, '1128505': { name: 'Warped Pressure Plate', id: 518, blockdata: 0 }, '5380375': { name: 'Lower Crimson Slab', id: 519, blockdata: 0 }, '5380376': { name: 'Upper Crimson Slab', id: 519, blockdata: 1 }, '1128762': { name: 'Lower Warped Slab', id: 520, blockdata: 0 }, '1128763': { name: 'Upper Warped Slab', id: 520, blockdata: 1 }, '5380128': { name: 'Crimson Double Slab', id: 521, blockdata: 0 }, '1128512': { name: 'Warped Double Slab', id: 522, blockdata: 0 }, '1152876': { name: 'Soul Torch', id: 523, blockdata: 0 }, '1152877': { name: 'Soul Lantern', id: 524, blockdata: 0 }, '1779266': { name: 'Netherite Block', id: 525, blockdata: 0 }, '5093555': { name: 'Ancient Debris', id: 526, blockdata: 0 }, '3417420': { name: 'Respawn Anchor', id: 527, blockdata: 0 }, '1779270': { name: 'Blackstone', id: 528, blockdata: 0 }, '1779252': { name: 'Polished Blackstone Bricks', id: 529, blockdata: 0 }, '1779250': { name: 'Polished Blackstone Brick Stairs', id: 530, blockdata: 0 }, '1779261': { name: 'Blackstone Stairs', id: 531, blockdata: 0 }, '1779262': { name: 'Blackstone Wall', id: 532, blockdata: 0 }, '1779251': { name: 'Polished Blackstone Brick Wall', id: 533, blockdata: 0 }, '1779258': { name: 'Chiseled Polished Blackstone', id: 534, blockdata: 0 }, '1779259': { name: 'Cracked Polished Blackstone Bricks', id: 535, blockdata: 0 }, '1779263': { name: 'Gilded Blackstone', id: 536, blockdata: 0 }, '1779516': { name: 'Lower Blackstone Slab', id: 537, blockdata: 0 }, '1779517': { name: 'Upper Blackstone Slab', id: 537, blockdata: 1 }, '1779271': { name: 'Blackstone Double Slab', id: 538, blockdata: 0 }, '1779505': { name: 'Lower Polished Blackstone Brick Slab', id: 539, blockdata: 0 }, '1779506': { name: 'Upper Polished Blackstone Brick Slab', id: 539, blockdata: 1 }, '1779268': { name: 'Polished Blackstone Brick Double Slab', id: 540, blockdata: 0 }, '1779248': { name: 'Chain', id: 541, blockdata: 0 }, '26630': { name: 'Twisting Vines', id: 542, blockdata: 0 }, '14123266': { name: 'Nether Gold Ore', id: 543, blockdata: 0 }, '3417419': { name: 'Crying Obsidian', id: 544, blockdata: 0 }, '1152878': { name: 'Soul Campfire', id: 545, blockdata: 0 }, '1779267': { name: 'Polished Blackstone', id: 546, blockdata: 0 }, '1779256': { name: 'Polished Blackstone Stairs', id: 547, blockdata: 0 }, '1779511': { name: 'Lower Polished Blackstone Slab', id: 548, blockdata: 0 }, '1779512': { name: 'Upper Polished Blackstone Slab', id: 548, blockdata: 1 }, '1779269': { name: 'Polished Blackstone Double Slab', id: 549, blockdata: 0 }, '1779254': { name: 'Polished Blackstone Pressure Plate', id: 550, blockdata: 0 }, '1779253': { name: 'Polished Blackstone Button', id: 551, blockdata: 0 }, '1779257': { name: 'Polished Blackstone Wall', id: 552, blockdata: 0 }, '1128503': { name: 'Warped Hyphae', id: 553, blockdata: 0 }, '5380124': { name: 'Crimson Hyphae', id: 554, blockdata: 0 }, '5380125': { name: 'Stripped Crimson Hyphae', id: 555, blockdata: 0 }, '1128497': { name: 'Stripped Warped Hyphae', id: 556, blockdata: 0 }, '2294291': { name: 'Chiseled Nether Bricks', id: 557, blockdata: 0 }, '2294292': { name: 'Cracked Nether Bricks', id: 558, blockdata: 0 }, '15263720': { name: 'Quartz Bricks', id: 559, blockdata: 0 }, '16645631': { name: 'Powder Snow', id: 561, blockdata: 0 }, '1081360': { name: 'Sculk Sensor', id: 562, blockdata: 0 }, '8611930': { name: 'Pointed Dripstone', id: 563, blockdata: 0 }, '12148802': { name: 'Copper Ore', id: 566, blockdata: 0 }, '12148803': { name: 'Lightning Rod', id: 567, blockdata: 0 }, '8611931': { name: 'Dripstone Block', id: 572, blockdata: 0 }, '8149509': { name: 'Rooted Dirt', id: 573, blockdata: 0 }, '8017924': { name: 'Hanging Roots', id: 574, blockdata: 0 }, '6189615': { name: 'Moss Block', id: 575, blockdata: 0 }, '10383983': { name: 'Spore Blossom', id: 576, blockdata: 0 }, '6521134': { name: 'Cave Vines', id: 577, blockdata: 0 }, '7771446': { name: 'Big Dripleaf', id: 578, blockdata: 0 }, '6189871': { name: 'Azalea Leaves', id: 579, blockdata: 0 }, '9335647': { name: 'Flowered Azalea Leaves', id: 580, blockdata: 0 }, '12829888': { name: 'Clacite', id: 581, blockdata: 0 }, '6441105': { name: 'Amethyst Block', id: 582, blockdata: 0 }, '6572691': { name: 'Budding Amethyst', id: 583, blockdata: 0 }, '6572692': { name: 'Amethyst Cluster', id: 584, blockdata: 0 }, '6572693': { name: 'Large Amethyst Bud', id: 585, blockdata: 0 }, '6572694': { name: 'Medium Amethyst Bud', id: 586, blockdata: 0 }, '6572695': { name: 'Small Amethyst Bud', id: 587, blockdata: 0 }, '4671554': { name: 'Tuff', id: 588, blockdata: 0 }, '1118481': { name: 'Tinted Glass', id: 589, blockdata: 0 }, '6189614': { name: 'Moss Carpet', id: 590, blockdata: 0 }, '7771445': { name: 'Small Dripleaf', id: 591, blockdata: 0 }, '9335135': { name: 'Azalea', id: 592, blockdata: 0 }, '6189359': { name: 'Flowering Azalea', id: 593, blockdata: 0 }, '15100464': { name: 'Glow Frame', id: 594, blockdata: 0 }, '12148804': { name: 'Copper Block', id: 595, blockdata: 0 }, '11175282': { name: 'Exposed Copper', id: 596, blockdata: 0 }, '9611402': { name: 'Weathered Copper', id: 597, blockdata: 0 }, '6792330': { name: 'Oxidized Copper', id: 598, blockdata: 0 }, '12083268': { name: 'Waxed Copper', id: 599, blockdata: 0 }, '11109746': { name: 'Waxed Exposed Copper', id: 600, blockdata: 0 }, '9545866': { name: 'Waxed Weathered Copper', id: 601, blockdata: 0 }, '12148805': { name: 'Cut Copper', id: 602, blockdata: 0 }, '11175283': { name: 'Exposed Cut Copper', id: 603, blockdata: 0 }, '9611403': { name: 'Weathered Cut Copper', id: 604, blockdata: 0 }, '6792331': { name: 'Oxidized Cut Copper', id: 605, blockdata: 0 }, '12083269': { name: 'Waxed Cut Copper', id: 606, blockdata: 0 }, '11109747': { name: 'Waxed Exposed Cut Copper', id: 607, blockdata: 0 }, '9545867': { name: 'Waxed Weathered Cut Copper', id: 608, blockdata: 0 }, '12148806': { name: 'Cut Copper Stairs', id: 609, blockdata: 0 }, '11175284': { name: 'Exposed Cut Copper Stairs', id: 610, blockdata: 0 }, '9611404': { name: 'Weathered Cut Copper Stairs', id: 611, blockdata: 0 }, '6792332': { name: 'Oxidized Cut Copper Stairs', id: 612, blockdata: 0 }, '12083270': { name: 'Waxed Cut Copper Stairs', id: 613, blockdata: 0 }, '11109748': { name: 'Waxed Exposed Cut Copper Stairs', id: 614, blockdata: 0 }, '9545868': { name: 'Waxed Weathered Cut Copper Stairs', id: 615, blockdata: 0 }, '12148807': { name: 'Cut Copper Slab', id: 616, blockdata: 0 }, '11175285': { name: 'Exposed Cut Copper Slab', id: 617, blockdata: 0 }, '9611405': { name: 'Weathered Cut Copper Slab', id: 618, blockdata: 0 }, '6792333': { name: 'Oxidized Cut Copper Slab', id: 619, blockdata: 0 }, '12083271': { name: 'Waxed Cut Copper Slab', id: 620, blockdata: 0 }, '11109749': { name: 'Waxed Exposed Cut Copper Slab', id: 621, blockdata: 0 }, '9545869': { name: 'Waxed Weathered Cut Copper Slab', id: 622, blockdata: 0 }, '12148808': { name: 'Cut Copper Double Slab', id: 623, blockdata: 0 }, '11175286': { name: 'Exposed Cut Copper Double Slab', id: 624, blockdata: 0 }, '9611406': { name: 'Weathered Cut Copper Double Slab', id: 625, blockdata: 0 }, '6792334': { name: 'Oxidized Cut Copper Double Slab', id: 626, blockdata: 0 }, '12083272': { name: 'Waxed Cut Copper Double Slab', id: 627, blockdata: 0 }, '11109750': { name: 'Waxed Exposed Cut Copper Double Slab', id: 628, blockdata: 0 }, '9545870': { name: 'Waxed Weathered Cut Copper Double Slab', id: 629, blockdata: 0 }, '8619628': { name: 'Cave Vines, Body with Berries', id: 630, blockdata: 0 }, '8619627': { name: 'Cave Vines, Head with Berries', id: 631, blockdata: 0 }, '3421239': { name: 'Smooth Basalt', id: 632, blockdata: 0 }, '3618616': { name: 'Deepslate', id: 633, blockdata: 0 }, '3618617': { name: 'Cobbled Deepslate', id: 634, blockdata: 0 }, '3618618': { name: 'Cobbled Deepslate Slab', id: 635, blockdata: 0 }, '3618619': { name: 'Cobbled Deepslate Stairs', id: 636, blockdata: 0 }, '3618620': { name: 'Cobbled Deepslate Wall', id: 637, blockdata: 0 }, '3684409': { name: 'Polished Deepslate', id: 638, blockdata: 0 }, '3684410': { name: 'Polished Deepslate Slab', id: 639, blockdata: 0 }, '3684411': { name: 'Polished Deepslate Stairs', id: 640, blockdata: 0 }, '3684412': { name: 'Polished Deepslate Wall', id: 641, blockdata: 0 }, '3750201': { name: 'Deepslate Tiles', id: 642, blockdata: 0 }, '3750202': { name: 'Deepslate Tile Slab', id: 643, blockdata: 0 }, '3750203': { name: 'Deepslate Tile Stairs', id: 644, blockdata: 0 }, '3750204': { name: 'Deepslate Tile Wall', id: 645, blockdata: 0 }, '3815993': { name: 'Deepslate Bricks', id: 646, blockdata: 0 }, '3815994': { name: 'Deepslate Brick Slab', id: 647, blockdata: 0 }, '3815995': { name: 'Deepslate Brick Stairs', id: 648, blockdata: 0 }, '3815996': { name: 'Deepslate Brick Wall', id: 649, blockdata: 0 }, '3553080': { name: 'Chiseled Deepslate', id: 650, blockdata: 0 }, '3618621': { name: 'Cobbled Deepslate Double Slab', id: 651, blockdata: 0 }, '3684413': { name: 'Polished Deepslate Double Slab', id: 652, blockdata: 0 }, '3750205': { name: 'Deepslate Tile Double Slab', id: 653, blockdata: 0 }, '3815997': { name: 'Deepslate Brick Double Slab', id: 654, blockdata: 0 }, '280233': { name: 'Deepslate Lapis Lazuli Ore', id: 655, blockdata: 0 }, '14335265': { name: 'Deepslate Iron Ore', id: 656, blockdata: 0 }, '16053819': { name: 'Deepslate Gold Ore', id: 657, blockdata: 0 }, '11151144': { name: 'Deepslate Redstone Ore', id: 658, blockdata: 0 }, '11151145': { name: 'Glowing Deepslate Redstone Ore', id: 659, blockdata: 0 }, '7789528': { name: 'Deepslate Diamond Ore', id: 660, blockdata: 0 }, '5197648': { name: 'Deepslate Coal Ore', id: 661, blockdata: 0 }, '7786621': { name: 'Deepslate Emerald Ore', id: 662, blockdata: 0 }, '12083010': { name: 'Deepslate Copper Ore', id: 663, blockdata: 0 }, '3750206': { name: 'Cracked Deepslate Tiles', id: 664, blockdata: 0 }, '3815998': { name: 'Cracked Deepslate Bricks', id: 665, blockdata: 0 }, '7833464': { name: 'Glow Lichen', id: 666, blockdata: 0 }, '13741412': { name: 'Candle', id: 667, blockdata: 0 }, '904668': { name: 'White Candle', id: 668, blockdata: 0 }, '14318909': { name: 'Orange Candle', id: 669, blockdata: 0 }, '11686075': { name: 'Magenta Candle', id: 670, blockdata: 0 }, '6982344': { name: 'Light Blue Candle', id: 671, blockdata: 0 }, '11576870': { name: 'Yellow Candle', id: 672, blockdata: 0 }, '4238903': { name: 'Lime Candle', id: 673, blockdata: 0 }, '13599896': { name: 'Pink Candle', id: 674, blockdata: 0 }, '4145215': { name: 'Gray Candle', id: 675, blockdata: 0 }, '10068384': { name: 'Light Gray Candle', id: 676, blockdata: 0 }, '2977416': { name: 'Cyan Candle', id: 677, blockdata: 0 }, '8207796': { name: 'Purple Candle', id: 678, blockdata: 0 }, '2963596': { name: 'Blue Candle', id: 679, blockdata: 0 }, '5059102': { name: 'Brown Candle', id: 680, blockdata: 0 }, '3425818': { name: 'Green Candle', id: 681, blockdata: 0 }, '9778223': { name: 'Red Candle', id: 682, blockdata: 0 }, '1578517': { name: 'Black Candle', id: 683, blockdata: 0 }, '13675877': { name: 'Cake with Candle', id: 684, blockdata: 0 }, '904669': { name: 'Cake with White Candle', id: 685, blockdata: 0 }, '14318910': { name: 'Cake with Orange Candle', id: 686, blockdata: 0 }, '11686076': { name: 'Cake with Magenta Candle', id: 687, blockdata: 0 }, '6982345': { name: 'Cake with Light Blue Candle', id: 688, blockdata: 0 }, '11576871': { name: 'Cake with Yellow Candle', id: 689, blockdata: 0 }, '4238904': { name: 'Cake with Lime Candle', id: 690, blockdata: 0 }, '13599897': { name: 'Cake with Pink Candle', id: 691, blockdata: 0 }, '4145216': { name: 'Cake with Gray Candle', id: 692, blockdata: 0 }, '10068385': { name: 'Cake with Light Gray Candle', id: 693, blockdata: 0 }, '2977417': { name: 'Cake with Cyan Candle', id: 694, blockdata: 0 }, '8207797': { name: 'Cake with Purple Candle', id: 695, blockdata: 0 }, '2963597': { name: 'Cake with Blue Candle', id: 696, blockdata: 0 }, '5124639': { name: 'Cake with Brown Candle', id: 697, blockdata: 0 }, '3425819': { name: 'Cake with Green Candle', id: 698, blockdata: 0 }, '9778224': { name: 'Cake with Red Candle', id: 699, blockdata: 0 }, '1578518': { name: 'Cake with Black Candle', id: 700, blockdata: 0 }, '6726794': { name: 'Waxed Oxidized Copper', id: 701, blockdata: 0 }, '6726795': { name: 'Waxed Oxidized Cut Copper', id: 702, blockdata: 0 }, '6726796': { name: 'Waxed Oxidized Cut Copper Stairs', id: 703, blockdata: 0 }, '6726797': { name: 'Waxed Oxidized Cut Copper Slab', id: 704, blockdata: 0 }, '6726798': { name: 'Waxed Oxidized Double Cut Copper Slab', id: 705, blockdata: 0 }, '9138524': { name: 'Block of Raw Iron', id: 706, blockdata: 0 }, '12148800': { name: 'Block of Raw Copper', id: 707, blockdata: 0 }, '12292905': { name: 'Block of Raw Gold', id: 708, blockdata: 0 }, '4671304': { name: 'Infested Deepslate', id: 709, blockdata: 0 }, '16711935': { name: '*UNKNOWN BLOCK*', id: -1, blockdata: 0 } }; // a lookup table for identifying biomes in the web app // key is color (decimal), value is biome name // hacky? it sure is! var biomeColorLUT = { '9147101': { name: 'Ocean', id: 0 }, '2069822': { name: 'Plains', id: 1 }, '15590790': { name: 'Desert', id: 2 }, '10526880': { name: 'Extreme Hills', id: 3 }, '1592606': { name: 'Forest', id: 4 }, '8367740': { name: 'Taiga', id: 5 }, '6898280': { name: 'Swampland', id: 6 }, '6383257': { name: 'River', id: 7 }, '10485760': { name: 'Hell', id: 8 }, '13750922': { name: 'The End', id: 9 }, '849389': { name: 'Frozen Ocean', id: 10 }, '11267563': { name: 'Frozen River', id: 11 }, '15790320': { name: 'Snowy Tundra', id: 12 }, '14737632': { name: 'Snowy Mountains', id: 13 }, '16718876': { name: 'Mushroom Fields', id: 14 }, '16732240': { name: 'Mushroom Fields Shore', id: 15 }, '16765822': { name: 'Beach', id: 16 }, '14077283': { name: 'Desert Hills', id: 17 }, '3040565': { name: 'Wooded Hills', id: 18 }, '9350540': { name: 'Taiga Hills', id: 19 }, '9474192': { name: 'Mountain Edge', id: 20 }, '304414': { name: 'Jungle', id: 21 }, '224276': { name: 'Jungle Hills', id: 22 }, '2206520': { name: 'Jungle Edge', id: 23 }, '3556568': { name: 'Deep Ocean', id: 24 }, '8421504': { name: 'Stone Shoew', id: 25 }, '14737663': { name: 'Snowy Beach', id: 26 }, '9107855': { name: 'Birch Forest', id: 27 }, '9495188': { name: 'Birch Forest Hills', id: 28 }, '2063139': { name: 'Dark Forest', id: 29 }, '13684976': { name: 'Snowy Taiga', id: 30 }, '10526912': { name: 'Snowy Taiga Hills', id: 31 }, '4536586': { name: 'Giant Tree Taiga', id: 32 }, '7758875': { name: 'Giant Tree Taiga Hills', id: 33 }, '11579568': { name: 'Wooded Mountains', id: 34 }, '8434207': { name: 'Savanna', id: 35 }, '10143048': { name: 'Savanna Plateau', id: 36 }, '12014162': { name: 'Badlands', id: 37 }, '12019302': { name: 'Wooded Badlands Plateau', id: 38 }, '12088436': { name: 'Badlands Plateau', id: 39 }, '13815677': { name: 'Small End Islands', id: 40 }, '11183952': { name: 'End Midlands', id: 41 }, '3556569': { name: 'Ocean', id: 42 }, '3556570': { name: 'Legacy Frozen Ocean', id: 43 }, '8620766': { name: 'Warm Ocean', id: 44 }, '6779083': { name: 'Lukewarm Ocean', id: 45 }, '10594001': { name: 'Cold Ocean', id: 46 }, '1844875': { name: 'Deep Warm Ocean', id: 47 }, '2634664': { name: 'Deep Lukewarm Ocean', id: 48 }, '8093611': { name: 'Deep Cold Ocean', id: 49 }, '11053758': { name: 'Deep Frozen Ocean', id: 50 }, '2105376': { name: 'The Void', id: 127 }, '3125073': { name: 'Plains M', id: 128 }, '16314668': { name: 'Sunflower Plains', id: 129 }, '12104304': { name: 'Desert Lakes', id: 130 }, '12632256': { name: 'Gravelly Mountains', id: 131 }, '16615740': { name: 'Flower Forest', id: 132 }, '8700544': { name: 'Taiga Mountains', id: 133 }, '9659286': { name: 'Swamp Hills', id: 134 }, '184317': { name: 'Ice Spikes', id: 140 }, '1369910': { name: 'Modified Jungle', id: 149 }, '3856980': { name: 'Modified Jungle Edge', id: 151 }, '10347168': { name: 'Tall Birch Forest', id: 155 }, '8633221': { name: 'Tall Birch Hills', id: 156 }, '1413146': { name: 'Dark Forest Hills', id: 157 }, '9474224': { name: 'Snowy Taiga Mountains', id: 158 }, '5474893': { name: 'Giant Spruce Taiga', id: 160 }, '5729364': { name: 'Giant Spruce Taiga Hills', id: 161 }, '13684944': { name: 'Gravelly Mountains+', id: 162 }, '9876062': { name: 'Shattered Savana', id: 163 }, '8361554': { name: 'Shattered Savanna Plateau', id: 164 }, '13730691': { name: 'Eroded Badlands', id: 165 }, '13734546': { name: 'Modified Wooded Badlands Plateau', id: 166 }, '12091006': { name: 'Modified Badlands Plateau', id: 167 }, '5820580': { name: 'Bamboo Jungle', id: 168 }, '2140022': { name: 'Bamboo Jungle Hills', id: 169 }, '4798252': { name: 'Soul Sand Valley', id: 170 }, '5380112': { name: 'Crimson Forest', id: 171 }, '1128501': { name: 'Warped Forest', id: 172 }, '1779250': { name: 'Basalt Deltas', id: 173 }, '4798252': { name: 'Soul Sand Valley x', id: 178 }, '5380112': { name: 'Crimson Forest x', id: 179 }, '1128501': { name: 'Warped Forest x', id: 180 }, '1779250': { name: 'Basalt Deltas x', id: 181 }, '16711935': { name: '*UNKNOWN BIOME*', id: -1 } }; // lut for inventory items var imageIconLUT = { '92': 'images/bedrock_viz.block.1.0.png', '8': 'images/bedrock_viz.block.111.0.png', '18': 'images/bedrock_viz.block.12.0.png', '61': 'images/bedrock_viz.block.120.0.png', '112': 'images/bedrock_viz.block.121.0.png', '110': 'images/bedrock_viz.block.123.0.png', '7': 'images/bedrock_viz.block.13.0.png', '104': 'images/bedrock_viz.block.134.0.png', '101': 'images/bedrock_viz.block.135.0.png', '68': 'images/bedrock_viz.block.143.0.png', '91': 'images/bedrock_viz.block.148.0.png', '47': 'images/bedrock_viz.block.152.0.png', '59': 'images/bedrock_viz.block.155.0.png', '77': 'images/bedrock_viz.block.156.0.png', '100': 'images/bedrock_viz.block.158.0.png', '46': 'images/bedrock_viz.block.159.0.png', '96': 'images/bedrock_viz.block.164.0.png', '89': 'images/bedrock_viz.block.167.0.png', '63': 'images/bedrock_viz.block.171.0.png', '15': 'images/bedrock_viz.block.175.0.png', '76': 'images/bedrock_viz.block.2.0.png', '73': 'images/bedrock_viz.block.20.0.png', '106': 'images/bedrock_viz.block.23.0.png', '102': 'images/bedrock_viz.block.24.0.png', '103': 'images/bedrock_viz.block.25.0.png', '48': 'images/bedrock_viz.block.27.0.png', '87': 'images/bedrock_viz.block.28.0.png', '90': 'images/bedrock_viz.block.3.0.png', '69': 'images/bedrock_viz.block.35.0.png', '25': 'images/bedrock_viz.block.37.0.png', '16': 'images/bedrock_viz.block.38.0.png', '17': 'images/bedrock_viz.block.39.0.png', '84': 'images/bedrock_viz.block.40.0.png', '88': 'images/bedrock_viz.block.43.0.png', '60': 'images/bedrock_viz.block.44.0.png', '109': 'images/bedrock_viz.block.49.0.png', '72': 'images/bedrock_viz.block.5.0.png', '55': 'images/bedrock_viz.block.50.0.png', '97': 'images/bedrock_viz.block.53.0.png', '105': 'images/bedrock_viz.block.54.0.png', '67': 'images/bedrock_viz.block.57.0.png', '113': 'images/bedrock_viz.block.6.0.png', '95': 'images/bedrock_viz.block.61.0.png', '11': 'images/bedrock_viz.block.66.0.png', '99': 'images/bedrock_viz.block.69.0.png', '98': 'images/bedrock_viz.block.70.0.png', '94': 'images/bedrock_viz.block.85.0.png', '93': 'images/bedrock_viz.block.98.0.png', '80': 'images/bedrock_viz.item.256.0.png', '81': 'images/bedrock_viz.item.257.0.png', '114': 'images/bedrock_viz.item.258.0.png', '9': 'images/bedrock_viz.item.261.0.png', '50': 'images/bedrock_viz.item.262.0.png', '20': 'images/bedrock_viz.item.263.0.png', '6': 'images/bedrock_viz.item.265.0.png', '41': 'images/bedrock_viz.item.266.0.png', '82': 'images/bedrock_viz.item.276.0.png', '83': 'images/bedrock_viz.item.278.0.png', '53': 'images/bedrock_viz.item.281.0.png', '12': 'images/bedrock_viz.item.283.0.png', '3': 'images/bedrock_viz.item.287.0.png', '5': 'images/bedrock_viz.item.289.0.png', '39': 'images/bedrock_viz.item.293.0.png', '10': 'images/bedrock_viz.item.295.0.png', '1': 'images/bedrock_viz.item.296.0.png', '4': 'images/bedrock_viz.item.297.0.png', '26': 'images/bedrock_viz.item.298.0.png', '29': 'images/bedrock_viz.item.299.0.png', '27': 'images/bedrock_viz.item.300.0.png', '28': 'images/bedrock_viz.item.301.0.png', '31': 'images/bedrock_viz.item.302.0.png', '32': 'images/bedrock_viz.item.303.0.png', '33': 'images/bedrock_viz.item.304.0.png', '34': 'images/bedrock_viz.item.305.0.png', '79': 'images/bedrock_viz.item.309.0.png', '35': 'images/bedrock_viz.item.310.0.png', '36': 'images/bedrock_viz.item.311.0.png', '37': 'images/bedrock_viz.item.312.0.png', '38': 'images/bedrock_viz.item.313.0.png', '42': 'images/bedrock_viz.item.314.0.png', '43': 'images/bedrock_viz.item.315.0.png', '44': 'images/bedrock_viz.item.316.0.png', '45': 'images/bedrock_viz.item.317.0.png', '22': 'images/bedrock_viz.item.322.0.png', '75': 'images/bedrock_viz.item.324.0.png', '2': 'images/bedrock_viz.item.325.0.png', '86': 'images/bedrock_viz.item.328.0.png', '23': 'images/bedrock_viz.item.329.0.png', '111': 'images/bedrock_viz.item.330.0.png', '40': 'images/bedrock_viz.item.331.0.png', '65': 'images/bedrock_viz.item.334.0.png', '56': 'images/bedrock_viz.item.335.0.png', '52': 'images/bedrock_viz.item.338.0.png', '51': 'images/bedrock_viz.item.339.0.png', '57': 'images/bedrock_viz.item.340.0.png', '13': 'images/bedrock_viz.item.344.0.png', '24': 'images/bedrock_viz.item.352.0.png', '54': 'images/bedrock_viz.item.353.0.png', '62': 'images/bedrock_viz.item.355.0.png', '107': 'images/bedrock_viz.item.356.0.png', '30': 'images/bedrock_viz.item.361.0.png', '49': 'images/bedrock_viz.item.362.0.png', '66': 'images/bedrock_viz.item.363.0.png', '14': 'images/bedrock_viz.item.364.0.png', '70': 'images/bedrock_viz.item.365.0.png', '21': 'images/bedrock_viz.item.367.0.png', '58': 'images/bedrock_viz.item.375.0.png', '74': 'images/bedrock_viz.item.380.0.png', '78': 'images/bedrock_viz.item.381.0.png', '115': 'images/bedrock_viz.item.388.0.png', '71': 'images/bedrock_viz.item.389.0.png', '85': 'images/bedrock_viz.item.391.0.png', '19': 'images/bedrock_viz.item.403.0.png', '64': 'images/bedrock_viz.item.428.0.png', '108': 'images/bedrock_viz.item.431.0.png', '-1': ''};
/* Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or https://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'clipboard', 'es', { copy: 'Copiar', copyError: 'La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de copiado.\r\nPor favor use el teclado (Ctrl/Cmd+C).', cut: 'Cortar', cutError: 'La configuración de seguridad de este navegador no permite la ejecución automática de operaciones de cortado.\r\nPor favor use el teclado (Ctrl/Cmd+X).', paste: 'Pegar', pasteNotification: 'Your browser doesn\'t allow you to paste this way. Press %1 to paste.' // MISSING } );
import { call, cancelled, take, put } from 'redux-saga/effects'; import { actionTypes } from '../constants'; import fulfillGetAuthenticatedUser from '../actions/fulfillGetAuthenticatedUser'; import rejectGetAuthenticatedUser from '../actions/rejectGetAuthenticatedUser'; import rejectLogin from '../actions/rejectLogin'; import Policy from '../Policy'; import authRoles from '../utils/authRoles'; export default function* loginFlow(authenticator) { yield call([authenticator, 'showLogin']); const { accessToken } = yield take(actionTypes.LOGIN_ACCEPTED); try { const user = yield call([authenticator, 'getUser'], accessToken); const policy = new Policy(authRoles.get()); yield put(fulfillGetAuthenticatedUser(user, policy, accessToken)); yield call([authenticator, 'hideLogin']); yield call([authenticator, 'checkUserIdle']); } catch (e) { yield put(rejectGetAuthenticatedUser(e)); yield put(rejectLogin(e)); } finally { if (yield cancelled()) { const cancelError = new Error('login cancelled'); yield put(rejectGetAuthenticatedUser(cancelError)); yield put(rejectLogin(cancelError)); } } }
module.exports = new Date(1996, 4, 23)
import { fetcher } from '@/lib/fetch' import useSWR from 'swr' export function useCurrentUser() { return useSWR('/api/user', fetcher) } export function useUser(id) { return useSWR(`/api/users/${id}`, fetcher) }
/** @jsx jsx */ import { jsx, Image, Link } from "theme-ui" import adpub from "../images/adpub.png" import logoparcbit from "../images/logoparcbit.svg" import logocentrebit from "../images/logocentrebit.svg" import apte from "../images/apte.png" const Footer = () => { return ( <footer sx={{ display: "flex", flexWrap: "wrap", alignItems: "center", justifyContent: "center", p: 2, variant: "styles.footer", }} > <Link href="https://www.fundaciobit.org" sx={{ variant: "links.navlink", p: 2, mx: 4, }} > <Image src={adpub} sx={{ width: 100 }} alt="Conselleria d'Administracions Públiques i Modernització" /> </Link> <Link href="https://www.parcbit.es" sx={{ variant: "links.navlink", p: 2, mx: 4, }} > <Image src={logoparcbit} sx={{ height: 50 }} alt="Parc Bit" /> </Link> <Link href="https://www.fundaciobit.org/centrebit-menorca-cat/" sx={{ variant: "links.navlink", p: 2, mx: 4, }} > <Image src={logocentrebit} sx={{ height: 50 }} alt="Centre Bit" /> </Link> <Link href="https://www.apte.org" sx={{ variant: "links.navlink", p: 2, mx: 4, }} > <Image src={apte} sx={{ width: 100 }} alt="APTE" /> </Link> </footer> ) } export default Footer
import React, { Component } from "react"; import { Animated, Dimensions, Easing, StyleSheet } from "react-native"; import { createStackNavigator } from "react-navigation"; import MapScreen from "./MapScreen"; import MapOrgDetail from "./MapOrgDetail"; import Icon from "react-native-vector-icons/MaterialCommunityIcons"; import _ from "lodash"; import MapPetDetail from "./MapPetDetail"; import { BlurView } from "expo"; const AnimatedBlurView = Animated.createAnimatedComponent(BlurView); const { width: SCREEN_WIDTH } = Dimensions.get("window"); class MapWrapper extends Component { constructor(props) { super(props); this.state = { drawerOpen: false, anime_drawerOpen: new Animated.Value(0) }; this.anime_drawerOpen = Animated.timing(this.state.anime_drawerOpen, { toValue: 300, duration: 300, easing: Easing.linear }); this.anime_drawerOpen2 = Animated.timing(this.state.anime_drawerOpen, { toValue: 0, duration: 300, easing: Easing.linear }); } static navigationOptions = { drawerLockMode: "locked-closed", header: null }; static getDerivedStateFromProps(props, state) { if (_.get(props, "navigation.state.params.from") === "mapWrapper") { console.log("wrapper drawer close"); return { drawerOpen: false }; } return null; } componentDidUpdate(prevProps, prevState) { if (this.state.drawerOpen === true && this.state.drawerOpen !== prevState.drawerOpen) { this.props.navigation.openDrawer(); this.anime_drawerOpen.start(this.state.anime_drawerOpen.setValue(0)); } if (this.state.drawerOpen === false && this.state.drawerOpen !== prevState.drawerOpen) { this.props.navigation.closeDrawer(); this.anime_drawerOpen2.start(this.state.anime_drawerOpen.setValue(300)); } } openDrawer = () => { this.setState({ drawerOpen: true }); }; render() { const Map = createStackNavigator({ mapScreen: { screen: MapScreen, navigationOptions: { //header: null, headerTransparent: true, headerStyle: { borderBottomWidth: 0 }, headerLeft: ( <Icon name="file-tree" size={30} style={{ backgroundColor:'#3e3e3e',color:'white',marginLeft: 20,padding:4 }} onPress={() => { this.setState({ drawerOpen: true }); this.props.navigation.openDrawer(); }} /> ), tabBarIcon: ({ tintColor }) => { return <Icon name="favorite-border" color={tintColor} size={20} type="materialicons" />; } } }, mapPetDetail: {screen: MapPetDetail,}, mapOrgDetail:{screen:MapOrgDetail} }); const drawerScale = this.state.anime_drawerOpen.interpolate({ inputRange: [0, 300], outputRange: [1, 0.7], extrapolate: "clamp" }); const drawerLeft = this.state.anime_drawerOpen.interpolate({ inputRange: [0, 300], outputRange: [0, SCREEN_WIDTH * 0.7], extrapolate: "clamp" }); const drawerBlur = this.state.anime_drawerOpen.interpolate({ inputRange: [0, 300], outputRange: [0, 80], extrapolate: "clamp" }); return ( <Animated.View style={{ flex: 1, transform: [{ scale: drawerScale }, { translateX: drawerLeft}] }}> <Map /> <AnimatedBlurView tint="default" intensity={this.state.drawerOpen ? 90 : 0} style={[StyleSheet.absoluteFill, { display: this.state.drawerOpen ? "flex" : "none" }]} /> </Animated.View> ); } } export default MapWrapper;
const transportProxy = require('./dist/index') const env = process.env transportProxy({ host: env.host || 'localhost', port: env.port || 8888, proxy: env.proxy || '' })
/** * @file SimpleUploads plugin for CKEditor * Version: 4.3.17 * Uploads pasted images and files inside the editor to the server for Firefox and Chrome * Feature introduced in: https://bugzilla.mozilla.org/show_bug.cgi?id=490879 * doesn't include images inside HTML (paste from word). IE11 does. https://bugzilla.mozilla.org/show_bug.cgi?id=665341 * Includes Drag&Drop file uploads for all the new browsers. * Two toolbar buttons to perform quick upload of files. * Copyright (C) 2012-15 Alfonso Martínez de Lizarrondo * improvements: allow d&d between 2 editors in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=454832 */ /* globals CKEDITOR */ (function() { 'use strict'; // Wrapper to use window.alert or editor.showNotification if CKEditor supports it function showMessage(editor, msg) { //argh http://dev.ckeditor.com/ticket/13862 var dialog = CKEDITOR.dialog.getCurrent(); if (!dialog && editor.showNotification) editor.showNotification( msg.replace(/\r\n/, '<br>'), 'warning' ); else alert( msg ); } // If the selected image is a bmp converts it to a png function convertToBmp(ev) { var data = ev.data, isBmp = /\.bmp$/.test(data.name); if (!isBmp) return; var img = data.image; var canvas = document.createElement('canvas'); canvas.width = img.width; canvas.height = img.height; var ctx = canvas.getContext('2d'); ctx.drawImage(img, 0, 0); data.file = canvas.toDataURL('image/png'); data.name = data.name.replace(/\.bmp$/, '.png'); } // Verifies if the selected image is within the allowed dimensions function checkDimension(ev) { var data = ev.data, editor = ev.editor, config = editor.config, maximum = config.simpleuploads_maximumDimensions; var img = data.image; if (maximum.width && img.width > maximum.width) { showMessage( editor, editor.lang.simpleuploads.imageTooWide ); ev.cancel(); return; } if (maximum.height && img.height > maximum.height) { showMessage( editor, editor.lang.simpleuploads.imageTooTall ); ev.cancel(); return; } } // Custom rule similar to the fake Object to avoid generating anything if the user tries to do something strange while a file is being uploaded var htmlFilterRules = { elements: { $: function( element ) { var attributes = element.attributes, className = attributes && attributes[ 'class' ]; // remove our wrappers if ( className == 'SimpleUploadsTmpWrapper' ) return false; } } }; // CSS that we add to the editor for our internal styling function getEditorCss( config ) { var imgUpload = 'span.SimpleUploadsTmpWrapper>span { top: 50%; margin-top: -0.5em; width: 100%; text-align: center; color: #fff; ' + 'text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5); font-size: 50px; font-family: Calibri,Arial,Sans-serif; pointer-events: none; ' + 'position: absolute; display: inline-block;}'; if (config.simpleuploads_hideImageProgress) imgUpload = 'span.SimpleUploadsTmpWrapper { color:#333; background-color:#fff; padding:4px; border:1px solid #EEE;}'; return '.SimpleUploadsOverEditor { ' + (config.simpleuploads_editorover || 'box-shadow: 0 0 10px 1px #999999 inset !important;') + ' }' + 'a.SimpleUploadsTmpWrapper { color:#333; background-color:#fff; padding:4px; border:1px solid #EEE;}' + '.SimpleUploadsTmpWrapper { display: inline-block; position: relative; pointer-events: none;}' + imgUpload + '.uploadRect {display: inline-block;height: 0.9em;vertical-align: middle;width: 20px;}' + '.uploadRect span {background-color: #999;display: inline-block;height: 100%;vertical-align: top;}' + '.SimpleUploadsTmpWrapper .uploadCancel { background-color: #333333;border-radius: 0.5em;color: #FFFFFF;cursor: pointer !important;' + 'display: inline-block;height: 1em;line-height: 0.8em;margin-left: 4px;padding-left: 0.18em;pointer-events: auto;' + 'position: relative; text-decoration:none; top: -2px;width: 0.7em;}' + '.SimpleUploadsTmpWrapper span uploadCancel { width:1em; padding-left:0}'; } var filePicker, filePickerEditor, filePickerForceLink; var IEUpload_fileName, IEUpload_caller, IEUpload_callback, IEUpload_forImage; function PickAndSendFile(editor, forImage, caller, callback) { if (IEUpload_fileName) { showMessage( editor, 'Please, wait to finish the current upload' ); return; } filePickerForceLink = !forImage; filePickerEditor = editor; if (typeof FormData == 'undefined') { // old IE var iframe = document.getElementById('simpleUploadsTarget'); if (!iframe) { iframe = document.createElement('iframe'); iframe.style.display = 'none'; iframe.id = 'simpleUploadsTarget'; document.body.appendChild(iframe); } IEUpload_caller = caller; IEUpload_callback = callback; IEUpload_forImage = forImage; var fnNumber = editor._.simpleuploadsFormUploadFn; var fnInitPicker = editor._.simpleuploadsFormInitFn; if (!fnNumber) { editor._.simpleuploadsFormUploadFn = fnNumber = CKEDITOR.tools.addFunction( setUrl, editor ); editor._.simpleuploadsFormInitFn = fnInitPicker = CKEDITOR.tools.addFunction( function() { window.setTimeout(function() { var picker = document.getElementById('simpleUploadsTarget').contentWindow.document.getElementById( getUploadInputName(editor) ); picker.onchange = function() { var evdata = { name: this.value, url: this.form.action, context : IEUpload_caller, id: 'IEUpload', requiresImage: IEUpload_forImage }; // , mode : {type : 'selectedFileIE'} // Remove C:\FakePath\ var m = evdata.name.match(/\\([^\\]*)$/); if (m) evdata.name = m[1]; var result = filePickerEditor.fire('simpleuploads.startUpload', evdata ); // in v3 cancel() returns true and in v4 returns false // if not canceled it's the evdata object if ( typeof result == 'boolean' ) return; if (evdata.requiresImage && !CKEDITOR.plugins.simpleuploads.isImageExtension(filePickerEditor, evdata.name)) { showMessage( editor, filePickerEditor.lang.simpleuploads.nonImageExtension ); return; } if (IEUpload_callback && IEUpload_callback.start) IEUpload_callback.start( evdata ); IEUpload_fileName = this.value; this.form.action = evdata.url; // Add extra fields if provided if (evdata.extraFields) { var obj = evdata.extraFields; var doc = this.ownerDocument; for (var prop in obj) { if ( obj.hasOwnProperty( prop ) ) { var field = doc.createElement('input'); field.type = 'hidden'; field.name = prop; field.value = obj[prop]; this.form.appendChild(field); } } } this.form.submit(); }; picker.click(); }, 100); }, editor); editor.on( 'destroy', function() { CKEDITOR.tools.removeFunction( this._.simpleuploadsFormUploadFn ); CKEDITOR.tools.removeFunction( this._.simpleuploadsFormInitFn ); } ); } var inputName = getUploadInputName(editor); var form = '<form method="post" enctype="multipart/form-data" action="' + getUploadUrl(editor, fnNumber, forImage) + '">' + '<input type="file" name="' + inputName + '" id="' + inputName + '"></form>'; var src = 'document.open(); document.write("' + form + '");document.close();' + 'window.parent.CKEDITOR.tools.callFunction(' + fnInitPicker + ');'; iframe.src = 'javascript:void(function(){' + encodeURIComponent( src ) + '}())'; // Detect when the file upload ends to check for errors iframe.onreadystatechange = function() { if (iframe.readyState == 'complete') { window.setTimeout(function() { if (IEUpload_fileName) { showMessage( editor, 'The file upload has failed' ); IEUpload_fileName = null; } }, 100); } }; filePicker = null; return; } if (!filePicker) { filePicker = document.createElement('input'); filePicker.type = 'file'; filePicker.style.overflow = 'hidden'; filePicker.style.width = '1px'; filePicker.style.height = '1px'; filePicker.style.opacity = 0.1; filePicker.multiple = 'multiple'; // to trick jQueryUI filePicker.position = 'absolute'; filePicker.zIndex = 1000; document.body.appendChild(filePicker); filePicker.addEventListener('change', function() { var count = filePicker.files.length; if (!count) return; // Create Undo image filePickerEditor.fire( 'saveSnapshot' ); for (var i = 0; i < count; i++) { var file = filePicker.files[i], evData = CKEDITOR.tools.extend({}, filePicker.simpleUploadData); evData.file = file; evData.name = file.name; evData.id = CKEDITOR.plugins.simpleuploads.getTimeStampId(); evData.forceLink = filePickerForceLink; evData.mode = { type : 'selectedFile', i : i, count : count }; CKEDITOR.plugins.simpleuploads.insertSelectedFile(filePickerEditor, evData); } }); } filePicker.accept = forImage ? '.jpg, .png, .jpeg, .gif, .bmp|images/*' : ''; filePicker.value = ''; filePicker.simpleUploadData = { context : caller, callback : callback, requiresImage : forImage }; // Keep focus on the editor instance. if (CKEDITOR.env.webkit) { var manager = editor.focusManager; if (manager && manager.lock) { manager.lock(); setTimeout( function() { manager.unlock(); }, 500 ); } } filePicker.click(); } /** Returns the URL that will be used for the upload */ function getUploadUrl(editor, functionNumber, forImage) { var url = forImage ? editor.config.filebrowserImageUploadUrl : editor.config.filebrowserUploadUrl; if (url == 'base64') return url; var params = { CKEditor : editor.name, CKEditorFuncNum : functionNumber, langCode : editor.langCode }; return addQueryString( url, params ); } /** Returns the name that should be used for the file upload input */ function getUploadInputName(editor) { return editor.config.simpleuploads_inputname || 'upload'; } function setUrl( fileUrl, msg ) { // The 'msg' argument may be used to pass the error message to the editor. if ( typeof msg == 'string' && msg && !fileUrl) { showMessage( editor, msg ); } var editor = filePickerEditor; editor.fire('simpleuploads.endUpload', { name: IEUpload_fileName, ok: !!fileUrl } ); if (IEUpload_callback) { IEUpload_callback.upload( fileUrl, msg, { context: IEUpload_caller } ); IEUpload_fileName = null; IEUpload_callback = null; IEUpload_caller = null; return; } if ( fileUrl ) { var element, attribute; if (filePickerForceLink) { element = new CKEDITOR.dom.element( 'a', editor.document ); element.setText( fileUrl.match(/\/([^\/]+)$/)[1] ); attribute = 'href'; } else { element = new CKEDITOR.dom.element( 'img', editor.document ); attribute = 'src'; element.on('load', function(e) { e.removeListener(); element.removeListener('error', errorListener); element.setAttribute('width', element.$.width); element.setAttribute('height', element.$.height); editor.fire('simpleuploads.finishedUpload', { name: IEUpload_fileName, element: element } ); }); element.on('error', errorListener, null, { editor: editor, element: element } ); } element.setAttribute(attribute, fileUrl); element.data( 'cke-saved-' + attribute, fileUrl); editor.insertElement(element); if (filePickerForceLink) filePickerEditor.fire('simpleuploads.finishedUpload', { name: IEUpload_fileName, element: element } ); } IEUpload_fileName = null; IEUpload_caller = null; } /** * Adds (additional) arguments to given url. * * @param {String} * url The url. * @param {Object} * params Additional parameters. */ function addQueryString( url, params ) { var queryString = []; if ( !params || !url ) return url; for ( var i in params ) queryString.push( i + '=' + encodeURIComponent( params[ i ] ) ); return url + ( url.indexOf( '?' ) != -1 ? '&' : '?' ) + queryString.join( '&' ); } /** checks if a DOM event includes files checking it cross-browser */ function hasFiles(e) { var ev = e.data.$, data = ev.dataTransfer; if (!data || !data.types) return false; if (data.types.contains && data.types.contains('Files') && !data.types.contains('text/html') ) return true; if (data.types.indexOf && data.types.indexOf( 'Files' ) != -1) return true; return false; } /** Handles the processed response when the image/file has been uploaded */ function receivedUrl(fileUrl, data, editor, el, attribute) { if (el.$.nodeName.toLowerCase() == 'span') { // create the final img, getting rid of the fake div var img; if (data.originalNode) { img = data.originalNode.cloneNode( true ); // reset size img.removeAttribute('width'); img.removeAttribute('height'); img.style.width = ''; img.style.height = ''; img = new CKEDITOR.dom.element( img ); } else { img = new CKEDITOR.dom.element( 'img', editor.document ); } // wait to replace until the image is loaded to prevent flickering img.on('load', function(e) { e.removeListener(); img.removeListener( 'error', errorListener); checkLoadedImage(img, editor, el, data.name); }); img.on('error', errorListener, null, { editor: editor, element: el }); img.data( 'cke-saved-src', fileUrl); img.setAttribute( 'src', fileUrl); // in case the user tries to get the html right now, a little protection el.data('cke-real-element-type', 'img'); el.data('cke-realelement', encodeURIComponent( img.getOuterHtml() )); el.data('cke-real-node-type', CKEDITOR.NODE_ELEMENT); // SVG are buggy in Firefox and IE // replace the image now without waiting to get confirmation if ( /\.svg$/.test(data.name) ) { img.removeAllListeners(); img.replace( el ); editor.fire('simpleuploads.finishedUpload', { name: name, element: img } ); // Correct the Undo image editor.fire( 'updateSnapshot' ); } return; } if (data.originalNode) { var newEl = data.originalNode.cloneNode( true ); el.$.parentNode.replaceChild(newEl, el.$); el = new CKEDITOR.dom.element( newEl ); } else { el.removeAttribute( 'id' ); el.removeAttribute( 'class' ); el.removeAttribute( 'contentEditable' ); el.setHtml( el.getFirst().getHtml() ); } el.data( 'cke-saved-' + attribute, fileUrl); el.setAttribute( attribute, fileUrl); editor.fire('simpleuploads.finishedUpload', { name: data.name, element: el } ); } // store a reference of the native URL object because the CodeCog latex editor overwrites it // http://www.codecogs.com/pages/forums/pagegen.php?id=2803 var nativeURL = window.URL || window.webkitURL; CKEDITOR.plugins.add( 'simpleuploads', { requires : [ 'filebrowser' ], lang : 'en,ar,cs,de,es,fr,he,hu,it,ja,ko,nl,pl,pt-br,ru,tr,zh-cn',// 'en' the first one to use it as default icons: 'addfile,addimage', // %REMOVE_LINE_CORE% onLoad : function() { // In v4 this setting is global for all instances: CKEDITOR.addCss( getEditorCss(CKEDITOR.config) ); // CSS for container var node = CKEDITOR.document.getHead().append( 'style' ); node.setAttribute( 'type', 'text/css' ); var content = '.SimpleUploadsOverContainer {' + (CKEDITOR.config.simpleuploads_containerover || 'box-shadow: 0 0 10px 1px #99DD99 !important;') + '} ' + '.SimpleUploadsOverDialog {' + (CKEDITOR.config.simpleuploads_dialogover || 'box-shadow: 0 0 10px 4px #999999 inset !important;') + '} ' + '.SimpleUploadsOverCover {' + (CKEDITOR.config.simpleuploads_coverover || 'box-shadow: 0 0 10px 4px #99DD99 !important;') + '} '; // Inject the throbber styles in the page: // If this were part of the official code it should be placed in the dialog.css skin // We must specify the .cke_throbber for the inner divs or the reset css won't allow to use the background-color content += [ '.cke_throbber {margin: 0 auto; width: 100px;}', '.cke_throbber div {float: left; width: 8px; height: 9px; margin-left: 2px; margin-right: 2px; font-size: 1px;}', '.cke_throbber .cke_throbber_1 {background-color: #737357;}', '.cke_throbber .cke_throbber_2 {background-color: #8f8f73;}', '.cke_throbber .cke_throbber_3 {background-color: #abab8f;}', '.cke_throbber .cke_throbber_4 {background-color: #c7c7ab;}', '.cke_throbber .cke_throbber_5 {background-color: #e3e3c7;}', '.uploadRect {display: inline-block;height: 11px;vertical-align: middle;width: 50px;}', '.uploadRect span {background-color: #999;display: inline-block;height: 100%;vertical-align: top;}', '.uploadName {display: inline-block;max-width: 180px;overflow: hidden;text-overflow: ellipsis;vertical-align: top;white-space: pre;}', '.uploadText {font-size:80%;}', '.cke_throbberMain a {cursor: pointer; font-size: 14px; font-weight:bold; padding: 4px 5px;position: absolute;right:0; text-decoration:none; top: -2px;}', '.cke_throbberMain {background-color: #FFF; border:1px solid #e5e5e5; padding:4px 14px 4px 4px; min-width:250px; position:absolute;}' ] .join(' '); if ( CKEDITOR.env.ie && CKEDITOR.env.version < 11) node.$.styleSheet.cssText = content; else node.$.innerHTML = content; }, init : function( editor ) { var config = editor.config; if (typeof config.simpleuploads_imageExtensions == 'undefined') config.simpleuploads_imageExtensions = 'jpe?g|gif|png'; // if not defined specifically for images, reuse the default file upload url if (!config.filebrowserImageUploadUrl) config.filebrowserImageUploadUrl = config.filebrowserUploadUrl; if (!config.filebrowserUploadUrl && !config.filebrowserImageUploadUrl) { /*eslint-disable no-console */ if (window.console && console.log) { console.log('The editor is missing the "config.filebrowserUploadUrl" entry to know the URL that will handle uploaded files.\r\n' + 'It should handle the posted file as shown in Example 3: http://docs.ckeditor.com/#!/guide/dev_file_browser_api-section-example-3 \r\n' + 'More info: http://alfonsoml.blogspot.com/2009/12/using-your-own-uploader-in-ckeditor.html'); console[ console.warn ? 'warn' : 'log' ]('The "SimpleUploads" plugin now is disabled.'); } /*eslint-enable no-console */ return; } // if upload URL is set to base64 data urls then exit if the browser doesn't support the file reader api if (config.filebrowserImageUploadUrl == 'base64' && typeof FormData == 'undefined') return; // v 4.1 filters if (editor.addFeature) { editor.addFeature( { allowedContent: 'img[!src,width,height];a[!href];span[id](SimpleUploadsTmpWrapper);' } ); } // Manages the throbber animation that appears to show a lengthy operation CKEDITOR.dialog.prototype.showThrobber = function() { if (!this.throbber) { this.throbber = { update : function() { var throbberParent = this.throbberParent.$, throbberBlocks = throbberParent.childNodes, lastClass = throbberParent.lastChild.className; // From the last to the second one, copy the class from the previous one. for ( var i = throbberBlocks.length - 1 ; i > 0 ; i-- ) throbberBlocks[i].className = throbberBlocks[i - 1].className ; // For the first one, copy the last class (rotation). throbberBlocks[0].className = lastClass ; }, create: function( dialog ) { if (this.throbberCover) return; var cover = CKEDITOR.dom.element.createFromHtml( '<div style="background-color:rgba(255,255,255,0.95);width:100%;height:100%;top:0;left:0; position:absolute; visibility:none;z-index:100;"></div>'); dialog.parts.close.setStyle('z-index', 101); // IE8 if (CKEDITOR.env.ie && CKEDITOR.env.version < 9) { cover.setStyle('zoom', 1); cover.setStyle('filter', 'progid:DXImageTransform.Microsoft.gradient(startColorstr=#EEFFFFFF,endColorstr=#EEFFFFFF)'); } cover.appendTo(dialog.parts.dialog); this.throbberCover = cover; //dialog.throbberCover = cover; var mainThrobber = new CKEDITOR.dom.element('div'); this.mainThrobber = mainThrobber; var throbberParent = new CKEDITOR.dom.element('div'); this.throbberParent = throbberParent; var throbberTitle = new CKEDITOR.dom.element('div'); this.throbberTitle = throbberTitle; cover.append(mainThrobber).addClass('cke_throbberMain'); mainThrobber.append(throbberTitle).addClass('cke_throbberTitle'); mainThrobber.append(throbberParent).addClass('cke_throbber'); // Create the throbber blocks. var classIds = [ 1,2,3,4,5,4,3,2 ] ; while ( classIds.length > 0 ) throbberParent.append( new CKEDITOR.dom.element('div') ).addClass('cke_throbber_' + classIds.shift()) ; this.center(); // Protection if the dialog is closed without removing the throbber dialog.on('hide', this.hide, this); }, center : function() { var mainThrobber = this.mainThrobber, cover = this.throbberCover; // Center the throbber var x = ( cover.$.offsetWidth - mainThrobber.$.offsetWidth ) / 2, y = ( cover.$.offsetHeight - mainThrobber.$.offsetHeight ) / 2; mainThrobber.setStyle( 'left', x.toFixed() + 'px' ); mainThrobber.setStyle( 'top', y.toFixed() + 'px' ); }, show : function() { this.create(CKEDITOR.dialog.getCurrent()); this.throbberCover.setStyle('visibility', ''); // Setup the animation interval. this.timer = setInterval( CKEDITOR.tools.bind(this.update, this), 100 ) ; }, hide : function() { if ( this.timer ) { clearInterval( this.timer ) ; this.timer = null ; } if (!this.throbberCover) return; this.throbberCover.setStyle('visibility', 'hidden'); } }; } this.throbber.show(); }; // Add a listener to check file size and valid extensions editor.on( 'simpleuploads.startUpload' , function(ev) { var editor = ev.editor, config = editor.config, file = ev.data && ev.data.file; if (config.simpleuploads_maxFileSize && file && file.size && file.size > config.simpleuploads_maxFileSize ) { showMessage( editor, editor.lang.simpleuploads.fileTooBig ); ev.cancel(); } var name = ev.data.name; if (config.simpleuploads_invalidExtensions) { var reInvalid = new RegExp( '\.(?:' + config.simpleuploads_invalidExtensions + ')$', 'i'); if ( reInvalid.test( name ) ) { showMessage( editor, editor.lang.simpleuploads.invalidExtension ); ev.cancel(); } } if (config.simpleuploads_acceptedExtensions) { var reAccepted = new RegExp( '\.(?:' + config.simpleuploads_acceptedExtensions + ')$', 'i'); if ( !reAccepted.test( name ) ) { var txt = editor.lang.simpleuploads.nonAcceptedExtension.replace('%0', config.simpleuploads_acceptedExtensions); showMessage( editor, txt ); ev.cancel(); } } }); // Special listener that captures uploads of images and if there's some listener set for 'simpleuploads.localImageReady' // event, prepare an image with the local data (to check dimensions, convert between formats, resize...) editor.on( 'simpleuploads.startUpload' , function(ev) { var data = ev.data, editor = ev.editor; // If this function has already pre-processed the file, exit. if (data.image) return; // Handle here only images if (data.forceLink || !CKEDITOR.plugins.simpleuploads.isImageExtension(editor, data.name)) return; // If the mode hasn't been set (picked files in IE8), don't process the data if (!data.mode || !data.mode.type) return; // As this forces an asynchronous callback use it only when there's a listener set. if (!editor.hasListeners( 'simpleuploads.localImageReady' )) return; // Cancel the default processing ev.cancel(); if (data.mode.type == 'base64paste') { // to handle multiple images in IE11, insert a marker for each one. // we add our class so it won't remain if it's rejected in another step var idTmp = CKEDITOR.plugins.simpleuploads.getTimeStampId(); data.result = '<span id="' + idTmp + '" class="SimpleUploadsTmpWrapper" style="display:none">&nbsp;</span>'; data.mode.id = idTmp; } var img = new Image; img.onload = function() { var evData = CKEDITOR.tools.extend({}, data); evData.image = img; var result = editor.fire('simpleuploads.localImageReady', evData); // in v3 cancel() returns true and in v4 returns false // if not canceled it's the evdata object if ( typeof result == 'boolean' ) return; CKEDITOR.plugins.simpleuploads.insertProcessedFile(editor, evData); }; if (typeof data.file == 'string') img.src = data.file; // base64 encoded else img.src = nativeURL.createObjectURL( data.file ); // FileReader }); // Setup listeners if the config specifies that they should be used if (config.simpleuploads_convertBmp) editor.on( 'simpleuploads.localImageReady', convertToBmp); if (config.simpleuploads_maximumDimensions) editor.on( 'simpleuploads.localImageReady', checkDimension); // workaround for image2 support editor.on( 'simpleuploads.finishedUpload', function(ev) { if (editor.widgets && editor.plugins.image2) { var element = ev.data.element; if (element.getName() == 'img') { var widget = editor.widgets.getByElement(element); if (widget) { widget.data.src = element.data( 'cke-saved-src' ); widget.data.width = element.$.width; widget.data.height = element.$.height; } else { // They have renamed the widget after the initial release :-( // Let's try with both, one of them will work editor.widgets.initOn(element, 'image2'); editor.widgets.initOn(element, 'image'); } } } }); // Paste from clipboard: editor.on( 'paste', function(e) { var pasteData = e.data, html = pasteData.html || ( pasteData.type && pasteData.type == 'html' && pasteData.dataValue); if (!html) return; // strip out webkit-fake-url as they are useless: if (CKEDITOR.env.webkit && html.indexOf('webkit-fake-url') > 0 ) { showMessage( editor, 'Sorry, the images pasted with Safari aren\'t usable' ); window.open('https://bugs.webkit.org/show_bug.cgi?id=49141'); html = html.replace( /<img src="webkit-fake-url:.*?">/g, ''); } // Handles image pasting in Firefox // Replace data: images in Firefox and upload them. // No longer required with Firefox 22 html = html.replace( /<img(.*?) src="data:image\/.{3,4};base64,.*?"(.*?)>/g, function( img ) { if (!editor.config.filebrowserImageUploadUrl) return ''; var match = img.match(/"(data:image\/(.{3,4});base64,.*?)"/), imgData = match[1], type = match[2].toLowerCase(), id = CKEDITOR.plugins.simpleuploads.getTimeStampId(); // If it's too small then leave it as is. if (imgData.length < 128) return img; if (type == 'jpeg') type = 'jpg'; var fileName = id + '.' + type, uploadData = { context : 'pastedimage', name : fileName, id : id, forceLink : false, file : imgData, mode : { type: 'base64paste' } }; if (!uploadFile(editor, uploadData)) return uploadData.result; var animation = uploadData.element, content = animation.$.innerHTML; animation.$.innerHTML = '&nbsp;'; // only once editor.on( 'afterPaste' , function( ev ) { ev.removeListener(); var span = editor.document.$.getElementById(id); if (!span) return; // fight against ACF in v4.1 and IE11, insert svg afterwards span.innerHTML = content; setupCancelButton( editor, uploadData ); } ); return animation.getOuterHtml(); }); if (e.data.html) e.data.html = html; else e.data.dataValue = html; }); var avoidBadUndo = function(e) { if (editor.mode != 'wysiwyg') return; var root = editor.editable(); // detect now if the contents include our tmp node if (root.$.querySelector( '.SimpleUploadsTmpWrapper') ) { var move = e.name.substr(5).toLowerCase(); // If the user tried to redo but there are no more saved images forward and this is a bad image, move back instead. if ( move == 'redo' && editor.getCommand(move).state == CKEDITOR.TRISTATE_DISABLED ) move = 'undo'; // Move one extra step back/forward editor.execCommand( move ); } }; // on dev mode plugins might not load in the right order with empty cache var cmd = editor.getCommand('undo'); if (cmd) cmd.on('afterUndo', avoidBadUndo ); cmd = editor.getCommand('redo'); if (cmd) editor.getCommand('redo').on('afterRedo', avoidBadUndo ); // http://dev.ckeditor.com/ticket/10101 editor.on('afterUndo', avoidBadUndo ); editor.on('afterRedo', avoidBadUndo ); // Buttons to launch the file picker easily // Files editor.addCommand( 'addFile', { exec: function( editor ) { PickAndSendFile(editor, false, this); } }); editor.ui.addButton( 'addFile', { label: editor.lang.simpleuploads.addFile, command: 'addFile', icon : this.path + 'icons/addfile.png', // %REMOVE_LINE_CORE% toolbar: 'insert', allowedContent : 'a[!href];span[id](SimpleUploadsTmpWrapper);', requiredContent : 'a[href]' }); // Images editor.addCommand( 'addImage', { exec: function( editor ) { PickAndSendFile(editor, true, this); } }); editor.ui.addButton( 'addImage', { label: editor.lang.simpleuploads.addImage, command: 'addImage', icon : this.path + 'icons/addimage.png', // %REMOVE_LINE_CORE% toolbar: 'insert', allowedContent : 'img[!src,width,height];span[id](SimpleUploadsTmpWrapper);', requiredContent : 'img[src]' }); if (typeof FormData == 'undefined') return; var root, visibleRoot, pasteRoot; var minX = -1, minY, maxX, maxY; // Hint in the main document var mainMinX = -1, mainMinY, mainMaxX, mainMaxY; var removeBaseHighlight = function() { var dialog = CKEDITOR.dialog.getCurrent(); if ( dialog ) { var div = dialog.parts.title.getParent(); div.removeClass( 'SimpleUploadsOverCover' ); } else { editor.container.removeClass( 'SimpleUploadsOverContainer' ); } }; editor.on( 'destroy', function() { CKEDITOR.removeListener( 'simpleuploads.droppedFile', removeBaseHighlight); CKEDITOR.document.removeListener( 'dragenter', CKEDITORdragenter); CKEDITOR.document.removeListener( 'dragleave', CKEDITORdragleave); domUnload(); }); var domUnload = function() { if (!root || !root.removeListener) return; pasteRoot.removeListener( 'paste', pasteListener); root.removeListener( 'dragenter', rootDragEnter); root.removeListener( 'dragleave', rootDragLeave); root.removeListener( 'dragover', rootDragOver); root.removeListener( 'drop', rootDropListener); pasteRoot = null; root = null; visibleRoot = null; }; CKEDITOR.on( 'simpleuploads.droppedFile', removeBaseHighlight); var CKEDITORdragenter = function(e) { if (mainMinX == -1) { if (!hasFiles(e)) return; var dialog = CKEDITOR.dialog.getCurrent(); if ( dialog ) { if (!dialog.handleFileDrop) return; var div = dialog.parts.title.getParent(); div.addClass( 'SimpleUploadsOverCover' ); } else { if (!editor.readOnly) editor.container.addClass( 'SimpleUploadsOverContainer' ); } mainMinX = 0; mainMinY = 0; mainMaxX = CKEDITOR.document.$.body.parentNode.clientWidth; mainMaxY = CKEDITOR.document.$.body.parentNode.clientHeight; } }; var CKEDITORdragleave = function(e) { if ( mainMinX == -1 ) return; var ev = e.data.$; if (ev.clientX <= mainMinX || ev.clientY <= mainMinY || ev.clientX >= mainMaxX || ev.clientY >= mainMaxY) { removeBaseHighlight(); mainMinX = -1; } }; /** Prevent drop outside of the editor if simpleuploads_allowDropOutside is not set */ var CKEDITORdragover = function(e) { if (editor.config.simpleuploads_allowDropOutside) return; if (e.data.$.dataTransfer.dropEffect != 'copy'){ e.data.$.dataTransfer.dropEffect = 'none'; e.data.preventDefault(); return false; } }; CKEDITOR.document.on( 'dragenter', CKEDITORdragenter); CKEDITOR.document.on( 'dragleave', CKEDITORdragleave); CKEDITOR.document.on( 'dragover', CKEDITORdragover); var rootDropListener = function(e) { // editor visibleRoot.removeClass( 'SimpleUploadsOverEditor' ); minX = -1; //container // We fire an event on CKEDITOR so all the instances get notified and remove their class // This is an 'internal' event to the plugin CKEDITOR.fire( 'simpleuploads.droppedFile' ); mainMinX = -1; if (editor.readOnly) { e.data.preventDefault(); return false; } var ev = e.data.$, data = ev.dataTransfer; if ( data && data.files && data.files.length > 0 ) { // Create Undo image editor.fire( 'saveSnapshot' ); // Prevent default insertion e.data.preventDefault(); var dropLocation = { ev : ev, range : false, count : data.files.length, rangeParent : ev.rangeParent, rangeOffset : ev.rangeOffset }; // store the location for IE if (!dropLocation.rangeParent && !document.caretRangeFromPoint) { if (ev.target.nodeName.toLowerCase() != 'img') { var doc = editor.document.$; if ( doc.body.createTextRange ) { var textRange = doc.body.createTextRange(); try { textRange.moveToPoint( ev.clientX, ev.clientY ); dropLocation.range = textRange; } catch (ex) {} // eslint-disable-line no-empty } } } for ( var i = 0; i < data.files.length; i++) { var file = data.files[ i ], id = CKEDITOR.tools.getNextId(), fileName = file.name, evData = { context : ev, name : fileName, file : file, forceLink : ev.shiftKey, // If shift is pressed, create a link even if the drop is an image id : id, mode : { type : 'droppedFile', dropLocation: dropLocation } }; CKEDITOR.plugins.simpleuploads.insertDroppedFile(editor, evData); } } }; var rootDragEnter = function(e) { if (minX == -1) { if (!hasFiles(e)) return; if (!editor.readOnly) visibleRoot.addClass( 'SimpleUploadsOverEditor' ); var rect = visibleRoot.$.getBoundingClientRect(); minX = rect.left; minY = rect.top; maxX = minX + visibleRoot.$.clientWidth; maxY = minY + visibleRoot.$.clientHeight; } }; var rootDragLeave = function(e) { if ( minX == -1 ) return; var ev = e.data.$; if (ev.clientX <= minX || ev.clientY <= minY || ev.clientX >= maxX || ev.clientY >= maxY) { visibleRoot.removeClass( 'SimpleUploadsOverEditor' ); minX = -1; } }; var rootDragOver = function(e) { if (minX != -1 ) { if (editor.readOnly) { e.data.$.dataTransfer.dropEffect = 'none'; e.data.preventDefault(); return false; } // Show Copy instead of Move. Works for Chrome and Firefox // IE10 don't respect it // https://connect.microsoft.com/IE/feedback/details/1940667 e.data.$.dataTransfer.dropEffect = 'copy'; // IE always requires this // Chrome almost fixed the requirement, but it's required if the body is a single line and the user drops below it. if (!CKEDITOR.env.gecko) e.data.preventDefault(); } }; // drag & drop, paste editor.on( 'contentDom', function( /*ev*/ ) { root = editor.document; visibleRoot = root.getBody().getParent(); // v4 inline editing // ELEMENT_MODE_INLINE if (editor.elementMode == 3 ) { root = editor.editable(); visibleRoot = root; } // v4 divArea if ( editor.elementMode == 1 && 'divarea' in editor.plugins ) { root = editor.editable(); visibleRoot = root; } pasteRoot = editor.editable(); // Special case for IE in forcePasteAsPlainText: // CKEditor uses the beforepaste event to move the target, but we can't use that to check for files, // so in that case, set a listener on the document on each paste if (CKEDITOR.env.ie && CKEDITOR.env.version >= 11 && editor.config.forcePasteAsPlainText && editor.editable().isInline()) { // Is an editable instance, so let's use attachListener here pasteRoot.attachListener(pasteRoot, 'beforepaste', function( /*bpEv*/ ) { // Only once, so we can check always which editor the paste belongs to editor.document.on( 'paste', function( pEv ) { pEv.removeListener(); // redirect the original data to our paste listener pasteListener(pEv); }, null, { editor : editor }); }); } else { // For everyone else, use the normal paste event pasteRoot.on( 'paste', pasteListener, null, { editor : editor }, 8); } root.on( 'dragenter', rootDragEnter); root.on( 'dragleave', rootDragLeave); root.on( 'dragover', rootDragOver); root.on( 'drop', rootDropListener); }); editor.on( 'contentDomUnload', domUnload); editor.plugins.fileDropHandler = { addTarget : function( target, callback ) { target.on( 'dragenter', function(e) { if (minX == -1) { if (!hasFiles(e)) return; target.addClass( 'SimpleUploadsOverDialog' ); var rect = target.$.getBoundingClientRect(); minX = rect.left; minY = rect.top; maxX = minX + target.$.clientWidth; maxY = minY + target.$.clientHeight; } }); target.on( 'dragleave', function(e) { if ( minX == -1 ) return; var ev = e.data.$; if (ev.clientX <= minX || ev.clientY <= minY || ev.clientX >= maxX || ev.clientY >= maxY) { target.removeClass( 'SimpleUploadsOverDialog' ); minX = -1; } }); target.on( 'dragover', function(e) { if (minX != -1 ) { // Show Copy instead of Move. Works for Chrome and Firefox // IE10 don't respect it // https://connect.microsoft.com/IE/feedback/details/1940667 e.data.$.dataTransfer.dropEffect = 'copy'; // preventDefault with stopPropagation to avoid CKEditor 4.5 messing with the dialog // http://dev.ckeditor.com/ticket/13184 e.data.preventDefault( true ); } }); target.on( 'drop', function(e) { target.removeClass( 'SimpleUploadsOverDialog' ); minX = -1; //container // We fire an event on CKEDITOR so all the instances get notified and remove their class // This is an 'internal' event to the plugin CKEDITOR.fire( 'simpleuploads.droppedFile' ); mainMinX = -1; var ev = e.data.$, data = ev.dataTransfer; if ( data && data.files && data.files.length > 0 ) { // Prevent default insertion e.data.preventDefault(); // only one var maximum = 1; // If the element allows multiple files, use all of them if (callback.multiple) maximum = data.files.length; for ( var i = 0; i < maximum; i++) { var file = data.files[ i ]; var evData = { context : ev, name : file.name, file : file, id : CKEDITOR.tools.getNextId(), forceLink : false, callback : callback, mode : { type: 'callback' } }; CKEDITOR.plugins.simpleuploads.processFileWithCallback( editor, evData ); } } }); } }; }, //Init afterInit: function( editor ) { var dataProcessor = editor.dataProcessor, htmlFilter = dataProcessor && dataProcessor.htmlFilter; if ( htmlFilter ) htmlFilter.addRules( htmlFilterRules , { applyToAll :true } ); } } ); // API CKEDITOR.plugins.simpleuploads = { getTimeStampId : (function() { var counter = 0; return function() { counter++; return (new Date()).toISOString().replace(/\..*/, '').replace(/\D/g, '_') + counter; }; })(), isImageExtension: function(editor, filename) { if (!editor.config.simpleuploads_imageExtensions) return false; var imageRegexp = new RegExp( '\.(?:' + editor.config.simpleuploads_imageExtensions + ')$', 'i'); return imageRegexp.test( filename ); }, // Main entry point for callbacks insertProcessedFile: function(editor, evData) { evData.element = null; evData.id = this.getTimeStampId(); // new id var that = this; switch (evData.mode.type) { case 'selectedFile': window.setTimeout( function() { that.insertSelectedFile( editor, evData ); }, 50); break; case 'pastedFile': this.insertPastedFile( editor, evData ); break; case 'callback': window.setTimeout( function() { that.processFileWithCallback( editor, evData ); }, 50); break; case 'droppedFile': this.insertDroppedFile( editor, evData ); break; case 'base64paste': this.insertBase64File( editor, evData ); break; default: showMessage( editor, 'Error, no valid type in callback ' + evData.mode); break; } }, // Insert a file from the toolbar buttons insertSelectedFile: function(editor, evData) { var mode = evData.mode, i = mode.i, count = mode.count; // Upload the file if (!uploadFile( editor, evData )) return; var element = evData.element; if (!element) return; if (count == 1) { var selection = editor.getSelection(), selected = selection.getSelectedElement(), originalNode; // If it's just one image and the user has another one selected, replace it if (selected && selected.getName() == 'img' && element.getName() == 'span') { originalNode = selected.$; } // Image2 widget if (editor.widgets) { var focused = editor.widgets.focused; if (focused && focused.wrapper.equals(selected)) { originalNode = selected.$.querySelector('img'); } } // a link if (element.getName() == 'a') { var parent = selected, ranges = selection.getRanges(), range = ranges && ranges[0]; if (!parent) { if (ranges && ranges.length == 1) { parent = range.startContainer.$; if (parent.nodeType == document.TEXT_NODE) parent = parent.parentNode; } } while ( parent && parent.nodeType == document.ELEMENT_NODE && parent.nodeName.toLowerCase() != 'a' ) parent = parent.parentNode; if ( parent && parent.nodeName && parent.nodeName.toLowerCase() == 'a' ) { originalNode = parent; } // there was no link, check the best way to create one: // create a link if (!originalNode && range && (selected || !range.collapsed) ) { var style = new CKEDITOR.style({ element: 'a', attributes: { href:'#' } } ); style.type = CKEDITOR.STYLE_INLINE; // need to override... dunno why. style.applyToRange( range ); parent = range.startContainer.$; if (parent.nodeType == document.TEXT_NODE) parent = parent.parentNode; originalNode = parent; } } if (originalNode) { originalNode.parentNode.replaceChild(element.$, originalNode); evData.originalNode = originalNode; editor.fire( 'saveSnapshot' ); return; } } // insert a space between links if (i > 0 && element.getName() == 'a') editor.insertHtml('&nbsp;'); editor.insertElement(element); setupCancelButton( editor, evData ); }, // Insert a file that has been pasted into the content (as File) insertPastedFile: function(editor, evData) { // Upload the file if (!uploadFile( editor, evData )) return; var element = evData.element; var dialog = evData.mode.dialog; if (dialog) { editor.fire( 'updateSnapshot' ); editor.insertElement(element); editor.fire( 'updateSnapshot' ); } else { // Insert in the correct position after the pastebin has been removed var processElement = function() { // Check if there's a valid selection or if it's the pastebin var ranges = editor.getSelection().getRanges(); if (!ranges.length) { // Put back in the queue window.setTimeout(processElement, 0); return; } // verify that it has really been removed if (editor.editable().$.querySelector('#cke_pastebin')) { // Put back in the queue window.setTimeout(processElement, 0); return; } editor.fire( 'updateSnapshot' ); editor.insertElement(element); editor.fire( 'updateSnapshot' ); setupCancelButton( editor, evData ); }; window.setTimeout(processElement, 0); } }, // The evData includes a callback that takes care of everything (a file dropped in a dialog) processFileWithCallback: function(editor, evData) { uploadFile( editor, evData ); }, insertDroppedFile: function(editor, evData) { if (!uploadFile( editor, evData )) return; var element = evData.element; var dropLocation = evData.mode.dropLocation, range = dropLocation.range, ev = dropLocation.ev, count = dropLocation.count; // if we're adding several links, add a space between them if ( range && element.getName() == 'a' ) { if ( range.pasteHTML ) range.pasteHTML( '&nbsp;' ); // simple space doesn't work else range.insertNode( editor.document.$.createTextNode( ' ' ) ); } var target = ev.target; if (!range) { var doc = editor.document.$; // Move to insertion point /* standard way: only implemented in Firefox 20 if (document.caretPositionFromPoint) { var caret = document.caretPositionFromPoint(ev.pageX, ev.pageY), textNode = caret.offsetNode, offset = caret.offset; } */ // Firefox, custom properties in event. if ( dropLocation.rangeParent ) { // it seems that they aren't preserved in the ev after resending back the info var node = dropLocation.rangeParent, offset = dropLocation.rangeOffset; range = doc.createRange(); range.setStart( node, offset ); range.collapse( true ); } else { // Webkit, old documentView API if ( document.caretRangeFromPoint ) { range = doc.caretRangeFromPoint( ev.clientX, ev.clientY ); } else { // IE if (target.nodeName.toLowerCase() == 'img') { range = doc.createRange(); range.selectNode(target); } else { if ( document.body.createTextRange ) { var textRange = doc.body.createTextRange(); try { textRange.moveToPoint( ev.clientX, ev.clientY ); /* // Convert to W3C range: var node = textRange.parentElement(); var start = Math.abs( textRange.duplicate().moveStart('character', -1000000) ); var r = textRange.duplicate(); r.moveToElementText( node ); r.collapse(); var start2 = Math.abs( r.moveStart('character', -1000000) ); range = doc.createRange(); range.setStart( node.firstChild, start - start2 ); range.collapse( true ); */ range = textRange; } catch (ex) { range = doc.createRange(); range.setStartAfter( doc.body.lastChild ); range.collapse( true ); } } } } } dropLocation.range = range; } var elementName = element.getName(), handled = false; if ( count == 1 ) { if (target.nodeName.toLowerCase() == 'img' && elementName == 'span' ) { target.parentNode.replaceChild(element.$, target); evData.originalNode = target; handled = true; } if ( elementName == 'a' ) { var start; if (range.startContainer) { start = range.startContainer; if (start.nodeType == document.TEXT_NODE) { start = start.parentNode; } else { if (range.startOffset < start.childNodes.length) start = start.childNodes[ range.startOffset ]; } } else start = range.parentElement(); if (!start || target.nodeName.toLowerCase() == 'img') start = target; var parent = start; while ( parent && parent.nodeType == document.ELEMENT_NODE && parent.nodeName.toLowerCase() != 'a' ) parent = parent.parentNode; if ( parent && parent.nodeName && parent.nodeName.toLowerCase() == 'a' ) { parent.parentNode.replaceChild(element.$, parent); evData.originalNode = parent; handled = true; } // dropping on an image without a parent link if ( !handled && start.nodeName.toLowerCase() == 'img' ) { parent = start.ownerDocument.createElement('a'); parent.href = '#'; start.parentNode.replaceChild(parent, start); parent.appendChild(start); parent.parentNode.replaceChild(element.$, parent); evData.originalNode = parent; handled = true; } } } if (!handled) { if (range) { if ( range.pasteHTML ) range.pasteHTML( element.$.outerHTML ); else range.insertNode( element.$ ); } else editor.insertElement( element ); } setupCancelButton( editor, evData ); editor.fire( 'saveSnapshot' ); }, insertBase64File: function(editor, evData) { delete evData.result; var id = evData.mode.id; var tmp = editor.document.getById(id); if (!uploadFile(editor, evData)) { tmp.remove(); if (evData.result) editor.insertHTML(evData.result); return; } editor.getSelection().selectElement(tmp); editor.insertElement(evData.element); setupCancelButton( editor, evData ); } }; // Creates the element, but doesn't insert it function createPreview(editor, data) { var isImage = CKEDITOR.plugins.simpleuploads.isImageExtension( editor, data.name ), showImageProgress = !editor.config.simpleuploads_hideImageProgress, element; // Create and insert our element if ( !data.forceLink && isImage && showImageProgress) { element = createSVGAnimation(data.file, data.id, editor); } else { if ( isImage && !data.forceLink ) element = new CKEDITOR.dom.element( 'span', editor.document ); else element = new CKEDITOR.dom.element( 'a', editor.document ); element.setAttribute( 'id', data.id ); element.setAttribute( 'class', 'SimpleUploadsTmpWrapper'); //element.setText( data.name ); var html = '<span class="uploadName">' + data.name + '</span>' + ' <span class="uploadRect"><span id="rect' + data.id + '"></span></span>' + ' <span id="text' + data.id + '" class="uploadText"> </span><span class="uploadCancel">x</span>'; element.setHtml(html); } // Prevent selection handles in IE element.setAttribute( 'contentEditable', false ); data.element = element; } function errorListener(e) { var data = e.listenerData, editor = data.editor, element = data.element; e.removeListener(); showMessage( editor, 'Failed to load the image with the provided URL: "' + e.sender.data( 'cke-saved-src') + '"' ); element.remove(); } function checkLoadedImage(img, editor, el, name) { if (img.$.naturalWidth === 0) { // when replacing an image, IE might fire the load event, but it still uses the old data window.setTimeout( function() {checkLoadedImage(img, editor, el, name);}, 50); return; } img.replace( el ); img.setAttribute('width', img.$.width); img.setAttribute('height', img.$.height); editor.fire('simpleuploads.finishedUpload', { name: name, element: img } ); // Correct the Undo image editor.fire( 'updateSnapshot' ); } // Sets up a XHR object to handle the upload function createXHRupload(editor, data) { var isImage = CKEDITOR.plugins.simpleuploads.isImageExtension( editor, data.name ), attribute = 'href', forImage = false; if ( !data.forceLink && isImage ) { attribute = 'src'; forImage = true; } if (data.callback) data.callback.setup(data); if (!data.url) data.url = getUploadUrl(editor, 2, forImage); if (data.requiresImage && !isImage) { showMessage( editor, editor.lang.simpleuploads.nonImageExtension ); return null; } var result = editor.fire('simpleuploads.startUpload', data); // in v3 cancel() returns true and in v4 returns false // if not canceled it's the data object, so let's use that. if ( typeof result == 'boolean' ) return null; if (!data.url) return null; // instead of uploading, use base64 encoded data if (data.url == 'base64') { if (typeof data.file == 'string') { setTimeout( function() { var fileUrl = data.file, id = data.id, el = editor.document.getById( id ); receivedUrl(fileUrl, data, editor, el, attribute); }, 100); return {}; } var reader = new FileReader(); reader.onload = function() { setTimeout( function() { var fileUrl = reader.result, id = data.id, el = editor.document.getById( id ); receivedUrl(fileUrl, data, editor, el, attribute); }, 100); }; reader.readAsDataURL( data.file ); return {}; } var xhr = new XMLHttpRequest(), target = xhr.upload; // nice progress effect. Opera used to lack xhr.upload if ( target ) { target.onprogress = function( evt ) { updateProgress(editor, data.id, evt); }; } data.xhr = xhr; // Upload the file xhr.open('POST', data.url ); xhr.onload = function() { var id = data.id, el = editor.document.getById( id ), fileUrl, msg; // final update updateProgress(editor, id, null); // Correct the Undo image editor.fire( 'updateSnapshot' ); var evtData = { xhr: xhr, data: data, element:el }; var result = editor.fire('simpleuploads.serverResponse', evtData); // in v3 cancel() returns true and in v4 returns false // if not canceled it's the evdata object if ( typeof result == 'boolean' ) return; // if the listener has Cancelled the event, exit and we suppose that it took care of everything by itself. // Check if the event has been listened and performed its own parsing if (typeof evtData.url == 'undefined') { // try to check if the response is in JSON format http://docs.ckeditor.com/#!/guide/dev_file_upload try { var o = JSON.parse( xhr.responseText ); if (o && o.url) fileUrl = o.url; if (o && o.error && o.error.message) msg = o.error.message; } catch (ex) { } // eslint-disable-line no-empty if (!fileUrl && !msg) { // old javascript response // Upon finish, get the url and update the file //var parts = xhr.responseText.match(/2,\s*("|')(.*?[^\\]?)\1(?:,\s*\1(.*?[^\\]?)\1)?\s*\)/), //var parts = xhr.responseText.match(/\((?:"|')?\d+(?:"|')?,\s*("|')(.*?[^\\]?)\1(?:,\s*(.*?))?\s*\)\s*;?\s*<\/script>/), var parts = xhr.responseText.match(/\((?:"|')?\d+(?:"|')?,\s*("|')(.*?[^\\]?)\1(?:,\s*(.*?))?\s*\)\s*;?/); fileUrl = parts && parts[2]; msg = parts && parts[3]; // The server response usually is automatically parsed by the js engine, but in this case we get the 'raw content' // and must take care of un-escaping it. // So far I haven't been able to find a single function that does it correctly in all the cases if (fileUrl) { fileUrl = fileUrl.replace(/\\'/g, '\''); // Try to handle URLs with escaped chars like 51-Body/\u00E6\u00F8\u00E5.jpg try { var tmp = JSON.parse('{"url":"' + fileUrl + '"}'); if (tmp && tmp.url) fileUrl = tmp.url; } catch (ex) { } // eslint-disable-line no-empty } if (msg) { // find out if it was a function or a string message: var matchFunction = msg.match(/function\(\)\s*\{(.*)\}/); if (matchFunction) msg = new Function( matchFunction[1] ); else { var first = msg.substring(0,1); if (first == '\'' || first == '"') msg = msg.substring( 1, msg.length - 1 ); } } if (!parts) { msg = 'Error posting the file to ' + data.url + '\r\nInvalid data returned (check console)'; if (window.console) console.log(xhr.responseText); // eslint-disable-line no-console } } } else { fileUrl = evtData.url; msg = ''; } editor.fire('simpleuploads.endUpload', { name: data.name, ok: !!fileUrl, xhr : xhr, data : data } ); if (xhr.status != 200) { if (xhr.status == 413) showMessage( editor, editor.lang.simpleuploads.fileTooBig ); else showMessage( editor, 'Error posting the file to ' + data.url + '\r\nResponse status: ' + xhr.status ); if (window.console) console.log(xhr); // eslint-disable-line no-console } if (data.callback) { if (!fileUrl && msg) { showMessage( editor, msg ); } data.callback.upload(fileUrl, msg, data); return; } // If the element doesn't exists it means that the user has deleted it or pressed undo while uploading // so let's get out if (!el) return; if ( fileUrl ) { receivedUrl(fileUrl, data, editor, el, attribute); } else { if (data.originalNode) el.$.parentNode.replaceChild(data.originalNode, el.$); else el.remove(); if (msg) { showMessage( editor, msg ); } } // Correct undo image editor.fire( 'updateSnapshot' ); }; xhr.onerror = function(e) { showMessage( editor, 'Error posting the file to ' + data.url ); if (window.console) console.log(e); // eslint-disable-line no-console var el = editor.document.getById( data.id ); if (el) { if (data.originalNode) el.$.parentNode.replaceChild(data.originalNode, el.$); else el.remove(); } // Correct undo image editor.fire( 'updateSnapshot' ); }; xhr.onabort = function() { if (data.callback) { data.callback.upload(null); return; } var el = editor.document.getById( data.id ); if (el) { if (data.originalNode) el.$.parentNode.replaceChild(data.originalNode, el.$); else el.remove(); } // Correct undo image editor.fire( 'updateSnapshot' ); }; // CORS https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS xhr.withCredentials = true; return xhr; } // Takes care of uploading the file using XHR function uploadFile(editor, data) { if (!data.callback) createPreview(editor, data); var xhr = createXHRupload(editor, data); if (!xhr) { data.result = data.result || ''; return false; } // FileReader if (!xhr.send) return true; if (data.callback && data.callback.start) data.callback.start(data); var inputName = data.inputName || getUploadInputName(editor); if (typeof data.file == 'string') sendBase64File( data, xhr, inputName); else sendBlobFile( data, xhr, inputName); return true; } function sendBlobFile(data, xhr, inputName) { var formdata = new FormData(); formdata.append( inputName, data.file, data.name ); // Add extra fields if provided if (data.extraFields) { var obj = data.extraFields; for (var prop in obj) { if ( obj.hasOwnProperty( prop ) ) formdata.append( prop, obj[prop] ); } } if (data.extraHeaders) { var headers = data.extraHeaders; for (var header in headers) { if ( headers.hasOwnProperty( header )) { xhr.setRequestHeader(header, headers[header]); } } } xhr.send( formdata ); } function sendBase64File(data, xhr, inputName) { // Create the multipart data upload. var BOUNDARY = '---------------------------1966284435497298061834782736', rn = '\r\n', req = '--' + BOUNDARY, type = data.name.match(/\.(\w+)$/)[1]; req += rn + 'Content-Disposition: form-data; name="' + inputName + '"; filename="' + data.name + '"'; req += rn + 'Content-type: image/' + type; req += rn + rn + window.atob( data.file.split(',')[1] ); req += rn + '--' + BOUNDARY; // Add extra fields if provided if (data.extraFields) { var obj = data.extraFields; for (var prop in obj) { req += rn + 'Content-Disposition: form-data; name="' + unescape(encodeURIComponent( prop )).replace(/=/g, '\\=') + '"'; req += rn + rn + unescape(encodeURIComponent( obj[prop] )) ; req += rn + '--' + BOUNDARY; } } req += '--'; xhr.setRequestHeader('Content-Type', 'multipart/form-data; boundary=' + BOUNDARY); var bufferData = new ArrayBuffer(req.length); var ui8a = new Uint8Array(bufferData, 0); for (var i = 0; i < req.length; i++) ui8a[i] = req.charCodeAt(i) & 0xff; xhr.send(ui8a); } function updateProgress(editor, id, evt) { if (!editor.document || !editor.document.$) return; var dialog = CKEDITOR.dialog.getCurrent(); var doc = (dialog ? CKEDITOR : editor ).document.$, rect = doc.getElementById('rect' + id), text = doc.getElementById('text' + id), value, textValue; if ( evt ) { if ( !evt.lengthComputable ) return; value = (100 * evt.loaded / evt.total).toFixed(2) + '%'; textValue = (100 * evt.loaded / evt.total).toFixed() + '%'; } else { textValue = editor.lang.simpleuploads.processing; value = '100%'; /* if (text) { text.parentNode.removeChild(text); text = null; } */ } if (rect) { rect.setAttribute('width', value); rect.style.width = value; if (!evt) { var parent = rect.parentNode; if (parent && parent.className == 'uploadRect') parent.parentNode.removeChild(parent); } } if (text) { text.firstChild.nodeValue = textValue; if (!evt) { // Remove cancel button var sibling = text.nextSibling; if (sibling && sibling.nodeName.toLowerCase() == 'a') sibling.parentNode.removeChild(sibling); } } } // Show a grayscale version of the image that animates toward the full color version function createSVGAnimation( file, id, editor ) { var element = new CKEDITOR.dom.element( 'span', editor.document ), div = element.$, useURL, doc = editor.document.$, span = doc.createElement('span'); element.setAttribute( 'id', id ); element.setAttribute( 'class', 'SimpleUploadsTmpWrapper'); var rectSpan = doc.createElement('span'); rectSpan.setAttribute( 'id' , 'text' + id); rectSpan.appendChild( doc.createTextNode('0 %')); div.appendChild(span); span.appendChild(rectSpan); var cancelSpan = doc.createElement('span'); cancelSpan.appendChild( doc.createTextNode('x')); span.appendChild(cancelSpan); if (typeof file != 'string') { if ( !nativeURL || !nativeURL.revokeObjectURL) return element; useURL = true; } var svg = doc.createElementNS('http://www.w3.org/2000/svg', 'svg'); svg.setAttribute( 'id' , 'svg' + id); // just to find out the image dimensions as they are needed for the svg block var img = doc.createElement( 'img' ); if (useURL) { img.onload = function() { if (this.onload) { nativeURL.revokeObjectURL( this.src ); this.onload = null; } // in IE it's inserted with the HTML, so we can't reuse the svg object var svg = doc.getElementById('svg' + id); if (svg) { svg.setAttribute('width', this.width + 'px'); svg.setAttribute('height', this.height + 'px'); } // Chrome var preview = doc.getElementById(id); if (preview) preview.style.width = this.width + 'px'; }; img.src = nativeURL.createObjectURL( file ); } else { // base64 data, dimensions are available right now in Firefox img.src = file; // extra protection img.onload = function() { this.onload = null; // we're pasting so it's inserted with the HTML, so we can't reuse the svg object var svg = doc.getElementById('svg' + id); if (svg) { svg.setAttribute('width', this.width + 'px'); svg.setAttribute('height', this.height + 'px'); } }; svg.setAttribute('width', img.width + 'px'); svg.setAttribute('height', img.height + 'px'); } div.appendChild(svg); var filter = doc.createElementNS('http://www.w3.org/2000/svg', 'filter'); filter.setAttribute('id', 'SVGdesaturate'); svg.appendChild(filter); var feColorMatrix = doc.createElementNS('http://www.w3.org/2000/svg', 'feColorMatrix'); feColorMatrix.setAttribute('type', 'saturate'); feColorMatrix.setAttribute('values', '0'); filter.appendChild(feColorMatrix); var clipPath = doc.createElementNS('http://www.w3.org/2000/svg', 'clipPath'); clipPath.setAttribute('id', 'SVGprogress' + id); svg.appendChild(clipPath); var rect = doc.createElementNS('http://www.w3.org/2000/svg', 'rect'); rect.setAttribute('id', 'rect' + id); rect.setAttribute('width', '0'); rect.setAttribute('height', '100%'); clipPath.appendChild(rect); var image = doc.createElementNS('http://www.w3.org/2000/svg', 'image'); image.setAttribute('width', '100%'); image.setAttribute('height', '100%'); if (useURL) { image.setAttributeNS('http://www.w3.org/1999/xlink','href', nativeURL.createObjectURL( file )); var loaded = function() { nativeURL.revokeObjectURL( image.getAttributeNS('http://www.w3.org/1999/xlink','href') ); image.removeEventListener( 'load', loaded, false); }; image.addEventListener( 'load', loaded, false); } else image.setAttributeNS('http://www.w3.org/1999/xlink','href', file ); var image2 = image.cloneNode(true); image.setAttribute('filter', 'url(#SVGdesaturate)'); image.style.opacity = '0.5'; svg.appendChild(image); image2.setAttribute('clip-path', 'url(#SVGprogress' + id + ')'); svg.appendChild(image2); return element; } function createSimpleUpload( editor, dialogName, definition, element ) { if (element.type == 'file') return; var filebrowser = element.filebrowser, forImage = dialogName.substr(0,5) == 'image' || filebrowser.requiresImage, targetField = filebrowser.target.split(':'); var callback = { targetField : targetField, multiple : filebrowser.multiple, setup : function(data) { if (!definition.uploadUrl) return; if (forImage) data.requiresImage = true; var params = { CKEditor : editor.name, CKEditorFuncNum : 2, langCode : editor.langCode }; data.url = addQueryString( definition.uploadUrl, params ); }, start : function(data) { var dialog = CKEDITOR.dialog.getCurrent(); dialog.showThrobber(); var throbber = dialog.throbber; if (data.xhr) { var html = '<span class="uploadName">' + data.name + '</span>' + ' <span class="uploadRect"><span id="rect' + data.id + '"></span></span>' + ' <span id="text' + data.id + '" class="uploadText"> </span><a>x</a>'; throbber.throbberTitle.setHtml(html); var cover = throbber.throbberCover; var xhr = data.xhr; if ( cover.timer ) { clearInterval( cover.timer ) ; cover.timer = null ; } throbber.throbberParent.setStyle('display', 'none'); throbber.throbberTitle.getLast().on('click', function() { xhr.abort(); }); // protection to check that the upload isn't pending when forcing to close the dialog dialog.on('hide', function() { if (xhr.readyState == 1) xhr.abort(); }); } throbber.center(); }, upload : function(url, msg, data) { var dialog = CKEDITOR.dialog.getCurrent(); dialog.throbber.hide(); if ( typeof msg == 'function' && msg.call( data.context.sender ) === false ) return; if (filebrowser.onSelect) { if ( filebrowser.onSelect( url, msg, data ) === false ) return; } if (!url) return; dialog.getContentElement( targetField[ 0 ], targetField[ 1 ] ).setValue( url ); dialog.selectPage( targetField[ 0 ] ); } }; if (filebrowser.action == 'QuickUpload') { definition.hasQuickUpload = true; definition.onFileSelect = null; if (!editor.config.simpleuploads_respectDialogUploads) { element.label = forImage ? editor.lang.simpleuploads.addImage : editor.lang.simpleuploads.addFile; element.onClick = function( evt ) { // 'element' here means the definition object, so we need to find the correct // button to scope the event call //var sender = evt.sender; PickAndSendFile(editor, forImage, evt, callback); return false; }; var picker = definition.getContents( element[ 'for' ][ 0 ] ).get( element[ 'for' ][ 1 ] ); picker.hidden = true; } } else { // if the dialog has already been configured with quickUpload there's no need to use the file browser config if (definition.hasQuickUpload) return; if (filebrowser.onSelect) definition.onFileSelect = filebrowser.onSelect; } if (!editor.plugins.fileDropHandler) return; if (filebrowser.action == 'QuickUpload') definition.uploadUrl = filebrowser.url; var original = definition.onShow || function() {}; definition.onShow = CKEDITOR.tools.override( original, function( original ) { return function( e ) { // Revert to the original after first run definition.onShow = original; if ( typeof original == 'function' ) original.call( this, e ); if (filebrowser.action != 'QuickUpload' && definition.hasQuickUpload) return; var dialog = this; if (dialog.handleFileDrop) return; dialog.handleFileDrop = true; dialog.getParentEditor().plugins.fileDropHandler.addTarget( dialog.parts.contents, callback ); }; } ); } // Searches for elements in the dialog definition where we can apply our enhancements function applySimpleUpload( editor, dialogName, definition, elements ) { for ( var i in elements ) { var element = elements[ i ]; // If due to some customization or external library the object isn't valid, skip it. if (!element) continue; if ( element.type == 'hbox' || element.type == 'vbox' || element.type == 'fieldset' ) applySimpleUpload( editor, dialogName, definition, element.children ); if ( element.filebrowser && element.filebrowser.url ) createSimpleUpload( editor, dialogName, definition, element ); } } function setupCancelButton( editor, data ) { var element = editor.document.getById( data.id ); if (!element) return; var links = element.$.getElementsByTagName('a'); if (!links || !links.length) { links = element.$.getElementsByTagName('span'); if (!links || !links.length) return; } for (var i = 0; i < links.length; i++) { var link = links[ i ]; if (link.innerHTML == 'x') { link.className = 'uploadCancel'; link.onclick = function() { if (data.xhr) data.xhr.abort(); }; } } } function pasteListener(e) { var editor = e.listenerData.editor, dialog = e.listenerData.dialog, i, item; // We want IE11 here to embed images as base64 (at least for the moment) // later use them as blob if we aren't in a dialog // In IE11 we use the images at this point only if forcePasteAsPlainText has been set // It doesn't work due to https://connect.microsoft.com/IE/feedback/details/813618/calling-xhr-open-in-a-paste-event-throws-an-access-denied-error var data = (e.data && e.data.$.clipboardData) || (editor.config.forcePasteAsPlainText && window.clipboardData); if (!data) return; // If forcePasteAsPlainText is set, try to detect if we're with Firefox and the clipboard content is only an image if (CKEDITOR.env.gecko && editor.config.forcePasteAsPlainText) { if (data.types.length === 0) { // only once: editor.on( 'beforePaste', function( evt ) { evt.removeListener(); // Force html mode :-) evt.data.type = 'html'; } ); return; } } // Chrome has clipboardData.items. Other browsers don't provide this info at the moment. // Firefox implements clipboardData.files in 22 var items = data.items || data.files; if (!items || !items.length) return; // Check first if there is a text/html or text/plain version, and leave the browser use that: // otherwise, pasting from MS Word to Chrome in Mac will always generate a black rectangle. if (items[0].kind) { for (i = 0; i < items.length; i++) { item = items[i]; if ( item.kind == 'string' && (item.type == 'text/html' || item.type == 'text/plain') ) return; } } // We're safe, stupid Office-Mac combination won't disturb us. for (i = 0; i < items.length; i++) { item = items[i]; if ( item.kind && item.kind != 'file' ) continue; e.data.preventDefault(); var file = item.getAsFile ? item.getAsFile() : item; if (CKEDITOR.env.ie || editor.config.forcePasteAsPlainText) { setTimeout( function() { processPastedFile(file, e); }, 100); } else processPastedFile(file, e); } // autoclose the dialog if (dialog && e.data.$.defaultPrevented) dialog.hide(); } function processPastedFile(file, e) { var editor = e.listenerData.editor, dialog = e.listenerData.dialog; var id = CKEDITOR.plugins.simpleuploads.getTimeStampId(), fileName = file.name || id + '.png', evData = { context : e.data.$, name : fileName, file : file, forceLink : false, id : id, mode : { type : 'pastedFile', dialog : dialog } }; CKEDITOR.plugins.simpleuploads.insertPastedFile(editor, evData); } function setupPasteListener(iframe) { var doc = iframe.getFrameDocument(), body = doc.getBody(); if (!body || !body.$ || (body.$.contentEditable != 'true' && doc.$.designMode != 'on')) { setTimeout(function() { setupPasteListener(iframe);}, 100); return; } var dialog = CKEDITOR.dialog.getCurrent(); doc.on('paste', pasteListener, null, { dialog : dialog, editor : dialog.getParentEditor() }); } CKEDITOR.on( 'dialogDefinition', function( evt ) { if (!evt.editor.plugins.simpleuploads) return; var definition = evt.data.definition; // Associate filebrowser to elements with 'filebrowser' attribute. for ( var i in definition.contents ) { var contents = definition.contents[ i ]; if ( contents ) applySimpleUpload(evt.editor, evt.data.name, definition, contents.elements); } // Detect the Paste dialog if (evt.data.name == 'paste') { definition.onShow = CKEDITOR.tools.override( definition.onShow, function( original ) { return function() { if ( typeof original == 'function' ) original.call( this ); setupPasteListener( this.getContentElement( 'general', 'editing_area' ).getInputElement() ); }; } ); } }, null, null, 30 ); })(); /** * Fired when file starts being uploaded by the 'simpleuploads' plugin * * @since 3.1 * @name CKEDITOR.editor#simpleuploads.startUpload * @event * @param {String} [name] The file name. * @param {String} [url] The url that will be used for the upload. It can be modified to your needs on each upload. * @param {String|Object} [context] Context that caused the upload (a string if it's a pasted image, a DOM event for drag&drop and copied files, the toolbar button for those cases) * @param {Object} [file] The file itself (if available). * @param {Object} [extraFields] Since 3.4.1 the event listener can add this property to indicate extra data to send in the upload as POST data */ /** * Fired when the server sends the response of an upload. * * @since 4.3.6 * @name CKEDITOR.editor#simpleuploads.serverResponse * @event * @param {Object} [xhr] The XHR with the request. * @param {Object} [data] The original data object of this upload. * Upon processing this event, a listener can set a 'url' property on the event.data object and that will tell to the SimpleUploads plugin * that your code has processed the response. * If url is an empty string it means that the upload has failed and that the upload placeholder must be removed silently * Otherwise it will be treated as the response from the server * This way you can use different responses from your server that doesn't follow the QuickUpload pattern, as well as hook any additional processing that * you might need. * Please, note that this is fired only for uploads using XHR, old IEs are excluded and they need the default response from the server. */ /** * Fired when file upload ends on the 'simpleuploads' plugin * * @since 3.1 * @name CKEDITOR.editor#simpleuploads.endUpload * @event * @param {String} [name] The file name. * @param {Boolean} [ok] Whether the file has been correctly uploaded or not * @param {Object} [xhr] The XHR with the request. Since 4.3 * @param {Object} [data] The original data object of this upload. Since 4.3 */ /** * Fired when the final element has been inserted by the 'simpleuploads' plugin (after it has been uploaded) * * @since 3.3.4 * @name CKEDITOR.editor#simpleuploads.finishedUpload * @event * @param {String} [name] The file name. * @param {CKEDITOR.dom.element} [element] The element node that has been inserted */ /** * Fired when an image has been selected, before it's uploaded. It provides a reference to an img element * that contains the selected file. Extends the data provided in the simpleuploads.startUpload event * @since 4.2 * @name CKEDITOR.editor#simpleuploads.localImageReady * @event * @param {Image} [image] The element node that has been inserted */ /** * Class to apply to the editor container (ie: the border outside the editor) when a file is dragged on the page * * CKEDITOR.config.simpleuploads_containerover='border:1px solid red !important;'; * * @since 2.7 * @cfg {String} [simpleuploads_containerover='box-shadow: 0 0 10px 1px #99DD99 !important;'] * @member CKEDITOR.config */ /** * Class to apply to the editor when a file is dragged over it * * CKEDITOR.config.simpleuploads_editorover='background-color:yellow !important;'; * * @since 2.7 * @cfg {String} [simpleuploads_editorover='box-shadow: 0 0 10px 1px #999999 inset !important;'] * @member CKEDITOR.config */ /** * Class to apply to the dialog border/cover when a file is dragged on the page * * CKEDITOR.config.simpleuploads_coverover='border:1px solid red !important;'; * * @since 4.0 * @cfg {String} [simpleuploads_coverover='box-shadow: 0 0 10px 4px #999999 inset !important;'] * @member CKEDITOR.config */ /** * Class to apply to the dialog content when a file is dragged over it * * CKEDITOR.config.simpleuploads_dialogover='border:1px solid red !important;'; * * @since 4.0 * @cfg {String} [simpleuploads_dialogover='box-shadow: 0 0 10px 4px #999999 inset !important;'] * @member CKEDITOR.config */ /** * List of extensions that should be recognized as belonging to image files (ie: a dropped file will be inserted as img instead of link) * * config.simpleuploads_imageExtensions='jpe?g'; * * @since 3.3.3 * @cfg {String} [simpleuploads_imageExtensions='jpe?g|gif|png'] * @member CKEDITOR.config */ /** * Maximum file size to allow the upload. By default there are no restrictions * * config.simpleuploads_maxFileSize=10*1024*1024; // 10 Mb * * @since 3.3.3 * @cfg {Number} [simpleuploads_maxFileSize=null] * @member CKEDITOR.config */ /** * List of extensions that aren't allowed (blacklist) * * config.simpleuploads_invalidExtensions='exe|php'; * * @since 3.3.3 * @cfg {String} [simpleuploads_invalidExtensions=null] * @member CKEDITOR.config */ /** * List of extensions that are accepted (whitelist). If the file doesn't have this extension it will be rejected * * config.simpleuploads_acceptedExtensions='jpg|png|pdf|zip'; * * @since 3.3.3 * @cfg {String} [simpleuploads_acceptedExtensions=null] * @member CKEDITOR.config */ /** * If it's set to true, the plugin won't modify the 'Quick Upload' button in the dialogs * (just in case you are doing some special processing that isn't possible at the moment with the modified system) * (if you have such situation, please, contact me so that I can improve the plugin and allow you to use the plugin for everything) * * config.simpleuploads_respectDialogUploads=true; * * @since 4.0 * @cfg {Boolean} [simpleuploads_respectDialogUploads=null] * @member CKEDITOR.config */ /** * If it's set to true, images will be uploaded without the preview progress, using the plain text upload * * CKEDITOR.config.simpleuploads_hideImageProgress=true; * * @since 4.1 * @cfg {Boolean} [simpleuploads_hideImageProgress=null] * @member CKEDITOR.config */ /** * If it's set to true, bmp images will be converted to png before uploading (you must add the 'bmp' to the list of allowed extensions) * * CKEDITOR.config.simpleuploads_convertBmp=true; * * @since 4.2 * @cfg {Boolean} [simpleuploads_convertBmp=null] * @member CKEDITOR.config */ /** * It's an object that can contain two members: width and height specifying the maximum dimensions (in pixels) allowed for images. * if the image is bigger in any of those dimensions, the upload will be rejected. * * CKEDITOR.config.simpleuploads_maximumDimensions={width:500, height:400}; * * @since 4.2 * @cfg {Object} [simpleuploads_maximumDimensions=null] * @member CKEDITOR.config */ /** * Name of the input sent to the server with the file data * * CKEDITOR.config.simpleuploads_inputname='file'; * * @since 4.3.9 * @cfg {String} [simpleuploads_inputname='upload'] * @member CKEDITOR.config */
shioApp.factory('shSiteResource', [ '$resource', 'shAPIServerService', function($resource, shAPIServerService) { return $resource(shAPIServerService.get().concat('/v2/site/:id'), { id : '@id' }, { update : { method : 'PUT' } }); } ]);
import React, { Component } from 'react'; import TodoItem from '../TodoItem'; class TodoList extends Component { shouldComponentUpdate(nextProps, nextState) { return this.props.todos !== nextProps.todos; } render() { const { todos, onToggle, onRemove } = this.props; const todoList = todos.map( todo => ( <TodoItem key={todo.get('id')} done={todo.get('done')} onToggle={() => onToggle(todo.get('id'))} onRemove={() => onRemove(todo.get('id'))}> {todo.get('text')} </TodoItem> ) ) return( <div> {todoList} </div> ); } } export default TodoList;
import {LightningElement, api, track, wire} from 'lwc'; import {FlowAttributeChangeEvent} from 'lightning/flowSupport'; import {getObjectInfo} from 'lightning/uiObjectInfoApi'; import getObjects from '@salesforce/apex/FieldPickerController.getObjects'; import NonePicklistValueLabel from '@salesforce/label/c.NonePicklistValueLabel'; import FieldIsNotSupportedMessage from '@salesforce/label/c.FieldIsNotSupportedMessage'; export default class pickObjectAndFieldFSC extends LightningElement { @api masterLabel; @api objectLabel = 'Object'; @api fieldLabel = 'Field'; // @api objectType; // @api field; @api availableObjectTypes; @api availableFields; @api disableObjectPicklist = false; @api hideObjectPicklist = false; @api hideFieldPicklist = false; @api displayFieldType = false; @track _objectType; @track _field; @track objectTypes; @track fields; @track errors = []; @track isLoadFinished = false; labels = { none: NonePicklistValueLabel, fieldNotSupported: FieldIsNotSupportedMessage }; @api get objectType(){ return this._objectType; } set objectType(value){ this._objectType = value; } @api get field(){ return this._field; } set field(value){ if(this._objectType){ this._field = value; } } @wire(getObjects, {availableObjectTypes: '$availableObjectTypesList'}) _getObjects({error, data}) { if (error) { this.errors.push(error.body.message); } else if (data) { this.isLoadFinished = true; this.objectTypes = data; } } @wire(getObjectInfo, {objectApiName: '$_objectType'}) _getObjectInfo({error, data}) { if (error) { this.errors.push(error.body[0].message); } else if (data) { let fields = data.fields; let fieldResults = []; for (let field in this.fields = fields) { if (Object.prototype.hasOwnProperty.call(fields, field)) { if (this.isTypeSupported(fields[field])) { fieldResults.push({ label: fields[field].label, value: fields[field].apiName, dataType: fields[field].dataType, required: fields[field].required, updateable: fields[field].updateable, referenceTo: (fields[field].referenceToInfos.length > 0 ? fields[field].referenceToInfos.map(curRef => { return curRef.apiName }) : []) }); } } if (this._field && !Object.prototype.hasOwnProperty.call(fields, this._field)) { this.errors.push(this.labels.fieldNotSupported + this._field); this._field = null; } } this.fields = fieldResults.sort((a, b) => (a.label > b.label) ? 1 : ((b.label > a.label) ? -1 : 0));; if (this.fields) { this.dispatchDataChangedEvent({...this.fields.find(curField => curField.value == this._field), ...{isInit: true}}); } } } get isFieldTypeVisible() { return (this.fieldType && this.displayFieldType); } isTypeSupported(field) { let result = false; if (!this.availableFields) { result = true; } if (!result && field.referenceToInfos.length > 0) { field.referenceToInfos.forEach(curRef => { if (this.availableFields.toLowerCase().includes(curRef.apiName.toLowerCase())) { result = true; } }); } return result; } get availableObjectTypesList() { if (this.availableObjectTypes) { return this.splitValues(this.availableObjectTypes.toLowerCase()); } else { return []; } } get isError() { return this.errors.length > 0; } get errorMessage() { return this.errors.join('; '); } get isFieldDisabled() { return this._objectType == null || this.isError; } get fieldType() { if (this._field) { return this.fields.find(e => e.value == this._field).dataType; } else { return null; } } handleObjectChange(event) { this._objectType = event.detail.value; this._field = null; this.dispatchDataChangedEvent({}); const attributeChangeEvent = new FlowAttributeChangeEvent('objectType', this._objectType); this.dispatchEvent(attributeChangeEvent); this.errors = []; } handleFieldChange(event) { this._field = event.detail.value; this.dispatchDataChangedEvent(this.fields.find(curField => curField.value == this._field)); const attributeChangeEvent = new FlowAttributeChangeEvent('field', this._field); this.dispatchEvent(attributeChangeEvent); } dispatchDataChangedEvent(detail) { const memberRefreshedEvt = new CustomEvent('fieldselected', { bubbles: true, detail: { ...detail, ...{ objectType: this._objectType, fieldName: this._field } } }); this.dispatchEvent(memberRefreshedEvt); } splitValues(originalString) { if (originalString) { return originalString.replace(/ /g, '').split(','); } else { return []; } }; }
mycallback( {"CONTRIBUTOR OCCUPATION": "AREA DIRECTOR", "CONTRIBUTION AMOUNT (F3L Bundled)": "100.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "INT'L ASSOC. OF MACHINISTS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "4 WESSON TERRACE", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "MA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "RUSSELL", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20110430", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "P/R Deduction ($100.00 Monthly)", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00002469", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "GITTLEN", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "", "CONTRIBUTOR ZIP": "01532", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "NORTHBORO", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "PR250374125012", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727386.fec_2.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "520.00", "FORM TYPE": "SA11ai"}); mycallback( {"CONTRIBUTOR OCCUPATION": "AREA DIRECTOR", "CONTRIBUTION AMOUNT (F3L Bundled)": "100.00", "ELECTION CODE": "", "MEMO CODE": "", "CONTRIBUTOR EMPLOYER": "INT'L ASSOC. OF MACHINISTS", "DONOR CANDIDATE STATE": "", "CONTRIBUTOR STREET 1": "4 WESSON TERRACE", "CONTRIBUTOR MIDDLE NAME": "", "DONOR CANDIDATE FEC ID": "", "DONOR CANDIDATE MIDDLE NAME": "", "CONTRIBUTOR STATE": "MA", "DONOR CANDIDATE FIRST NAME": "", "CONTRIBUTOR FIRST NAME": "RUSSELL", "BACK REFERENCE SCHED NAME": "", "DONOR CANDIDATE DISTRICT": "", "CONTRIBUTION DATE": "20110430", "DONOR COMMITTEE NAME": "", "MEMO TEXT/DESCRIPTION": "P/R Deduction ($100.00 Monthly)", "Reference to SI or SL system code that identifies the Account": "", "FILER COMMITTEE ID NUMBER": "C00002469", "DONOR CANDIDATE LAST NAME": "", "CONTRIBUTOR LAST NAME": "GITTLEN", "_record_type": "fec.version.v7_0.SA", "CONDUIT STREET2": "", "CONDUIT STREET1": "", "DONOR COMMITTEE FEC ID": "", "CONTRIBUTION PURPOSE DESCRIP": "", "CONTRIBUTOR ZIP": "01532", "CONTRIBUTOR STREET 2": "", "CONDUIT CITY": "", "ENTITY TYPE": "IND", "CONTRIBUTOR CITY": "NORTHBORO", "CONTRIBUTOR SUFFIX": "", "TRANSACTION ID": "PR250374125012", "DONOR CANDIDATE SUFFIX": "", "DONOR CANDIDATE OFFICE": "", "CONTRIBUTION PURPOSE CODE": "15", "ELECTION OTHER DESCRIPTION": "", "_src_file": "2011/20110504/727386.fec_2.yml", "CONDUIT STATE": "", "CONTRIBUTOR ORGANIZATION NAME": "", "BACK REFERENCE TRAN ID NUMBER": "", "DONOR CANDIDATE PREFIX": "", "CONTRIBUTOR PREFIX": "", "CONDUIT ZIP": "", "CONDUIT NAME": "", "CONTRIBUTION AGGREGATE F3L Semi-annual Bundled": "520.00", "FORM TYPE": "SA11ai"});
(function webpackUniversalModuleDefinition(root, factory) { if (typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if (typeof define === 'function' && define.amd) define([], factory); else if (typeof exports === 'object') exports['io'] = factory(); else root['io'] = factory(); })(this, function () { return /******/ (function (modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if (installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = (installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false, /******/ }); /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ''; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ })( /************************************************************************/ /******/ [ /* 0 */ /***/ function (module, exports, __webpack_require__) { 'use strict'; var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; }; /** * Module dependencies. */ var url = __webpack_require__(1); var parser = __webpack_require__(7); var Manager = __webpack_require__(17); var debug = __webpack_require__(3)('socket.io-client'); /** * Module exports. */ module.exports = exports = lookup; /** * Managers cache. */ var cache = (exports.managers = {}); /** * Looks up an existing `Manager` for multiplexing. * If the user summons: * * `io('http://localhost/a');` * `io('http://localhost/b');` * * We reuse the existing instance based on same scheme/port/host, * and we initialize sockets for each namespace. * * @api public */ function lookup(uri, opts) { if ((typeof uri === 'undefined' ? 'undefined' : _typeof(uri)) === 'object') { opts = uri; uri = undefined; } opts = opts || {}; var parsed = url(uri); var source = parsed.source; var id = parsed.id; var path = parsed.path; var sameNamespace = cache[id] && path in cache[id].nsps; var newConnection = opts.forceNew || opts['force new connection'] || false === opts.multiplex || sameNamespace; var io; if (newConnection) { debug('ignoring socket cache for %s', source); io = Manager(source, opts); } else { if (!cache[id]) { debug('new io instance for %s', source); cache[id] = Manager(source, opts); } io = cache[id]; } if (parsed.query && !opts.query) { opts.query = parsed.query; } else if (opts && 'object' === _typeof(opts.query)) { opts.query = encodeQueryString(opts.query); } return io.socket(parsed.path, opts); } /** * Helper method to parse query objects to string. * @param {object} query * @returns {string} */ function encodeQueryString(obj) { var str = []; for (var p in obj) { if (obj.hasOwnProperty(p)) { str.push(encodeURIComponent(p) + '=' + encodeURIComponent(obj[p])); } } return str.join('&'); } /** * Protocol version. * * @api public */ exports.protocol = parser.protocol; /** * `connect`. * * @param {String} uri * @api public */ exports.connect = lookup; /** * Expose constructors for standalone build. * * @api public */ exports.Manager = __webpack_require__(17); exports.Socket = __webpack_require__(45); /***/ }, /* 1 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { 'use strict'; /** * Module dependencies. */ var parseuri = __webpack_require__(2); var debug = __webpack_require__(3)('socket.io-client:url'); /** * Module exports. */ module.exports = url; /** * URL parser. * * @param {String} url * @param {Object} An object meant to mimic window.location. * Defaults to window.location. * @api public */ function url(uri, loc) { var obj = uri; // default to window.location loc = loc || global.location; if (null == uri) uri = loc.protocol + '//' + loc.host; // relative path support if ('string' === typeof uri) { if ('/' === uri.charAt(0)) { if ('/' === uri.charAt(1)) { uri = loc.protocol + uri; } else { uri = loc.host + uri; } } if (!/^(https?|wss?):\/\//.test(uri)) { debug('protocol-less url %s', uri); if ('undefined' !== typeof loc) { uri = loc.protocol + '//' + uri; } else { uri = 'https://' + uri; } } // parse debug('parse %s', uri); obj = parseuri(uri); } // make sure we treat `localhost:80` and `localhost` equally if (!obj.port) { if (/^(http|ws)$/.test(obj.protocol)) { obj.port = '80'; } else if (/^(http|ws)s$/.test(obj.protocol)) { obj.port = '443'; } } obj.path = obj.path || '/'; var ipv6 = obj.host.indexOf(':') !== -1; var host = ipv6 ? '[' + obj.host + ']' : obj.host; // define unique id obj.id = obj.protocol + '://' + host + ':' + obj.port; // define href obj.href = obj.protocol + '://' + host + (loc && loc.port === obj.port ? '' : ':' + obj.port); return obj; } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 2 */ /***/ function (module, exports) { /** * Parses an URI * * @author Steven Levithan <stevenlevithan.com> (MIT license) * @api private */ var re = /^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/; var parts = [ 'source', 'protocol', 'authority', 'userInfo', 'user', 'password', 'host', 'port', 'relative', 'path', 'directory', 'file', 'query', 'anchor', ]; module.exports = function parseuri(str) { var src = str, b = str.indexOf('['), e = str.indexOf(']'); if (b != -1 && e != -1) { str = str.substring(0, b) + str.substring(b, e).replace(/:/g, ';') + str.substring(e, str.length); } var m = re.exec(str || ''), uri = {}, i = 14; while (i--) { uri[parts[i]] = m[i] || ''; } if (b != -1 && e != -1) { uri.source = src; uri.host = uri.host.substring(1, uri.host.length - 1).replace(/;/g, ':'); uri.authority = uri.authority.replace('[', '').replace(']', '').replace(/;/g, ':'); uri.ipv6uri = true; } return uri; }; /***/ }, /* 3 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (process) { /** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __webpack_require__(5); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = ['lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ function useColors() { // is webkit? http://stackoverflow.com/a/16459606/376773 // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632 return ( (typeof document !== 'undefined' && 'WebkitAppearance' in document.documentElement.style) || // is firebug? http://stackoverflow.com/a/398120/376773 (window.console && (console.firebug || (console.exception && console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function (v) { try { return JSON.stringify(v); } catch (err) { return '[UnexpectedJSONParseError]: ' + err.message; } }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs() { var args = arguments; var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!useColors) return args; var c = 'color: ' + this.color; args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-z%]/g, function (match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); return args; } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch (e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { return exports.storage.debug; } catch (e) {} // If debug isn't set in LS, and we're in Electron, try to load $DEBUG if (typeof process !== 'undefined' && 'env' in process) { return process.env.DEBUG; } } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { return window.localStorage; } catch (e) {} } /* WEBPACK VAR INJECTION */ }.call(exports, __webpack_require__(4))); /***/ }, /* 4 */ /***/ function (module, exports) { // shim for using process in browser var process = (module.exports = {}); // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout() { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } })(); function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e) { try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e) { // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while (len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/'; }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function () { return 0; }; /***/ }, /* 5 */ /***/ function (module, exports, __webpack_require__) { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = debug.debug = debug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; exports.humanize = __webpack_require__(6); /** * The currently active debug mode names, and names to skip. */ exports.names = []; exports.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lowercased letter, i.e. "n". */ exports.formatters = {}; /** * Previously assigned color. */ var prevColor = 0; /** * Previous log timestamp. */ var prevTime; /** * Select a color. * * @return {Number} * @api private */ function selectColor() { return exports.colors[prevColor++ % exports.colors.length]; } /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function debug(namespace) { // define the `disabled` version function disabled() {} disabled.enabled = false; // define the `enabled` version function enabled() { var self = enabled; // set `diff` timestamp var curr = +new Date(); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; // add the `color` if not set if (null == self.useColors) self.useColors = exports.useColors(); if (null == self.color && self.useColors) self.color = selectColor(); var args = new Array(arguments.length); for (var i = 0; i < args.length; i++) { args[i] = arguments[i]; } args[0] = exports.coerce(args[0]); if ('string' !== typeof args[0]) { // anything else let's inspect with %o args = ['%o'].concat(args); } // apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-z%])/g, function (match, format) { // if we encounter an escaped % then don't increase the array index if (match === '%%') return match; index++; var formatter = exports.formatters[format]; if ('function' === typeof formatter) { var val = args[index]; match = formatter.call(self, val); // now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); // apply env-specific formatting args = exports.formatArgs.apply(self, args); var logFn = enabled.log || exports.log || console.log.bind(console); logFn.apply(self, args); } enabled.enabled = true; var fn = exports.enabled(namespace) ? enabled : disabled; fn.namespace = namespace; return fn; } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { exports.save(namespaces); var split = (namespaces || '').split(/[\s,]+/); var len = split.length; for (var i = 0; i < len; i++) { if (!split[i]) continue; // ignore empty strings namespaces = split[i].replace(/[\\^$+?.()|[\]{}]/g, '\\$&').replace(/\*/g, '.*?'); if (namespaces[0] === '-') { exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { exports.names.push(new RegExp('^' + namespaces + '$')); } } } /** * Disable debug output. * * @api public */ function disable() { exports.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { var i, len; for (i = 0, len = exports.skips.length; i < len; i++) { if (exports.skips[i].test(name)) { return false; } } for (i = 0, len = exports.names.length; i < len; i++) { if (exports.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) return val.stack || val.message; return val; } /***/ }, /* 6 */ /***/ function (module, exports) { /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} options * @throws {Error} throw an error if val is not a non-empty string or a number * @return {String|Number} * @api public */ module.exports = function (val, options) { options = options || {}; var type = typeof val; if (type === 'string' && val.length > 0) { return parse(val); } else if (type === 'number' && isNaN(val) === false) { return options.long ? fmtLong(val) : fmtShort(val); } throw new Error('val is not a non-empty string or a valid number. val=' + JSON.stringify(val)); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = String(str); if (str.length > 10000) { return; } var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( str ); if (!match) { return; } var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; default: return undefined; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtShort(ms) { if (ms >= d) { return Math.round(ms / d) + 'd'; } if (ms >= h) { return Math.round(ms / h) + 'h'; } if (ms >= m) { return Math.round(ms / m) + 'm'; } if (ms >= s) { return Math.round(ms / s) + 's'; } return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function fmtLong(ms) { return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, n, name) { if (ms < n) { return; } if (ms < n * 1.5) { return Math.floor(ms / n) + ' ' + name; } return Math.ceil(ms / n) + ' ' + name + 's'; } /***/ }, /* 7 */ /***/ function (module, exports, __webpack_require__) { /** * Module dependencies. */ var debug = __webpack_require__(8)('socket.io-parser'); var json = __webpack_require__(11); var Emitter = __webpack_require__(13); var binary = __webpack_require__(14); var isBuf = __webpack_require__(16); /** * Protocol version. * * @api public */ exports.protocol = 4; /** * Packet types. * * @api public */ exports.types = ['CONNECT', 'DISCONNECT', 'EVENT', 'ACK', 'ERROR', 'BINARY_EVENT', 'BINARY_ACK']; /** * Packet type `connect`. * * @api public */ exports.CONNECT = 0; /** * Packet type `disconnect`. * * @api public */ exports.DISCONNECT = 1; /** * Packet type `event`. * * @api public */ exports.EVENT = 2; /** * Packet type `ack`. * * @api public */ exports.ACK = 3; /** * Packet type `error`. * * @api public */ exports.ERROR = 4; /** * Packet type 'binary event' * * @api public */ exports.BINARY_EVENT = 5; /** * Packet type `binary ack`. For acks with binary arguments. * * @api public */ exports.BINARY_ACK = 6; /** * Encoder constructor. * * @api public */ exports.Encoder = Encoder; /** * Decoder constructor. * * @api public */ exports.Decoder = Decoder; /** * A socket.io Encoder instance * * @api public */ function Encoder() {} /** * Encode a packet as a single string if non-binary, or as a * buffer sequence, depending on packet type. * * @param {Object} obj - packet object * @param {Function} callback - function to handle encodings (likely engine.write) * @return Calls callback with Array of encodings * @api public */ Encoder.prototype.encode = function (obj, callback) { debug('encoding packet %j', obj); if (exports.BINARY_EVENT == obj.type || exports.BINARY_ACK == obj.type) { encodeAsBinary(obj, callback); } else { var encoding = encodeAsString(obj); callback([encoding]); } }; /** * Encode packet as string. * * @param {Object} packet * @return {String} encoded * @api private */ function encodeAsString(obj) { var str = ''; var nsp = false; // first is type str += obj.type; // attachments if we have them if (exports.BINARY_EVENT == obj.type || exports.BINARY_ACK == obj.type) { str += obj.attachments; str += '-'; } // if we have a namespace other than `/` // we append it followed by a comma `,` if (obj.nsp && '/' != obj.nsp) { nsp = true; str += obj.nsp; } // immediately followed by the id if (null != obj.id) { if (nsp) { str += ','; nsp = false; } str += obj.id; } // json data if (null != obj.data) { if (nsp) str += ','; str += json.stringify(obj.data); } debug('encoded %j as %s', obj, str); return str; } /** * Encode packet as 'buffer sequence' by removing blobs, and * deconstructing packet into object with placeholders and * a list of buffers. * * @param {Object} packet * @return {Buffer} encoded * @api private */ function encodeAsBinary(obj, callback) { function writeEncoding(bloblessData) { var deconstruction = binary.deconstructPacket(bloblessData); var pack = encodeAsString(deconstruction.packet); var buffers = deconstruction.buffers; buffers.unshift(pack); // add packet info to beginning of data list callback(buffers); // write all the buffers } binary.removeBlobs(obj, writeEncoding); } /** * A socket.io Decoder instance * * @return {Object} decoder * @api public */ function Decoder() { this.reconstructor = null; } /** * Mix in `Emitter` with Decoder. */ Emitter(Decoder.prototype); /** * Decodes an ecoded packet string into packet JSON. * * @param {String} obj - encoded packet * @return {Object} packet * @api public */ Decoder.prototype.add = function (obj) { var packet; if ('string' == typeof obj) { packet = decodeString(obj); if (exports.BINARY_EVENT == packet.type || exports.BINARY_ACK == packet.type) { // binary packet's json this.reconstructor = new BinaryReconstructor(packet); // no attachments, labeled binary but no binary data to follow if (this.reconstructor.reconPack.attachments === 0) { this.emit('decoded', packet); } } else { // non-binary full packet this.emit('decoded', packet); } } else if (isBuf(obj) || obj.base64) { // raw binary data if (!this.reconstructor) { throw new Error('got binary data when not reconstructing a packet'); } else { packet = this.reconstructor.takeBinaryData(obj); if (packet) { // received final buffer this.reconstructor = null; this.emit('decoded', packet); } } } else { throw new Error('Unknown type: ' + obj); } }; /** * Decode a packet String (JSON data) * * @param {String} str * @return {Object} packet * @api private */ function decodeString(str) { var p = {}; var i = 0; // look up type p.type = Number(str.charAt(0)); if (null == exports.types[p.type]) return error(); // look up attachments if type binary if (exports.BINARY_EVENT == p.type || exports.BINARY_ACK == p.type) { var buf = ''; while (str.charAt(++i) != '-') { buf += str.charAt(i); if (i == str.length) break; } if (buf != Number(buf) || str.charAt(i) != '-') { throw new Error('Illegal attachments'); } p.attachments = Number(buf); } // look up namespace (if any) if ('/' == str.charAt(i + 1)) { p.nsp = ''; while (++i) { var c = str.charAt(i); if (',' == c) break; p.nsp += c; if (i == str.length) break; } } else { p.nsp = '/'; } // look up id var next = str.charAt(i + 1); if ('' !== next && Number(next) == next) { p.id = ''; while (++i) { var c = str.charAt(i); if (null == c || Number(c) != c) { --i; break; } p.id += str.charAt(i); if (i == str.length) break; } p.id = Number(p.id); } // look up json data if (str.charAt(++i)) { p = tryParse(p, str.substr(i)); } debug('decoded %s as %j', str, p); return p; } function tryParse(p, str) { try { p.data = json.parse(str); } catch (e) { return error(); } return p; } /** * Deallocates a parser's resources * * @api public */ Decoder.prototype.destroy = function () { if (this.reconstructor) { this.reconstructor.finishedReconstruction(); } }; /** * A manager of a binary event's 'buffer sequence'. Should * be constructed whenever a packet of type BINARY_EVENT is * decoded. * * @param {Object} packet * @return {BinaryReconstructor} initialized reconstructor * @api private */ function BinaryReconstructor(packet) { this.reconPack = packet; this.buffers = []; } /** * Method to be called when binary data received from connection * after a BINARY_EVENT packet. * * @param {Buffer | ArrayBuffer} binData - the raw binary data received * @return {null | Object} returns null if more binary data is expected or * a reconstructed packet object if all buffers have been received. * @api private */ BinaryReconstructor.prototype.takeBinaryData = function (binData) { this.buffers.push(binData); if (this.buffers.length == this.reconPack.attachments) { // done with buffer list var packet = binary.reconstructPacket(this.reconPack, this.buffers); this.finishedReconstruction(); return packet; } return null; }; /** * Cleans up binary packet reconstruction variables. * * @api private */ BinaryReconstructor.prototype.finishedReconstruction = function () { this.reconPack = null; this.buffers = []; }; function error(data) { return { type: exports.ERROR, data: 'parser error', }; } /***/ }, /* 8 */ /***/ function (module, exports, __webpack_require__) { /** * This is the web browser implementation of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = __webpack_require__(9); exports.log = log; exports.formatArgs = formatArgs; exports.save = save; exports.load = load; exports.useColors = useColors; exports.storage = 'undefined' != typeof chrome && 'undefined' != typeof chrome.storage ? chrome.storage.local : localstorage(); /** * Colors. */ exports.colors = ['lightseagreen', 'forestgreen', 'goldenrod', 'dodgerblue', 'darkorchid', 'crimson']; /** * Currently only WebKit-based Web Inspectors, Firefox >= v31, * and the Firebug extension (any Firefox version) are known * to support "%c" CSS customizations. * * TODO: add a `localStorage` variable to explicitly enable/disable colors */ function useColors() { // is webkit? http://stackoverflow.com/a/16459606/376773 return ( 'WebkitAppearance' in document.documentElement.style || // is firebug? http://stackoverflow.com/a/398120/376773 (window.console && (console.firebug || (console.exception && console.table))) || // is firefox >= v31? // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ); } /** * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default. */ exports.formatters.j = function (v) { return JSON.stringify(v); }; /** * Colorize log arguments if enabled. * * @api public */ function formatArgs() { var args = arguments; var useColors = this.useColors; args[0] = (useColors ? '%c' : '') + this.namespace + (useColors ? ' %c' : ' ') + args[0] + (useColors ? '%c ' : ' ') + '+' + exports.humanize(this.diff); if (!useColors) return args; var c = 'color: ' + this.color; args = [args[0], c, 'color: inherit'].concat(Array.prototype.slice.call(args, 1)); // the final "%c" is somewhat tricky, because there could be other // arguments passed either before or after the %c, so we need to // figure out the correct index to insert the CSS into var index = 0; var lastC = 0; args[0].replace(/%[a-z%]/g, function (match) { if ('%%' === match) return; index++; if ('%c' === match) { // we only are interested in the *last* %c // (the user may have provided their own) lastC = index; } }); args.splice(lastC, 0, c); return args; } /** * Invokes `console.log()` when available. * No-op when `console.log` is not a "function". * * @api public */ function log() { // this hackery is required for IE8/9, where // the `console.log` function doesn't have 'apply' return 'object' === typeof console && console.log && Function.prototype.apply.call(console.log, console, arguments); } /** * Save `namespaces`. * * @param {String} namespaces * @api private */ function save(namespaces) { try { if (null == namespaces) { exports.storage.removeItem('debug'); } else { exports.storage.debug = namespaces; } } catch (e) {} } /** * Load `namespaces`. * * @return {String} returns the previously persisted debug modes * @api private */ function load() { var r; try { r = exports.storage.debug; } catch (e) {} return r; } /** * Enable namespaces listed in `localStorage.debug` initially. */ exports.enable(load()); /** * Localstorage attempts to return the localstorage. * * This is necessary because safari throws * when a user disables cookies/localstorage * and you attempt to access it. * * @return {LocalStorage} * @api private */ function localstorage() { try { return window.localStorage; } catch (e) {} } /***/ }, /* 9 */ /***/ function (module, exports, __webpack_require__) { /** * This is the common logic for both the Node.js and web browser * implementations of `debug()`. * * Expose `debug()` as the module. */ exports = module.exports = debug; exports.coerce = coerce; exports.disable = disable; exports.enable = enable; exports.enabled = enabled; exports.humanize = __webpack_require__(10); /** * The currently active debug mode names, and names to skip. */ exports.names = []; exports.skips = []; /** * Map of special "%n" handling functions, for the debug "format" argument. * * Valid key names are a single, lowercased letter, i.e. "n". */ exports.formatters = {}; /** * Previously assigned color. */ var prevColor = 0; /** * Previous log timestamp. */ var prevTime; /** * Select a color. * * @return {Number} * @api private */ function selectColor() { return exports.colors[prevColor++ % exports.colors.length]; } /** * Create a debugger with the given `namespace`. * * @param {String} namespace * @return {Function} * @api public */ function debug(namespace) { // define the `disabled` version function disabled() {} disabled.enabled = false; // define the `enabled` version function enabled() { var self = enabled; // set `diff` timestamp var curr = +new Date(); var ms = curr - (prevTime || curr); self.diff = ms; self.prev = prevTime; self.curr = curr; prevTime = curr; // add the `color` if not set if (null == self.useColors) self.useColors = exports.useColors(); if (null == self.color && self.useColors) self.color = selectColor(); var args = Array.prototype.slice.call(arguments); args[0] = exports.coerce(args[0]); if ('string' !== typeof args[0]) { // anything else let's inspect with %o args = ['%o'].concat(args); } // apply any `formatters` transformations var index = 0; args[0] = args[0].replace(/%([a-z%])/g, function (match, format) { // if we encounter an escaped % then don't increase the array index if (match === '%%') return match; index++; var formatter = exports.formatters[format]; if ('function' === typeof formatter) { var val = args[index]; match = formatter.call(self, val); // now we need to remove `args[index]` since it's inlined in the `format` args.splice(index, 1); index--; } return match; }); if ('function' === typeof exports.formatArgs) { args = exports.formatArgs.apply(self, args); } var logFn = enabled.log || exports.log || console.log.bind(console); logFn.apply(self, args); } enabled.enabled = true; var fn = exports.enabled(namespace) ? enabled : disabled; fn.namespace = namespace; return fn; } /** * Enables a debug mode by namespaces. This can include modes * separated by a colon and wildcards. * * @param {String} namespaces * @api public */ function enable(namespaces) { exports.save(namespaces); var split = (namespaces || '').split(/[\s,]+/); var len = split.length; for (var i = 0; i < len; i++) { if (!split[i]) continue; // ignore empty strings namespaces = split[i].replace(/\*/g, '.*?'); if (namespaces[0] === '-') { exports.skips.push(new RegExp('^' + namespaces.substr(1) + '$')); } else { exports.names.push(new RegExp('^' + namespaces + '$')); } } } /** * Disable debug output. * * @api public */ function disable() { exports.enable(''); } /** * Returns true if the given mode name is enabled, false otherwise. * * @param {String} name * @return {Boolean} * @api public */ function enabled(name) { var i, len; for (i = 0, len = exports.skips.length; i < len; i++) { if (exports.skips[i].test(name)) { return false; } } for (i = 0, len = exports.names.length; i < len; i++) { if (exports.names[i].test(name)) { return true; } } return false; } /** * Coerce `val`. * * @param {Mixed} val * @return {Mixed} * @api private */ function coerce(val) { if (val instanceof Error) return val.stack || val.message; return val; } /***/ }, /* 10 */ /***/ function (module, exports) { /** * Helpers. */ var s = 1000; var m = s * 60; var h = m * 60; var d = h * 24; var y = d * 365.25; /** * Parse or format the given `val`. * * Options: * * - `long` verbose formatting [false] * * @param {String|Number} val * @param {Object} options * @return {String|Number} * @api public */ module.exports = function (val, options) { options = options || {}; if ('string' == typeof val) return parse(val); return options.long ? long(val) : short(val); }; /** * Parse the given `str` and return milliseconds. * * @param {String} str * @return {Number} * @api private */ function parse(str) { str = '' + str; if (str.length > 10000) return; var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( str ); if (!match) return; var n = parseFloat(match[1]); var type = (match[2] || 'ms').toLowerCase(); switch (type) { case 'years': case 'year': case 'yrs': case 'yr': case 'y': return n * y; case 'days': case 'day': case 'd': return n * d; case 'hours': case 'hour': case 'hrs': case 'hr': case 'h': return n * h; case 'minutes': case 'minute': case 'mins': case 'min': case 'm': return n * m; case 'seconds': case 'second': case 'secs': case 'sec': case 's': return n * s; case 'milliseconds': case 'millisecond': case 'msecs': case 'msec': case 'ms': return n; } } /** * Short format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function short(ms) { if (ms >= d) return Math.round(ms / d) + 'd'; if (ms >= h) return Math.round(ms / h) + 'h'; if (ms >= m) return Math.round(ms / m) + 'm'; if (ms >= s) return Math.round(ms / s) + 's'; return ms + 'ms'; } /** * Long format for `ms`. * * @param {Number} ms * @return {String} * @api private */ function long(ms) { return plural(ms, d, 'day') || plural(ms, h, 'hour') || plural(ms, m, 'minute') || plural(ms, s, 'second') || ms + ' ms'; } /** * Pluralization helper. */ function plural(ms, n, name) { if (ms < n) return; if (ms < n * 1.5) return Math.floor(ms / n) + ' ' + name; return Math.ceil(ms / n) + ' ' + name + 's'; } /***/ }, /* 11 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (module, global) { /*** IMPORTS FROM imports-loader ***/ var define = false; /*! JSON v3.3.2 | http://bestiejs.github.io/json3 | Copyright 2012-2014, Kit Cambridge | http://kit.mit-license.org */ (function () { // Detect the `define` function exposed by asynchronous module loaders. The // strict `define` check is necessary for compatibility with `r.js`. var isLoader = typeof define === 'function' && define.amd; // A set of types used to distinguish objects from primitives. var objectTypes = { function: true, object: true, }; // Detect the `exports` object exposed by CommonJS implementations. var freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports; // Use the `global` object exposed by Node (including Browserify via // `insert-module-globals`), Narwhal, and Ringo as the default context, // and the `window` object in browsers. Rhino exports a `global` function // instead. var root = (objectTypes[typeof window] && window) || this, freeGlobal = freeExports && objectTypes[typeof module] && module && !module.nodeType && typeof global == 'object' && global; if ( freeGlobal && (freeGlobal['global'] === freeGlobal || freeGlobal['window'] === freeGlobal || freeGlobal['self'] === freeGlobal) ) { root = freeGlobal; } // Public: Initializes JSON 3 using the given `context` object, attaching the // `stringify` and `parse` functions to the specified `exports` object. function runInContext(context, exports) { context || (context = root['Object']()); exports || (exports = root['Object']()); // Native constructor aliases. var Number = context['Number'] || root['Number'], String = context['String'] || root['String'], Object = context['Object'] || root['Object'], Date = context['Date'] || root['Date'], SyntaxError = context['SyntaxError'] || root['SyntaxError'], TypeError = context['TypeError'] || root['TypeError'], Math = context['Math'] || root['Math'], nativeJSON = context['JSON'] || root['JSON']; // Delegate to the native `stringify` and `parse` implementations. if (typeof nativeJSON == 'object' && nativeJSON) { exports.stringify = nativeJSON.stringify; exports.parse = nativeJSON.parse; } // Convenience aliases. var objectProto = Object.prototype, getClass = objectProto.toString, isProperty, forEach, undef; // Test the `Date#getUTC*` methods. Based on work by @Yaffle. var isExtended = new Date(-3509827334573292); try { // The `getUTCFullYear`, `Month`, and `Date` methods return nonsensical // results for certain dates in Opera >= 10.53. isExtended = isExtended.getUTCFullYear() == -109252 && isExtended.getUTCMonth() === 0 && isExtended.getUTCDate() === 1 && // Safari < 2.0.2 stores the internal millisecond time value correctly, // but clips the values returned by the date methods to the range of // signed 32-bit integers ([-2 ** 31, 2 ** 31 - 1]). isExtended.getUTCHours() == 10 && isExtended.getUTCMinutes() == 37 && isExtended.getUTCSeconds() == 6 && isExtended.getUTCMilliseconds() == 708; } catch (exception) {} // Internal: Determines whether the native `JSON.stringify` and `parse` // implementations are spec-compliant. Based on work by Ken Snyder. function has(name) { if (has[name] !== undef) { // Return cached feature test result. return has[name]; } var isSupported; if (name == 'bug-string-char-index') { // IE <= 7 doesn't support accessing string characters using square // bracket notation. IE 8 only supports this for primitives. isSupported = 'a'[0] != 'a'; } else if (name == 'json') { // Indicates whether both `JSON.stringify` and `JSON.parse` are // supported. isSupported = has('json-stringify') && has('json-parse'); } else { var value, serialized = '{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}'; // Test `JSON.stringify`. if (name == 'json-stringify') { var stringify = exports.stringify, stringifySupported = typeof stringify == 'function' && isExtended; if (stringifySupported) { // A test function object with a custom `toJSON` method. (value = function () { return 1; }).toJSON = value; try { stringifySupported = // Firefox 3.1b1 and b2 serialize string, number, and boolean // primitives as object literals. stringify(0) === '0' && // FF 3.1b1, b2, and JSON 2 serialize wrapped primitives as object // literals. stringify(new Number()) === '0' && stringify(new String()) == '""' && // FF 3.1b1, 2 throw an error if the value is `null`, `undefined`, or // does not define a canonical JSON representation (this applies to // objects with `toJSON` properties as well, *unless* they are nested // within an object or array). stringify(getClass) === undef && // IE 8 serializes `undefined` as `"undefined"`. Safari <= 5.1.7 and // FF 3.1b3 pass this test. stringify(undef) === undef && // Safari <= 5.1.7 and FF 3.1b3 throw `Error`s and `TypeError`s, // respectively, if the value is omitted entirely. stringify() === undef && // FF 3.1b1, 2 throw an error if the given value is not a number, // string, array, object, Boolean, or `null` literal. This applies to // objects with custom `toJSON` methods as well, unless they are nested // inside object or array literals. YUI 3.0.0b1 ignores custom `toJSON` // methods entirely. stringify(value) === '1' && stringify([value]) == '[1]' && // Prototype <= 1.6.1 serializes `[undefined]` as `"[]"` instead of // `"[null]"`. stringify([undef]) == '[null]' && // YUI 3.0.0b1 fails to serialize `null` literals. stringify(null) == 'null' && // FF 3.1b1, 2 halts serialization if an array contains a function: // `[1, true, getClass, 1]` serializes as "[1,true,],". FF 3.1b3 // elides non-JSON values from objects and arrays, unless they // define custom `toJSON` methods. stringify([undef, getClass, null]) == '[null,null,null]' && // Simple serialization test. FF 3.1b1 uses Unicode escape sequences // where character escape codes are expected (e.g., `\b` => `\u0008`). stringify({ a: [value, true, false, null, '\x00\b\n\f\r\t'] }) == serialized && // FF 3.1b1 and b2 ignore the `filter` and `width` arguments. stringify(null, value) === '1' && stringify([1, 2], null, 1) == '[\n 1,\n 2\n]' && // JSON 2, Prototype <= 1.7, and older WebKit builds incorrectly // serialize extended years. stringify(new Date(-8.64e15)) == '"-271821-04-20T00:00:00.000Z"' && // The milliseconds are optional in ES 5, but required in 5.1. stringify(new Date(8.64e15)) == '"+275760-09-13T00:00:00.000Z"' && // Firefox <= 11.0 incorrectly serializes years prior to 0 as negative // four-digit years instead of six-digit years. Credits: @Yaffle. stringify(new Date(-621987552e5)) == '"-000001-01-01T00:00:00.000Z"' && // Safari <= 5.1.5 and Opera >= 10.53 incorrectly serialize millisecond // values less than 1000. Credits: @Yaffle. stringify(new Date(-1)) == '"1969-12-31T23:59:59.999Z"'; } catch (exception) { stringifySupported = false; } } isSupported = stringifySupported; } // Test `JSON.parse`. if (name == 'json-parse') { var parse = exports.parse; if (typeof parse == 'function') { try { // FF 3.1b1, b2 will throw an exception if a bare literal is provided. // Conforming implementations should also coerce the initial argument to // a string prior to parsing. if (parse('0') === 0 && !parse(false)) { // Simple parsing test. value = parse(serialized); var parseSupported = value['a'].length == 5 && value['a'][0] === 1; if (parseSupported) { try { // Safari <= 5.1.2 and FF 3.1b1 allow unescaped tabs in strings. parseSupported = !parse('"\t"'); } catch (exception) {} if (parseSupported) { try { // FF 4.0 and 4.0.1 allow leading `+` signs and leading // decimal points. FF 4.0, 4.0.1, and IE 9-10 also allow // certain octal literals. parseSupported = parse('01') !== 1; } catch (exception) {} } if (parseSupported) { try { // FF 4.0, 4.0.1, and Rhino 1.7R3-R4 allow trailing decimal // points. These environments, along with FF 3.1b1 and 2, // also allow trailing commas in JSON objects and arrays. parseSupported = parse('1.') !== 1; } catch (exception) {} } } } } catch (exception) { parseSupported = false; } } isSupported = parseSupported; } } return (has[name] = !!isSupported); } if (!has('json')) { // Common `[[Class]]` name aliases. var functionClass = '[object Function]', dateClass = '[object Date]', numberClass = '[object Number]', stringClass = '[object String]', arrayClass = '[object Array]', booleanClass = '[object Boolean]'; // Detect incomplete support for accessing string characters by index. var charIndexBuggy = has('bug-string-char-index'); // Define additional utility methods if the `Date` methods are buggy. if (!isExtended) { var floor = Math.floor; // A mapping between the months of the year and the number of days between // January 1st and the first of the respective month. var Months = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334]; // Internal: Calculates the number of days between the Unix epoch and the // first day of the given month. var getDay = function (year, month) { return ( Months[month] + 365 * (year - 1970) + floor((year - 1969 + (month = +(month > 1))) / 4) - floor((year - 1901 + month) / 100) + floor((year - 1601 + month) / 400) ); }; } // Internal: Determines if a property is a direct property of the given // object. Delegates to the native `Object#hasOwnProperty` method. if (!(isProperty = objectProto.hasOwnProperty)) { isProperty = function (property) { var members = {}, constructor; if ( ((members.__proto__ = null), (members.__proto__ = { // The *proto* property cannot be set multiple times in recent // versions of Firefox and SeaMonkey. toString: 1, }), members).toString != getClass ) { // Safari <= 2.0.3 doesn't implement `Object#hasOwnProperty`, but // supports the mutable *proto* property. isProperty = function (property) { // Capture and break the object's prototype chain (see section 8.6.2 // of the ES 5.1 spec). The parenthesized expression prevents an // unsafe transformation by the Closure Compiler. var original = this.__proto__, result = property in ((this.__proto__ = null), this); // Restore the original prototype chain. this.__proto__ = original; return result; }; } else { // Capture a reference to the top-level `Object` constructor. constructor = members.constructor; // Use the `constructor` property to simulate `Object#hasOwnProperty` in // other environments. isProperty = function (property) { var parent = (this.constructor || constructor).prototype; return property in this && !(property in parent && this[property] === parent[property]); }; } members = null; return isProperty.call(this, property); }; } // Internal: Normalizes the `for...in` iteration algorithm across // environments. Each enumerated key is yielded to a `callback` function. forEach = function (object, callback) { var size = 0, Properties, members, property; // Tests for bugs in the current environment's `for...in` algorithm. The // `valueOf` property inherits the non-enumerable flag from // `Object.prototype` in older versions of IE, Netscape, and Mozilla. (Properties = function () { this.valueOf = 0; }).prototype.valueOf = 0; // Iterate over a new instance of the `Properties` class. members = new Properties(); for (property in members) { // Ignore all properties inherited from `Object.prototype`. if (isProperty.call(members, property)) { size++; } } Properties = members = null; // Normalize the iteration algorithm. if (!size) { // A list of non-enumerable properties inherited from `Object.prototype`. members = [ 'valueOf', 'toString', 'toLocaleString', 'propertyIsEnumerable', 'isPrototypeOf', 'hasOwnProperty', 'constructor', ]; // IE <= 8, Mozilla 1.0, and Netscape 6.2 ignore shadowed non-enumerable // properties. forEach = function (object, callback) { var isFunction = getClass.call(object) == functionClass, property, length; var hasProperty = (!isFunction && typeof object.constructor != 'function' && objectTypes[typeof object.hasOwnProperty] && object.hasOwnProperty) || isProperty; for (property in object) { // Gecko <= 1.0 enumerates the `prototype` property of functions under // certain conditions; IE does not. if (!(isFunction && property == 'prototype') && hasProperty.call(object, property)) { callback(property); } } // Manually invoke the callback for each non-enumerable property. for ( length = members.length; (property = members[--length]); hasProperty.call(object, property) && callback(property) ); }; } else if (size == 2) { // Safari <= 2.0.4 enumerates shadowed properties twice. forEach = function (object, callback) { // Create a set of iterated properties. var members = {}, isFunction = getClass.call(object) == functionClass, property; for (property in object) { // Store each property name to prevent double enumeration. The // `prototype` property of functions is not enumerated due to cross- // environment inconsistencies. if ( !(isFunction && property == 'prototype') && !isProperty.call(members, property) && (members[property] = 1) && isProperty.call(object, property) ) { callback(property); } } }; } else { // No bugs detected; use the standard `for...in` algorithm. forEach = function (object, callback) { var isFunction = getClass.call(object) == functionClass, property, isConstructor; for (property in object) { if ( !(isFunction && property == 'prototype') && isProperty.call(object, property) && !(isConstructor = property === 'constructor') ) { callback(property); } } // Manually invoke the callback for the `constructor` property due to // cross-environment inconsistencies. if (isConstructor || isProperty.call(object, (property = 'constructor'))) { callback(property); } }; } return forEach(object, callback); }; // Public: Serializes a JavaScript `value` as a JSON string. The optional // `filter` argument may specify either a function that alters how object and // array members are serialized, or an array of strings and numbers that // indicates which properties should be serialized. The optional `width` // argument may be either a string or number that specifies the indentation // level of the output. if (!has('json-stringify')) { // Internal: A map of control characters and their escaped equivalents. var Escapes = { 92: '\\\\', 34: '\\"', 8: '\\b', 12: '\\f', 10: '\\n', 13: '\\r', 9: '\\t', }; // Internal: Converts `value` into a zero-padded string such that its // length is at least equal to `width`. The `width` must be <= 6. var leadingZeroes = '000000'; var toPaddedString = function (width, value) { // The `|| 0` expression is necessary to work around a bug in // Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`. return (leadingZeroes + (value || 0)).slice(-width); }; // Internal: Double-quotes a string `value`, replacing all ASCII control // characters (characters with code unit values between 0 and 31) with // their escaped equivalents. This is an implementation of the // `Quote(value)` operation defined in ES 5.1 section 15.12.3. var unicodePrefix = '\\u00'; var quote = function (value) { var result = '"', index = 0, length = value.length, useCharIndex = !charIndexBuggy || length > 10; var symbols = useCharIndex && (charIndexBuggy ? value.split('') : value); for (; index < length; index++) { var charCode = value.charCodeAt(index); // If the character is a control character, append its Unicode or // shorthand escape sequence; otherwise, append the character as-is. switch (charCode) { case 8: case 9: case 10: case 12: case 13: case 34: case 92: result += Escapes[charCode]; break; default: if (charCode < 32) { result += unicodePrefix + toPaddedString(2, charCode.toString(16)); break; } result += useCharIndex ? symbols[index] : value.charAt(index); } } return result + '"'; }; // Internal: Recursively serializes an object. Implements the // `Str(key, holder)`, `JO(value)`, and `JA(value)` operations. var serialize = function (property, object, callback, properties, whitespace, indentation, stack) { var value, className, year, month, date, time, hours, minutes, seconds, milliseconds, results, element, index, length, prefix, result; try { // Necessary for host object support. value = object[property]; } catch (exception) {} if (typeof value == 'object' && value) { className = getClass.call(value); if (className == dateClass && !isProperty.call(value, 'toJSON')) { if (value > -1 / 0 && value < 1 / 0) { // Dates are serialized according to the `Date#toJSON` method // specified in ES 5.1 section 15.9.5.44. See section 15.9.1.15 // for the ISO 8601 date time string format. if (getDay) { // Manually compute the year, month, date, hours, minutes, // seconds, and milliseconds if the `getUTC*` methods are // buggy. Adapted from @Yaffle's `date-shim` project. date = floor(value / 864e5); for (year = floor(date / 365.2425) + 1970 - 1; getDay(year + 1, 0) <= date; year++); for (month = floor((date - getDay(year, 0)) / 30.42); getDay(year, month + 1) <= date; month++); date = 1 + date - getDay(year, month); // The `time` value specifies the time within the day (see ES // 5.1 section 15.9.1.2). The formula `(A % B + B) % B` is used // to compute `A modulo B`, as the `%` operator does not // correspond to the `modulo` operation for negative numbers. time = ((value % 864e5) + 864e5) % 864e5; // The hours, minutes, seconds, and milliseconds are obtained by // decomposing the time within the day. See section 15.9.1.10. hours = floor(time / 36e5) % 24; minutes = floor(time / 6e4) % 60; seconds = floor(time / 1e3) % 60; milliseconds = time % 1e3; } else { year = value.getUTCFullYear(); month = value.getUTCMonth(); date = value.getUTCDate(); hours = value.getUTCHours(); minutes = value.getUTCMinutes(); seconds = value.getUTCSeconds(); milliseconds = value.getUTCMilliseconds(); } // Serialize extended years correctly. value = (year <= 0 || year >= 1e4 ? (year < 0 ? '-' : '+') + toPaddedString(6, year < 0 ? -year : year) : toPaddedString(4, year)) + '-' + toPaddedString(2, month + 1) + '-' + toPaddedString(2, date) + // Months, dates, hours, minutes, and seconds should have two // digits; milliseconds should have three. 'T' + toPaddedString(2, hours) + ':' + toPaddedString(2, minutes) + ':' + toPaddedString(2, seconds) + // Milliseconds are optional in ES 5.0, but required in 5.1. '.' + toPaddedString(3, milliseconds) + 'Z'; } else { value = null; } } else if ( typeof value.toJSON == 'function' && ((className != numberClass && className != stringClass && className != arrayClass) || isProperty.call(value, 'toJSON')) ) { // Prototype <= 1.6.1 adds non-standard `toJSON` methods to the // `Number`, `String`, `Date`, and `Array` prototypes. JSON 3 // ignores all `toJSON` methods on these objects unless they are // defined directly on an instance. value = value.toJSON(property); } } if (callback) { // If a replacement function was provided, call it to obtain the value // for serialization. value = callback.call(object, property, value); } if (value === null) { return 'null'; } className = getClass.call(value); if (className == booleanClass) { // Booleans are represented literally. return '' + value; } else if (className == numberClass) { // JSON numbers must be finite. `Infinity` and `NaN` are serialized as // `"null"`. return value > -1 / 0 && value < 1 / 0 ? '' + value : 'null'; } else if (className == stringClass) { // Strings are double-quoted and escaped. return quote('' + value); } // Recursively serialize objects and arrays. if (typeof value == 'object') { // Check for cyclic structures. This is a linear search; performance // is inversely proportional to the number of unique nested objects. for (length = stack.length; length--; ) { if (stack[length] === value) { // Cyclic structures cannot be serialized by `JSON.stringify`. throw TypeError(); } } // Add the object to the stack of traversed objects. stack.push(value); results = []; // Save the current indentation level and indent one additional level. prefix = indentation; indentation += whitespace; if (className == arrayClass) { // Recursively serialize array elements. for (index = 0, length = value.length; index < length; index++) { element = serialize(index, value, callback, properties, whitespace, indentation, stack); results.push(element === undef ? 'null' : element); } result = results.length ? whitespace ? '[\n' + indentation + results.join(',\n' + indentation) + '\n' + prefix + ']' : '[' + results.join(',') + ']' : '[]'; } else { // Recursively serialize object members. Members are selected from // either a user-specified list of property names, or the object // itself. forEach(properties || value, function (property) { var element = serialize(property, value, callback, properties, whitespace, indentation, stack); if (element !== undef) { // According to ES 5.1 section 15.12.3: "If `gap` {whitespace} // is not the empty string, let `member` {quote(property) + ":"} // be the concatenation of `member` and the `space` character." // The "`space` character" refers to the literal space // character, not the `space` {width} argument provided to // `JSON.stringify`. results.push(quote(property) + ':' + (whitespace ? ' ' : '') + element); } }); result = results.length ? whitespace ? '{\n' + indentation + results.join(',\n' + indentation) + '\n' + prefix + '}' : '{' + results.join(',') + '}' : '{}'; } // Remove the object from the traversed object stack. stack.pop(); return result; } }; // Public: `JSON.stringify`. See ES 5.1 section 15.12.3. exports.stringify = function (source, filter, width) { var whitespace, callback, properties, className; if (objectTypes[typeof filter] && filter) { if ((className = getClass.call(filter)) == functionClass) { callback = filter; } else if (className == arrayClass) { // Convert the property names array into a makeshift set. properties = {}; for ( var index = 0, length = filter.length, value; index < length; value = filter[index++], ((className = getClass.call(value)), className == stringClass || className == numberClass) && (properties[value] = 1) ); } } if (width) { if ((className = getClass.call(width)) == numberClass) { // Convert the `width` to an integer and create a string containing // `width` number of space characters. if ((width -= width % 1) > 0) { for (whitespace = '', width > 10 && (width = 10); whitespace.length < width; whitespace += ' '); } } else if (className == stringClass) { whitespace = width.length <= 10 ? width : width.slice(0, 10); } } // Opera <= 7.54u2 discards the values associated with empty string keys // (`""`) only if they are used directly within an object member list // (e.g., `!("" in { "": 1})`). return serialize('', ((value = {}), (value[''] = source), value), callback, properties, whitespace, '', []); }; } // Public: Parses a JSON source string. if (!has('json-parse')) { var fromCharCode = String.fromCharCode; // Internal: A map of escaped control characters and their unescaped // equivalents. var Unescapes = { 92: '\\', 34: '"', 47: '/', 98: '\b', 116: '\t', 110: '\n', 102: '\f', 114: '\r', }; // Internal: Stores the parser state. var Index, Source; // Internal: Resets the parser state and throws a `SyntaxError`. var abort = function () { Index = Source = null; throw SyntaxError(); }; // Internal: Returns the next token, or `"$"` if the parser has reached // the end of the source string. A token may be a string, number, `null` // literal, or Boolean literal. var lex = function () { var source = Source, length = source.length, value, begin, position, isSigned, charCode; while (Index < length) { charCode = source.charCodeAt(Index); switch (charCode) { case 9: case 10: case 13: case 32: // Skip whitespace tokens, including tabs, carriage returns, line // feeds, and space characters. Index++; break; case 123: case 125: case 91: case 93: case 58: case 44: // Parse a punctuator token (`{`, `}`, `[`, `]`, `:`, or `,`) at // the current position. value = charIndexBuggy ? source.charAt(Index) : source[Index]; Index++; return value; case 34: // `"` delimits a JSON string; advance to the next character and // begin parsing the string. String tokens are prefixed with the // sentinel `@` character to distinguish them from punctuators and // end-of-string tokens. for (value = '@', Index++; Index < length; ) { charCode = source.charCodeAt(Index); if (charCode < 32) { // Unescaped ASCII control characters (those with a code unit // less than the space character) are not permitted. abort(); } else if (charCode == 92) { // A reverse solidus (`\`) marks the beginning of an escaped // control character (including `"`, `\`, and `/`) or Unicode // escape sequence. charCode = source.charCodeAt(++Index); switch (charCode) { case 92: case 34: case 47: case 98: case 116: case 110: case 102: case 114: // Revive escaped control characters. value += Unescapes[charCode]; Index++; break; case 117: // `\u` marks the beginning of a Unicode escape sequence. // Advance to the first character and validate the // four-digit code point. begin = ++Index; for (position = Index + 4; Index < position; Index++) { charCode = source.charCodeAt(Index); // A valid sequence comprises four hexdigits (case- // insensitive) that form a single hexadecimal value. if ( !( (charCode >= 48 && charCode <= 57) || (charCode >= 97 && charCode <= 102) || (charCode >= 65 && charCode <= 70) ) ) { // Invalid Unicode escape sequence. abort(); } } // Revive the escaped character. value += fromCharCode('0x' + source.slice(begin, Index)); break; default: // Invalid escape sequence. abort(); } } else { if (charCode == 34) { // An unescaped double-quote character marks the end of the // string. break; } charCode = source.charCodeAt(Index); begin = Index; // Optimize for the common case where a string is valid. while (charCode >= 32 && charCode != 92 && charCode != 34) { charCode = source.charCodeAt(++Index); } // Append the string as-is. value += source.slice(begin, Index); } } if (source.charCodeAt(Index) == 34) { // Advance to the next character and return the revived string. Index++; return value; } // Unterminated string. abort(); default: // Parse numbers and literals. begin = Index; // Advance past the negative sign, if one is specified. if (charCode == 45) { isSigned = true; charCode = source.charCodeAt(++Index); } // Parse an integer or floating-point value. if (charCode >= 48 && charCode <= 57) { // Leading zeroes are interpreted as octal literals. if (charCode == 48 && ((charCode = source.charCodeAt(Index + 1)), charCode >= 48 && charCode <= 57)) { // Illegal octal literal. abort(); } isSigned = false; // Parse the integer component. for ( ; Index < length && ((charCode = source.charCodeAt(Index)), charCode >= 48 && charCode <= 57); Index++ ); // Floats cannot contain a leading decimal point; however, this // case is already accounted for by the parser. if (source.charCodeAt(Index) == 46) { position = ++Index; // Parse the decimal component. for ( ; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++ ); if (position == Index) { // Illegal trailing decimal. abort(); } Index = position; } // Parse exponents. The `e` denoting the exponent is // case-insensitive. charCode = source.charCodeAt(Index); if (charCode == 101 || charCode == 69) { charCode = source.charCodeAt(++Index); // Skip past the sign following the exponent, if one is // specified. if (charCode == 43 || charCode == 45) { Index++; } // Parse the exponential component. for ( position = Index; position < length && ((charCode = source.charCodeAt(position)), charCode >= 48 && charCode <= 57); position++ ); if (position == Index) { // Illegal empty exponent. abort(); } Index = position; } // Coerce the parsed value to a JavaScript number. return +source.slice(begin, Index); } // A negative sign may only precede numbers. if (isSigned) { abort(); } // `true`, `false`, and `null` literals. if (source.slice(Index, Index + 4) == 'true') { Index += 4; return true; } else if (source.slice(Index, Index + 5) == 'false') { Index += 5; return false; } else if (source.slice(Index, Index + 4) == 'null') { Index += 4; return null; } // Unrecognized token. abort(); } } // Return the sentinel `$` character if the parser has reached the end // of the source string. return '$'; }; // Internal: Parses a JSON `value` token. var get = function (value) { var results, hasMembers; if (value == '$') { // Unexpected end of input. abort(); } if (typeof value == 'string') { if ((charIndexBuggy ? value.charAt(0) : value[0]) == '@') { // Remove the sentinel `@` character. return value.slice(1); } // Parse object and array literals. if (value == '[') { // Parses a JSON array, returning a new JavaScript array. results = []; for (; ; hasMembers || (hasMembers = true)) { value = lex(); // A closing square bracket marks the end of the array literal. if (value == ']') { break; } // If the array literal contains elements, the current token // should be a comma separating the previous element from the // next. if (hasMembers) { if (value == ',') { value = lex(); if (value == ']') { // Unexpected trailing `,` in array literal. abort(); } } else { // A `,` must separate each array element. abort(); } } // Elisions and leading commas are not permitted. if (value == ',') { abort(); } results.push(get(value)); } return results; } else if (value == '{') { // Parses a JSON object, returning a new JavaScript object. results = {}; for (; ; hasMembers || (hasMembers = true)) { value = lex(); // A closing curly brace marks the end of the object literal. if (value == '}') { break; } // If the object literal contains members, the current token // should be a comma separator. if (hasMembers) { if (value == ',') { value = lex(); if (value == '}') { // Unexpected trailing `,` in object literal. abort(); } } else { // A `,` must separate each object member. abort(); } } // Leading commas are not permitted, object property names must be // double-quoted strings, and a `:` must separate each property // name and value. if ( value == ',' || typeof value != 'string' || (charIndexBuggy ? value.charAt(0) : value[0]) != '@' || lex() != ':' ) { abort(); } results[value.slice(1)] = get(lex()); } return results; } // Unexpected token encountered. abort(); } return value; }; // Internal: Updates a traversed object member. var update = function (source, property, callback) { var element = walk(source, property, callback); if (element === undef) { delete source[property]; } else { source[property] = element; } }; // Internal: Recursively traverses a parsed JSON object, invoking the // `callback` function for each value. This is an implementation of the // `Walk(holder, name)` operation defined in ES 5.1 section 15.12.2. var walk = function (source, property, callback) { var value = source[property], length; if (typeof value == 'object' && value) { // `forEach` can't be used to traverse an array in Opera <= 8.54 // because its `Object#hasOwnProperty` implementation returns `false` // for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`). if (getClass.call(value) == arrayClass) { for (length = value.length; length--; ) { update(value, length, callback); } } else { forEach(value, function (property) { update(value, property, callback); }); } } return callback.call(source, property, value); }; // Public: `JSON.parse`. See ES 5.1 section 15.12.2. exports.parse = function (source, callback) { var result, value; Index = 0; Source = '' + source; result = get(lex()); // If a JSON string contains multiple tokens, it is invalid. if (lex() != '$') { abort(); } // Reset the parser state. Index = Source = null; return callback && getClass.call(callback) == functionClass ? walk(((value = {}), (value[''] = result), value), '', callback) : result; }; } } exports['runInContext'] = runInContext; return exports; } if (freeExports && !isLoader) { // Export for CommonJS environments. runInContext(root, freeExports); } else { // Export for web browsers and JavaScript engines. var nativeJSON = root.JSON, previousJSON = root['JSON3'], isRestored = false; var JSON3 = runInContext( root, (root['JSON3'] = { // Public: Restores the original value of the global `JSON` object and // returns a reference to the `JSON3` object. noConflict: function () { if (!isRestored) { isRestored = true; root.JSON = nativeJSON; root['JSON3'] = previousJSON; nativeJSON = previousJSON = null; } return JSON3; }, }) ); root.JSON = { parse: JSON3.parse, stringify: JSON3.stringify, }; } // Export for asynchronous module loaders. if (isLoader) { define(function () { return JSON3; }); } }.call(this)); /* WEBPACK VAR INJECTION */ }.call( exports, __webpack_require__(12)(module), (function () { return this; })() )); /***/ }, /* 12 */ /***/ function (module, exports) { module.exports = function (module) { if (!module.webpackPolyfill) { module.deprecate = function () {}; module.paths = []; // module.parent = undefined by default module.children = []; module.webpackPolyfill = 1; } return module; }; /***/ }, /* 13 */ /***/ function (module, exports) { /** * Expose `Emitter`. */ module.exports = Emitter; /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); } /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Emitter.prototype) { obj[key] = Emitter.prototype[key]; } return obj; } /** * Listen on the given `event` with `fn`. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; (this._callbacks[event] = this._callbacks[event] || []).push(fn); return this; }; /** * Adds an `event` listener that will be invoked a single * time then automatically removed. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.once = function (event, fn) { var self = this; this._callbacks = this._callbacks || {}; function on() { self.off(event, on); fn.apply(this, arguments); } on.fn = fn; this.on(event, on); return this; }; /** * Remove the given callback for `event` or all * registered callbacks. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; // all if (0 == arguments.length) { this._callbacks = {}; return this; } // specific event var callbacks = this._callbacks[event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { delete this._callbacks[event]; return this; } // remove specific handler var cb; for (var i = 0; i < callbacks.length; i++) { cb = callbacks[i]; if (cb === fn || cb.fn === fn) { callbacks.splice(i, 1); break; } } return this; }; /** * Emit `event` with the given args. * * @param {String} event * @param {Mixed} ... * @return {Emitter} */ Emitter.prototype.emit = function (event) { this._callbacks = this._callbacks || {}; var args = [].slice.call(arguments, 1), callbacks = this._callbacks[event]; if (callbacks) { callbacks = callbacks.slice(0); for (var i = 0, len = callbacks.length; i < len; ++i) { callbacks[i].apply(this, args); } } return this; }; /** * Return array of callbacks for `event`. * * @param {String} event * @return {Array} * @api public */ Emitter.prototype.listeners = function (event) { this._callbacks = this._callbacks || {}; return this._callbacks[event] || []; }; /** * Check if this emitter has `event` handlers. * * @param {String} event * @return {Boolean} * @api public */ Emitter.prototype.hasListeners = function (event) { return !!this.listeners(event).length; }; /***/ }, /* 14 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /*global Blob,File*/ /** * Module requirements */ var isArray = __webpack_require__(15); var isBuf = __webpack_require__(16); /** * Replaces every Buffer | ArrayBuffer in packet with a numbered placeholder. * Anything with blobs or files should be fed through removeBlobs before coming * here. * * @param {Object} packet - socket.io event packet * @return {Object} with deconstructed packet and list of buffers * @api public */ exports.deconstructPacket = function (packet) { var buffers = []; var packetData = packet.data; function _deconstructPacket(data) { if (!data) return data; if (isBuf(data)) { var placeholder = { _placeholder: true, num: buffers.length }; buffers.push(data); return placeholder; } else if (isArray(data)) { var newData = new Array(data.length); for (var i = 0; i < data.length; i++) { newData[i] = _deconstructPacket(data[i]); } return newData; } else if ('object' == typeof data && !(data instanceof Date)) { var newData = {}; for (var key in data) { newData[key] = _deconstructPacket(data[key]); } return newData; } return data; } var pack = packet; pack.data = _deconstructPacket(packetData); pack.attachments = buffers.length; // number of binary 'attachments' return { packet: pack, buffers: buffers }; }; /** * Reconstructs a binary packet from its placeholder packet and buffers * * @param {Object} packet - event packet with placeholders * @param {Array} buffers - binary buffers to put in placeholder positions * @return {Object} reconstructed packet * @api public */ exports.reconstructPacket = function (packet, buffers) { var curPlaceHolder = 0; function _reconstructPacket(data) { if (data && data._placeholder) { var buf = buffers[data.num]; // appropriate buffer (should be natural order anyway) return buf; } else if (isArray(data)) { for (var i = 0; i < data.length; i++) { data[i] = _reconstructPacket(data[i]); } return data; } else if (data && 'object' == typeof data) { for (var key in data) { data[key] = _reconstructPacket(data[key]); } return data; } return data; } packet.data = _reconstructPacket(packet.data); packet.attachments = undefined; // no longer useful return packet; }; /** * Asynchronously removes Blobs or Files from data via * FileReader's readAsArrayBuffer method. Used before encoding * data as msgpack. Calls callback with the blobless data. * * @param {Object} data * @param {Function} callback * @api private */ exports.removeBlobs = function (data, callback) { function _removeBlobs(obj, curKey, containingObject) { if (!obj) return obj; // convert any blob if ((global.Blob && obj instanceof Blob) || (global.File && obj instanceof File)) { pendingBlobs++; // async filereader var fileReader = new FileReader(); fileReader.onload = function () { // this.result == arraybuffer if (containingObject) { containingObject[curKey] = this.result; } else { bloblessData = this.result; } // if nothing pending its callback time if (!--pendingBlobs) { callback(bloblessData); } }; fileReader.readAsArrayBuffer(obj); // blob -> arraybuffer } else if (isArray(obj)) { // handle array for (var i = 0; i < obj.length; i++) { _removeBlobs(obj[i], i, obj); } } else if (obj && 'object' == typeof obj && !isBuf(obj)) { // and object for (var key in obj) { _removeBlobs(obj[key], key, obj); } } } var pendingBlobs = 0; var bloblessData = data; _removeBlobs(bloblessData); if (!pendingBlobs) { callback(bloblessData); } }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 15 */ /***/ function (module, exports) { module.exports = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) == '[object Array]'; }; /***/ }, /* 16 */ /***/ function (module, exports) { /* WEBPACK VAR INJECTION */ (function (global) { module.exports = isBuf; /** * Returns true if obj is a buffer or an arraybuffer. * * @api private */ function isBuf(obj) { return (global.Buffer && global.Buffer.isBuffer(obj)) || (global.ArrayBuffer && obj instanceof ArrayBuffer); } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 17 */ /***/ function (module, exports, __webpack_require__) { 'use strict'; var _typeof = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === 'function' && obj.constructor === Symbol && obj !== Symbol.prototype ? 'symbol' : typeof obj; }; /** * Module dependencies. */ var eio = __webpack_require__(18); var Socket = __webpack_require__(45); var Emitter = __webpack_require__(36); var parser = __webpack_require__(7); var on = __webpack_require__(47); var bind = __webpack_require__(48); var debug = __webpack_require__(3)('socket.io-client:manager'); var indexOf = __webpack_require__(43); var Backoff = __webpack_require__(51); /** * IE6+ hasOwnProperty */ var has = Object.prototype.hasOwnProperty; /** * Module exports */ module.exports = Manager; /** * `Manager` constructor. * * @param {String} engine instance or engine uri/opts * @param {Object} options * @api public */ function Manager(uri, opts) { if (!(this instanceof Manager)) return new Manager(uri, opts); if (uri && 'object' === (typeof uri === 'undefined' ? 'undefined' : _typeof(uri))) { opts = uri; uri = undefined; } opts = opts || {}; opts.path = opts.path || '/socket.io'; this.nsps = {}; this.subs = []; this.opts = opts; this.reconnection(opts.reconnection !== false); this.reconnectionAttempts(opts.reconnectionAttempts || Infinity); this.reconnectionDelay(opts.reconnectionDelay || 1000); this.reconnectionDelayMax(opts.reconnectionDelayMax || 5000); this.randomizationFactor(opts.randomizationFactor || 0.5); this.backoff = new Backoff({ min: this.reconnectionDelay(), max: this.reconnectionDelayMax(), jitter: this.randomizationFactor(), }); this.timeout(null == opts.timeout ? 20000 : opts.timeout); this.readyState = 'closed'; this.uri = uri; this.connecting = []; this.lastPing = null; this.encoding = false; this.packetBuffer = []; this.encoder = new parser.Encoder(); this.decoder = new parser.Decoder(); this.autoConnect = opts.autoConnect !== false; if (this.autoConnect) this.open(); } /** * Propagate given event to sockets and emit on `this` * * @api private */ Manager.prototype.emitAll = function () { this.emit.apply(this, arguments); for (var nsp in this.nsps) { if (has.call(this.nsps, nsp)) { this.nsps[nsp].emit.apply(this.nsps[nsp], arguments); } } }; /** * Update `socket.id` of all sockets * * @api private */ Manager.prototype.updateSocketIds = function () { for (var nsp in this.nsps) { if (has.call(this.nsps, nsp)) { this.nsps[nsp].id = this.engine.id; } } }; /** * Mix in `Emitter`. */ Emitter(Manager.prototype); /** * Sets the `reconnection` config. * * @param {Boolean} true/false if it should automatically reconnect * @return {Manager} self or value * @api public */ Manager.prototype.reconnection = function (v) { if (!arguments.length) return this._reconnection; this._reconnection = !!v; return this; }; /** * Sets the reconnection attempts config. * * @param {Number} max reconnection attempts before giving up * @return {Manager} self or value * @api public */ Manager.prototype.reconnectionAttempts = function (v) { if (!arguments.length) return this._reconnectionAttempts; this._reconnectionAttempts = v; return this; }; /** * Sets the delay between reconnections. * * @param {Number} delay * @return {Manager} self or value * @api public */ Manager.prototype.reconnectionDelay = function (v) { if (!arguments.length) return this._reconnectionDelay; this._reconnectionDelay = v; this.backoff && this.backoff.setMin(v); return this; }; Manager.prototype.randomizationFactor = function (v) { if (!arguments.length) return this._randomizationFactor; this._randomizationFactor = v; this.backoff && this.backoff.setJitter(v); return this; }; /** * Sets the maximum delay between reconnections. * * @param {Number} delay * @return {Manager} self or value * @api public */ Manager.prototype.reconnectionDelayMax = function (v) { if (!arguments.length) return this._reconnectionDelayMax; this._reconnectionDelayMax = v; this.backoff && this.backoff.setMax(v); return this; }; /** * Sets the connection timeout. `false` to disable * * @return {Manager} self or value * @api public */ Manager.prototype.timeout = function (v) { if (!arguments.length) return this._timeout; this._timeout = v; return this; }; /** * Starts trying to reconnect if reconnection is enabled and we have not * started reconnecting yet * * @api private */ Manager.prototype.maybeReconnectOnOpen = function () { // Only try to reconnect if it's the first time we're connecting if (!this.reconnecting && this._reconnection && this.backoff.attempts === 0) { // keeps reconnection from firing twice for the same reconnection loop this.reconnect(); } }; /** * Sets the current transport `socket`. * * @param {Function} optional, callback * @return {Manager} self * @api public */ Manager.prototype.open = Manager.prototype.connect = function (fn, opts) { debug('readyState %s', this.readyState); if (~this.readyState.indexOf('open')) return this; debug('opening %s', this.uri); this.engine = eio(this.uri, this.opts); var socket = this.engine; var self = this; this.readyState = 'opening'; this.skipReconnect = false; // emit `open` var openSub = on(socket, 'open', function () { self.onopen(); fn && fn(); }); // emit `connect_error` var errorSub = on(socket, 'error', function (data) { debug('connect_error'); self.cleanup(); self.readyState = 'closed'; self.emitAll('connect_error', data); if (fn) { var err = new Error('Connection error'); err.data = data; fn(err); } else { // Only do this if there is no fn to handle the error self.maybeReconnectOnOpen(); } }); // emit `connect_timeout` if (false !== this._timeout) { var timeout = this._timeout; debug('connect attempt will timeout after %d', timeout); // set timer var timer = setTimeout(function () { debug('connect attempt timed out after %d', timeout); openSub.destroy(); socket.close(); socket.emit('error', 'timeout'); self.emitAll('connect_timeout', timeout); }, timeout); this.subs.push({ destroy: function destroy() { clearTimeout(timer); }, }); } this.subs.push(openSub); this.subs.push(errorSub); return this; }; /** * Called upon transport open. * * @api private */ Manager.prototype.onopen = function () { debug('open'); // clear old subs this.cleanup(); // mark as open this.readyState = 'open'; this.emit('open'); // add new subs var socket = this.engine; this.subs.push(on(socket, 'data', bind(this, 'ondata'))); this.subs.push(on(socket, 'ping', bind(this, 'onping'))); this.subs.push(on(socket, 'pong', bind(this, 'onpong'))); this.subs.push(on(socket, 'error', bind(this, 'onerror'))); this.subs.push(on(socket, 'close', bind(this, 'onclose'))); this.subs.push(on(this.decoder, 'decoded', bind(this, 'ondecoded'))); }; /** * Called upon a ping. * * @api private */ Manager.prototype.onping = function () { this.lastPing = new Date(); this.emitAll('ping'); }; /** * Called upon a packet. * * @api private */ Manager.prototype.onpong = function () { this.emitAll('pong', new Date() - this.lastPing); }; /** * Called with data. * * @api private */ Manager.prototype.ondata = function (data) { this.decoder.add(data); }; /** * Called when parser fully decodes a packet. * * @api private */ Manager.prototype.ondecoded = function (packet) { this.emit('packet', packet); }; /** * Called upon socket error. * * @api private */ Manager.prototype.onerror = function (err) { debug('error', err); this.emitAll('error', err); }; /** * Creates a new socket for the given `nsp`. * * @return {Socket} * @api public */ Manager.prototype.socket = function (nsp, opts) { var socket = this.nsps[nsp]; if (!socket) { socket = new Socket(this, nsp, opts); this.nsps[nsp] = socket; var self = this; socket.on('connecting', onConnecting); socket.on('connect', function () { socket.id = self.engine.id; }); if (this.autoConnect) { // manually call here since connecting evnet is fired before listening onConnecting(); } } function onConnecting() { if (!~indexOf(self.connecting, socket)) { self.connecting.push(socket); } } return socket; }; /** * Called upon a socket close. * * @param {Socket} socket */ Manager.prototype.destroy = function (socket) { var index = indexOf(this.connecting, socket); if (~index) this.connecting.splice(index, 1); if (this.connecting.length) return; this.close(); }; /** * Writes a packet. * * @param {Object} packet * @api private */ Manager.prototype.packet = function (packet) { debug('writing packet %j', packet); var self = this; if (packet.query && packet.type === 0) packet.nsp += '?' + packet.query; if (!self.encoding) { // encode, then write to engine with result self.encoding = true; this.encoder.encode(packet, function (encodedPackets) { for (var i = 0; i < encodedPackets.length; i++) { self.engine.write(encodedPackets[i], packet.options); } self.encoding = false; self.processPacketQueue(); }); } else { // add packet to the queue self.packetBuffer.push(packet); } }; /** * If packet buffer is non-empty, begins encoding the * next packet in line. * * @api private */ Manager.prototype.processPacketQueue = function () { if (this.packetBuffer.length > 0 && !this.encoding) { var pack = this.packetBuffer.shift(); this.packet(pack); } }; /** * Clean up transport subscriptions and packet buffer. * * @api private */ Manager.prototype.cleanup = function () { debug('cleanup'); var subsLength = this.subs.length; for (var i = 0; i < subsLength; i++) { var sub = this.subs.shift(); sub.destroy(); } this.packetBuffer = []; this.encoding = false; this.lastPing = null; this.decoder.destroy(); }; /** * Close the current socket. * * @api private */ Manager.prototype.close = Manager.prototype.disconnect = function () { debug('disconnect'); this.skipReconnect = true; this.reconnecting = false; if ('opening' === this.readyState) { // `onclose` will not fire because // an open event never happened this.cleanup(); } this.backoff.reset(); this.readyState = 'closed'; if (this.engine) this.engine.close(); }; /** * Called upon engine close. * * @api private */ Manager.prototype.onclose = function (reason) { debug('onclose'); this.cleanup(); this.backoff.reset(); this.readyState = 'closed'; this.emit('close', reason); if (this._reconnection && !this.skipReconnect) { this.reconnect(); } }; /** * Attempt a reconnection. * * @api private */ Manager.prototype.reconnect = function () { if (this.reconnecting || this.skipReconnect) return this; var self = this; if (this.backoff.attempts >= this._reconnectionAttempts) { debug('reconnect failed'); this.backoff.reset(); this.emitAll('reconnect_failed'); this.reconnecting = false; } else { var delay = this.backoff.duration(); debug('will wait %dms before reconnect attempt', delay); this.reconnecting = true; var timer = setTimeout(function () { if (self.skipReconnect) return; debug('attempting reconnect'); self.emitAll('reconnect_attempt', self.backoff.attempts); self.emitAll('reconnecting', self.backoff.attempts); // check again for the case socket closed in above events if (self.skipReconnect) return; self.open(function (err) { if (err) { debug('reconnect attempt error'); self.reconnecting = false; self.reconnect(); self.emitAll('reconnect_error', err.data); } else { debug('reconnect success'); self.onreconnect(); } }); }, delay); this.subs.push({ destroy: function destroy() { clearTimeout(timer); }, }); } }; /** * Called upon successful reconnect. * * @api private */ Manager.prototype.onreconnect = function () { var attempt = this.backoff.attempts; this.reconnecting = false; this.backoff.reset(); this.updateSocketIds(); this.emitAll('reconnect', attempt); }; /***/ }, /* 18 */ /***/ function (module, exports, __webpack_require__) { module.exports = __webpack_require__(19); /***/ }, /* 19 */ /***/ function (module, exports, __webpack_require__) { module.exports = __webpack_require__(20); /** * Exports parser * * @api public * */ module.exports.parser = __webpack_require__(27); /***/ }, /* 20 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module dependencies. */ var transports = __webpack_require__(21); var Emitter = __webpack_require__(36); var debug = __webpack_require__(3)('engine.io-client:socket'); var index = __webpack_require__(43); var parser = __webpack_require__(27); var parseuri = __webpack_require__(2); var parsejson = __webpack_require__(44); var parseqs = __webpack_require__(37); /** * Module exports. */ module.exports = Socket; /** * Socket constructor. * * @param {String|Object} uri or options * @param {Object} options * @api public */ function Socket(uri, opts) { if (!(this instanceof Socket)) return new Socket(uri, opts); opts = opts || {}; if (uri && 'object' === typeof uri) { opts = uri; uri = null; } if (uri) { uri = parseuri(uri); opts.hostname = uri.host; opts.secure = uri.protocol === 'https' || uri.protocol === 'wss'; opts.port = uri.port; if (uri.query) opts.query = uri.query; } else if (opts.host) { opts.hostname = parseuri(opts.host).host; } this.secure = null != opts.secure ? opts.secure : global.location && 'https:' === location.protocol; if (opts.hostname && !opts.port) { // if no port is specified manually, use the protocol default opts.port = this.secure ? '443' : '80'; } this.agent = opts.agent || false; this.hostname = opts.hostname || (global.location ? location.hostname : 'localhost'); this.port = opts.port || (global.location && location.port ? location.port : this.secure ? 443 : 80); this.query = opts.query || {}; if ('string' === typeof this.query) this.query = parseqs.decode(this.query); this.upgrade = false !== opts.upgrade; this.path = (opts.path || '/engine.io').replace(/\/$/, '') + '/'; this.forceJSONP = !!opts.forceJSONP; this.jsonp = false !== opts.jsonp; this.forceBase64 = !!opts.forceBase64; this.enablesXDR = !!opts.enablesXDR; this.timestampParam = opts.timestampParam || 't'; this.timestampRequests = opts.timestampRequests; this.transports = opts.transports || ['polling', 'websocket']; this.readyState = ''; this.writeBuffer = []; this.prevBufferLen = 0; this.policyPort = opts.policyPort || 843; this.rememberUpgrade = opts.rememberUpgrade || false; this.binaryType = null; this.onlyBinaryUpgrades = opts.onlyBinaryUpgrades; this.perMessageDeflate = false !== opts.perMessageDeflate ? opts.perMessageDeflate || {} : false; if (true === this.perMessageDeflate) this.perMessageDeflate = {}; if (this.perMessageDeflate && null == this.perMessageDeflate.threshold) { this.perMessageDeflate.threshold = 1024; } // SSL options for Node.js client this.pfx = opts.pfx || null; this.key = opts.key || null; this.passphrase = opts.passphrase || null; this.cert = opts.cert || null; this.ca = opts.ca || null; this.ciphers = opts.ciphers || null; this.rejectUnauthorized = opts.rejectUnauthorized === undefined ? null : opts.rejectUnauthorized; this.forceNode = !!opts.forceNode; // other options for Node.js client var freeGlobal = typeof global === 'object' && global; if (freeGlobal.global === freeGlobal) { if (opts.extraHeaders && Object.keys(opts.extraHeaders).length > 0) { this.extraHeaders = opts.extraHeaders; } if (opts.localAddress) { this.localAddress = opts.localAddress; } } // set on handshake this.id = null; this.upgrades = null; this.pingInterval = null; this.pingTimeout = null; // set on heartbeat this.pingIntervalTimer = null; this.pingTimeoutTimer = null; this.open(); } Socket.priorWebsocketSuccess = false; /** * Mix in `Emitter`. */ Emitter(Socket.prototype); /** * Protocol version. * * @api public */ Socket.protocol = parser.protocol; // this is an int /** * Expose deps for legacy compatibility * and standalone browser access. */ Socket.Socket = Socket; Socket.Transport = __webpack_require__(26); Socket.transports = __webpack_require__(21); Socket.parser = __webpack_require__(27); /** * Creates transport of the given type. * * @param {String} transport name * @return {Transport} * @api private */ Socket.prototype.createTransport = function (name) { debug('creating transport "%s"', name); var query = clone(this.query); // append engine.io protocol identifier query.EIO = parser.protocol; // transport name query.transport = name; // session id if we already have one if (this.id) query.sid = this.id; var transport = new transports[name]({ agent: this.agent, hostname: this.hostname, port: this.port, secure: this.secure, path: this.path, query: query, forceJSONP: this.forceJSONP, jsonp: this.jsonp, forceBase64: this.forceBase64, enablesXDR: this.enablesXDR, timestampRequests: this.timestampRequests, timestampParam: this.timestampParam, policyPort: this.policyPort, socket: this, pfx: this.pfx, key: this.key, passphrase: this.passphrase, cert: this.cert, ca: this.ca, ciphers: this.ciphers, rejectUnauthorized: this.rejectUnauthorized, perMessageDeflate: this.perMessageDeflate, extraHeaders: this.extraHeaders, forceNode: this.forceNode, localAddress: this.localAddress, }); return transport; }; function clone(obj) { var o = {}; for (var i in obj) { if (obj.hasOwnProperty(i)) { o[i] = obj[i]; } } return o; } /** * Initializes transport to use and starts probe. * * @api private */ Socket.prototype.open = function () { var transport; if (this.rememberUpgrade && Socket.priorWebsocketSuccess && this.transports.indexOf('websocket') !== -1) { transport = 'websocket'; } else if (0 === this.transports.length) { // Emit error on next tick so it can be listened to var self = this; setTimeout(function () { self.emit('error', 'No transports available'); }, 0); return; } else { transport = this.transports[0]; } this.readyState = 'opening'; // Retry with the next transport if the transport is disabled (jsonp: false) try { transport = this.createTransport(transport); } catch (e) { this.transports.shift(); this.open(); return; } transport.open(); this.setTransport(transport); }; /** * Sets the current transport. Disables the existing one (if any). * * @api private */ Socket.prototype.setTransport = function (transport) { debug('setting transport %s', transport.name); var self = this; if (this.transport) { debug('clearing existing transport %s', this.transport.name); this.transport.removeAllListeners(); } // set up transport this.transport = transport; // set up transport listeners transport .on('drain', function () { self.onDrain(); }) .on('packet', function (packet) { self.onPacket(packet); }) .on('error', function (e) { self.onError(e); }) .on('close', function () { self.onClose('transport close'); }); }; /** * Probes a transport. * * @param {String} transport name * @api private */ Socket.prototype.probe = function (name) { debug('probing transport "%s"', name); var transport = this.createTransport(name, { probe: 1 }); var failed = false; var self = this; Socket.priorWebsocketSuccess = false; function onTransportOpen() { if (self.onlyBinaryUpgrades) { var upgradeLosesBinary = !this.supportsBinary && self.transport.supportsBinary; failed = failed || upgradeLosesBinary; } if (failed) return; debug('probe transport "%s" opened', name); transport.send([{ type: 'ping', data: 'probe' }]); transport.once('packet', function (msg) { if (failed) return; if ('pong' === msg.type && 'probe' === msg.data) { debug('probe transport "%s" pong', name); self.upgrading = true; self.emit('upgrading', transport); if (!transport) return; Socket.priorWebsocketSuccess = 'websocket' === transport.name; debug('pausing current transport "%s"', self.transport.name); self.transport.pause(function () { if (failed) return; if ('closed' === self.readyState) return; debug('changing transport and sending upgrade packet'); cleanup(); self.setTransport(transport); transport.send([{ type: 'upgrade' }]); self.emit('upgrade', transport); transport = null; self.upgrading = false; self.flush(); }); } else { debug('probe transport "%s" failed', name); var err = new Error('probe error'); err.transport = transport.name; self.emit('upgradeError', err); } }); } function freezeTransport() { if (failed) return; // Any callback called by transport should be ignored since now failed = true; cleanup(); transport.close(); transport = null; } // Handle any error that happens while probing function onerror(err) { var error = new Error('probe error: ' + err); error.transport = transport.name; freezeTransport(); debug('probe transport "%s" failed because of error: %s', name, err); self.emit('upgradeError', error); } function onTransportClose() { onerror('transport closed'); } // When the socket is closed while we're probing function onclose() { onerror('socket closed'); } // When the socket is upgraded while we're probing function onupgrade(to) { if (transport && to.name !== transport.name) { debug('"%s" works - aborting "%s"', to.name, transport.name); freezeTransport(); } } // Remove all listeners on the transport and on self function cleanup() { transport.removeListener('open', onTransportOpen); transport.removeListener('error', onerror); transport.removeListener('close', onTransportClose); self.removeListener('close', onclose); self.removeListener('upgrading', onupgrade); } transport.once('open', onTransportOpen); transport.once('error', onerror); transport.once('close', onTransportClose); this.once('close', onclose); this.once('upgrading', onupgrade); transport.open(); }; /** * Called when connection is deemed open. * * @api public */ Socket.prototype.onOpen = function () { debug('socket open'); this.readyState = 'open'; Socket.priorWebsocketSuccess = 'websocket' === this.transport.name; this.emit('open'); this.flush(); // we check for `readyState` in case an `open` // listener already closed the socket if ('open' === this.readyState && this.upgrade && this.transport.pause) { debug('starting upgrade probes'); for (var i = 0, l = this.upgrades.length; i < l; i++) { this.probe(this.upgrades[i]); } } }; /** * Handles a packet. * * @api private */ Socket.prototype.onPacket = function (packet) { if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) { debug('socket receive: type "%s", data "%s"', packet.type, packet.data); this.emit('packet', packet); // Socket is live - any packet counts this.emit('heartbeat'); switch (packet.type) { case 'open': this.onHandshake(parsejson(packet.data)); break; case 'pong': this.setPing(); this.emit('pong'); break; case 'error': var err = new Error('server error'); err.code = packet.data; this.onError(err); break; case 'message': this.emit('data', packet.data); this.emit('message', packet.data); break; } } else { debug('packet received with socket readyState "%s"', this.readyState); } }; /** * Called upon handshake completion. * * @param {Object} handshake obj * @api private */ Socket.prototype.onHandshake = function (data) { this.emit('handshake', data); this.id = data.sid; this.transport.query.sid = data.sid; this.upgrades = this.filterUpgrades(data.upgrades); this.pingInterval = data.pingInterval; this.pingTimeout = data.pingTimeout; this.onOpen(); // In case open handler closes socket if ('closed' === this.readyState) return; this.setPing(); // Prolong liveness of socket on heartbeat this.removeListener('heartbeat', this.onHeartbeat); this.on('heartbeat', this.onHeartbeat); }; /** * Resets ping timeout. * * @api private */ Socket.prototype.onHeartbeat = function (timeout) { clearTimeout(this.pingTimeoutTimer); var self = this; self.pingTimeoutTimer = setTimeout(function () { if ('closed' === self.readyState) return; self.onClose('ping timeout'); }, timeout || self.pingInterval + self.pingTimeout); }; /** * Pings server every `this.pingInterval` and expects response * within `this.pingTimeout` or closes connection. * * @api private */ Socket.prototype.setPing = function () { var self = this; clearTimeout(self.pingIntervalTimer); self.pingIntervalTimer = setTimeout(function () { debug('writing ping packet - expecting pong within %sms', self.pingTimeout); self.ping(); self.onHeartbeat(self.pingTimeout); }, self.pingInterval); }; /** * Sends a ping packet. * * @api private */ Socket.prototype.ping = function () { var self = this; this.sendPacket('ping', function () { self.emit('ping'); }); }; /** * Called on `drain` event * * @api private */ Socket.prototype.onDrain = function () { this.writeBuffer.splice(0, this.prevBufferLen); // setting prevBufferLen = 0 is very important // for example, when upgrading, upgrade packet is sent over, // and a nonzero prevBufferLen could cause problems on `drain` this.prevBufferLen = 0; if (0 === this.writeBuffer.length) { this.emit('drain'); } else { this.flush(); } }; /** * Flush write buffers. * * @api private */ Socket.prototype.flush = function () { if ('closed' !== this.readyState && this.transport.writable && !this.upgrading && this.writeBuffer.length) { debug('flushing %d packets in socket', this.writeBuffer.length); this.transport.send(this.writeBuffer); // keep track of current length of writeBuffer // splice writeBuffer and callbackBuffer on `drain` this.prevBufferLen = this.writeBuffer.length; this.emit('flush'); } }; /** * Sends a message. * * @param {String} message. * @param {Function} callback function. * @param {Object} options. * @return {Socket} for chaining. * @api public */ Socket.prototype.write = Socket.prototype.send = function (msg, options, fn) { this.sendPacket('message', msg, options, fn); return this; }; /** * Sends a packet. * * @param {String} packet type. * @param {String} data. * @param {Object} options. * @param {Function} callback function. * @api private */ Socket.prototype.sendPacket = function (type, data, options, fn) { if ('function' === typeof data) { fn = data; data = undefined; } if ('function' === typeof options) { fn = options; options = null; } if ('closing' === this.readyState || 'closed' === this.readyState) { return; } options = options || {}; options.compress = false !== options.compress; var packet = { type: type, data: data, options: options, }; this.emit('packetCreate', packet); this.writeBuffer.push(packet); if (fn) this.once('flush', fn); this.flush(); }; /** * Closes the connection. * * @api private */ Socket.prototype.close = function () { if ('opening' === this.readyState || 'open' === this.readyState) { this.readyState = 'closing'; var self = this; if (this.writeBuffer.length) { this.once('drain', function () { if (this.upgrading) { waitForUpgrade(); } else { close(); } }); } else if (this.upgrading) { waitForUpgrade(); } else { close(); } } function close() { self.onClose('forced close'); debug('socket closing - telling transport to close'); self.transport.close(); } function cleanupAndClose() { self.removeListener('upgrade', cleanupAndClose); self.removeListener('upgradeError', cleanupAndClose); close(); } function waitForUpgrade() { // wait for upgrade to finish since we can't send packets while pausing a transport self.once('upgrade', cleanupAndClose); self.once('upgradeError', cleanupAndClose); } return this; }; /** * Called upon transport error * * @api private */ Socket.prototype.onError = function (err) { debug('socket error %j', err); Socket.priorWebsocketSuccess = false; this.emit('error', err); this.onClose('transport error', err); }; /** * Called upon transport close. * * @api private */ Socket.prototype.onClose = function (reason, desc) { if ('opening' === this.readyState || 'open' === this.readyState || 'closing' === this.readyState) { debug('socket close with reason: "%s"', reason); var self = this; // clear timers clearTimeout(this.pingIntervalTimer); clearTimeout(this.pingTimeoutTimer); // stop event from firing again for transport this.transport.removeAllListeners('close'); // ensure transport won't stay open this.transport.close(); // ignore further transport communication this.transport.removeAllListeners(); // set ready state this.readyState = 'closed'; // clear session id this.id = null; // emit close event this.emit('close', reason, desc); // clean buffers after, so users can still // grab the buffers on `close` event self.writeBuffer = []; self.prevBufferLen = 0; } }; /** * Filters upgrades, returning only those matching client transports. * * @param {Array} server upgrades * @api private * */ Socket.prototype.filterUpgrades = function (upgrades) { var filteredUpgrades = []; for (var i = 0, j = upgrades.length; i < j; i++) { if (~index(this.transports, upgrades[i])) filteredUpgrades.push(upgrades[i]); } return filteredUpgrades; }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 21 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module dependencies */ var XMLHttpRequest = __webpack_require__(22); var XHR = __webpack_require__(24); var JSONP = __webpack_require__(40); var websocket = __webpack_require__(41); /** * Export transports. */ exports.polling = polling; exports.websocket = websocket; /** * Polling transport polymorphic constructor. * Decides on xhr vs jsonp based on feature detection. * * @api private */ function polling(opts) { var xhr; var xd = false; var xs = false; var jsonp = false !== opts.jsonp; if (global.location) { var isSSL = 'https:' === location.protocol; var port = location.port; // some user agents have empty `location.port` if (!port) { port = isSSL ? 443 : 80; } xd = opts.hostname !== location.hostname || port !== opts.port; xs = opts.secure !== isSSL; } opts.xdomain = xd; opts.xscheme = xs; xhr = new XMLHttpRequest(opts); if ('open' in xhr && !opts.forceJSONP) { return new XHR(opts); } else { if (!jsonp) throw new Error('JSONP disabled'); return new JSONP(opts); } } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 22 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { // browser shim for xmlhttprequest module var hasCORS = __webpack_require__(23); module.exports = function (opts) { var xdomain = opts.xdomain; // scheme must be same when usign XDomainRequest // http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx var xscheme = opts.xscheme; // XDomainRequest has a flow of not sending cookie, therefore it should be disabled as a default. // https://github.com/Automattic/engine.io-client/pull/217 var enablesXDR = opts.enablesXDR; // XMLHttpRequest can be disabled on IE try { if ('undefined' !== typeof XMLHttpRequest && (!xdomain || hasCORS)) { return new XMLHttpRequest(); } } catch (e) {} // Use XDomainRequest for IE8 if enablesXDR is true // because loading bar keeps flashing when using jsonp-polling // https://github.com/yujiosaka/socke.io-ie8-loading-example try { if ('undefined' !== typeof XDomainRequest && !xscheme && enablesXDR) { return new XDomainRequest(); } } catch (e) {} if (!xdomain) { try { return new global[['Active'].concat('Object').join('X')]('Microsoft.XMLHTTP'); } catch (e) {} } }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 23 */ /***/ function (module, exports) { /** * Module exports. * * Logic borrowed from Modernizr: * * - https://github.com/Modernizr/Modernizr/blob/master/feature-detects/cors.js */ try { module.exports = typeof XMLHttpRequest !== 'undefined' && 'withCredentials' in new XMLHttpRequest(); } catch (err) { // if XMLHttp support is disabled in IE then it will throw // when trying to create module.exports = false; } /***/ }, /* 24 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module requirements. */ var XMLHttpRequest = __webpack_require__(22); var Polling = __webpack_require__(25); var Emitter = __webpack_require__(36); var inherit = __webpack_require__(38); var debug = __webpack_require__(3)('engine.io-client:polling-xhr'); /** * Module exports. */ module.exports = XHR; module.exports.Request = Request; /** * Empty function */ function empty() {} /** * XHR Polling constructor. * * @param {Object} opts * @api public */ function XHR(opts) { Polling.call(this, opts); this.requestTimeout = opts.requestTimeout; if (global.location) { var isSSL = 'https:' === location.protocol; var port = location.port; // some user agents have empty `location.port` if (!port) { port = isSSL ? 443 : 80; } this.xd = opts.hostname !== global.location.hostname || port !== opts.port; this.xs = opts.secure !== isSSL; } else { this.extraHeaders = opts.extraHeaders; } } /** * Inherits from Polling. */ inherit(XHR, Polling); /** * XHR supports binary */ XHR.prototype.supportsBinary = true; /** * Creates a request. * * @param {String} method * @api private */ XHR.prototype.request = function (opts) { opts = opts || {}; opts.uri = this.uri(); opts.xd = this.xd; opts.xs = this.xs; opts.agent = this.agent || false; opts.supportsBinary = this.supportsBinary; opts.enablesXDR = this.enablesXDR; // SSL options for Node.js client opts.pfx = this.pfx; opts.key = this.key; opts.passphrase = this.passphrase; opts.cert = this.cert; opts.ca = this.ca; opts.ciphers = this.ciphers; opts.rejectUnauthorized = this.rejectUnauthorized; opts.requestTimeout = this.requestTimeout; // other options for Node.js client opts.extraHeaders = this.extraHeaders; return new Request(opts); }; /** * Sends data. * * @param {String} data to send. * @param {Function} called upon flush. * @api private */ XHR.prototype.doWrite = function (data, fn) { var isBinary = typeof data !== 'string' && data !== undefined; var req = this.request({ method: 'POST', data: data, isBinary: isBinary }); var self = this; req.on('success', fn); req.on('error', function (err) { self.onError('xhr post error', err); }); this.sendXhr = req; }; /** * Starts a poll cycle. * * @api private */ XHR.prototype.doPoll = function () { debug('xhr poll'); var req = this.request(); var self = this; req.on('data', function (data) { self.onData(data); }); req.on('error', function (err) { self.onError('xhr poll error', err); }); this.pollXhr = req; }; /** * Request constructor * * @param {Object} options * @api public */ function Request(opts) { this.method = opts.method || 'GET'; this.uri = opts.uri; this.xd = !!opts.xd; this.xs = !!opts.xs; this.async = false !== opts.async; this.data = undefined !== opts.data ? opts.data : null; this.agent = opts.agent; this.isBinary = opts.isBinary; this.supportsBinary = opts.supportsBinary; this.enablesXDR = opts.enablesXDR; this.requestTimeout = opts.requestTimeout; // SSL options for Node.js client this.pfx = opts.pfx; this.key = opts.key; this.passphrase = opts.passphrase; this.cert = opts.cert; this.ca = opts.ca; this.ciphers = opts.ciphers; this.rejectUnauthorized = opts.rejectUnauthorized; // other options for Node.js client this.extraHeaders = opts.extraHeaders; this.create(); } /** * Mix in `Emitter`. */ Emitter(Request.prototype); /** * Creates the XHR object and sends the request. * * @api private */ Request.prototype.create = function () { var opts = { agent: this.agent, xdomain: this.xd, xscheme: this.xs, enablesXDR: this.enablesXDR }; // SSL options for Node.js client opts.pfx = this.pfx; opts.key = this.key; opts.passphrase = this.passphrase; opts.cert = this.cert; opts.ca = this.ca; opts.ciphers = this.ciphers; opts.rejectUnauthorized = this.rejectUnauthorized; var xhr = (this.xhr = new XMLHttpRequest(opts)); var self = this; try { debug('xhr open %s: %s', this.method, this.uri); xhr.open(this.method, this.uri, this.async); try { if (this.extraHeaders) { xhr.setDisableHeaderCheck(true); for (var i in this.extraHeaders) { if (this.extraHeaders.hasOwnProperty(i)) { xhr.setRequestHeader(i, this.extraHeaders[i]); } } } } catch (e) {} if (this.supportsBinary) { // This has to be done after open because Firefox is stupid // http://stackoverflow.com/questions/13216903/get-binary-data-with-xmlhttprequest-in-a-firefox-extension xhr.responseType = 'arraybuffer'; } if ('POST' === this.method) { try { if (this.isBinary) { xhr.setRequestHeader('Content-type', 'application/octet-stream'); } else { xhr.setRequestHeader('Content-type', 'text/plain;charset=UTF-8'); } } catch (e) {} } try { xhr.setRequestHeader('Accept', '*/*'); } catch (e) {} // ie6 check if ('withCredentials' in xhr) { xhr.withCredentials = true; } if (this.requestTimeout) { xhr.timeout = this.requestTimeout; } if (this.hasXDR()) { xhr.onload = function () { self.onLoad(); }; xhr.onerror = function () { self.onError(xhr.responseText); }; } else { xhr.onreadystatechange = function () { if (4 !== xhr.readyState) return; if (200 === xhr.status || 1223 === xhr.status) { self.onLoad(); } else { // make sure the `error` event handler that's user-set // does not throw in the same tick and gets caught here setTimeout(function () { self.onError(xhr.status); }, 0); } }; } debug('xhr data %s', this.data); xhr.send(this.data); } catch (e) { // Need to defer since .create() is called directly fhrom the constructor // and thus the 'error' event can only be only bound *after* this exception // occurs. Therefore, also, we cannot throw here at all. setTimeout(function () { self.onError(e); }, 0); return; } if (global.document) { this.index = Request.requestsCount++; Request.requests[this.index] = this; } }; /** * Called upon successful response. * * @api private */ Request.prototype.onSuccess = function () { this.emit('success'); this.cleanup(); }; /** * Called if we have data. * * @api private */ Request.prototype.onData = function (data) { this.emit('data', data); this.onSuccess(); }; /** * Called upon error. * * @api private */ Request.prototype.onError = function (err) { this.emit('error', err); this.cleanup(true); }; /** * Cleans up house. * * @api private */ Request.prototype.cleanup = function (fromError) { if ('undefined' === typeof this.xhr || null === this.xhr) { return; } // xmlhttprequest if (this.hasXDR()) { this.xhr.onload = this.xhr.onerror = empty; } else { this.xhr.onreadystatechange = empty; } if (fromError) { try { this.xhr.abort(); } catch (e) {} } if (global.document) { delete Request.requests[this.index]; } this.xhr = null; }; /** * Called upon load. * * @api private */ Request.prototype.onLoad = function () { var data; try { var contentType; try { contentType = this.xhr.getResponseHeader('Content-Type').split(';')[0]; } catch (e) {} if (contentType === 'application/octet-stream') { data = this.xhr.response || this.xhr.responseText; } else { if (!this.supportsBinary) { data = this.xhr.responseText; } else { try { data = String.fromCharCode.apply(null, new Uint8Array(this.xhr.response)); } catch (e) { var ui8Arr = new Uint8Array(this.xhr.response); var dataArray = []; for (var idx = 0, length = ui8Arr.length; idx < length; idx++) { dataArray.push(ui8Arr[idx]); } data = String.fromCharCode.apply(null, dataArray); } } } } catch (e) { this.onError(e); } if (null != data) { this.onData(data); } }; /** * Check if it has XDomainRequest. * * @api private */ Request.prototype.hasXDR = function () { return 'undefined' !== typeof global.XDomainRequest && !this.xs && this.enablesXDR; }; /** * Aborts the request. * * @api public */ Request.prototype.abort = function () { this.cleanup(); }; /** * Aborts pending requests when unloading the window. This is needed to prevent * memory leaks (e.g. when using IE) and to ensure that no spurious error is * emitted. */ Request.requestsCount = 0; Request.requests = {}; if (global.document) { if (global.attachEvent) { global.attachEvent('onunload', unloadHandler); } else if (global.addEventListener) { global.addEventListener('beforeunload', unloadHandler, false); } } function unloadHandler() { for (var i in Request.requests) { if (Request.requests.hasOwnProperty(i)) { Request.requests[i].abort(); } } } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 25 */ /***/ function (module, exports, __webpack_require__) { /** * Module dependencies. */ var Transport = __webpack_require__(26); var parseqs = __webpack_require__(37); var parser = __webpack_require__(27); var inherit = __webpack_require__(38); var yeast = __webpack_require__(39); var debug = __webpack_require__(3)('engine.io-client:polling'); /** * Module exports. */ module.exports = Polling; /** * Is XHR2 supported? */ var hasXHR2 = (function () { var XMLHttpRequest = __webpack_require__(22); var xhr = new XMLHttpRequest({ xdomain: false }); return null != xhr.responseType; })(); /** * Polling interface. * * @param {Object} opts * @api private */ function Polling(opts) { var forceBase64 = opts && opts.forceBase64; if (!hasXHR2 || forceBase64) { this.supportsBinary = false; } Transport.call(this, opts); } /** * Inherits from Transport. */ inherit(Polling, Transport); /** * Transport name. */ Polling.prototype.name = 'polling'; /** * Opens the socket (triggers polling). We write a PING message to determine * when the transport is open. * * @api private */ Polling.prototype.doOpen = function () { this.poll(); }; /** * Pauses polling. * * @param {Function} callback upon buffers are flushed and transport is paused * @api private */ Polling.prototype.pause = function (onPause) { var self = this; this.readyState = 'pausing'; function pause() { debug('paused'); self.readyState = 'paused'; onPause(); } if (this.polling || !this.writable) { var total = 0; if (this.polling) { debug('we are currently polling - waiting to pause'); total++; this.once('pollComplete', function () { debug('pre-pause polling complete'); --total || pause(); }); } if (!this.writable) { debug('we are currently writing - waiting to pause'); total++; this.once('drain', function () { debug('pre-pause writing complete'); --total || pause(); }); } } else { pause(); } }; /** * Starts polling cycle. * * @api public */ Polling.prototype.poll = function () { debug('polling'); this.polling = true; this.doPoll(); this.emit('poll'); }; /** * Overloads onData to detect payloads. * * @api private */ Polling.prototype.onData = function (data) { var self = this; debug('polling got data %s', data); var callback = function (packet, index, total) { // if its the first message we consider the transport open if ('opening' === self.readyState) { self.onOpen(); } // if its a close packet, we close the ongoing requests if ('close' === packet.type) { self.onClose(); return false; } // otherwise bypass onData and handle the message self.onPacket(packet); }; // decode payload parser.decodePayload(data, this.socket.binaryType, callback); // if an event did not trigger closing if ('closed' !== this.readyState) { // if we got data we're not polling this.polling = false; this.emit('pollComplete'); if ('open' === this.readyState) { this.poll(); } else { debug('ignoring poll - transport state "%s"', this.readyState); } } }; /** * For polling, send a close packet. * * @api private */ Polling.prototype.doClose = function () { var self = this; function close() { debug('writing close packet'); self.write([{ type: 'close' }]); } if ('open' === this.readyState) { debug('transport open - closing'); close(); } else { // in case we're trying to close while // handshaking is in progress (GH-164) debug('transport not open - deferring close'); this.once('open', close); } }; /** * Writes a packets payload. * * @param {Array} data packets * @param {Function} drain callback * @api private */ Polling.prototype.write = function (packets) { var self = this; this.writable = false; var callbackfn = function () { self.writable = true; self.emit('drain'); }; parser.encodePayload(packets, this.supportsBinary, function (data) { self.doWrite(data, callbackfn); }); }; /** * Generates uri for connection. * * @api private */ Polling.prototype.uri = function () { var query = this.query || {}; var schema = this.secure ? 'https' : 'http'; var port = ''; // cache busting is forced if (false !== this.timestampRequests) { query[this.timestampParam] = yeast(); } if (!this.supportsBinary && !query.sid) { query.b64 = 1; } query = parseqs.encode(query); // avoid port if default for schema if (this.port && (('https' === schema && Number(this.port) !== 443) || ('http' === schema && Number(this.port) !== 80))) { port = ':' + this.port; } // prepend ? to query if (query.length) { query = '?' + query; } var ipv6 = this.hostname.indexOf(':') !== -1; return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query; }; /***/ }, /* 26 */ /***/ function (module, exports, __webpack_require__) { /** * Module dependencies. */ var parser = __webpack_require__(27); var Emitter = __webpack_require__(36); /** * Module exports. */ module.exports = Transport; /** * Transport abstract constructor. * * @param {Object} options. * @api private */ function Transport(opts) { this.path = opts.path; this.hostname = opts.hostname; this.port = opts.port; this.secure = opts.secure; this.query = opts.query; this.timestampParam = opts.timestampParam; this.timestampRequests = opts.timestampRequests; this.readyState = ''; this.agent = opts.agent || false; this.socket = opts.socket; this.enablesXDR = opts.enablesXDR; // SSL options for Node.js client this.pfx = opts.pfx; this.key = opts.key; this.passphrase = opts.passphrase; this.cert = opts.cert; this.ca = opts.ca; this.ciphers = opts.ciphers; this.rejectUnauthorized = opts.rejectUnauthorized; this.forceNode = opts.forceNode; // other options for Node.js client this.extraHeaders = opts.extraHeaders; this.localAddress = opts.localAddress; } /** * Mix in `Emitter`. */ Emitter(Transport.prototype); /** * Emits an error. * * @param {String} str * @return {Transport} for chaining * @api public */ Transport.prototype.onError = function (msg, desc) { var err = new Error(msg); err.type = 'TransportError'; err.description = desc; this.emit('error', err); return this; }; /** * Opens the transport. * * @api public */ Transport.prototype.open = function () { if ('closed' === this.readyState || '' === this.readyState) { this.readyState = 'opening'; this.doOpen(); } return this; }; /** * Closes the transport. * * @api private */ Transport.prototype.close = function () { if ('opening' === this.readyState || 'open' === this.readyState) { this.doClose(); this.onClose(); } return this; }; /** * Sends multiple packets. * * @param {Array} packets * @api private */ Transport.prototype.send = function (packets) { if ('open' === this.readyState) { this.write(packets); } else { throw new Error('Transport not open'); } }; /** * Called upon open * * @api private */ Transport.prototype.onOpen = function () { this.readyState = 'open'; this.writable = true; this.emit('open'); }; /** * Called with data. * * @param {String} data * @api private */ Transport.prototype.onData = function (data) { var packet = parser.decodePacket(data, this.socket.binaryType); this.onPacket(packet); }; /** * Called with a decoded packet. */ Transport.prototype.onPacket = function (packet) { this.emit('packet', packet); }; /** * Called upon close. * * @api private */ Transport.prototype.onClose = function () { this.readyState = 'closed'; this.emit('close'); }; /***/ }, /* 27 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module dependencies. */ var keys = __webpack_require__(28); var hasBinary = __webpack_require__(29); var sliceBuffer = __webpack_require__(31); var after = __webpack_require__(32); var utf8 = __webpack_require__(33); var base64encoder; if (global && global.ArrayBuffer) { base64encoder = __webpack_require__(34); } /** * Check if we are running an android browser. That requires us to use * ArrayBuffer with polling transports... * * http://ghinda.net/jpeg-blob-ajax-android/ */ var isAndroid = typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent); /** * Check if we are running in PhantomJS. * Uploading a Blob with PhantomJS does not work correctly, as reported here: * https://github.com/ariya/phantomjs/issues/11395 * @type boolean */ var isPhantomJS = typeof navigator !== 'undefined' && /PhantomJS/i.test(navigator.userAgent); /** * When true, avoids using Blobs to encode payloads. * @type boolean */ var dontSendBlobs = isAndroid || isPhantomJS; /** * Current protocol version. */ exports.protocol = 3; /** * Packet types. */ var packets = (exports.packets = { open: 0, // non-ws close: 1, // non-ws ping: 2, pong: 3, message: 4, upgrade: 5, noop: 6, }); var packetslist = keys(packets); /** * Premade error packet. */ var err = { type: 'error', data: 'parser error' }; /** * Create a blob api even for blob builder when vendor prefixes exist */ var Blob = __webpack_require__(35); /** * Encodes a packet. * * <packet type id> [ <data> ] * * Example: * * 5hello world * 3 * 4 * * Binary is encoded in an identical principle * * @api private */ exports.encodePacket = function (packet, supportsBinary, utf8encode, callback) { if ('function' == typeof supportsBinary) { callback = supportsBinary; supportsBinary = false; } if ('function' == typeof utf8encode) { callback = utf8encode; utf8encode = null; } var data = packet.data === undefined ? undefined : packet.data.buffer || packet.data; if (global.ArrayBuffer && data instanceof ArrayBuffer) { return encodeArrayBuffer(packet, supportsBinary, callback); } else if (Blob && data instanceof global.Blob) { return encodeBlob(packet, supportsBinary, callback); } // might be an object with { base64: true, data: dataAsBase64String } if (data && data.base64) { return encodeBase64Object(packet, callback); } // Sending data as a utf-8 string var encoded = packets[packet.type]; // data fragment is optional if (undefined !== packet.data) { encoded += utf8encode ? utf8.encode(String(packet.data)) : String(packet.data); } return callback('' + encoded); }; function encodeBase64Object(packet, callback) { // packet data is an object { base64: true, data: dataAsBase64String } var message = 'b' + exports.packets[packet.type] + packet.data.data; return callback(message); } /** * Encode packet helpers for binary types */ function encodeArrayBuffer(packet, supportsBinary, callback) { if (!supportsBinary) { return exports.encodeBase64Packet(packet, callback); } var data = packet.data; var contentArray = new Uint8Array(data); var resultBuffer = new Uint8Array(1 + data.byteLength); resultBuffer[0] = packets[packet.type]; for (var i = 0; i < contentArray.length; i++) { resultBuffer[i + 1] = contentArray[i]; } return callback(resultBuffer.buffer); } function encodeBlobAsArrayBuffer(packet, supportsBinary, callback) { if (!supportsBinary) { return exports.encodeBase64Packet(packet, callback); } var fr = new FileReader(); fr.onload = function () { packet.data = fr.result; exports.encodePacket(packet, supportsBinary, true, callback); }; return fr.readAsArrayBuffer(packet.data); } function encodeBlob(packet, supportsBinary, callback) { if (!supportsBinary) { return exports.encodeBase64Packet(packet, callback); } if (dontSendBlobs) { return encodeBlobAsArrayBuffer(packet, supportsBinary, callback); } var length = new Uint8Array(1); length[0] = packets[packet.type]; var blob = new Blob([length.buffer, packet.data]); return callback(blob); } /** * Encodes a packet with binary data in a base64 string * * @param {Object} packet, has `type` and `data` * @return {String} base64 encoded message */ exports.encodeBase64Packet = function (packet, callback) { var message = 'b' + exports.packets[packet.type]; if (Blob && packet.data instanceof global.Blob) { var fr = new FileReader(); fr.onload = function () { var b64 = fr.result.split(',')[1]; callback(message + b64); }; return fr.readAsDataURL(packet.data); } var b64data; try { b64data = String.fromCharCode.apply(null, new Uint8Array(packet.data)); } catch (e) { // iPhone Safari doesn't let you apply with typed arrays var typed = new Uint8Array(packet.data); var basic = new Array(typed.length); for (var i = 0; i < typed.length; i++) { basic[i] = typed[i]; } b64data = String.fromCharCode.apply(null, basic); } message += global.btoa(b64data); return callback(message); }; /** * Decodes a packet. Changes format to Blob if requested. * * @return {Object} with `type` and `data` (if any) * @api private */ exports.decodePacket = function (data, binaryType, utf8decode) { if (data === undefined) { return err; } // String data if (typeof data == 'string') { if (data.charAt(0) == 'b') { return exports.decodeBase64Packet(data.substr(1), binaryType); } if (utf8decode) { data = tryDecode(data); if (data === false) { return err; } } var type = data.charAt(0); if (Number(type) != type || !packetslist[type]) { return err; } if (data.length > 1) { return { type: packetslist[type], data: data.substring(1) }; } else { return { type: packetslist[type] }; } } var asArray = new Uint8Array(data); var type = asArray[0]; var rest = sliceBuffer(data, 1); if (Blob && binaryType === 'blob') { rest = new Blob([rest]); } return { type: packetslist[type], data: rest }; }; function tryDecode(data) { try { data = utf8.decode(data); } catch (e) { return false; } return data; } /** * Decodes a packet encoded in a base64 string * * @param {String} base64 encoded message * @return {Object} with `type` and `data` (if any) */ exports.decodeBase64Packet = function (msg, binaryType) { var type = packetslist[msg.charAt(0)]; if (!base64encoder) { return { type: type, data: { base64: true, data: msg.substr(1) } }; } var data = base64encoder.decode(msg.substr(1)); if (binaryType === 'blob' && Blob) { data = new Blob([data]); } return { type: type, data: data }; }; /** * Encodes multiple messages (payload). * * <length>:data * * Example: * * 11:hello world2:hi * * If any contents are binary, they will be encoded as base64 strings. Base64 * encoded strings are marked with a b before the length specifier * * @param {Array} packets * @api private */ exports.encodePayload = function (packets, supportsBinary, callback) { if (typeof supportsBinary == 'function') { callback = supportsBinary; supportsBinary = null; } var isBinary = hasBinary(packets); if (supportsBinary && isBinary) { if (Blob && !dontSendBlobs) { return exports.encodePayloadAsBlob(packets, callback); } return exports.encodePayloadAsArrayBuffer(packets, callback); } if (!packets.length) { return callback('0:'); } function setLengthHeader(message) { return message.length + ':' + message; } function encodeOne(packet, doneCallback) { exports.encodePacket(packet, !isBinary ? false : supportsBinary, true, function (message) { doneCallback(null, setLengthHeader(message)); }); } map(packets, encodeOne, function (err, results) { return callback(results.join('')); }); }; /** * Async array map using after */ function map(ary, each, done) { var result = new Array(ary.length); var next = after(ary.length, done); var eachWithIndex = function (i, el, cb) { each(el, function (error, msg) { result[i] = msg; cb(error, result); }); }; for (var i = 0; i < ary.length; i++) { eachWithIndex(i, ary[i], next); } } /* * Decodes data when a payload is maybe expected. Possible binary contents are * decoded from their base64 representation * * @param {String} data, callback method * @api public */ exports.decodePayload = function (data, binaryType, callback) { if (typeof data != 'string') { return exports.decodePayloadAsBinary(data, binaryType, callback); } if (typeof binaryType === 'function') { callback = binaryType; binaryType = null; } var packet; if (data == '') { // parser error - ignoring payload return callback(err, 0, 1); } var length = '', n, msg; for (var i = 0, l = data.length; i < l; i++) { var chr = data.charAt(i); if (':' != chr) { length += chr; } else { if ('' == length || length != (n = Number(length))) { // parser error - ignoring payload return callback(err, 0, 1); } msg = data.substr(i + 1, n); if (length != msg.length) { // parser error - ignoring payload return callback(err, 0, 1); } if (msg.length) { packet = exports.decodePacket(msg, binaryType, true); if (err.type == packet.type && err.data == packet.data) { // parser error in individual packet - ignoring payload return callback(err, 0, 1); } var ret = callback(packet, i + n, l); if (false === ret) return; } // advance cursor i += n; length = ''; } } if (length != '') { // parser error - ignoring payload return callback(err, 0, 1); } }; /** * Encodes multiple messages (payload) as binary. * * <1 = binary, 0 = string><number from 0-9><number from 0-9>[...]<number * 255><data> * * Example: * 1 3 255 1 2 3, if the binary contents are interpreted as 8 bit integers * * @param {Array} packets * @return {ArrayBuffer} encoded payload * @api private */ exports.encodePayloadAsArrayBuffer = function (packets, callback) { if (!packets.length) { return callback(new ArrayBuffer(0)); } function encodeOne(packet, doneCallback) { exports.encodePacket(packet, true, true, function (data) { return doneCallback(null, data); }); } map(packets, encodeOne, function (err, encodedPackets) { var totalLength = encodedPackets.reduce(function (acc, p) { var len; if (typeof p === 'string') { len = p.length; } else { len = p.byteLength; } return acc + len.toString().length + len + 2; // string/binary identifier + separator = 2 }, 0); var resultArray = new Uint8Array(totalLength); var bufferIndex = 0; encodedPackets.forEach(function (p) { var isString = typeof p === 'string'; var ab = p; if (isString) { var view = new Uint8Array(p.length); for (var i = 0; i < p.length; i++) { view[i] = p.charCodeAt(i); } ab = view.buffer; } if (isString) { // not true binary resultArray[bufferIndex++] = 0; } else { // true binary resultArray[bufferIndex++] = 1; } var lenStr = ab.byteLength.toString(); for (var i = 0; i < lenStr.length; i++) { resultArray[bufferIndex++] = parseInt(lenStr[i]); } resultArray[bufferIndex++] = 255; var view = new Uint8Array(ab); for (var i = 0; i < view.length; i++) { resultArray[bufferIndex++] = view[i]; } }); return callback(resultArray.buffer); }); }; /** * Encode as Blob */ exports.encodePayloadAsBlob = function (packets, callback) { function encodeOne(packet, doneCallback) { exports.encodePacket(packet, true, true, function (encoded) { var binaryIdentifier = new Uint8Array(1); binaryIdentifier[0] = 1; if (typeof encoded === 'string') { var view = new Uint8Array(encoded.length); for (var i = 0; i < encoded.length; i++) { view[i] = encoded.charCodeAt(i); } encoded = view.buffer; binaryIdentifier[0] = 0; } var len = encoded instanceof ArrayBuffer ? encoded.byteLength : encoded.size; var lenStr = len.toString(); var lengthAry = new Uint8Array(lenStr.length + 1); for (var i = 0; i < lenStr.length; i++) { lengthAry[i] = parseInt(lenStr[i]); } lengthAry[lenStr.length] = 255; if (Blob) { var blob = new Blob([binaryIdentifier.buffer, lengthAry.buffer, encoded]); doneCallback(null, blob); } }); } map(packets, encodeOne, function (err, results) { return callback(new Blob(results)); }); }; /* * Decodes data when a payload is maybe expected. Strings are decoded by * interpreting each byte as a key code for entries marked to start with 0. See * description of encodePayloadAsBinary * * @param {ArrayBuffer} data, callback method * @api public */ exports.decodePayloadAsBinary = function (data, binaryType, callback) { if (typeof binaryType === 'function') { callback = binaryType; binaryType = null; } var bufferTail = data; var buffers = []; var numberTooLong = false; while (bufferTail.byteLength > 0) { var tailArray = new Uint8Array(bufferTail); var isString = tailArray[0] === 0; var msgLength = ''; for (var i = 1; ; i++) { if (tailArray[i] == 255) break; if (msgLength.length > 310) { numberTooLong = true; break; } msgLength += tailArray[i]; } if (numberTooLong) return callback(err, 0, 1); bufferTail = sliceBuffer(bufferTail, 2 + msgLength.length); msgLength = parseInt(msgLength); var msg = sliceBuffer(bufferTail, 0, msgLength); if (isString) { try { msg = String.fromCharCode.apply(null, new Uint8Array(msg)); } catch (e) { // iPhone Safari doesn't let you apply to typed arrays var typed = new Uint8Array(msg); msg = ''; for (var i = 0; i < typed.length; i++) { msg += String.fromCharCode(typed[i]); } } } buffers.push(msg); bufferTail = sliceBuffer(bufferTail, msgLength); } var total = buffers.length; buffers.forEach(function (buffer, i) { callback(exports.decodePacket(buffer, binaryType, true), i, total); }); }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 28 */ /***/ function (module, exports) { /** * Gets the keys for an object. * * @return {Array} keys * @api private */ module.exports = Object.keys || function keys(obj) { var arr = []; var has = Object.prototype.hasOwnProperty; for (var i in obj) { if (has.call(obj, i)) { arr.push(i); } } return arr; }; /***/ }, /* 29 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /* * Module requirements. */ var isArray = __webpack_require__(30); /** * Module exports. */ module.exports = hasBinary; /** * Checks for binary data. * * Right now only Buffer and ArrayBuffer are supported.. * * @param {Object} anything * @api public */ function hasBinary(data) { function _hasBinary(obj) { if (!obj) return false; if ( (global.Buffer && global.Buffer.isBuffer(obj)) || (global.ArrayBuffer && obj instanceof ArrayBuffer) || (global.Blob && obj instanceof Blob) || (global.File && obj instanceof File) ) { return true; } if (isArray(obj)) { for (var i = 0; i < obj.length; i++) { if (_hasBinary(obj[i])) { return true; } } } else if (obj && 'object' == typeof obj) { if (obj.toJSON) { obj = obj.toJSON(); } for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key) && _hasBinary(obj[key])) { return true; } } } return false; } return _hasBinary(data); } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 30 */ /***/ function (module, exports) { module.exports = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) == '[object Array]'; }; /***/ }, /* 31 */ /***/ function (module, exports) { /** * An abstraction for slicing an arraybuffer even when * ArrayBuffer.prototype.slice is not supported * * @api public */ module.exports = function (arraybuffer, start, end) { var bytes = arraybuffer.byteLength; start = start || 0; end = end || bytes; if (arraybuffer.slice) { return arraybuffer.slice(start, end); } if (start < 0) { start += bytes; } if (end < 0) { end += bytes; } if (end > bytes) { end = bytes; } if (start >= bytes || start >= end || bytes === 0) { return new ArrayBuffer(0); } var abv = new Uint8Array(arraybuffer); var result = new Uint8Array(end - start); for (var i = start, ii = 0; i < end; i++, ii++) { result[ii] = abv[i]; } return result.buffer; }; /***/ }, /* 32 */ /***/ function (module, exports) { module.exports = after; function after(count, callback, err_cb) { var bail = false; err_cb = err_cb || noop; proxy.count = count; return count === 0 ? callback() : proxy; function proxy(err, result) { if (proxy.count <= 0) { throw new Error('after called too many times'); } --proxy.count; // after first error, rest are passed to err_cb if (err) { bail = true; callback(err); // future error callbacks will go to error handler callback = err_cb; } else if (proxy.count === 0 && !bail) { callback(null, result); } } } function noop() {} /***/ }, /* 33 */ /***/ function (module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_RESULT__; /* WEBPACK VAR INJECTION */ (function (module, global) { /*! https://mths.be/wtf8 v1.0.0 by @mathias */ (function (root) { // Detect free variables `exports` var freeExports = typeof exports == 'object' && exports; // Detect free variable `module` var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; // Detect free variable `global`, from Node.js or Browserified code, // and use it as `root` var freeGlobal = typeof global == 'object' && global; if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) { root = freeGlobal; } /*--------------------------------------------------------------------------*/ var stringFromCharCode = String.fromCharCode; // Taken from https://mths.be/punycode function ucs2decode(string) { var output = []; var counter = 0; var length = string.length; var value; var extra; while (counter < length) { value = string.charCodeAt(counter++); if (value >= 0xd800 && value <= 0xdbff && counter < length) { // high surrogate, and there is a next character extra = string.charCodeAt(counter++); if ((extra & 0xfc00) == 0xdc00) { // low surrogate output.push(((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000); } else { // unmatched surrogate; only append this code unit, in case the next // code unit is the high surrogate of a surrogate pair output.push(value); counter--; } } else { output.push(value); } } return output; } // Taken from https://mths.be/punycode function ucs2encode(array) { var length = array.length; var index = -1; var value; var output = ''; while (++index < length) { value = array[index]; if (value > 0xffff) { value -= 0x10000; output += stringFromCharCode(((value >>> 10) & 0x3ff) | 0xd800); value = 0xdc00 | (value & 0x3ff); } output += stringFromCharCode(value); } return output; } /*--------------------------------------------------------------------------*/ function createByte(codePoint, shift) { return stringFromCharCode(((codePoint >> shift) & 0x3f) | 0x80); } function encodeCodePoint(codePoint) { if ((codePoint & 0xffffff80) == 0) { // 1-byte sequence return stringFromCharCode(codePoint); } var symbol = ''; if ((codePoint & 0xfffff800) == 0) { // 2-byte sequence symbol = stringFromCharCode(((codePoint >> 6) & 0x1f) | 0xc0); } else if ((codePoint & 0xffff0000) == 0) { // 3-byte sequence symbol = stringFromCharCode(((codePoint >> 12) & 0x0f) | 0xe0); symbol += createByte(codePoint, 6); } else if ((codePoint & 0xffe00000) == 0) { // 4-byte sequence symbol = stringFromCharCode(((codePoint >> 18) & 0x07) | 0xf0); symbol += createByte(codePoint, 12); symbol += createByte(codePoint, 6); } symbol += stringFromCharCode((codePoint & 0x3f) | 0x80); return symbol; } function wtf8encode(string) { var codePoints = ucs2decode(string); var length = codePoints.length; var index = -1; var codePoint; var byteString = ''; while (++index < length) { codePoint = codePoints[index]; byteString += encodeCodePoint(codePoint); } return byteString; } /*--------------------------------------------------------------------------*/ function readContinuationByte() { if (byteIndex >= byteCount) { throw Error('Invalid byte index'); } var continuationByte = byteArray[byteIndex] & 0xff; byteIndex++; if ((continuationByte & 0xc0) == 0x80) { return continuationByte & 0x3f; } // If we end up here, it’s not a continuation byte. throw Error('Invalid continuation byte'); } function decodeSymbol() { var byte1; var byte2; var byte3; var byte4; var codePoint; if (byteIndex > byteCount) { throw Error('Invalid byte index'); } if (byteIndex == byteCount) { return false; } // Read the first byte. byte1 = byteArray[byteIndex] & 0xff; byteIndex++; // 1-byte sequence (no continuation bytes) if ((byte1 & 0x80) == 0) { return byte1; } // 2-byte sequence if ((byte1 & 0xe0) == 0xc0) { var byte2 = readContinuationByte(); codePoint = ((byte1 & 0x1f) << 6) | byte2; if (codePoint >= 0x80) { return codePoint; } else { throw Error('Invalid continuation byte'); } } // 3-byte sequence (may include unpaired surrogates) if ((byte1 & 0xf0) == 0xe0) { byte2 = readContinuationByte(); byte3 = readContinuationByte(); codePoint = ((byte1 & 0x0f) << 12) | (byte2 << 6) | byte3; if (codePoint >= 0x0800) { return codePoint; } else { throw Error('Invalid continuation byte'); } } // 4-byte sequence if ((byte1 & 0xf8) == 0xf0) { byte2 = readContinuationByte(); byte3 = readContinuationByte(); byte4 = readContinuationByte(); codePoint = ((byte1 & 0x0f) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4; if (codePoint >= 0x010000 && codePoint <= 0x10ffff) { return codePoint; } } throw Error('Invalid WTF-8 detected'); } var byteArray; var byteCount; var byteIndex; function wtf8decode(byteString) { byteArray = ucs2decode(byteString); byteCount = byteArray.length; byteIndex = 0; var codePoints = []; var tmp; while ((tmp = decodeSymbol()) !== false) { codePoints.push(tmp); } return ucs2encode(codePoints); } /*--------------------------------------------------------------------------*/ var wtf8 = { version: '1.0.0', encode: wtf8encode, decode: wtf8decode, }; // Some AMD build optimizers, like r.js, check for specific condition patterns // like the following: if (true) { !((__WEBPACK_AMD_DEFINE_RESULT__ = function () { return wtf8; }.call(exports, __webpack_require__, exports, module)), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else if (freeExports && !freeExports.nodeType) { if (freeModule) { // in Node.js or RingoJS v0.8.0+ freeModule.exports = wtf8; } else { // in Narwhal or RingoJS v0.7.0- var object = {}; var hasOwnProperty = object.hasOwnProperty; for (var key in wtf8) { hasOwnProperty.call(wtf8, key) && (freeExports[key] = wtf8[key]); } } } else { // in Rhino or a web browser root.wtf8 = wtf8; } })(this); /* WEBPACK VAR INJECTION */ }.call( exports, __webpack_require__(12)(module), (function () { return this; })() )); /***/ }, /* 34 */ /***/ function (module, exports) { /* * base64-arraybuffer * https://github.com/niklasvh/base64-arraybuffer * * Copyright (c) 2012 Niklas von Hertzen * Licensed under the MIT license. */ (function () { 'use strict'; var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index. var lookup = new Uint8Array(256); for (var i = 0; i < chars.length; i++) { lookup[chars.charCodeAt(i)] = i; } exports.encode = function (arraybuffer) { var bytes = new Uint8Array(arraybuffer), i, len = bytes.length, base64 = ''; for (i = 0; i < len; i += 3) { base64 += chars[bytes[i] >> 2]; base64 += chars[((bytes[i] & 3) << 4) | (bytes[i + 1] >> 4)]; base64 += chars[((bytes[i + 1] & 15) << 2) | (bytes[i + 2] >> 6)]; base64 += chars[bytes[i + 2] & 63]; } if (len % 3 === 2) { base64 = base64.substring(0, base64.length - 1) + '='; } else if (len % 3 === 1) { base64 = base64.substring(0, base64.length - 2) + '=='; } return base64; }; exports.decode = function (base64) { var bufferLength = base64.length * 0.75, len = base64.length, i, p = 0, encoded1, encoded2, encoded3, encoded4; if (base64[base64.length - 1] === '=') { bufferLength--; if (base64[base64.length - 2] === '=') { bufferLength--; } } var arraybuffer = new ArrayBuffer(bufferLength), bytes = new Uint8Array(arraybuffer); for (i = 0; i < len; i += 4) { encoded1 = lookup[base64.charCodeAt(i)]; encoded2 = lookup[base64.charCodeAt(i + 1)]; encoded3 = lookup[base64.charCodeAt(i + 2)]; encoded4 = lookup[base64.charCodeAt(i + 3)]; bytes[p++] = (encoded1 << 2) | (encoded2 >> 4); bytes[p++] = ((encoded2 & 15) << 4) | (encoded3 >> 2); bytes[p++] = ((encoded3 & 3) << 6) | (encoded4 & 63); } return arraybuffer; }; })(); /***/ }, /* 35 */ /***/ function (module, exports) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Create a blob builder even when vendor prefixes exist */ var BlobBuilder = global.BlobBuilder || global.WebKitBlobBuilder || global.MSBlobBuilder || global.MozBlobBuilder; /** * Check if Blob constructor is supported */ var blobSupported = (function () { try { var a = new Blob(['hi']); return a.size === 2; } catch (e) { return false; } })(); /** * Check if Blob constructor supports ArrayBufferViews * Fails in Safari 6, so we need to map to ArrayBuffers there. */ var blobSupportsArrayBufferView = blobSupported && (function () { try { var b = new Blob([new Uint8Array([1, 2])]); return b.size === 2; } catch (e) { return false; } })(); /** * Check if BlobBuilder is supported */ var blobBuilderSupported = BlobBuilder && BlobBuilder.prototype.append && BlobBuilder.prototype.getBlob; /** * Helper function that maps ArrayBufferViews to ArrayBuffers * Used by BlobBuilder constructor and old browsers that didn't * support it in the Blob constructor. */ function mapArrayBufferViews(ary) { for (var i = 0; i < ary.length; i++) { var chunk = ary[i]; if (chunk.buffer instanceof ArrayBuffer) { var buf = chunk.buffer; // if this is a subarray, make a copy so we only // include the subarray region from the underlying buffer if (chunk.byteLength !== buf.byteLength) { var copy = new Uint8Array(chunk.byteLength); copy.set(new Uint8Array(buf, chunk.byteOffset, chunk.byteLength)); buf = copy.buffer; } ary[i] = buf; } } } function BlobBuilderConstructor(ary, options) { options = options || {}; var bb = new BlobBuilder(); mapArrayBufferViews(ary); for (var i = 0; i < ary.length; i++) { bb.append(ary[i]); } return options.type ? bb.getBlob(options.type) : bb.getBlob(); } function BlobConstructor(ary, options) { mapArrayBufferViews(ary); return new Blob(ary, options || {}); } module.exports = (function () { if (blobSupported) { return blobSupportsArrayBufferView ? global.Blob : BlobConstructor; } else if (blobBuilderSupported) { return BlobBuilderConstructor; } else { return undefined; } })(); /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 36 */ /***/ function (module, exports, __webpack_require__) { /** * Expose `Emitter`. */ if (true) { module.exports = Emitter; } /** * Initialize a new `Emitter`. * * @api public */ function Emitter(obj) { if (obj) return mixin(obj); } /** * Mixin the emitter properties. * * @param {Object} obj * @return {Object} * @api private */ function mixin(obj) { for (var key in Emitter.prototype) { obj[key] = Emitter.prototype[key]; } return obj; } /** * Listen on the given `event` with `fn`. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.on = Emitter.prototype.addEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; (this._callbacks['$' + event] = this._callbacks['$' + event] || []).push(fn); return this; }; /** * Adds an `event` listener that will be invoked a single * time then automatically removed. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.once = function (event, fn) { function on() { this.off(event, on); fn.apply(this, arguments); } on.fn = fn; this.on(event, on); return this; }; /** * Remove the given callback for `event` or all * registered callbacks. * * @param {String} event * @param {Function} fn * @return {Emitter} * @api public */ Emitter.prototype.off = Emitter.prototype.removeListener = Emitter.prototype.removeAllListeners = Emitter.prototype.removeEventListener = function (event, fn) { this._callbacks = this._callbacks || {}; // all if (0 == arguments.length) { this._callbacks = {}; return this; } // specific event var callbacks = this._callbacks['$' + event]; if (!callbacks) return this; // remove all handlers if (1 == arguments.length) { delete this._callbacks['$' + event]; return this; } // remove specific handler var cb; for (var i = 0; i < callbacks.length; i++) { cb = callbacks[i]; if (cb === fn || cb.fn === fn) { callbacks.splice(i, 1); break; } } return this; }; /** * Emit `event` with the given args. * * @param {String} event * @param {Mixed} ... * @return {Emitter} */ Emitter.prototype.emit = function (event) { this._callbacks = this._callbacks || {}; var args = [].slice.call(arguments, 1), callbacks = this._callbacks['$' + event]; if (callbacks) { callbacks = callbacks.slice(0); for (var i = 0, len = callbacks.length; i < len; ++i) { callbacks[i].apply(this, args); } } return this; }; /** * Return array of callbacks for `event`. * * @param {String} event * @return {Array} * @api public */ Emitter.prototype.listeners = function (event) { this._callbacks = this._callbacks || {}; return this._callbacks['$' + event] || []; }; /** * Check if this emitter has `event` handlers. * * @param {String} event * @return {Boolean} * @api public */ Emitter.prototype.hasListeners = function (event) { return !!this.listeners(event).length; }; /***/ }, /* 37 */ /***/ function (module, exports) { /** * Compiles a querystring * Returns string representation of the object * * @param {Object} * @api private */ exports.encode = function (obj) { var str = ''; for (var i in obj) { if (obj.hasOwnProperty(i)) { if (str.length) str += '&'; str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]); } } return str; }; /** * Parses a simple querystring into an object * * @param {String} qs * @api private */ exports.decode = function (qs) { var qry = {}; var pairs = qs.split('&'); for (var i = 0, l = pairs.length; i < l; i++) { var pair = pairs[i].split('='); qry[decodeURIComponent(pair[0])] = decodeURIComponent(pair[1]); } return qry; }; /***/ }, /* 38 */ /***/ function (module, exports) { module.exports = function (a, b) { var fn = function () {}; fn.prototype = b.prototype; a.prototype = new fn(); a.prototype.constructor = a; }; /***/ }, /* 39 */ /***/ function (module, exports) { 'use strict'; var alphabet = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_'.split(''), length = 64, map = {}, seed = 0, i = 0, prev; /** * Return a string representing the specified number. * * @param {Number} num The number to convert. * @returns {String} The string representation of the number. * @api public */ function encode(num) { var encoded = ''; do { encoded = alphabet[num % length] + encoded; num = Math.floor(num / length); } while (num > 0); return encoded; } /** * Return the integer value specified by the given string. * * @param {String} str The string to convert. * @returns {Number} The integer value represented by the string. * @api public */ function decode(str) { var decoded = 0; for (i = 0; i < str.length; i++) { decoded = decoded * length + map[str.charAt(i)]; } return decoded; } /** * Yeast: A tiny growing id generator. * * @returns {String} A unique id. * @api public */ function yeast() { var now = encode(+new Date()); if (now !== prev) return (seed = 0), (prev = now); return now + '.' + encode(seed++); } // // Map each character to its index. // for (; i < length; i++) map[alphabet[i]] = i; // // Expose the `yeast`, `encode` and `decode` functions. // yeast.encode = encode; yeast.decode = decode; module.exports = yeast; /***/ }, /* 40 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module requirements. */ var Polling = __webpack_require__(25); var inherit = __webpack_require__(38); /** * Module exports. */ module.exports = JSONPPolling; /** * Cached regular expressions. */ var rNewline = /\n/g; var rEscapedNewline = /\\n/g; /** * Global JSONP callbacks. */ var callbacks; /** * Noop. */ function empty() {} /** * JSONP Polling constructor. * * @param {Object} opts. * @api public */ function JSONPPolling(opts) { Polling.call(this, opts); this.query = this.query || {}; // define global callbacks array if not present // we do this here (lazily) to avoid unneeded global pollution if (!callbacks) { // we need to consider multiple engines in the same page if (!global.___eio) global.___eio = []; callbacks = global.___eio; } // callback identifier this.index = callbacks.length; // add callback to jsonp global var self = this; callbacks.push(function (msg) { self.onData(msg); }); // append to query string this.query.j = this.index; // prevent spurious errors from being emitted when the window is unloaded if (global.document && global.addEventListener) { global.addEventListener( 'beforeunload', function () { if (self.script) self.script.onerror = empty; }, false ); } } /** * Inherits from Polling. */ inherit(JSONPPolling, Polling); /* * JSONP only supports binary as base64 encoded strings */ JSONPPolling.prototype.supportsBinary = false; /** * Closes the socket. * * @api private */ JSONPPolling.prototype.doClose = function () { if (this.script) { this.script.parentNode.removeChild(this.script); this.script = null; } if (this.form) { this.form.parentNode.removeChild(this.form); this.form = null; this.iframe = null; } Polling.prototype.doClose.call(this); }; /** * Starts a poll cycle. * * @api private */ JSONPPolling.prototype.doPoll = function () { var self = this; var script = document.createElement('script'); if (this.script) { this.script.parentNode.removeChild(this.script); this.script = null; } script.async = true; script.src = this.uri(); script.onerror = function (e) { self.onError('jsonp poll error', e); }; var insertAt = document.getElementsByTagName('script')[0]; if (insertAt) { insertAt.parentNode.insertBefore(script, insertAt); } else { (document.head || document.body).appendChild(script); } this.script = script; var isUAgecko = 'undefined' !== typeof navigator && /gecko/i.test(navigator.userAgent); if (isUAgecko) { setTimeout(function () { var iframe = document.createElement('iframe'); document.body.appendChild(iframe); document.body.removeChild(iframe); }, 100); } }; /** * Writes with a hidden iframe. * * @param {String} data to send * @param {Function} called upon flush. * @api private */ JSONPPolling.prototype.doWrite = function (data, fn) { var self = this; if (!this.form) { var form = document.createElement('form'); var area = document.createElement('textarea'); var id = (this.iframeId = 'eio_iframe_' + this.index); var iframe; form.className = 'socketio'; form.style.position = 'absolute'; form.style.top = '-1000px'; form.style.left = '-1000px'; form.target = id; form.method = 'POST'; form.setAttribute('accept-charset', 'utf-8'); area.name = 'd'; form.appendChild(area); document.body.appendChild(form); this.form = form; this.area = area; } this.form.action = this.uri(); function complete() { initIframe(); fn(); } function initIframe() { if (self.iframe) { try { self.form.removeChild(self.iframe); } catch (e) { self.onError('jsonp polling iframe removal error', e); } } try { // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) var html = '<iframe src="javascript:0" name="' + self.iframeId + '">'; iframe = document.createElement(html); } catch (e) { iframe = document.createElement('iframe'); iframe.name = self.iframeId; iframe.src = 'javascript:0'; } iframe.id = self.iframeId; self.form.appendChild(iframe); self.iframe = iframe; } initIframe(); // escape \n to prevent it from being converted into \r\n by some UAs // double escaping is required for escaped new lines because unescaping of new lines can be done safely on server-side data = data.replace(rEscapedNewline, '\\\n'); this.area.value = data.replace(rNewline, '\\n'); try { this.form.submit(); } catch (e) {} if (this.iframe.attachEvent) { this.iframe.onreadystatechange = function () { if (self.iframe.readyState === 'complete') { complete(); } }; } else { this.iframe.onload = complete; } }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 41 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /** * Module dependencies. */ var Transport = __webpack_require__(26); var parser = __webpack_require__(27); var parseqs = __webpack_require__(37); var inherit = __webpack_require__(38); var yeast = __webpack_require__(39); var debug = __webpack_require__(3)('engine.io-client:websocket'); var BrowserWebSocket = global.WebSocket || global.MozWebSocket; var NodeWebSocket; if (typeof window === 'undefined') { try { NodeWebSocket = __webpack_require__(42); } catch (e) {} } /** * Get either the `WebSocket` or `MozWebSocket` globals * in the browser or try to resolve WebSocket-compatible * interface exposed by `ws` for Node-like environment. */ var WebSocket = BrowserWebSocket; if (!WebSocket && typeof window === 'undefined') { WebSocket = NodeWebSocket; } /** * Module exports. */ module.exports = WS; /** * WebSocket transport constructor. * * @api {Object} connection options * @api public */ function WS(opts) { var forceBase64 = opts && opts.forceBase64; if (forceBase64) { this.supportsBinary = false; } this.perMessageDeflate = opts.perMessageDeflate; this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode; if (!this.usingBrowserWebSocket) { WebSocket = NodeWebSocket; } Transport.call(this, opts); } /** * Inherits from Transport. */ inherit(WS, Transport); /** * Transport name. * * @api public */ WS.prototype.name = 'websocket'; /* * WebSockets support binary */ WS.prototype.supportsBinary = true; /** * Opens socket. * * @api private */ WS.prototype.doOpen = function () { if (!this.check()) { // let probe timeout return; } var uri = this.uri(); var protocols = void 0; var opts = { agent: this.agent, perMessageDeflate: this.perMessageDeflate, }; // SSL options for Node.js client opts.pfx = this.pfx; opts.key = this.key; opts.passphrase = this.passphrase; opts.cert = this.cert; opts.ca = this.ca; opts.ciphers = this.ciphers; opts.rejectUnauthorized = this.rejectUnauthorized; if (this.extraHeaders) { opts.headers = this.extraHeaders; } if (this.localAddress) { opts.localAddress = this.localAddress; } try { this.ws = this.usingBrowserWebSocket ? new WebSocket(uri) : new WebSocket(uri, protocols, opts); } catch (err) { return this.emit('error', err); } if (this.ws.binaryType === undefined) { this.supportsBinary = false; } if (this.ws.supports && this.ws.supports.binary) { this.supportsBinary = true; this.ws.binaryType = 'nodebuffer'; } else { this.ws.binaryType = 'arraybuffer'; } this.addEventListeners(); }; /** * Adds event listeners to the socket * * @api private */ WS.prototype.addEventListeners = function () { var self = this; this.ws.onopen = function () { self.onOpen(); }; this.ws.onclose = function () { self.onClose(); }; this.ws.onmessage = function (ev) { self.onData(ev.data); }; this.ws.onerror = function (e) { self.onError('websocket error', e); }; }; /** * Writes data to socket. * * @param {Array} array of packets. * @api private */ WS.prototype.write = function (packets) { var self = this; this.writable = false; // encodePacket efficient as it uses WS framing // no need for encodePayload var total = packets.length; for (var i = 0, l = total; i < l; i++) { (function (packet) { parser.encodePacket(packet, self.supportsBinary, function (data) { if (!self.usingBrowserWebSocket) { // always create a new object (GH-437) var opts = {}; if (packet.options) { opts.compress = packet.options.compress; } if (self.perMessageDeflate) { var len = 'string' === typeof data ? global.Buffer.byteLength(data) : data.length; if (len < self.perMessageDeflate.threshold) { opts.compress = false; } } } // Sometimes the websocket has already been closed but the browser didn't // have a chance of informing us about it yet, in that case send will // throw an error try { if (self.usingBrowserWebSocket) { // TypeError is thrown when passing the second argument on Safari self.ws.send(data); } else { self.ws.send(data, opts); } } catch (e) { debug('websocket closed before onclose event'); } --total || done(); }); })(packets[i]); } function done() { self.emit('flush'); // fake drain // defer to next tick to allow Socket to clear writeBuffer setTimeout(function () { self.writable = true; self.emit('drain'); }, 0); } }; /** * Called upon close * * @api private */ WS.prototype.onClose = function () { Transport.prototype.onClose.call(this); }; /** * Closes socket. * * @api private */ WS.prototype.doClose = function () { if (typeof this.ws !== 'undefined') { this.ws.close(); } }; /** * Generates uri for connection. * * @api private */ WS.prototype.uri = function () { var query = this.query || {}; var schema = this.secure ? 'wss' : 'ws'; var port = ''; // avoid port if default for schema if (this.port && (('wss' === schema && Number(this.port) !== 443) || ('ws' === schema && Number(this.port) !== 80))) { port = ':' + this.port; } // append timestamp to URI if (this.timestampRequests) { query[this.timestampParam] = yeast(); } // communicate binary support capabilities if (!this.supportsBinary) { query.b64 = 1; } query = parseqs.encode(query); // prepend ? to query if (query.length) { query = '?' + query; } var ipv6 = this.hostname.indexOf(':') !== -1; return schema + '://' + (ipv6 ? '[' + this.hostname + ']' : this.hostname) + port + this.path + query; }; /** * Feature detection for WebSocket. * * @return {Boolean} whether this transport is available. * @api public */ WS.prototype.check = function () { return !!WebSocket && !('__initialize' in WebSocket && this.name === WS.prototype.name); }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 42 */ /***/ function (module, exports) { /* (ignored) */ /***/ }, /* 43 */ /***/ function (module, exports) { var indexOf = [].indexOf; module.exports = function (arr, obj) { if (indexOf) return arr.indexOf(obj); for (var i = 0; i < arr.length; ++i) { if (arr[i] === obj) return i; } return -1; }; /***/ }, /* 44 */ /***/ function (module, exports) { /* WEBPACK VAR INJECTION */ (function (global) { /** * JSON parse. * * @see Based on jQuery#parseJSON (MIT) and JSON2 * @api private */ var rvalidchars = /^[\],:{}\s]*$/; var rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g; var rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g; var rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g; var rtrimLeft = /^\s+/; var rtrimRight = /\s+$/; module.exports = function parsejson(data) { if ('string' != typeof data || !data) { return null; } data = data.replace(rtrimLeft, '').replace(rtrimRight, ''); // Attempt to parse using the native JSON parser first if (global.JSON && JSON.parse) { return JSON.parse(data); } if (rvalidchars.test(data.replace(rvalidescape, '@').replace(rvalidtokens, ']').replace(rvalidbraces, ''))) { return new Function('return ' + data)(); } }; /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 45 */ /***/ function (module, exports, __webpack_require__) { 'use strict'; /** * Module dependencies. */ var parser = __webpack_require__(7); var Emitter = __webpack_require__(36); var toArray = __webpack_require__(46); var on = __webpack_require__(47); var bind = __webpack_require__(48); var debug = __webpack_require__(3)('socket.io-client:socket'); var hasBin = __webpack_require__(49); /** * Module exports. */ module.exports = exports = Socket; /** * Internal events (blacklisted). * These events can't be emitted by the user. * * @api private */ var events = { connect: 1, connect_error: 1, connect_timeout: 1, connecting: 1, disconnect: 1, error: 1, reconnect: 1, reconnect_attempt: 1, reconnect_failed: 1, reconnect_error: 1, reconnecting: 1, ping: 1, pong: 1, }; /** * Shortcut to `Emitter#emit`. */ var emit = Emitter.prototype.emit; /** * `Socket` constructor. * * @api public */ function Socket(io, nsp, opts) { this.io = io; this.nsp = nsp; this.json = this; // compat this.ids = 0; this.acks = {}; this.receiveBuffer = []; this.sendBuffer = []; this.connected = false; this.disconnected = true; if (opts && opts.query) { this.query = opts.query; } if (this.io.autoConnect) this.open(); } /** * Mix in `Emitter`. */ Emitter(Socket.prototype); /** * Subscribe to open, close and packet events * * @api private */ Socket.prototype.subEvents = function () { if (this.subs) return; var io = this.io; this.subs = [ on(io, 'open', bind(this, 'onopen')), on(io, 'packet', bind(this, 'onpacket')), on(io, 'close', bind(this, 'onclose')), ]; }; /** * "Opens" the socket. * * @api public */ Socket.prototype.open = Socket.prototype.connect = function () { if (this.connected) return this; this.subEvents(); this.io.open(); // ensure open if ('open' === this.io.readyState) this.onopen(); this.emit('connecting'); return this; }; /** * Sends a `message` event. * * @return {Socket} self * @api public */ Socket.prototype.send = function () { var args = toArray(arguments); args.unshift('message'); this.emit.apply(this, args); return this; }; /** * Override `emit`. * If the event is in `events`, it's emitted normally. * * @param {String} event name * @return {Socket} self * @api public */ Socket.prototype.emit = function (ev) { if (events.hasOwnProperty(ev)) { emit.apply(this, arguments); return this; } var args = toArray(arguments); var parserType = parser.EVENT; // default if (hasBin(args)) { parserType = parser.BINARY_EVENT; } // binary var packet = { type: parserType, data: args }; packet.options = {}; packet.options.compress = !this.flags || false !== this.flags.compress; // event ack callback if ('function' === typeof args[args.length - 1]) { debug('emitting packet with ack id %d', this.ids); this.acks[this.ids] = args.pop(); packet.id = this.ids++; } if (this.connected) { this.packet(packet); } else { this.sendBuffer.push(packet); } delete this.flags; return this; }; /** * Sends a packet. * * @param {Object} packet * @api private */ Socket.prototype.packet = function (packet) { packet.nsp = this.nsp; this.io.packet(packet); }; /** * Called upon engine `open`. * * @api private */ Socket.prototype.onopen = function () { debug('transport is open - connecting'); // write connect packet if necessary if ('/' !== this.nsp) { if (this.query) { this.packet({ type: parser.CONNECT, query: this.query }); } else { this.packet({ type: parser.CONNECT }); } } }; /** * Called upon engine `close`. * * @param {String} reason * @api private */ Socket.prototype.onclose = function (reason) { debug('close (%s)', reason); this.connected = false; this.disconnected = true; delete this.id; this.emit('disconnect', reason); }; /** * Called with socket packet. * * @param {Object} packet * @api private */ Socket.prototype.onpacket = function (packet) { if (packet.nsp !== this.nsp) return; switch (packet.type) { case parser.CONNECT: this.onconnect(); break; case parser.EVENT: this.onevent(packet); break; case parser.BINARY_EVENT: this.onevent(packet); break; case parser.ACK: this.onack(packet); break; case parser.BINARY_ACK: this.onack(packet); break; case parser.DISCONNECT: this.ondisconnect(); break; case parser.ERROR: this.emit('error', packet.data); break; } }; /** * Called upon a server event. * * @param {Object} packet * @api private */ Socket.prototype.onevent = function (packet) { var args = packet.data || []; debug('emitting event %j', args); if (null != packet.id) { debug('attaching ack callback to event'); args.push(this.ack(packet.id)); } if (this.connected) { emit.apply(this, args); } else { this.receiveBuffer.push(args); } }; /** * Produces an ack callback to emit with an event. * * @api private */ Socket.prototype.ack = function (id) { var self = this; var sent = false; return function () { // prevent double callbacks if (sent) return; sent = true; var args = toArray(arguments); debug('sending ack %j', args); var type = hasBin(args) ? parser.BINARY_ACK : parser.ACK; self.packet({ type: type, id: id, data: args, }); }; }; /** * Called upon a server acknowlegement. * * @param {Object} packet * @api private */ Socket.prototype.onack = function (packet) { var ack = this.acks[packet.id]; if ('function' === typeof ack) { debug('calling ack %s with %j', packet.id, packet.data); ack.apply(this, packet.data); delete this.acks[packet.id]; } else { debug('bad ack %s', packet.id); } }; /** * Called upon server connect. * * @api private */ Socket.prototype.onconnect = function () { this.connected = true; this.disconnected = false; this.emit('connect'); this.emitBuffered(); }; /** * Emit buffered events (received and emitted). * * @api private */ Socket.prototype.emitBuffered = function () { var i; for (i = 0; i < this.receiveBuffer.length; i++) { emit.apply(this, this.receiveBuffer[i]); } this.receiveBuffer = []; for (i = 0; i < this.sendBuffer.length; i++) { this.packet(this.sendBuffer[i]); } this.sendBuffer = []; }; /** * Called upon server disconnect. * * @api private */ Socket.prototype.ondisconnect = function () { debug('server disconnect (%s)', this.nsp); this.destroy(); this.onclose('io server disconnect'); }; /** * Called upon forced client/server side disconnections, * this method ensures the manager stops tracking us and * that reconnections don't get triggered for this. * * @api private. */ Socket.prototype.destroy = function () { if (this.subs) { // clean subscriptions to avoid reconnections for (var i = 0; i < this.subs.length; i++) { this.subs[i].destroy(); } this.subs = null; } this.io.destroy(this); }; /** * Disconnects the socket manually. * * @return {Socket} self * @api public */ Socket.prototype.close = Socket.prototype.disconnect = function () { if (this.connected) { debug('performing disconnect (%s)', this.nsp); this.packet({ type: parser.DISCONNECT }); } // remove socket from pool this.destroy(); if (this.connected) { // fire events this.onclose('io client disconnect'); } return this; }; /** * Sets the compress flag. * * @param {Boolean} if `true`, compresses the sending data * @return {Socket} self * @api public */ Socket.prototype.compress = function (compress) { this.flags = this.flags || {}; this.flags.compress = compress; return this; }; /***/ }, /* 46 */ /***/ function (module, exports) { module.exports = toArray; function toArray(list, index) { var array = []; index = index || 0; for (var i = index || 0; i < list.length; i++) { array[i - index] = list[i]; } return array; } /***/ }, /* 47 */ /***/ function (module, exports) { 'use strict'; /** * Module exports. */ module.exports = on; /** * Helper for subscriptions. * * @param {Object|EventEmitter} obj with `Emitter` mixin or `EventEmitter` * @param {String} event name * @param {Function} callback * @api public */ function on(obj, ev, fn) { obj.on(ev, fn); return { destroy: function destroy() { obj.removeListener(ev, fn); }, }; } /***/ }, /* 48 */ /***/ function (module, exports) { /** * Slice reference. */ var slice = [].slice; /** * Bind `obj` to `fn`. * * @param {Object} obj * @param {Function|String} fn or string * @return {Function} * @api public */ module.exports = function (obj, fn) { if ('string' == typeof fn) fn = obj[fn]; if ('function' != typeof fn) throw new Error('bind() requires a function'); var args = slice.call(arguments, 2); return function () { return fn.apply(obj, args.concat(slice.call(arguments))); }; }; /***/ }, /* 49 */ /***/ function (module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */ (function (global) { /* * Module requirements. */ var isArray = __webpack_require__(50); /** * Module exports. */ module.exports = hasBinary; /** * Checks for binary data. * * Right now only Buffer and ArrayBuffer are supported.. * * @param {Object} anything * @api public */ function hasBinary(data) { function _hasBinary(obj) { if (!obj) return false; if ( (global.Buffer && global.Buffer.isBuffer && global.Buffer.isBuffer(obj)) || (global.ArrayBuffer && obj instanceof ArrayBuffer) || (global.Blob && obj instanceof Blob) || (global.File && obj instanceof File) ) { return true; } if (isArray(obj)) { for (var i = 0; i < obj.length; i++) { if (_hasBinary(obj[i])) { return true; } } } else if (obj && 'object' == typeof obj) { // see: https://github.com/Automattic/has-binary/pull/4 if (obj.toJSON && 'function' == typeof obj.toJSON) { obj = obj.toJSON(); } for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key) && _hasBinary(obj[key])) { return true; } } } return false; } return _hasBinary(data); } /* WEBPACK VAR INJECTION */ }.call( exports, (function () { return this; })() )); /***/ }, /* 50 */ /***/ function (module, exports) { module.exports = Array.isArray || function (arr) { return Object.prototype.toString.call(arr) == '[object Array]'; }; /***/ }, /* 51 */ /***/ function (module, exports) { /** * Expose `Backoff`. */ module.exports = Backoff; /** * Initialize backoff timer with `opts`. * * - `min` initial timeout in milliseconds [100] * - `max` max timeout [10000] * - `jitter` [0] * - `factor` [2] * * @param {Object} opts * @api public */ function Backoff(opts) { opts = opts || {}; this.ms = opts.min || 100; this.max = opts.max || 10000; this.factor = opts.factor || 2; this.jitter = opts.jitter > 0 && opts.jitter <= 1 ? opts.jitter : 0; this.attempts = 0; } /** * Return the backoff duration. * * @return {Number} * @api public */ Backoff.prototype.duration = function () { var ms = this.ms * Math.pow(this.factor, this.attempts++); if (this.jitter) { var rand = Math.random(); var deviation = Math.floor(rand * this.jitter * ms); ms = (Math.floor(rand * 10) & 1) == 0 ? ms - deviation : ms + deviation; } return Math.min(ms, this.max) | 0; }; /** * Reset the number of attempts. * * @api public */ Backoff.prototype.reset = function () { this.attempts = 0; }; /** * Set the minimum duration * * @api public */ Backoff.prototype.setMin = function (min) { this.ms = min; }; /** * Set the maximum duration * * @api public */ Backoff.prototype.setMax = function (max) { this.max = max; }; /** * Set the jitter * * @api public */ Backoff.prototype.setJitter = function (jitter) { this.jitter = jitter; }; /***/ }, /******/ ] ); }); //# sourceMappingURL=socket.io.js.map
/* * Licensed to Laurent Broudoux (the "Author") under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. Author licenses this * file to you 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. */ 'use strict'; angular.module('microcksApp') .controller('AdminController', ['$rootScope', '$scope', '$routeParams', 'notify', 'FileUploader', 'Service', 'InvocationsService', function ($rootScope, $scope, $routeParams, notify, FileUploader, Service, InvocationsService) { $scope.day; $scope.hour = 0; $scope.serviceName = $routeParams.serviceName; $scope.serviceVersion = $routeParams.serviceVersion; $scope.invocationStats = null; $scope.selectedServices = { ids: {} }; $scope.uploader = new FileUploader( { url: '/api/import' }); $scope.getAllServices = function() { $scope.services = Service.query(); $scope.services.$promise.then(function(result) { $scope.halfServices = $scope.services.slice(0, ($scope.services.length / 2) + 1); $scope.secondHalfServices = $scope.services.slice($scope.halfServices.length); }) }; $scope.openDatePicker = function($event) { $event.preventDefault(); $event.stopPropagation(); $scope.pickerOpened = true; }; $scope.updateInvocationStats = function() { $scope.getInvocationStats($scope.day); $scope.getTopInvocations($scope.day); }; $scope.getInvocationStats = function(day) { InvocationsService.getInvocationStats(day).then(function(result) { $scope.invocationStats = result; }); }; $scope.getTopInvocations = function(day) { InvocationsService.getTopInvocations(day).then(function(result) { $scope.topInvocations = result; }) }; $scope.updateServiceInvocationStats = function() { $scope.getServiceInvocationStats($scope.day); }; $scope.getServiceInvocationStats = function(day) { InvocationsService.getServiceInvocationStats($scope.serviceName, $scope.serviceVersion, day).then(function(result) { $scope.invocationStats = result }); }; $scope.expandCollapseServices = function() { if ($('#expcol').is(':checked')) { $('.panel .collapse').collapse('show'); } else { $('.panel .collapse').collapse('hide'); } }; $scope.updateOperationDelay = function(service, operation) { var data = { operationName: operation.name, delay: operation.defaultDelay }; service.$updateOperationDelay(data); }; $scope.export = function() { var downloadPath = '/api/export?'; Object.keys($scope.selectedServices.ids).forEach(function(element, index, array) { downloadPath += '&serviceIds=' + element; }); window.open(downloadPath, '_blank', ''); }; $scope.import = function() { var fileName = $scope.uploader.queue[0].file.name; $scope.uploader.queue[0].upload(); notify({ message: 'File "' + fileName + '" has been imported !', classes: 'alert-success' }); $scope.uploader.queue = []; }; }]);
var forge = require('node-forge'); var fs = require('fs'); var net = require('net'); var path = require('path'); var crypto = require('crypto'); var LRU = require('lru-cache'); var hagent = require('hagent'); var extend = require('extend'); var h2 = require('./h2'); var createSecureContext = require('tls').createSecureContext || crypto.createCredentials; var util = require('../util'); var config = require('../config'); var pki = forge.pki; var workerIndex = util.workerIndex; var CUR_VERSION = process.version; var requiredVersion = parseInt(CUR_VERSION.slice(1), 10) >= 6; var HTTPS_DIR = mkdir(path.join(config.getDataDir(), 'certs')); var ROOT_NEW_KEY_FILE = path.join(HTTPS_DIR, 'root_new.key'); var ROOT_NEW_CRT_FILE = path.join(HTTPS_DIR, 'root_new.crt'); var CUSTOM_CERTS_DIR = config.disableCustomCerts ? null : config.CUSTOM_CERTS_DIR; var useNewKey = fs.existsSync(ROOT_NEW_KEY_FILE) && fs.existsSync(ROOT_NEW_CRT_FILE); var ROOT_KEY_FILE = useNewKey ? ROOT_NEW_KEY_FILE : path.join(HTTPS_DIR, 'root.key'); var ROOT_CRT_FILE = useNewKey ? ROOT_NEW_CRT_FILE : path.join(HTTPS_DIR, 'root.crt'); var customCertDir = config.certDir; var customPairs = {}; var customCertsInfo = {}; var customCertsFiles = {}; var allCustomCerts = {}; var customCertCount = 0; var cachePairs = new LRU({ max: 5120 }); var certsCache = new LRU({ max: 256 }); var remoteCerts = new LRU({ max: 1280 }); var ILEGAL_CHAR_RE = /[^a-z\d-]/i; var RANDOM_SERIAL = '.' + Date.now() + '.' + Math.floor(Math.random() * 10000); var CLEAR_CERTS_INTERVAL = 1000 * 60 * 60 * 24 * 20; var MAX_INNTERFAL = 18; var PORT_RE = /:\d*$/; var customRoot; var ROOT_KEY, ROOT_CRT; var rootKey, rootCrt; exports.remoteCerts = remoteCerts; exports.createSecureContext = createSecureContext; exports.CUSTOM_CERTS_DIR = CUSTOM_CERTS_DIR; // When delay is larger than 2147483647 or less than 1, the delay will be set to 1. Non-integer delays are truncated to an integer. var intervalCount = 0; var timer = setInterval(function () { if (++intervalCount >= MAX_INNTERFAL) { intervalCount = 0; cachePairs.reset(); certsCache.reset(); } }, CLEAR_CERTS_INTERVAL); if (timer && typeof timer.unref === 'function') { timer.unref(); } if (!useNewKey && requiredVersion && !checkCertificate()) { try { fs.unlinkSync(ROOT_KEY_FILE); fs.unlinkSync(ROOT_CRT_FILE); } catch (e) {} } function mkdir(path) { !fs.existsSync(path) && fs.mkdirSync(path); return path; } function checkCertificate() { try { var crt = pki.certificateFromPem(fs.readFileSync(ROOT_CRT_FILE)); if (crt.publicKey.n.toString(2).length < 2048) { return false; } return /^whistle\.\d+$/.test(getCommonName(crt)); } catch (e) {} return true; } function getCommonName(crt) { var attrs = crt.issuer && crt.issuer.attributes; if (Array.isArray(attrs)) { for (var i = 0, len = attrs.length; i < len; i++) { var attr = attrs[i]; if (attr && attr.name === 'commonName') { return attr.value; } } } return ''; } function getDomain(hostname) { if (getCacheCert(hostname) || net.isIP(hostname)) { return hostname; } var list = hostname.split('.'); var prefix = list[0]; list[0] = '*'; var wildDomain = list.join('.'); if (getCacheCert(wildDomain)) { return wildDomain; } var len = list.length; if (len < 3) { return hostname; } if ( len > 3 || ILEGAL_CHAR_RE.test(prefix) || list[1].length > 3 || list[2] === 'com' || list[1] === 'url' ) { // For tencent cdn return wildDomain; } return hostname; } exports.getDomain = getDomain; exports.existsCustomCert = function (hostname) { if (!customCertCount) { return false; } hostname = hostname.replace(PORT_RE, ''); var cert = customPairs[hostname]; if (cert) { return true; } hostname = hostname.split('.'); hostname[0] = '*'; return customPairs[hostname.join('.')]; }; exports.hasCustomCerts = function () { return customCertCount; }; function getCacheCert(hostname) { return ( customPairs[hostname] || cachePairs.get(hostname) || certsCache.get(hostname) ); } var curIndex = 0; function getIndex() { ++curIndex; if (curIndex < 10) { return '0' + curIndex; } if (curIndex > 99) { curIndex = 0; return '00'; } return curIndex; } function createSelfCert(hostname) { var serialNumber = crypto .createHash('sha1') .update(hostname + RANDOM_SERIAL, 'binary') .digest('hex') + getIndex() + workerIndex; var cert = createCert( pki.setRsaPublicKey(ROOT_KEY.n, ROOT_KEY.e), serialNumber, true ); cert.setSubject([ { name: 'commonName', value: hostname } ]); cert.setIssuer(ROOT_CRT.subject.attributes); cert.setExtensions([ { name: 'subjectAltName', altNames: [ net.isIP(hostname) ? { type: 7, ip: hostname } : { type: 2, value: hostname } ] } ]); cert.sign(ROOT_KEY, forge.md.sha256.create()); return { key: pki.privateKeyToPem(ROOT_KEY), cert: pki.certificateToPem(cert) }; } exports.createCertificate = function (hostname) { hostname = getDomain(hostname); var cert = cachePairs.get(hostname); // 确保使用自己生成的证书,防止把用户证书下载出去 if (!cert) { cert = createSelfCert(hostname); certsCache.set(hostname, cert); } return cert; }; function parseCert(cert) { var pem = pki.certificateFromPem(cert.cert); var altNames = getAltNames(pem.extensions); if (!altNames || !altNames.length) { return; } return { cert: cert, altNames: altNames, validity: pem.validity }; } function parseAllCustomCerts() { var pairs = {}; var certsInfo = {}; var certFiles = {}; var keys = Object.keys(allCustomCerts).sort(function (key1, key2) { return util.compare( allCustomCerts[key1].cert.mtime, allCustomCerts[key2].cert.mtime ); }); keys.forEach(function (filename) { var info = allCustomCerts[filename]; var cert = info.cert; var mtime = cert.mtime; var validity = info.validity; var altNames = info.altNames; var dnsName = []; altNames.forEach(function (item) { if ((item.type === 2 || item.type === 7) && !pairs[item.value]) { var preCert = customPairs[item.value]; if (preCert && preCert.key === cert.key && preCert.cert === cert.cert) { if (preCert.mtime < mtime) { preCert.mtime = mtime; } pairs[item.value] = preCert; } else { pairs[item.value] = cert; } dnsName.push(item.value); certsInfo[item.value] = extend( { filename: filename, mtime: mtime, domain: item.value }, validity ); } }); if (dnsName.length) { certFiles[filename] = extend( { mtime: mtime, dir: cert.dir, dnsName: dnsName.join(', ') }, validity ); } }); customPairs = pairs; customCertsInfo = certsInfo; customCertsFiles = certFiles; customCertCount = Object.keys(customPairs).length; checkExpired(); } function loadCustomCerts(certDir, isCustom) { if (!certDir) { return; } var certs = {}; try { fs.readdirSync(certDir).forEach(function (name) { if (!/^(.+)\.(crt|key)$/.test(name)) { return; } var filename = RegExp.$1; var suffix = RegExp.$2; var cert = (certs[filename] = certs[filename] || {}); if (suffix === 'crt') { suffix = 'cert'; } try { var filePath = path.join(certDir, name); cert.dir = certDir; cert[suffix] = fs.readFileSync(filePath, { encoding: 'utf8' }); var mtime = fs.statSync(filePath).mtime.getTime(); if (cert.mtime == null || cert.mtime < mtime) { cert.mtime = mtime; } } catch (e) {} }); } catch (e) {} var rootCA = certs.root; delete certs.root; if (rootCA && rootCA.key && rootCA.cert && !customRoot) { customRoot = rootCA; ROOT_KEY_FILE = path.join(certDir, 'root.key'); ROOT_CRT_FILE = path.join(certDir, 'root.crt'); } Object.keys(certs).filter(function (key) { var cert = certs[key]; if (cert && cert.mtime != null && cert.key && cert.cert) { try { cert = parseCert(cert); if (cert) { allCustomCerts[isCustom ? 'z/' + key : key] = cert; } } catch (e) {} } }); } function getAltNames(exts) { for (var i = 0, len = exts.length; i < len; i++) { var item = exts[i]; if (item.name === 'subjectAltName') { return Array.isArray(item.altNames) && item.altNames.filter(util.noop); } } } function createRootCA() { allCustomCerts = {}; loadCustomCerts(customCertDir, true); loadCustomCerts(CUSTOM_CERTS_DIR); parseAllCustomCerts(); if (ROOT_KEY && ROOT_CRT) { return; } try { ROOT_KEY = fs.readFileSync(ROOT_KEY_FILE); ROOT_CRT = fs.readFileSync(ROOT_CRT_FILE); rootKey = ROOT_KEY.toString(); rootCrt = ROOT_CRT.toString(); } catch (e) { ROOT_KEY = ROOT_CRT = null; } if (ROOT_KEY && ROOT_CRT && ROOT_KEY.length && ROOT_CRT.length) { ROOT_KEY = pki.privateKeyFromPem(ROOT_KEY); ROOT_CRT = pki.certificateFromPem(ROOT_CRT); if (customRoot) { customCertsFiles.root = extend( { mtime: customRoot.mtime, dir: customRoot.dir, dnsName: '' }, ROOT_CRT.validity ); } try { var altNames = getAltNames(ROOT_CRT.extensions); var dnsName = []; altNames.forEach(function (item) { if ( (item.type === 2 || item.type === 7) && dnsName.indexOf(item.value) === -1 ) { dnsName.push(item.value); } }); customCertsFiles.root.dnsName = dnsName.join(', '); } catch (e) {} } else { var cert = createCACert(); ROOT_CRT = cert.cert; ROOT_KEY = cert.key; rootKey = pki.privateKeyToPem(ROOT_KEY).toString(); rootCrt = pki.certificateToPem(ROOT_CRT).toString(); fs.writeFileSync(ROOT_KEY_FILE, rootKey); fs.writeFileSync(ROOT_CRT_FILE, rootCrt); } } function getRandom() { var random = Math.floor(Math.random() * 1000); if (random < 10) { return '00' + random; } if (random < 100) { return '0' + random; } return '' + random; } function createCACert(opts) { opts = opts || {}; var keys = pki.rsa.generateKeyPair(requiredVersion ? 2048 : 1024); var cert = createCert(keys.publicKey); var now = Date.now() + getRandom(); var attrs = [ { name: 'commonName', value: opts.commonname || opts.commonName || 'whistle.' + now }, { name: 'countryName', value: opts.countryname || opts.countryName || 'CN' }, { shortName: 'ST', value: opts.st || opts.ST || 'ZJ' }, { name: 'localityName', value: opts.localityname || opts.localityName || 'HZ' }, { name: 'organizationName', value: opts.organizationname || opts.organizationName || now + '.wproxy.org' }, { shortName: 'OU', value: opts.ou || opts.OU || 'wproxy.org' } ]; cert.setSubject(attrs); cert.setIssuer(attrs); cert.setExtensions([ { name: 'basicConstraints', cA: true }, { name: 'keyUsage', keyCertSign: true, digitalSignature: true, nonRepudiation: true, keyEncipherment: true, dataEncipherment: true }, { name: 'extKeyUsage', serverAuth: true, clientAuth: true, codeSigning: true, emailProtection: true, timeStamping: true }, { name: 'nsCertType', client: true, server: true, email: true, objsign: true, sslCA: true, emailCA: true, objCA: true } ]); cert.sign(keys.privateKey, forge.md.sha256.create()); return { key: keys.privateKey, cert: cert }; } exports.createRootCA = function(opts) { var cert = createCACert(opts); cert.key = pki.privateKeyToPem(cert.key).toString(); cert.cert = pki.certificateToPem(cert.cert).toString(); return cert; }; function createCert(publicKey, serialNumber, isShortPeriod) { var cert = pki.createCertificate(); cert.publicKey = publicKey; cert.serialNumber = serialNumber || '01'; var curYear = new Date().getFullYear(); cert.validity.notBefore = new Date(); cert.validity.notAfter = new Date(); cert.validity.notBefore.setFullYear(curYear - 1); // https://chromium.googlesource.com/chromium/src/+/refs/heads/master/net/cert/cert_verify_proc.cc#900 cert.validity.notAfter.setFullYear(curYear + (isShortPeriod ? 1 : 10)); return cert; } function getRootCAFile() { return ROOT_CRT_FILE; } createRootCA(); // 启动生成ca function getOrCreateCert(servername) { var requestCert = servername[0] === ':'; if (requestCert) { servername = servername.substring(1); } var cert = remoteCerts.get(servername); if (!cert) { servername = getDomain(servername); cert = getCacheCert(servername); if (!cert) { cert = createSelfCert(servername); cachePairs.set(servername, cert); } } return requestCert ? extend( { requestCert: true, rejectUnauthorized: false }, cert ) : cert; } hagent.serverAgent.createCertificate = getOrCreateCert; var getHttp2Server = hagent.create(h2.getHttpServer, 42900); var getHttpsServer = hagent.create(h2.getServer, 43900); var cbs = {}; var ports = {}; var TIMEOUT = 6000; var SNICallback = function (servername, cb) { var options = getOrCreateCert(servername); if (!options._ctx) { try { options._ctx = createSecureContext(options); } catch (e) {} } cb(null, options._ctx); }; exports.getRootCA = function () { return { key: rootKey, cert: rootCrt }; }; exports.getCustomCertsInfo = function () { return customCertsInfo; }; exports.getCustomCertsFiles = function () { return customCertsFiles; }; exports.getRootCAFile = getRootCAFile; exports.serverAgent = hagent.serverAgent; exports.SNICallback = SNICallback; function addCallback(name, callback) { var cbList = cbs[name]; if (!cbList) { cbList = []; cbs[name] = cbList; } cbList.push(callback); return cbList; } function createServer(name, cbList, listener, options) { var removeServer = function () { ports[name] = null; try { this.close(); } catch (e) {} //重复关闭会导致异常 }; ports[name] = false; // pending var getServer = options ? getHttpsServer : getHttp2Server; getServer(options, listener, function (server, port) { server.on('error', removeServer); var timeout = setTimeout(removeServer, TIMEOUT); var clearup = function () { clearTimeout(timeout); }; if (options) { server.once('tlsClientError', clearup); server.once('secureConnection', clearup); } else { server.once('connection', clearup); } ports[name] = port; cbList.forEach(function (cb) { cb(port); }); cbs[name] = []; }); } exports.getHttp2Server = function (listener, callback) { var name = 'httpH2'; var curPort = ports[name]; if (curPort) { return callback(curPort); } var cbList = addCallback(name, callback); if (curPort === false) { return; } createServer(name, cbList, listener); }; exports.getSNIServer = function (listener, callback, disableH2, requestCert) { var enableH2 = config.enableH2 && !disableH2; var name = (enableH2 ? 'h2Sni' : 'sni') + (requestCert ? 'WithCert' : ''); var curPort = ports[name]; if (curPort) { return callback(curPort); } var cbList = addCallback(name, callback); if (curPort === false) { return; } var options = { SNICallback: SNICallback }; options.allowHTTP1 = enableH2; // 是否启用http2 if (requestCert) { options = extend( { requestCert: true, rejectUnauthorized: false }, options ); } createServer(name, cbList, listener, options); }; var checkTimer; function checkExpired() { clearTimeout(checkTimer); var now = Date.now(); var files = Object.keys(customCertsFiles); exports.hasInvalidCerts = false; for (var i = 0, len = files.length; i < len; i++) { var file = customCertsFiles[files[i]]; try { var startDate = new Date(file.notBefore); var endDate = new Date(file.notAfter); if (startDate.getTime() > now) { exports.hasInvalidCerts = true; return; } else if (endDate.getTime() < now) { exports.hasInvalidCerts = true; return; } } catch (e) {} } checkTimer = setTimeout(checkExpired, 600000); } function removeFile(filename) { fs.unlink(filename, function (err) { err && fs.unlink(filename, util.noop); }); } function writeFile(filename, ctn, callback) { fs.writeFile(filename, ctn, function (err) { if (!err) { return callback(); } fs.writeFile(filename, ctn, callback); }); } // 异步重试,出错重试即可 function removeCertFile(filename) { removeFile(path.join(CUSTOM_CERTS_DIR, filename + '.key')); removeFile(path.join(CUSTOM_CERTS_DIR, filename + '.crt')); } // 异步写入,出错重试即可 function writeCertFile(filename, cert, mtime) { var keyFile = path.join(CUSTOM_CERTS_DIR, filename + '.key'); var certFile = path.join(CUSTOM_CERTS_DIR, filename + '.crt'); writeFile(keyFile, cert.key, function () { fs.utimes && fs.utimes(keyFile, mtime, mtime, util.noop); }); writeFile(certFile, cert.cert, function () { fs.utimes && fs.utimes(certFile, mtime, mtime, util.noop); }); } var ILLEGAL_PATH_RE = /[/\\]/; function checkFilename(name) { return name && !ILLEGAL_PATH_RE.test(name) && name !== 'root'; } exports.removeCert = function (filename) { if (!CUSTOM_CERTS_DIR) { return; } if (checkFilename(filename) && allCustomCerts[filename]) { removeCertFile(filename); delete allCustomCerts[filename]; parseAllCustomCerts(); } }; exports.uploadCerts = function (certs) { if (!CUSTOM_CERTS_DIR) { return; } var now = Date.now(); var hasChanged; var index = 0; Object.keys(certs).forEach(function (filename) { if (!checkFilename(filename) || filename.length > 128) { return; } var cert = certs[filename]; if (!cert) { return; } var keyStr, certStr; if (Array.isArray(cert)) { keyStr = cert[0]; certStr = cert[1]; } else { keyStr = cert.key; certStr = cert.cert; } if (util.isString(keyStr) && util.isString(certStr)) { var mtime = now + index * 1000; ++index; try { cert = parseCert({ key: keyStr, cert: certStr, mtime: mtime }); if (cert) { writeCertFile(filename, cert.cert, new Date(mtime)); allCustomCerts[filename] = cert; hasChanged = true; } } catch (e) {} } }); hasChanged && parseAllCustomCerts(); };
export * from './PrivateRoute'; export * from './DataAnalyzer'; export * from './theme'; export * from './TopBar'; export * from './ClippedDrawer'; export * from './NavBar'; export * from './FileLoader'; export * from './GraphDataContext'; export * from './Brush'; export * from './NumberTag'; export * from './DataTable'; export * from './SimpleSnackBar'; export * from './Utilities'; export * from './AlertDialog';
/* * highlight-within-textarea * * @author Will Boyd * @github https://github.com/lonekorean/highlight-within-textarea */ const HighlightWithinTextarea = (function() { let ID = 'hwt'; let HighlightWithinTextarea = function(el, config) { this.init(el, config); }; HighlightWithinTextarea.prototype = { init: function(el, config) { this.el = el; // backwards compatibility with v1 (deprecated) if (this.getType(config) === 'function') { config = { highlight: config }; } if (this.getType(config) === 'custom') { this.highlight = config; this.generate(); } else { console.error('valid config object not provided'); } }, // returns identifier strings that aren't necessarily "real" JavaScript types getType: function(instance) { let type = typeof instance; if (!instance) { return 'falsey'; } else if (Array.isArray(instance)) { if (instance.length === 2 && typeof instance[0] === 'number' && typeof instance[1] === 'number') { return 'range'; } else { return 'array'; } } else if (type === 'object') { if (instance instanceof RegExp) { return 'regexp'; } else if (instance.hasOwnProperty('highlight')) { return 'custom'; } } else if (type === 'function' || type === 'string') { return type; } return 'other'; }, generate: function() { this.el.classList.add(ID + '-input', ID + '-content'); this.el.addEventListener('input', this.handleInput.bind(this)); this.el.addEventListener('scroll', this.handleScroll.bind(this)); this.highlights = document.createElement('div'); this.highlights.classList.add(ID + '-highlights', ID + '-content'); this.backdrop = document.createElement('div'); this.backdrop.classList.add(ID + '-backdrop'); this.backdrop.appendChild(this.highlights); this.container = document.createElement('div'); this.container.classList.add(ID + '-container'); this.el.insertAdjacentElement('afterend', this.container); this.container.appendChild(this.backdrop); this.container.appendChild(this.el); this.container.addEventListener('scroll', this.blockContainerScroll.bind(this)); this.browser = this.detectBrowser(); switch (this.browser) { case 'firefox': this.fixFirefox(); break; case 'ios': this.fixIOS(); break; } // plugin function checks this for success this.isGenerated = true; // trigger input event to highlight any existing input this.handleInput(); }, // browser sniffing sucks, but there are browser-specific quirks to handle // that are not a matter of feature detection detectBrowser: function() { let ua = window.navigator.userAgent.toLowerCase(); if (ua.indexOf('firefox') !== -1) { return 'firefox'; } else if (!!ua.match(/msie|trident\/7|edge/)) { return 'ie'; } else if (!!ua.match(/ipad|iphone|ipod/) && ua.indexOf('windows phone') === -1) { // Windows Phone flags itself as "like iPhone", thus the extra check return 'ios'; } else { return 'other'; } }, // Firefox doesn't show text that scrolls into the padding of a textarea, so // rearrange a couple box models to make highlights behave the same way fixFirefox: function() { // take padding and border pixels from highlights div const highlightsStyle = getComputedStyle(this.highlights); let padding = ['padding-top', 'padding-right', 'padding-bottom', 'padding-left'] .map(p => highlightsStyle[p]); let border = ['border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width'] .map(p => highlightsStyle[p]); let marginProperties = ['marginTop', 'marginRight', 'marginBottom', 'marginLeft']; this.highlights.style.padding = 0; this.highlights.style.borderWidth = 0; marginProperties.forEach((p, i) => { this.backdrop.style[p] = "calc(" + getComputedStyle(this.backdrop)[p] + " + " + padding[i] + " + " + border[i] + ")"; }); }, // iOS adds 3px of (unremovable) padding to the left and right of a textarea, // so adjust highlights div to match fixIOS: function() { this.highlights.style['padding-left'] = "calc(" + getComputedStyle(this.highlights)['padding-left'] + " + 3px)"; this.highlights.style['padding-right'] = "calc(" + getComputedStyle(this.highlights)['padding-right'] + " + 3px)"; }, handleInput: function() { let input = this.el.value; let ranges = this.getRanges(input, this.highlight); let unstaggeredRanges = this.removeStaggeredRanges(ranges); let boundaries = this.getBoundaries(unstaggeredRanges); this.renderMarks(boundaries); }, getRanges: function(input, highlight) { let type = this.getType(highlight); switch (type) { case 'array': return this.getArrayRanges(input, highlight); case 'function': return this.getFunctionRanges(input, highlight); case 'regexp': return this.getRegExpRanges(input, highlight); case 'string': return this.getStringRanges(input, highlight); case 'range': return this.getRangeRanges(input, highlight); case 'custom': return this.getCustomRanges(input, highlight); default: if (!highlight) { // do nothing for falsey values return []; } else { console.error('unrecognized highlight type'); } } }, getArrayRanges: function(input, arr) { let ranges = arr.map(this.getRanges.bind(this, input)); return Array.prototype.concat.apply([], ranges); }, getFunctionRanges: function(input, func) { return this.getRanges(input, func(input)); }, getRegExpRanges: function(input, regex) { let ranges = []; let match; while (match = regex.exec(input), match !== null) { ranges.push([match.index, match.index + match[0].length]); if (!regex.global) { // non-global regexes do not increase lastIndex, causing an infinite loop, // but we can just break manually after the first match break; } } return ranges; }, getStringRanges: function(input, str) { let ranges = []; let inputLower = input.toLowerCase(); let strLower = str.toLowerCase(); let index = 0; while (index = inputLower.indexOf(strLower, index), index !== -1) { ranges.push([index, index + strLower.length]); index += strLower.length; } return ranges; }, getRangeRanges: function(input, range) { return [range]; }, getCustomRanges: function(input, custom) { let ranges = this.getRanges(input, custom.highlight); if (custom.className) { ranges.forEach(function(range) { // persist class name as a property of the array if (range.className) { range.className = custom.className + ' ' + range.className; } else { range.className = custom.className; } }); } return ranges; }, // prevent staggered overlaps (clean nesting is fine) removeStaggeredRanges: function(ranges) { let unstaggeredRanges = []; ranges.forEach(function(range) { let isStaggered = unstaggeredRanges.some(function(unstaggeredRange) { let isStartInside = range[0] > unstaggeredRange[0] && range[0] < unstaggeredRange[1]; let isStopInside = range[1] > unstaggeredRange[0] && range[1] < unstaggeredRange[1]; return isStartInside !== isStopInside; // xor }); if (!isStaggered) { unstaggeredRanges.push(range); } }); return unstaggeredRanges; }, getBoundaries: function(ranges) { let boundaries = []; ranges.forEach(function(range) { boundaries.push({ type: 'start', index: range[0], className: range.className }); boundaries.push({ type: 'stop', index: range[1] }); }); this.sortBoundaries(boundaries); return boundaries; }, sortBoundaries: function(boundaries) { // backwards sort (since marks are inserted right to left) boundaries.sort(function(a, b) { if (a.index !== b.index) { return b.index - a.index; } else if (a.type === 'stop' && b.type === 'start') { return 1; } else if (a.type === 'start' && b.type === 'stop') { return -1; } else { return 0; } }); }, renderMarks: function(boundaries) { let input = this.el.value; boundaries.forEach(function(boundary, index) { let markup; if (boundary.type === 'start') { markup = '{{hwt-mark-start|' + index + '}}'; } else { markup = '{{hwt-mark-stop}}'; } input = input.slice(0, boundary.index) + markup + input.slice(boundary.index); }); // this keeps scrolling aligned when input ends with a newline input = input.replace(/\n({{hwt-mark-stop}})?$/, '\n\n$1'); // encode HTML entities input = input.replace(/</g, '&lt;').replace(/>/g, '&gt;'); if (this.browser === 'ie') { // IE/Edge wraps whitespace differently in a div vs textarea, this fixes it input = input.replace(/ /g, ' <wbr>'); } // replace start tokens with opening <mark> tags with class name input = input.replace(/{{hwt-mark-start\|(\d+)}}/g, function(match, submatch) { let className = boundaries[+submatch].className; if (className) { return '<mark class="' + className + '">'; } else { return '<mark>'; } }); // replace stop tokens with closing </mark> tags input = input.replace(/{{hwt-mark-stop}}/g, '</mark>'); this.highlights.innerHTML = input; }, handleScroll: function() { this.backdrop.scrollTop = this.el.scrollTop; // Chrome and Safari won't break long strings of spaces, which can cause // horizontal scrolling, this compensates by shifting highlights by the // horizontally scrolled amount to keep things aligned let scrollLeft = this.el.scrollLeft; this.backdrop.style.transform = (scrollLeft > 0) ? 'translateX(' + -scrollLeft + 'px)' : ''; }, // in Chrome, page up/down in the textarea will shift stuff within the // container (despite the CSS), this immediately reverts the shift blockContainerScroll: function() { this.container.scrollLeft = 0; }, }; return HighlightWithinTextarea; })();
const util = require('../lib/test-utils.js'); const expect = require('chai').expect; describe('fs.ftruncate', function() { beforeEach(util.setup); afterEach(util.cleanup); it('should be a function', function() { let fs = util.fs(); expect(fs.ftruncate).to.be.a('function'); }); it('should return an error if length is not an integer', function(done) { let fs = util.fs(); let contents = 'This is a file.'; fs.writeFile('/myfile', contents, function(error) { if(error) throw error; fs.open('/myfile', 'w', function(err, fd) { fs.ftruncate(fd, 'notAnInteger', function(error) { expect(error).to.exist; expect(error.code).to.equal('EINVAL'); done(); }); // Close file descriptor when done fs.close(fd); }); }); }); it('should return an error if length is negative', function(done) { let fs = util.fs(); let contents = 'This is a file.'; fs.writeFile('/myfile', contents, function(error) { if(error) throw error; fs.open('/myfile', 'w', function(err, fd) { fs.ftruncate(fd, -1, function(error) { expect(error).to.exist; expect(error.code).to.equal('EINVAL'); done(); }); // Close file descriptor when done fs.close(fd); }); }); }); it('should return an error if file descriptor is negative', function(done) { let fs = util.fs(); // File descriptor should be a non-negative number fs.ftruncate(-1, 0, function(error) { expect(error).to.exist; expect(error.code).to.equal('EBADF'); done(); }); }); it('should truncate a file', function(done) { let fs = util.fs(); let buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); let truncated = Buffer.from([1, 2]); fs.open('/myfile', 'w', function(error, result) { if(error) throw error; let fd = result; fs.write(fd, buffer, 0, buffer.length, 0, function(error, result) { if(error) throw error; expect(result).to.equal(buffer.length); // Truncate file to first two bytes fs.ftruncate(fd, 2, function(error) { expect(error).not.to.exist; }); fs.close(fd, function(error) { if(error) throw error; fs.readFile('/myfile', function(error, result) { if(error) throw error; expect(result).to.deep.equal(truncated); done(); }); }); }); }); }); it('should truncate a valid descriptor', function(done) { var fs = util.fs(); var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); fs.open('/myfile', 'w', function(error, result) { if(error) throw error; var fd = result; fs.write(fd, buffer, 0, buffer.length, 0, function(error, result) { if(error) throw error; expect(result).to.equal(buffer.length); fs.ftruncate(fd, 0, function(error) { expect(error).not.to.exist; fs.fstat(fd, function(error, result) { if(error) throw error; expect(result.size).to.equal(0); done(); }); }); }); }); }); it('should pad a file with zeros when the length is greater than the file size', function(done) { let fs = util.fs(); let buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); let truncated = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8, 0]); fs.open('/myfile', 'w', function(error, result) { if(error) throw error; let fd = result; fs.write(fd, buffer, 0, buffer.length, 0, function(error, result) { if(error) throw error; expect(result).to.equal(buffer.length); fs.ftruncate(fd, 9, function(error) { expect(error).not.to.exist; }); fs.close(fd, function(error) { if(error) throw error; fs.readFile('/myfile', function(error, result) { if(error) throw error; expect(result).to.deep.equal(truncated); done(); }); }); }); }); }); it('should assume a length of 0 if passed undefined', function(done) { var fs = util.fs(); var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); fs.open('/myfile', 'w', function(error, result) { if(error) throw error; var fd = result; fs.write(fd, buffer, 0, buffer.length, 0, function(error, result) { if(error) throw error; expect(result).to.equal(buffer.length); // Pass undefined to see that it defaults to 0 fs.ftruncate(fd, undefined, function(error) { expect(error).not.to.exist; fs.stat('/myfile', function(error, result) { if(error) throw error; expect(result.size).to.equal(0); done(); }); }); // Close file descriptor fs.close(fd); }); }); }); it('should update the file size', function(done) { var fs = util.fs(); var buffer = Buffer.from([1, 2, 3, 4, 5, 6, 7, 8]); fs.open('/myfile', 'w', function(error, result) { if(error) throw error; var fd = result; fs.write(fd, buffer, 0, buffer.length, 0, function(error, result) { if(error) throw error; expect(result).to.equal(buffer.length); fs.ftruncate(fd, 0, function(error) { expect(error).not.to.exist; fs.stat('/myfile', function(error, result) { if(error) throw error; expect(result.size).to.equal(0); done(); }); }); // Close file descriptor fs.close(fd); }); }); }); });
integration.whiteRootDomains = ['trustedreviews.com']; integration.blackSubDomains = [];
const install = require('../../tasks/node/install'); const teardown = require('../../tasks/node/teardown'); module.exports = { category: 'Web', libraryName: 'vue-instantsearch', templateName: 'vue-instantsearch', appName: 'vue-instantsearch-app', keywords: ['algolia', 'InstantSearch', 'Vue', 'vue-instantsearch'], tasks: { install, teardown, }, };
export default { //mutations目的就是修改state中的状态,所以其中的方法尽可能完成的事件比较单一,好追踪状态来维护 changeSide(state){ state.isShowSide = !state.isShowSide }, changeLogin(state){ state.ifLogin = !state.ifLogin }, changeTabIndex(state,index){ state.tabIndex = index }, changeUid(state,user){ state.uid = user.id }, changePlayer(state,playlist){ state.player = playlist }, changeSongId(state,id){ //在player中,尝试将comments直接放入vuex中,但没做到换首歌刷新,只能退一步保存歌曲id,在comments state.songId = id // 组件中请求数据 } }
import { LinkActionTypes } from './link.types'; import axios from 'axios'; import config from '../../config'; import { Auth } from 'aws-amplify'; export const getLinksPending = status => { return { type: LinkActionTypes.GET_LINKS_PENDING, payload: status }; }; export const addLinkPending = status => { return { type: LinkActionTypes.ADD_LINK_PENDING, payload: status }; }; export const removeLinkPending = status => { return { type: LinkActionTypes.REMOVE_LINK_PENDING, payload: status }; }; export const updateLinkPending = status => { return { type: LinkActionTypes.UPDATE_LINK_PENDING, payload: status }; }; export const getLinks = () => { return async dispatch => { dispatch(getLinksPending(true)); try { const session = await Auth.currentSession(); const result = await axios.get( `https://cors-anywhere.herokuapp.com/${config.api.invokeUrl}/links`, { headers: { Authorization: session.idToken.jwtToken } } ); dispatch(setLinks(result.data)); } catch (error) { dispatch(setError(error)); } dispatch(getLinksPending(false)); }; }; export const setLinks = links => { return { type: LinkActionTypes.SET_LINKS, payload: links }; }; export const addLink = url => { return async dispatch => { dispatch(addLinkPending(true)); try { const session = await Auth.currentSession(); await axios.post( `https://cors-anywhere.herokuapp.com/${config.api.invokeUrl}/trim`, { url }, { headers: { Authorization: session.idToken.jwtToken } } ); dispatch(getLinks()); } catch (error) { dispatch(setError(error)); } dispatch(addLinkPending(false)); }; }; export const removeLink = id => { return async dispatch => { dispatch(removeLinkPending(true)); try { const session = await Auth.currentSession(); await axios.delete( `https://cors-anywhere.herokuapp.com/${config.api.invokeUrl}/link/${id}`, { headers: { Authorization: session.idToken.jwtToken } } ); dispatch(getLinks()); } catch (error) { dispatch(setError(error)); } dispatch(removeLinkPending(false)); }; }; export const updateLink = id => { return async dispatch => {}; }; export const setError = error => { return { type: LinkActionTypes.SET_ERROR, payload: error }; };
const got = require('@/utils/got'); const parser = require('@/utils/rss-parser'); const cheerio = require('cheerio'); const ProcessFeed = ($, link) => { const title = $('h1').text(); let content = $('div.story-container'); // 处理封面图片 content.find('div.story-image > figure').each((i, e) => { const src = `https://thumbor.ftacademy.cn/unsafe/1340x754/${e.attribs['data-url']}`; $(`<img src=${src}>`).insertAfter(content.find('div.story-lead')[0]); }); // 付费文章跳转 content.find('div#subscribe-now-container').each((i, e) => { $(`<br/><p>此文章为付费文章,会员<a href='${link}'>请访问网站阅读</a>。</p>`).insertAfter(content.find('div.story-body')[0]); $(e).remove(); }); // 获取作者 let author = ''; content.find('span.story-author > a').each((i, e) => { author += `${$(e).text()} `; }); author = author.trim(); // 去除头部主题, 头部重复标题, 冗余元数据, 植入广告, 植入 js, 社交分享按钮, 底部版权声明, 空白 DOM content .find( 'div.story-theme, h1.story-headline, div.story-byline, div.mpu-container-instory,script, div#story-action-placeholder, div.copyrightstatement-container, div.clearfloat, div.o-ads, h2.list-title, div.allcomments, div.logincomment, div.nologincomment' ) .each((i, e) => { $(e).remove(); }); content = content.html(); return { content, author, title }; }; const getData = async ({ site = 'www', channel }) => { let feed; if (channel) { channel = channel.toLowerCase(); channel = channel.split('-').join('/'); try { feed = await parser.parseURL(`http://${site}.ftchinese.com/rss/${channel}`); } catch (error) { return { title: `FT 中文网 ${channel} 不存在`, description: `FT 中文网 ${channel} 不存在`, }; } } else { feed = await parser.parseURL(`http://${site}.ftchinese.com/rss/feed`); } const items = await Promise.all( feed.items.splice(0, 10).map(async (item) => { const response = await got.get(`${item.link}?full=y&archive`); const $ = cheerio.load(response.data); const result = ProcessFeed($, item.link); const single = { title: result.title, description: result.content, author: result.author, pubDate: item.pubDate, link: item.link, }; return Promise.resolve(single); }) ); return { title: feed.title, link: feed.link, description: feed.description, item: items, }; }; module.exports = { getData, };
const deepLinkPrefix = 'brightid://link-verification/http:%2f%2fnode.brightid.org/idchain/'; const claimURL = './api/claim'; let lastAddress; $(function () { $('#ethereum-address').on('change keyup', (e) => { const account = $('#ethereum-address').val(); if (account == lastAddress) { return; } lastAddress = account; $('#deeplink').attr("href", "#"); $('#qrcode').html(''); if (!(/^(0x){1}[0-9a-fA-F]{40}$/i.test(account))) { return $('#ethereum-address')[0].setCustomValidity("Invalid address"); } $('#ethereum-address')[0].setCustomValidity(""); $('#qrcode').show(); new QRCode(document.getElementById("qrcode"), { text: deepLinkPrefix+account, width: 220, height: 220, }); $('#deeplink').attr("href", deepLinkPrefix+account); $.post({ url: claimURL, data: JSON.stringify({addr: account}), dataType: 'json', contentType: 'application/json; charset=utf-8', success: function (data) { if (data.error) { alert(data.error); } }, }); setTimeout(function(){ $('#qrcode').hide(); }, 120000); }); $('#load-address-button').on('click', async () => { if (!window.ethereum) { return alert('Metamask is not installed on this browser!'); } try { var accounts = await ethereum.enable(); } catch (e) { return alert(e.message); } const account = accounts[0]; $('#ethereum-address').val(account).trigger('change'); }); $('#add-network-button').on('click', async () => { if (!window.ethereum) { return alert('Metamask is not installed on this browser!'); } ethereum .request({ method: 'wallet_addEthereumChain', params: [{ chainId: '0x4a', chainName: 'IDChain', nativeCurrency: { name: 'Eidi', symbol: 'Eidi', decimals: 18, }, rpcUrls: ['https://idchain.one/rpc/'], blockExplorerUrls: ['https://explorer.idchain.one'], iconUrls: ['https://apps.brightid.org/logos/idchain.png'] }] }) .then((args) => console.log(args)) .catch((error) => { if (error.code === 4001) { alert('Please connect to MetaMask.'); } else { console.error(error); } }); }); });
import React from 'react'; class Menu extends React.PureComponent { render() { return ( <div className="only-desktop"> <ul className="list"> <li className="list__item"> <a href="/" className="line"></a> <a href="/" className="link"> Home </a> </li> <li className="list__item"> <a href="/gigs" className="line"></a> <a href="/gigs" className="link"> Gigs </a> </li> <li className="list__item"> <a target="_blank" href="http://carcosarecords.bigcartel.com/" className="line" ></a> <a target="_blank" href="http://carcosarecords.bigcartel.com/" className="link" > Shop </a> </li> <li className="list__item"> <a href="/contact" className="line"></a> <a href="/contact" className="link"> Contact </a> </li> </ul> </div> ); } } export default Menu;
import React, { Component, } from 'react'; import { Linking, Platform } from 'react-native'; import { Caption, View, Image, Button, Text, } from '@shoutem/ui'; import { connectStyle } from '@shoutem/theme'; import Camera from 'react-native-camera'; import _ from 'lodash'; import { ext } from '../const'; const openAppSettings = () => { Linking.openURL('app-settings:'); }; const { func, object, shape } = React.PropTypes; /** * A component that lets a user scan a QR code */ class QRCodeScanner extends Component { static propTypes = { // Called when a QR code has been successfully scanned onQRCodeScanned: func, // Component style, style: shape({ cameraContainer: object, cameraFocusFrame: object, cameraView: object, noPermissionsMessage: object, }), } constructor(props) { super(props); this.updateIsAuthorized = this.updateIsAuthorized.bind(this); let isAuthorized = true; if (Platform.OS === 'ios') { // Asks for permissions if not defined, returns choice otherwise isAuthorized = undefined; Camera.checkDeviceAuthorizationStatus().then(this.updateIsAuthorized); } this.state = { isAuthorized }; this.onQRCodeScanned = _.debounce(props.onQRCodeScanned, 1000, { leading: true, trailing: false }); } updateIsAuthorized(isAuthorized) { this.setState({ isAuthorized }); } /** * Show the Camera view only when needed permissions are granted. * react-native-camera package crash when camera permissions aren't granted. * @returns {*} */ render() { const { isAuthorized } = this.state; const { style } = this.props; const cameraQuality = Camera.constants.CaptureQuality.medium; if (_.isUndefined(isAuthorized)) { // Permissions not resolved return null; } if (!isAuthorized) { // Permissions not granted return ( <View style={style.cameraContainer}> <Caption style={style.noPermissionsMessage} styleName="lg-gutter-bottom" > Camera permission not granted. </Caption> <Button onPress={openAppSettings}> <Text>Change permissions</Text> </Button> </View> ); } return ( <View style={style.cameraContainer}> <Camera onBarCodeRead={this.onQRCodeScanned} style={style.cameraView} aspect={Camera.constants.Aspect.fill} captureQuality={cameraQuality} /> <Image source={require('../assets/images/focus-frame.png')} style={style.cameraFocusFrame} /> </View> ); } } export default connectStyle(ext('QRCodeScanner'))(QRCodeScanner);
module.exports={ "VPC":{ "Value":{"Fn::GetAtt":["Variables","VPC"]} }, "CodeBucket":{ "Value":{"Ref":"CodeBucket"} }, "TrainingRoleArn":{ "Value":{"Fn::GetAtt":["TrainingRole","Arn"]} }, "TrainingRole":{ "Value":{"Ref":"TrainingRole"} }, "ModelRole":{ "Value":{"Ref":"ModelRole"} }, "AlexaLambdaArn":{ "Value":{"Fn::GetAtt":["AlexaLambda","Arn"]}, "Description":"Lambda function for creating an alexa skill" }, "ParameterStore":{ "Value":{"Ref":"ParameterStore"} }, "NoteBookUrl":{ "Value":{"Fn::If":[ "NoteBookInstance", {"Fn::Sub":"https://console.aws.amazon.com/sagemaker/home?region=${AWS::Region}#/notebook-instances/openNotebook/${Notebook.Name}"}, "EMPTY" ]}, "Description":"AWS Console url of your sagemaker notebook instance, from here you can open the instance" }, "NoteBookInstance":{ "Value":{"Fn::If":[ "NoteBookInstance", {"Fn::Sub":"https://console.aws.amazon.com/sagemaker/home?region=${AWS::Region}#/notebook-instances/${Notebook.Name}"}, "EMPTY" ]}, "Description":"AWS Console url of your sagemaker notebook instance, from here you can open the instance" }, "NoteBookInstanceName":{ "Value":{"Fn::If":[ "NoteBookInstance", {"Fn::Sub":"${Notebook.Name}"}, "EMPTY" ]}, "Description":"AWS Console url of your sagemaker notebook instance, from here you can open the instance" }, "DashboardUrl":{ "Value":{"Fn::Join":["",[ "https://console.aws.amazon.com/cloudwatch/home?", "region=",{"Ref":"AWS::Region"}, "#dashboards:name=",{"Ref":"dashboard"} ]]}, "Description":"CloudWatch Dashboard that tracks Lambda, SageMaker, and step function metrics" }, "TrainStatusTopic":{ "Value":{"Ref":"TrainStatusTopic"}, "Description":"SNS topic that gives success or failure updates of build" }, "LaunchTopic":{ "Value":{"Ref":"LaunchTopic"}, "Description":"Topic that triggers a new build/train. Use this value to setup github webhook triggers." }, "RollbackTopic":{ "Value":{"Ref":"RollbackTopic"}, "Description":"Topic that triggers a rollback fo the endpoint to the previous config" }, "SageMakerEndpoint":{ "Value":{"Fn::GetAtt":["Variables","EndpointName"]}, "Description":"Name of the SageMaker endpoint" }, "StateMachine":{ "Value":{"Ref":"StateMachine"}, "Description":"StepFunction StateMachine the runs the build" }, "DataBucket":{ "Value":{"Fn::GetAtt":["Variables","DataBucket"]}, "Description":"S3 Bucket to put data for training in, will automaticaly trigger a new build" }, "TrainingConfigLambda":{ "Value":{"Fn::Sub":"${LambdaVariables.TrainingConfig}"}, "Description":"Lambda function that returns the Training Job Config" }, "EndpointConfigLambda":{ "Value":{"Fn::Sub":"${LambdaVariables.EndpointConfig}"}, "Description":"Lambda function that returns the Endpoint Config" }, "ModelConfigLambda":{ "Value":{"Fn::Sub":"${LambdaVariables.ModelConfig}"}, "Description":"Lambda function that returns Model Configuration" }, "RepoUrl":{ "Value":{"Fn::GetAtt":["Variables","RepoUrl"]}, "Description":"CodeCommit repo to put Dockerfile code in, will automatically trigger a new build" }, "StepFunctionConsole":{ "Value":{"Fn::Sub":"https://console.aws.amazon.com/states/home?region=${AWS::Region}#/statemachines/view/${StateMachine}"}, "Description":"AWS Console for the StepFunction StateMachine that controls the build" } }
const DAYS_IN_WEEK = 7; const DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]; const WEEK_DAYS_FROM_MONDAY = [6, 0, 1, 2, 3, 4, 5]; const Month = { January: 0, February: 1, March: 2, April: 3, May: 4, June: 5, July: 6, August: 7, September: 8, October: 9, Novermber: 10, December: 11 }; export function areEqual(a, b) { if (!a || !b) return false; return ( a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate() ); } export function isLeapYear(year) { return !((year % 4) || (!(year % 100) && (year % 400))); } export function getDaysInMonth(date) { const month = date.getMonth(); const year = date.getFullYear(); const daysInMonth = DAYS_IN_MONTH[month]; if (isLeapYear(year) && month === Month.February) { return daysInMonth + 1; } else { return daysInMonth; } } export function getDayOfWeek(date) { const dayOfWeek = date.getDay(); return WEEK_DAYS_FROM_MONDAY[dayOfWeek]; } export function getMonthData(year, month) { const result = []; const date = new Date(year, month); const daysInMonth = getDaysInMonth(date); const monthStartsOn = getDayOfWeek(date); let day = 1; for (let i = 0; i < (daysInMonth + monthStartsOn) / DAYS_IN_WEEK; i++) { result[i] = []; for (let j = 0; j < DAYS_IN_WEEK; j++) { if ((i === 0 && j < monthStartsOn) || day > daysInMonth) { result[i][j] = undefined; } else { result[i][j] = new Date(year, month, day++); } } } return result; }
/* */ System.register(["aurelia-metadata", "./property", "./attached-behavior", "./children", "./custom-element", "./element-config", "./template-controller", "./view-strategy", "./resource-coordinator", "./resource-registry", "./view-compiler", "./view-engine", "./view-factory", "./view-slot", "./binding-language", "./composition-engine"], function (_export) { "use strict"; var Metadata, BehaviorProperty, OptionsProperty, AttachedBehavior, ChildObserver, CustomElement, UseShadowDOM, SkipContentProcessing, ElementConfig, TemplateController, UseView, NoView, Behavior; return { setters: [function (_aureliaMetadata) { Metadata = _aureliaMetadata.Metadata; }, function (_property) { BehaviorProperty = _property.BehaviorProperty; OptionsProperty = _property.OptionsProperty; _export("BehaviorProperty", _property.BehaviorProperty); _export("OptionsProperty", _property.OptionsProperty); }, function (_attachedBehavior) { AttachedBehavior = _attachedBehavior.AttachedBehavior; _export("AttachedBehavior", _attachedBehavior.AttachedBehavior); }, function (_children) { ChildObserver = _children.ChildObserver; _export("ChildObserver", _children.ChildObserver); }, function (_customElement) { CustomElement = _customElement.CustomElement; UseShadowDOM = _customElement.UseShadowDOM; SkipContentProcessing = _customElement.SkipContentProcessing; _export("CustomElement", _customElement.CustomElement); _export("UseShadowDOM", _customElement.UseShadowDOM); _export("SkipContentProcessing", _customElement.SkipContentProcessing); }, function (_elementConfig) { ElementConfig = _elementConfig.ElementConfig; _export("ElementConfig", _elementConfig.ElementConfig); }, function (_templateController) { TemplateController = _templateController.TemplateController; _export("TemplateController", _templateController.TemplateController); }, function (_viewStrategy) { UseView = _viewStrategy.UseView; NoView = _viewStrategy.NoView; _export("ViewStrategy", _viewStrategy.ViewStrategy); _export("UseView", _viewStrategy.UseView); _export("ConventionalView", _viewStrategy.ConventionalView); _export("NoView", _viewStrategy.NoView); }, function (_resourceCoordinator) { _export("ResourceCoordinator", _resourceCoordinator.ResourceCoordinator); }, function (_resourceRegistry) { _export("ResourceRegistry", _resourceRegistry.ResourceRegistry); _export("ViewResources", _resourceRegistry.ViewResources); }, function (_viewCompiler) { _export("ViewCompiler", _viewCompiler.ViewCompiler); }, function (_viewEngine) { _export("ViewEngine", _viewEngine.ViewEngine); }, function (_viewFactory) { _export("ViewFactory", _viewFactory.ViewFactory); _export("BoundViewFactory", _viewFactory.BoundViewFactory); }, function (_viewSlot) { _export("ViewSlot", _viewSlot.ViewSlot); }, function (_bindingLanguage) { _export("BindingLanguage", _bindingLanguage.BindingLanguage); }, function (_compositionEngine) { _export("CompositionEngine", _compositionEngine.CompositionEngine); }], execute: function () { Behavior = _export("Behavior", Metadata); Metadata.configure.classHelper("withProperty", BehaviorProperty); Metadata.configure.classHelper("withOptions", OptionsProperty); Metadata.configure.classHelper("attachedBehavior", AttachedBehavior); Metadata.configure.classHelper("syncChildren", ChildObserver); Metadata.configure.classHelper("customElement", CustomElement); Metadata.configure.classHelper("useShadowDOM", UseShadowDOM); Metadata.configure.classHelper("elementConfig", ElementConfig); Metadata.configure.classHelper("templateController", TemplateController); Metadata.configure.classHelper("useView", UseView); Metadata.configure.classHelper("noView", NoView); Metadata.configure.classHelper("skipContentProcessing", SkipContentProcessing); } }; });