code_text
stringlengths
604
999k
repo_name
stringlengths
4
100
file_path
stringlengths
4
873
language
stringclasses
23 values
license
stringclasses
15 values
size
int32
1.02k
999k
// Copyright (c) .NET Foundation. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for details. namespace mshtml { using System; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; [ComImport, TypeLibType((short) 0x1040), Guid("3050F2BC-98B5-11CF-BB82-00AA00BDCE0B")] public interface IHTMLOptionButtonElement { [DispId(-2147413011)] string value { [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 20), DispId(-2147413011)] set; [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(-2147413011), TypeLibFunc((short) 20)] get; } [DispId(0x7d0)] string type { [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d0)] get; } [DispId(-2147418112)] string name { [param: In, MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(-2147418112), TypeLibFunc((short) 20)] set; [return: MarshalAs(UnmanagedType.BStr)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 20), DispId(-2147418112)] get; } [DispId(0x7d9)] bool @checked { [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d9), TypeLibFunc((short) 4)] set; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 4), DispId(0x7d9)] get; } [DispId(0x7d8)] bool defaultChecked { [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d8), TypeLibFunc((short) 4)] set; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 4), DispId(0x7d8)] get; } [DispId(-2147412082)] object onchange { [param: In, MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 20), DispId(-2147412082)] set; [return: MarshalAs(UnmanagedType.Struct)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(-2147412082), TypeLibFunc((short) 20)] get; } [DispId(-2147418036)] bool disabled { [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 20), DispId(-2147418036)] set; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 20), DispId(-2147418036)] get; } [DispId(0x7d1)] bool status { [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d1)] set; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d1)] get; } [DispId(0x7d7)] bool indeterminate { [param: In] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(0x7d7), TypeLibFunc((short) 4)] set; [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), TypeLibFunc((short) 4), DispId(0x7d7)] get; } [DispId(-2147416108)] IHTMLFormElement form { [return: MarshalAs(UnmanagedType.Interface)] [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime), DispId(-2147416108)] get; } } }
panjkov/OpenLiveWriter
src/managed/OpenLiveWriter.Interop.Mshtml/mshtml/IHTMLOptionButtonElement.cs
C#
mit
3,628
// Copyright (c) 2011-2014 The Bitcoin Core developers // Distributed under the MIT/X11 software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. // // Unit tests for denial-of-service detection/prevention code // #include "bignum.h" #include "keystore.h" #include "main.h" #include "net.h" #include "script.h" #include "serialize.h" #include <stdint.h> #include <boost/assign/list_of.hpp> // for 'map_list_of()' #include <boost/date_time/posix_time/posix_time_types.hpp> #include <boost/foreach.hpp> #include <boost/test/unit_test.hpp> // Tests this internal-to-main.cpp method: extern bool AddOrphanTx(const CTransaction& tx, NodeId peer); extern void EraseOrphansFor(NodeId peer); extern unsigned int LimitOrphanTxSize(unsigned int nMaxOrphans); extern std::map<uint256, CTransaction> mapOrphanTransactions; extern std::map<uint256, std::set<uint256> > mapOrphanTransactionsByPrev; CService ip(uint32_t i) { struct in_addr s; s.s_addr = i; return CService(CNetAddr(s), Params().GetDefaultPort()); } BOOST_AUTO_TEST_SUITE(DoS_tests) BOOST_AUTO_TEST_CASE(DoS_banning) { CNode::ClearBanned(); CAddress addr1(ip(0xa0b0c001)); CNode dummyNode1(INVALID_SOCKET, addr1, "", true); dummyNode1.nVersion = 1; Misbehaving(dummyNode1.GetId(), 100); // Should get banned SendMessages(&dummyNode1, false); BOOST_CHECK(CNode::IsBanned(addr1)); BOOST_CHECK(!CNode::IsBanned(ip(0xa0b0c001|0x0000ff00))); // Different IP, not banned CAddress addr2(ip(0xa0b0c002)); CNode dummyNode2(INVALID_SOCKET, addr2, "", true); dummyNode2.nVersion = 1; Misbehaving(dummyNode2.GetId(), 50); SendMessages(&dummyNode2, false); BOOST_CHECK(!CNode::IsBanned(addr2)); // 2 not banned yet... BOOST_CHECK(CNode::IsBanned(addr1)); // ... but 1 still should be Misbehaving(dummyNode2.GetId(), 50); SendMessages(&dummyNode2, false); BOOST_CHECK(CNode::IsBanned(addr2)); } BOOST_AUTO_TEST_CASE(DoS_banscore) { CNode::ClearBanned(); mapArgs["-banscore"] = "111"; // because 11 is my favorite number CAddress addr1(ip(0xa0b0c001)); CNode dummyNode1(INVALID_SOCKET, addr1, "", true); dummyNode1.nVersion = 1; Misbehaving(dummyNode1.GetId(), 100); SendMessages(&dummyNode1, false); BOOST_CHECK(!CNode::IsBanned(addr1)); Misbehaving(dummyNode1.GetId(), 10); SendMessages(&dummyNode1, false); BOOST_CHECK(!CNode::IsBanned(addr1)); Misbehaving(dummyNode1.GetId(), 1); SendMessages(&dummyNode1, false); BOOST_CHECK(CNode::IsBanned(addr1)); mapArgs.erase("-banscore"); } BOOST_AUTO_TEST_CASE(DoS_bantime) { CNode::ClearBanned(); int64_t nStartTime = GetTime(); SetMockTime(nStartTime); // Overrides future calls to GetTime() CAddress addr(ip(0xa0b0c001)); CNode dummyNode(INVALID_SOCKET, addr, "", true); dummyNode.nVersion = 1; Misbehaving(dummyNode.GetId(), 100); SendMessages(&dummyNode, false); BOOST_CHECK(CNode::IsBanned(addr)); SetMockTime(nStartTime+60*60); BOOST_CHECK(CNode::IsBanned(addr)); SetMockTime(nStartTime+60*60*24+1); BOOST_CHECK(!CNode::IsBanned(addr)); } static bool CheckNBits(unsigned int nbits1, int64_t time1, unsigned int nbits2, int64_t time2)\ { if (time1 > time2) return CheckNBits(nbits2, time2, nbits1, time1); int64_t deltaTime = time2-time1; CBigNum required; required.SetCompact(ComputeMinWork(nbits1, deltaTime)); CBigNum have; have.SetCompact(nbits2); return (have <= required); } BOOST_AUTO_TEST_CASE(DoS_checknbits) { using namespace boost::assign; // for 'map_list_of()' // Timestamps,and difficulty from the bitcoin blockchain. // These are the block-chain checkpoint blocks typedef std::map<int64_t, unsigned int> BlockData; BlockData chainData = map_list_of(1386481098,486789243)(1388890893,469814416); // Make sure CheckNBits considers every combination of block-chain-lock-in-points // "sane": BOOST_FOREACH(const BlockData::value_type& i, chainData) { BOOST_FOREACH(const BlockData::value_type& j, chainData) { BOOST_CHECK(CheckNBits(i.second, i.first, j.second, j.first)); } } // Test a couple of insane combinations: BlockData::value_type firstcheck = *(chainData.begin()); BlockData::value_type lastcheck = *(chainData.rbegin()); // First checkpoint difficulty at or a while after the last checkpoint time should fail when // compared to last checkpoint BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*10, lastcheck.second, lastcheck.first)); BOOST_CHECK(!CheckNBits(firstcheck.second, lastcheck.first+60*60*24*3, lastcheck.second, lastcheck.first)); // ... but OK if enough time passed for difficulty to adjust downward: BOOST_CHECK(CheckNBits(firstcheck.second, lastcheck.first+60*60*24*365*4, lastcheck.second, lastcheck.first)); } CTransaction RandomOrphan() { std::map<uint256, CTransaction>::iterator it; it = mapOrphanTransactions.lower_bound(GetRandHash()); if (it == mapOrphanTransactions.end()) it = mapOrphanTransactions.begin(); return it->second; } BOOST_AUTO_TEST_CASE(DoS_mapOrphans) { CKey key; key.MakeNewKey(true); CBasicKeyStore keystore; keystore.AddKey(key); // 50 orphan transactions: for (int i = 0; i < 50; i++) { CTransaction tx; tx.vin.resize(1); tx.vin[0].prevout.n = 0; tx.vin[0].prevout.hash = GetRandHash(); tx.vin[0].scriptSig << OP_1; tx.vout.resize(1); tx.vout[0].nValue = 1*CENT; tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID()); AddOrphanTx(tx, i); } // ... and 50 that depend on other orphans: for (int i = 0; i < 50; i++) { CTransaction txPrev = RandomOrphan(); CTransaction tx; tx.vin.resize(1); tx.vin[0].prevout.n = 0; tx.vin[0].prevout.hash = txPrev.GetHash(); tx.vout.resize(1); tx.vout[0].nValue = 1*CENT; tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID()); SignSignature(keystore, txPrev, tx, 0); AddOrphanTx(tx, i); } // This really-big orphan should be ignored: for (int i = 0; i < 10; i++) { CTransaction txPrev = RandomOrphan(); CTransaction tx; tx.vout.resize(1); tx.vout[0].nValue = 1*CENT; tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID()); tx.vin.resize(500); for (unsigned int j = 0; j < tx.vin.size(); j++) { tx.vin[j].prevout.n = j; tx.vin[j].prevout.hash = txPrev.GetHash(); } SignSignature(keystore, txPrev, tx, 0); // Re-use same signature for other inputs // (they don't have to be valid for this test) for (unsigned int j = 1; j < tx.vin.size(); j++) tx.vin[j].scriptSig = tx.vin[0].scriptSig; BOOST_CHECK(!AddOrphanTx(tx, i)); } // Test EraseOrphansFor: for (NodeId i = 0; i < 3; i++) { size_t sizeBefore = mapOrphanTransactions.size(); EraseOrphansFor(i); BOOST_CHECK(mapOrphanTransactions.size() < sizeBefore); } // Test LimitOrphanTxSize() function: LimitOrphanTxSize(40); BOOST_CHECK(mapOrphanTransactions.size() <= 40); LimitOrphanTxSize(10); BOOST_CHECK(mapOrphanTransactions.size() <= 10); LimitOrphanTxSize(0); BOOST_CHECK(mapOrphanTransactions.empty()); BOOST_CHECK(mapOrphanTransactionsByPrev.empty()); } BOOST_AUTO_TEST_CASE(DoS_checkSig) { // Test signature caching code (see key.cpp Verify() methods) CKey key; key.MakeNewKey(true); CBasicKeyStore keystore; keystore.AddKey(key); unsigned int flags = SCRIPT_VERIFY_P2SH | SCRIPT_VERIFY_STRICTENC; // 100 orphan transactions: static const int NPREV=100; CTransaction orphans[NPREV]; for (int i = 0; i < NPREV; i++) { CTransaction& tx = orphans[i]; tx.vin.resize(1); tx.vin[0].prevout.n = 0; tx.vin[0].prevout.hash = GetRandHash(); tx.vin[0].scriptSig << OP_1; tx.vout.resize(1); tx.vout[0].nValue = 1*CENT; tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID()); AddOrphanTx(tx, 0); } // Create a transaction that depends on orphans: CTransaction tx; tx.vout.resize(1); tx.vout[0].nValue = 1*CENT; tx.vout[0].scriptPubKey.SetDestination(key.GetPubKey().GetID()); tx.vin.resize(NPREV); for (unsigned int j = 0; j < tx.vin.size(); j++) { tx.vin[j].prevout.n = 0; tx.vin[j].prevout.hash = orphans[j].GetHash(); } // Creating signatures primes the cache: boost::posix_time::ptime mst1 = boost::posix_time::microsec_clock::local_time(); for (unsigned int j = 0; j < tx.vin.size(); j++) BOOST_CHECK(SignSignature(keystore, orphans[j], tx, j)); boost::posix_time::ptime mst2 = boost::posix_time::microsec_clock::local_time(); boost::posix_time::time_duration msdiff = mst2 - mst1; long nOneValidate = msdiff.total_milliseconds(); if (fDebug) printf("DoS_Checksig sign: %ld\n", nOneValidate); // ... now validating repeatedly should be quick: // 2.8GHz machine, -g build: Sign takes ~760ms, // uncached Verify takes ~250ms, cached Verify takes ~50ms // (for 100 single-signature inputs) mst1 = boost::posix_time::microsec_clock::local_time(); for (unsigned int i = 0; i < 5; i++) for (unsigned int j = 0; j < tx.vin.size(); j++) BOOST_CHECK(VerifySignature(CCoins(orphans[j], MEMPOOL_HEIGHT), tx, j, flags, SIGHASH_ALL)); mst2 = boost::posix_time::microsec_clock::local_time(); msdiff = mst2 - mst1; long nManyValidate = msdiff.total_milliseconds(); if (fDebug) printf("DoS_Checksig five: %ld\n", nManyValidate); BOOST_CHECK_MESSAGE(nManyValidate < nOneValidate, "Signature cache timing failed"); // Empty a signature, validation should fail: CScript save = tx.vin[0].scriptSig; tx.vin[0].scriptSig = CScript(); BOOST_CHECK(!VerifySignature(CCoins(orphans[0], MEMPOOL_HEIGHT), tx, 0, flags, SIGHASH_ALL)); tx.vin[0].scriptSig = save; // Swap signatures, validation should fail: std::swap(tx.vin[0].scriptSig, tx.vin[1].scriptSig); BOOST_CHECK(!VerifySignature(CCoins(orphans[0], MEMPOOL_HEIGHT), tx, 0, flags, SIGHASH_ALL)); BOOST_CHECK(!VerifySignature(CCoins(orphans[1], MEMPOOL_HEIGHT), tx, 1, flags, SIGHASH_ALL)); std::swap(tx.vin[0].scriptSig, tx.vin[1].scriptSig); // Exercise -maxsigcachesize code: mapArgs["-maxsigcachesize"] = "10"; // Generate a new, different signature for vin[0] to trigger cache clear: CScript oldSig = tx.vin[0].scriptSig; BOOST_CHECK(SignSignature(keystore, orphans[0], tx, 0)); BOOST_CHECK(tx.vin[0].scriptSig != oldSig); for (unsigned int j = 0; j < tx.vin.size(); j++) BOOST_CHECK(VerifySignature(CCoins(orphans[j], MEMPOOL_HEIGHT), tx, j, flags, SIGHASH_ALL)); mapArgs.erase("-maxsigcachesize"); LimitOrphanTxSize(0); } BOOST_AUTO_TEST_SUITE_END()
sjwcoin/sjwcoin-core-testnet
src/test/DoS_tests.cpp
C++
mit
11,235
/* Artfully masterminded by ZURB */ body { position: relative; } #joyRideTipContent { display: none; } .joyRideTipContent { display: none; } /* Default styles for the container */ .joyride-tip-guide { position: absolute; background: #000; background: rgba(0,0,0,0.8); display: none; color: #fff; width: 300px; z-index: 101; top: 0; /* keeps the page from scrolling when calculating position */ left: 0; font-family: "HelveticaNeue", "Helvetica Neue", "Helvetica", Helvetica, Arial, Lucida, sans-serif; font-weight: normal; -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } .joyride-content-wrapper { padding: 10px 10px 15px 15px; } /* Mobile */ @media only screen and (max-width: 767px) { .joyride-tip-guide { width: 95% !important; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; left: 2.5% !important; } .joyride-tip-guide-wrapper { width: 100%; } } /* Add a little css triangle pip, older browser just miss out on the fanciness of it */ .joyride-tip-guide span.joyride-nub { display: block; position: absolute; left: 22px; width: 0; height: 0; border: solid 14px; border: solid 14px; } .joyride-tip-guide span.joyride-nub.top { /* IE7/IE8 Don't support rgba so we set the fallback border color here. However, IE7/IE8 are also buggy in that the fallback color doesn't work for border-bottom-color so here we set the border-color and override the top,left,right colors below. */ border-color: #000; border-color: rgba(0,0,0,0.8); border-top-color: transparent !important; border-left-color: transparent !important; border-right-color: transparent !important; border-top-width: 0; top: -14px; bottom: none; } .joyride-tip-guide span.joyride-nub.bottom { /* IE7/IE8 Don't support rgba so we set the fallback border color here. However, IE7/IE8 are also buggy in that the fallback color doesn't work for border-top-color so here we set the border-color and override the bottom,left,right colors below. */ border-color: #000; border-color: rgba(0,0,0,0.8) !important; border-bottom-color: transparent !important; border-left-color: transparent !important; border-right-color: transparent !important; border-bottom-width: 0; bottom: -14px; bottom: none; } .joyride-tip-guide span.joyride-nub.right { border-color: #000; border-color: rgba(0,0,0,0.8) !important; border-top-color: transparent !important; border-right-color: transparent !important; border-bottom-color: transparent !important; border-right-width: 0; top: 22px; bottom: none; left: auto; right: -14px; } .joyride-tip-guide span.joyride-nub.left { border-color: #000; border-color: rgba(0,0,0,0.8) !important; border-top-color: transparent !important; border-left-color: transparent !important; border-bottom-color: transparent !important; border-left-width: 0; top: 22px; left: -14px; right: auto; bottom: none; } .joyride-tip-guide span.joyride-nub.top-right { border-color: #000; border-color: rgba(0,0,0,0.8); border-top-color: transparent !important; border-left-color: transparent !important; border-right-color: transparent !important; border-top-width: 0; top: -14px; bottom: none; left: auto; right: 28px; } /* Typography */ .joyride-tip-guide h1,.joyride-tip-guide h2,.joyride-tip-guide h3,.joyride-tip-guide h4,.joyride-tip-guide h5,.joyride-tip-guide h6 { line-height: 1.25; margin: 0; font-weight: bold; color: #fff; } .joyride-tip-guide h1 { font-size: 30px; } .joyride-tip-guide h2 { font-size: 26px; } .joyride-tip-guide h3 { font-size: 22px; } .joyride-tip-guide h4 { font-size: 18px; } .joyride-tip-guide h5 { font-size: 16px; } .joyride-tip-guide h6 { font-size: 14px; } .joyride-tip-guide p { margin: 0 0 18px 0; font-size: 14px; line-height: 18px; } .joyride-tip-guide a { color: rgb(255,255,255); text-decoration: none; border-bottom: dotted 1px rgba(255,255,255,0.6); } .joyride-tip-guide a:hover { color: rgba(255,255,255,0.8); border-bottom: none; } /* Button Style */ .joyride-tip-guide .joyride-next-tip { width: auto; padding: 6px 18px 4px; font-size: 13px; text-decoration: none; color: rgb(255,255,255); border: solid 1px rgb(0,60,180); background: rgb(0,99,255); background: -moz-linear-gradient(top, rgb(0,99,255) 0%, rgb(0,85,214) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(0,99,255)), color-stop(100%,rgb(0,85,214))); background: -webkit-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%); background: -o-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%); background: -ms-linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#0063ff', endColorstr='#0055d6',GradientType=0 ); background: linear-gradient(top, rgb(0,99,255) 0%,rgb(0,85,214) 100%); text-shadow: 0 -1px 0 rgba(0,0,0,0.5); -webkit-border-radius: 2px; -moz-border-radius: 2px; border-radius: 2px; -webkit-box-shadow: 0px 1px 0px rgba(255,255,255,0.3) inset; -moz-box-shadow: 0px 1px 0px rgba(255,255,255,0.3) inset; box-shadow: 0px 1px 0px rgba(255,255,255,0.3) inset; } .joyride-next-tip:hover { color: rgb(255,255,255) !important; border: solid 1px rgb(0,60,180) !important; background: rgb(43,128,255); background: -moz-linear-gradient(top, rgb(43,128,255) 0%, rgb(29,102,211) 100%); background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgb(43,128,255)), color-stop(100%,rgb(29,102,211))); background: -webkit-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%); background: -o-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%); background: -ms-linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%); filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2b80ff', endColorstr='#1d66d3',GradientType=0 ); background: linear-gradient(top, rgb(43,128,255) 0%,rgb(29,102,211) 100%); } .joyride-timer-indicator-wrap { width: 50px; height: 3px; border: solid 1px rgba(255,255,255,0.1); position: absolute; right: 17px; bottom: 16px; } .joyride-timer-indicator { display: block; width: 0; height: inherit; background: rgba(255,255,255,0.25); } .joyride-close-tip { position: absolute; right: 10px; top: 10px; color: rgba(255,255,255,0.4) !important; text-decoration: none; font-family: Verdana, sans-serif; font-size: 10px; font-weight: bold; border-bottom: none !important; } .joyride-close-tip:hover { color: rgba(255,255,255,0.9) !important; } .joyride-modal-bg { position: fixed; height: 100%; width: 100%; background: rgb(0,0,0); background: transparent; background: rgba(0,0,0, 0.5); -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter: alpha(opacity=50); opacity: 0.5; z-index: 100; display: none; top: 0; left: 0; cursor: pointer; } .joyride-expose-wrapper { background-color: #ffffff; position: absolute; z-index: 102; -moz-box-shadow: 0px 0px 30px #ffffff; -webkit-box-shadow: 0px 0px 30px #ffffff; box-shadow: 0px 0px 30px #ffffff; } .joyride-expose-cover { background: transparent; position: absolute; z-index: 10000; top: 0px; left: 0px; }
SirenHound/cdnjs
ajax/libs/joyride/2.1.0/joyride.css
CSS
mit
7,413
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140415 */ !function(a){"use strict";a.extend(a.fn.cycle.defaults,{next:"> .cycle-next",nextEvent:"click.cycle",disabledClass:"disabled",prev:"> .cycle-prev",prevEvent:"click.cycle",swipe:!1}),a(document).on("cycle-initialized",function(a,b){if(b.API.getComponent("next").on(b.nextEvent,function(a){a.preventDefault(),b.API.next()}),b.API.getComponent("prev").on(b.prevEvent,function(a){a.preventDefault(),b.API.prev()}),b.swipe){var c=b.swipeVert?"swipeUp.cycle":"swipeLeft.cycle swipeleft.cycle",d=b.swipeVert?"swipeDown.cycle":"swipeRight.cycle swiperight.cycle";b.container.on(c,function(){b._tempFx=b.swipeFx,b.API.next()}),b.container.on(d,function(){b._tempFx=b.swipeFx,b.API.prev()})}}),a(document).on("cycle-update-view",function(a,b){if(!b.allowWrap){var c=b.disabledClass,d=b.API.getComponent("next"),e=b.API.getComponent("prev"),f=b._prevBoundry||0,g=void 0!==b._nextBoundry?b._nextBoundry:b.slideCount-1;b.currSlide==g?d.addClass(c).prop("disabled",!0):d.removeClass(c).prop("disabled",!1),b.currSlide===f?e.addClass(c).prop("disabled",!0):e.removeClass(c).prop("disabled",!1)}}),a(document).on("cycle-destroyed",function(a,b){b.API.getComponent("prev").off(b.nextEvent),b.API.getComponent("next").off(b.prevEvent),b.container.off("swipeleft.cycle swiperight.cycle swipeLeft.cycle swipeRight.cycle swipeUp.cycle swipeDown.cycle")})}(jQuery);
francescoagati/cdnjs
ajax/libs/jquery.cycle2/20140415/jquery.cycle2.prevnext.min.js
JavaScript
mit
1,407
.cm-s-vibrant-ink.CodeMirror{background:#000;color:#fff}.cm-s-vibrant-ink div.CodeMirror-selected{background:#35493c}.cm-s-vibrant-ink .CodeMirror-line::selection,.cm-s-vibrant-ink .CodeMirror-line>span::selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-line::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span::-moz-selection,.cm-s-vibrant-ink .CodeMirror-line>span>span::-moz-selection{background:rgba(53,73,60,.99)}.cm-s-vibrant-ink .CodeMirror-gutters{background:#002240;border-right:1px solid #aaa}.cm-s-vibrant-ink .CodeMirror-guttermarker{color:#fff}.cm-s-vibrant-ink .CodeMirror-guttermarker-subtle,.cm-s-vibrant-ink .CodeMirror-linenumber{color:#d0d0d0}.cm-s-vibrant-ink .CodeMirror-cursor{border-left:1px solid #fff}.cm-s-vibrant-ink .cm-keyword{color:#CC7832}.cm-s-vibrant-ink .cm-atom{color:#FC0}.cm-s-vibrant-ink .cm-number{color:#FFEE98}.cm-s-vibrant-ink .cm-def{color:#8DA6CE}.cm-s-vibrant span.cm-def,.cm-s-vibrant span.cm-tag,.cm-s-vibrant-ink span.cm-variable-2,.cm-s-vibrant-ink span.cm-variable-3{color:#FFC66D}.cm-s-vibrant-ink .cm-operator{color:#888}.cm-s-vibrant-ink .cm-comment{color:gray;font-weight:700}.cm-s-vibrant-ink .cm-string{color:#A5C25C}.cm-s-vibrant-ink .cm-string-2{color:red}.cm-s-vibrant-ink .cm-meta{color:#D8FA3C}.cm-s-vibrant-ink .cm-attribute,.cm-s-vibrant-ink .cm-builtin,.cm-s-vibrant-ink .cm-tag{color:#8DA6CE}.cm-s-vibrant-ink .cm-header{color:#FF6400}.cm-s-vibrant-ink .cm-hr{color:#AEAEAE}.cm-s-vibrant-ink .cm-link{color:#00f}.cm-s-vibrant-ink .cm-error{border-bottom:1px solid red}.cm-s-vibrant-ink .CodeMirror-activeline-background{background:#27282E}.cm-s-vibrant-ink .CodeMirror-matchingbracket{outline:grey solid 1px;color:#fff!important}/*# sourceMappingURL=vibrant-ink.min.css.map */
dakshshah96/cdnjs
ajax/libs/codemirror/5.15.2/theme/vibrant-ink.min.css
CSS
mit
1,821
/*! * VERSION: beta 1.9.7 * DATE: 2013-05-16 * UPDATES AND DOCS AT: http://www.greensock.com * * @license Copyright (c) 2008-2013, GreenSock. All rights reserved. * This work is subject to the terms at http://www.greensock.com/terms_of_use.html or for * Club GreenSock members, the software agreement that was issued with your membership. * * @author: Jack Doyle, jack@greensock.com */ (window._gsQueue||(window._gsQueue=[])).push(function(){"use strict";window._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;for(var i,s,n=this.vars,a=r.length;--a>-1;)if(s=n[r[a]])for(i=s.length;--i>-1;)"{self}"===s[i]&&(s=n[r[a]]=s.concat(),s[i]=this);n.tweens instanceof Array&&this.add(n.tweens,0,n.align,n.stagger)},r=["onStartParams","onUpdateParams","onCompleteParams","onReverseCompleteParams","onRepeatParams"],n=[],a=function(t){var e,i={};for(e in t)i[e]=t[e];return i},o=n.slice,h=s.prototype=new e;return s.version="1.9.7",h.constructor=s,h.kill()._gc=!1,h.to=function(t,e,s,r){return e?this.add(new i(t,e,s),r):this.set(t,s,r)},h.from=function(t,e,s,r){return this.add(i.from(t,e,s),r)},h.fromTo=function(t,e,s,r,n){return e?this.add(i.fromTo(t,e,s,r),n):this.set(t,r,n)},h.staggerTo=function(t,e,r,n,h,l,_,u){var p,f=new s({onComplete:l,onCompleteParams:_,onCompleteScope:u});for("string"==typeof t&&(t=i.selector(t)||t),!(t instanceof Array)&&t.length&&t[0]&&t[0].nodeType&&t[0].style&&(t=o.call(t,0)),n=n||0,p=0;t.length>p;p++)r.startAt&&(r.startAt=a(r.startAt)),f.to(t[p],e,a(r),p*n);return this.add(f,h)},h.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},h.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},h.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},h.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},h.add=function(r,n,a,o){var h,l,_,u,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array){for(a=a||"normal",o=o||0,h=n,l=r.length,_=0;l>_;_++)(u=r[_])instanceof Array&&(u=new s({tweens:u})),this.add(u,h),"string"!=typeof u&&"function"!=typeof u&&("sequence"===a?h=u._startTime+u.totalDuration()/u._timeScale:"start"===a&&(u._startTime-=u.delay())),h+=o;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is neither a tween, timeline, function, nor a string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),this._gc&&!this._paused&&this._time===this._duration&&this._time<this.duration())for(p=this;p._gc&&p._timeline;)p._timeline.smoothChildTiming?p.totalTime(p._totalTime,!0):p._enabled(!0,!1),p=p._timeline;return this},h.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},h.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},h.insert=h.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},h.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},h.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},h.removeLabel=function(t){return delete this._labels[t],this},h.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},h._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r instanceof Array)for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},h.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},h.stop=function(){return this.paused(!0)},h.gotoAndPlay=function(t,e){return this.play(t,e)},h.gotoAndStop=function(t,e){return this.pause(t,e)},h.render=function(t,e,i){this._gc&&this._enabled(!0,!1),this._active=!this._paused;var s,r,a,o,h,l=this._dirty?this.totalDuration():this._totalDuration,_=this._time,u=this._startTime,p=this._timeScale,f=this._paused;if(t>=l?(this._totalTime=this._time=l,this._reversed||this._hasPausedChild()||(r=!0,o="onComplete",0===this._duration&&(0===t||0>this._rawPrevTime)&&this._rawPrevTime!==t&&this._first&&(h=!0,this._rawPrevTime>0&&(o="onReverseComplete"))),this._rawPrevTime=t,t=l+1e-6):1e-7>t?(this._totalTime=this._time=0,(0!==_||0===this._duration&&this._rawPrevTime>0)&&(o="onReverseComplete",r=this._reversed),0>t?(this._active=!1,0===this._duration&&this._rawPrevTime>=0&&this._first&&(h=!0)):this._initted||(h=!0),this._rawPrevTime=t,t=0):this._totalTime=this._time=this._rawPrevTime=t,this._time!==_&&this._first||i||h){if(this._initted||(this._initted=!0),0===_&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||n)),this._time>=_)for(s=this._first;s&&(a=s._next,!this._paused||f);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||f);)(s._active||_>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n)),o&&(this._gc||(u===this._startTime||p!==this._timeScale)&&(0===this._time||l>=this.totalDuration())&&(r&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||n)))}},h._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},h.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},h.getTweensOf=function(t,e){for(var s=i.getTweensOf(t),r=s.length,n=[],a=0;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(n[a++]=s[r]);return n},h._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},h.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},h._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},h.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},h.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},h._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},h.progress=function(t){return arguments.length?this.totalTime(this.duration()*t,!1):this._time/this.duration()},h.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},h.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},h.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},h.rawTime=function(){return this._paused||0!==this._totalTime&&this._totalTime!==this._totalDuration?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0)}),window._gsDefine&&window._gsQueue.pop()();
Seputaes/cdnjs
ajax/libs/gsap/1.9.7/TimelineLite.min.js
JavaScript
mit
9,664
ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:["keyword","lparen","variable.parameter","rparen","lparen","storage.type","rparen"],regex:"(\\\\(?:documentclass|usepackage|input))(?:(\\[)([^\\]]*)(\\]))?({)([^}]*)(})"},{token:["keyword","lparen","variable.parameter","rparen"],regex:"(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?"},{token:["storage.type","lparen","variable.parameter","rparen"],regex:"(\\\\(?:begin|end))({)(\\w*)(})"},{token:"storage.type",regex:"\\\\[a-zA-Z]+"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"constant.character.escape",regex:"\\\\[^a-zA-Z]?"},{token:"string",regex:"\\${1,2}",next:"equation"}],equation:[{token:"comment",regex:"%.*$"},{token:"string",regex:"\\${1,2}",next:"start"},{token:"constant.character.escape",regex:"\\\\(?:[^a-zA-Z]|[a-zA-Z]+)"},{token:"error",regex:"^\\s*$",next:"start"},{defaultToken:"string"}]}};r.inherits(s,i),t.LatexHighlightRules=s}),ace.define("ace/mode/rdoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/latex_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("../lib/lang"),s=e("./text_highlight_rules").TextHighlightRules,o=e("./latex_highlight_rules"),u=function(){this.$rules={start:[{token:"comment",regex:"%.*$"},{token:"text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b",next:"nospell"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],nospell:[{token:"comment",regex:"%.*$",next:"start"},{token:"nospell.text",regex:"\\\\[$&%#\\{\\}]"},{token:"keyword",regex:"\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b"},{token:"keyword",regex:"\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])",next:"start"},{token:"paren.keyword.operator",regex:"[[({]"},{token:"paren.keyword.operator",regex:"[\\])]"},{token:"paren.keyword.operator",regex:"}",next:"start"},{token:"nospell.text",regex:"\\s+"},{token:"nospell.text",regex:"\\w+"}]}};r.inherits(u,s),t.RDocHighlightRules=u}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(e,t,n){"use strict";var r=e("../range").Range,i=function(){};(function(){this.checkOutdent=function(e,t){return/^\s+$/.test(e)?/^\s*\}/.test(t):!1},this.autoOutdent=function(e,t){var n=e.getLine(t),i=n.match(/^(\s*\})/);if(!i)return 0;var s=i[1].length,o=e.findMatchingBracket({row:t,column:s});if(!o||o.row==t)return 0;var u=this.$getIndent(e.getLine(o.row));e.replace(new r(t,0,t,s-1),u)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(i.prototype),t.MatchingBraceOutdent=i}),ace.define("ace/mode/rdoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/rdoc_highlight_rules","ace/mode/matching_brace_outdent"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./text_highlight_rules").TextHighlightRules,o=e("./rdoc_highlight_rules").RDocHighlightRules,u=e("./matching_brace_outdent").MatchingBraceOutdent,a=function(e){this.HighlightRules=o,this.$outdent=new u};r.inherits(a,i),function(){this.getNextLineIndent=function(e,t,n){return this.$getIndent(t)},this.$id="ace/mode/rdoc"}.call(a.prototype),t.Mode=a})
akkumar/jsdelivr
files/ace/1.1.9/noconflict/mode-rdoc.js
JavaScript
mit
4,036
webshims.register("track",function(a,b,c,d){"use strict";var e=b.mediaelement,f=((new Date).getTime(),a.fn.addBack?"addBack":"andSelf",{subtitles:1,captions:1,descriptions:1}),g=a("<track />"),h=Modernizr.ES5&&Modernizr.objectAccessor,i=function(a){var c={};return a.addEventListener=function(a,d){c[a]&&b.error("always use $.on to the shimed event: "+a+" already bound fn was: "+c[a]+" your fn was: "+d),c[a]=d},a.removeEventListener=function(a,d){c[a]&&c[a]!=d&&b.error("always use $.on/$.off to the shimed event: "+a+" already bound fn was: "+c[a]+" your fn was: "+d),c[a]&&delete c[a]},a},j={getCueById:function(a){for(var b=null,c=0,d=this.length;d>c;c++)if(this[c].id===a){b=this[c];break}return b}},k={0:"disabled",1:"hidden",2:"showing"},l={shimActiveCues:null,_shimActiveCues:null,activeCues:null,cues:null,kind:"subtitles",label:"",language:"",id:"",mode:"disabled",oncuechange:null,toString:function(){return"[object TextTrack]"},addCue:function(a){if(this.cues){var c=this.cues[this.cues.length-1];c&&c.startTime>a.startTime&&b.error("cue startTime higher than previous cue's startTime")}else this.cues=e.createCueList();a.track&&a.track.removeCue&&a.track.removeCue(a),a.track=this,this.cues.push(a)},removeCue:function(a){var c=this.cues||[],d=0,e=c.length;if(a.track!=this)return b.error("cue not part of track"),void 0;for(;e>d;d++)if(c[d]===a){c.splice(d,1),a.track=null;break}return a.track?(b.error("cue not part of track"),void 0):void 0}},m=["kind","label","srclang"],n={srclang:"language"},o=Function.prototype.call.bind(Object.prototype.hasOwnProperty),p=function(c,d){var e,f,g=[],h=[],i=[];if(c||(c=b.data(this,"mediaelementBase")||b.data(this,"mediaelementBase",{})),d||(c.blockTrackListUpdate=!0,d=a.prop(this,"textTracks"),c.blockTrackListUpdate=!1),clearTimeout(c.updateTrackListTimer),a("track",this).each(function(){var b=a.prop(this,"track");i.push(b),-1==d.indexOf(b)&&h.push(b)}),c.scriptedTextTracks)for(e=0,f=c.scriptedTextTracks.length;f>e;e++)i.push(c.scriptedTextTracks[e]),-1==d.indexOf(c.scriptedTextTracks[e])&&h.push(c.scriptedTextTracks[e]);for(e=0,f=d.length;f>e;e++)-1==i.indexOf(d[e])&&g.push(d[e]);if(g.length||h.length){for(d.splice(0),e=0,f=i.length;f>e;e++)d.push(i[e]);for(e=0,f=g.length;f>e;e++)a([d]).triggerHandler(a.Event({type:"removetrack",track:g[e]}));for(e=0,f=h.length;f>e;e++)a([d]).triggerHandler(a.Event({type:"addtrack",track:h[e]}));(c.scriptedTextTracks||g.length)&&a(this).triggerHandler("updatetrackdisplay")}},q=function(c,d){d||(d=b.data(c,"trackData")),d&&!d.isTriggering&&(d.isTriggering=!0,setTimeout(function(){a(c).closest("audio, video").triggerHandler("updatetrackdisplay"),d.isTriggering=!1},1))},r=function(){var c={subtitles:{subtitles:1,captions:1},descriptions:{descriptions:1},chapters:{chapters:1}};return c.captions=c.subtitles,function(d){var e,f,g=a.prop(d,"default");return g&&"metadata"!=(e=a.prop(d,"kind"))&&(f=a(d).parent().find("track[default]").filter(function(){return!!c[e][a.prop(this,"kind")]})[0],f!=d&&(g=!1,b.error("more than one default track of a specific kind detected. Fall back to default = false"))),g}}(),s=a("<div />")[0],t=function(a,c,d){3!=arguments.length&&b.error("wrong arguments.length for TextTrackCue.constructor"),this.startTime=a,this.endTime=c,this.text=d,i(this)};t.prototype={onenter:null,onexit:null,pauseOnExit:!1,getCueAsHTML:function(){var a,b="",c="",f=d.createDocumentFragment();return o(this,"getCueAsHTML")||(a=this.getCueAsHTML=function(){var a,d;if(b!=this.text)for(b=this.text,c=e.parseCueTextToHTML(b),s.innerHTML=c,a=0,d=s.childNodes.length;d>a;a++)f.appendChild(s.childNodes[a].cloneNode(!0));return f.cloneNode(!0)}),a?a.apply(this,arguments):f.cloneNode(!0)},track:null,id:""},c.TextTrackCue=t,e.createCueList=function(){return a.extend([],j)},e.parseCueTextToHTML=function(){var a=/(<\/?[^>]+>)/gi,b=/^(?:c|v|ruby|rt|b|i|u)/,c=/\<\s*\//,d=function(a,b,d,e){var f;return c.test(e)?f="</"+a+">":(d.splice(0,1),f="<"+a+" "+b+'="'+d.join(" ").replace(/\"/g,"&#34;")+'">'),f},e=function(a){var c=a.replace(/[<\/>]+/gi,"").split(/[\s\.]+/);return c[0]&&(c[0]=c[0].toLowerCase(),b.test(c[0])?"c"==c[0]?a=d("span","class",c,a):"v"==c[0]&&(a=d("q","title",c,a)):a=""),a};return function(b){return b.replace(a,e)}}(),e.loadTextTrack=function(c,d,g,h){var i="play playing updatetrackdisplay",j=g.track,k=function(){var f,h,l,m;if("disabled"!=j.mode&&a.attr(d,"src")&&(l=a.prop(d,"src"))&&(a(c).off(i,k),!g.readyState)){f=function(){g.readyState=3,j.cues=null,j.activeCues=j.shimActiveCues=j._shimActiveCues=null,a(d).triggerHandler("error")},g.readyState=1;try{j.cues=e.createCueList(),j.activeCues=j.shimActiveCues=j._shimActiveCues=e.createCueList(),m=function(){h=a.ajax({dataType:"text",url:l,success:function(i){"text/vtt"!=h.getResponseHeader("content-type")&&b.error("set the mime-type of your WebVTT files to text/vtt. see: http://dev.w3.org/html5/webvtt/#text/vtt"),e.parseCaptions(i,j,function(b){b&&"length"in b?(g.readyState=2,a(d).triggerHandler("load"),a(c).triggerHandler("updatetrackdisplay")):f()})},error:f})},a.ajax?m():(b.ready("$ajax",m),b.loader.loadList(["$ajax"]))}catch(n){f(),b.error(n)}}};g.readyState=0,j.shimActiveCues=null,j._shimActiveCues=null,j.activeCues=null,j.cues=null,a(c).off(i,k),a(c).on(i,k),h&&(j.mode=f[j.kind]?"showing":"hidden",k())},e.createTextTrack=function(c,d){var f,g;return d.nodeName&&(g=b.data(d,"trackData"),g&&(q(d,g),f=g.track)),f||(f=i(b.objectCreate(l)),h||m.forEach(function(b){var c=a.prop(d,b);c&&(f[n[b]||b]=c)}),d.nodeName?(h&&m.forEach(function(c){b.defineProperty(f,n[c]||c,{get:function(){return a.prop(d,c)}})}),f.id=a(d).prop("id"),g=b.data(d,"trackData",{track:f}),e.loadTextTrack(c,d,g,r(d))):(h&&m.forEach(function(a){b.defineProperty(f,n[a]||a,{value:d[a],writeable:!1})}),f.cues=e.createCueList(),f.activeCues=f._shimActiveCues=f.shimActiveCues=e.createCueList(),f.mode="hidden",f.readyState=2),"subtitles"!=f.kind||f.language||b.error("you must provide a language for track in subtitles state"),f.__wsmode=f.mode),f},e.parseCaptionChunk=function(){var a=/^(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s+\-\-\>\s+(\d{2})?:?(\d{2}):(\d{2})\.(\d+)\s*(.*)/,c=/^(DEFAULTS|DEFAULT)\s+\-\-\>\s+(.*)/g,d=/^(STYLE|STYLES)\s+\-\-\>\s*\n([\s\S]*)/g,e=/^(COMMENT|COMMENTS)\s+\-\-\>\s+(.*)/g;return function(f){var g,h,i,j,k,l,m,n,o,p;if(n=c.exec(f))return null;if(n=d.exec(f))return null;if(n=e.exec(f))return null;for(g=f.split(/\n/g);!g[0].replace(/\s+/gi,"").length&&g.length>0;)g.shift();for(g[0].match(/^\s*[a-z0-9-\_]+\s*$/gi)&&(m=String(g.shift().replace(/\s*/gi,""))),l=0;l<g.length;l++){var q=g[l];(o=a.exec(q))&&(k=o.slice(1),h=parseInt(60*(k[0]||0)*60,10)+parseInt(60*(k[1]||0),10)+parseInt(k[2]||0,10)+parseFloat("0."+(k[3]||0)),i=parseInt(60*(k[4]||0)*60,10)+parseInt(60*(k[5]||0),10)+parseInt(k[6]||0,10)+parseFloat("0."+(k[7]||0))),g=g.slice(0,l).concat(g.slice(l+1));break}return h||i?(j=g.join("\n"),p=new t(h,i,j),m&&(p.id=m),p):(b.warn("couldn't extract time information: "+[h,i,g.join("\n"),m].join(" ; ")),null)}}(),e.parseCaptions=function(a,c,d){{var f,g,h,i,j;e.createCueList()}a?(h=/^WEBVTT(\s*FILE)?/gi,g=function(k,l){for(;l>k;k++){if(f=a[k],h.test(f))j=!0;else if(f.replace(/\s*/gi,"").length){if(!j){b.error("please use WebVTT format. This is the standard"),d(null);break}f=e.parseCaptionChunk(f,k),f&&c.addCue(f)}if(i<(new Date).getTime()-30){k++,setTimeout(function(){i=(new Date).getTime(),g(k,l)},90);break}}k>=l&&(j||b.error("please use WebVTT format. This is the standard"),d(c.cues))},a=a.replace(/\r\n/g,"\n"),setTimeout(function(){a=a.replace(/\r/g,"\n"),setTimeout(function(){i=(new Date).getTime(),a=a.split(/\n\n+/g),g(0,a.length)},9)},9)):b.error("Required parameter captionData not supplied.")},e.createTrackList=function(c,d){return d=d||b.data(c,"mediaelementBase")||b.data(c,"mediaelementBase",{}),d.textTracks||(d.textTracks=[],b.defineProperties(d.textTracks,{onaddtrack:{value:null},onremovetrack:{value:null},onchange:{value:null},getTrackById:{value:function(a){for(var b=null,c=0;c<d.textTracks.length;c++)if(a==d.textTracks[c].id){b=d.textTracks[c];break}return b}}}),i(d.textTracks),a(c).on("updatetrackdisplay",function(){for(var b,c=0;c<d.textTracks.length;c++)b=d.textTracks[c],b.__wsmode!=b.mode&&(b.__wsmode=b.mode,a([d.textTracks]).triggerHandler("change"))})),d.textTracks},Modernizr.track||(b.defineNodeNamesBooleanProperty(["track"],"default"),b.reflectProperties(["track"],["srclang","label"]),b.defineNodeNameProperties("track",{src:{reflect:!0,propType:"src"}})),b.defineNodeNameProperties("track",{kind:{attr:Modernizr.track?{set:function(a){var c=b.data(this,"trackData");this.setAttribute("data-kind",a),c&&(c.attrKind=a)},get:function(){var a=b.data(this,"trackData");return a&&"attrKind"in a?a.attrKind:this.getAttribute("kind")}}:{},reflect:!0,propType:"enumarated",defaultValue:"subtitles",limitedTo:["subtitles","captions","descriptions","chapters","metadata"]}}),a.each(m,function(c,d){var e=n[d]||d;b.onNodeNamesPropertyModify("track",d,function(){var c=b.data(this,"trackData");c&&("kind"==d&&q(this,c),h||(c.track[e]=a.prop(this,d)))})}),b.onNodeNamesPropertyModify("track","src",function(c){if(c){var d,f=b.data(this,"trackData");f&&(d=a(this).closest("video, audio"),d[0]&&e.loadTextTrack(d,this,f))}}),b.defineNodeNamesProperties(["track"],{ERROR:{value:3},LOADED:{value:2},LOADING:{value:1},NONE:{value:0},readyState:{get:function(){return(b.data(this,"trackData")||{readyState:0}).readyState},writeable:!1},track:{get:function(){return e.createTextTrack(a(this).closest("audio, video")[0],this)},writeable:!1}},"prop"),b.defineNodeNamesProperties(["audio","video"],{textTracks:{get:function(){var a=this,c=b.data(a,"mediaelementBase")||b.data(a,"mediaelementBase",{}),d=e.createTrackList(a,c);return c.blockTrackListUpdate||p.call(a,c,d),d},writeable:!1},addTextTrack:{value:function(a,c,d){var f=e.createTextTrack(this,{kind:g.prop("kind",a||"").prop("kind"),label:c||"",srclang:d||""}),h=b.data(this,"mediaelementBase")||b.data(this,"mediaelementBase",{});return h.scriptedTextTracks||(h.scriptedTextTracks=[]),h.scriptedTextTracks.push(f),p.call(this),f}}},"prop");var u=function(c){if(a(c.target).is("audio, video")){var d=b.data(c.target,"mediaelementBase");d&&(clearTimeout(d.updateTrackListTimer),d.updateTrackListTimer=setTimeout(function(){p.call(c.target,d)},0))}},v=function(a,b){return b.readyState||a.readyState},w=function(a){a.originalEvent&&a.stopImmediatePropagation()},x=function(){if(b.implement(this,"track")){var c,d,e=a.prop(this,"track"),f=this.track;f&&(c=a.prop(this,"kind"),d=v(this,f),(f.mode||d)&&(e.mode=k[f.mode]||f.mode),"descriptions"!=c&&(f.mode="string"==typeof f.mode?"disabled":0,this.kind="metadata",a(this).attr({kind:c}))),a(this).on("load error",w)}};b.addReady(function(c,d){var e=d.filter("video, audio, track").closest("audio, video");a("video, audio",c).add(e).each(function(){p.call(this)}).on("emptied updatetracklist wsmediareload",u).each(function(){if(Modernizr.track){var c=a.prop(this,"textTracks"),d=this.textTracks;c.length!=d.length&&b.error("textTracks couldn't be copied"),a("track",this).each(x)}}),e.each(function(){var a=this,c=b.data(a,"mediaelementBase");c&&(clearTimeout(c.updateTrackListTimer),c.updateTrackListTimer=setTimeout(function(){p.call(a,c)},9))})}),Modernizr.texttrackapi&&a("video, audio").trigger("trackapichange")});
humbletim/cdnjs
ajax/libs/webshim/1.12.1/minified/shims/track.js
JavaScript
mit
11,358
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .pace-inactive { display: none; } .pace .pace-progress { background: #ffffff; position: fixed; z-index: 2000; top: 0; left: 0; height: 2px; } .pace .pace-progress-inner { display: block; position: absolute; right: 0px; width: 100px; height: 100%; box-shadow: 0 0 10px #ffffff, 0 0 5px #ffffff; opacity: 1.0; -webkit-transform: rotate(3deg) translate(0px, -4px); -moz-transform: rotate(3deg) translate(0px, -4px); -ms-transform: rotate(3deg) translate(0px, -4px); -o-transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px); } .pace .pace-activity { display: block; position: fixed; z-index: 2000; top: 15px; right: 15px; width: 14px; height: 14px; border: solid 2px transparent; border-top-color: #ffffff; border-left-color: #ffffff; border-radius: 10px; -webkit-animation: pace-spinner 400ms linear infinite; -moz-animation: pace-spinner 400ms linear infinite; -ms-animation: pace-spinner 400ms linear infinite; -o-animation: pace-spinner 400ms linear infinite; animation: pace-spinner 400ms linear infinite; } @-webkit-keyframes pace-spinner { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @-moz-keyframes pace-spinner { 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } } @-o-keyframes pace-spinner { 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } } @-ms-keyframes pace-spinner { 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes pace-spinner { 0% { transform: rotate(0deg); transform: rotate(0deg); } 100% { transform: rotate(360deg); transform: rotate(360deg); } }
jonathantneal/cdnjs
ajax/libs/pace/0.7.1/themes/white/pace-theme-flash.css
CSS
mit
2,172
"use strict" // == Extend Node primitives to use iconv-lite ================================= module.exports = function (iconv) { var original = undefined; // Place to keep original methods. iconv.extendNodeEncodings = function extendNodeEncodings() { if (original) return; original = {}; var nodeNativeEncodings = { 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, }; Buffer.isNativeEncoding = function(enc) { return enc && nodeNativeEncodings[enc.toLowerCase()]; } // -- SlowBuffer ----------------------------------------------------------- var SlowBuffer = require('buffer').SlowBuffer; original.SlowBufferToString = SlowBuffer.prototype.toString; SlowBuffer.prototype.toString = function(encoding, start, end) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferToString.call(this, encoding, start, end); // Otherwise, use our decoding method. if (typeof start == 'undefined') start = 0; if (typeof end == 'undefined') end = this.length; return iconv.decode(this.slice(start, end), encoding); } original.SlowBufferWrite = SlowBuffer.prototype.write; SlowBuffer.prototype.write = function(string, offset, length, encoding) { // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { if (!isFinite(length)) { encoding = length; length = undefined; } } else { // legacy var swap = encoding; encoding = offset; offset = length; length = swap; } offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.SlowBufferWrite.call(this, string, offset, length, encoding); if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError('attempt to write beyond buffer bounds'); // Otherwise, use our encoding method. var buf = iconv.encode(string, encoding); if (buf.length < length) length = buf.length; buf.copy(this, offset, 0, length); return length; } // -- Buffer --------------------------------------------------------------- original.BufferIsEncoding = Buffer.isEncoding; Buffer.isEncoding = function(encoding) { return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); } original.BufferByteLength = Buffer.byteLength; Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferByteLength.call(this, str, encoding); // Slow, I know, but we don't have a better way yet. return iconv.encode(str, encoding).length; } original.BufferToString = Buffer.prototype.toString; Buffer.prototype.toString = function(encoding, start, end) { encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferToString.call(this, encoding, start, end); // Otherwise, use our decoding method. if (typeof start == 'undefined') start = 0; if (typeof end == 'undefined') end = this.length; return iconv.decode(this.slice(start, end), encoding); } original.BufferWrite = Buffer.prototype.write; Buffer.prototype.write = function(string, offset, length, encoding) { var _offset = offset, _length = length, _encoding = encoding; // Support both (string, offset, length, encoding) // and the legacy (string, encoding, offset, length) if (isFinite(offset)) { if (!isFinite(length)) { encoding = length; length = undefined; } } else { // legacy var swap = encoding; encoding = offset; offset = length; length = swap; } encoding = String(encoding || 'utf8').toLowerCase(); // Use native conversion when possible if (Buffer.isNativeEncoding(encoding)) return original.BufferWrite.call(this, string, _offset, _length, _encoding); offset = +offset || 0; var remaining = this.length - offset; if (!length) { length = remaining; } else { length = +length; if (length > remaining) { length = remaining; } } if (string.length > 0 && (length < 0 || offset < 0)) throw new RangeError('attempt to write beyond buffer bounds'); // Otherwise, use our encoding method. var buf = iconv.encode(string, encoding); if (buf.length < length) length = buf.length; buf.copy(this, offset, 0, length); return length; // TODO: Set _charsWritten. } // -- Readable ------------------------------------------------------------- if (iconv.supportsStreams) { var Readable = require('stream').Readable; original.ReadableSetEncoding = Readable.prototype.setEncoding; Readable.prototype.setEncoding = function setEncoding(enc, options) { // Use our own decoder, it has the same interface. // We cannot use original function as it doesn't handle BOM-s. this._readableState.decoder = iconv.getDecoder(enc, options); this._readableState.encoding = enc; } Readable.prototype.collect = iconv._collect; } } // Remove iconv-lite Node primitive extensions. iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { if (!original) throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") delete Buffer.isNativeEncoding; var SlowBuffer = require('buffer').SlowBuffer; SlowBuffer.prototype.toString = original.SlowBufferToString; SlowBuffer.prototype.write = original.SlowBufferWrite; Buffer.isEncoding = original.BufferIsEncoding; Buffer.byteLength = original.BufferByteLength; Buffer.prototype.toString = original.BufferToString; Buffer.prototype.write = original.BufferWrite; if (iconv.supportsStreams) { var Readable = require('stream').Readable; Readable.prototype.setEncoding = original.ReadableSetEncoding; delete Readable.prototype.collect; } original = undefined; } }
yumikohey/WaiterCar
node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js
JavaScript
mit
7,893
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .pace-inactive { display: none; } .pace .pace-progress { background: #eb7a55; position: fixed; z-index: 2000; top: 0; left: 0; height: 2px; } .pace .pace-progress-inner { display: block; position: absolute; right: 0px; width: 100px; height: 100%; box-shadow: 0 0 10px #eb7a55, 0 0 5px #eb7a55; opacity: 1.0; -webkit-transform: rotate(3deg) translate(0px, -4px); -moz-transform: rotate(3deg) translate(0px, -4px); -ms-transform: rotate(3deg) translate(0px, -4px); -o-transform: rotate(3deg) translate(0px, -4px); transform: rotate(3deg) translate(0px, -4px); } .pace .pace-activity { display: block; position: fixed; z-index: 2000; top: 15px; right: 15px; width: 14px; height: 14px; border: solid 2px transparent; border-top-color: #eb7a55; border-left-color: #eb7a55; border-radius: 10px; -webkit-animation: pace-spinner 400ms linear infinite; -moz-animation: pace-spinner 400ms linear infinite; -ms-animation: pace-spinner 400ms linear infinite; -o-animation: pace-spinner 400ms linear infinite; animation: pace-spinner 400ms linear infinite; } @-webkit-keyframes pace-spinner { 0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); } 100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); } } @-moz-keyframes pace-spinner { 0% { -moz-transform: rotate(0deg); transform: rotate(0deg); } 100% { -moz-transform: rotate(360deg); transform: rotate(360deg); } } @-o-keyframes pace-spinner { 0% { -o-transform: rotate(0deg); transform: rotate(0deg); } 100% { -o-transform: rotate(360deg); transform: rotate(360deg); } } @-ms-keyframes pace-spinner { 0% { -ms-transform: rotate(0deg); transform: rotate(0deg); } 100% { -ms-transform: rotate(360deg); transform: rotate(360deg); } } @keyframes pace-spinner { 0% { transform: rotate(0deg); transform: rotate(0deg); } 100% { transform: rotate(360deg); transform: rotate(360deg); } }
pombredanne/cdnjs
ajax/libs/pace/0.7.2/themes/orange/pace-theme-flash.css
CSS
mit
2,172
@charset 'UTF-8';.blueimp-gallery,.blueimp-gallery>.slides>.slide>.slide-content{position:absolute;top:0;right:0;bottom:0;left:0;-moz-backface-visibility:hidden}.blueimp-gallery>.slides>.slide>.slide-content{margin:auto;max-width:100%;max-height:100%;opacity:1}.blueimp-gallery{position:fixed;z-index:9999;overflow:hidden;background:#000;background:rgba(0,0,0,0.9);opacity:0;visibility:hidden;display:none;direction:ltr;-ms-touch-action:none}.blueimp-gallery-carousel{position:relative;z-index:auto;height:432px;max-width:768px;margin:1em auto;box-shadow:0 0 10px #000}.blueimp-gallery-display{display:block;visibility:visible;opacity:1}.blueimp-gallery>.slides{position:relative;height:100%;overflow:hidden}.blueimp-gallery>.slides>.slide{position:relative;float:left;height:100%;text-align:center;-webkit-transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);-moz-transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);-ms-transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);-o-transition-timing-function:cubic-bezier(0.645,0.045,0.355,1);transition-timing-function:cubic-bezier(0.645,0.045,0.355,1)}.blueimp-gallery,.blueimp-gallery>.slides>.slide>.slide-content{-webkit-transition:opacity .5s linear;-moz-transition:opacity .5s linear;-ms-transition:opacity .5s linear;-o-transition:opacity .5s linear;transition:opacity .5s linear}.blueimp-gallery>.slides>.slide-loading{background:url(../img/loading.gif) center no-repeat;background-size:64px 64px}.blueimp-gallery>.slides>.slide-loading>.slide-content{opacity:0}.blueimp-gallery>.slides>.slide-error{background:url(../img/error.png) center no-repeat}.blueimp-gallery>.slides>.slide-error>.slide-content{display:none}.blueimp-gallery>.prev,.blueimp-gallery>.next{position:absolute;top:50%;left:15px;width:40px;height:40px;margin-top:-23px;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-decoration:none;text-shadow:0 0 2px #000;text-align:center;background:#222;background:rgba(0,0,0,0.5);-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;cursor:pointer;display:none}.blueimp-gallery>.next{left:auto;right:15px}.blueimp-gallery>.close,.blueimp-gallery>.title{position:absolute;top:15px;left:15px;margin:0 40px 0 0;font-size:20px;line-height:30px;color:#fff;text-shadow:0 0 2px #000;opacity:.8;display:none}.blueimp-gallery>.close{padding:15px;right:15px;left:auto;margin:-15px;font-size:30px;text-decoration:none;cursor:pointer}.blueimp-gallery>.play-pause{position:absolute;right:15px;bottom:15px;width:15px;height:15px;background:url(../img/play-pause.png) 0 0 no-repeat;cursor:pointer;opacity:.5;display:none}.blueimp-gallery-playing>.play-pause{background-position:-15px 0}.blueimp-gallery-controls>.prev,.blueimp-gallery-controls>.next,.blueimp-gallery-controls>.close,.blueimp-gallery-controls>.title,.blueimp-gallery-controls>.play-pause{display:block;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.blueimp-gallery-single>.prev,.blueimp-gallery-left>.prev,.blueimp-gallery-single>.next,.blueimp-gallery-right>.next,.blueimp-gallery-single>.play-pause{display:none}.blueimp-gallery>.slides>.slide>.slide-content,.blueimp-gallery>.prev,.blueimp-gallery>.next,.blueimp-gallery>.close,.blueimp-gallery>.play-pause{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}body:last-child .blueimp-gallery>.slides>.slide-error{background-image:url(../img/error.svg)}body:last-child .blueimp-gallery>.play-pause{width:20px;height:20px;background-size:40px 20px;background-image:url(../img/play-pause.svg)}body:last-child .blueimp-gallery-playing>.play-pause{background-position:-20px 0}@media(max-width:767px){.blueimp-gallery-carousel{height:270px;max-width:480px}}*+html .blueimp-gallery>.slides>.slide{min-height:300px}*+html .blueimp-gallery>.slides>.slide>.slide-content{position:relative}.blueimp-gallery>.indicator{position:absolute;top:auto;right:15px;bottom:15px;left:15px;margin:0 40px;padding:0;list-style:none;text-align:center;line-height:10px;display:none}.blueimp-gallery>.indicator>li{display:inline-block;width:9px;height:9px;margin:6px 3px 0 3px;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;border:1px solid transparent;background:#ccc;background:rgba(255,255,255,0.25) center no-repeat;border-radius:5px;box-shadow:0 0 2px #000;opacity:.5;cursor:pointer}.blueimp-gallery>.indicator>.active{background-color:#fff;border-color:#fff;opacity:.8}.blueimp-gallery-controls>.indicator{display:block;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);transform:translateZ(0)}.blueimp-gallery-single>.indicator{display:none}.blueimp-gallery>.indicator{-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}*+html .blueimp-gallery>.indicator>li{display:inline}.blueimp-gallery>.slides>.slide>.video-content>video,.blueimp-gallery>.slides>.slide>.video-content>img{position:absolute;top:0;right:0;bottom:0;left:0;-moz-backface-visibility:hidden}.blueimp-gallery>.slides>.slide>.video-content>video,.blueimp-gallery>.slides>.slide>.video-content>img{margin:auto;max-width:100%;max-height:100%;opacity:1}.blueimp-gallery>.slides>.slide>.video-content>a{position:absolute;top:50%;right:0;left:0;margin:-64px auto 0;width:128px;height:128px;background:url(../img/video-play.png) center no-repeat;opacity:.8;cursor:pointer}.blueimp-gallery>.slides>.slide>.video-playing>a,.blueimp-gallery>.slides>.slide>.video-playing>img{display:none}.blueimp-gallery>.slides>.slide>.video-content>video{display:none}.blueimp-gallery>.slides>.slide>.video-playing>video{display:block}.blueimp-gallery>.slides>.slide>.video-loading>a{background:url(../img/loading.gif) center no-repeat;background-size:64px 64px}body:last-child .blueimp-gallery>.slides>.slide>.video-content>a{background-image:url(../img/video-play.svg)}*+html .blueimp-gallery>.slides>.slide>.video-content{height:100%}*+html .blueimp-gallery>.slides>.slide>.video-content>a{left:50%;margin-left:-64px}
ankitjamuar/cdnjs
ajax/libs/blueimp-gallery/2.7.4/css/blueimp-gallery.min.css
CSS
mit
6,345
var baseCreate = require('./_baseCreate'), isObject = require('./isObject'); /** * Creates a function that produces an instance of `Ctor` regardless of * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private * @param {Function} Ctor The constructor to wrap. * @returns {Function} Returns the new wrapped function. */ function createCtor(Ctor) { return function() { // Use a `switch` statement to work with class constructors. See // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist // for more details. var args = arguments; switch (args.length) { case 0: return new Ctor; case 1: return new Ctor(args[0]); case 2: return new Ctor(args[0], args[1]); case 3: return new Ctor(args[0], args[1], args[2]); case 4: return new Ctor(args[0], args[1], args[2], args[3]); case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); } var thisBinding = baseCreate(Ctor.prototype), result = Ctor.apply(thisBinding, args); // Mimic the constructor's `return` behavior. // See https://es5.github.io/#x13.2.2 for more details. return isObject(result) ? result : thisBinding; }; } module.exports = createCtor;
xuan6/react-videos
node_modules/babel-core/node_modules/lodash/_createCtor.js
JavaScript
mit
1,482
var test = require("tap").test , LRU = require("../") test("basic", function (t) { var cache = new LRU({max: 10}) cache.set("key", "value") t.equal(cache.get("key"), "value") t.equal(cache.get("nada"), undefined) t.equal(cache.length, 1) t.equal(cache.max, 10) t.end() }) test("least recently set", function (t) { var cache = new LRU(2) cache.set("a", "A") cache.set("b", "B") cache.set("c", "C") t.equal(cache.get("c"), "C") t.equal(cache.get("b"), "B") t.equal(cache.get("a"), undefined) t.end() }) test("lru recently gotten", function (t) { var cache = new LRU(2) cache.set("a", "A") cache.set("b", "B") cache.get("a") cache.set("c", "C") t.equal(cache.get("c"), "C") t.equal(cache.get("b"), undefined) t.equal(cache.get("a"), "A") t.end() }) test("del", function (t) { var cache = new LRU(2) cache.set("a", "A") cache.del("a") t.equal(cache.get("a"), undefined) t.end() }) test("max", function (t) { var cache = new LRU(3) // test changing the max, verify that the LRU items get dropped. cache.max = 100 for (var i = 0; i < 100; i ++) cache.set(i, i) t.equal(cache.length, 100) for (var i = 0; i < 100; i ++) { t.equal(cache.get(i), i) } cache.max = 3 t.equal(cache.length, 3) for (var i = 0; i < 97; i ++) { t.equal(cache.get(i), undefined) } for (var i = 98; i < 100; i ++) { t.equal(cache.get(i), i) } // now remove the max restriction, and try again. cache.max = "hello" for (var i = 0; i < 100; i ++) cache.set(i, i) t.equal(cache.length, 100) for (var i = 0; i < 100; i ++) { t.equal(cache.get(i), i) } // should trigger an immediate resize cache.max = 3 t.equal(cache.length, 3) for (var i = 0; i < 97; i ++) { t.equal(cache.get(i), undefined) } for (var i = 98; i < 100; i ++) { t.equal(cache.get(i), i) } t.end() }) test("reset", function (t) { var cache = new LRU(10) cache.set("a", "A") cache.set("b", "B") cache.reset() t.equal(cache.length, 0) t.equal(cache.max, 10) t.equal(cache.get("a"), undefined) t.equal(cache.get("b"), undefined) t.end() }) // Note: `<cache>.dump()` is a debugging tool only. No guarantees are made // about the format/layout of the response. test("dump", function (t) { var cache = new LRU(10) var d = cache.dump(); t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") cache.set("a", "A") var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } t.ok(d.a) t.equal(d.a.key, "a") t.equal(d.a.value, "A") t.equal(d.a.lu, 0) cache.set("b", "B") cache.get("b") d = cache.dump() t.ok(d.b) t.equal(d.b.key, "b") t.equal(d.b.value, "B") t.equal(d.b.lu, 2) t.end() }) test("basic with weighed length", function (t) { var cache = new LRU({ max: 100, length: function (item) { return item.size } }) cache.set("key", {val: "value", size: 50}) t.equal(cache.get("key").val, "value") t.equal(cache.get("nada"), undefined) t.equal(cache.lengthCalculator(cache.get("key")), 50) t.equal(cache.length, 50) t.equal(cache.max, 100) t.end() }) test("weighed length item too large", function (t) { var cache = new LRU({ max: 10, length: function (item) { return item.size } }) t.equal(cache.max, 10) // should fall out immediately cache.set("key", {val: "value", size: 50}) t.equal(cache.length, 0) t.equal(cache.get("key"), undefined) t.end() }) test("least recently set with weighed length", function (t) { var cache = new LRU({ max:8, length: function (item) { return item.length } }) cache.set("a", "A") cache.set("b", "BB") cache.set("c", "CCC") cache.set("d", "DDDD") t.equal(cache.get("d"), "DDDD") t.equal(cache.get("c"), "CCC") t.equal(cache.get("b"), undefined) t.equal(cache.get("a"), undefined) t.end() }) test("lru recently gotten with weighed length", function (t) { var cache = new LRU({ max: 8, length: function (item) { return item.length } }) cache.set("a", "A") cache.set("b", "BB") cache.set("c", "CCC") cache.get("a") cache.get("b") cache.set("d", "DDDD") t.equal(cache.get("c"), undefined) t.equal(cache.get("d"), "DDDD") t.equal(cache.get("b"), "BB") t.equal(cache.get("a"), "A") t.end() }) test("set returns proper booleans", function(t) { var cache = new LRU({ max: 5, length: function (item) { return item.length } }) t.equal(cache.set("a", "A"), true) // should return false for max exceeded t.equal(cache.set("b", "donuts"), false) t.equal(cache.set("b", "B"), true) t.equal(cache.set("c", "CCCC"), true) t.end() }) test("drop the old items", function(t) { var cache = new LRU({ max: 5, maxAge: 50 }) cache.set("a", "A") setTimeout(function () { cache.set("b", "b") t.equal(cache.get("a"), "A") }, 25) setTimeout(function () { cache.set("c", "C") // timed out t.notOk(cache.get("a")) }, 60) setTimeout(function () { t.notOk(cache.get("b")) t.equal(cache.get("c"), "C") }, 90) setTimeout(function () { t.notOk(cache.get("c")) t.end() }, 155) }) test("disposal function", function(t) { var disposed = false var cache = new LRU({ max: 1, dispose: function (k, n) { disposed = n } }) cache.set(1, 1) cache.set(2, 2) t.equal(disposed, 1) cache.set(3, 3) t.equal(disposed, 2) cache.reset() t.equal(disposed, 3) t.end() }) test("disposal function on too big of item", function(t) { var disposed = false var cache = new LRU({ max: 1, length: function (k) { return k.length }, dispose: function (k, n) { disposed = n } }) var obj = [ 1, 2 ] t.equal(disposed, false) cache.set("obj", obj) t.equal(disposed, obj) t.end() }) test("has()", function(t) { var cache = new LRU({ max: 1, maxAge: 10 }) cache.set('foo', 'bar') t.equal(cache.has('foo'), true) cache.set('blu', 'baz') t.equal(cache.has('foo'), false) t.equal(cache.has('blu'), true) setTimeout(function() { t.equal(cache.has('blu'), false) t.end() }, 15) }) test("stale", function(t) { var cache = new LRU({ maxAge: 10, stale: true }) cache.set('foo', 'bar') t.equal(cache.get('foo'), 'bar') t.equal(cache.has('foo'), true) setTimeout(function() { t.equal(cache.has('foo'), false) t.equal(cache.get('foo'), 'bar') t.equal(cache.get('foo'), undefined) t.end() }, 15) }) test("lru update via set", function(t) { var cache = LRU({ max: 2 }); cache.set('foo', 1); cache.set('bar', 2); cache.del('bar'); cache.set('baz', 3); cache.set('qux', 4); t.equal(cache.get('foo'), undefined) t.equal(cache.get('bar'), undefined) t.equal(cache.get('baz'), 3) t.equal(cache.get('qux'), 4) t.end() }) test("least recently set w/ peek", function (t) { var cache = new LRU(2) cache.set("a", "A") cache.set("b", "B") t.equal(cache.peek("a"), "A") cache.set("c", "C") t.equal(cache.get("c"), "C") t.equal(cache.get("b"), "B") t.equal(cache.get("a"), undefined) t.end() }) test("pop the least used item", function (t) { var cache = new LRU(3) , last cache.set("a", "A") cache.set("b", "B") cache.set("c", "C") t.equal(cache.length, 3) t.equal(cache.max, 3) // Ensure we pop a, c, b cache.get("b", "B") last = cache.pop() t.equal(last.key, "a") t.equal(last.value, "A") t.equal(cache.length, 2) t.equal(cache.max, 3) last = cache.pop() t.equal(last.key, "c") t.equal(last.value, "C") t.equal(cache.length, 1) t.equal(cache.max, 3) last = cache.pop() t.equal(last.key, "b") t.equal(last.value, "B") t.equal(cache.length, 0) t.equal(cache.max, 3) last = cache.pop() t.equal(last, null) t.equal(cache.length, 0) t.equal(cache.max, 3) t.end() })
PHILIP-2014/philip-blog
node_modules/sqlite3/node_modules/node-pre-gyp/node_modules/tar-pack/node_modules/fstream-ignore/node_modules/minimatch/node_modules/lru-cache/test/basic.js
JavaScript
mit
7,840
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file 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. module AWS class SimpleWorkflow # Domains are used to organize workflows types and activities for # an account. # # @attr_reader [String,nil] description Returns # # @attr_reader [Integer,Symbol] retention_period Returns the retention # period for this domain. The return value may be an integer (number # of days history is kept around) or the symbol `:none`, implying # no expiry of closed workflow executions. # # @attr_reader [Symbol] status Returns the domain's status. Status will # be either `:registered` or `:deprecated`. # class Domain < Resource include OptionFormatters # @api private def initialize name, options = {} @name = name.to_s super(options) end # @return [String] Returns the name of this domain. attr_reader :name info_attribute :description, :static => true info_attribute :status, :to_sym => true config_attribute :retention_period, :from => 'workflowExecutionRetentionPeriodInDays', :duration => true, :static => true # @return [WorkflowTypeCollection] def workflow_types WorkflowTypeCollection.new(self) end # @return [ActivityTypeCollection] def activity_types ActivityTypeCollection.new(self) end # @return [WorkflowExecutionCollection] def workflow_executions WorkflowExecutionCollection.new(self) end # @return [DecisionTaskCollection] def decision_tasks DecisionTaskCollection.new(self) end # @return [ActivityTaskCollection] def activity_tasks ActivityTaskCollection.new(self) end # @return [Boolean] Returns true if this domain has been deprecated. def deprecated? self.status == :deprecated end # Deprecates the domain. After a domain has been deprecated it cannot # be used to create new workflow executions or register new types. # However, you can still use visibility actions on this domain. # # Deprecating a domain also deprecates all activity and workflow # types registered in the domain. Executions that were started # before the domain was deprecated will continue to run. # # @return [nil] # def deprecate client.deprecate_domain(:name => name) nil end alias_method :delete, :deprecate provider(:describe_domain) do |provider| provider.provides *info_attributes.keys provider.provides *config_attributes.keys provider.find do |resp| if resp.data['domainInfo']['name'] == name resp.data['domainInfo'].merge(resp.data['configuration']) end end end provider(:list_domains) do |provider| provider.provides *info_attributes.keys provider.find do |resp| resp.data['domainInfos'].find{|d| d['name'] == name } end end protected def resource_identifiers [[:name,name]] end end end end
HelainSchoonjans/LogstashRabbitMQExample
logstash-producer/vendor/bundle/jruby/1.9/gems/aws-sdk-1.35.0/lib/aws/simple_workflow/domain.rb
Ruby
mit
3,677
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace spec\Sylius\Bundle\FlowBundle\Process; use PhpSpec\ObjectBehavior; use Sylius\Bundle\FlowBundle\Process\ProcessInterface; use Sylius\Bundle\FlowBundle\Process\Step\StepInterface; use Sylius\Bundle\FlowBundle\Validator\ProcessValidatorInterface; class ProcessSpec extends ObjectBehavior { function it_is_initializable() { $this->shouldHaveType('Sylius\Bundle\FlowBundle\Process\Process'); } function it_is_a_process() { $this->shouldImplement(ProcessInterface::class); } function its_forward_route_is_mutable() { $this->setForwardRoute('forward_route'); $this->getForwardRoute()->shouldReturn('forward_route'); } function its_forward_route_params_is_mutable() { $this->setForwardRouteParams(['name' => 'value']); $this->getForwardRouteParams()->shouldReturn(['name' => 'value']); } function its_display_route_is_mutable() { $this->setDisplayRoute('display_route'); $this->getDisplayRoute()->shouldReturn('display_route'); } function its_display_params_is_mutable() { $this->setDisplayRouteParams(['name' => 'value']); $this->getDisplayRouteParams()->shouldReturn(['name' => 'value']); } function its_redirect_params_is_mutable() { $this->setRedirectParams(['name' => 'value']); $this->getRedirectParams()->shouldReturn(['name' => 'value']); } function its_redirect_is_mutable() { $this->setRedirect('redirect'); $this->getRedirect()->shouldReturn('redirect'); } function its_scenario_is_mutable() { $this->setScenarioAlias('scenarioAlias'); $this->getScenarioAlias()->shouldReturn('scenarioAlias'); } function its_validator_is_mutable(ProcessValidatorInterface $validator) { $this->setValidator($validator); $this->getValidator()->shouldReturn($validator); } function its_step_is_mutable(StepInterface $step, StepInterface $secondStep) { $step->getName()->shouldBeCalled()->willReturn('name'); $secondStep->getName()->shouldBeCalled()->willReturn('other_name'); $this->setSteps(['name' => $step]); $this->addStep('other_name', $secondStep); $this->removeStep('name'); $this->getSteps()->shouldReturn(['other_name' => $secondStep]); $this->getOrderedSteps()->shouldReturn([$secondStep]); } }
psyray/Sylius
src/Sylius/Bundle/FlowBundle/spec/Process/ProcessSpec.php
PHP
mit
2,666
# Copyright 2011-2013 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You # may not use this file except in compliance with the License. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompanying this file. This file 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. module AWS class DynamoDB # @api private module Keys include Types # @return [Hash] Client options for identifying an item. def item_key_options(item, extra = {}) key = item_key_hash(item) extra.merge({ :table_name => item.table.name, :key => key }) end # @return [Hash] Returns just the hash key element and range key element def item_key_hash item item.table.assert_schema! key = {} key[:hash_key_element] = format_attribute_value(item.hash_value) key[:range_key_element] = format_attribute_value(item.range_value) if item.table.composite_key? key end end end end
HelainSchoonjans/LogstashRabbitMQExample
logstash-consumer/vendor/bundle/jruby/1.9/gems/aws-sdk-1.35.0/lib/aws/dynamo_db/keys.rb
Ruby
mit
1,267
<?php use Kanboard\Model\ColumnMoveRestrictionModel; use Kanboard\Model\ProjectModel; use Kanboard\Model\ProjectRoleModel; require_once __DIR__.'/../Base.php'; class ColumnMoveRestrictionModelTest extends Base { public function testCreation() { $projectModel = new ProjectModel($this->container); $projectRoleModel = new ProjectRoleModel($this->container); $columnMoveRestrictionModel = new ColumnMoveRestrictionModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(1, $projectRoleModel->create(1, 'Custom Role')); $this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3)); $this->assertFalse($columnMoveRestrictionModel->create(1, 1, 2, 3)); } public function testRemove() { $projectModel = new ProjectModel($this->container); $projectRoleModel = new ProjectRoleModel($this->container); $columnMoveRestrictionModel = new ColumnMoveRestrictionModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(1, $projectRoleModel->create(1, 'Custom Role')); $this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3)); $this->assertTrue($columnMoveRestrictionModel->remove(1)); } public function testGetById() { $projectModel = new ProjectModel($this->container); $projectRoleModel = new ProjectRoleModel($this->container); $columnMoveRestrictionModel = new ColumnMoveRestrictionModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(2, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(1, $projectRoleModel->create(1, 'Role A')); $this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3)); $restriction = $columnMoveRestrictionModel->getById(1, 1); $this->assertEquals(1, $restriction['restriction_id']); $this->assertEquals('Role A', $restriction['role']); $this->assertEquals(1, $restriction['role_id']); $this->assertEquals(1, $restriction['project_id']); $this->assertEquals('Ready', $restriction['src_column_title']); $this->assertEquals('Work in progress', $restriction['dst_column_title']); $this->assertEquals(2, $restriction['src_column_id']); $this->assertEquals(3, $restriction['dst_column_id']); } public function testGetAll() { $projectModel = new ProjectModel($this->container); $projectRoleModel = new ProjectRoleModel($this->container); $columnMoveRestrictionModel = new ColumnMoveRestrictionModel($this->container); $this->assertEquals(1, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(2, $projectModel->create(array('name' => 'Test'))); $this->assertEquals(1, $projectRoleModel->create(1, 'Role A')); $this->assertEquals(2, $projectRoleModel->create(1, 'Role B')); $this->assertEquals(3, $projectRoleModel->create(2, 'Role C')); $this->assertEquals(1, $columnMoveRestrictionModel->create(1, 1, 2, 3)); $this->assertEquals(2, $columnMoveRestrictionModel->create(1, 2, 3, 4)); $restrictions = $columnMoveRestrictionModel->getAll(1); $this->assertCount(2, $restrictions); $this->assertEquals(1, $restrictions[0]['restriction_id']); $this->assertEquals('Role A', $restrictions[0]['role']); $this->assertEquals(1, $restrictions[0]['role_id']); $this->assertEquals(1, $restrictions[0]['project_id']); $this->assertEquals('Ready', $restrictions[0]['src_column_title']); $this->assertEquals('Work in progress', $restrictions[0]['dst_column_title']); $this->assertEquals(2, $restrictions[0]['src_column_id']); $this->assertEquals(3, $restrictions[0]['dst_column_id']); $this->assertEquals(2, $restrictions[1]['restriction_id']); $this->assertEquals('Role B', $restrictions[1]['role']); $this->assertEquals('Work in progress', $restrictions[1]['src_column_title']); $this->assertEquals('Done', $restrictions[1]['dst_column_title']); $this->assertEquals(3, $restrictions[1]['src_column_id']); $this->assertEquals(4, $restrictions[1]['dst_column_id']); } }
kanboard/kanboard
tests/units/Model/ColumnMoveRestrictionModelTest.php
PHP
mit
4,432
// DATA_TEMPLATE: js_data oTest.fnStart( "fnFooterCallback" ); $(document).ready( function () { /* Check the default */ var oTable = $('#example').dataTable( { "aaData": gaaData } ); var oSettings = oTable.fnSettings(); var mPass; oTest.fnTest( "Default should be null", null, function () { return oSettings.fnFooterCallback == null; } ); oTest.fnTest( "Five arguments passed", function () { oSession.fnRestore(); mPass = -1; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( ) { mPass = arguments.length; } } ); }, function () { return mPass == 5; } ); oTest.fnTest( "fnRowCallback called once per draw", function () { oSession.fnRestore(); mPass = 0; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { mPass++; } } ); }, function () { return mPass == 1; } ); oTest.fnTest( "fnRowCallback called on paging (i.e. another draw)", function () { $('#example_next').click(); }, function () { return mPass == 2; } ); oTest.fnTest( "fnRowCallback allows us to alter row information", function () { oSession.fnRestore(); $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { nFoot.getElementsByTagName('th')[0].innerHTML = "Displaying "+(iEnd-iStart)+" records"; } } ); }, function () { return $('#example tfoot th:eq(0)').html() == "Displaying 10 records"; } ); oTest.fnTest( "Data array has length matching original data", function () { oSession.fnRestore(); mPass = true; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( aasData.length != 57 ) { mPass = false; } } } ); }, function () { return mPass; } ); oTest.fnTest( "Data array's column lengths match original data", function () { oSession.fnRestore(); mPass = true; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { for ( var i=0, iLen=aasData.length ; i<iLen ; i++ ) { if ( aasData[i].length != 5 ) { mPass = false; } } } } ); }, function () { return mPass; } ); oTest.fnTest( "iStart correct on first page", function () { oSession.fnRestore(); mPass = true; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( iStart != 0 ) { mPass = false; } } } ); }, function () { return mPass; } ); oTest.fnTest( "iStart correct on second page", function () { oSession.fnRestore(); mPass = false; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( iStart == 10 ) { mPass = true; } } } ); $('#example_next').click(); }, function () { return mPass; } ); oTest.fnTest( "iEnd correct on first page", function () { oSession.fnRestore(); mPass = true; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( iEnd != 10 ) { mPass = false; } } } ); }, function () { return mPass; } ); oTest.fnTest( "iEnd correct on second page", function () { oSession.fnRestore(); mPass = false; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( iEnd == 20 ) { mPass = true; } } } ); $('#example_next').click(); }, function () { return mPass; } ); oTest.fnTest( "aiDisplay length is full data when not filtered", function () { oSession.fnRestore(); mPass = false; $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( aiDisplay.length == 57 ) { mPass = true; } } } ); }, function () { return mPass; } ); oTest.fnTest( "aiDisplay length is 9 when filtering on 'Mozilla'", function () { oSession.fnRestore(); mPass = false; oTable = $('#example').dataTable( { "aaData": gaaData, "fnFooterCallback": function ( nFoot, aasData, iStart, iEnd, aiDisplay ) { if ( aiDisplay.length == 9 ) { mPass = true; } } } ); oTable.fnFilter( "Mozilla" ); }, function () { return mPass; } ); oTest.fnComplete(); } );
ttunduny/RTK
assets/datatable/media2/unit_testing/tests_onhold/2_js/fnFooterCallback.js
JavaScript
mit
5,041
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(n.__vee_validate_locale__ko=n.__vee_validate_locale__ko||{},n.__vee_validate_locale__ko.js=e())}(this,function(){"use strict";var n,e={name:"ko",messages:{_default:function(n){return n+"항목의 값이 유효하지 않습니다."},after:function(n,e){return n+"항목의 값은 "+e[0]+"항목의 값 이후"+(e[1]?"거나 같은 날이어야":"여야")+" 합니다."},alpha_dash:function(n){return n+"항목에는 영문자, 숫자와 특수기호(-),(_)만 사용 가능합니다."},alpha_num:function(n){return n+"항목에는 영문자와 숫자만 사용 가능합니다."},alpha_spaces:function(n){return n+"항목에는 영문자와 공백만 사용 가능합니다."},alpha:function(n){return n+"항목에는 영문자만 사용 가능합니다."},before:function(n,e){return n+"항목의 값은 "+e[0]+"항목의 값 이전"+(e[1]?"이거나 같은 날":"")+"이어야 합니다."},between:function(n,e){return n+"항목의 값은 "+e[0]+"에서 "+e[1]+" 사이여야 합니다."},confirmed:function(n){return n+"항목의 값이 일치하지 않습니다."},credit_card:function(n){return n+"항목의 값이 유효하지 않습니다."},date_between:function(n,e){return n+"항목의 값은 "+e[0]+"과 "+e[1]+" 사이의 날짜이어야 합니다."},date_format:function(n,e){return n+"항목의 값은 "+e[0]+"형식이어야 합니다."},decimal:function(n,e){void 0===e&&(e=[]);var t=e[0];return void 0===t&&(t="*"),n+"항목의 값은 숫자이어야 하며, 소수점 이하 "+(t&&"*"!==t?t:"")+"자리까지 사용 가능합니다."},digits:function(n,e){return n+"항목의 값은 "+e[0]+"자리의 숫자이어야 합니다."},dimensions:function(n,e){return n+"항목의 크기는 가로 "+e[0]+"픽셀, 세로 "+e[1]+"픽셀이어야 합니다."},email:function(n){return n+"항목의 값은 유효한 이메일 형식이어야 합니다."},ext:function(n){return n+"항목은 유효한 파일이어야 합니다."},image:function(n){return n+"항목은 이미지 파일이어야 합니다."},in:function(n){return n+"항목의 값은 유효한 값이어야 합니다."},integer:function(n){return n+"항목의 값은 정수이어야 합니다."},ip:function(n){return n+"항목의 값은 유효한 IP(ipv4) 주소이어야 합니다."},length:function(n,e){var t=e[0],r=e[1];return r?n+"항목의 값은 "+t+"자에서 "+r+"자이어야 합니다.":n+"항목의 값은 "+t+"자이어야 합니다."},max:function(n,e){return n+"항목의 값은 최대 "+e[0]+"글자이어야 합니다."},max_value:function(n,e){return n+"항목의 값은 "+e[0]+" 이하이어야 합니다."},mimes:function(n){return n+"는 유효한 파일 형식의 파일이어야 합니다."},min:function(n,e){return n+"항목의 값은 최소 "+e[0]+"글자이어야 합니다."},min_value:function(n,e){return n+"항목의 값은 "+e[0]+" 이상이어야 합니다."},not_in:function(n){return n+"항목은 유효한 값이어야 합니다."},numeric:function(n){return n+"항목에는 숫자만 사용 가능합니다."},regex:function(n){return n+"항목은 형식에 맞지 않습니다."},required:function(n){return n+"항목은 필수 정보입니다."},size:function(n,e){var t,r,u,i=e[0];return n+"항목의 크기는 "+(t=i,r=1024,u=0==(t=Number(t)*r)?0:Math.floor(Math.log(t)/Math.log(r)),1*(t/Math.pow(r,u)).toFixed(2)+" "+["Byte","KB","MB","GB","TB","PB","EB","ZB","YB"][u])+"보다 작아야 합니다."},url:function(n){return n+"항목의 값은 유효한 주소(URL)가 아닙니다."}},attributes:{}};return"undefined"!=typeof VeeValidate&&VeeValidate.Validator.localize(((n={})[e.name]=e,n)),e});
joeyparrish/cdnjs
ajax/libs/vee-validate/2.0.8/locale/ko.js
JavaScript
mit
3,749
module Fog module Compute class Brightbox class Real # Removes a number of server from the server group and adds them to another server group given in parameters. # # @param [String] identifier Unique reference to identify the resource # @param [Hash] options # @option options [Array<Hash>] :servers Array of Hashes containing # +{"server" => server_id}+ for each server to remove # @option options [String] :destination ServerGroup to move servers to # # @return [Hash] if successful Hash version of JSON object # @return [NilClass] if no options were passed # # @see https://api.gb1.brightbox.com/1.0/#server_group_move_servers_server_group # # @example # options = { # :destination => "grp-67890", # :servers => [ # {"server" => "srv-abcde"}, # {"server" => "srv-fghij"} # ] # } # Compute[:brightbox].remove_servers_server_group "grp-12345", options # def move_servers_server_group(identifier, options) return nil if identifier.nil? || identifier == "" wrapped_request("post", "/1.0/server_groups/#{identifier}/move_servers", [202], options) end end end end end
suhongrui/gitlab
vendor/bundle/ruby/2.1.0/gems/fog-brightbox-0.0.1/lib/fog/brightbox/requests/compute/move_servers_server_group.rb
Ruby
mit
1,343
/*! * OOjs UI v0.23.1 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * * Date: 2017-09-20T00:32:00Z */.oo-ui-icon-alignCentre{background-image:url(themes/wikimediaui/images/icons/align-center.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center.png)}.oo-ui-image-invert.oo-ui-icon-alignCentre{background-image:url(themes/wikimediaui/images/icons/align-center-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-invert.png)}.oo-ui-image-progressive.oo-ui-icon-alignCentre{background-image:url(themes/wikimediaui/images/icons/align-center-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-center-progressive.png)}.oo-ui-icon-alignLeft{background-image:url(themes/wikimediaui/images/icons/align-float-left.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left.png)}.oo-ui-image-invert.oo-ui-icon-alignLeft{background-image:url(themes/wikimediaui/images/icons/align-float-left-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-invert.png)}.oo-ui-image-progressive.oo-ui-icon-alignLeft{background-image:url(themes/wikimediaui/images/icons/align-float-left-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-left-progressive.png)}.oo-ui-icon-alignRight{background-image:url(themes/wikimediaui/images/icons/align-float-right.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right.png)}.oo-ui-image-invert.oo-ui-icon-alignRight{background-image:url(themes/wikimediaui/images/icons/align-float-right-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-invert.png)}.oo-ui-image-progressive.oo-ui-icon-alignRight{background-image:url(themes/wikimediaui/images/icons/align-float-right-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/align-float-right-progressive.png)}.oo-ui-icon-attachment{background-image:url(themes/wikimediaui/images/icons/attachment-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr.png)}.oo-ui-image-invert.oo-ui-icon-attachment{background-image:url(themes/wikimediaui/images/icons/attachment-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-attachment{background-image:url(themes/wikimediaui/images/icons/attachment-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/attachment-ltr-progressive.png)}.oo-ui-icon-calendar{background-image:url(themes/wikimediaui/images/icons/calendar-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr.png)}.oo-ui-image-invert.oo-ui-icon-calendar{background-image:url(themes/wikimediaui/images/icons/calendar-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-calendar{background-image:url(themes/wikimediaui/images/icons/calendar-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/calendar-ltr-progressive.png)}.oo-ui-icon-code{background-image:url(themes/wikimediaui/images/icons/code.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code.png)}.oo-ui-image-invert.oo-ui-icon-code{background-image:url(themes/wikimediaui/images/icons/code-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-invert.png)}.oo-ui-image-progressive.oo-ui-icon-code{background-image:url(themes/wikimediaui/images/icons/code-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/code-progressive.png)}.oo-ui-icon-find{background-image:url(themes/wikimediaui/images/icons/find-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr.png)}.oo-ui-image-invert.oo-ui-icon-find{background-image:url(themes/wikimediaui/images/icons/find-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-find{background-image:url(themes/wikimediaui/images/icons/find-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/find-ltr-progressive.png)}.oo-ui-icon-language{background-image:url(themes/wikimediaui/images/icons/language-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.png)}.oo-ui-image-invert.oo-ui-icon-language{background-image:url(themes/wikimediaui/images/icons/language-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-language{background-image:url(themes/wikimediaui/images/icons/language-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.png)}.oo-ui-icon-layout{background-image:url(themes/wikimediaui/images/icons/layout-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr.png)}.oo-ui-image-invert.oo-ui-icon-layout{background-image:url(themes/wikimediaui/images/icons/layout-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-layout{background-image:url(themes/wikimediaui/images/icons/layout-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/layout-ltr-progressive.png)}.oo-ui-icon-markup{background-image:url(themes/wikimediaui/images/icons/markup.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup.png)}.oo-ui-image-invert.oo-ui-icon-markup{background-image:url(themes/wikimediaui/images/icons/markup-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-invert.png)}.oo-ui-image-progressive.oo-ui-icon-markup{background-image:url(themes/wikimediaui/images/icons/markup-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/markup-progressive.png)}.oo-ui-icon-newline{background-image:url(themes/wikimediaui/images/icons/newline-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr.png)}.oo-ui-image-invert.oo-ui-icon-newline{background-image:url(themes/wikimediaui/images/icons/newline-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-newline{background-image:url(themes/wikimediaui/images/icons/newline-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/newline-ltr-progressive.png)}.oo-ui-icon-noWikiText{background-image:url(themes/wikimediaui/images/icons/noWikiText-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr.png)}.oo-ui-image-invert.oo-ui-icon-noWikiText{background-image:url(themes/wikimediaui/images/icons/noWikiText-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-noWikiText{background-image:url(themes/wikimediaui/images/icons/noWikiText-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/noWikiText-ltr-progressive.png)}.oo-ui-icon-outline{background-image:url(themes/wikimediaui/images/icons/outline-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr.png)}.oo-ui-image-invert.oo-ui-icon-outline{background-image:url(themes/wikimediaui/images/icons/outline-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-outline{background-image:url(themes/wikimediaui/images/icons/outline-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/outline-ltr-progressive.png)}.oo-ui-icon-puzzle{background-image:url(themes/wikimediaui/images/icons/puzzle.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle.png)}.oo-ui-image-invert.oo-ui-icon-puzzle{background-image:url(themes/wikimediaui/images/icons/puzzle-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-invert.png)}.oo-ui-image-progressive.oo-ui-icon-puzzle{background-image:url(themes/wikimediaui/images/icons/puzzle-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/puzzle-progressive.png)}.oo-ui-icon-quotes{background-image:url(themes/wikimediaui/images/icons/quotes-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr.png)}.oo-ui-image-invert.oo-ui-icon-quotes{background-image:url(themes/wikimediaui/images/icons/quotes-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-quotes{background-image:url(themes/wikimediaui/images/icons/quotes-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotes-ltr-progressive.png)}.oo-ui-icon-quotesAdd{background-image:url(themes/wikimediaui/images/icons/quotesAdd-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr.png)}.oo-ui-image-invert.oo-ui-icon-quotesAdd{background-image:url(themes/wikimediaui/images/icons/quotesAdd-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-quotesAdd{background-image:url(themes/wikimediaui/images/icons/quotesAdd-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/quotesAdd-ltr-progressive.png)}.oo-ui-icon-redirect{background-image:url(themes/wikimediaui/images/icons/articleRedirect-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr.png)}.oo-ui-image-invert.oo-ui-icon-redirect{background-image:url(themes/wikimediaui/images/icons/articleRedirect-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-redirect{background-image:url(themes/wikimediaui/images/icons/articleRedirect-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/articleRedirect-ltr-progressive.png)}.oo-ui-icon-searchCaseSensitive{background-image:url(themes/wikimediaui/images/icons/case-sensitive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive.png)}.oo-ui-image-invert.oo-ui-icon-searchCaseSensitive{background-image:url(themes/wikimediaui/images/icons/case-sensitive-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-invert.png)}.oo-ui-image-progressive.oo-ui-icon-searchCaseSensitive{background-image:url(themes/wikimediaui/images/icons/case-sensitive-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/case-sensitive-progressive.png)}.oo-ui-icon-searchDiacritics{background-image:url(themes/wikimediaui/images/icons/diacritic.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic.png)}.oo-ui-image-invert.oo-ui-icon-searchDiacritics{background-image:url(themes/wikimediaui/images/icons/diacritic-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-invert.png)}.oo-ui-image-progressive.oo-ui-icon-searchDiacritics{background-image:url(themes/wikimediaui/images/icons/diacritic-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/diacritic-progressive.png)}.oo-ui-icon-searchRegularExpression{background-image:url(themes/wikimediaui/images/icons/regular-expression.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression.png)}.oo-ui-image-invert.oo-ui-icon-searchRegularExpression{background-image:url(themes/wikimediaui/images/icons/regular-expression-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-invert.png)}.oo-ui-image-progressive.oo-ui-icon-searchRegularExpression{background-image:url(themes/wikimediaui/images/icons/regular-expression-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/regular-expression-progressive.png)}.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr.png)}.oo-ui-image-invert.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-ltr-progressive.png)}.oo-ui-icon-specialCharacter{background-image:url(themes/wikimediaui/images/icons/specialCharacter.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter.png)}.oo-ui-image-invert.oo-ui-icon-specialCharacter{background-image:url(themes/wikimediaui/images/icons/specialCharacter-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-invert.png)}.oo-ui-image-progressive.oo-ui-icon-specialCharacter{background-image:url(themes/wikimediaui/images/icons/specialCharacter-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/specialCharacter-progressive.png)}.oo-ui-icon-table{background-image:url(themes/wikimediaui/images/icons/table.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table.png)}.oo-ui-image-invert.oo-ui-icon-table{background-image:url(themes/wikimediaui/images/icons/table-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-invert.png)}.oo-ui-image-progressive.oo-ui-icon-table{background-image:url(themes/wikimediaui/images/icons/table-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-progressive.png)}.oo-ui-icon-tableAddColumnAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-column-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl.png)}.oo-ui-image-invert.oo-ui-icon-tableAddColumnAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-column-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableAddColumnAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-column-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-rtl-progressive.png)}.oo-ui-icon-tableAddColumnBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-column-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr.png)}.oo-ui-image-invert.oo-ui-icon-tableAddColumnBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-column-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableAddColumnBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-column-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-column-ltr-progressive.png)}.oo-ui-icon-tableAddRowAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-row-after.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after.png)}.oo-ui-image-invert.oo-ui-icon-tableAddRowAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-row-after-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableAddRowAfter{background-image:url(themes/wikimediaui/images/icons/table-insert-row-after-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-after-progressive.png)}.oo-ui-icon-tableAddRowBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-row-before.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before.png)}.oo-ui-image-invert.oo-ui-icon-tableAddRowBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-row-before-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableAddRowBefore{background-image:url(themes/wikimediaui/images/icons/table-insert-row-before-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-insert-row-before-progressive.png)}.oo-ui-icon-tableCaption{background-image:url(themes/wikimediaui/images/icons/table-caption.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption.png)}.oo-ui-image-invert.oo-ui-icon-tableCaption{background-image:url(themes/wikimediaui/images/icons/table-caption-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableCaption{background-image:url(themes/wikimediaui/images/icons/table-caption-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-caption-progressive.png)}.oo-ui-icon-tableMergeCells{background-image:url(themes/wikimediaui/images/icons/table-merge-cells.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells.png)}.oo-ui-image-invert.oo-ui-icon-tableMergeCells{background-image:url(themes/wikimediaui/images/icons/table-merge-cells-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tableMergeCells{background-image:url(themes/wikimediaui/images/icons/table-merge-cells-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/table-merge-cells-progressive.png)}.oo-ui-icon-templateAdd{background-image:url(themes/wikimediaui/images/icons/templateAdd-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr.png)}.oo-ui-image-invert.oo-ui-icon-templateAdd{background-image:url(themes/wikimediaui/images/icons/templateAdd-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-templateAdd{background-image:url(themes/wikimediaui/images/icons/templateAdd-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/templateAdd-ltr-progressive.png)}.oo-ui-icon-translation{background-image:url(themes/wikimediaui/images/icons/language-ltr.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr.png)}.oo-ui-image-invert.oo-ui-icon-translation{background-image:url(themes/wikimediaui/images/icons/language-ltr-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-invert.png)}.oo-ui-image-progressive.oo-ui-icon-translation{background-image:url(themes/wikimediaui/images/icons/language-ltr-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/language-ltr-progressive.png)}.oo-ui-icon-wikiText{background-image:url(themes/wikimediaui/images/icons/wikiText.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText.png)}.oo-ui-image-invert.oo-ui-icon-wikiText{background-image:url(themes/wikimediaui/images/icons/wikiText-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-invert.png)}.oo-ui-image-progressive.oo-ui-icon-wikiText{background-image:url(themes/wikimediaui/images/icons/wikiText-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/wikiText-progressive.png)}
sufuf3/cdnjs
ajax/libs/oojs-ui/0.23.1/oojs-ui-wikimediaui-icons-editing-advanced.min.css
CSS
mit
46,957
dojo.provide("dojox.xmpp.TransportSession"); dojo.require("dojox.xmpp.bosh"); dojo.require("dojox.xmpp.util"); dojo.require("dojox.data.dom"); dojox.xmpp.TransportSession = function(props) { // we have to set this here because "this" doesn't work // in the dojo.extend call. this.sendTimeout = (this.wait+20)*1000; //mixin any options that we want to provide to this service if (props && dojo.isObject(props)) { dojo.mixin(this, props); if(this.useScriptSrcTransport){ this.transportIframes = []; } } }; dojo.extend(dojox.xmpp.TransportSession, { /* options/defaults */ rid: 0, hold: 1, polling:1000, secure: false, wait: 60, lang: 'en', submitContentType: 'text/xml; charset=utf=8', serviceUrl: '/httpbind', defaultResource: "dojoIm", domain: 'imserver.com', sendTimeout: 0, //(this.wait+20)*1000 useScriptSrcTransport:false, keepAliveTimer:null, //status state: "NotReady", transmitState: "Idle", protocolPacketQueue: [], outboundQueue: [], outboundRequests: {}, inboundQueue: [], deferredRequests: {}, matchTypeIdAttribute: {}, open: function() { this.status = "notReady"; this.rid = Math.round(Math.random() * 1000000000); this.protocolPacketQueue = []; this.outboundQueue = []; this.outboundRequests = {}; this.inboundQueue = []; this.deferredRequests = {}; this.matchTypeIdAttribute = {}; this.keepAliveTimer = setTimeout(dojo.hitch(this, "_keepAlive"), 10000); if(this.useScriptSrcTransport){ dojox.xmpp.bosh.initialize({ iframes: this.hold+1, load: dojo.hitch(this, function(){ this._sendLogin(); }) }); } else { this._sendLogin(); } }, _sendLogin: function() { var rid = this.rid++; var req = { content: this.submitContentType, hold: this.hold, rid: rid, to: this.domain, secure: this.secure, wait: this.wait, "xml:lang": this.lang, "xmpp:version": "1.0", xmlns: dojox.xmpp.xmpp.BODY_NS, "xmlns:xmpp": "urn:xmpp:xbosh" }; var msg = dojox.xmpp.util.createElement("body", req, true); this.addToOutboundQueue(msg, rid); }, _sendRestart: function(){ var rid = this.rid++; var req = { rid: rid, sid: this.sid, to: this.domain, "xmpp:restart": "true", "xml:lang": this.lang, xmlns: dojox.xmpp.xmpp.BODY_NS, "xmlns:xmpp": "urn:xmpp:xbosh" }; var msg = dojox.xmpp.util.createElement("body", req, true); this.addToOutboundQueue(msg, rid); }, processScriptSrc: function(msg, rid) { //console.log("processScriptSrc::", rid, msg); // var msgDom = dojox.xml.DomParser.parse(msg); var msgDom = dojox.xml.parser.parse(msg, "text/xml"); //console.log("parsed mgs", msgDom); //console.log("Queue", this.outboundQueue); if(msgDom) { this.processDocument(msgDom, rid); } else { //console.log("Recived bad document from server",msg); } }, _keepAlive: function(){ if (this.state=="wait" || this.isTerminated()) { return; } this._dispatchPacket(); this.keepAliveTimer = setTimeout(dojo.hitch(this, "_keepAlive"), 10000); }, close: function(protocolMsg){ var rid = this.rid++; var req = { sid: this.sid, rid: rid, type: "terminate" }; var envelope = null; if (protocolMsg) { envelope = new dojox.string.Builder(dojox.xmpp.util.createElement("body", req, false)); envelope.append(protocolMsg); envelope.append("</body>"); } else { envelope = new dojox.string.Builder(dojox.xmpp.util.createElement("body", req, false)); } // this.sendXml(envelope,rid); this.addToOutboundQueue(envelope.toString(), rid); this.state=="Terminate"; }, dispatchPacket: function(msg, protocolMatchType, matchId, matchProperty){ // summary: // Main Packet dispatcher, most calls should be made with this other // than a few setup calls which use add items to the queue directly // protocolMatchType, matchId, and matchProperty are optional params // that allow a deferred to be tied to a protocol response instad of the whole // rid // //console.log("In dispatchPacket ", msg, protocolMatchType, matchId, matchProperty); if (msg){ this.protocolPacketQueue.push(msg); } var def = new dojo.Deferred(); //def.rid = req.rid; if (protocolMatchType && matchId){ def.protocolMatchType = protocolMatchType; def.matchId = matchId; def.matchProperty = matchProperty || "id"; if(def.matchProperty != "id") { this.matchTypeIdAttribute[protocolMatchType] = def.matchProperty; } } this.deferredRequests[def.protocolMatchType + "-" +def.matchId]=def; if(!this.dispatchTimer) { this.dispatchTimer = setTimeout(dojo.hitch(this, "_dispatchPacket"), 600); } return def; }, _dispatchPacket: function(){ clearTimeout(this.dispatchTimer); delete this.dispatchTimer; if (!this.sid){ console.debug("TransportSession::dispatchPacket() No SID, packet dropped.") return; } if (!this.authId){ //FIXME according to original nodes, this should wait a little while and try // again up to three times to see if we get this data. console.debug("TransportSession::dispatchPacket() No authId, packet dropped [FIXME]") return; } //if there is a pending request with the server, don't poll if (this.transmitState != "error" && (this.protocolPacketQueue.length == 0) && (this.outboundQueue.length > 0)) { return; } if (this.state=="wait" || this.isTerminated()) { return; } var req = { sid: this.sid, xmlns: dojox.xmpp.xmpp.BODY_NS } var envelope if (this.protocolPacketQueue.length > 0){ req.rid= this.rid++; envelope = new dojox.string.Builder(dojox.xmpp.util.createElement("body", req, false)); envelope.append(this.processProtocolPacketQueue()); envelope.append("</body>"); delete this.lastPollTime; } else { //console.log("Nothing to send, I'm just polling."); if(this.lastPollTime) { var now = new Date().getTime(); if(now - this.lastPollTime < this.polling) { //console.log("Waiting to poll ", this.polling - (now - this.lastPollTime)+10); this.dispatchTimer = setTimeout(dojo.hitch(this, "_dispatchPacket"), this.polling - (now - this.lastPollTime)+10); return; } } req.rid= this.rid++; this.lastPollTime = new Date().getTime(); envelope = new dojox.string.Builder(dojox.xmpp.util.createElement("body", req, true)); } this.addToOutboundQueue(envelope.toString(),req.rid); }, redispatchPacket: function(rid){ var env = this.outboundRequests[rid]; this.sendXml(env, rid); }, addToOutboundQueue: function(msg, rid){ this.outboundQueue.push({msg: msg,rid: rid}); this.outboundRequests[rid]=msg; this.sendXml(msg, rid); }, removeFromOutboundQueue: function(rid){ for(var i=0; i<this.outboundQueue.length;i++){ if (rid == this.outboundQueue[i]["rid"]){ this.outboundQueue.splice(i, 1); break; } } delete this.outboundRequests[rid]; }, processProtocolPacketQueue: function(){ var packets = new dojox.string.Builder(); for(var i=0; i<this.protocolPacketQueue.length;i++){ packets.append(this.protocolPacketQueue[i]); } this.protocolPacketQueue=[]; return packets.toString(); }, sendXml: function(message, rid){ if(this.isTerminated()) { return false; } //console.log("TransportSession::sendXml()"+ new Date().getTime() + " RID: ", rid, " MSG: ", message); this.transmitState = "transmitting"; var def = null; if(this.useScriptSrcTransport) { //console.log("using script src to transmit"); def = dojox.xmpp.bosh.get({ rid: rid, url: this.serviceUrl+'?'+encodeURIComponent(message), error: dojo.hitch(this, function(res, io){ this.setState("Terminate", "error"); return false; }), timeout: this.sendTimeout }); } else { def = dojo.rawXhrPost({ contentType: "text/xml", url: this.serviceUrl, postData: message, handleAs: "xml", error: dojo.hitch(this, function(res, io) { ////console.log("foo", res, io.xhr.responseXML, io.xhr.status); return this.processError(io.xhr.responseXML, io.xhr.status , rid); }), timeout: this.sendTimeout }); } //process the result document def.addCallback(this, function(res){ return this.processDocument(res, rid); }); return def; }, processDocument: function(doc, rid){ if(this.isTerminated() || !doc.firstChild) { return false; } //console.log("TransportSession:processDocument() ", doc, rid); this.transmitState = "idle"; var body = doc.firstChild; if (body.nodeName != 'body'){ //console.log("TransportSession::processDocument() firstChild is not <body> element ", doc, " RID: ", rid); } if (this.outboundQueue.length<1){return false;} var expectedId = this.outboundQueue[0]["rid"]; //console.log("expectedId", expectedId); if (rid==expectedId){ this.removeFromOutboundQueue(rid); this.processResponse(body, rid); this.processInboundQueue(); }else{ //console.log("TransportSession::processDocument() rid: ", rid, " expected: ", expectedId); var gap = rid-expectedId; if (gap < this.hold + 2){ this.addToInboundQueue(doc,rid); }else{ //console.log("TransportSession::processDocument() RID is outside of the expected response window"); } } return doc; }, processInboundQueue: function(){ while (this.inboundQueue.length > 0) { var item = this.inboundQueue.shift(); this.processDocument(item["doc"], item["rid"]); } }, addToInboundQueue: function(doc,rid){ for (var i=0; i<this.inboundQueue.length;i++){ if (rid < this.inboundQueue[i]["rid"]){continue;} this.inboundQueue.splice(i,0,{doc: doc, rid: rid}); } }, processResponse: function(body,rid){ ////console.log("TransportSession:processResponse() ", body, " RID: ", rid); if (body.getAttribute("type")=='terminate'){ var reasonNode = body.firstChild.firstChild; var errorMessage = ""; if(reasonNode.nodeName == "conflict") { errorMessage = "conflict" } this.setState("Terminate", errorMessage); return; } if ((this.state != 'Ready')&&(this.state != 'Terminate')) { var sid=body.getAttribute("sid"); if (sid){ this.sid=sid; } else { throw new Error("No sid returned during xmpp session startup"); } this.authId = body.getAttribute("authid"); if (this.authId == "") { if (this.authRetries-- < 1) { console.error("Unable to obtain Authorization ID"); this.terminateSession(); } } this.wait= body.getAttribute("wait"); if( body.getAttribute("polling")){ this.polling= parseInt(body.getAttribute("polling"))*1000; } //console.log("Polling value ", this.polling); this.inactivity = body.getAttribute("inactivity"); this.setState("Ready"); } dojo.forEach(body.childNodes, function(node){ this.processProtocolResponse(node, rid); }, this); //need to make sure, since if you use sendXml directly instead of using //dispatch packets, there wont' be a call back function here //normally the deferred will get fired by a child message at the protocol level //but if it hasn't fired by now, go ahead and fire it with the full body /*if (this.deferredRequests[rid] && this.deferredRequests[rid].fired==-1){ this.deferredRequests[rid].callback(body); }*/ //delete from the list of outstanding requests //delete this.deferredRequests[rid]; if (this.transmitState == "idle"){ this.dispatchPacket(); } }, processProtocolResponse: function(msg, rid){ // summary: // process the individual protocol messages and if there // is a matching set of protocolMatchType, matchId, and matchPropery // fire off the deferred this.onProcessProtocolResponse(msg); var key = msg.nodeName + "-" +msg.getAttribute("id"); var def = this.deferredRequests[key]; if (def){ def.callback(msg); delete this.deferredRequests[key]; } }, setState: function(state, message){ if (this.state != state) { if (this["on"+state]){ this["on"+state](state, this.state, message); } this.state=state; } }, isTerminated: function() { return this.state=="Terminate"; }, processError: function(err, httpStatusCode,rid){ //console.log("Processing server error ", err, httpStatusCode,rid); if(this.isTerminated()) { return false; } if(httpStatusCode != 200) { if(httpStatusCode >= 400 && httpStatusCode < 500){ /* Any status code between 400 and 500 should terminate * the connection */ this.setState("Terminate", errorMessage); return false; }else{ this.removeFromOutboundQueue(rid); setTimeout(dojo.hitch(this, function(){ this.dispatchPacket(); }), 200); return true; } return false; } if (err && err.dojoType && err.dojoType=="timeout"){ //console.log("Wait timeout"); } this.removeFromOutboundQueue(rid); //FIXME conditional processing if request will be needed based on type of error. if(err && err.firstChild) { //console.log("Error ", err.firstChild.getAttribute("type") + " status code " + httpStatusCode); if (err.firstChild.getAttribute("type")=='terminate'){ var reasonNode = err.firstChild.firstChild; var errorMessage = ""; if(reasonNode && reasonNode.nodeName == "conflict") { errorMessage = "conflict" } this.setState("Terminate", errorMessage); return false; } } this.transmitState = "error"; setTimeout(dojo.hitch(this, function(){ this.dispatchPacket(); }), 200); //console.log("Error: ", arguments); return true; }, //events onTerminate: function(newState, oldState, message){ }, onProcessProtocolResponse: function(msg){}, onReady: function(newState, oldState){} });
synico/lobtool
lobtool/src/main/webapp/resources/javascript/dojox/xmpp/TransportSession.js
JavaScript
mit
14,117
//---------------------------------------------------------------- // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------- namespace System.Activities.Presentation.Metadata { using System.Runtime; using System.Activities.Presentation.Internal.Metadata; using System.Activities.Presentation.Internal.Properties; using System; using System.ComponentModel; using System.Globalization; using System.Reflection; using System.Windows; using System.Activities.Presentation; // <summary> // An instance of this class is passed to callback delegates to lazily // populate the attributes for a type. // </summary> [Fx.Tag.XamlVisible(false)] public sealed class AttributeCallbackBuilder { private MutableAttributeTable _table; private Type _callbackType; internal AttributeCallbackBuilder(MutableAttributeTable table, Type callbackType) { _table = table; _callbackType = callbackType; } // <summary> // The type this callback is being invoked for. // </summary> public Type CallbackType { get { return _callbackType; } } // <summary> // Adds the contents of the provided attributes to this builder. // Conflicts are resolved with a last-in-wins strategy. // </summary> // <param name="attributes"> // The new attributes to add. // </param> // <exception cref="ArgumentNullException">if type or attributes is null</exception> public void AddCustomAttributes(params Attribute[] attributes) { if (attributes == null) { throw FxTrace.Exception.ArgumentNull("attributes"); } _table.AddCustomAttributes(_callbackType, attributes); } // <summary> // Adds the contents of the provided attributes to this builder. // Conflicts are resolved with a last-in-wins strategy. // </summary> // <param name="descriptor">An event or property descriptor to add attributes to.</param> // <param name="attributes"> // The new attributes to add. // </param> // <exception cref="ArgumentNullException">if descriptor or attributes is null</exception> public void AddCustomAttributes(MemberDescriptor descriptor, params Attribute[] attributes) { if (descriptor == null) { throw FxTrace.Exception.ArgumentNull("descriptor"); } if (attributes == null) { throw FxTrace.Exception.ArgumentNull("attributes"); } _table.AddCustomAttributes(_callbackType, descriptor, attributes); } // <summary> // Adds the contents of the provided attributes to this builder. // Conflicts are resolved with a last-in-wins strategy. // </summary> // <param name="member">An event or property info to add attributes to.</param> // <param name="attributes"> // The new attributes to add. // </param> // <exception cref="ArgumentNullException">if member or attributes is null</exception> public void AddCustomAttributes(MemberInfo member, params Attribute[] attributes) { if (member == null) { throw FxTrace.Exception.ArgumentNull("member"); } if (attributes == null) { throw FxTrace.Exception.ArgumentNull("attributes"); } _table.AddCustomAttributes(_callbackType, member, attributes); } // <summary> // Adds attributes to the member with the given name. The member can be a property // or an event. The member is evaluated on demand when the user queries // attributes on a given property or event. // </summary> // <param name="memberName"> // The member to add attributes for. Only property and event members are supported; // all others will be ignored. // </param> // <param name="attributes"> // The new attributes to add. // </param> public void AddCustomAttributes(string memberName, params Attribute[] attributes) { if (memberName == null) { throw FxTrace.Exception.ArgumentNull("memberName"); } if (attributes == null) { throw FxTrace.Exception.ArgumentNull("attributes"); } _table.AddCustomAttributes(_callbackType, memberName, attributes); } // <summary> // Adds the contents of the provided attributes to this builder. // Conflicts are resolved with a last-in-wins strategy. // </summary> // <param name="dp">A dependency property to add attributes to.</param> // <param name="attributes"> // The new attributes to add. // </param> // <exception cref="ArgumentNullException">if dp or attributes is null</exception> public void AddCustomAttributes(DependencyProperty dp, params Attribute[] attributes) { if (dp == null) { throw FxTrace.Exception.ArgumentNull("dp"); } if (attributes == null) { throw FxTrace.Exception.ArgumentNull("attributes"); } _table.AddCustomAttributes(_callbackType, dp, attributes); } } }
mind0n/hive
Cache/Libs/net46/ndp/cdf/src/NetFx40/Tools/System.Activities.Presentation/System/Activities/Presentation/Base/Core/Metadata/AttributeCallbackBuilder.cs
C#
mit
5,640
.plottable-colors-0 { background-color: #5279c7; /* INDIGO */ } .plottable-colors-1 { background-color: #fd373e; /* CORAL_RED */ } .plottable-colors-2 { background-color: #63c261; /* FERN */ } .plottable-colors-3 { background-color: #fad419; /* BRIGHT_SUN */ } .plottable-colors-4 { background-color: #2c2b6f; /* JACARTA */ } .plottable-colors-5 { background-color: #ff7939; /* BURNING_ORANGE */ } .plottable-colors-6 { background-color: #db2e65; /* CERISE_RED */ } .plottable-colors-7 { background-color: #99ce50; /* CONIFER */ } .plottable-colors-8 { background-color: #962565; /* ROYAL_HEATH */ } .plottable-colors-9 { background-color: #06cccc; /* ROBINS_EGG_BLUE */ } svg.plottable { display : block; /* SVGs must be block elements for width/height calculations to work in Firefox. */ pointer-events: visibleFill; } .plottable .background-fill { fill: none; pointer-events: none; } .plottable .bounding-box { /* Invisible pink bounding-box to allow for collision testing */ fill: pink; visibility: hidden; } .plottable .label text { font-family: "Helvetica Neue", sans-serif; fill: #32313F; } .plottable .bar-label-text-area text { font-family: "Helvetica Neue", sans-serif; font-size: 14px; } .plottable .label-area text { fill: #32313F; font-family: "Helvetica Neue", sans-serif; font-size: 14px; } .plottable .light-label text { fill: white; } .plottable .dark-label text { fill: #32313F; } .plottable .off-bar-label text { fill: #32313F; } .plottable .stacked-bar-plot .off-bar-label { /* HACKHACK #2795: correct off-bar label logic to be implemented on StackedBar */ visibility: hidden !important; } .plottable .axis-label text { font-size: 10px; font-weight: bold; letter-spacing: 1px; line-height: normal; text-transform: uppercase; } .plottable .title-label text { font-size: 20px; font-weight: bold; } .plottable .axis line.baseline { stroke: #CCC; stroke-width: 1px; } .plottable .axis line.tick-mark { stroke: #CCC; stroke-width: 1px; } .plottable .axis text { fill: #32313F; font-family: "Helvetica Neue", sans-serif; font-size: 12px; font-weight: 200; line-height: normal; } .plottable .axis .annotation-circle { fill: white; stroke-width: 1px; stroke: #CCC; } .plottable .axis .annotation-line { stroke: #CCC; stroke-width: 1px; } .plottable .axis .annotation-rect { stroke: #CCC; stroke-width: 1px; fill: white; } .plottable .bar-plot .baseline { stroke: #999; } .plottable .gridlines line { stroke: #3C3C3C; /* hackhack: gridlines should be solid; see #820 */ opacity: 0.25; stroke-width: 1px; } .plottable .selection-box-layer .selection-area { fill: black; fill-opacity: 0.03; stroke: #CCC; } /* DragBoxLayer */ .plottable .drag-box-layer.x-resizable .drag-edge-lr { cursor: ew-resize; } .plottable .drag-box-layer.y-resizable .drag-edge-tb { cursor: ns-resize; } .plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tl { cursor: nwse-resize; } .plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-tr { cursor: nesw-resize; } .plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-bl { cursor: nesw-resize; } .plottable .drag-box-layer.x-resizable.y-resizable .drag-corner-br { cursor: nwse-resize; } .plottable .drag-box-layer.movable .selection-area { cursor: move; /* IE fallback */ cursor: -moz-grab; cursor: -webkit-grab; cursor: grab; } .plottable .drag-box-layer.movable .selection-area:active { cursor: -moz-grabbing; cursor: -webkit-grabbing; cursor: grabbing; } /* /DragBoxLayer */ .plottable .guide-line-layer line.guide-line { stroke: #CCC; stroke-width: 1px; } .plottable .drag-line-layer.enabled.vertical line.drag-edge { cursor: ew-resize; } .plottable .drag-line-layer.enabled.horizontal line.drag-edge { cursor: ns-resize; } .plottable .legend text { fill: #32313F; font-family: "Helvetica Neue", sans-serif; font-size: 12px; font-weight: bold; line-height: normal; } .plottable .interpolated-color-legend rect.swatch-bounding-box { fill: none; stroke: #CCC; stroke-width: 1px; } .plottable .waterfall-plot line.connector { stroke: #CCC; stroke-width: 1px; } .plottable .pie-plot .arc.outline { stroke-linejoin: round; }
honestree/cdnjs
ajax/libs/plottable.js/1.13.0/plottable.css
CSS
mit
4,309
<?php /** * Locale data for 'ur'. * * This file is automatically generated by yiic cldr command. * * Copyright © 1991-2007 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. * * @copyright 2008-2013 Yii Software LLC (http://www.yiiframework.com/license/) */ return array ( 'version' => '6546', 'numberSymbols' => array ( 'alias' => '', 'decimal' => '.', 'group' => ',', 'list' => ';', 'percentSign' => '%', 'plusSign' => '+', 'minusSign' => '-', 'exponential' => 'E', 'perMille' => '‰', 'infinity' => '∞', 'nan' => 'NaN', ), 'decimalFormat' => '#,##0.###', 'scientificFormat' => '#E0', 'percentFormat' => '#,##0%', 'currencyFormat' => '¤#,##0.00', 'currencySymbols' => array ( 'AUD' => 'AU$', 'BRL' => 'R$', 'CAD' => 'CA$', 'CNY' => 'CN¥', 'EUR' => '€', 'GBP' => '£', 'HKD' => 'HK$', 'ILS' => '₪', 'INR' => '₹', 'JPY' => 'JP¥', 'KRW' => '₩', 'MXN' => 'MX$', 'NZD' => 'NZ$', 'THB' => '฿', 'TWD' => 'NT$', 'USD' => '$', 'VND' => '₫', 'XAF' => 'FCFA', 'XCD' => 'EC$', 'XOF' => 'CFA', 'XPF' => 'CFPF', 'PKR' => 'PKRs', ), 'monthNames' => array ( 'wide' => array ( 1 => 'جنوری', 2 => 'فروری', 3 => 'مارچ', 4 => 'اپريل', 5 => 'مئ', 6 => 'جون', 7 => 'جولائ', 8 => 'اگست', 9 => 'ستمبر', 10 => 'اکتوبر', 11 => 'نومبر', 12 => 'دسمبر', ), 'abbreviated' => array ( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', ), ), 'monthNamesSA' => array ( 'narrow' => array ( 1 => '1', 2 => '2', 3 => '3', 4 => '4', 5 => '5', 6 => '6', 7 => '7', 8 => '8', 9 => '9', 10 => '10', 11 => '11', 12 => '12', ), ), 'weekDayNames' => array ( 'wide' => array ( 0 => 'اتوار', 1 => 'پير', 2 => 'منگل', 3 => 'بده', 4 => 'جمعرات', 5 => 'جمعہ', 6 => 'ہفتہ', ), 'abbreviated' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', ), ), 'weekDayNamesSA' => array ( 'narrow' => array ( 0 => '1', 1 => '2', 2 => '3', 3 => '4', 4 => '5', 5 => '6', 6 => '7', ), ), 'eraNames' => array ( 'abbreviated' => array ( 0 => 'ق م', 1 => 'عيسوی سن', ), 'wide' => array ( 0 => 'قبل مسيح', 1 => 'عيسوی سن', ), 'narrow' => array ( 0 => 'ق م', 1 => 'عيسوی سن', ), ), 'dateFormats' => array ( 'full' => 'EEEE؍ d؍ MMMM y', 'long' => 'd؍ MMMM y', 'medium' => 'd؍ MMM y', 'short' => 'd/M/yy', ), 'timeFormats' => array ( 'full' => 'h:mm:ss a zzzz', 'long' => 'h:mm:ss a z', 'medium' => 'h:mm:ss a', 'short' => 'h:mm a', ), 'dateTimeFormat' => '{1} {0}', 'amName' => 'دن', 'pmName' => 'رات', 'orientation' => 'rtl', 'languages' => array ( 'ab' => 'ابقازیان', 'af' => 'ايفريکانز', 'am' => 'امہاری', 'ar' => 'عربی', 'as' => 'آسامی', 'ay' => 'ایمارا', 'az' => 'ازیری', 'be' => 'بيلاروسی', 'bg' => 'بلغاری', 'bh' => 'بِہاری', 'bn' => 'بنگالی', 'bo' => 'تبتی', 'br' => 'برِیٹن', 'bs' => 'بوسنی', 'ca' => 'کاٹالانين', 'cs' => 'چيک', 'cy' => 'ویلش', 'da' => 'ڈينش', 'de' => 'جرمن', 'de_at' => 'آسٹریائی جرمن', 'de_ch' => 'سوئس ہائی جرمن', 'dv' => 'ڈیویہی', 'dz' => 'ژونگکھا', 'efi' => 'ایفِک', 'el' => 'يونانی', 'en' => 'انگريزی', 'en_au' => 'آسٹریلیائی انگریزی', 'en_ca' => 'کینیڈین انگریزی', 'en_gb' => 'برطانوی انگریزی', 'en_us' => 'امریکی انگریزی', 'eo' => 'ايسپرانٹو', 'es' => 'ہسپانوی', 'es_419' => 'لاطینی امریکی ہسپانوی', 'es_es' => 'آئبریائی ہسپانوی', 'et' => 'اسٹونين', 'eu' => 'باسکی', 'fa' => 'فارسی', 'fi' => 'فنّنِش', 'fil' => 'ٹيگالاگی', 'fj' => 'فجی کا باشندہ', 'fo' => 'فیروئیز', 'fr' => 'فرانسيسی', 'fr_ca' => 'کینیڈین فرانسیسی', 'fr_ch' => 'سوئس فرینچ', 'fy' => 'مغربی فریسیئن', 'ga' => 'آئيرِش', 'gd' => 'سکاٹ گيلِک', 'gl' => 'گاليشيائی', 'gn' => 'گُارانی', 'gsw' => 'سوئس جرمن', 'gu' => 'گجراتی', 'ha' => 'ہؤسا', 'haw' => 'ہوائی کا باشندہ', 'he' => 'عبرانی', 'hi' => 'ہندی', 'hr' => 'کراتی', 'ht' => 'ہیتی', 'hu' => 'ہنگیرین', 'hy' => 'ارمینی', 'ia' => 'انٹرلنگوی', 'id' => 'انڈونيثيائی', 'ig' => 'اِگبو', 'is' => 'آئس لینڈ کا باشندہ', 'it' => 'اطالوی', 'ja' => 'جاپانی', 'jv' => 'جاوی', 'ka' => 'جارجی', 'kk' => 'قزاخ', 'km' => 'کمبوڈیَن', 'kn' => 'کنّاڈا', 'ko' => 'کورين', 'ks' => 'کشمیری', 'ku' => 'کردش', 'ky' => 'کرغیزی', 'la' => 'لاطينی', 'lb' => 'لگژمبرگ کا باشندہ', 'ln' => 'لِنگَلا', 'lo' => 'لاؤشِیَن', 'lt' => 'لتھُواینین', 'lv' => 'ليٹوين', 'mg' => 'ملاگاسی', 'mi' => 'ماؤری', 'mk' => 'مقدونيائی', 'ml' => 'مالايالم', 'mn' => 'منگؤلی', 'mr' => 'مراٹهی', 'ms' => 'مالائی', 'mt' => 'مالٹی', 'my' => 'برمی', 'nb' => 'نارویجین بوکمل', 'nd' => 'شمالی دبیل', 'ne' => 'نيپالی', 'nl' => 'ڈچ', 'nl_be' => 'فلیمِش', 'nn' => 'نورویجینی (نینورسک)', 'no' => 'نارويجين', 'nso' => 'شمالی سوتھو', 'ny' => 'نیانجا', 'oc' => 'آکيٹانی', 'or' => 'اورِیا', 'os' => 'اوسیٹک', 'pa' => 'پنجابی', 'pl' => 'پولستانی', 'ps' => 'پشتو', 'pt' => 'پُرتگالی', 'pt_br' => 'برازیلی پرتگالی', 'pt_pt' => 'پرتگالی (پرتگال)', 'qu' => 'کویچوآ', 'rm' => 'رومانش', 'rn' => 'رونڈی', 'ro' => 'رومنی', 'ru' => 'روسی', 'rw' => 'کینیاروانڈا', 'sa' => 'سَنسکرِت', 'sd' => 'سندھی', 'se' => 'شمالی سامی', 'sg' => 'سانگو', 'sh' => 'سربو-کروئیشین', 'si' => 'سنہالا', 'sk' => 'سلوواک', 'sl' => 'سلووینیائی', 'sm' => 'ساموآن', 'sn' => 'شونا', 'so' => 'صومالی', 'sq' => 'البانی', 'sr' => 'صربی', 'ss' => 'سواتی', 'st' => 'جنوبی سوتھو', 'su' => 'سنڈانیز', 'sv' => 'سویڈش', 'sw' => 'سواحلی', 'ta' => 'تمل', 'te' => 'تیلگو', 'tet' => 'ٹیٹم', 'tg' => 'تاجک', 'th' => 'تھائی', 'ti' => 'ٹگرینیا', 'tk' => 'ترکمان', 'tl' => 'ٹیگا لوگ', 'tlh' => 'کلنگان', 'tn' => 'سوانا', 'to' => 'ٹونگا', 'tpi' => 'ٹوک پِسِن', 'tr' => 'ترکی', 'ts' => 'زونگا', 'tt' => 'تاتار', 'tw' => 'توی', 'ty' => 'تاہیتی', 'ug' => 'ییگہر', 'uk' => 'یوکرینیائی', 'und' => 'نامعلوم زبان', 'ur' => 'اردو', 'uz' => 'ازبیک', 've' => 'وینڈا', 'vi' => 'ویتنامی', 'wo' => 'وولوف', 'xh' => 'ژوسا', 'yi' => 'يادش', 'yo' => 'یوروبا', 'zh' => 'چینی', 'zh_hans' => 'چینی (آسان کردہ)', 'zh_hant' => 'روایتی چینی', 'zu' => 'زولو', 'zxx' => 'کوئی لسانی مواد نہیں', ), 'scripts' => array ( 'arab' => 'فارسی عربی', 'armn' => 'آرمینیائی', 'beng' => 'بنگالی', 'bopo' => 'بوپوموفو', 'brai' => 'بریل', 'cyrl' => 'کریلِک', 'deva' => 'دیوناگری', 'ethi' => 'ایتھوپیا کا باشندہ', 'geor' => 'جارجیا کا باشندہ', 'grek' => 'یونانی', 'gujr' => 'گجراتی', 'guru' => 'گرمکھی', 'hang' => 'ہنگول', 'hani' => 'ہان', 'hans' => 'آسان ہان', 'hant' => 'روایتی ہان', 'hebr' => 'عبرانی', 'hira' => 'ہیراگینا', 'jpan' => 'جاپانی', 'kana' => 'کٹاکانا', 'khmr' => 'خمیر', 'knda' => 'کنڑ', 'kore' => 'کوریائی', 'laoo' => 'لاؤ', 'latn' => 'لاطینی', 'mlym' => 'ملیالم', 'mong' => 'منگولیائی', 'mymr' => 'میانمار', 'orya' => 'اڑیہ', 'sinh' => 'سنہالا', 'taml' => 'تمل', 'telu' => 'تیلگو', 'thaa' => 'تھانا', 'thai' => 'تھائی', 'tibt' => 'تبتی', 'zsym' => 'علامات', 'zxxx' => 'غیر تحریر شدہ', 'zyyy' => 'عام', 'zzzz' => 'نامعلوم رسم الخط', ), 'territories' => array ( '001' => 'دنیا', '002' => 'افریقہ', '003' => 'شمالی امریکہ', '005' => 'جنوبی امریکہ', '009' => 'اوشیانیا', '011' => 'مغربی افریقہ', '013' => 'وسطی امریکہ', '014' => 'مشرقی افریقہ', '015' => 'شمالی افریقہ', '017' => 'وسطی افریقہ', '018' => 'جنوبی افریقہ کے علاقہ', '019' => 'امیریکاز', '021' => 'شمالی امریکہ کا علاقہ', '029' => 'کریبیائی', '030' => 'مشرقی ایشیا', '034' => 'جنوبی ایشیا', '035' => 'جنوب مشرقی ایشیا', '039' => 'جنوبی یورپ', '053' => 'آسٹریلیا اور نیوزی لینڈ', '054' => 'مالینیشیا', '057' => 'مائکرونیشیائی علاقہ', '061' => 'پولینیشیا', 142 => 'ایشیا', 143 => 'وسطی ایشیا', 145 => 'مغربی ایشیا', 150 => 'یوروپ', 151 => 'مشرقی یورپ', 154 => 'شمالی یورپ', 155 => 'مغربی یورپ', 419 => 'لاطینی امریکہ', 'ac' => 'اسکینسیئن آئلینڈ', 'ad' => 'انڈورا', 'ae' => 'متحدہ عرب امارات', 'af' => 'افغانستان', 'ag' => 'انٹیگوا اور باربودا', 'ai' => 'انگوئیلا', 'al' => 'البانیہ', 'am' => 'آرمینیا', 'an' => 'نیدرلینڈز انٹیلیز', 'ao' => 'انگولا', 'aq' => 'انٹارکٹیکا', 'ar' => 'ارجنٹینا', 'as' => 'امریکی ساموآ', 'at' => 'آسٹریا', 'au' => 'آسٹریلیا', 'aw' => 'اروبا', 'ax' => 'آلینڈ آئلینڈز', 'az' => 'آذربائجان', 'ba' => 'بوسنیا اور ہرزیگووینا', 'bb' => 'باربادوس', 'bd' => 'بنگلہ دیش', 'be' => 'بیلجیم', 'bf' => 'برکینا فاسو', 'bg' => 'بلغاریہ', 'bh' => 'بحرین', 'bi' => 'برونڈی', 'bj' => 'بینن', 'bl' => 'سینٹ برتھلیمی', 'bm' => 'برمودا', 'bn' => 'برونئی', 'bo' => 'بولیویا', 'br' => 'برازیلی', 'bs' => 'بہاماس', 'bt' => 'بھوٹان', 'bv' => 'بؤویٹ آئلینڈ', 'bw' => 'بوتسوانا', 'by' => 'بیلاروس', 'bz' => 'بیلائز', 'ca' => 'کینیڈا', 'cc' => 'کوکوس [کیلنگ] جزائر', 'cd' => 'کانگو [DRC]', 'cf' => 'وسط افریقی جمہوریہ', 'cg' => 'کانگو [جمہوریہ]', 'ch' => 'سوئٹزر لینڈ', 'ci' => 'آئیوری کوسٹ', 'ck' => 'کک آئلینڈز', 'cl' => 'چلی', 'cm' => 'کیمرون', 'cn' => 'چین', 'co' => 'کولمبیا', 'cp' => 'کلپّرٹن آئلینڈ', 'cr' => 'کوسٹا ریکا', 'cs' => 'سربیا اور مانٹینیگرو', 'cu' => 'کیوبا', 'cv' => 'کیپ ورڈی', 'cx' => 'کرسمس آئلینڈ', 'cy' => 'قبرص', 'cz' => 'چیک جمہوریہ', 'de' => 'جرمنی', 'dg' => 'ڈائجو گارسیا', 'dj' => 'جبوتی', 'dk' => 'ڈنمارک', 'dm' => 'ڈومنیکا', 'do' => 'ڈومنیکن جمہوریہ', 'dz' => 'الجیریا', 'ea' => 'سیئوٹا اور میلیلا', 'ec' => 'ایکواڈور', 'ee' => 'اسٹونیا', 'eg' => 'مصر', 'eh' => 'مغربی صحارا', 'er' => 'اریٹیریا', 'es' => 'ہسپانیہ', 'et' => 'ایتھوپیا', 'eu' => 'یوروپی یونین', 'fi' => 'فن لینڈ', 'fj' => 'فجی', 'fk' => 'فاکلینڈ آئلینڈز [ازلاس مالوینس]', 'fm' => 'مائکرونیشیا', 'fo' => 'فروئی آئلینڈز', 'fr' => 'فرانس', 'ga' => 'گیبون', 'gb' => 'سلطنت متحدہ', 'gd' => 'غرناطہ', 'ge' => 'جارجیا', 'gf' => 'فرینچ گیانا', 'gg' => 'گوئرنسی', 'gh' => 'گھانا', 'gi' => 'جبل الطارق', 'gl' => 'گرین لینڈ', 'gm' => 'گامبیا', 'gn' => 'گنی', 'gp' => 'گواڈیلوپ', 'gq' => 'استوائی گیانا', 'gr' => 'یونان', 'gs' => 'جنوبی جارجیا اور جنوبی سینڈوچ جزائر', 'gt' => 'گواٹے مالا', 'gu' => 'گوآم', 'gw' => 'گنی بساؤ', 'gy' => 'گیانا', 'hk' => 'ہانگ کانگ', 'hm' => 'ہیئرڈ آئلینڈ اور میکڈونالڈ آئلینڈز', 'hn' => 'ہونڈاروس', 'hr' => 'کروشیا', 'ht' => 'ہیتی', 'hu' => 'ہنگری', 'ic' => 'کینری آئلینڈز', 'id' => 'انڈونیشیا', 'ie' => 'آئرلینڈ', 'il' => 'اسرائیل', 'im' => 'آئل آف مین', 'in' => 'بھارت', 'io' => 'برطانوی ہندوستانی سمندری خطہ', 'iq' => 'عراق', 'ir' => 'ایران', 'is' => 'آئس لینڈ', 'it' => 'اٹلی', 'je' => 'جرسی', 'jm' => 'جمائیکا', 'jo' => 'اردن', 'jp' => 'جاپان', 'ke' => 'کینیا', 'kg' => 'کرغزستان', 'kh' => 'کمبوڈیا', 'ki' => 'کریباتی', 'km' => 'کوموروس', 'kn' => 'سینٹ کٹس اور نیویس', 'kp' => 'شمالی کوریا', 'kr' => 'جنوبی کوریا', 'kw' => 'کویت', 'ky' => 'کیمین آئلینڈز', 'kz' => 'قزاخستان', 'la' => 'لاؤس', 'lb' => 'لبنان', 'lc' => 'سینٹ لوسیا', 'li' => 'لیشٹنسٹائن', 'lk' => 'سری لنکا', 'lr' => 'لائبیریا', 'ls' => 'لیسوتھو', 'lt' => 'لتھوانیا', 'lu' => 'لگژمبرگ', 'lv' => 'لٹویا', 'ly' => 'لیبیا', 'ma' => 'مراقش', 'mc' => 'موناکو', 'md' => 'مالدووا', 'me' => 'مونٹے نیگرو', 'mf' => 'سینٹ مارٹن', 'mg' => 'مڈغاسکر', 'mh' => 'مارشل آئلینڈز', 'mk' => 'مقدونیائی [FYROM]', 'ml' => 'مالی', 'mm' => 'میانمار [برما]', 'mn' => 'منگولیا', 'mo' => 'مکاؤ', 'mp' => 'شمالی ماریانا آئلینڈز', 'mq' => 'مارٹینک', 'mr' => 'موریطانیہ', 'ms' => 'مونٹسیراٹ', 'mt' => 'مالٹا', 'mu' => 'ماریشس', 'mv' => 'مالدیو', 'mw' => 'ملاوی', 'mx' => 'میکسیکو', 'my' => 'ملیشیا', 'mz' => 'موزمبیق', 'na' => 'نامیبیا', 'nc' => 'نیو کلیڈونیا', 'ne' => 'نائجر', 'nf' => 'نار فاک آئلینڈ', 'ng' => 'نائجیریا', 'ni' => 'نکاراگووا', 'nl' => 'نیدر لینڈز', 'no' => 'ناروے', 'np' => 'نیپال', 'nr' => 'نؤرو', 'nu' => 'نیئو', 'nz' => 'نیوزی ینڈ', 'om' => 'عمان', 'pa' => 'پنامہ', 'pe' => 'پیرو', 'pf' => 'فرانسیسی پولینیشیا', 'pg' => 'پاپوآ نیو گنی', 'ph' => 'فلپائنی', 'pk' => 'پاکستان', 'pl' => 'پولینڈ', 'pm' => 'سینٹ پیئر اور میکلیئون', 'pn' => 'پٹکائرن جزائر', 'pr' => 'پیورٹو ریکو', 'ps' => 'فلسطینی خطے', 'pt' => 'پرتگال', 'pw' => 'پلاؤ', 'py' => 'پیراگوئے', 'qa' => 'قطر', 'qo' => 'بیرونی اوشیانیا', 're' => 'ری یونین', 'ro' => 'رومانیا', 'rs' => 'سربیا', 'ru' => 'روسی', 'rw' => 'روانڈا', 'sa' => 'سعودی عرب', 'sb' => 'سولومن آئلینڈز', 'sc' => 'سشلیز', 'sd' => 'سوڈان', 'se' => 'سویڈن', 'sg' => 'سنگاپور', 'sh' => 'سینٹ ہیلینا', 'si' => 'سلووینیا', 'sj' => 'سوالبرڈ اور جان ماین', 'sk' => 'سلوواکیہ', 'sl' => 'سیئر لیون', 'sm' => 'سان مارینو', 'sn' => 'سینیگل', 'so' => 'صومالیہ', 'sr' => 'سورینام', 'st' => 'ساؤ ٹوم اور پرنسپے', 'sv' => 'ال سلواڈور', 'sy' => 'شام', 'sz' => 'سوازی لینڈ', 'ta' => 'ٹرسٹن ڈا کیونہا', 'tc' => 'ترکس اور کیکاؤس جزائر', 'td' => 'چاڈ', 'tf' => 'فرانسیسی جنوبی خطے', 'tg' => 'ٹوگو', 'th' => 'تھائی لینڈ', 'tj' => 'تاجکستان', 'tk' => 'ٹوکیلاؤ', 'tl' => 'مشرقی تیمور', 'tm' => 'ترکمانستان', 'tn' => 'تیونیسیا', 'to' => 'ٹونگا', 'tr' => 'ترکی', 'tt' => 'ترینیداد اور ٹوباگو', 'tv' => 'ٹووالو', 'tw' => 'تائیوان', 'tz' => 'تنزانیہ', 'ua' => 'یوکرین', 'ug' => 'یوگانڈا', 'um' => 'امریکہ سے باہر کے چھوٹے جزائز', 'us' => 'ریاستہائے متحدہ', 'uy' => 'یوروگوئے', 'uz' => 'ازبکستان', 'va' => 'واٹیکن سٹی', 'vc' => 'سینٹ ونسنٹ اور گرینیڈائنز', 've' => 'وینزوئیلا', 'vg' => 'برٹش ورجن آئلینڈز', 'vi' => 'امریکی ورجن آئلینڈز', 'vn' => 'ویتنام', 'vu' => 'وینوآٹو', 'wf' => 'ویلیز اور فیوٹیونا', 'ws' => 'ساموآ', 'ye' => 'یمن', 'yt' => 'مایوٹ', 'za' => 'جنوبی افریقہ', 'zm' => 'زامبیا', 'zw' => 'زمبابوے', 'zz' => 'نامعلوم علاقہ', ), 'pluralRules' => array ( 0 => 'n==1', 1 => 'true', ), );
fydo23/mySurvey
framework/i18n/data/ur.php
PHP
mit
19,633
/* Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.html or http://ckeditor.com/license */ CKEDITOR.lang.no={dir:'ltr',editorTitle:'Rikteksteditor, %1, trykk ALT 0 for hjelp.',toolbars:'Verktøylinjer for editor',editor:'Rikteksteditor',source:'Kilde',newPage:'Ny side',save:'Lagre',preview:'Forhåndsvis',cut:'Klipp ut',copy:'Kopier',paste:'Lim inn',print:'Skriv ut',underline:'Understreking',bold:'Fet',italic:'Kursiv',selectAll:'Merk alt',removeFormat:'Fjern formatering',strike:'Gjennomstreking',subscript:'Senket skrift',superscript:'Hevet skrift',horizontalrule:'Sett inn horisontal linje',pagebreak:'Sett inn sideskift for utskrift',pagebreakAlt:'Sideskift',unlink:'Fjern lenke',undo:'Angre',redo:'Gjør om',common:{browseServer:'Bla igjennom server',url:'URL',protocol:'Protokoll',upload:'Last opp',uploadSubmit:'Send det til serveren',image:'Bilde',flash:'Flash',form:'Skjema',checkbox:'Avmerkingsboks',radio:'Alternativknapp',textField:'Tekstboks',textarea:'Tekstområde',hiddenField:'Skjult felt',button:'Knapp',select:'Rullegardinliste',imageButton:'Bildeknapp',notSet:'<ikke satt>',id:'Id',name:'Navn',langDir:'Språkretning',langDirLtr:'Venstre til høyre (VTH)',langDirRtl:'Høyre til venstre (HTV)',langCode:'Språkkode',longDescr:'Utvidet beskrivelse',cssClass:'Stilarkklasser',advisoryTitle:'Tittel',cssStyle:'Stil',ok:'OK',cancel:'Avbryt',close:'Lukk',preview:'Forhåndsvis',generalTab:'Generelt',advancedTab:'Avansert',validateNumberFailed:'Denne verdien er ikke et tall.',confirmNewPage:'Alle ulagrede endringer som er gjort i dette innholdet vil bli tapt. Er du sikker på at du vil laste en ny side?',confirmCancel:'Noen av valgene har blitt endret. Er du sikker på at du vil lukke dialogen?',options:'Valg',target:'Mål',targetNew:'Nytt vindu (_blank)',targetTop:'Hele vindu (_top)',targetSelf:'Samme vindu (_self)',targetParent:'Foreldrevindu (_parent)',langDirLTR:'Venstre til høyre (VTH)',langDirRTL:'Høyre til venstre (HTV)',styles:'Stil',cssClasses:'Stilarkklasser',width:'Bredde',height:'Høyde',align:'Juster',alignLeft:'Venstre',alignRight:'Høyre',alignCenter:'Midtjuster',alignTop:'Topp',alignMiddle:'Midten',alignBottom:'Bunn',invalidHeight:'Høyde må være et tall.',invalidWidth:'Bredde må være et tall.',invalidCssLength:'Den angitte verdien for feltet "%1" må være et positivt tall med eller uten en gyldig CSS-målingsenhet (px, %, in, cm, mm, em, ex, pt, eller pc).',invalidHtmlLength:'Den angitte verdien for feltet "%1" må være et positivt tall med eller uten en gyldig HTML-målingsenhet (px eller %).',invalidInlineStyle:'Verdi angitt for inline stil må bestå av en eller flere sett med formatet "navn : verdi", separert med semikolon',cssLengthTooltip:'Skriv inn et tall for en piksel-verdi eller et tall med en gyldig CSS-enhet (px, %, in, cm, mm, em, ex, pt, eller pc).',unavailable:'%1<span class="cke_accessibility">, utilgjenglig</span>'},contextmenu:{options:'Alternativer for høyreklikkmeny'},specialChar:{toolbar:'Sett inn spesialtegn',title:'Velg spesialtegn',options:'Alternativer for spesialtegn'},link:{toolbar:'Sett inn/Rediger lenke',other:'<annen>',menu:'Rediger lenke',title:'Lenke',info:'Lenkeinfo',target:'Mål',upload:'Last opp',advanced:'Avansert',type:'Lenketype',toUrl:'URL',toAnchor:'Lenke til anker i teksten',toEmail:'E-post',targetFrame:'<ramme>',targetPopup:'<popup-vindu>',targetFrameName:'Målramme',targetPopupName:'Navn på popup-vindu',popupFeatures:'Egenskaper for popup-vindu',popupResizable:'Skalerbar',popupStatusBar:'Statuslinje',popupLocationBar:'Adresselinje',popupToolbar:'Verktøylinje',popupMenuBar:'Menylinje',popupFullScreen:'Fullskjerm (IE)',popupScrollBars:'Scrollbar',popupDependent:'Avhenging (Netscape)',popupLeft:'Venstre posisjon',popupTop:'Topp-posisjon',id:'Id',langDir:'Språkretning',langDirLTR:'Venstre til høyre (VTH)',langDirRTL:'Høyre til venstre (HTV)',acccessKey:'Aksessknapp',name:'Navn',langCode:'Språkkode',tabIndex:'Tabindeks',advisoryTitle:'Tittel',advisoryContentType:'Type',cssClasses:'Stilarkklasser',charset:'Lenket tegnsett',styles:'Stil',rel:'Relasjon (rel)',selectAnchor:'Velg et anker',anchorName:'Anker etter navn',anchorId:'Element etter ID',emailAddress:'E-postadresse',emailSubject:'Meldingsemne',emailBody:'Melding',noAnchors:'(Ingen anker i dokumentet)',noUrl:'Vennligst skriv inn lenkens URL',noEmail:'Vennligst skriv inn e-postadressen'},anchor:{toolbar:'Sett inn/Rediger anker',menu:'Egenskaper for anker',title:'Egenskaper for anker',name:'Ankernavn',errorName:'Vennligst skriv inn ankernavnet',remove:'Fjern anker'},list:{numberedTitle:'Egenskaper for nummerert liste',bulletedTitle:'Egenskaper for punktmerket liste',type:'Type',start:'Start',validateStartNumber:'Starten på listen må være et heltall.',circle:'Sirkel',disc:'Disk',square:'Firkant',none:'Ingen',notset:'<ikke satt>',armenian:'Armensk nummerering',georgian:'Georgisk nummerering (an, ban, gan, osv.)',lowerRoman:'Romertall, små (i, ii, iii, iv, v, osv.)',upperRoman:'Romertall, store (I, II, III, IV, V, osv.)',lowerAlpha:'Alfabetisk, små (a, b, c, d, e, osv.)',upperAlpha:'Alfabetisk, store (A, B, C, D, E, osv.)',lowerGreek:'Gresk, små (alpha, beta, gamma, osv.)',decimal:'Tall (1, 2, 3, osv.)',decimalLeadingZero:'Tall, med førstesiffer null (01, 02, 03, osv.)'},findAndReplace:{title:'Søk og erstatt',find:'Søk',replace:'Erstatt',findWhat:'Søk etter:',replaceWith:'Erstatt med:',notFoundMsg:'Fant ikke søketeksten.',findOptions:'Søkealternativer',matchCase:'Skill mellom store og små bokstaver',matchWord:'Bare hele ord',matchCyclic:'Søk i hele dokumentet',replaceAll:'Erstatt alle',replaceSuccessMsg:'%1 tilfelle(r) erstattet.'},table:{toolbar:'Tabell',title:'Egenskaper for tabell',menu:'Egenskaper for tabell',deleteTable:'Slett tabell',rows:'Rader',columns:'Kolonner',border:'Rammestørrelse',widthPx:'piksler',widthPc:'prosent',widthUnit:'Bredde-enhet',cellSpace:'Cellemarg',cellPad:'Cellepolstring',caption:'Tittel',summary:'Sammendrag',headers:'Overskrifter',headersNone:'Ingen',headersColumn:'Første kolonne',headersRow:'Første rad',headersBoth:'Begge',invalidRows:'Antall rader må være et tall større enn 0.',invalidCols:'Antall kolonner må være et tall større enn 0.',invalidBorder:'Rammestørrelse må være et tall.',invalidWidth:'Tabellbredde må være et tall.',invalidHeight:'Tabellhøyde må være et tall.',invalidCellSpacing:'Cellemarg må være et positivt tall.',invalidCellPadding:'Cellepolstring må være et positivt tall.',cell:{menu:'Celle',insertBefore:'Sett inn celle før',insertAfter:'Sett inn celle etter',deleteCell:'Slett celler',merge:'Slå sammen celler',mergeRight:'Slå sammen høyre',mergeDown:'Slå sammen ned',splitHorizontal:'Del celle horisontalt',splitVertical:'Del celle vertikalt',title:'Celleegenskaper',cellType:'Celletype',rowSpan:'Radspenn',colSpan:'Kolonnespenn',wordWrap:'Tekstbrytning',hAlign:'Horisontal justering',vAlign:'Vertikal justering',alignBaseline:'Grunnlinje',bgColor:'Bakgrunnsfarge',borderColor:'Rammefarge',data:'Data',header:'Overskrift',yes:'Ja',no:'Nei',invalidWidth:'Cellebredde må være et tall.',invalidHeight:'Cellehøyde må være et tall.',invalidRowSpan:'Radspenn må være et heltall.',invalidColSpan:'Kolonnespenn må være et heltall.',chooseColor:'Velg'},row:{menu:'Rader',insertBefore:'Sett inn rad før',insertAfter:'Sett inn rad etter',deleteRow:'Slett rader'},column:{menu:'Kolonne',insertBefore:'Sett inn kolonne før',insertAfter:'Sett inn kolonne etter',deleteColumn:'Slett kolonner'}},button:{title:'Egenskaper for knapp',text:'Tekst (verdi)',type:'Type',typeBtn:'Knapp',typeSbm:'Send',typeRst:'Nullstill'},checkboxAndRadio:{checkboxTitle:'Egenskaper for avmerkingsboks',radioTitle:'Egenskaper for alternativknapp',value:'Verdi',selected:'Valgt'},form:{title:'Egenskaper for skjema',menu:'Egenskaper for skjema',action:'Handling',method:'Metode',encoding:'Encoding'},select:{title:'Egenskaper for rullegardinliste',selectInfo:'Info',opAvail:'Tilgjenglige alternativer',value:'Verdi',size:'Størrelse',lines:'Linjer',chkMulti:'Tillat flervalg',opText:'Tekst',opValue:'Verdi',btnAdd:'Legg til',btnModify:'Endre',btnUp:'Opp',btnDown:'Ned',btnSetValue:'Sett som valgt',btnDelete:'Slett'},textarea:{title:'Egenskaper for tekstområde',cols:'Kolonner',rows:'Rader'},textfield:{title:'Egenskaper for tekstfelt',name:'Navn',value:'Verdi',charWidth:'Tegnbredde',maxChars:'Maks antall tegn',type:'Type',typeText:'Tekst',typePass:'Passord'},hidden:{title:'Egenskaper for skjult felt',name:'Navn',value:'Verdi'},image:{title:'Bildeegenskaper',titleButton:'Egenskaper for bildeknapp',menu:'Bildeegenskaper',infoTab:'Bildeinformasjon',btnUpload:'Send det til serveren',upload:'Last opp',alt:'Alternativ tekst',lockRatio:'Lås forhold',resetSize:'Tilbakestill størrelse',border:'Ramme',hSpace:'HMarg',vSpace:'VMarg',alertUrl:'Vennligst skriv bilde-urlen',linkTab:'Lenke',button2Img:'Vil du endre den valgte bildeknappen til et vanlig bilde?',img2Button:'Vil du endre det valgte bildet til en bildeknapp?',urlMissing:'Bildets adresse mangler.',validateBorder:'Ramme må være et heltall.',validateHSpace:'HMarg må være et heltall.',validateVSpace:'VMarg må være et heltall.'},flash:{properties:'Egenskaper for Flash-objekt',propertiesTab:'Egenskaper',title:'Flash-egenskaper',chkPlay:'Autospill',chkLoop:'Loop',chkMenu:'Slå på Flash-meny',chkFull:'Tillat fullskjerm',scale:'Skaler',scaleAll:'Vis alt',scaleNoBorder:'Ingen ramme',scaleFit:'Skaler til å passe',access:'Scripttilgang',accessAlways:'Alltid',accessSameDomain:'Samme domene',accessNever:'Aldri',alignAbsBottom:'Abs bunn',alignAbsMiddle:'Abs midten',alignBaseline:'Bunnlinje',alignTextTop:'Tekst topp',quality:'Kvalitet',qualityBest:'Best',qualityHigh:'Høy',qualityAutoHigh:'Auto høy',qualityMedium:'Medium',qualityAutoLow:'Auto lav',qualityLow:'Lav',windowModeWindow:'Vindu',windowModeOpaque:'Opaque',windowModeTransparent:'Gjennomsiktig',windowMode:'Vindumodus',flashvars:'Variabler for flash',bgcolor:'Bakgrunnsfarge',hSpace:'HMarg',vSpace:'VMarg',validateSrc:'Vennligst skriv inn lenkens url.',validateHSpace:'HMarg må være et tall.',validateVSpace:'VMarg må være et tall.'},spellCheck:{toolbar:'Stavekontroll',title:'Stavekontroll',notAvailable:'Beklager, tjenesten er utilgjenglig nå.',errorLoading:'Feil under lasting av applikasjonstjenestetjener: %s.',notInDic:'Ikke i ordboken',changeTo:'Endre til',btnIgnore:'Ignorer',btnIgnoreAll:'Ignorer alle',btnReplace:'Erstatt',btnReplaceAll:'Erstatt alle',btnUndo:'Angre',noSuggestions:'- Ingen forslag -',progress:'Stavekontroll pågår...',noMispell:'Stavekontroll fullført: ingen feilstavinger funnet',noChanges:'Stavekontroll fullført: ingen ord endret',oneChange:'Stavekontroll fullført: Ett ord endret',manyChanges:'Stavekontroll fullført: %1 ord endret',ieSpellDownload:'Stavekontroll er ikke installert. Vil du laste den ned nå?'},smiley:{toolbar:'Smil',title:'Sett inn smil',options:'Alternativer for smil'},elementsPath:{eleLabel:'Element-sti',eleTitle:'%1 element'},numberedlist:'Legg til/Fjern nummerert liste',bulletedlist:'Legg til/Fjern punktmerket liste',indent:'Øk innrykk',outdent:'Reduser innrykk',justify:{left:'Venstrejuster',center:'Midtstill',right:'Høyrejuster',block:'Blokkjuster'},blockquote:'Sitatblokk',clipboard:{title:'Lim inn',cutError:'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk utklipping av tekst. Vennligst bruk snarveien (Ctrl/Cmd+X).',copyError:'Din nettlesers sikkerhetsinstillinger tillater ikke automatisk kopiering av tekst. Vennligst bruk snarveien (Ctrl/Cmd+C).',pasteMsg:'Vennligst lim inn i følgende boks med tastaturet (<STRONG>Ctrl/Cmd+V</STRONG>) og trykk <STRONG>OK</STRONG>.',securityMsg:'Din nettlesers sikkerhetsinstillinger gir ikke redigeringsverktøyet direkte tilgang til utklippstavlen. Du må derfor lime det inn på nytt i dette vinduet.',pasteArea:'Innlimingsområde'},pastefromword:{confirmCleanup:'Teksten du limer inn ser ut til å være kopiert fra Word. Vil du renske den før du limer den inn?',toolbar:'Lim inn fra Word',title:'Lim inn fra Word',error:'Det var ikke mulig å renske den innlimte teksten på grunn av en intern feil'},pasteText:{button:'Lim inn som ren tekst',title:'Lim inn som ren tekst'},templates:{button:'Maler',title:'Innholdsmaler',options:'Alternativer for mal',insertOption:'Erstatt gjeldende innhold',selectPromptMsg:'Velg malen du vil åpne i redigeringsverktøyet:',emptyListMsg:'(Ingen maler definert)'},showBlocks:'Vis blokker',stylesCombo:{label:'Stil',panelTitle:'Stilformater',panelTitle1:'Blokkstiler',panelTitle2:'Inlinestiler',panelTitle3:'Objektstiler'},format:{label:'Format',panelTitle:'Avsnittsformat',tag_p:'Normal',tag_pre:'Formatert',tag_address:'Adresse',tag_h1:'Overskrift 1',tag_h2:'Overskrift 2',tag_h3:'Overskrift 3',tag_h4:'Overskrift 4',tag_h5:'Overskrift 5',tag_h6:'Overskrift 6',tag_div:'Normal (DIV)'},div:{title:'Sett inn Div Container',toolbar:'Sett inn Div Container',cssClassInputLabel:'Stilark-klasser',styleSelectLabel:'Stil',IdInputLabel:'Id',languageCodeInputLabel:' Språkkode',inlineStyleInputLabel:'Inlinestiler',advisoryTitleInputLabel:'Tittel',langDirLabel:'Språkretning',langDirLTRLabel:'Venstre til høyre (VTH)',langDirRTLLabel:'Høyre til venstre (HTV)',edit:'Rediger Div',remove:'Fjern Div'},iframe:{title:'Egenskaper for IFrame',toolbar:'IFrame',noUrl:'Vennligst skriv inn URL for iframe',scrolling:'Aktiver scrollefelt',border:'Viss ramme rundt iframe'},font:{label:'Skrift',voiceLabel:'Font',panelTitle:'Skrift'},fontSize:{label:'Størrelse',voiceLabel:'Font Størrelse',panelTitle:'Størrelse'},colorButton:{textColorTitle:'Tekstfarge',bgColorTitle:'Bakgrunnsfarge',panelTitle:'Farger',auto:'Automatisk',more:'Flere farger...'},colors:{'000':'Svart',800000:'Rødbrun','8B4513':'Salbrun','2F4F4F':'Grønnsvart','008080':'Blågrønn','000080':'Marineblått','4B0082':'Indigo',696969:'Mørk grå',B22222:'Mørkerød',A52A2A:'Brun',DAA520:'Lys brun','006400':'Mørk grønn','40E0D0':'Turkis','0000CD':'Medium blå',800080:'Purpur',808080:'Grå',F00:'Rød',FF8C00:'Mørk oransje',FFD700:'Gull','008000':'Grønn','0FF':'Cyan','00F':'Blå',EE82EE:'Fiolett',A9A9A9:'Svak grå',FFA07A:'Rosa-oransje',FFA500:'Oransje',FFFF00:'Gul','00FF00':'Lime',AFEEEE:'Svak turkis',ADD8E6:'Lys Blå',DDA0DD:'Plomme',D3D3D3:'Lys grå',FFF0F5:'Svak lavendelrosa',FAEBD7:'Antikk-hvit',FFFFE0:'Lys gul',F0FFF0:'Honningmelon',F0FFFF:'Svakt asurblått',F0F8FF:'Svak cyan',E6E6FA:'Lavendel',FFF:'Hvit'},scayt:{title:'Stavekontroll mens du skriver',opera_title:'Ikke støttet av Opera',enable:'Slå på SCAYT',disable:'Slå av SCAYT',about:'Om SCAYT',toggle:'Veksle SCAYT',options:'Valg',langs:'Språk',moreSuggestions:'Flere forslag',ignore:'Ignorer',ignoreAll:'Ignorer Alle',addWord:'Legg til ord',emptyDic:'Ordboknavn bør ikke være tom.',optionsTab:'Valg',allCaps:'Ikke kontroller ord med kun store bokstaver',ignoreDomainNames:'Ikke kontroller domenenavn',mixedCase:'Ikke kontroller ord med blandet små og store bokstaver',mixedWithDigits:'Ikke kontroller ord som inneholder tall',languagesTab:'Språk',dictionariesTab:'Ordbøker',dic_field_name:'Ordboknavn',dic_create:'Opprett',dic_restore:'Gjenopprett',dic_delete:'Slett',dic_rename:'Gi nytt navn',dic_info:'Brukerordboken lagres først i en informasjonskapsel på din maskin, men det er en begrensning på hvor mye som kan lagres her. Når ordboken blir for stor til å lagres i en informasjonskapsel, vil vi i stedet lagre ordboken på vår server. For å lagre din personlige ordbok på vår server, burde du velge et navn for ordboken din. Hvis du allerede har lagret en ordbok, vennligst skriv inn ordbokens navn og klikk på Gjenopprett-knappen.',aboutTab:'Om'},about:{title:'Om CKEditor',dlgTitle:'Om CKEditor',help:'Se $1 for hjelp.',userGuide:'CKEditors brukerveiledning',moreInfo:'For lisensieringsinformasjon, vennligst besøk vårt nettsted:',copy:'Copyright &copy; $1. Alle rettigheter reservert.'},maximize:'Maksimer',minimize:'Minimer',fakeobjects:{anchor:'Anker',flash:'Flash-animasjon',iframe:'IFrame',hiddenfield:'Skjult felt',unknown:'Ukjent objekt'},resize:'Dra for å skalere',colordialog:{title:'Velg farge',options:'Alternativer for farge',highlight:'Merk',selected:'Valgt',clear:'Tøm'},toolbarCollapse:'Skjul verktøylinje',toolbarExpand:'Vis verktøylinje',toolbarGroups:{document:'Dokument',clipboard:'Utklippstavle/Angre',editing:'Redigering',forms:'Skjema',basicstyles:'Basisstiler',paragraph:'Avsnitt',links:'Lenker',insert:'Innsetting',styles:'Stiler',colors:'Farger',tools:'Verktøy'},bidi:{ltr:'Tekstretning fra venstre til høyre',rtl:'Tekstretning fra høyre til venstre'},docprops:{label:'Dokumentegenskaper',title:'Dokumentegenskaper',design:'Design',meta:'Meta-data',chooseColor:'Velg',other:'<annen>',docTitle:'Sidetittel',charset:'Tegnsett',charsetOther:'Annet tegnsett',charsetASCII:'ASCII',charsetCE:'Sentraleuropeisk',charsetCT:'Tradisonell kinesisk(Big5)',charsetCR:'Kyrillisk',charsetGR:'Gresk',charsetJP:'Japansk',charsetKR:'Koreansk',charsetTR:'Tyrkisk',charsetUN:'Unicode (UTF-8)',charsetWE:'Vesteuropeisk',docType:'Dokumenttype header',docTypeOther:'Annet dokumenttype header',xhtmlDec:'Inkluder XHTML-deklarasjon',bgColor:'Bakgrunnsfarge',bgImage:'URL for bakgrunnsbilde',bgFixed:'Lås bakgrunnsbilde',txtColor:'Tekstfarge',margin:'Sidemargin',marginTop:'Topp',marginLeft:'Venstre',marginRight:'Høyre',marginBottom:'Bunn',metaKeywords:'Dokument nøkkelord (kommaseparert)',metaDescription:'Dokumentbeskrivelse',metaAuthor:'Forfatter',metaCopyright:'Kopirett',previewHtml:'<p>Dette er en <strong>eksempeltekst</strong>. Du bruker <a href="javascript:void(0)">CKEditor</a>.</p>'}};
vijaypapasani/refinery-ckeditor
app/assets/javascripts/ckeditor/lang/no.js
JavaScript
mit
17,730
!function(e){"function"==typeof define&&define.amd?define(["jquery","jquery-mousewheel","date-functions"],e):"object"==typeof exports?module.exports=e:e(jQuery)}(function(e){"use strict";function i(e,t,a){this.date=e,this.desc=t,this.style=a}var t={i18n:{ar:{months:["كانون الثاني","شباط","آذار","نيسان","مايو","حزيران","تموز","آب","أيلول","تشرين الأول","تشرين الثاني","كانون الأول"],dayOfWeekShort:["ن","ث","ع","خ","ج","س","ح"],dayOfWeek:["الأحد","الاثنين","الثلاثاء","الأربعاء","الخميس","الجمعة","السبت","الأحد"]},ro:{months:["Ianuarie","Februarie","Martie","Aprilie","Mai","Iunie","Iulie","August","Septembrie","Octombrie","Noiembrie","Decembrie"],dayOfWeekShort:["Du","Lu","Ma","Mi","Jo","Vi","Sâ"],dayOfWeek:["Duminică","Luni","Marţi","Miercuri","Joi","Vineri","Sâmbătă"]},id:{months:["Januari","Februari","Maret","April","Mei","Juni","Juli","Agustus","September","Oktober","November","Desember"],dayOfWeekShort:["Min","Sen","Sel","Rab","Kam","Jum","Sab"],dayOfWeek:["Minggu","Senin","Selasa","Rabu","Kamis","Jumat","Sabtu"]},is:{months:["Janúar","Febrúar","Mars","Apríl","Maí","Júní","Júlí","Ágúst","September","Október","Nóvember","Desember"],dayOfWeekShort:["Sun","Mán","Þrið","Mið","Fim","Fös","Lau"],dayOfWeek:["Sunnudagur","Mánudagur","Þriðjudagur","Miðvikudagur","Fimmtudagur","Föstudagur","Laugardagur"]},bg:{months:["Януари","Февруари","Март","Април","Май","Юни","Юли","Август","Септември","Октомври","Ноември","Декември"],dayOfWeekShort:["Нд","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Неделя","Понеделник","Вторник","Сряда","Четвъртък","Петък","Събота"]},fa:{months:["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],dayOfWeekShort:["یکشنبه","دوشنبه","سه شنبه","چهارشنبه","پنجشنبه","جمعه","شنبه"],dayOfWeek:["یک‌شنبه","دوشنبه","سه‌شنبه","چهارشنبه","پنج‌شنبه","جمعه","شنبه","یک‌شنبه"]},ru:{months:["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],dayOfWeekShort:["Вс","Пн","Вт","Ср","Чт","Пт","Сб"],dayOfWeek:["Воскресенье","Понедельник","Вторник","Среда","Четверг","Пятница","Суббота"]},uk:{months:["Січень","Лютий","Березень","Квітень","Травень","Червень","Липень","Серпень","Вересень","Жовтень","Листопад","Грудень"],dayOfWeekShort:["Ндл","Пнд","Втр","Срд","Чтв","Птн","Сбт"],dayOfWeek:["Неділя","Понеділок","Вівторок","Середа","Четвер","П'ятниця","Субота"]},en:{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},el:{months:["Ιανουάριος","Φεβρουάριος","Μάρτιος","Απρίλιος","Μάιος","Ιούνιος","Ιούλιος","Αύγουστος","Σεπτέμβριος","Οκτώβριος","Νοέμβριος","Δεκέμβριος"],dayOfWeekShort:["Κυρ","Δευ","Τρι","Τετ","Πεμ","Παρ","Σαβ"],dayOfWeek:["Κυριακή","Δευτέρα","Τρίτη","Τετάρτη","Πέμπτη","Παρασκευή","Σάββατο"]},de:{months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],dayOfWeekShort:["So","Mo","Di","Mi","Do","Fr","Sa"],dayOfWeek:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"]},nl:{months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],dayOfWeekShort:["zo","ma","di","wo","do","vr","za"],dayOfWeek:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"]},tr:{months:["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"],dayOfWeekShort:["Paz","Pts","Sal","Çar","Per","Cum","Cts"],dayOfWeek:["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"]},fr:{months:["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"],dayOfWeekShort:["Dim","Lun","Mar","Mer","Jeu","Ven","Sam"],dayOfWeek:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"]},es:{months:["Enero","Febrero","Marzo","Abril","Mayo","Junio","Julio","Agosto","Septiembre","Octubre","Noviembre","Diciembre"],dayOfWeekShort:["Dom","Lun","Mar","Mié","Jue","Vie","Sáb"],dayOfWeek:["Domingo","Lunes","Martes","Miércoles","Jueves","Viernes","Sábado"]},th:{months:["มกราคม","กุมภาพันธ์","มีนาคม","เมษายน","พฤษภาคม","มิถุนายน","กรกฎาคม","สิงหาคม","กันยายน","ตุลาคม","พฤศจิกายน","ธันวาคม"],dayOfWeekShort:["อา.","จ.","อ.","พ.","พฤ.","ศ.","ส."],dayOfWeek:["อาทิตย์","จันทร์","อังคาร","พุธ","พฤหัส","ศุกร์","เสาร์","อาทิตย์"]},pl:{months:["styczeń","luty","marzec","kwiecień","maj","czerwiec","lipiec","sierpień","wrzesień","październik","listopad","grudzień"],dayOfWeekShort:["nd","pn","wt","śr","cz","pt","sb"],dayOfWeek:["niedziela","poniedziałek","wtorek","środa","czwartek","piątek","sobota"]},pt:{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sab"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},ch:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"]},se:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"]},kr:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},it:{months:["Gennaio","Febbraio","Marzo","Aprile","Maggio","Giugno","Luglio","Agosto","Settembre","Ottobre","Novembre","Dicembre"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],dayOfWeek:["Domenica","Lunedì","Martedì","Mercoledì","Giovedì","Venerdì","Sabato"]},da:{months:["January","Februar","Marts","April","Maj","Juni","July","August","September","Oktober","November","December"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},no:{months:["Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember"],dayOfWeekShort:["Søn","Man","Tir","Ons","Tor","Fre","Lør"],dayOfWeek:["Søndag","Mandag","Tirsdag","Onsdag","Torsdag","Fredag","Lørdag"]},ja:{months:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeekShort:["日","月","火","水","木","金","土"],dayOfWeek:["日曜","月曜","火曜","水曜","木曜","金曜","土曜"]},vi:{months:["Tháng 1","Tháng 2","Tháng 3","Tháng 4","Tháng 5","Tháng 6","Tháng 7","Tháng 8","Tháng 9","Tháng 10","Tháng 11","Tháng 12"],dayOfWeekShort:["CN","T2","T3","T4","T5","T6","T7"],dayOfWeek:["Chủ nhật","Thứ hai","Thứ ba","Thứ tư","Thứ năm","Thứ sáu","Thứ bảy"]},sl:{months:["Januar","Februar","Marec","April","Maj","Junij","Julij","Avgust","September","Oktober","November","December"],dayOfWeekShort:["Ned","Pon","Tor","Sre","Čet","Pet","Sob"],dayOfWeek:["Nedelja","Ponedeljek","Torek","Sreda","Četrtek","Petek","Sobota"]},cs:{months:["Leden","Únor","Březen","Duben","Květen","Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"],dayOfWeekShort:["Ne","Po","Út","St","Čt","Pá","So"]},hu:{months:["Január","Február","Március","Április","Május","Június","Július","Augusztus","Szeptember","Október","November","December"],dayOfWeekShort:["Va","Hé","Ke","Sze","Cs","Pé","Szo"],dayOfWeek:["vasárnap","hétfő","kedd","szerda","csütörtök","péntek","szombat"]},az:{months:["Yanvar","Fevral","Mart","Aprel","May","Iyun","Iyul","Avqust","Sentyabr","Oktyabr","Noyabr","Dekabr"],dayOfWeekShort:["B","Be","Ça","Ç","Ca","C","Ş"],dayOfWeek:["Bazar","Bazar ertəsi","Çərşənbə axşamı","Çərşənbə","Cümə axşamı","Cümə","Şənbə"]},bs:{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ca:{months:["Gener","Febrer","Març","Abril","Maig","Juny","Juliol","Agost","Setembre","Octubre","Novembre","Desembre"],dayOfWeekShort:["Dg","Dl","Dt","Dc","Dj","Dv","Ds"],dayOfWeek:["Diumenge","Dilluns","Dimarts","Dimecres","Dijous","Divendres","Dissabte"]},"en-GB":{months:["January","February","March","April","May","June","July","August","September","October","November","December"],dayOfWeekShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},et:{months:["Jaanuar","Veebruar","Märts","Aprill","Mai","Juuni","Juuli","August","September","Oktoober","November","Detsember"],dayOfWeekShort:["P","E","T","K","N","R","L"],dayOfWeek:["Pühapäev","Esmaspäev","Teisipäev","Kolmapäev","Neljapäev","Reede","Laupäev"]},eu:{months:["Urtarrila","Otsaila","Martxoa","Apirila","Maiatza","Ekaina","Uztaila","Abuztua","Iraila","Urria","Azaroa","Abendua"],dayOfWeekShort:["Ig.","Al.","Ar.","Az.","Og.","Or.","La."],dayOfWeek:["Igandea","Astelehena","Asteartea","Asteazkena","Osteguna","Ostirala","Larunbata"]},fi:{months:["Tammikuu","Helmikuu","Maaliskuu","Huhtikuu","Toukokuu","Kesäkuu","Heinäkuu","Elokuu","Syyskuu","Lokakuu","Marraskuu","Joulukuu"],dayOfWeekShort:["Su","Ma","Ti","Ke","To","Pe","La"],dayOfWeek:["sunnuntai","maanantai","tiistai","keskiviikko","torstai","perjantai","lauantai"]},gl:{months:["Xan","Feb","Maz","Abr","Mai","Xun","Xul","Ago","Set","Out","Nov","Dec"],dayOfWeekShort:["Dom","Lun","Mar","Mer","Xov","Ven","Sab"],dayOfWeek:["Domingo","Luns","Martes","Mércores","Xoves","Venres","Sábado"]},hr:{months:["Siječanj","Veljača","Ožujak","Travanj","Svibanj","Lipanj","Srpanj","Kolovoz","Rujan","Listopad","Studeni","Prosinac"],dayOfWeekShort:["Ned","Pon","Uto","Sri","Čet","Pet","Sub"],dayOfWeek:["Nedjelja","Ponedjeljak","Utorak","Srijeda","Četvrtak","Petak","Subota"]},ko:{months:["1월","2월","3월","4월","5월","6월","7월","8월","9월","10월","11월","12월"],dayOfWeekShort:["일","월","화","수","목","금","토"],dayOfWeek:["일요일","월요일","화요일","수요일","목요일","금요일","토요일"]},lt:{months:["Sausio","Vasario","Kovo","Balandžio","Gegužės","Birželio","Liepos","Rugpjūčio","Rugsėjo","Spalio","Lapkričio","Gruodžio"],dayOfWeekShort:["Sek","Pir","Ant","Tre","Ket","Pen","Šeš"],dayOfWeek:["Sekmadienis","Pirmadienis","Antradienis","Trečiadienis","Ketvirtadienis","Penktadienis","Šeštadienis"]},lv:{months:["Janvāris","Februāris","Marts","Aprīlis ","Maijs","Jūnijs","Jūlijs","Augusts","Septembris","Oktobris","Novembris","Decembris"],dayOfWeekShort:["Sv","Pr","Ot","Tr","Ct","Pk","St"],dayOfWeek:["Svētdiena","Pirmdiena","Otrdiena","Trešdiena","Ceturtdiena","Piektdiena","Sestdiena"]},mk:{months:["јануари","февруари","март","април","мај","јуни","јули","август","септември","октомври","ноември","декември"],dayOfWeekShort:["нед","пон","вто","сре","чет","пет","саб"],dayOfWeek:["Недела","Понеделник","Вторник","Среда","Четврток","Петок","Сабота"]},mn:{months:["1-р сар","2-р сар","3-р сар","4-р сар","5-р сар","6-р сар","7-р сар","8-р сар","9-р сар","10-р сар","11-р сар","12-р сар"],dayOfWeekShort:["Дав","Мяг","Лха","Пүр","Бсн","Бям","Ням"],dayOfWeek:["Даваа","Мягмар","Лхагва","Пүрэв","Баасан","Бямба","Ням"]},"pt-BR":{months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],dayOfWeekShort:["Dom","Seg","Ter","Qua","Qui","Sex","Sáb"],dayOfWeek:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"]},sk:{months:["Január","Február","Marec","Apríl","Máj","Jún","Júl","August","September","Október","November","December"],dayOfWeekShort:["Ne","Po","Ut","St","Št","Pi","So"],dayOfWeek:["Nedeľa","Pondelok","Utorok","Streda","Štvrtok","Piatok","Sobota"]},sq:{months:["Janar","Shkurt","Mars","Prill","Maj","Qershor","Korrik","Gusht","Shtator","Tetor","Nëntor","Dhjetor"],dayOfWeekShort:["Die","Hën","Mar","Mër","Enj","Pre","Shtu"],dayOfWeek:["E Diel","E Hënë","E Martē","E Mërkurë","E Enjte","E Premte","E Shtunë"]},"sr-YU":{months:["Januar","Februar","Mart","April","Maj","Jun","Jul","Avgust","Septembar","Oktobar","Novembar","Decembar"],dayOfWeekShort:["Ned","Pon","Uto","Sre","čet","Pet","Sub"],dayOfWeek:["Nedelja","Ponedeljak","Utorak","Sreda","Četvrtak","Petak","Subota"]},sr:{months:["јануар","фебруар","март","април","мај","јун","јул","август","септембар","октобар","новембар","децембар"],dayOfWeekShort:["нед","пон","уто","сре","чет","пет","суб"],dayOfWeek:["Недеља","Понедељак","Уторак","Среда","Четвртак","Петак","Субота"]},sv:{months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],dayOfWeekShort:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],dayOfWeek:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"]},"zh-TW":{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},zh:{months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],dayOfWeekShort:["日","一","二","三","四","五","六"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"]},he:{months:["ינואר","פברואר","מרץ","אפריל","מאי","יוני","יולי","אוגוסט","ספטמבר","אוקטובר","נובמבר","דצמבר"],dayOfWeekShort:["א'","ב'","ג'","ד'","ה'","ו'","שבת"],dayOfWeek:["ראשון","שני","שלישי","רביעי","חמישי","שישי","שבת","ראשון"]},hy:{months:["Հունվար","Փետրվար","Մարտ","Ապրիլ","Մայիս","Հունիս","Հուլիս","Օգոստոս","Սեպտեմբեր","Հոկտեմբեր","Նոյեմբեր","Դեկտեմբեր"],dayOfWeekShort:["Կի","Երկ","Երք","Չոր","Հնգ","Ուրբ","Շբթ"],dayOfWeek:["Կիրակի","Երկուշաբթի","Երեքշաբթի","Չորեքշաբթի","Հինգշաբթի","Ուրբաթ","Շաբաթ"]},kg:{months:["Үчтүн айы","Бирдин айы","Жалган Куран","Чын Куран","Бугу","Кулжа","Теке","Баш Оона","Аяк Оона","Тогуздун айы","Жетинин айы","Бештин айы"],dayOfWeekShort:["Жек","Дүй","Шей","Шар","Бей","Жум","Ише"],dayOfWeek:["Жекшемб","Дүйшөмб","Шейшемб","Шаршемб","Бейшемби","Жума","Ишенб"]}},value:"",rtl:!1,format:"Y/m/d H:i",formatTime:"H:i",formatDate:"Y/m/d",startDate:!1,step:60,monthChangeSpinner:!0,closeOnDateSelect:!1,closeOnTimeSelect:!0,closeOnWithoutClick:!0,closeOnInputClick:!0,timepicker:!0,datepicker:!0,weeks:!1,defaultTime:!1,defaultDate:!1,minDate:!1,maxDate:!1,minTime:!1,maxTime:!1,disabledMinTime:!1,disabledMaxTime:!1,allowTimes:[],opened:!1,initTime:!0,inline:!1,theme:"",onSelectDate:function(){},onSelectTime:function(){},onChangeMonth:function(){},onChangeYear:function(){},onChangeDateTime:function(){},onShow:function(){},onClose:function(){},onGenerate:function(){},withoutCopyright:!0,inverseButton:!1,hours12:!1,next:"xdsoft_next",prev:"xdsoft_prev",dayOfWeekStart:0,parentID:"body",timeHeightInTimePicker:25,timepickerScrollbar:!0,todayButton:!0,prevButton:!0,nextButton:!0,defaultSelect:!0,scrollMonth:!0,scrollTime:!0,scrollInput:!0,lazyInit:!1,mask:!1,validateOnBlur:!0,allowBlank:!0,yearStart:1950,yearEnd:2050,monthStart:0,monthEnd:11,style:"",id:"",fixed:!1,roundTime:"round",className:"",weekends:[],highlightedDates:[],highlightedPeriods:[],disabledDates:[],disabledWeekDays:[],yearOffset:0,beforeShowDay:null,enterLikeTab:!0,showApplyButton:!1},a="en",r="en";e.datetimepicker={setLocale:function(e){r=t.i18n[e]?e:a,Date.monthNames=t.i18n[r].months,Date.dayNames=t.i18n[r].dayOfWeek}},window.getComputedStyle||(window.getComputedStyle=function(e){return this.el=e,this.getPropertyValue=function(t){var a=/(\-([a-z]){1})/g;return"float"===t&&(t="styleFloat"),a.test(t)&&(t=t.replace(a,function(e,t,a){return a.toUpperCase()})),e.currentStyle[t]||null},this}),Array.prototype.indexOf||(Array.prototype.indexOf=function(e,t){var a,r;for(a=t||0,r=this.length;r>a;a+=1)if(this[a]===e)return a;return-1}),Date.prototype.countDaysInMonth=function(){return new Date(this.getFullYear(),this.getMonth()+1,0).getDate()},e.fn.xdsoftScroller=function(t){return this.each(function(){var n,o,s,d,f,a=e(this),r=function(e){var a,t={x:0,y:0};return"touchstart"===e.type||"touchmove"===e.type||"touchend"===e.type||"touchcancel"===e.type?(a=e.originalEvent.touches[0]||e.originalEvent.changedTouches[0],t.x=a.clientX,t.y=a.clientY):("mousedown"===e.type||"mouseup"===e.type||"mousemove"===e.type||"mouseover"===e.type||"mouseout"===e.type||"mouseenter"===e.type||"mouseleave"===e.type)&&(t.x=e.clientX,t.y=e.clientY),t},u=100,l=!1,m=0,c=0,h=0,g=!1,p=0,k=function(){};return"hide"===t?void a.find(".xdsoft_scrollbar").hide():(e(this).hasClass("xdsoft_scroller_box")||(n=a.children().eq(0),o=a[0].clientHeight,s=n[0].offsetHeight,d=e('<div class="xdsoft_scrollbar"></div>'),f=e('<div class="xdsoft_scroller"></div>'),d.append(f),a.addClass("xdsoft_scroller_box").append(d),k=function(e){var t=r(e).y-m+p;0>t&&(t=0),t+f[0].offsetHeight>h&&(t=h-f[0].offsetHeight),a.trigger("scroll_element.xdsoft_scroller",[u?t/u:0])},f.on("touchstart.xdsoft_scroller mousedown.xdsoft_scroller",function(i){o||a.trigger("resize_scroll.xdsoft_scroller",[t]),m=r(i).y,p=parseInt(f.css("margin-top"),10),h=d[0].offsetHeight,"mousedown"===i.type?(document&&e(document.body).addClass("xdsoft_noselect"),e([document.body,window]).on("mouseup.xdsoft_scroller",function n(){e([document.body,window]).off("mouseup.xdsoft_scroller",n).off("mousemove.xdsoft_scroller",k).removeClass("xdsoft_noselect")}),e(document.body).on("mousemove.xdsoft_scroller",k)):(g=!0,i.stopPropagation(),i.preventDefault())}).on("touchmove",function(e){g&&(e.preventDefault(),k(e))}).on("touchend touchcancel",function(){g=!1,p=0}),a.on("scroll_element.xdsoft_scroller",function(e,t){o||a.trigger("resize_scroll.xdsoft_scroller",[t,!0]),t=t>1?1:0>t||isNaN(t)?0:t,f.css("margin-top",u*t),setTimeout(function(){n.css("marginTop",-parseInt((n[0].offsetHeight-o)*t,10))},10)}).on("resize_scroll.xdsoft_scroller",function(e,t,r){var i,l;o=a[0].clientHeight,s=n[0].offsetHeight,i=o/s,l=i*d[0].offsetHeight,i>1?f.hide():(f.show(),f.css("height",parseInt(l>10?l:10,10)),u=d[0].offsetHeight-f[0].offsetHeight,r!==!0&&a.trigger("scroll_element.xdsoft_scroller",[t||Math.abs(parseInt(n.css("marginTop"),10))/(s-o)]))}),a.on("mousewheel",function(e){var t=Math.abs(parseInt(n.css("marginTop"),10));return t-=20*e.deltaY,0>t&&(t=0),a.trigger("scroll_element.xdsoft_scroller",[t/(s-o)]),e.stopPropagation(),!1}),a.on("touchstart",function(e){l=r(e),c=Math.abs(parseInt(n.css("marginTop"),10))}),a.on("touchmove",function(e){if(l){e.preventDefault();var t=r(e);a.trigger("scroll_element.xdsoft_scroller",[(c-(t.y-l.y))/(s-o)])}}),a.on("touchend touchcancel",function(){l=!1,c=0})),void a.trigger("resize_scroll.xdsoft_scroller",[t]))})},e.fn.datetimepicker=function(a){var _,W,n=48,o=57,s=96,d=105,f=17,u=46,l=13,m=27,c=8,h=37,g=38,p=39,k=40,y=9,x=116,b=65,v=67,T=86,D=90,S=89,O=!1,w=e.isPlainObject(a)||!a?e.extend(!0,{},t,a):e.extend(!0,{},t),M=0,F=function(e){e.on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function t(){e.is(":disabled")||e.data("xdsoft_datetimepicker")||(clearTimeout(M),M=setTimeout(function(){e.data("xdsoft_datetimepicker")||_(e),e.off("open.xdsoft focusin.xdsoft mousedown.xdsoft",t).trigger("open.xdsoft")},100))})};return _=function(t){function K(){var a,e=!1;return w.startDate?e=R.strToDate(w.startDate):(e=w.value||(t&&t.val&&t.val()?t.val():""),e?e=R.strToDateTime(e):w.defaultDate&&(e=R.strToDateTime(w.defaultDate),w.defaultTime&&(a=R.strtotime(w.defaultTime),e.setHours(a.getHours()),e.setMinutes(a.getMinutes())))),e&&R.isValidDate(e)?M.data("changed",!0):e="",e||0}var I,Y,L,V,B,R,M=e('<div class="xdsoft_datetimepicker xdsoft_noselect"></div>'),_=e('<div class="xdsoft_copyright"><a target="_blank" href="http://xdsoft.net/jqplugins/datetimepicker/">xdsoft.net</a></div>'),W=e('<div class="xdsoft_datepicker active"></div>'),F=e('<div class="xdsoft_mounthpicker"><button type="button" class="xdsoft_prev"></button><button type="button" class="xdsoft_today_button"></button><div class="xdsoft_label xdsoft_month"><span></span><i></i></div><div class="xdsoft_label xdsoft_year"><span></span><i></i></div><button type="button" class="xdsoft_next"></button></div>'),C=e('<div class="xdsoft_calendar"></div>'),A=e('<div class="xdsoft_timepicker active"><button type="button" class="xdsoft_prev"></button><div class="xdsoft_time_box"></div><button type="button" class="xdsoft_next"></button></div>'),P=A.find(".xdsoft_time_box").eq(0),J=e('<div class="xdsoft_time_variant"></div>'),j=e('<button type="button" class="xdsoft_save_selected blue-gradient-button">Save Selected</button>'),z=e('<div class="xdsoft_select xdsoft_monthselect"><div></div></div>'),N=e('<div class="xdsoft_select xdsoft_yearselect"><div></div></div>'),H=!1,E=0,q=0;w.id&&M.attr("id",w.id),w.style&&M.attr("style",w.style),w.weeks&&M.addClass("xdsoft_showweeks"),w.rtl&&M.addClass("xdsoft_rtl"),M.addClass("xdsoft_"+w.theme),M.addClass(w.className),F.find(".xdsoft_month span").after(z),F.find(".xdsoft_year span").after(N),F.find(".xdsoft_month,.xdsoft_year").on("mousedown.xdsoft",function(t){var o,s,a=e(this).find(".xdsoft_select").eq(0),r=0,i=0,n=a.is(":visible");for(F.find(".xdsoft_select").hide(),R.currentTime&&(r=R.currentTime[e(this).hasClass("xdsoft_month")?"getMonth":"getFullYear"]()),a[n?"hide":"show"](),o=a.find("div.xdsoft_option"),s=0;s<o.length&&o.eq(s).data("value")!==r;s+=1)i+=o[0].offsetHeight;return a.xdsoftScroller(i/(a.children()[0].offsetHeight-a[0].clientHeight)),t.stopPropagation(),!1}),F.find(".xdsoft_select").xdsoftScroller().on("mousedown.xdsoft",function(e){e.stopPropagation(),e.preventDefault()}).on("mousedown.xdsoft",".xdsoft_option",function(){(void 0===R.currentTime||null===R.currentTime)&&(R.currentTime=R.now());var a=R.currentTime.getFullYear();R&&R.currentTime&&R.currentTime[e(this).parent().parent().hasClass("xdsoft_monthselect")?"setMonth":"setFullYear"](e(this).data("value")),e(this).parent().parent().hide(),M.trigger("xchange.xdsoft"),w.onChangeMonth&&e.isFunction(w.onChangeMonth)&&w.onChangeMonth.call(M,R.currentTime,M.data("input")),a!==R.currentTime.getFullYear()&&e.isFunction(w.onChangeYear)&&w.onChangeYear.call(M,R.currentTime,M.data("input"))}),M.setOptions=function(a){var r={},_=function(e){try{if(document.selection&&document.selection.createRange){var t=document.selection.createRange();return t.getBookmark().charCodeAt(2)-2}if(e.setSelectionRange)return e.selectionStart}catch(a){return 0}},C=function(e,t){if(e="string"==typeof e||e instanceof String?document.getElementById(e):e,!e)return!1;if(e.createTextRange){var a=e.createTextRange();return a.collapse(!0),a.moveEnd("character",t),a.moveStart("character",t),a.select(),!0}return e.setSelectionRange?(e.setSelectionRange(t,t),!0):!1},J=function(e,t){var a=e.replace(/([\[\]\/\{\}\(\)\-\.\+]{1})/g,"\\$1").replace(/_/g,"{digit+}").replace(/([0-9]{1})/g,"{digit$1}").replace(/\{digit([0-9]{1})\}/g,"[0-$1_]{1}").replace(/\{digit[\+]\}/g,"[0-9_]{1}");return new RegExp(a).test(t)};w=e.extend(!0,{},w,a),a.allowTimes&&e.isArray(a.allowTimes)&&a.allowTimes.length&&(w.allowTimes=e.extend(!0,[],a.allowTimes)),a.weekends&&e.isArray(a.weekends)&&a.weekends.length&&(w.weekends=e.extend(!0,[],a.weekends)),a.highlightedDates&&e.isArray(a.highlightedDates)&&a.highlightedDates.length&&(e.each(a.highlightedDates,function(t,a){var o,n=e.map(a.split(","),e.trim),s=new i(Date.parseDate(n[0],w.formatDate),n[1],n[2]),d=s.date.dateFormat(w.formatDate);void 0!==r[d]?(o=r[d].desc,o&&o.length&&s.desc&&s.desc.length&&(r[d].desc=o+"\n"+s.desc)):r[d]=s}),w.highlightedDates=e.extend(!0,[],r)),a.highlightedPeriods&&e.isArray(a.highlightedPeriods)&&a.highlightedPeriods.length&&(r=e.extend(!0,[],w.highlightedDates),e.each(a.highlightedPeriods,function(t,a){var n,o,s,d,f,u,l;if(e.isArray(a))n=a[0],o=a[1],s=a[2],l=a[3];else{var m=e.map(a.split(","),e.trim);n=Date.parseDate(m[0],w.formatDate),o=Date.parseDate(m[1],w.formatDate),s=m[2],l=m[3]}for(;o>=n;)d=new i(n,s,l),f=n.dateFormat(w.formatDate),n.setDate(n.getDate()+1),void 0!==r[f]?(u=r[f].desc,u&&u.length&&d.desc&&d.desc.length&&(r[f].desc=u+"\n"+d.desc)):r[f]=d}),w.highlightedDates=e.extend(!0,[],r)),a.disabledDates&&e.isArray(a.disabledDates)&&a.disabledDates.length&&(w.disabledDates=e.extend(!0,[],a.disabledDates)),a.disabledWeekDays&&e.isArray(a.disabledWeekDays)&&a.disabledWeekDays.length&&(w.disabledWeekDays=e.extend(!0,[],a.disabledWeekDays)),!w.open&&!w.opened||w.inline||t.trigger("open.xdsoft"),w.inline&&(H=!0,M.addClass("xdsoft_inline"),t.after(M).hide()),w.inverseButton&&(w.next="xdsoft_prev",w.prev="xdsoft_next"),w.datepicker?W.addClass("active"):W.removeClass("active"),w.timepicker?A.addClass("active"):A.removeClass("active"),w.value&&(R.setCurrentTime(w.value),t&&t.val&&t.val(R.str)),w.dayOfWeekStart=isNaN(w.dayOfWeekStart)?0:parseInt(w.dayOfWeekStart,10)%7,w.timepickerScrollbar||P.xdsoftScroller("hide"),w.minDate&&/^[\+\-](.*)$/.test(w.minDate)&&(w.minDate=R.strToDateTime(w.minDate).dateFormat(w.formatDate)),w.maxDate&&/^[\+\-](.*)$/.test(w.maxDate)&&(w.maxDate=R.strToDateTime(w.maxDate).dateFormat(w.formatDate)),j.toggle(w.showApplyButton),F.find(".xdsoft_today_button").css("visibility",w.todayButton?"visible":"hidden"),F.find("."+w.prev).css("visibility",w.prevButton?"visible":"hidden"),F.find("."+w.next).css("visibility",w.nextButton?"visible":"hidden"),w.mask&&(t.off("keydown.xdsoft"),w.mask===!0&&(w.mask=w.format.replace(/Y/g,"9999").replace(/F/g,"9999").replace(/m/g,"19").replace(/d/g,"39").replace(/H/g,"29").replace(/i/g,"59").replace(/s/g,"59")),"string"===e.type(w.mask)&&(J(w.mask,t.val())||t.val(w.mask.replace(/[0-9]/g,"_")),t.on("keydown.xdsoft",function(a){var M,W,r=this.value,i=a.which;if(i>=n&&o>=i||i>=s&&d>=i||i===c||i===u){for(M=_(this),W=i!==c&&i!==u?String.fromCharCode(i>=s&&d>=i?i-n:i):"_",i!==c&&i!==u||!M||(M-=1,W="_");/[^0-9_]/.test(w.mask.substr(M,1))&&M<w.mask.length&&M>0;)M+=i===c||i===u?-1:1;if(r=r.substr(0,M)+W+r.substr(M+1),""===e.trim(r))r=w.mask.replace(/[0-9]/g,"_");else if(M===w.mask.length)return a.preventDefault(),!1;for(M+=i===c||i===u?0:1;/[^0-9_]/.test(w.mask.substr(M,1))&&M<w.mask.length&&M>0;)M+=i===c||i===u?-1:1;J(w.mask,r)?(this.value=r,C(this,M)):""===e.trim(r)?this.value=w.mask.replace(/[0-9]/g,"_"):t.trigger("error_input.xdsoft")}else if(-1!==[b,v,T,D,S].indexOf(i)&&O||-1!==[m,g,k,h,p,x,f,y,l].indexOf(i))return!0;return a.preventDefault(),!1}))),w.validateOnBlur&&t.off("blur.xdsoft").on("blur.xdsoft",function(){if(w.allowBlank&&!e.trim(e(this).val()).length)e(this).val(null),M.data("xdsoft_datetime").empty();else if(Date.parseDate(e(this).val(),w.format))M.data("xdsoft_datetime").setCurrentTime(e(this).val());else{var t=+[e(this).val()[0],e(this).val()[1]].join(""),a=+[e(this).val()[2],e(this).val()[3]].join("");e(this).val(!w.datepicker&&w.timepicker&&t>=0&&24>t&&a>=0&&60>a?[t,a].map(function(e){return e>9?e:"0"+e}).join(":"):R.now().dateFormat(w.format)),M.data("xdsoft_datetime").setCurrentTime(e(this).val())}M.trigger("changedatetime.xdsoft")}),w.dayOfWeekStartPrev=0===w.dayOfWeekStart?6:w.dayOfWeekStart-1,M.trigger("xchange.xdsoft").trigger("afterOpen.xdsoft")},M.data("options",w).on("mousedown.xdsoft",function(e){return e.stopPropagation(),e.preventDefault(),N.hide(),z.hide(),!1}),P.append(J),P.xdsoftScroller(),M.on("afterOpen.xdsoft",function(){P.xdsoftScroller()}),M.append(W).append(A),w.withoutCopyright!==!0&&M.append(_),W.append(F).append(C).append(j),e(w.parentID).append(M),I=function(){var t=this;t.now=function(e){var r,i,a=new Date;return!e&&w.defaultDate&&(r=t.strToDateTime(w.defaultDate),a.setFullYear(r.getFullYear()),a.setMonth(r.getMonth()),a.setDate(r.getDate())),w.yearOffset&&a.setFullYear(a.getFullYear()+w.yearOffset),!e&&w.defaultTime&&(i=t.strtotime(w.defaultTime),a.setHours(i.getHours()),a.setMinutes(i.getMinutes())),a},t.isValidDate=function(e){return"[object Date]"!==Object.prototype.toString.call(e)?!1:!isNaN(e.getTime())},t.setCurrentTime=function(e){t.currentTime="string"==typeof e?t.strToDateTime(e):t.isValidDate(e)?e:t.now(),M.trigger("xchange.xdsoft")},t.empty=function(){t.currentTime=null},t.getCurrentTime=function(){return t.currentTime},t.nextMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var r,a=t.currentTime.getMonth()+1;return 12===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()+1),a=0),r=t.currentTime.getFullYear(),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),w.onChangeMonth&&e.isFunction(w.onChangeMonth)&&w.onChangeMonth.call(M,R.currentTime,M.data("input")),r!==t.currentTime.getFullYear()&&e.isFunction(w.onChangeYear)&&w.onChangeYear.call(M,R.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),a},t.prevMonth=function(){(void 0===t.currentTime||null===t.currentTime)&&(t.currentTime=t.now());var a=t.currentTime.getMonth()-1;return-1===a&&(t.currentTime.setFullYear(t.currentTime.getFullYear()-1),a=11),t.currentTime.setDate(Math.min(new Date(t.currentTime.getFullYear(),a+1,0).getDate(),t.currentTime.getDate())),t.currentTime.setMonth(a),w.onChangeMonth&&e.isFunction(w.onChangeMonth)&&w.onChangeMonth.call(M,R.currentTime,M.data("input")),M.trigger("xchange.xdsoft"),a},t.getWeekOfYear=function(e){var t=new Date(e.getFullYear(),0,1);return Math.ceil(((e-t)/864e5+t.getDay()+1)/7)},t.strToDateTime=function(e){var r,i,a=[];return e&&e instanceof Date&&t.isValidDate(e)?e:(a=/^(\+|\-)(.*)$/.exec(e),a&&(a[2]=Date.parseDate(a[2],w.formatDate)),a&&a[2]?(r=a[2].getTime()-6e4*a[2].getTimezoneOffset(),i=new Date(t.now(!0).getTime()+parseInt(a[1]+"1",10)*r)):i=e?Date.parseDate(e,w.format):t.now(),t.isValidDate(i)||(i=t.now()),i)},t.strToDate=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?Date.parseDate(e,w.formatDate):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.strtotime=function(e){if(e&&e instanceof Date&&t.isValidDate(e))return e;var a=e?Date.parseDate(e,w.formatTime):t.now(!0);return t.isValidDate(a)||(a=t.now(!0)),a},t.str=function(){return t.currentTime.dateFormat(w.format)},t.currentTime=this.now()},R=new I,j.on("click",function(e){e.preventDefault(),M.data("changed",!0),R.setCurrentTime(K()),t.val(R.str()),M.trigger("close.xdsoft")}),F.find(".xdsoft_today_button").on("mousedown.xdsoft",function(){M.data("changed",!0),R.setCurrentTime(0),M.trigger("afterOpen.xdsoft")}).on("dblclick.xdsoft",function(){var a,r,e=R.getCurrentTime();e=new Date(e.getFullYear(),e.getMonth(),e.getDate()),a=R.strToDate(w.minDate),a=new Date(a.getFullYear(),a.getMonth(),a.getDate()),a>e||(r=R.strToDate(w.maxDate),r=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e>r||(t.val(R.str()),t.trigger("change"),M.trigger("close.xdsoft")))}),F.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),a=0,r=!1;!function i(e){t.hasClass(w.next)?R.nextMonth():t.hasClass(w.prev)&&R.prevMonth(),w.monthChangeSpinner&&(r||(a=setTimeout(i,e||100)))}(500),e([document.body,window]).on("mouseup.xdsoft",function n(){clearTimeout(a),r=!0,e([document.body,window]).off("mouseup.xdsoft",n)})}),A.find(".xdsoft_prev,.xdsoft_next").on("mousedown.xdsoft",function(){var t=e(this),a=0,r=!1,i=110;!function n(e){var o=P[0].clientHeight,s=J[0].offsetHeight,d=Math.abs(parseInt(J.css("marginTop"),10));t.hasClass(w.next)&&s-o-w.timeHeightInTimePicker>=d?J.css("marginTop","-"+(d+w.timeHeightInTimePicker)+"px"):t.hasClass(w.prev)&&d-w.timeHeightInTimePicker>=0&&J.css("marginTop","-"+(d-w.timeHeightInTimePicker)+"px"),P.trigger("scroll_element.xdsoft_scroller",[Math.abs(parseInt(J.css("marginTop"),10)/(s-o))]),i=i>10?10:i-10,r||(a=setTimeout(n,e||i))}(500),e([document.body,window]).on("mouseup.xdsoft",function o(){clearTimeout(a),r=!0,e([document.body,window]).off("mouseup.xdsoft",o)})}),Y=0,M.on("xchange.xdsoft",function(t){clearTimeout(Y),Y=setTimeout(function(){(void 0===R.currentTime||null===R.currentTime)&&(R.currentTime=R.now());for(var o,u,l,m,c,h,g,k,v,T,t="",i=new Date(R.currentTime.getFullYear(),R.currentTime.getMonth(),1,12,0,0),n=0,s=R.now(),d=!1,f=!1,p=[],y=!0,x="",b="";i.getDay()!==w.dayOfWeekStart;)i.setDate(i.getDate()-1);for(t+="<table><thead><tr>",w.weeks&&(t+="<th></th>"),o=0;7>o;o+=1)t+="<th>"+w.i18n[r].dayOfWeekShort[(o+w.dayOfWeekStart)%7]+"</th>"; for(t+="</tr></thead>",t+="<tbody>",w.maxDate!==!1&&(d=R.strToDate(w.maxDate),d=new Date(d.getFullYear(),d.getMonth(),d.getDate(),23,59,59,999)),w.minDate!==!1&&(f=R.strToDate(w.minDate),f=new Date(f.getFullYear(),f.getMonth(),f.getDate()));n<R.currentTime.countDaysInMonth()||i.getDay()!==w.dayOfWeekStart||R.currentTime.getMonth()===i.getMonth();)p=[],n+=1,l=i.getDay(),m=i.getDate(),c=i.getFullYear(),h=i.getMonth(),g=R.getWeekOfYear(i),T="",p.push("xdsoft_date"),k=w.beforeShowDay&&e.isFunction(w.beforeShowDay.call)?w.beforeShowDay.call(M,i):null,d!==!1&&i>d||f!==!1&&f>i||k&&k[0]===!1?p.push("xdsoft_disabled"):-1!==w.disabledDates.indexOf(i.dateFormat(w.formatDate))?p.push("xdsoft_disabled"):-1!==w.disabledWeekDays.indexOf(l)&&p.push("xdsoft_disabled"),k&&""!==k[1]&&p.push(k[1]),R.currentTime.getMonth()!==h&&p.push("xdsoft_other_month"),(w.defaultSelect||M.data("changed"))&&R.currentTime.dateFormat(w.formatDate)===i.dateFormat(w.formatDate)&&p.push("xdsoft_current"),s.dateFormat(w.formatDate)===i.dateFormat(w.formatDate)&&p.push("xdsoft_today"),(0===i.getDay()||6===i.getDay()||-1!==w.weekends.indexOf(i.dateFormat(w.formatDate)))&&p.push("xdsoft_weekend"),void 0!==w.highlightedDates[i.dateFormat(w.formatDate)]&&(u=w.highlightedDates[i.dateFormat(w.formatDate)],p.push(void 0===u.style?"xdsoft_highlighted_default":u.style),T=void 0===u.desc?"":u.desc),w.beforeShowDay&&e.isFunction(w.beforeShowDay)&&p.push(w.beforeShowDay(i)),y&&(t+="<tr>",y=!1,w.weeks&&(t+="<th>"+g+"</th>")),t+='<td data-date="'+m+'" data-month="'+h+'" data-year="'+c+'" class="xdsoft_date xdsoft_day_of_week'+i.getDay()+" "+p.join(" ")+'" title="'+T+'"><div>'+m+"</div></td>",i.getDay()===w.dayOfWeekStartPrev&&(t+="</tr>",y=!0),i.setDate(m+1);if(t+="</tbody></table>",C.html(t),F.find(".xdsoft_label span").eq(0).text(w.i18n[r].months[R.currentTime.getMonth()]),F.find(".xdsoft_label span").eq(1).text(R.currentTime.getFullYear()),x="",b="",h="",v=function(t,a){var i,n,r=R.now(),o=w.allowTimes&&e.isArray(w.allowTimes)&&w.allowTimes.length;r.setHours(t),t=parseInt(r.getHours(),10),r.setMinutes(a),a=parseInt(r.getMinutes(),10),i=new Date(R.currentTime),i.setHours(t),i.setMinutes(a),p=[],(w.minDateTime!==!1&&w.minDateTime>i||w.maxTime!==!1&&R.strtotime(w.maxTime).getTime()<r.getTime()||w.minTime!==!1&&R.strtotime(w.minTime).getTime()>r.getTime())&&p.push("xdsoft_disabled"),(w.minDateTime!==!1&&w.minDateTime>i||w.disabledMinTime!==!1&&r.getTime()>R.strtotime(w.disabledMinTime).getTime()&&w.disabledMaxTime!==!1&&r.getTime()<R.strtotime(w.disabledMaxTime).getTime())&&p.push("xdsoft_disabled"),n=new Date(R.currentTime),n.setHours(parseInt(R.currentTime.getHours(),10)),o||n.setMinutes(Math[w.roundTime](R.currentTime.getMinutes()/w.step)*w.step),(w.initTime||w.defaultSelect||M.data("changed"))&&n.getHours()===parseInt(t,10)&&(!o&&w.step>59||n.getMinutes()===parseInt(a,10))&&(w.defaultSelect||M.data("changed")?p.push("xdsoft_current"):w.initTime&&p.push("xdsoft_init_time")),parseInt(s.getHours(),10)===parseInt(t,10)&&parseInt(s.getMinutes(),10)===parseInt(a,10)&&p.push("xdsoft_today"),x+='<div class="xdsoft_time '+p.join(" ")+'" data-hour="'+t+'" data-minute="'+a+'">'+r.dateFormat(w.formatTime)+"</div>"},w.allowTimes&&e.isArray(w.allowTimes)&&w.allowTimes.length)for(n=0;n<w.allowTimes.length;n+=1)b=R.strtotime(w.allowTimes[n]).getHours(),h=R.strtotime(w.allowTimes[n]).getMinutes(),v(b,h);else for(n=0,o=0;n<(w.hours12?12:24);n+=1)for(o=0;60>o;o+=w.step)b=(10>n?"0":"")+n,h=(10>o?"0":"")+o,v(b,h);for(J.html(x),a="",n=0,n=parseInt(w.yearStart,10)+w.yearOffset;n<=parseInt(w.yearEnd,10)+w.yearOffset;n+=1)a+='<div class="xdsoft_option '+(R.currentTime.getFullYear()===n?"xdsoft_current":"")+'" data-value="'+n+'">'+n+"</div>";for(N.children().eq(0).html(a),n=parseInt(w.monthStart,10),a="";n<=parseInt(w.monthEnd,10);n+=1)a+='<div class="xdsoft_option '+(R.currentTime.getMonth()===n?"xdsoft_current":"")+'" data-value="'+n+'">'+w.i18n[r].months[n]+"</div>";z.children().eq(0).html(a),e(M).trigger("generate.xdsoft")},10),t.stopPropagation()}).on("afterOpen.xdsoft",function(){if(w.timepicker){var e,t,a,r;J.find(".xdsoft_current").length?e=".xdsoft_current":J.find(".xdsoft_init_time").length&&(e=".xdsoft_init_time"),e?(t=P[0].clientHeight,a=J[0].offsetHeight,r=J.find(e).index()*w.timeHeightInTimePicker+1,r>a-t&&(r=a-t),P.trigger("scroll_element.xdsoft_scroller",[parseInt(r,10)/(a-t)])):P.trigger("scroll_element.xdsoft_scroller",[0])}}),L=0,C.on("click.xdsoft","td",function(a){a.stopPropagation(),L+=1;var r=e(this),i=R.currentTime;return(void 0===i||null===i)&&(R.currentTime=R.now(),i=R.currentTime),r.hasClass("xdsoft_disabled")?!1:(i.setDate(1),i.setFullYear(r.data("year")),i.setMonth(r.data("month")),i.setDate(r.data("date")),M.trigger("select.xdsoft",[i]),t.val(R.str()),w.onSelectDate&&e.isFunction(w.onSelectDate)&&w.onSelectDate.call(M,R.currentTime,M.data("input"),a),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),(L>1||w.closeOnDateSelect===!0||w.closeOnDateSelect===!1&&!w.timepicker)&&!w.inline&&M.trigger("close.xdsoft"),void setTimeout(function(){L=0},200))}),J.on("click.xdsoft","div",function(t){t.stopPropagation();var a=e(this),r=R.currentTime;return(void 0===r||null===r)&&(R.currentTime=R.now(),r=R.currentTime),a.hasClass("xdsoft_disabled")?!1:(r.setHours(a.data("hour")),r.setMinutes(a.data("minute")),M.trigger("select.xdsoft",[r]),M.data("input").val(R.str()),w.onSelectTime&&e.isFunction(w.onSelectTime)&&w.onSelectTime.call(M,R.currentTime,M.data("input"),t),M.data("changed",!0),M.trigger("xchange.xdsoft"),M.trigger("changedatetime.xdsoft"),void(w.inline!==!0&&w.closeOnTimeSelect===!0&&M.trigger("close.xdsoft")))}),W.on("mousewheel.xdsoft",function(e){return w.scrollMonth?(e.deltaY<0?R.nextMonth():R.prevMonth(),!1):!0}),t.on("mousewheel.xdsoft",function(e){return w.scrollInput?!w.datepicker&&w.timepicker?(V=J.find(".xdsoft_current").length?J.find(".xdsoft_current").eq(0).index():0,V+e.deltaY>=0&&V+e.deltaY<J.children().length&&(V+=e.deltaY),J.children().eq(V).length&&J.children().eq(V).trigger("mousedown"),!1):w.datepicker&&!w.timepicker?(W.trigger(e,[e.deltaY,e.deltaX,e.deltaY]),t.val&&t.val(R.str()),M.trigger("changedatetime.xdsoft"),!1):void 0:!0}),M.on("changedatetime.xdsoft",function(t){if(w.onChangeDateTime&&e.isFunction(w.onChangeDateTime)){var a=M.data("input");w.onChangeDateTime.call(M,R.currentTime,a,t),delete w.value,a.trigger("change")}}).on("generate.xdsoft",function(){w.onGenerate&&e.isFunction(w.onGenerate)&&w.onGenerate.call(M,R.currentTime,M.data("input")),H&&(M.trigger("afterOpen.xdsoft"),H=!1)}).on("click.xdsoft",function(e){e.stopPropagation()}),V=0,B=function(){var n,t=M.data("input").offset(),a=t.top+M.data("input")[0].offsetHeight-1,r=t.left,i="absolute";"rtl"==M.data("input").parent().css("direction")&&(r-=M.outerWidth()-M.data("input").outerWidth()),w.fixed?(a-=e(window).scrollTop(),r-=e(window).scrollLeft(),i="fixed"):(a+M[0].offsetHeight>e(window).height()+e(window).scrollTop()&&(a=t.top-M[0].offsetHeight+1),0>a&&(a=0),r+M[0].offsetWidth>e(window).width()&&(r=e(window).width()-M[0].offsetWidth)),n=M[0];do if(n=n.parentNode,"relative"===window.getComputedStyle(n).getPropertyValue("position")&&e(window).width()>=n.offsetWidth){r-=(e(window).width()-n.offsetWidth)/2;break}while("HTML"!==n.nodeName);M.css({left:r,top:a,position:i})},M.on("open.xdsoft",function(t){var a=!0;w.onShow&&e.isFunction(w.onShow)&&(a=w.onShow.call(M,R.currentTime,M.data("input"),t)),a!==!1&&(M.show(),B(),e(window).off("resize.xdsoft",B).on("resize.xdsoft",B),w.closeOnWithoutClick&&e([document.body,window]).on("mousedown.xdsoft",function r(){M.trigger("close.xdsoft"),e([document.body,window]).off("mousedown.xdsoft",r)}))}).on("close.xdsoft",function(t){var a=!0;F.find(".xdsoft_month,.xdsoft_year").find(".xdsoft_select").hide(),w.onClose&&e.isFunction(w.onClose)&&(a=w.onClose.call(M,R.currentTime,M.data("input"),t)),a===!1||w.opened||w.inline||M.hide(),t.stopPropagation()}).on("toggle.xdsoft",function(){M.trigger(M.is(":visible")?"close.xdsoft":"open.xdsoft")}).data("input",t),E=0,q=0,M.data("xdsoft_datetime",R),M.setOptions(w),R.setCurrentTime(K()),t.data("xdsoft_datetimepicker",M).on("open.xdsoft focusin.xdsoft mousedown.xdsoft",function(){t.is(":disabled")||t.data("xdsoft_datetimepicker").is(":visible")&&w.closeOnInputClick||(clearTimeout(E),E=setTimeout(function(){t.is(":disabled")||(H=!0,R.setCurrentTime(K()),M.trigger("open.xdsoft"))},100))}).on("keydown.xdsoft",function(t){var r,i=(this.value,t.which);return-1!==[l].indexOf(i)&&w.enterLikeTab?(r=e("input:visible,textarea:visible"),M.trigger("close.xdsoft"),r.eq(r.index(this)+1).focus(),!1):-1!==[y].indexOf(i)?(M.trigger("close.xdsoft"),!0):void 0})},W=function(t){var a=t.data("xdsoft_datetimepicker");a&&(a.data("xdsoft_datetime",null),a.remove(),t.data("xdsoft_datetimepicker",null).off(".xdsoft"),e(window).off("resize.xdsoft"),e([window,document.body]).off("mousedown.xdsoft"),t.unmousewheel&&t.unmousewheel())},e(document).off("keydown.xdsoftctrl keyup.xdsoftctrl").on("keydown.xdsoftctrl",function(e){e.keyCode===f&&(O=!0)}).on("keyup.xdsoftctrl",function(e){e.keyCode===f&&(O=!1)}),this.each(function(){var r,t=e(this).data("xdsoft_datetimepicker");if(t){if("string"===e.type(a))switch(a){case"show":e(this).select().focus(),t.trigger("open.xdsoft");break;case"hide":t.trigger("close.xdsoft");break;case"toggle":t.trigger("toggle.xdsoft");break;case"destroy":W(e(this));break;case"reset":this.value=this.defaultValue,this.value&&t.data("xdsoft_datetime").isValidDate(Date.parseDate(this.value,w.format))||t.data("changed",!1),t.data("xdsoft_datetime").setCurrentTime(this.value);break;case"validate":r=t.data("input"),r.trigger("blur.xdsoft")}else t.setOptions(a);return 0}"string"!==e.type(a)&&(!w.lazyInit||w.open||w.inline?_(e(this)):F(e(this)))})},e.fn.datetimepicker.defaults=t});
eikzon/inimz-pegasus-bak
public/admin/js/jquery.datetimepicker.min.js
JavaScript
mit
44,621
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. (function (root, factory) { var freeExports = typeof exports == 'object' && exports && (typeof root == 'object' && root && root == root.global && (window = root), exports); // Because of build optimizers if (typeof define === 'function' && define.amd) { define(['rx', 'jQuery', 'exports'], function (Rx, jQuery, exports) { root.Rx = factory(root, exports, Rx, jQuery); return root.Rx; }); } else if (typeof module == 'object' && module && module.exports == freeExports) { module.exports = factory(root, module.exports, require('rx'), require('jquery')); } else { root.Rx = factory(root, {}, root.Rx, jQuery); } }(this, function (global, exp, Rx, $, undefined) { // Headers var observable = Rx.Observable, observableProto = observable.prototype, AsyncSubject = Rx.AsyncSubject, observableCreate = observable.create, observableCreateWithDisposable = observable.createWithDisposable, disposableEmpty = Rx.Disposable.empty, slice = Array.prototype.slice, proto = $.fn; // Check for deferred as of jQuery 1.5 if ($.Deferred) { /** * Converts the jQuery Deferred to an Observable sequence * @returns {Observable} An Observable sequence created from a jQuery Deferred object. */ $.Deferred.prototype.toObservable = function () { var subject = new AsyncSubject(); this.done(function () { subject.onNext(slice.call(arguments)); subject.onCompleted(); }).fail(function () { subject.onError(slice.call(arguments)); }); return subject; }; /** * Converts an existing Observable sequence to a jQuery Deferred object. * @returns {Deferred} A jQuery Deferred object wrapping the Observable sequence. */ observableProto.toDeferred = function () { var deferred = $.Deferred(); this.subscribe(function (value) { deferred.resolve(value); }, function (e) { deferred.reject(e); }); return deferred; }; } //in order to support jQuery 1.6.* if ($.Callbacks) { /** * Converts an existing Callbacks object to an Observable sequence * @returns {Observable} An Observable sequence created from a jQuery Callbacks object. */ $.Callbacks.prototype.toObservable = function () { var parent = this; return observableCreate(function (observer) { function handler(values) { observer.onNext(values); } parent.add(handler); return function () { parent.remove(handler); }; }); }; } if (!!proto.on) { /** * Attach an event handler function for one or more events to the selected elements as an Observable sequence. * * @param {String} events One or more space-separated event types and optional namespaces, such as "click" or "keydown.myPlugin". * @param {String} [selector] A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. * @param {Any} [data] Data to be passed to the handler in event.data when an event is triggered. * @returns {Observable} An Observable sequence which wraps the jQuery on method. */ proto.onAsObservable = function () { var parent = this, args = slice.call(arguments, 0); return observableCreate(function(observer) { function handler(eventObject) { eventObject.additionalArguments = slice.call(arguments, 1); observer.onNext(eventObject); } args.push(handler); parent.on.apply(parent, args); return function() { parent.off.apply(parent, args); }; }); }; } /** * Attach a handler to an event for the elements as an Observable sequence. * * @param {String} eventType A string containing one or more DOM event types, such as "click" or "submit," or custom event names. * @param {Object} eventData An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery bind method. */ proto.bindAsObservable = function(eventType, eventData) { var parent = this; return observableCreate(function(observer) { function handler(eventObject) { eventObject.additionalArguments = slice.call(arguments, 1); observer.onNext(eventObject); } parent.bind(eventType, eventData, handler); return function() { parent.unbind(eventType, eventData, handler); }; }); }; /** * Attach a handler to one or more events for all elements that match the selector, now or in the future, based on a specific set of root elements as an Observable sequence * * @param {String} selector A selector to filter the elements that trigger the event. * @param {String} eventType A string containing one or more space-separated JavaScript event types, such as "click" or "keydown," or custom event names. * @param {Object} eventData An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery delegate method */ proto.delegateAsObservable = function(selector, eventType, eventData) { var parent = this; return observableCreate(function(observer) { function handler(eventObject) { eventObject.additionalArguments = slice.call(arguments, 1); observer.onNext(eventObject); } parent.delegate(selector, eventType, eventData, handler); return function() { parent.undelegate(selector, eventType, handler); }; }); }; // Removed as of 1.9 if (!!proto.live) { /** * Attach an event handler for all elements which match the current selector, now and in the future as an Observable sequence * * @param {String} eventType A string containing a JavaScript event type, such as "click" or "keydown." As of jQuery 1.4 the string can contain multiple, space-separated event types or custom event names. * @param {Object} data An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery live method */ proto.liveAsObservable = function(eventType, data) { var parent = this; return observableCreate(function(observer) { function handler(eventObject) { eventObject.additionalArguments = slice.call(arguments, 1); observer.onNext(eventObject); } parent.live(eventType, data, handler); return function() { parent.die(eventType, data, handler); }; }); }; } /** * Bind an event handler to the “change” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “change” event. */ proto.changeAsObservable = function (eventData) { return this.bindAsObservable('change', eventData); }; /** * Bind an event handler to the “click” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “click” event. */ proto.clickAsObservable = function (eventData) { return this.bindAsObservable('click', eventData); }; /** * Bind an event handler to the “dblclick” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery "“dblclick”" event. */ proto.dblclickAsObservable = function (eventData) { return this.bindAsObservable('dblclick', eventData); }; /** * Bind an event handler to the “focus” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery "“focus”" event. */ proto.focusAsObservable = function(eventData) { return this.bindAsObservable('focus', eventData); }; /** * Bind an event handler to the “focusin” event as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “focusin” event. */ proto.focusinAsObservable = function(eventData) { return this.bindAsObservable('focusin', eventData); }; /** * Bind an event handler to the “focusin” event as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “focusin” event. */ proto.focusoutAsObservable = function(eventData) { return this.bindAsObservable('focusout', eventData); }; /** * Bind an event handler to the “keydown” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “keydown” event. */ proto.keydownAsObservable = function(eventData) { return this.bindAsObservable('keydown', eventData); }; /** * Bind an event handler to the “keyup” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “keyup” event. */ proto.keyupAsObservable = function(eventData) { return this.bindAsObservable('keyup', eventData); }; /** * Bind an event handler to the “load” JavaScript event as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “load” event. */ proto.loadAsObservable = function(eventData) { return this.bindAsObservable('load', eventData); }; /** * Bind an event handler to the “mousedown” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mousedown” event. */ proto.mousedownAsObservable = function(eventData) { return this.bindAsObservable('mousedown', eventData); }; /** * Bind an event handler to be fired when the mouse enters an element, or trigger that handler on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mouseenter” event. */ proto.mouseenterAsObservable = function(eventData) { return this.bindAsObservable('mouseenter', eventData); }; /** * Bind an event handler to be fired when the mouse leaves an element, or trigger that handler on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mouseleave” event. */ proto.mouseleaveAsObservable = function(eventData) { return this.bindAsObservable('mouseleave', eventData); }; /** * Bind an event handler to the “mousemove” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mousemove” event. */ proto.mousemoveAsObservable = function(eventData) { return this.bindAsObservable('mousemove', eventData); }; /** * Bind an event handler to the “mouseout” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mouseout” event. */ proto.mouseoutAsObservable = function(eventData) { return this.bindAsObservable('mouseout', eventData); }; /** * Bind an event handler to the “mouseover” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mouseover” event. */ proto.mouseoverAsObservable = function(eventData) { return this.bindAsObservable('mouseover', eventData); }; /** * Bind an event handler to the “mouseup” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “mouseup” event. */ proto.mouseupAsObservable = function(eventData) { return this.bindAsObservable('mouseup', eventData); }; /** * Bind an event handler to the “resize” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “resize” event. */ proto.resizeAsObservable = function(eventData) { return this.bindAsObservable('resize', eventData); }; /** * Bind an event handler to the “scroll” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “scroll” event. */ proto.scrollAsObservable = function(eventData) { return this.bindAsObservable('scroll', eventData); }; /** * Bind an event handler to the “select” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “select” event. */ proto.selectAsObservable = function(eventData) { return this.bindAsObservable('select', eventData); }; /** * Bind an event handler to the “select” JavaScript event, or trigger that event on an element as an Observable sequence. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “select” event. */ proto.submitAsObservable = function(eventData) { return this.bindAsObservable('submit', eventData); }; /** * Bind an event handler to the “unload” JavaScript event as an Observable sequence. This is deprecated as of jQuery 1.8. * * @param {Object} [eventData] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery “unload” event. */ proto.unloadAsObservable = function(eventData) { return this.bindAsObservable('unload', eventData); }; /** * Attach a handler to an event for the elements as an Observable sequence. The handler is executed at most once per element. * * @param {String} events A string containing one or more JavaScript event types, such as "click" or "submit," or custom event names. * @param {String} [selector] A selector string to filter the descendants of the selected elements that trigger the event. If the selector is null or omitted, the event is always triggered when it reaches the selected element. * @param {Object} [data] An object containing data that will be passed to the event handler. * @returns {Observable} An Observable sequence which wraps the jQuery one method. */ proto.oneAsObservable = function(events) { var parent = this, args = arguments; return observableCreate(function(observer) { function handler (eventObject) { eventObject.additionalArguments = slice.call(arguments, 1); observer.onNext(eventObject); } args.push(handler); parent.one.apply(parent, args); }); }; /** * Specify a function to execute when the DOM is fully loaded as an Observable sequence. * * @returns {Observable} An Observable sequence which wraps the jQuery ready method. */ proto.readyAsObservable = function() { var parent = this; return observableCreate(function(observer) { function handler(eventObject) { observer.onNext(eventObject); } parent.ready(handler); }); }; function handeAnimation(jQueryProto, method, args) { var options = args[0]; // Check for duration if (typeof options === 'number' || typeof options === 'string') { options = { duration: options }; } else if (!options) { options = {}; } // Check for easing if (args.length === 2) { options.easing = args[1]; } var subject = new AsyncSubject(); options.complete = function() { subject.onNext(this); subject.onCompleted(); }; jQueryProto[method](options); return subject; } /** * Hide the matched elements as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery hide method. */ proto.hideAsObservable = function (options) { return handeAnimation(this, 'hide', arguments); }; /** * Display the matched elements as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery show method. */ proto.showAsObservable = function(options) { return handeAnimation(this, 'show', arguments); }; /** * Display the matched elements as an Observable sequence. * * @param {Object} properties An object of CSS properties and values that the animation will move toward. * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery show method. */ proto.animateAsObservable = function(properties, options) { // Check for duration if (typeof options === 'number' || typeof options === 'string') { options = { duration: options }; } else if (!options) { options = {}; } // Check for easing if (arguments.length === 3) { options.easing = arguments[2]; } var subject = new AsyncSubject(); options.complete = function() { subject.onNext(this); subject.onCompleted(); }; this.animate(properties, options); return subject; }; /** * Display the matched elements as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery fadeIn method. */ proto.fadeInAsObservable = function(options) { return handeAnimation(this, 'fadeIn', arguments); }; /** * Adjust the opacity of the matched elements as an Observable sequence * * @param {String|Number} duration A string or number determining how long the animation will run. * @param {Number} opacity A number between 0 and 1 denoting the target opacity. * @param {String} [easing] A string indicating which easing function to use for the transition. * @returns {Observable} An Observable sequence which wraps the jQuery fadeTo method. */ proto.fadeToAsObservable = function(duration, opacity, easing) { var subject = new AsyncSubject(); this.fadeTo(duration, opacity, easing, function() { subject.onNext(this); subject.onCompleted(); }); return subject; }; /** * Hide the matched elements by fading them to transparent as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery fadeOut method. */ proto.fadeOutAsObservable = function(options) { return handeAnimation(this, 'fadeOut', arguments); }; /** * Display or hide the matched elements by animating their opacity as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery fadeToggle method. */ proto.fadeToggleAsObservable = function(options) { return handeAnimation(this, 'fadeToggle', arguments); }; /** * Display the matched elements with a sliding motion as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery slideDown method. */ proto.slideDownAsObservable = function(options) { return handeAnimation(this, 'slideDown', arguments); }; /** * Hide the matched elements with a sliding motion as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery slideUp method. */ proto.slideUpAsObservable = function(options) { return handeAnimation(this, 'slideUp', arguments); }; /** * Hide the matched elements with a sliding motion as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method. */ proto.slideToggleAsObservable = function(options) { return handeAnimation(this, 'slideToggle', arguments); }; /** * Display or hide the matched elements as an Observable sequence. * * @param {String|Number} [duration] A string or number determining how long the animation will run. If not specified, defaults to 400. * @param {String} [easing] A string indicating which easing function to use for the transition. * @param {Object} [options] A map of additional options to pass to the method. * @param {String|Number} [options.duration] A string or number determining how long the animation will run. * @param {String} [options.easing] A string indicating which easing function to use for the transition. * @param {String|Boolean} [options.queue] A Boolean indicating whether to place the animation in the effects queue. If false, the animation will begin immediately. As of jQuery 1.7, the queue option can also accept a string, in which case the animation is added to the queue represented by that string. When a custom queue name is used the animation does not automatically start; you must call .dequeue("queuename") to start it. * @param {Object} [options.specialEasing] A map of one or more of the CSS properties defined by the properties argument and their corresponding easing functions. * @param {Number} [options.step] A function to be called for each animated property of each animated element. This function provides an opportunity to modify the Tween object to change the value of the property before it is set. * @returns {Observable} An Observable sequence which wraps the jQuery slideToggle method. */ proto.toggleAsObservable = function(duration, easing) { return handeAnimation(this, 'toggle', arguments); }; var ajaxAsObservable = $.ajaxAsObservable = function(settings) { var subject = new AsyncSubject(); var internalSettings = { success: function(data, textStatus, jqXHR) { subject.onNext({ data: data, textStatus: textStatus, jqXHR: jqXHR }); subject.onCompleted(); }, error: function(jqXHR, textStatus, errorThrown) { subject.onError({ jqXHR: jqXHR, textStatus: textStatus, errorThrown: errorThrown }); } }; $.extend(true, internalSettings, settings); $.ajax(internalSettings); return subject; }; /** * Load data from the server using a HTTP GET request as an Observable sequence. * * @param {String} url A string containing the URL to which the request is sent. * @param {Object} [data] A plain object or string that is sent to the server with the request. * @param {String} [dataType] The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). * @returns {Observable} An Observable sequence which wraps the jQuery get method. */ $.getAsObservable = function(url, data, dataType) { return ajaxAsObservable({ url: url, dataType: dataType, data: data }); }; /** * Load JSON-encoded data from the server using a GET HTTP request as an Observable sequence. * * @param {String} url A string containing the URL to which the request is sent. * @param {Object} [data] A plain object or string that is sent to the server with the request. * @returns {Observable} An Observable sequence which wraps the jQuery getJSON method. */ $.getJSONAsObservable = function(url, data) { return ajaxAsObservable({ url: url, dataType: 'json', data: data }); }; /** * Load a JavaScript file from the server using a GET HTTP request, then execute it as an Observable sequence. * * @param {String} url A string containing the URL to which the request is sent. * @returns {Observable} An Observable sequence which wraps the jQuery getJSON method. */ $.getScriptAsObservable = function(url) { return ajaxAsObservable({ url: url, dataType: 'script'}); }; /** * Load data from the server using a HTTP POST request as an Observable sequence. * * @param {String} url A string containing the URL to which the request is sent. * @param {Object} [data] A plain object or string that is sent to the server with the request. * @param {String} [dataType] The type of data expected from the server. Default: Intelligent Guess (xml, json, script, or html). * @returns {Observable} An Observable sequence which wraps the jQuery get method. */ $.postAsObservable = function(url, data, dataType) { return ajaxAsObservable({ url: url, dataType: dataType, data: data, type: 'POST'}); }; return Rx; }));
JGallardo/cdnjs
ajax/libs/rxjs-jquery/1.0.1/rx.jquery.js
JavaScript
mit
41,377
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('series-range', function (Y, NAME) { /** * Provides functionality for creating a range series. * * @module charts * @submodule series-range */ /** * An abstract class for creating range series instances. * RangeSeries is used by the following classes: * <ul> * <li>{{#crossLink "CandlestickSeries"}}{{/crossLink}}</li> * <li>{{#crossLink "OHLCSeries"}}{{/crossLink}}</li> * </ul> * * @class RangeSeries * @extends CartesianSeries * @constructor * @param {Object} config (optional) Configuration parameters. * @submodule series-range */ function RangeSeries() { RangeSeries.superclass.constructor.apply(this, arguments); } RangeSeries.NAME = "rangeSeries"; RangeSeries.ATTRS = { /** * Read-only attribute indicating the type of series. * * @attribute type * @type String * @default range */ type: { value: "range" }, /** * Values to be used for open, high, low and close keys. * * @attribute ohlc * @type Object */ ohlckeys: { valueFn: function() { return { open: "open", high: "high", low: "low", close: "close" }; } } }; Y.extend(RangeSeries, Y.CartesianSeries, { /** * Returns the width for each marker base on the width of the series * and the length of the dataProvider. * * @method calculateMarkerWidth * @param {Number} width The width, in pixels of the series. * @param {Number} count The length of the datProvider. * @return Number * @private */ _calculateMarkerWidth: function(width, count, spacing) { var val = 0; while(val < 3 && spacing > -1) { spacing = spacing - 1; val = Math.round(width/count - spacing); if(val % 2 === 0) { val = val - 1; } } return Math.max(1, val); }, /** * Draws the series. * * @method drawSeries * @protected */ drawSeries: function() { var xcoords = this.get("xcoords"), ycoords = this.get("ycoords"), styles = this.get("styles"), padding = styles.padding, len = xcoords.length, dataWidth = this.get("width") - (padding.left + padding.right), keys = this.get("ohlckeys"), opencoords = ycoords[keys.open], highcoords = ycoords[keys.high], lowcoords = ycoords[keys.low], closecoords = ycoords[keys.close], width = this._calculateMarkerWidth(dataWidth, len, styles.spacing), halfwidth = width/2; this._drawMarkers(xcoords, opencoords, highcoords, lowcoords, closecoords, len, width, halfwidth, styles); }, /** * Gets the default value for the `styles` attribute. Overrides * base implementation. * * @method _getDefaultStyles * @return Object * @private */ _getDefaultStyles: function() { var styles = { spacing: 3 }; return this._mergeStyles(styles, RangeSeries.superclass._getDefaultStyles()); } }); Y.RangeSeries = RangeSeries; }, '3.15.0', {"requires": ["series-cartesian"]});
firulais/jsdelivr
files/yui/3.15.0/series-range/series-range.js
JavaScript
mit
3,461
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('highlight-accentfold', function (Y, NAME) { /** Adds accent-folding highlighters to `Y.Highlight`. @module highlight @submodule highlight-accentfold **/ /** @class Highlight @static **/ var AccentFold = Y.Text.AccentFold, Escape = Y.Escape, EMPTY_OBJECT = {}, Highlight = Y.mix(Y.Highlight, { // -- Public Static Methods ------------------------------------------------ /** Accent-folding version of `all()`. @method allFold @param {String} haystack String to apply highlighting to. @param {String|String[]} needles String or array of strings that should be highlighted. @param {Object} [options] Options object. @param {Boolean} [options.startsWith=false] If `true`, matches must be anchored to the beginning of the string. @return {String} Escaped and highlighted copy of _haystack_. @static **/ allFold: function (haystack, needles, options) { var template = Highlight._TEMPLATE, results = [], startPos = 0, chunk, i, len, match, result; options = Y.merge({ // This tells Highlight.all() not to escape HTML, in order to ensure // usable match offsets. The output of all() is discarded, and we // perform our own escaping before returning the highlighted string. escapeHTML: false, // While the highlight regex operates on the accent-folded strings, // this replacer will highlight the matched positions in the // original string. // // Note: this implementation doesn't handle multi-character folds, // like "æ" -> "ae". Doing so correctly would be prohibitively // expensive both in terms of code size and runtime performance, so // I've chosen to take the pragmatic route and just not do it at // all. This is one of many reasons why accent folding is best done // on the server. replacer: function (match, p1, foldedNeedle, pos) { var len; // Ignore matches inside HTML entities. if (p1 && !(/\s/).test(foldedNeedle)) { return match; } len = foldedNeedle.length; results.push([ haystack.substring(startPos, pos), // substring between previous match and this match haystack.substr(pos, len) // match to be highlighted ]); startPos = pos + len; } }, options || EMPTY_OBJECT); // Run the highlighter on the folded strings. We don't care about the // output; our replacer function will build the canonical highlighted // string, with original accented characters. Highlight.all(AccentFold.fold(haystack), AccentFold.fold(needles), options); // Tack on the remainder of the haystack that wasn't highlighted, if // any. if (startPos < haystack.length) { results.push([haystack.substr(startPos)]); } // Highlight and escape the string. for (i = 0, len = results.length; i < len; ++i) { chunk = Escape.html(results[i][0]); if ((match = results[i][1])) { chunk += template.replace(/\{s\}/g, Escape.html(match)); } results[i] = chunk; } return results.join(''); }, /** Accent-folding version of `start()`. @method startFold @param {String} haystack String to apply highlighting to. @param {String|String[]} needles String or array of strings that should be highlighted. @return {String} Escaped and highlighted copy of _haystack_. @static **/ startFold: function (haystack, needles) { return Highlight.allFold(haystack, needles, {startsWith: true}); }, /** Accent-folding version of `words()`. @method wordsFold @param {String} haystack String to apply highlighting to. @param {String|String[]} needles String or array of strings containing words that should be highlighted. If a string is passed, it will be split into words; if an array is passed, it is assumed to have already been split. @return {String} Escaped and highlighted copy of _haystack_. @static **/ wordsFold: function (haystack, needles) { var template = Highlight._TEMPLATE; return Highlight.words(haystack, AccentFold.fold(needles), { mapper: function (word, needles) { if (needles.hasOwnProperty(AccentFold.fold(word))) { return template.replace(/\{s\}/g, Escape.html(word)); } return Escape.html(word); } }); } }); }, '3.15.0', {"requires": ["highlight-base", "text-accentfold"]});
rndme/cdnjs
ajax/libs/yui/3.15.0/highlight-accentfold/highlight-accentfold.js
JavaScript
mit
5,060
/* ======================================================== * bootstrap-tab.js v2.3.0 * http://twitter.github.com/bootstrap/javascript.html#tabs * ======================================================== * Copyright 2012 Twitter, Inc. * * 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. * ======================================================== */ !function ($) { "use strict"; // jshint ;_; /* TAB CLASS DEFINITION * ==================== */ var Tab = function (element) { this.element = $(element) } Tab.prototype = { constructor: Tab , show: function () { var $this = this.element , $ul = $this.closest('ul:not(.dropdown-menu)') , selector = $this.attr('data-target') , previous , $target , e if (!selector) { selector = $this.attr('href') selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 } if ( $this.parent('li').hasClass('active') ) return previous = $ul.find('.active:last a')[0] e = $.Event('show', { relatedTarget: previous }) $this.trigger(e) if (e.isDefaultPrevented()) return $target = $(selector) this.activate($this.parent('li'), $ul) this.activate($target, $target.parent(), function () { $this.trigger({ type: 'shown' , relatedTarget: previous }) }) } , activate: function ( element, container, callback) { var $active = container.find('> .active') , transition = callback && $.support.transition && $active.hasClass('fade') function next() { $active .removeClass('active') .find('> .dropdown-menu > .active') .removeClass('active') element.addClass('active') if (transition) { element[0].offsetWidth // reflow for transition element.addClass('in') } else { element.removeClass('fade') } if ( element.parent('.dropdown-menu') ) { element.closest('li.dropdown').addClass('active') } callback && callback() } transition ? $active.one($.support.transition.end, next) : next() $active.removeClass('in') } } /* TAB PLUGIN DEFINITION * ===================== */ var old = $.fn.tab $.fn.tab = function ( option ) { return this.each(function () { var $this = $(this) , data = $this.data('tab') if (!data) $this.data('tab', (data = new Tab(this))) if (typeof option == 'string') data[option]() }) } $.fn.tab.Constructor = Tab /* TAB NO CONFLICT * =============== */ $.fn.tab.noConflict = function () { $.fn.tab = old return this } /* TAB DATA-API * ============ */ $(document).on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) { e.preventDefault() $(this).tab('show') }) }(window.jQuery);
rogervaas/sequelize-pg-generator
doc/scripts/bootstrap-tab.js
JavaScript
mit
3,496
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('event-synthetic', function (Y, NAME) { /** * Define new DOM events that can be subscribed to from Nodes. * * @module event * @submodule event-synthetic */ var CustomEvent = Y.CustomEvent, DOMMap = Y.Env.evt.dom_map, toArray = Y.Array, YLang = Y.Lang, isObject = YLang.isObject, isString = YLang.isString, isArray = YLang.isArray, query = Y.Selector.query, noop = function () {}; /** * <p>The triggering mechanism used by SyntheticEvents.</p> * * <p>Implementers should not instantiate these directly. Use the Notifier * provided to the event's implemented <code>on(node, sub, notifier)</code> or * <code>delegate(node, sub, notifier, filter)</code> methods.</p> * * @class SyntheticEvent.Notifier * @constructor * @param handle {EventHandle} the detach handle for the subscription to an * internal custom event used to execute the callback passed to * on(..) or delegate(..) * @param emitFacade {Boolean} take steps to ensure the first arg received by * the subscription callback is an event facade * @private * @since 3.2.0 */ function Notifier(handle, emitFacade) { this.handle = handle; this.emitFacade = emitFacade; } /** * <p>Executes the subscription callback, passing the firing arguments as the * first parameters to that callback. For events that are configured with * emitFacade=true, it is common practice to pass the triggering DOMEventFacade * as the first parameter. Barring a proper DOMEventFacade or EventFacade * (from a CustomEvent), a new EventFacade will be generated. In that case, if * fire() is called with a simple object, it will be mixed into the facade. * Otherwise, the facade will be prepended to the callback parameters.</p> * * <p>For notifiers provided to delegate logic, the first argument should be an * object with a &quot;currentTarget&quot; property to identify what object to * default as 'this' in the callback. Typically this is gleaned from the * DOMEventFacade or EventFacade, but if configured with emitFacade=false, an * object must be provided. In that case, the object will be removed from the * callback parameters.</p> * * <p>Additional arguments passed during event subscription will be * automatically added after those passed to fire().</p> * * @method fire * @param {EventFacade|DOMEventFacade|any} e (see description) * @param {any[]} [arg*] additional arguments received by all subscriptions * @private */ Notifier.prototype.fire = function (e) { // first arg to delegate notifier should be an object with currentTarget var args = toArray(arguments, 0, true), handle = this.handle, ce = handle.evt, sub = handle.sub, thisObj = sub.context, delegate = sub.filter, event = e || {}, ret; if (this.emitFacade) { if (!e || !e.preventDefault) { event = ce._getFacade(); if (isObject(e) && !e.preventDefault) { Y.mix(event, e, true); args[0] = event; } else { args.unshift(event); } } event.type = ce.type; event.details = args.slice(); if (delegate) { event.container = ce.host; } } else if (delegate && isObject(e) && e.currentTarget) { args.shift(); } sub.context = thisObj || event.currentTarget || ce.host; ret = ce.fire.apply(ce, args); // have to handle preventedFn and stoppedFn manually because // Notifier CustomEvents are forced to emitFacade=false if (e.prevented && ce.preventedFn) { ce.preventedFn.apply(ce, args); } if (e.stopped && ce.stoppedFn) { ce.stoppedFn.apply(ce, args); } sub.context = thisObj; // reset for future firing // to capture callbacks that return false to stopPropagation. // Useful for delegate implementations return ret; }; /** * Manager object for synthetic event subscriptions to aggregate multiple synths on the * same node without colliding with actual DOM subscription entries in the global map of * DOM subscriptions. Also facilitates proper cleanup on page unload. * * @class SynthRegistry * @constructor * @param el {HTMLElement} the DOM element * @param yuid {String} the yuid stamp for the element * @param key {String} the generated id token used to identify an event type + * element in the global DOM subscription map. * @private */ function SynthRegistry(el, yuid, key) { this.handles = []; this.el = el; this.key = key; this.domkey = yuid; } SynthRegistry.prototype = { constructor: SynthRegistry, // A few object properties to fake the CustomEvent interface for page // unload cleanup. DON'T TOUCH! type : '_synth', fn : noop, capture : false, /** * Adds a subscription from the Notifier registry. * * @method register * @param handle {EventHandle} the subscription * @since 3.4.0 */ register: function (handle) { handle.evt.registry = this; this.handles.push(handle); }, /** * Removes the subscription from the Notifier registry. * * @method _unregisterSub * @param sub {Subscription} the subscription * @since 3.4.0 */ unregister: function (sub) { var handles = this.handles, events = DOMMap[this.domkey], i; for (i = handles.length - 1; i >= 0; --i) { if (handles[i].sub === sub) { handles.splice(i, 1); break; } } // Clean up left over objects when there are no more subscribers. if (!handles.length) { delete events[this.key]; if (!Y.Object.size(events)) { delete DOMMap[this.domkey]; } } }, /** * Used by the event system's unload cleanup process. When navigating * away from the page, the event system iterates the global map of element * subscriptions and detaches everything using detachAll(). Normally, * the map is populated with custom events, so this object needs to * at least support the detachAll method to duck type its way to * cleanliness. * * @method detachAll * @private * @since 3.4.0 */ detachAll : function () { var handles = this.handles, i = handles.length; while (--i >= 0) { handles[i].detach(); } } }; /** * <p>Wrapper class for the integration of new events into the YUI event * infrastructure. Don't instantiate this object directly, use * <code>Y.Event.define(type, config)</code>. See that method for details.</p> * * <p>Properties that MAY or SHOULD be specified in the configuration are noted * below and in the description of <code>Y.Event.define</code>.</p> * * @class SyntheticEvent * @constructor * @param cfg {Object} Implementation pieces and configuration * @since 3.1.0 * @in event-synthetic */ function SyntheticEvent() { this._init.apply(this, arguments); } Y.mix(SyntheticEvent, { Notifier: Notifier, SynthRegistry: SynthRegistry, /** * Returns the array of subscription handles for a node for the given event * type. Passing true as the third argument will create a registry entry * in the event system's DOM map to host the array if one doesn't yet exist. * * @method getRegistry * @param node {Node} the node * @param type {String} the event * @param create {Boolean} create a registration entry to host a new array * if one doesn't exist. * @return {Array} * @static * @protected * @since 3.2.0 */ getRegistry: function (node, type, create) { var el = node._node, yuid = Y.stamp(el), key = 'event:' + yuid + type + '_synth', events = DOMMap[yuid]; if (create) { if (!events) { events = DOMMap[yuid] = {}; } if (!events[key]) { events[key] = new SynthRegistry(el, yuid, key); } } return (events && events[key]) || null; }, /** * Alternate <code>_delete()</code> method for the CustomEvent object * created to manage SyntheticEvent subscriptions. * * @method _deleteSub * @param sub {Subscription} the subscription to clean up * @private * @since 3.2.0 */ _deleteSub: function (sub) { if (sub && sub.fn) { var synth = this.eventDef, method = (sub.filter) ? 'detachDelegate' : 'detach'; this._subscribers = []; if (CustomEvent.keepDeprecatedSubs) { this.subscribers = {}; } synth[method](sub.node, sub, this.notifier, sub.filter); this.registry.unregister(sub); delete sub.fn; delete sub.node; delete sub.context; } }, prototype: { constructor: SyntheticEvent, /** * Construction logic for the event. * * @method _init * @protected */ _init: function () { var config = this.publishConfig || (this.publishConfig = {}); // The notification mechanism handles facade creation this.emitFacade = ('emitFacade' in config) ? config.emitFacade : true; config.emitFacade = false; }, /** * <p>Implementers MAY provide this method definition.</p> * * <p>Implement this function if the event supports a different * subscription signature. This function is used by both * <code>on()</code> and <code>delegate()</code>. The second parameter * indicates that the event is being subscribed via * <code>delegate()</code>.</p> * * <p>Implementations must remove extra arguments from the args list * before returning. The required args for <code>on()</code> * subscriptions are</p> * <pre><code>[type, callback, target, context, argN...]</code></pre> * * <p>The required args for <code>delegate()</code> * subscriptions are</p> * * <pre><code>[type, callback, target, filter, context, argN...]</code></pre> * * <p>The return value from this function will be stored on the * subscription in the '_extra' property for reference elsewhere.</p> * * @method processArgs * @param args {Array} parmeters passed to Y.on(..) or Y.delegate(..) * @param delegate {Boolean} true if the subscription is from Y.delegate * @return {any} */ processArgs: noop, /** * <p>Implementers MAY override this property.</p> * * <p>Whether to prevent multiple subscriptions to this event that are * classified as being the same. By default, this means the subscribed * callback is the same function. See the <code>subMatch</code> * method. Setting this to true will impact performance for high volume * events.</p> * * @property preventDups * @type {Boolean} * @default false */ //preventDups : false, /** * <p>Implementers SHOULD provide this method definition.</p> * * Implementation logic for subscriptions done via <code>node.on(type, * fn)</code> or <code>Y.on(type, fn, target)</code>. This * function should set up the monitor(s) that will eventually fire the * event. Typically this involves subscribing to at least one DOM * event. It is recommended to store detach handles from any DOM * subscriptions to make for easy cleanup in the <code>detach</code> * method. Typically these handles are added to the <code>sub</code> * object. Also for SyntheticEvents that leverage a single DOM * subscription under the hood, it is recommended to pass the DOM event * object to <code>notifier.fire(e)</code>. (The event name on the * object will be updated). * * @method on * @param node {Node} the node the subscription is being applied to * @param sub {Subscription} the object to track this subscription * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to * trigger the execution of the subscribers */ on: noop, /** * <p>Implementers SHOULD provide this method definition.</p> * * <p>Implementation logic for detaching subscriptions done via * <code>node.on(type, fn)</code>. This function should clean up any * subscriptions made in the <code>on()</code> phase.</p> * * @method detach * @param node {Node} the node the subscription was applied to * @param sub {Subscription} the object tracking this subscription * @param notifier {SyntheticEvent.Notifier} the Notifier used to * trigger the execution of the subscribers */ detach: noop, /** * <p>Implementers SHOULD provide this method definition.</p> * * <p>Implementation logic for subscriptions done via * <code>node.delegate(type, fn, filter)</code> or * <code>Y.delegate(type, fn, container, filter)</code>. Like with * <code>on()</code> above, this function should monitor the environment * for the event being fired, and trigger subscription execution by * calling <code>notifier.fire(e)</code>.</p> * * <p>This function receives a fourth argument, which is the filter * used to identify which Node's are of interest to the subscription. * The filter will be either a boolean function that accepts a target * Node for each hierarchy level as the event bubbles, or a selector * string. To translate selector strings into filter functions, use * <code>Y.delegate.compileFilter(filter)</code>.</p> * * @method delegate * @param node {Node} the node the subscription is being applied to * @param sub {Subscription} the object to track this subscription * @param notifier {SyntheticEvent.Notifier} call notifier.fire(..) to * trigger the execution of the subscribers * @param filter {String|Function} Selector string or function that * accepts an event object and returns null, a Node, or an * array of Nodes matching the criteria for processing. * @since 3.2.0 */ delegate : noop, /** * <p>Implementers SHOULD provide this method definition.</p> * * <p>Implementation logic for detaching subscriptions done via * <code>node.delegate(type, fn, filter)</code> or * <code>Y.delegate(type, fn, container, filter)</code>. This function * should clean up any subscriptions made in the * <code>delegate()</code> phase.</p> * * @method detachDelegate * @param node {Node} the node the subscription was applied to * @param sub {Subscription} the object tracking this subscription * @param notifier {SyntheticEvent.Notifier} the Notifier used to * trigger the execution of the subscribers * @param filter {String|Function} Selector string or function that * accepts an event object and returns null, a Node, or an * array of Nodes matching the criteria for processing. * @since 3.2.0 */ detachDelegate : noop, /** * Sets up the boilerplate for detaching the event and facilitating the * execution of subscriber callbacks. * * @method _on * @param args {Array} array of arguments passed to * <code>Y.on(...)</code> or <code>Y.delegate(...)</code> * @param delegate {Boolean} true if called from * <code>Y.delegate(...)</code> * @return {EventHandle} the detach handle for this subscription * @private * since 3.2.0 */ _on: function (args, delegate) { var handles = [], originalArgs = args.slice(), extra = this.processArgs(args, delegate), selector = args[2], method = delegate ? 'delegate' : 'on', nodes, handle; // Can't just use Y.all because it doesn't support window (yet?) nodes = (isString(selector)) ? query(selector) : toArray(selector || Y.one(Y.config.win)); if (!nodes.length && isString(selector)) { handle = Y.on('available', function () { Y.mix(handle, Y[method].apply(Y, originalArgs), true); }, selector); return handle; } Y.Array.each(nodes, function (node) { var subArgs = args.slice(), filter; node = Y.one(node); if (node) { if (delegate) { filter = subArgs.splice(3, 1)[0]; } // (type, fn, el, thisObj, ...) => (fn, thisObj, ...) subArgs.splice(0, 4, subArgs[1], subArgs[3]); if (!this.preventDups || !this.getSubs(node, args, null, true)) { handles.push(this._subscribe(node, method, subArgs, extra, filter)); } } }, this); return (handles.length === 1) ? handles[0] : new Y.EventHandle(handles); }, /** * Creates a new Notifier object for use by this event's * <code>on(...)</code> or <code>delegate(...)</code> implementation * and register the custom event proxy in the DOM system for cleanup. * * @method _subscribe * @param node {Node} the Node hosting the event * @param method {String} "on" or "delegate" * @param args {Array} the subscription arguments passed to either * <code>Y.on(...)</code> or <code>Y.delegate(...)</code> * after running through <code>processArgs(args)</code> to * normalize the argument signature * @param extra {any} Extra data parsed from * <code>processArgs(args)</code> * @param filter {String|Function} the selector string or function * filter passed to <code>Y.delegate(...)</code> (not * present when called from <code>Y.on(...)</code>) * @return {EventHandle} * @private * @since 3.2.0 */ _subscribe: function (node, method, args, extra, filter) { var dispatcher = new Y.CustomEvent(this.type, this.publishConfig), handle = dispatcher.on.apply(dispatcher, args), notifier = new Notifier(handle, this.emitFacade), registry = SyntheticEvent.getRegistry(node, this.type, true), sub = handle.sub; sub.node = node; sub.filter = filter; if (extra) { this.applyArgExtras(extra, sub); } Y.mix(dispatcher, { eventDef : this, notifier : notifier, host : node, // I forget what this is for currentTarget: node, // for generating facades target : node, // for generating facades el : node._node, // For category detach _delete : SyntheticEvent._deleteSub }, true); handle.notifier = notifier; registry.register(handle); // Call the implementation's "on" or "delegate" method this[method](node, sub, notifier, filter); return handle; }, /** * <p>Implementers MAY provide this method definition.</p> * * <p>Implement this function if you want extra data extracted during * processArgs to be propagated to subscriptions on a per-node basis. * That is to say, if you call <code>Y.on('xyz', fn, xtra, 'div')</code> * the data returned from processArgs will be shared * across the subscription objects for all the divs. If you want each * subscription to receive unique information, do that processing * here.</p> * * <p>The default implementation adds the data extracted by processArgs * to the subscription object as <code>sub._extra</code>.</p> * * @method applyArgExtras * @param extra {any} Any extra data extracted from processArgs * @param sub {Subscription} the individual subscription */ applyArgExtras: function (extra, sub) { sub._extra = extra; }, /** * Removes the subscription(s) from the internal subscription dispatch * mechanism. See <code>SyntheticEvent._deleteSub</code>. * * @method _detach * @param args {Array} The arguments passed to * <code>node.detach(...)</code> * @private * @since 3.2.0 */ _detach: function (args) { // Can't use Y.all because it doesn't support window (yet?) // TODO: Does Y.all support window now? var target = args[2], els = (isString(target)) ? query(target) : toArray(target), node, i, len, handles, j; // (type, fn, el, context, filter?) => (type, fn, context, filter?) args.splice(2, 1); for (i = 0, len = els.length; i < len; ++i) { node = Y.one(els[i]); if (node) { handles = this.getSubs(node, args); if (handles) { for (j = handles.length - 1; j >= 0; --j) { handles[j].detach(); } } } } }, /** * Returns the detach handles of subscriptions on a node that satisfy a * search/filter function. By default, the filter used is the * <code>subMatch</code> method. * * @method getSubs * @param node {Node} the node hosting the event * @param args {Array} the array of original subscription args passed * to <code>Y.on(...)</code> (before * <code>processArgs</code> * @param filter {Function} function used to identify a subscription * for inclusion in the returned array * @param first {Boolean} stop after the first match (used to check for * duplicate subscriptions) * @return {EventHandle[]} detach handles for the matching subscriptions */ getSubs: function (node, args, filter, first) { var registry = SyntheticEvent.getRegistry(node, this.type), handles = [], allHandles, i, len, handle; if (registry) { allHandles = registry.handles; if (!filter) { filter = this.subMatch; } for (i = 0, len = allHandles.length; i < len; ++i) { handle = allHandles[i]; if (filter.call(this, handle.sub, args)) { if (first) { return handle; } else { handles.push(allHandles[i]); } } } } return handles.length && handles; }, /** * <p>Implementers MAY override this to define what constitutes a * &quot;same&quot; subscription. Override implementations should * consider the lack of a comparator as a match, so calling * <code>getSubs()</code> with no arguments will return all subs.</p> * * <p>Compares a set of subscription arguments against a Subscription * object to determine if they match. The default implementation * compares the callback function against the second argument passed to * <code>Y.on(...)</code> or <code>node.detach(...)</code> etc.</p> * * @method subMatch * @param sub {Subscription} the existing subscription * @param args {Array} the calling arguments passed to * <code>Y.on(...)</code> etc. * @return {Boolean} true if the sub can be described by the args * present * @since 3.2.0 */ subMatch: function (sub, args) { // Default detach cares only about the callback matching return !args[1] || sub.fn === args[1]; } } }, true); Y.SyntheticEvent = SyntheticEvent; /** * <p>Defines a new event in the DOM event system. Implementers are * responsible for monitoring for a scenario whereby the event is fired. A * notifier object is provided to the functions identified below. When the * criteria defining the event are met, call notifier.fire( [args] ); to * execute event subscribers.</p> * * <p>The first parameter is the name of the event. The second parameter is a * configuration object which define the behavior of the event system when the * new event is subscribed to or detached from. The methods that should be * defined in this configuration object are <code>on</code>, * <code>detach</code>, <code>delegate</code>, and <code>detachDelegate</code>. * You are free to define any other methods or properties needed to define your * event. Be aware, however, that since the object is used to subclass * SyntheticEvent, you should avoid method names used by SyntheticEvent unless * your intention is to override the default behavior.</p> * * <p>This is a list of properties and methods that you can or should specify * in the configuration object:</p> * * <dl> * <dt><code>on</code></dt> * <dd><code>function (node, subscription, notifier)</code> The * implementation logic for subscription. Any special setup you need to * do to create the environment for the event being fired--E.g. native * DOM event subscriptions. Store subscription related objects and * state on the <code>subscription</code> object. When the * criteria have been met to fire the synthetic event, call * <code>notifier.fire(e)</code>. See Notifier's <code>fire()</code> * method for details about what to pass as parameters.</dd> * * <dt><code>detach</code></dt> * <dd><code>function (node, subscription, notifier)</code> The * implementation logic for cleaning up a detached subscription. E.g. * detach any DOM subscriptions added in <code>on</code>.</dd> * * <dt><code>delegate</code></dt> * <dd><code>function (node, subscription, notifier, filter)</code> The * implementation logic for subscription via <code>Y.delegate</code> or * <code>node.delegate</code>. The filter is typically either a selector * string or a function. You can use * <code>Y.delegate.compileFilter(selectorString)</code> to create a * filter function from a selector string if needed. The filter function * expects an event object as input and should output either null, a * matching Node, or an array of matching Nodes. Otherwise, this acts * like <code>on</code> DOM event subscriptions. Store subscription * related objects and information on the <code>subscription</code> * object. When the criteria have been met to fire the synthetic event, * call <code>notifier.fire(e)</code> as noted above.</dd> * * <dt><code>detachDelegate</code></dt> * <dd><code>function (node, subscription, notifier)</code> The * implementation logic for cleaning up a detached delegate subscription. * E.g. detach any DOM delegate subscriptions added in * <code>delegate</code>.</dd> * * <dt><code>publishConfig</code></dt> * <dd>(Object) The configuration object that will be used to instantiate * the underlying CustomEvent. See Notifier's <code>fire</code> method * for details.</dd> * * <dt><code>processArgs</code></dt * <dd> * <p><code>function (argArray, fromDelegate)</code> Optional method * to extract any additional arguments from the subscription * signature. Using this allows <code>on</code> or * <code>delegate</code> signatures like * <code>node.on(&quot;hover&quot;, overCallback, * outCallback)</code>.</p> * <p>When processing an atypical argument signature, make sure the * args array is returned to the normal signature before returning * from the function. For example, in the &quot;hover&quot; example * above, the <code>outCallback</code> needs to be <code>splice</code>d * out of the array. The expected signature of the args array for * <code>on()</code> subscriptions is:</p> * <pre> * <code>[type, callback, target, contextOverride, argN...]</code> * </pre> * <p>And for <code>delegate()</code>:</p> * <pre> * <code>[type, callback, target, filter, contextOverride, argN...]</code> * </pre> * <p>where <code>target</code> is the node the event is being * subscribed for. You can see these signatures documented for * <code>Y.on()</code> and <code>Y.delegate()</code> respectively.</p> * <p>Whatever gets returned from the function will be stored on the * <code>subscription</code> object under * <code>subscription._extra</code>.</p></dd> * <dt><code>subMatch</code></dt> * <dd> * <p><code>function (sub, args)</code> Compares a set of * subscription arguments against a Subscription object to determine * if they match. The default implementation compares the callback * function against the second argument passed to * <code>Y.on(...)</code> or <code>node.detach(...)</code> etc.</p> * </dd> * </dl> * * @method define * @param type {String} the name of the event * @param config {Object} the prototype definition for the new event (see above) * @param force {Boolean} override an existing event (use with caution) * @return {SyntheticEvent} the subclass implementation instance created to * handle event subscriptions of this type * @static * @for Event * @since 3.1.0 * @in event-synthetic */ Y.Event.define = function (type, config, force) { var eventDef, Impl, synth; if (type && type.type) { eventDef = type; force = config; } else if (config) { eventDef = Y.merge({ type: type }, config); } if (eventDef) { if (force || !Y.Node.DOM_EVENTS[eventDef.type]) { Impl = function () { SyntheticEvent.apply(this, arguments); }; Y.extend(Impl, SyntheticEvent, eventDef); synth = new Impl(); type = synth.type; Y.Node.DOM_EVENTS[type] = Y.Env.evt.plugins[type] = { eventDef: synth, on: function () { return synth._on(toArray(arguments)); }, delegate: function () { return synth._on(toArray(arguments), true); }, detach: function () { return synth._detach(toArray(arguments)); } }; } } else if (isString(type) || isArray(type)) { Y.Array.each(toArray(type), function (t) { Y.Node.DOM_EVENTS[t] = 1; }); } return synth; }; }, '3.15.0', {"requires": ["node-base", "event-custom-complex"]});
SirenHound/cdnjs
ajax/libs/yui/3.15.0/event-synthetic/event-synthetic.js
JavaScript
mit
33,095
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('querystring-parse', function (Y, NAME) { /** * The QueryString module adds support for serializing JavaScript objects into * query strings and parsing JavaScript objects from query strings format. * * The QueryString namespace is added to your YUI instance including static methods * `Y.QueryString.parse(..)` and `Y.QueryString.stringify(..)`. * * The `querystring` module is a alias for `querystring-parse` and * `querystring-stringify`. * * As their names suggest, `querystring-parse` adds support for parsing * Query String data (`Y.QueryString.parse`) and `querystring-stringify` for serializing * JavaScript data into Query Strings (`Y.QueryString.stringify`). You may choose to * include either of the submodules individually if you don't need the * complementary functionality, or include the rollup for both. * * @module querystring * @main querystring */ /** * Provides Y.QueryString.parse method to accept Query Strings and return native * JavaScript objects. * * @module querystring * @submodule querystring-parse */ /** * The QueryString module adds support for serializing JavaScript objects into * query strings and parsing JavaScript objects from query strings format. * @class QueryString * @static */ var QueryString = Y.namespace("QueryString"), // Parse a key=val string. // These can get pretty hairy // example flow: // parse(foo[bar][][bla]=baz) // return parse(foo[bar][][bla],"baz") // return parse(foo[bar][], {bla : "baz"}) // return parse(foo[bar], [{bla:"baz"}]) // return parse(foo, {bar:[{bla:"baz"}]}) // return {foo:{bar:[{bla:"baz"}]}} pieceParser = function (eq) { return function parsePiece (key, val) { var sliced, numVal, head, tail, ret; if (arguments.length !== 2) { // key=val, called from the map/reduce key = key.split(eq); return parsePiece( QueryString.unescape(key.shift()), QueryString.unescape(key.join(eq)) ); } key = key.replace(/^\s+|\s+$/g, ''); if (Y.Lang.isString(val)) { val = val.replace(/^\s+|\s+$/g, ''); // convert numerals to numbers if (!isNaN(val)) { numVal = +val; if (val === numVal.toString(10)) { val = numVal; } } } sliced = /(.*)\[([^\]]*)\]$/.exec(key); if (!sliced) { ret = {}; if (key) { ret[key] = val; } return ret; } // ["foo[][bar][][baz]", "foo[][bar][]", "baz"] tail = sliced[2]; head = sliced[1]; // array: key[]=val if (!tail) { return parsePiece(head, [val]); } // obj: key[subkey]=val ret = {}; ret[tail] = val; return parsePiece(head, ret); }; }, // the reducer function that merges each query piece together into one set of params mergeParams = function(params, addition) { return ( // if it's uncontested, then just return the addition. (!params) ? addition // if the existing value is an array, then concat it. : (Y.Lang.isArray(params)) ? params.concat(addition) // if the existing value is not an array, and either are not objects, arrayify it. : (!Y.Lang.isObject(params) || !Y.Lang.isObject(addition)) ? [params].concat(addition) // else merge them as objects, which is a little more complex : mergeObjects(params, addition) ); }, // Merge two *objects* together. If this is called, we've already ruled // out the simple cases, and need to do the for-in business. mergeObjects = function(params, addition) { for (var i in addition) { if (i && addition.hasOwnProperty(i)) { params[i] = mergeParams(params[i], addition[i]); } } return params; }; /** * Accept Query Strings and return native JavaScript objects. * * @method parse * @param qs {String} Querystring to be parsed into an object. * @param sep {String} (optional) Character that should join param k=v pairs together. Default: "&" * @param eq {String} (optional) Character that should join keys to their values. Default: "=" * @public * @static */ QueryString.parse = function (qs, sep, eq) { // wouldn't Y.Array(qs.split()).map(pieceParser(eq)).reduce(mergeParams) be prettier? return Y.Array.reduce( Y.Array.map( qs.split(sep || "&"), pieceParser(eq || "=") ), {}, mergeParams ); }; /** * Provides Y.QueryString.unescape method to be able to override default decoding * method. This is important in cases where non-standard delimiters are used, if * the delimiters would not normally be handled properly by the builtin * (en|de)codeURIComponent functions. * Default: replace "+" with " ", and then decodeURIComponent behavior. * * @method unescape * @param s {String} String to be decoded. * @public * @static **/ QueryString.unescape = function (s) { return decodeURIComponent(s.replace(/\+/g, ' ')); }; }, '3.15.0', {"requires": ["yui-base", "array-extras"]});
dakshshah96/cdnjs
ajax/libs/yui/3.15.0/querystring-parse/querystring-parse-debug.js
JavaScript
mit
5,347
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('axis-stacked-base', function (Y, NAME) { /** * Provides core functionality for the handling of stacked numeric axis data for a chart. * * @module charts * @submodule axis-stacked-base */ /** * StackedImpl contains logic for managing stacked numeric data. StackedImpl is used by the following classes: * <ul> * <li>{{#crossLink "StackedAxisBase"}}{{/crossLink}}</li> * <li>{{#crossLink "StackedAxis"}}{{/crossLink}}</li> * </ul> * * @submodule axis-stacked-base * @class StackedImpl * @constructor */ function StackedImpl() { } StackedImpl.NAME = "stackedImpl"; StackedImpl.prototype = { /** * Type of data used in `Data`. * * @property _type * @readOnly * @private */ _type: "stacked", /** * Calculates the maximum and minimum values for the `Data`. * * @method _updateMinAndMax * @private */ _updateMinAndMax: function() { var max = 0, min = 0, pos = 0, neg = 0, len = 0, i = 0, key, num, keys = this.get("keys"), setMin = this.get("setMin"), setMax = this.get("setMax"); for(key in keys) { if(keys.hasOwnProperty(key)) { len = Math.max(len, keys[key].length); } } for(; i < len; ++i) { pos = 0; neg = 0; for(key in keys) { if(keys.hasOwnProperty(key)) { num = keys[key][i]; if(isNaN(num)) { continue; } if(num >= 0) { pos += num; } else { neg += num; } } } if(pos > 0) { max = Math.max(max, pos); } else { max = Math.max(max, neg); } if(neg < 0) { min = Math.min(min, neg); } else { min = Math.min(min, pos); } } this._actualMaximum = max; this._actualMinimum = min; if(setMax) { max = this._setMaximum; } if(setMin) { min = this._setMinimum; } this._roundMinAndMax(min, max, setMin, setMax); } }; Y.StackedImpl = StackedImpl; /** * StackedAxisBase manages stacked numeric data for an axis. * * @class StackedAxisBase * @constructor * @extends AxisBase * @uses StackedImpl * @param {Object} config (optional) Configuration parameters. * @submodule axis-stacked-base */ Y.StackedAxisBase = Y.Base.create("stackedAxisBase", Y.NumericAxisBase, [Y.StackedImpl]); }, '3.15.0', {"requires": ["axis-numeric-base"]});
amitabhaghosh197/cdnjs
ajax/libs/yui/3.15.0/axis-stacked-base/axis-stacked-base-debug.js
JavaScript
mit
3,202
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('pjax', function (Y, NAME) { /** Provides seamless, gracefully degrading Pjax (pushState + Ajax) functionality, which makes it easy to progressively enhance standard links on the page so that they can be loaded normally in old browsers, or via Ajax (with HTML5 history support) in newer browsers. @module pjax @main @since 3.5.0 **/ /** A stack of middleware which forms the default Pjax route. @property defaultRoute @type Array @static @since 3.7.0 **/ var defaultRoute = ['loadContent', '_defaultRoute'], /** Fired when an error occurs while attempting to load a URL via Ajax. @event error @param {Object} content Content extracted from the response, if any. @param {Node} content.node A `Y.Node` instance for a document fragment containing the extracted HTML content. @param {String} [content.title] The title of the HTML page, if any, extracted using the `titleSelector` attribute. If `titleSelector` is not set or if a title could not be found, this property will be `undefined`. @param {String} responseText Raw Ajax response text. @param {Number} status HTTP status code for the Ajax response. @param {String} url The absolute URL that failed to load. @since 3.5.0 **/ EVT_ERROR = 'error', /** Fired when a URL is successfully loaded via Ajax. @event load @param {Object} content Content extracted from the response, if any. @param {Node} content.node A `Y.Node` instance for a document fragment containing the extracted HTML content. @param {String} [content.title] The title of the HTML page, if any, extracted using the `titleSelector` attribute. If `titleSelector` is not set or if a title could not be found, this property will be `undefined`. @param {String} responseText Raw Ajax response text. @param {Number} status HTTP status code for the Ajax response. @param {String} url The absolute URL that was loaded. @since 3.5.0 **/ EVT_LOAD = 'load'; /** Provides seamless, gracefully degrading Pjax (pushState + Ajax) functionality, which makes it easy to progressively enhance standard links on the page so that they can be loaded normally in old browsers, or via Ajax (with HTML5 history support) in newer browsers. @class Pjax @extends Router @uses PjaxBase @uses PjaxContent @constructor @param {Object} [config] Config attributes. @since 3.5.0 **/ Y.Pjax = Y.Base.create('pjax', Y.Router, [Y.PjaxBase, Y.PjaxContent], { // -- Lifecycle Methods ---------------------------------------------------- initializer: function () { this.publish(EVT_ERROR, {defaultFn: this._defCompleteFn}); this.publish(EVT_LOAD, {defaultFn: this._defCompleteFn}); }, // -- Protected Methods ---------------------------------------------------- /** Default Pjax route callback. Fires either the `load` or `error` event based on the status of the `Y.io` request made by the `loadContent()` middleware. **Note:** This route callback assumes that it's called after the `loadContent()` middleware. @method _defaultRoute @param {Object} req Request object. @param {Object} res Response Object. @param {Function} next Function to pass control to the next route callback. @protected @since 3.5.0 @see Y.Pjax.defaultRoute **/ _defaultRoute: function (req, res, next) { var ioResponse = res.ioResponse, status = ioResponse.status, event = status >= 200 && status < 300 ? EVT_LOAD : EVT_ERROR; this.fire(event, { content : res.content, responseText: ioResponse.responseText, status : status, url : req.ioURL }); next(); }, // -- Event Handlers ------------------------------------------------------- /** Default event handler for both the `error` and `load` events. Attempts to insert the loaded content into the `container` node and update the page's title. @method _defCompleteFn @param {EventFacade} e @protected @since 3.5.0 **/ _defCompleteFn: function (e) { var container = this.get('container'), content = e.content; if (container && content.node) { container.setHTML(content.node); } if (content.title && Y.config.doc) { Y.config.doc.title = content.title; } } }, { ATTRS: { /** Node into which content should be inserted when a page is loaded via Pjax. This node's existing contents will be removed to make way for the new content. If not set, loaded content will not be automatically inserted into the page. @attribute container @type Node @default null @since 3.5.0 **/ container: { value : null, setter: Y.one }, // Inherited from Router and already documented there. routes: { value: [ {path: '*', callbacks: defaultRoute} ] } }, // Documented towards the top of this file. defaultRoute: defaultRoute }); }, '3.15.0', {"requires": ["pjax-base", "pjax-content"]});
CristianCantoro/cdnjs
ajax/libs/yui/3.15.0/pjax/pjax-debug.js
JavaScript
mit
5,378
/* YUI 3.15.0 (build 834026e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('recordset-indexer', function (Y, NAME) { /** * Provides the ability to store multiple custom hash tables referencing records in the recordset. * @module recordset * @submodule recordset-indexer */ /** * Plugin that provides the ability to store multiple custom hash tables referencing records in the recordset. * This utility does not support any collision handling. New hash table entries with a used key overwrite older ones. * @class RecordsetIndexer */ function RecordsetIndexer(config) { RecordsetIndexer.superclass.constructor.apply(this, arguments); } Y.mix(RecordsetIndexer, { NS: "indexer", NAME: "recordsetIndexer", ATTRS: { /** * @description Collection of all the hashTables created by the plugin. * The individual tables can be accessed by the key they are hashing against. * * @attribute hashTables * @public * @type object */ hashTables: { value: { } }, keys: { value: { } } } }); Y.extend(RecordsetIndexer, Y.Plugin.Base, { initializer: function(config) { var host = this.get('host'); //setup listeners on recordset events this.onHostEvent('add', Y.bind("_defAddHash", this), host); this.onHostEvent('remove', Y.bind('_defRemoveHash', this), host); this.onHostEvent('update', Y.bind('_defUpdateHash', this), host); }, destructor: function(config) { }, /** * @description Setup the hash table for a given key with all existing records in the recordset * * @method _setHashTable * @param key {string} A key to hash by. * @return obj {object} The created hash table * @private */ _setHashTable: function(key) { var host = this.get('host'), obj = {}, i = 0, len = host.getLength(); for (; i < len; i++) { obj[host._items[i].getValue(key)] = host._items[i]; } return obj; }, //--------------------------------------------- // Syncing Methods //--------------------------------------------- /** * @description Updates all hash tables when a record is added to the recordset * * @method _defAddHash * @private */ _defAddHash: function(e) { var tbl = this.get('hashTables'); //Go through every hashtable that is stored. //in each hashtable, look to see if the key is represented in the object being added. Y.each(tbl, function(v, key) { Y.each(e.added || e.updated, function(o) { //if the object being added has a key which is being stored by hashtable v, add it into the table. if (o.getValue(key)) { v[o.getValue(key)] = o; } }); }); }, /** * @description Updates all hash tables when a record is removed from the recordset * * @method _defRemoveHash * @private */ _defRemoveHash: function(e) { var tbl = this.get('hashTables'), reckey; //Go through every hashtable that is stored. //in each hashtable, look to see if the key is represented in the object being deleted. Y.each(tbl, function(v, key) { Y.each(e.removed || e.overwritten, function(o) { reckey = o.getValue(key); //if the hashtable has a key storing a record, and the key and the record both match the record being deleted, delete that row from the hashtable if (reckey && v[reckey] === o) { delete v[reckey]; } }); }); }, /** * @description Updates all hash tables when the recordset is updated (a combination of add and remove) * * @method _defUpdateHash * @private */ _defUpdateHash: function(e) { //TODO: It will be more performant to create a new method rather than using _defAddHash, _defRemoveHash, due to the number of loops. See commented code. e.added = e.updated; e.removed = e.overwritten; this._defAddHash(e); this._defRemoveHash(e); /* var tbl = this.get('hashTables'), reckey; Y.each(tbl, function(v, key) { Y.each(e.updated, function(o, i) { //delete record from hashtable if it has been overwritten reckey = o.getValue(key); if (reckey) { v[reckey] = o; } //the undefined case is if more records are updated than currently exist in the recordset. if (e.overwritten[i] && (v[e.overwritten[i].getValue(key)] === e.overwritten[i])) { delete v[e.overwritten[i].getValue(key)]; } // if (v[reckey] === o) { // delete v[reckey]; // } // // //add the new updated record if it has a key that corresponds to a hash table // if (o.getValue(key)) { // v[o.getValue(key)] = o; // } }); }); */ }, //--------------------------------------------- // Public Methods //--------------------------------------------- /** * @description Creates a new hash table. * * @method createTable * @param key {string} A key to hash by. * @return tbls[key] {object} The created hash table * @public */ createTable: function(key) { var tbls = this.get('hashTables'); tbls[key] = this._setHashTable(key); this.set('hashTables', tbls); return tbls[key]; }, /** * @description Get a hash table that hashes records by a given key. * * @method getTable * @param key {string} A key to hash by. * @return table {object} The created hash table * @public */ getTable: function(key) { return this.get('hashTables')[key]; } }); Y.namespace("Plugin").RecordsetIndexer = RecordsetIndexer; }, '3.15.0', {"requires": ["recordset-base", "plugin"]});
dryajov/cdnjs
ajax/libs/yui/3.15.0/recordset-indexer/recordset-indexer.js
JavaScript
mit
6,688
YUI.add('widget-stack', function(Y) { /** * Provides stackable (z-index) support for Widgets through an extension. * * @module widget-stack */ var L = Y.Lang, UA = Y.UA, Node = Y.Node, Widget = Y.Widget, ZINDEX = "zIndex", SHIM = "shim", VISIBLE = "visible", BOUNDING_BOX = "boundingBox", RENDER_UI = "renderUI", BIND_UI = "bindUI", SYNC_UI = "syncUI", OFFSET_WIDTH = "offsetWidth", OFFSET_HEIGHT = "offsetHeight", PARENT_NODE = "parentNode", FIRST_CHILD = "firstChild", OWNER_DOCUMENT = "ownerDocument", WIDTH = "width", HEIGHT = "height", PX = "px", // HANDLE KEYS SHIM_DEFERRED = "shimdeferred", SHIM_RESIZE = "shimresize", // Events VisibleChange = "visibleChange", WidthChange = "widthChange", HeightChange = "heightChange", ShimChange = "shimChange", ZIndexChange = "zIndexChange", ContentUpdate = "contentUpdate", // CSS STACKED = "stacked"; /** * Widget extension, which can be used to add stackable (z-index) support to the * base Widget class along with a shimming solution, through the * <a href="Base.html#method_build">Base.build</a> method. * * @class WidgetStack * @param {Object} User configuration object */ function Stack(config) { this._stackNode = this.get(BOUNDING_BOX); this._stackHandles = {}; // WIDGET METHOD OVERLAP Y.after(this._renderUIStack, this, RENDER_UI); Y.after(this._syncUIStack, this, SYNC_UI); Y.after(this._bindUIStack, this, BIND_UI); } // Static Properties /** * Static property used to define the default attribute * configuration introduced by WidgetStack. * * @property ATTRS * @type Object * @static */ Stack.ATTRS = { /** * @attribute shim * @type boolean * @default false, for all browsers other than IE6, for which a shim is enabled by default. * * @description Boolean flag to indicate whether or not a shim should be added to the Widgets * boundingBox, to protect it from select box bleedthrough. */ shim: { value: (UA.ie == 6) }, /** * @attribute zIndex * @type number * @default 0 * @description The z-index to apply to the Widgets boundingBox. Non-numerical values for * zIndex will be converted to 0 */ zIndex: { value:1, setter: function(val) { return this._setZIndex(val); } } }; /** * The HTML parsing rules for the WidgetStack class. * * @property HTML_PARSER * @static * @type Object */ Stack.HTML_PARSER = { zIndex: function(contentBox) { return contentBox.getStyle(ZINDEX); } }; /** * Default class used to mark the shim element * * @property SHIM_CLASS_NAME * @type String * @static * @default "yui3-widget-shim" */ Stack.SHIM_CLASS_NAME = Widget.getClassName(SHIM); /** * Default class used to mark the boundingBox of a stacked widget. * * @property STACKED_CLASS_NAME * @type String * @static * @default "yui3-widget-stacked" */ Stack.STACKED_CLASS_NAME = Widget.getClassName(STACKED); /** * Default markup template used to generate the shim element. * * @property SHIM_TEMPLATE * @type String * @static */ Stack.SHIM_TEMPLATE = '<iframe class="' + Stack.SHIM_CLASS_NAME + '" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>'; Stack.prototype = { /** * Synchronizes the UI to match the Widgets stack state. This method in * invoked after syncUI is invoked for the Widget class using YUI's aop infrastructure. * * @method _syncUIStack * @protected */ _syncUIStack: function() { this._uiSetShim(this.get(SHIM)); this._uiSetZIndex(this.get(ZINDEX)); }, /** * Binds event listeners responsible for updating the UI state in response to * Widget stack related state changes. * <p> * This method is invoked after bindUI is invoked for the Widget class * using YUI's aop infrastructure. * </p> * @method _bindUIStack * @protected */ _bindUIStack: function() { this.after(ShimChange, this._afterShimChange); this.after(ZIndexChange, this._afterZIndexChange); }, /** * Creates/Initializes the DOM to support stackability. * <p> * This method in invoked after renderUI is invoked for the Widget class * using YUI's aop infrastructure. * </p> * @method _renderUIStack * @protected */ _renderUIStack: function() { this._stackNode.addClass(Stack.STACKED_CLASS_NAME); }, /** * Default setter for zIndex attribute changes. Normalizes zIndex values to * numbers, converting non-numerical values to 0. * * @method _setZIndex * @protected * @param {String | Number} zIndex * @return {Number} Normalized zIndex */ _setZIndex: function(zIndex) { if (L.isString(zIndex)) { zIndex = parseInt(zIndex, 10); } if (!L.isNumber(zIndex)) { zIndex = 0; } return zIndex; }, /** * Default attribute change listener for the shim attribute, responsible * for updating the UI, in response to attribute changes. * * @method _afterShimChange * @protected * @param {EventFacade} e The event facade for the attribute change */ _afterShimChange : function(e) { this._uiSetShim(e.newVal); }, /** * Default attribute change listener for the zIndex attribute, responsible * for updating the UI, in response to attribute changes. * * @method _afterZIndexChange * @protected * @param {EventFacade} e The event facade for the attribute change */ _afterZIndexChange : function(e) { this._uiSetZIndex(e.newVal); }, /** * Updates the UI to reflect the zIndex value passed in. * * @method _uiSetZIndex * @protected * @param {number} zIndex The zindex to be reflected in the UI */ _uiSetZIndex: function (zIndex) { this._stackNode.setStyle(ZINDEX, zIndex); }, /** * Updates the UI to enable/disable the shim. If the widget is not currently visible, * creation of the shim is deferred until it is made visible, for performance reasons. * * @method _uiSetShim * @protected * @param {boolean} enable If true, creates/renders the shim, if false, removes it. */ _uiSetShim: function (enable) { if (enable) { // Lazy creation if (this.get(VISIBLE)) { this._renderShim(); } else { this._renderShimDeferred(); } // Eagerly attach resize handlers // // Required because of Event stack behavior, commit ref: cd8dddc // Should be revisted after Ticket #2531067 is resolved. if (UA.ie == 6) { this._addShimResizeHandlers(); } } else { this._destroyShim(); } }, /** * Sets up change handlers for the visible attribute, to defer shim creation/rendering * until the Widget is made visible. * * @method _renderShimDeferred * @private */ _renderShimDeferred : function() { this._stackHandles[SHIM_DEFERRED] = this._stackHandles[SHIM_DEFERRED] || []; var handles = this._stackHandles[SHIM_DEFERRED], createBeforeVisible = function(e) { if (e.newVal) { this._renderShim(); } }; handles.push(this.on(VisibleChange, createBeforeVisible)); // Depending how how Ticket #2531067 is resolved, a reversal of // commit ref: cd8dddc could lead to a more elagent solution, with // the addition of this line here: // // handles.push(this.after(VisibleChange, this.sizeShim)); }, /** * Sets up event listeners to resize the shim when the size of the Widget changes. * <p> * NOTE: This method is only used for IE6 currently, since IE6 doesn't support a way to * resize the shim purely through CSS, when the Widget does not have an explicit width/height * set. * </p> * @method _addShimResizeHandlers * @private */ _addShimResizeHandlers : function() { this._stackHandles[SHIM_RESIZE] = this._stackHandles[SHIM_RESIZE] || []; var sizeShim = this.sizeShim, handles = this._stackHandles[SHIM_RESIZE]; handles.push(this.after(VisibleChange, sizeShim)); handles.push(this.after(WidthChange, sizeShim)); handles.push(this.after(HeightChange, sizeShim)); handles.push(this.after(ContentUpdate, sizeShim)); }, /** * Detaches any handles stored for the provided key * * @method _detachStackHandles * @param String handleKey The key defining the group of handles which should be detached * @private */ _detachStackHandles : function(handleKey) { var handles = this._stackHandles[handleKey], handle; if (handles && handles.length > 0) { while((handle = handles.pop())) { handle.detach(); } } }, /** * Creates the shim element and adds it to the DOM * * @method _renderShim * @private */ _renderShim : function() { var shimEl = this._shimNode, stackEl = this._stackNode; if (!shimEl) { shimEl = this._shimNode = this._getShimTemplate(); stackEl.insertBefore(shimEl, stackEl.get(FIRST_CHILD)); this._detachStackHandles(SHIM_DEFERRED); this.sizeShim(); } }, /** * Removes the shim from the DOM, and detaches any related event * listeners. * * @method _destroyShim * @private */ _destroyShim : function() { if (this._shimNode) { this._shimNode.get(PARENT_NODE).removeChild(this._shimNode); this._shimNode = null; this._detachStackHandles(SHIM_DEFERRED); this._detachStackHandles(SHIM_RESIZE); } }, /** * For IE6, synchronizes the size and position of iframe shim to that of * Widget bounding box which it is protecting. For all other browsers, * this method does not do anything. * * @method sizeShim */ sizeShim: function () { var shim = this._shimNode, node = this._stackNode; if (shim && UA.ie === 6 && this.get(VISIBLE)) { shim.setStyle(WIDTH, node.get(OFFSET_WIDTH) + PX); shim.setStyle(HEIGHT, node.get(OFFSET_HEIGHT) + PX); } }, /** * Creates a cloned shim node, using the SHIM_TEMPLATE html template, for use on a new instance. * * @method _getShimTemplate * @private * @return {Node} node A new shim Node instance. */ _getShimTemplate : function() { return Node.create(Stack.SHIM_TEMPLATE, this._stackNode.get(OWNER_DOCUMENT)); } }; Y.WidgetStack = Stack; }, '@VERSION@' ,{requires:['base-build', 'widget']});
dakshshah96/cdnjs
ajax/libs/yui/3.4.1/widget-stack/widget-stack.js
JavaScript
mit
12,647
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; -moz-background-clip: padding; -webkit-background-clip: padding-box; background-clip: padding-box; -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; z-index: 2000; position: fixed; margin: auto; top: 12px; left: 0; right: 0; bottom: 0; width: 200px; height: 25px; border: 2px solid #2299dd; background-color: #fff; } .pace .pace-progress { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; -webkit-border-radius: 5px; -moz-border-radius: 5px; border-radius: 5px; -webkit-background-clip: padding-box; -moz-background-clip: padding; background-clip: padding-box; -webkit-transform: translate3d(0, 0, 0); transform: translate3d(0, 0, 0); max-width: 190px; position: fixed; z-index: 2000; display: block; position: absolute; left: 3px; top: 3px; height: 15px; font-size: 12px; background: #2299dd; color: #2299dd; line-height: 60px; font-weight: bold; font-family: Helvetica, Arial, "Lucida Grande", sans-serif; } .pace .pace-progress:after { content: attr(data-progress-text); display: inline-block; } .pace.pace-inactive { display: none; }
voronianski/cdnjs
ajax/libs/pace/0.7.1/themes/blue/pace-theme-loading-bar.css
CSS
mit
1,639
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; -webkit-perspective: 12rem; -moz-perspective: 12rem; -ms-perspective: 12rem; -o-perspective: 12rem; perspective: 12rem; z-index: 2000; position: fixed; height: 6rem; width: 6rem; margin: auto; top: 0; left: 0; right: 0; bottom: 0; } .pace.pace-inactive .pace-progress { display: none; } .pace .pace-progress { position: fixed; z-index: 2000; display: block; position: absolute; left: 0; top: 0; height: 6rem; width: 6rem !important; line-height: 6rem; font-size: 2rem; border-radius: 50%; background: rgba(34, 153, 221, 0.8); color: #fff; font-family: "Helvetica Neue", sans-serif; font-weight: 100; text-align: center; -webkit-animation: pace-theme-center-circle-spin linear infinite 2s; -moz-animation: pace-theme-center-circle-spin linear infinite 2s; -ms-animation: pace-theme-center-circle-spin linear infinite 2s; -o-animation: pace-theme-center-circle-spin linear infinite 2s; animation: pace-theme-center-circle-spin linear infinite 2s; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; -o-transform-style: preserve-3d; transform-style: preserve-3d; } .pace .pace-progress:after { content: attr(data-progress-text); display: block; } @-webkit-keyframes pace-theme-center-circle-spin { from { -webkit-transform: rotateY(0deg) } to { -webkit-transform: rotateY(360deg) } } @-moz-keyframes pace-theme-center-circle-spin { from { -moz-transform: rotateY(0deg) } to { -moz-transform: rotateY(360deg) } } @-ms-keyframes pace-theme-center-circle-spin { from { -ms-transform: rotateY(0deg) } to { -ms-transform: rotateY(360deg) } } @-o-keyframes pace-theme-center-circle-spin { from { -o-transform: rotateY(0deg) } to { -o-transform: rotateY(360deg) } } @keyframes pace-theme-center-circle-spin { from { transform: rotateY(0deg) } to { transform: rotateY(360deg) } }
towerz/jsdelivr
files/pace/1.0.2/themes/blue/pace-theme-center-circle.css
CSS
mit
2,172
if (typeof __coverage__ === 'undefined') { __coverage__ = {}; } if (!__coverage__['build/yui-log/yui-log.js']) { __coverage__['build/yui-log/yui-log.js'] = {"path":"build/yui-log/yui-log.js","s":{"1":0,"2":0,"3":0,"4":0,"5":0,"6":0,"7":0,"8":0,"9":0,"10":0,"11":0,"12":0,"13":0,"14":0,"15":0,"16":0,"17":0,"18":0,"19":0,"20":0,"21":0,"22":0,"23":0,"24":0,"25":0,"26":0,"27":0,"28":0,"29":0,"30":0,"31":0,"32":0,"33":0,"34":0,"35":0,"36":0},"b":{"1":[0,0],"2":[0,0],"3":[0,0],"4":[0,0],"5":[0,0],"6":[0,0],"7":[0,0],"8":[0,0],"9":[0,0],"10":[0,0],"11":[0,0],"12":[0,0],"13":[0,0],"14":[0,0],"15":[0,0],"16":[0,0],"17":[0,0],"18":[0,0],"19":[0,0],"20":[0,0],"21":[0,0,0],"22":[0,0],"23":[0,0],"24":[0,0],"25":[0,0],"26":[0,0]},"f":{"1":0,"2":0,"3":0},"fnMap":{"1":{"name":"(anonymous_1)","line":1,"loc":{"start":{"line":1,"column":19},"end":{"line":1,"column":38}}},"2":{"name":"(anonymous_2)","line":39,"loc":{"start":{"line":39,"column":15},"end":{"line":39,"column":47}}},"3":{"name":"(anonymous_3)","line":115,"loc":{"start":{"line":115,"column":19},"end":{"line":115,"column":30}}}},"statementMap":{"1":{"start":{"line":1,"column":0},"end":{"line":120,"column":44}},"2":{"start":{"line":12,"column":0},"end":{"line":18,"column":26}},"3":{"start":{"line":39,"column":0},"end":{"line":100,"column":2}},"4":{"start":{"line":40,"column":4},"end":{"line":43,"column":56}},"5":{"start":{"line":46,"column":4},"end":{"line":97,"column":5}},"6":{"start":{"line":48,"column":8},"end":{"line":48,"column":24}},"7":{"start":{"line":49,"column":8},"end":{"line":68,"column":9}},"8":{"start":{"line":50,"column":12},"end":{"line":50,"column":32}},"9":{"start":{"line":51,"column":12},"end":{"line":51,"column":32}},"10":{"start":{"line":52,"column":12},"end":{"line":58,"column":13}},"11":{"start":{"line":53,"column":16},"end":{"line":53,"column":25}},"12":{"start":{"line":54,"column":19},"end":{"line":58,"column":13}},"13":{"start":{"line":55,"column":16},"end":{"line":55,"column":34}},"14":{"start":{"line":56,"column":19},"end":{"line":58,"column":13}},"15":{"start":{"line":57,"column":16},"end":{"line":57,"column":33}},"16":{"start":{"line":61,"column":12},"end":{"line":61,"column":61}},"17":{"start":{"line":62,"column":12},"end":{"line":62,"column":63}},"18":{"start":{"line":64,"column":12},"end":{"line":67,"column":13}},"19":{"start":{"line":66,"column":16},"end":{"line":66,"column":25}},"20":{"start":{"line":69,"column":8},"end":{"line":96,"column":9}},"21":{"start":{"line":70,"column":12},"end":{"line":80,"column":13}},"22":{"start":{"line":71,"column":16},"end":{"line":71,"column":51}},"23":{"start":{"line":72,"column":16},"end":{"line":79,"column":17}},"24":{"start":{"line":73,"column":20},"end":{"line":73,"column":51}},"25":{"start":{"line":74,"column":23},"end":{"line":79,"column":17}},"26":{"start":{"line":75,"column":20},"end":{"line":75,"column":79}},"27":{"start":{"line":76,"column":20},"end":{"line":76,"column":34}},"28":{"start":{"line":77,"column":23},"end":{"line":79,"column":17}},"29":{"start":{"line":78,"column":20},"end":{"line":78,"column":39}},"30":{"start":{"line":82,"column":12},"end":{"line":95,"column":13}},"31":{"start":{"line":84,"column":16},"end":{"line":88,"column":17}},"32":{"start":{"line":85,"column":20},"end":{"line":87,"column":23}},"33":{"start":{"line":90,"column":16},"end":{"line":94,"column":19}},"34":{"start":{"line":99,"column":4},"end":{"line":99,"column":13}},"35":{"start":{"line":115,"column":0},"end":{"line":117,"column":2}},"36":{"start":{"line":116,"column":4},"end":{"line":116,"column":51}}},"branchMap":{"1":{"line":43,"type":"cond-expr","locations":[{"start":{"line":43,"column":31},"end":{"line":43,"column":32}},{"start":{"line":43,"column":35},"end":{"line":43,"column":55}}]},"2":{"line":46,"type":"if","locations":[{"start":{"line":46,"column":4},"end":{"line":46,"column":4}},{"start":{"line":46,"column":4},"end":{"line":46,"column":4}}]},"3":{"line":48,"type":"binary-expr","locations":[{"start":{"line":48,"column":14},"end":{"line":48,"column":17}},{"start":{"line":48,"column":21},"end":{"line":48,"column":23}}]},"4":{"line":49,"type":"if","locations":[{"start":{"line":49,"column":8},"end":{"line":49,"column":8}},{"start":{"line":49,"column":8},"end":{"line":49,"column":8}}]},"5":{"line":52,"type":"if","locations":[{"start":{"line":52,"column":12},"end":{"line":52,"column":12}},{"start":{"line":52,"column":12},"end":{"line":52,"column":12}}]},"6":{"line":52,"type":"binary-expr","locations":[{"start":{"line":52,"column":16},"end":{"line":52,"column":20}},{"start":{"line":52,"column":24},"end":{"line":52,"column":38}}]},"7":{"line":54,"type":"if","locations":[{"start":{"line":54,"column":19},"end":{"line":54,"column":19}},{"start":{"line":54,"column":19},"end":{"line":54,"column":19}}]},"8":{"line":54,"type":"binary-expr","locations":[{"start":{"line":54,"column":23},"end":{"line":54,"column":27}},{"start":{"line":54,"column":32},"end":{"line":54,"column":43}}]},"9":{"line":56,"type":"if","locations":[{"start":{"line":56,"column":19},"end":{"line":56,"column":19}},{"start":{"line":56,"column":19},"end":{"line":56,"column":19}}]},"10":{"line":56,"type":"binary-expr","locations":[{"start":{"line":56,"column":23},"end":{"line":56,"column":27}},{"start":{"line":56,"column":32},"end":{"line":56,"column":43}}]},"11":{"line":61,"type":"binary-expr","locations":[{"start":{"line":61,"column":32},"end":{"line":61,"column":49}},{"start":{"line":61,"column":53},"end":{"line":61,"column":60}}]},"12":{"line":64,"type":"if","locations":[{"start":{"line":64,"column":12},"end":{"line":64,"column":12}},{"start":{"line":64,"column":12},"end":{"line":64,"column":12}}]},"13":{"line":64,"type":"binary-expr","locations":[{"start":{"line":64,"column":16},"end":{"line":64,"column":29}},{"start":{"line":64,"column":33},"end":{"line":64,"column":55}}]},"14":{"line":69,"type":"if","locations":[{"start":{"line":69,"column":8},"end":{"line":69,"column":8}},{"start":{"line":69,"column":8},"end":{"line":69,"column":8}}]},"15":{"line":70,"type":"if","locations":[{"start":{"line":70,"column":12},"end":{"line":70,"column":12}},{"start":{"line":70,"column":12},"end":{"line":70,"column":12}}]},"16":{"line":71,"type":"cond-expr","locations":[{"start":{"line":71,"column":28},"end":{"line":71,"column":44}},{"start":{"line":71,"column":47},"end":{"line":71,"column":50}}]},"17":{"line":72,"type":"if","locations":[{"start":{"line":72,"column":16},"end":{"line":72,"column":16}},{"start":{"line":72,"column":16},"end":{"line":72,"column":16}}]},"18":{"line":74,"type":"if","locations":[{"start":{"line":74,"column":23},"end":{"line":74,"column":23}},{"start":{"line":74,"column":23},"end":{"line":74,"column":23}}]},"19":{"line":74,"type":"binary-expr","locations":[{"start":{"line":74,"column":27},"end":{"line":74,"column":55}},{"start":{"line":74,"column":59},"end":{"line":74,"column":70}}]},"20":{"line":75,"type":"cond-expr","locations":[{"start":{"line":75,"column":67},"end":{"line":75,"column":70}},{"start":{"line":75,"column":73},"end":{"line":75,"column":78}}]},"21":{"line":75,"type":"binary-expr","locations":[{"start":{"line":75,"column":25},"end":{"line":75,"column":28}},{"start":{"line":75,"column":32},"end":{"line":75,"column":44}},{"start":{"line":75,"column":49},"end":{"line":75,"column":62}}]},"22":{"line":77,"type":"if","locations":[{"start":{"line":77,"column":23},"end":{"line":77,"column":23}},{"start":{"line":77,"column":23},"end":{"line":77,"column":23}}]},"23":{"line":82,"type":"if","locations":[{"start":{"line":82,"column":12},"end":{"line":82,"column":12}},{"start":{"line":82,"column":12},"end":{"line":82,"column":12}}]},"24":{"line":82,"type":"binary-expr","locations":[{"start":{"line":82,"column":16},"end":{"line":82,"column":25}},{"start":{"line":82,"column":29},"end":{"line":82,"column":36}}]},"25":{"line":84,"type":"if","locations":[{"start":{"line":84,"column":16},"end":{"line":84,"column":16}},{"start":{"line":84,"column":16},"end":{"line":84,"column":16}}]},"26":{"line":84,"type":"binary-expr","locations":[{"start":{"line":84,"column":20},"end":{"line":84,"column":35}},{"start":{"line":84,"column":40},"end":{"line":84,"column":69}}]}},"code":["(function () { YUI.add('yui-log', function (Y, NAME) {","","/**"," * Provides console log capability and exposes a custom event for"," * console implementations. This module is a `core` YUI module,"," * <a href=\"../classes/YUI.html#method_log\">it's documentation is located under the YUI class</a>."," *"," * @module yui"," * @submodule yui-log"," */","","var INSTANCE = Y,"," LOGEVENT = 'yui:log',"," UNDEFINED = 'undefined',"," LEVELS = { debug: 1,"," info: 2,"," warn: 4,"," error: 8 };","","/**"," * If the 'debug' config is true, a 'yui:log' event will be"," * dispatched, which the Console widget and anything else"," * can consume. If the 'useBrowserConsole' config is true, it will"," * write to the browser console if available. YUI-specific log"," * messages will only be present in the -debug versions of the"," * JS files. The build system is supposed to remove log statements"," * from the raw and minified versions of the files."," *"," * @method log"," * @for YUI"," * @param {String} msg The message to log."," * @param {String} cat The log category for the message. Default"," * categories are \"info\", \"warn\", \"error\", time\"."," * Custom categories can be used as well. (opt)."," * @param {String} src The source of the the message (opt)."," * @param {boolean} silent If true, the log event won't fire."," * @return {YUI} YUI instance."," */","INSTANCE.log = function(msg, cat, src, silent) {"," var bail, excl, incl, m, f, minlevel,"," Y = INSTANCE,"," c = Y.config,"," publisher = (Y.fire) ? Y : YUI.Env.globalEvents;"," // suppress log message if the config is off or the event stack"," // or the event call stack contains a consumer of the yui:log event"," if (c.debug) {"," // apply source filters"," src = src || \"\";"," if (typeof src !== \"undefined\") {"," excl = c.logExclude;"," incl = c.logInclude;"," if (incl && !(src in incl)) {"," bail = 1;"," } else if (incl && (src in incl)) {"," bail = !incl[src];"," } else if (excl && (src in excl)) {"," bail = excl[src];"," }",""," // Determine the current minlevel as defined in configuration"," Y.config.logLevel = Y.config.logLevel || 'debug';"," minlevel = LEVELS[Y.config.logLevel.toLowerCase()];",""," if (cat in LEVELS && LEVELS[cat] < minlevel) {"," // Skip this message if the we don't meet the defined minlevel"," bail = 1;"," }"," }"," if (!bail) {"," if (c.useBrowserConsole) {"," m = (src) ? src + ': ' + msg : msg;"," if (Y.Lang.isFunction(c.logFn)) {"," c.logFn.call(Y, msg, cat, src);"," } else if (typeof console !== UNDEFINED && console.log) {"," f = (cat && console[cat] && (cat in LEVELS)) ? cat : 'log';"," console[f](m);"," } else if (typeof opera !== UNDEFINED) {"," opera.postError(m);"," }"," }",""," if (publisher && !silent) {",""," if (publisher === Y && (!publisher.getEvent(LOGEVENT))) {"," publisher.publish(LOGEVENT, {"," broadcast: 2"," });"," }",""," publisher.fire(LOGEVENT, {"," msg: msg,"," cat: cat,"," src: src"," });"," }"," }"," }",""," return Y;","};","","/**"," * Write a system message. This message will be preserved in the"," * minified and raw versions of the YUI files, unlike log statements."," * @method message"," * @for YUI"," * @param {String} msg The message to log."," * @param {String} cat The log category for the message. Default"," * categories are \"info\", \"warn\", \"error\", time\"."," * Custom categories can be used as well. (opt)."," * @param {String} src The source of the the message (opt)."," * @param {boolean} silent If true, the log event won't fire."," * @return {YUI} YUI instance."," */","INSTANCE.message = function() {"," return INSTANCE.log.apply(INSTANCE, arguments);","};","","","}, '@VERSION@', {\"requires\": [\"yui-base\"]});","","}());"]}; } var __cov_YpqVYeAaZQ2HpWzcq57hPA = __coverage__['build/yui-log/yui-log.js']; __cov_YpqVYeAaZQ2HpWzcq57hPA.s['1']++;YUI.add('yui-log',function(Y,NAME){__cov_YpqVYeAaZQ2HpWzcq57hPA.f['1']++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['2']++;var INSTANCE=Y,LOGEVENT='yui:log',UNDEFINED='undefined',LEVELS={debug:1,info:2,warn:4,error:8};__cov_YpqVYeAaZQ2HpWzcq57hPA.s['3']++;INSTANCE.log=function(msg,cat,src,silent){__cov_YpqVYeAaZQ2HpWzcq57hPA.f['2']++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['4']++;var bail,excl,incl,m,f,minlevel,Y=INSTANCE,c=Y.config,publisher=Y.fire?(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['1'][0]++,Y):(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['1'][1]++,YUI.Env.globalEvents);__cov_YpqVYeAaZQ2HpWzcq57hPA.s['5']++;if(c.debug){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['2'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['6']++;src=(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['3'][0]++,src)||(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['3'][1]++,'');__cov_YpqVYeAaZQ2HpWzcq57hPA.s['7']++;if(typeof src!=='undefined'){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['4'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['8']++;excl=c.logExclude;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['9']++;incl=c.logInclude;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['10']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['6'][0]++,incl)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['6'][1]++,!(src in incl))){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['5'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['11']++;bail=1;}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['5'][1]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['12']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['8'][0]++,incl)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['8'][1]++,src in incl)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['7'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['13']++;bail=!incl[src];}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['7'][1]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['14']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['10'][0]++,excl)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['10'][1]++,src in excl)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['9'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['15']++;bail=excl[src];}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['9'][1]++;}}}__cov_YpqVYeAaZQ2HpWzcq57hPA.s['16']++;Y.config.logLevel=(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['11'][0]++,Y.config.logLevel)||(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['11'][1]++,'debug');__cov_YpqVYeAaZQ2HpWzcq57hPA.s['17']++;minlevel=LEVELS[Y.config.logLevel.toLowerCase()];__cov_YpqVYeAaZQ2HpWzcq57hPA.s['18']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['13'][0]++,cat in LEVELS)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['13'][1]++,LEVELS[cat]<minlevel)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['12'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['19']++;bail=1;}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['12'][1]++;}}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['4'][1]++;}__cov_YpqVYeAaZQ2HpWzcq57hPA.s['20']++;if(!bail){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['14'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['21']++;if(c.useBrowserConsole){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['15'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['22']++;m=src?(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['16'][0]++,src+': '+msg):(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['16'][1]++,msg);__cov_YpqVYeAaZQ2HpWzcq57hPA.s['23']++;if(Y.Lang.isFunction(c.logFn)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['17'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['24']++;c.logFn.call(Y,msg,cat,src);}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['17'][1]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['25']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['19'][0]++,typeof console!==UNDEFINED)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['19'][1]++,console.log)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['18'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['26']++;f=(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['21'][0]++,cat)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['21'][1]++,console[cat])&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['21'][2]++,cat in LEVELS)?(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['20'][0]++,cat):(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['20'][1]++,'log');__cov_YpqVYeAaZQ2HpWzcq57hPA.s['27']++;console[f](m);}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['18'][1]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['28']++;if(typeof opera!==UNDEFINED){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['22'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['29']++;opera.postError(m);}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['22'][1]++;}}}}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['15'][1]++;}__cov_YpqVYeAaZQ2HpWzcq57hPA.s['30']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['24'][0]++,publisher)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['24'][1]++,!silent)){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['23'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['31']++;if((__cov_YpqVYeAaZQ2HpWzcq57hPA.b['26'][0]++,publisher===Y)&&(__cov_YpqVYeAaZQ2HpWzcq57hPA.b['26'][1]++,!publisher.getEvent(LOGEVENT))){__cov_YpqVYeAaZQ2HpWzcq57hPA.b['25'][0]++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['32']++;publisher.publish(LOGEVENT,{broadcast:2});}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['25'][1]++;}__cov_YpqVYeAaZQ2HpWzcq57hPA.s['33']++;publisher.fire(LOGEVENT,{msg:msg,cat:cat,src:src});}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['23'][1]++;}}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['14'][1]++;}}else{__cov_YpqVYeAaZQ2HpWzcq57hPA.b['2'][1]++;}__cov_YpqVYeAaZQ2HpWzcq57hPA.s['34']++;return Y;};__cov_YpqVYeAaZQ2HpWzcq57hPA.s['35']++;INSTANCE.message=function(){__cov_YpqVYeAaZQ2HpWzcq57hPA.f['3']++;__cov_YpqVYeAaZQ2HpWzcq57hPA.s['36']++;return INSTANCE.log.apply(INSTANCE,arguments);};},'@VERSION@',{'requires':['yui-base']});
platanus/cdnjs
ajax/libs/yui/3.13.0/yui-log/yui-log-coverage.js
JavaScript
mit
17,839
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { width: 140px; height: 300px; position: fixed; top: -90px; right: -20px; z-index: 2000; -webkit-transform: scale(0); -moz-transform: scale(0); -ms-transform: scale(0); -o-transform: scale(0); transform: scale(0); opacity: 0; -webkit-transition: all 2s linear 0s; -moz-transition: all 2s linear 0s; transition: all 2s linear 0s; } .pace.pace-active { -webkit-transform: scale(.25); -moz-transform: scale(.25); -ms-transform: scale(.25); -o-transform: scale(.25); transform: scale(.25); opacity: 1; } .pace .pace-activity { width: 140px; height: 140px; border-radius: 70px; background: #d6d6d6; position: absolute; top: 0; z-index: 1911; -webkit-animation: pace-bounce 1s infinite; -moz-animation: pace-bounce 1s infinite; -o-animation: pace-bounce 1s infinite; -ms-animation: pace-bounce 1s infinite; animation: pace-bounce 1s infinite; } .pace .pace-progress { position: absolute; display: block; left: 50%; bottom: 0; z-index: 1910; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -webkit-transform: scaleY(.3); -moz-transform: scaleY(.3); -ms-transform: scaleY(.3); -o-transform: scaleY(.3); transform: scaleY(.3); -webkit-animation: pace-compress .5s infinite alternate; -moz-animation: pace-compress .5s infinite alternate; -o-animation: pace-compress .5s infinite alternate; -ms-animation: pace-compress .5s infinite alternate; animation: pace-compress .5s infinite alternate; } @-webkit-keyframes pace-bounce { 0% { top: 0; -webkit-animation-timing-function: ease-in; } 40% {} 50% { top: 140px; height: 140px; -webkit-animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; -webkit-animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; -webkit-animation-timing-function: ease-out; } 95% { top: 0; -webkit-animation-timing-function: ease-in; } 100% { top: 0; -webkit-animation-timing-function: ease-in; } } @-moz-keyframes pace-bounce { 0% { top: 0; -moz-animation-timing-function: ease-in; } 40% {} 50% { top: 140px; height: 140px; -moz-animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; -moz-animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; -moz-animation-timing-function: ease-out;} 95% { top: 0; -moz-animation-timing-function: ease-in; } 100% {top: 0; -moz-animation-timing-function: ease-in; } } @keyframes pace-bounce { 0% { top: 0; animation-timing-function: ease-in; } 50% { top: 140px; height: 140px; animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; animation-timing-function: ease-out; } 95% { top: 0; animation-timing-function: ease-in; } 100% { top: 0; animation-timing-function: ease-in; } } @-webkit-keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -webkit-animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; -webkit-animation-timing-function: ease-out; } } @-moz-keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -moz-animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; -moz-animation-timing-function: ease-out; } } @keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; animation-timing-function: ease-out; } }
dakshshah96/cdnjs
ajax/libs/pace/0.6.0/themes/silver/pace-theme-bounce.css
CSS
mit
5,046
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; z-index: 2000; position: fixed; height: 90px; width: 90px; margin: auto; top: 0; left: 0; right: 0; bottom: 0; } .pace.pace-inactive .pace-activity { display: none; } .pace .pace-activity { position: fixed; z-index: 2000; display: block; position: absolute; left: -30px; top: -30px; height: 90px; width: 90px; display: block; border-width: 30px; border-style: double; border-color: #d6d6d6 transparent transparent; border-radius: 50%; -webkit-animation: spin 1s linear infinite; -moz-animation: spin 1s linear infinite; -o-animation: spin 1s linear infinite; animation: spin 1s linear infinite; } .pace .pace-activity:before { content: ' '; position: absolute; top: 10px; left: 10px; height: 50px; width: 50px; display: block; border-width: 10px; border-style: solid; border-color: #d6d6d6 transparent transparent; border-radius: 50%; } @-webkit-keyframes spin { 100% { -webkit-transform: rotate(359deg); } } @-moz-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @-o-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @keyframes spin { 100% { transform: rotate(359deg); } }
dhenson02/cdnjs
ajax/libs/pace/0.7.5/themes/silver/pace-theme-center-radar.css
CSS
mit
1,359
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { width: 140px; height: 300px; position: fixed; top: -90px; right: -20px; z-index: 2000; -webkit-transform: scale(0); -moz-transform: scale(0); -ms-transform: scale(0); -o-transform: scale(0); transform: scale(0); opacity: 0; -webkit-transition: all 2s linear 0s; -moz-transition: all 2s linear 0s; transition: all 2s linear 0s; } .pace.pace-active { -webkit-transform: scale(.25); -moz-transform: scale(.25); -ms-transform: scale(.25); -o-transform: scale(.25); transform: scale(.25); opacity: 1; } .pace .pace-activity { width: 140px; height: 140px; border-radius: 70px; background: #ffffff; position: absolute; top: 0; z-index: 1911; -webkit-animation: pace-bounce 1s infinite; -moz-animation: pace-bounce 1s infinite; -o-animation: pace-bounce 1s infinite; -ms-animation: pace-bounce 1s infinite; animation: pace-bounce 1s infinite; } .pace .pace-progress { position: absolute; display: block; left: 50%; bottom: 0; z-index: 1910; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -webkit-transform: scaleY(.3); -moz-transform: scaleY(.3); -ms-transform: scaleY(.3); -o-transform: scaleY(.3); transform: scaleY(.3); -webkit-animation: pace-compress .5s infinite alternate; -moz-animation: pace-compress .5s infinite alternate; -o-animation: pace-compress .5s infinite alternate; -ms-animation: pace-compress .5s infinite alternate; animation: pace-compress .5s infinite alternate; } @-webkit-keyframes pace-bounce { 0% { top: 0; -webkit-animation-timing-function: ease-in; } 40% {} 50% { top: 140px; height: 140px; -webkit-animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; -webkit-animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; -webkit-animation-timing-function: ease-out; } 95% { top: 0; -webkit-animation-timing-function: ease-in; } 100% { top: 0; -webkit-animation-timing-function: ease-in; } } @-moz-keyframes pace-bounce { 0% { top: 0; -moz-animation-timing-function: ease-in; } 40% {} 50% { top: 140px; height: 140px; -moz-animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; -moz-animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; -moz-animation-timing-function: ease-out;} 95% { top: 0; -moz-animation-timing-function: ease-in; } 100% {top: 0; -moz-animation-timing-function: ease-in; } } @keyframes pace-bounce { 0% { top: 0; animation-timing-function: ease-in; } 50% { top: 140px; height: 140px; animation-timing-function: ease-out; } 55% { top: 160px; height: 120px; border-radius: 70px / 60px; animation-timing-function: ease-in; } 65% { top: 120px; height: 140px; border-radius: 70px; animation-timing-function: ease-out; } 95% { top: 0; animation-timing-function: ease-in; } 100% { top: 0; animation-timing-function: ease-in; } } @-webkit-keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -webkit-animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; -webkit-animation-timing-function: ease-out; } } @-moz-keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; -moz-animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; -moz-animation-timing-function: ease-out; } } @keyframes pace-compress { 0% { bottom: 0; margin-left: -30px; width: 60px; height: 75px; background: rgba(20, 20, 20, .1); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .1); border-radius: 30px / 40px; animation-timing-function: ease-in; } 100% { bottom: 30px; margin-left: -10px; width: 20px; height: 5px; background: rgba(20, 20, 20, .3); box-shadow: 0 0 20px 35px rgba(20, 20, 20, .3); border-radius: 20px / 20px; animation-timing-function: ease-out; } }
RoryStolzenberg/cdnjs
ajax/libs/pace/0.5.3/themes/white/pace-theme-bounce.css
CSS
mit
5,046
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("pdfjs-dist/build/pdf",[],t):"object"==typeof exports?exports["pdfjs-dist/build/pdf"]=t():e["pdfjs-dist/build/pdf"]=e.pdfjsDistBuildPdf=t()}(this,function(){return function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=54)}([function(e,t,r){"use strict";function n(e){I>=T.warnings&&console.log("Warning: "+e)}function i(e){throw new Error(e)}function a(e,t){e||i(t)}function o(e){if(!e)return!1;switch(e.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function s(e){a("string"==typeof e,"Invalid argument for stringToBytes");for(var t=e.length,r=new Uint8Array(t),n=0;n<t;++n)r[n]=255&e.charCodeAt(n);return r}function l(e){return void 0!==e.length?e.length:(a(void 0!==e.byteLength),e.byteLength)}function u(e){return"number"==typeof e&&(0|e)===e}function c(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}function h(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return e?new Promise(function(n,i){n(e.apply(r,t))}):Promise.resolve(void 0)}function d(e){if("object"!==(void 0===e?"undefined":v(e)))return e;switch(e.name){case"AbortException":return new G(e.message);case"MissingPDFException":return new M(e.message);case"UnexpectedResponseException":return new q(e.message,e.status);default:return new j(e.message,e.details)}}function f(e){return!(e instanceof Error)||e instanceof G||e instanceof M||e instanceof q||e instanceof j?e:new j(e.message,e.toString())}function p(e,t,r){t?e.resolve():e.reject(r)}function m(e){return Promise.resolve(e).catch(function(){})}function g(e,t,r){var n=this;this.sourceName=e,this.targetName=t,this.comObj=r,this.callbackId=1,this.streamId=1,this.postMessageTransfers=!0,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null);var i=this.callbacksCapabilities=Object.create(null),a=this.actionHandler=Object.create(null);this._onComObjOnMessage=function(e){var t=e.data;if(t.targetName===n.sourceName)if(t.stream)n._processStreamMessage(t);else if(t.isReply){var o=t.callbackId;if(!(t.callbackId in i))throw new Error("Cannot resolve callback "+o);var s=i[o];delete i[o],"error"in t?s.reject(d(t.error)):s.resolve(t.data)}else{if(!(t.action in a))throw new Error("Unknown action from worker: "+t.action);var l=a[t.action];if(t.callbackId){var u=n.sourceName,c=t.sourceName;Promise.resolve().then(function(){return l[0].call(l[1],t.data)}).then(function(e){r.postMessage({sourceName:u,targetName:c,isReply:!0,callbackId:t.callbackId,data:e})},function(e){r.postMessage({sourceName:u,targetName:c,isReply:!0,callbackId:t.callbackId,error:f(e)})})}else t.streamId?n._createStreamSink(t):l[0].call(l[1],t.data)}},r.addEventListener("message",this._onComObjOnMessage)}Object.defineProperty(t,"__esModule",{value:!0}),t.unreachable=t.warn=t.utf8StringToString=t.stringToUTF8String=t.stringToPDFString=t.stringToBytes=t.string32=t.shadow=t.setVerbosityLevel=t.ReadableStream=t.removeNullCharacters=t.readUint32=t.readUint16=t.readInt8=t.log2=t.loadJpegStream=t.isEvalSupported=t.isLittleEndian=t.createValidAbsoluteUrl=t.isSameOrigin=t.isNodeJS=t.isSpace=t.isString=t.isNum=t.isInt=t.isEmptyObj=t.isBool=t.isArrayBuffer=t.isArray=t.info=t.getVerbosityLevel=t.getLookupTableFactory=t.deprecated=t.createObjectURL=t.createPromiseCapability=t.createBlob=t.bytesToString=t.assert=t.arraysToBytes=t.arrayByteLength=t.FormatError=t.XRefParseException=t.Util=t.UnknownErrorException=t.UnexpectedResponseException=t.TextRenderingMode=t.StreamType=t.StatTimer=t.PasswordResponses=t.PasswordException=t.PageViewport=t.NotImplementedException=t.NativeImageDecoding=t.MissingPDFException=t.MissingDataException=t.MessageHandler=t.InvalidPDFException=t.AbortException=t.CMapCompressionType=t.ImageKind=t.FontType=t.AnnotationType=t.AnnotationFlag=t.AnnotationFieldFlag=t.AnnotationBorderStyleType=t.UNSUPPORTED_FEATURES=t.VERBOSITY_LEVELS=t.OPS=t.IDENTITY_MATRIX=t.FONT_IDENTITY_MATRIX=void 0;var v="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};r(55);var b=r(80),_=[.001,0,0,.001,0,0],y={NONE:"none",DECODE:"decode",DISPLAY:"display"},A={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_ADD_TO_PATH:4,STROKE_ADD_TO_PATH:5,FILL_STROKE_ADD_TO_PATH:6,ADD_TO_PATH:7,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},S={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},w={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},P={INVISIBLE:1,HIDDEN:2,PRINT:4,NOZOOM:8,NOROTATE:16,NOVIEW:32,READONLY:64,LOCKED:128,TOGGLENOVIEW:256,LOCKEDCONTENTS:512},R={READONLY:1,REQUIRED:2,NOEXPORT:4,MULTILINE:4096,PASSWORD:8192,NOTOGGLETOOFF:16384,RADIO:32768,PUSHBUTTON:65536,COMBO:131072,EDIT:262144,SORT:524288,FILESELECT:1048576,MULTISELECT:2097152,DONOTSPELLCHECK:4194304,DONOTSCROLL:8388608,COMB:16777216,RICHTEXT:33554432,RADIOSINUNISON:33554432,COMMITONSELCHANGE:67108864},C={SOLID:1,DASHED:2,BEVELED:3,INSET:4,UNDERLINE:5},k={UNKNOWN:0,FLATE:1,LZW:2,DCT:3,JPX:4,JBIG:5,A85:6,AHX:7,CCF:8,RL:9},x={UNKNOWN:0,TYPE1:1,TYPE1C:2,CIDFONTTYPE0:3,CIDFONTTYPE0C:4,TRUETYPE:5,CIDFONTTYPE2:6,TYPE3:7,OPENTYPE:8,TYPE0:9,MMTYPE1:10},T={errors:0,warnings:1,infos:5},E={NONE:0,BINARY:1,STREAM:2},O={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotations:78,endAnnotations:79,beginAnnotation:80,endAnnotation:81,paintJpegXObject:82,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,paintSolidColorImageMask:90,constructPath:91},I=T.warnings,L={unknown:"unknown",forms:"forms",javaScript:"javaScript",smask:"smask",shadingPattern:"shadingPattern",font:"font"},D={NEED_PASSWORD:1,INCORRECT_PASSWORD:2},F=function(){function e(e,t){this.name="PasswordException",this.message=e,this.code=t}return e.prototype=new Error,e.constructor=e,e}(),j=function(){function e(e,t){this.name="UnknownErrorException",this.message=e,this.details=t}return e.prototype=new Error,e.constructor=e,e}(),N=function(){function e(e){this.name="InvalidPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),M=function(){function e(e){this.name="MissingPDFException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),q=function(){function e(e,t){this.name="UnexpectedResponseException",this.message=e,this.status=t}return e.prototype=new Error,e.constructor=e,e}(),W=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="NotImplementedException",e.constructor=e,e}(),U=function(){function e(e,t){this.begin=e,this.end=t,this.message="Missing data ["+e+", "+t+")"}return e.prototype=new Error,e.prototype.name="MissingDataException",e.constructor=e,e}(),B=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="XRefParseException",e.constructor=e,e}(),z=function(){function e(e){this.message=e}return e.prototype=new Error,e.prototype.name="FormatError",e.constructor=e,e}(),G=function(){function e(e){this.name="AbortException",this.message=e}return e.prototype=new Error,e.constructor=e,e}(),H=/\x00/g,X=[1,0,0,1,0,0],Y=function(){function e(){}var t=["rgb(",0,",",0,",",0,")"];e.makeCssRgb=function(e,r,n){return t[1]=e,t[3]=r,t[5]=n,t.join("")},e.transform=function(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]},e.applyTransform=function(e,t){return[e[0]*t[0]+e[1]*t[2]+t[4],e[0]*t[1]+e[1]*t[3]+t[5]]},e.applyInverseTransform=function(e,t){var r=t[0]*t[3]-t[1]*t[2];return[(e[0]*t[3]-e[1]*t[2]+t[2]*t[5]-t[4]*t[3])/r,(-e[0]*t[1]+e[1]*t[0]+t[4]*t[1]-t[5]*t[0])/r]},e.getAxialAlignedBoundingBox=function(t,r){var n=e.applyTransform(t,r),i=e.applyTransform(t.slice(2,4),r),a=e.applyTransform([t[0],t[3]],r),o=e.applyTransform([t[2],t[1]],r);return[Math.min(n[0],i[0],a[0],o[0]),Math.min(n[1],i[1],a[1],o[1]),Math.max(n[0],i[0],a[0],o[0]),Math.max(n[1],i[1],a[1],o[1])]},e.inverseTransform=function(e){var t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]},e.apply3dTransform=function(e,t){return[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[3]*t[0]+e[4]*t[1]+e[5]*t[2],e[6]*t[0]+e[7]*t[1]+e[8]*t[2]]},e.singularValueDecompose2dScale=function(e){var t=[e[0],e[2],e[1],e[3]],r=e[0]*t[0]+e[1]*t[2],n=e[0]*t[1]+e[1]*t[3],i=e[2]*t[0]+e[3]*t[2],a=e[2]*t[1]+e[3]*t[3],o=(r+a)/2,s=Math.sqrt((r+a)*(r+a)-4*(r*a-i*n))/2,l=o+s||1,u=o-s||1;return[Math.sqrt(l),Math.sqrt(u)]},e.normalizeRect=function(e){var t=e.slice(0);return e[0]>e[2]&&(t[0]=e[2],t[2]=e[0]),e[1]>e[3]&&(t[1]=e[3],t[3]=e[1]),t},e.intersect=function(t,r){function n(e,t){return e-t}var i=[t[0],t[2],r[0],r[2]].sort(n),a=[t[1],t[3],r[1],r[3]].sort(n),o=[];return t=e.normalizeRect(t),r=e.normalizeRect(r),(i[0]===t[0]&&i[1]===r[0]||i[0]===r[0]&&i[1]===t[0])&&(o[0]=i[1],o[2]=i[2],(a[0]===t[1]&&a[1]===r[1]||a[0]===r[1]&&a[1]===t[1])&&(o[1]=a[1],o[3]=a[2],o))},e.sign=function(e){return e<0?-1:1};var r=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];return e.toRoman=function(e,t){a(u(e)&&e>0,"The number should be a positive integer.");for(var n,i=[];e>=1e3;)e-=1e3,i.push("M");n=e/100|0,e%=100,i.push(r[n]),n=e/10|0,e%=10,i.push(r[10+n]),i.push(r[20+e]);var o=i.join("");return t?o.toLowerCase():o},e.appendToArray=function(e,t){Array.prototype.push.apply(e,t)},e.prependToArray=function(e,t){Array.prototype.unshift.apply(e,t)},e.extendObj=function(e,t){for(var r in t)e[r]=t[r]},e.getInheritableProperty=function(e,t,r){for(;e&&!e.has(t);)e=e.get("Parent");return e?r?e.getArray(t):e.get(t):null},e.inherit=function(e,t,r){e.prototype=Object.create(t.prototype),e.prototype.constructor=e;for(var n in r)e.prototype[n]=r[n]},e.loadScript=function(e,t){var r=document.createElement("script"),n=!1;r.setAttribute("src",e),t&&(r.onload=function(){n||t(),n=!0}),document.getElementsByTagName("head")[0].appendChild(r)},e}(),V=function(){function e(e,t,r,n,i,a){this.viewBox=e,this.scale=t,this.rotation=r,this.offsetX=n,this.offsetY=i;var o,s,l,u,c=(e[2]+e[0])/2,h=(e[3]+e[1])/2;switch(r%=360,r=r<0?r+360:r){case 180:o=-1,s=0,l=0,u=1;break;case 90:o=0,s=1,l=1,u=0;break;case 270:o=0,s=-1,l=-1,u=0;break;default:o=1,s=0,l=0,u=-1}a&&(l=-l,u=-u);var d,f,p,m;0===o?(d=Math.abs(h-e[1])*t+n,f=Math.abs(c-e[0])*t+i,p=Math.abs(e[3]-e[1])*t,m=Math.abs(e[2]-e[0])*t):(d=Math.abs(c-e[0])*t+n,f=Math.abs(h-e[1])*t+i,p=Math.abs(e[2]-e[0])*t,m=Math.abs(e[3]-e[1])*t),this.transform=[o*t,s*t,l*t,u*t,d-o*t*c-l*t*h,f-s*t*c-u*t*h],this.width=p,this.height=m,this.fontScale=t}return e.prototype={clone:function(t){var r="scale"in(t=t||{})?t.scale:this.scale,n="rotation"in t?t.rotation:this.rotation;return new e(this.viewBox.slice(),r,n,this.offsetX,this.offsetY,t.dontFlip)},convertToViewportPoint:function(e,t){return Y.applyTransform([e,t],this.transform)},convertToViewportRectangle:function(e){var t=Y.applyTransform([e[0],e[1]],this.transform),r=Y.applyTransform([e[2],e[3]],this.transform);return[t[0],t[1],r[0],r[1]]},convertToPdfPoint:function(e,t){return Y.applyInverseTransform([e,t],this.transform)}},e}(),J=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729,733,731,730,732,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364],Q=function(){function e(e,t,r){for(;e.length<r;)e+=t;return e}function t(){this.started=Object.create(null),this.times=[],this.enabled=!0}return t.prototype={time:function(e){this.enabled&&(e in this.started&&n("Timer is already running for "+e),this.started[e]=Date.now())},timeEnd:function(e){this.enabled&&(e in this.started||n("Timer has not been started for "+e),this.times.push({name:e,start:this.started[e],end:Date.now()}),delete this.started[e])},toString:function(){var t,r,n=this.times,i="",a=0;for(t=0,r=n.length;t<r;++t){var o=n[t].name;o.length>a&&(a=o.length)}for(t=0,r=n.length;t<r;++t){var s=n[t],l=s.end-s.start;i+=e(s.name," ",a)+" "+l+"ms\n"}return i}},t}(),K=function(e,t){if("undefined"!=typeof Blob)return new Blob([e],{type:t});throw new Error('The "Blob" constructor is not supported.')},Z=function(){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";return function(t,r){if(!(arguments.length>2&&void 0!==arguments[2]&&arguments[2])&&URL.createObjectURL){var n=K(t,r);return URL.createObjectURL(n)}for(var i="data:"+r+";base64,",a=0,o=t.length;a<o;a+=3){var s=255&t[a],l=255&t[a+1],u=255&t[a+2],c=s>>2,h=(3&s)<<4|l>>4,d=a+1<o?(15&l)<<2|u>>6:64,f=a+2<o?63&u:64;i+=e[c]+e[h]+e[d]+e[f]}return i}}();g.prototype={on:function(e,t,r){var n=this.actionHandler;if(n[e])throw new Error('There is already an actionName called "'+e+'"');n[e]=[t,r]},send:function(e,t,r){var n={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t};this.postMessage(n,r)},sendWithPromise:function(e,t,r){var n=this.callbackId++,i={sourceName:this.sourceName,targetName:this.targetName,action:e,data:t,callbackId:n},a=c();this.callbacksCapabilities[n]=a;try{this.postMessage(i,r)}catch(e){a.reject(e)}return a.promise},sendWithStream:function(e,t,r,n){var i=this,a=this.streamId++,o=this.sourceName,s=this.targetName;return new b.ReadableStream({start:function(r){var n=c();return i.streamControllers[a]={controller:r,startCall:n,isClosed:!1},i.postMessage({sourceName:o,targetName:s,action:e,streamId:a,data:t,desiredSize:r.desiredSize}),n.promise},pull:function(e){var t=c();return i.streamControllers[a].pullCall=t,i.postMessage({sourceName:o,targetName:s,stream:"pull",streamId:a,desiredSize:e.desiredSize}),t.promise},cancel:function(e){var t=c();return i.streamControllers[a].cancelCall=t,i.streamControllers[a].isClosed=!0,i.postMessage({sourceName:o,targetName:s,stream:"cancel",reason:e,streamId:a}),t.promise}},r)},_createStreamSink:function(e){var t=this,r=this,n=this.actionHandler[e.action],i=e.streamId,a=e.desiredSize,o=this.sourceName,s=e.sourceName,l=function(e){var r=e.stream,n=e.chunk,a=e.transfers,l=e.success,u=e.reason;t.postMessage({sourceName:o,targetName:s,stream:r,streamId:i,chunk:n,success:l,reason:u},a)},u={enqueue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,r=arguments[2];if(!this.isCancelled){var n=this.desiredSize;this.desiredSize-=t,n>0&&this.desiredSize<=0&&(this.sinkCapability=c(),this.ready=this.sinkCapability.promise),l({stream:"enqueue",chunk:e,transfers:r})}},close:function(){this.isCancelled||(this.isCancelled=!0,l({stream:"close"}),delete r.streamSinks[i])},error:function(e){this.isCancelled||(this.isCancelled=!0,l({stream:"error",reason:e}))},sinkCapability:c(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:a,ready:null};u.sinkCapability.resolve(),u.ready=u.sinkCapability.promise,this.streamSinks[i]=u,h(n[0],[e.data,u],n[1]).then(function(){l({stream:"start_complete",success:!0})},function(e){l({stream:"start_complete",success:!1,reason:e})})},_processStreamMessage:function(e){var t=this,r=this.sourceName,n=e.sourceName,i=e.streamId,o=function(e){var a=e.stream,o=e.success,s=e.reason;t.comObj.postMessage({sourceName:r,targetName:n,stream:a,success:o,streamId:i,reason:s})},s=function(){Promise.all([t.streamControllers[e.streamId].startCall,t.streamControllers[e.streamId].pullCall,t.streamControllers[e.streamId].cancelCall].map(function(e){return e&&m(e.promise)})).then(function(){delete t.streamControllers[e.streamId]})};switch(e.stream){case"start_complete":p(this.streamControllers[e.streamId].startCall,e.success,d(e.reason));break;case"pull_complete":p(this.streamControllers[e.streamId].pullCall,e.success,d(e.reason));break;case"pull":if(!this.streamSinks[e.streamId]){o({stream:"pull_complete",success:!0});break}this.streamSinks[e.streamId].desiredSize<=0&&e.desiredSize>0&&this.streamSinks[e.streamId].sinkCapability.resolve(),this.streamSinks[e.streamId].desiredSize=e.desiredSize,h(this.streamSinks[e.streamId].onPull).then(function(){o({stream:"pull_complete",success:!0})},function(e){o({stream:"pull_complete",success:!1,reason:e})});break;case"enqueue":a(this.streamControllers[e.streamId],"enqueue should have stream controller"),this.streamControllers[e.streamId].isClosed||this.streamControllers[e.streamId].controller.enqueue(e.chunk);break;case"close":if(a(this.streamControllers[e.streamId],"close should have stream controller"),this.streamControllers[e.streamId].isClosed)break;this.streamControllers[e.streamId].isClosed=!0,this.streamControllers[e.streamId].controller.close(),s();break;case"error":a(this.streamControllers[e.streamId],"error should have stream controller"),this.streamControllers[e.streamId].controller.error(d(e.reason)),s();break;case"cancel_complete":p(this.streamControllers[e.streamId].cancelCall,e.success,d(e.reason)),s();break;case"cancel":if(!this.streamSinks[e.streamId])break;h(this.streamSinks[e.streamId].onCancel,[d(e.reason)]).then(function(){o({stream:"cancel_complete",success:!0})},function(e){o({stream:"cancel_complete",success:!1,reason:e})}),this.streamSinks[e.streamId].sinkCapability.reject(d(e.reason)),this.streamSinks[e.streamId].isCancelled=!0,delete this.streamSinks[e.streamId];break;default:throw new Error("Unexpected stream case")}},postMessage:function(e,t){t&&this.postMessageTransfers?this.comObj.postMessage(e,t):this.comObj.postMessage(e)},destroy:function(){this.comObj.removeEventListener("message",this._onComObjOnMessage)}},t.FONT_IDENTITY_MATRIX=_,t.IDENTITY_MATRIX=X,t.OPS=O,t.VERBOSITY_LEVELS=T,t.UNSUPPORTED_FEATURES=L,t.AnnotationBorderStyleType=C,t.AnnotationFieldFlag=R,t.AnnotationFlag=P,t.AnnotationType=w,t.FontType=x,t.ImageKind=S,t.CMapCompressionType=E,t.AbortException=G,t.InvalidPDFException=N,t.MessageHandler=g,t.MissingDataException=U,t.MissingPDFException=M,t.NativeImageDecoding=y,t.NotImplementedException=W,t.PageViewport=V,t.PasswordException=F,t.PasswordResponses=D,t.StatTimer=Q,t.StreamType=k,t.TextRenderingMode=A,t.UnexpectedResponseException=q,t.UnknownErrorException=j,t.Util=Y,t.XRefParseException=B,t.FormatError=z,t.arrayByteLength=l,t.arraysToBytes=function(e){if(1===e.length&&e[0]instanceof Uint8Array)return e[0];var t,r,n,i=0,a=e.length;for(t=0;t<a;t++)i+=n=l(r=e[t]);var o=0,u=new Uint8Array(i);for(t=0;t<a;t++)(r=e[t])instanceof Uint8Array||(r="string"==typeof r?s(r):new Uint8Array(r)),n=r.byteLength,u.set(r,o),o+=n;return u},t.assert=a,t.bytesToString=function(e){a(null!==e&&"object"===(void 0===e?"undefined":v(e))&&void 0!==e.length,"Invalid argument for bytesToString");var t=e.length;if(t<8192)return String.fromCharCode.apply(null,e);for(var r=[],n=0;n<t;n+=8192){var i=Math.min(n+8192,t),o=e.subarray(n,i);r.push(String.fromCharCode.apply(null,o))}return r.join("")},t.createBlob=K,t.createPromiseCapability=c,t.createObjectURL=Z,t.deprecated=function(e){console.log("Deprecated API usage: "+e)},t.getLookupTableFactory=function(e){var t;return function(){return e&&(t=Object.create(null),e(t),e=null),t}},t.getVerbosityLevel=function(){return I},t.info=function(e){I>=T.infos&&console.log("Info: "+e)},t.isArray=function(e){return e instanceof Array},t.isArrayBuffer=function(e){return"object"===(void 0===e?"undefined":v(e))&&null!==e&&void 0!==e.byteLength},t.isBool=function(e){return"boolean"==typeof e},t.isEmptyObj=function(e){for(var t in e)return!1;return!0},t.isInt=u,t.isNum=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSpace=function(e){return 32===e||9===e||13===e||10===e},t.isNodeJS=function(){return"object"===("undefined"==typeof process?"undefined":v(process))&&process+""=="[object process]"},t.isSameOrigin=function(e,t){try{var r=new URL(e);if(!r.origin||"null"===r.origin)return!1}catch(e){return!1}var n=new URL(t,r);return r.origin===n.origin},t.createValidAbsoluteUrl=function(e,t){if(!e)return null;try{var r=t?new URL(e,t):new URL(e);if(o(r))return r}catch(e){}return null},t.isLittleEndian=function(){var e=new Uint8Array(4);return e[0]=1,1===new Uint32Array(e.buffer,0,1)[0]},t.isEvalSupported=function(){try{return new Function(""),!0}catch(e){return!1}},t.loadJpegStream=function(e,t,r){var i=new Image;i.onload=function(){r.resolve(e,i)},i.onerror=function(){r.resolve(e,null),n("Error during JPEG image loading")},i.src=t},t.log2=function(e){for(var t=1,r=0;e>t;)t<<=1,r++;return r},t.readInt8=function(e,t){return e[t]<<24>>24},t.readUint16=function(e,t){return e[t]<<8|e[t+1]},t.readUint32=function(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0},t.removeNullCharacters=function(e){return"string"!=typeof e?(n("The argument for removeNullCharacters must be a string."),e):e.replace(H,"")},t.ReadableStream=b.ReadableStream,t.setVerbosityLevel=function(e){I=e},t.shadow=function(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!1}),r},t.string32=function(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)},t.stringToBytes=s,t.stringToPDFString=function(e){var t,r=e.length,n=[];if("þ"===e[0]&&"ÿ"===e[1])for(t=2;t<r;t+=2)n.push(String.fromCharCode(e.charCodeAt(t)<<8|e.charCodeAt(t+1)));else for(t=0;t<r;++t){var i=J[e.charCodeAt(t)];n.push(i?String.fromCharCode(i):e.charAt(t))}return n.join("")},t.stringToUTF8String=function(e){return decodeURIComponent(escape(e))},t.utf8StringToString=function(e){return unescape(encodeURIComponent(e))},t.warn=n,t.unreachable=i},function(e,t,r){"use strict";var n=r(43)("wks"),i=r(11),a=r(2).Symbol,o="function"==typeof a;(e.exports=function(e){return n[e]||(n[e]=o&&a[e]||(o?a:i)("Symbol."+e))}).store=n},function(e,t,r){"use strict";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,r){"use strict";e.exports=!r(15)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(7),i=r(18);e.exports=r(3)?function(e,t,r){return n.f(e,t,i(1,r))}:function(e,t,r){return e[t]=r,e}},function(e,t,r){"use strict";var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,r){"use strict";var n=r(12),i=Math.min;e.exports=function(e){return e>0?i(n(e),9007199254740991):0}},function(e,t,r){"use strict";var n=r(17),i=r(31),a=r(22),o=Object.defineProperty;t.f=r(3)?Object.defineProperty:function(e,t,r){if(n(e),t=a(t,!0),n(r),i)try{return o(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){var t=s.default.PDFJS;switch(e){case"pdfBug":return!!t&&t.pdfBug;case"disableAutoFetch":return!!t&&t.disableAutoFetch;case"disableStream":return!!t&&t.disableStream;case"disableRange":return!!t&&t.disableRange;case"disableFontFace":return!!t&&t.disableFontFace;case"disableCreateObjectURL":return!!t&&t.disableCreateObjectURL;case"disableWebGL":return!t||t.disableWebGL;case"cMapUrl":return t?t.cMapUrl:null;case"cMapPacked":return!!t&&t.cMapPacked;case"postMessageTransfers":return!t||t.postMessageTransfers;case"workerPort":return t?t.workerPort:null;case"workerSrc":return t?t.workerSrc:null;case"disableWorker":return!!t&&t.disableWorker;case"maxImageSize":return t?t.maxImageSize:-1;case"imageResourcesPath":return t?t.imageResourcesPath:"";case"isEvalSupported":return!t||t.isEvalSupported;case"externalLinkTarget":if(!t)return f.NONE;switch(t.externalLinkTarget){case f.NONE:case f.SELF:case f.BLANK:case f.PARENT:case f.TOP:return t.externalLinkTarget}return(0,o.warn)("PDFJS.externalLinkTarget is invalid: "+t.externalLinkTarget),t.externalLinkTarget=f.NONE,f.NONE;case"externalLinkRel":return t?t.externalLinkRel:l;case"enableStats":return!(!t||!t.enableStats);case"pdfjsNext":return!(!t||!t.pdfjsNext);default:throw new Error("Unknown default setting: "+e)}}Object.defineProperty(t,"__esModule",{value:!0}),t.DOMCMapReaderFactory=t.DOMCanvasFactory=t.DEFAULT_LINK_REL=t.getDefaultSetting=t.LinkTarget=t.getFilenameFromUrl=t.isValidUrl=t.isExternalLinkTargetSet=t.addLinkAttributes=t.RenderingCancelledException=t.CustomStyle=void 0;var a=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),s=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),l="noopener noreferrer nofollow",u=function(){function e(){n(this,e)}return a(e,[{key:"create",value:function(e,t){if(e<=0||t<=0)throw new Error("invalid canvas size");var r=document.createElement("canvas"),n=r.getContext("2d");return r.width=e,r.height=t,{canvas:r,context:n}}},{key:"reset",value:function(e,t,r){if(!e.canvas)throw new Error("canvas is not specified");if(t<=0||r<=0)throw new Error("invalid canvas size");e.canvas.width=t,e.canvas.height=r}},{key:"destroy",value:function(e){if(!e.canvas)throw new Error("canvas is not specified");e.canvas.width=0,e.canvas.height=0,e.canvas=null,e.context=null}}]),e}(),c=function(){function e(t){var r=t.baseUrl,i=void 0===r?null:r,a=t.isCompressed,o=void 0!==a&&a;n(this,e),this.baseUrl=i,this.isCompressed=o}return a(e,[{key:"fetch",value:function(e){var t=this,r=e.name;return r?new Promise(function(e,n){var i=t.baseUrl+r+(t.isCompressed?".bcmap":""),a=new XMLHttpRequest;a.open("GET",i,!0),t.isCompressed&&(a.responseType="arraybuffer"),a.onreadystatechange=function(){if(a.readyState===XMLHttpRequest.DONE){if(200===a.status||0===a.status){var r=void 0;if(t.isCompressed&&a.response?r=new Uint8Array(a.response):!t.isCompressed&&a.responseText&&(r=(0,o.stringToBytes)(a.responseText)),r)return void e({cMapData:r,compressionType:t.isCompressed?o.CMapCompressionType.BINARY:o.CMapCompressionType.NONE})}n(new Error("Unable to load "+(t.isCompressed?"binary ":"")+"CMap at: "+i))}},a.send(null)}):Promise.reject(new Error("CMap name must be specified."))}}]),e}(),h=function(){function e(){}var t=["ms","Moz","Webkit","O"],r=Object.create(null);return e.getProp=function(e,n){if(1===arguments.length&&"string"==typeof r[e])return r[e];var i,a,o=(n=n||document.documentElement).style;if("string"==typeof o[e])return r[e]=e;a=e.charAt(0).toUpperCase()+e.slice(1);for(var s=0,l=t.length;s<l;s++)if(i=t[s]+a,"string"==typeof o[i])return r[e]=i;return r[e]="undefined"},e.setProp=function(e,t,r){var n=this.getProp(e);"undefined"!==n&&(t.style[n]=r)},e}(),d=function(){function e(e,t){this.message=e,this.type=t}return e.prototype=new Error,e.prototype.name="RenderingCancelledException",e.constructor=e,e}(),f={NONE:0,SELF:1,BLANK:2,PARENT:3,TOP:4},p=["","_self","_blank","_parent","_top"];t.CustomStyle=h,t.RenderingCancelledException=d,t.addLinkAttributes=function(e,t){var r=t&&t.url;if(e.href=e.title=r?(0,o.removeNullCharacters)(r):"",r){var n=t.target;void 0===n&&(n=i("externalLinkTarget")),e.target=p[n];var a=t.rel;void 0===a&&(a=i("externalLinkRel")),e.rel=a}},t.isExternalLinkTargetSet=function(){switch(i("externalLinkTarget")){case f.NONE:return!1;case f.SELF:case f.BLANK:case f.PARENT:case f.TOP:return!0}},t.isValidUrl=function(e,t){(0,o.deprecated)("isValidUrl(), please use createValidAbsoluteUrl() instead.");var r=t?"http://example.com":null;return null!==(0,o.createValidAbsoluteUrl)(e,r)},t.getFilenameFromUrl=function(e){var t=e.indexOf("#"),r=e.indexOf("?"),n=Math.min(t>0?t:e.length,r>0?r:e.length);return e.substring(e.lastIndexOf("/",n)+1,n)},t.LinkTarget=f,t.getDefaultSetting=i,t.DEFAULT_LINK_REL=l,t.DOMCanvasFactory=u,t.DOMCMapReaderFactory=c},function(e,t,r){"use strict";e.exports="undefined"!=typeof window&&window.Math===Math?window:"undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:{}},function(e,t,r){"use strict";var n="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.exports=function(e){return"object"===(void 0===e?"undefined":n(e))?null!==e:"function"==typeof e}},function(e,t,r){"use strict";var n=0,i=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+i).toString(36))}},function(e,t,r){"use strict";var n=Math.ceil,i=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?i:n)(e)}},function(e,t,r){"use strict";var n=r(41);e.exports=function(e){return Object(n(e))}},function(e,t,r){"use strict";e.exports={}},function(e,t,r){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,r){"use strict";var n=e.exports={version:"2.5.0"};"number"==typeof __e&&(__e=n)},function(e,t,r){"use strict";var n=r(10);e.exports=function(e){if(!n(e))throw TypeError(e+" is not an object!");return e}},function(e,t,r){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,r){"use strict";var n=r(40),i=r(41);e.exports=function(e){return n(i(e))}},function(e,t,r){"use strict";var n=r(12),i=Math.max,a=Math.min;e.exports=function(e,t){return(e=n(e))<0?i(e+t,0):a(e,t)}},function(e,t,r){"use strict";e.exports=!1},function(e,t,r){"use strict";var n=r(10);e.exports=function(e,t){if(!n(e))return e;var r,i;if(t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;if("function"==typeof(r=e.valueOf)&&!n(i=r.call(e)))return i;if(!t&&"function"==typeof(r=e.toString)&&!n(i=r.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,r){"use strict";var n=r(2),i=r(4),a=r(5),o=r(11)("src"),s=Function.toString,l=(""+s).split("toString");r(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,r,s){var u="function"==typeof r;u&&(a(r,"name")||i(r,"name",t)),e[t]!==r&&(u&&(a(r,o)||i(r,o,e[t]?""+e[t]:l.join(String(t)))),e===n?e[t]=r:s?e[t]?e[t]=r:i(e,t,r):(delete e[t],i(e,t,r)))})(Function.prototype,"toString",function(){return"function"==typeof this&&this[o]||s.call(this)})},function(e,t,r){"use strict";var n=r(33);e.exports=function(e,t,r){if(n(e),void 0===t)return e;switch(r){case 1:return function(r){return e.call(t,r)};case 2:return function(r,n){return e.call(t,r,n)};case 3:return function(r,n,i){return e.call(t,r,n,i)}}return function(){return e.apply(t,arguments)}}},function(e,t,r){"use strict";var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,r){"use strict";var n=r(43)("keys"),i=r(11);e.exports=function(e){return n[e]||(n[e]=i(e))}},function(e,t,r){"use strict";e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,r){"use strict";var n=r(7).f,i=r(5),a=r(1)("toStringTag");e.exports=function(e,t,r){e&&!i(e=r?e:e.prototype,a)&&n(e,a,{configurable:!0,value:t})}},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateResponseStatus=t.validateRangeRequestCapabilities=t.createResponseStatusError=void 0;var n=r(0);t.createResponseStatusError=function(e,t){return 404===e||0===e&&/^file:/.test(t)?new n.MissingPDFException('Missing PDF "'+t+'".'):new n.UnexpectedResponseException("Unexpected server response ("+e+') while retrieving PDF "'+t+'".',e)},t.validateRangeRequestCapabilities=function(e){var t=e.getResponseHeader,r=e.isHttp,i=e.rangeChunkSize,a=e.disableRange;(0,n.assert)(i>0);var o={allowRangeRequests:!1,suggestedLength:void 0};if(a||!r)return o;if("bytes"!==t("Accept-Ranges"))return o;if("identity"!==(t("Content-Encoding")||"identity"))return o;var s=t("Content-Length");return s=parseInt(s,10),(0,n.isInt)(s)?(o.suggestedLength=s,s<=2*i?o:(o.allowRangeRequests=!0,o)):o},t.validateResponseStatus=function(e,t){return t?200===e||206===e:0===e}},function(e,t,r){"use strict";var n=r(2),i=r(16),a=r(4),o=r(23),s=r(24),l=function e(t,r,l){var u,c,h,d,f=t&e.F,p=t&e.G,m=t&e.S,g=t&e.P,v=t&e.B,b=p?n:m?n[r]||(n[r]={}):(n[r]||{}).prototype,_=p?i:i[r]||(i[r]={}),y=_.prototype||(_.prototype={});p&&(l=r);for(u in l)h=((c=!f&&b&&void 0!==b[u])?b:l)[u],d=v&&c?s(h,n):g&&"function"==typeof h?s(Function.call,h):h,b&&o(b,u,h,t&e.U),_[u]!=h&&a(_,u,d),g&&y[u]!=h&&(y[u]=h)};n.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t,r){"use strict";e.exports=!r(3)&&!r(15)(function(){return 7!=Object.defineProperty(r(32)("div"),"a",{get:function(){return 7}}).a})},function(e,t,r){"use strict";var n=r(10),i=r(2).document,a=n(i)&&n(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,r){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t,r){"use strict";for(var n,i=r(2),a=r(4),o=r(11),s=o("typed_array"),l=o("view"),u=!(!i.ArrayBuffer||!i.DataView),c=u,h=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");h<9;)(n=i[d[h++]])?(a(n.prototype,s,!0),a(n.prototype,l,!0)):c=!1;e.exports={ABV:u,CONSTR:c,TYPED:s,VIEW:l}},function(e,t,r){"use strict";var n=r(23);e.exports=function(e,t,r){for(var i in t)n(e,i,t[i],r);return e}},function(e,t,r){"use strict";e.exports=function(e,t,r,n){if(!(e instanceof t)||void 0!==n&&n in e)throw TypeError(r+": incorrect invocation!");return e}},function(e,t,r){"use strict";var n=r(12),i=r(6);e.exports=function(e){if(void 0===e)return 0;var t=n(e),r=i(t);if(t!==r)throw RangeError("Wrong length!");return r}},function(e,t,r){"use strict";var n=r(39),i=r(27).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(5),i=r(19),a=r(42)(!1),o=r(26)("IE_PROTO");e.exports=function(e,t){var r,s=i(e),l=0,u=[];for(r in s)r!=o&&n(s,r)&&u.push(r);for(;t.length>l;)n(s,r=t[l++])&&(~a(u,r)||u.push(r));return u}},function(e,t,r){"use strict";var n=r(25);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==n(e)?e.split(""):Object(e)}},function(e,t,r){"use strict";e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,r){"use strict";var n=r(19),i=r(6),a=r(20);e.exports=function(e){return function(t,r,o){var s,l=n(t),u=i(l.length),c=a(o,u);if(e&&r!=r){for(;u>c;)if((s=l[c++])!=s)return!0}else for(;u>c;c++)if((e||c in l)&&l[c]===r)return e||c||0;return!e&&-1}}},function(e,t,r){"use strict";var n=r(2),i=n["__core-js_shared__"]||(n["__core-js_shared__"]={});e.exports=function(e){return i[e]||(i[e]={})}},function(e,t,r){"use strict";var n=r(13),i=r(20),a=r(6);e.exports=function(e){for(var t=n(this),r=a(t.length),o=arguments.length,s=i(o>1?arguments[1]:void 0,r),l=o>2?arguments[2]:void 0,u=void 0===l?r:i(l,r);u>s;)t[s++]=e;return t}},function(e,t,r){"use strict";var n=r(25),i=r(1)("toStringTag"),a="Arguments"==n(function(){return arguments}()),o=function(e,t){try{return e[t]}catch(e){}};e.exports=function(e){var t,r,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=o(t=Object(e),i))?r:a?n(t):"Object"==(s=n(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,r){"use strict";var n=r(17),i=r(61),a=r(27),o=r(26)("IE_PROTO"),s=function(){},l=function(){var e,t=r(32)("iframe"),n=a.length;for(t.style.display="none",r(63).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;n--;)delete l.prototype[a[n]];return l()};e.exports=Object.create||function(e,t){var r;return null!==e?(s.prototype=n(e),r=new s,s.prototype=null,r[o]=e):r=l(),void 0===t?r:i(r,t)}},function(e,t,r){"use strict";var n=r(5),i=r(13),a=r(26)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),n(e,a)?e[a]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t,r,n){return e.destroyed?Promise.reject(new Error("Worker was destroyed")):(t.disableAutoFetch=(0,u.getDefaultSetting)("disableAutoFetch"),t.disableStream=(0,u.getDefaultSetting)("disableStream"),t.chunkedViewerLoading=!!r,r&&(t.length=r.length,t.initialData=r.initialData),e.messageHandler.sendWithPromise("GetDocRequest",{docId:n,source:{data:t.data,url:t.url,password:t.password,disableAutoFetch:t.disableAutoFetch,rangeChunkSize:t.rangeChunkSize,length:t.length},maxImageSize:(0,u.getDefaultSetting)("maxImageSize"),disableFontFace:(0,u.getDefaultSetting)("disableFontFace"),disableCreateObjectURL:(0,u.getDefaultSetting)("disableCreateObjectURL"),postMessageTransfers:(0,u.getDefaultSetting)("postMessageTransfers")&&!v,docBaseUrl:t.docBaseUrl,nativeImageDecoderSupport:t.nativeImageDecoderSupport,ignoreErrors:t.ignoreErrors}).then(function(t){if(e.destroyed)throw new Error("Worker was destroyed");return t}))}Object.defineProperty(t,"__esModule",{value:!0}),t.build=t.version=t._UnsupportedManager=t.setPDFNetworkStreamClass=t.PDFPageProxy=t.PDFDocumentProxy=t.PDFWorker=t.PDFDataRangeTransport=t.LoopbackPort=t.getDocument=void 0;var a,o=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),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},l=r(0),u=r(8),c=r(83),h=r(84),d=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),f=r(50),p=r(86),m=65536,g=!1,v=!1,b="undefined"!=typeof document&&document.currentScript?document.currentScript.src:null,_=null,y=!1;"undefined"==typeof window?(g=!0,void 0===require.ensure&&(require.ensure=require("node-ensure")),y=!0):"undefined"!=typeof require&&"function"==typeof require.ensure&&(y=!0),"undefined"!=typeof requirejs&&requirejs.toUrl&&(a=requirejs.toUrl("pdfjs-dist/build/pdf.worker.js"));var A="undefined"!=typeof requirejs&&requirejs.load;_=y?function(e){require.ensure([],function(){var t;t=require("./pdf.worker.js"),e(t.WorkerMessageHandler)})}:A?function(e){requirejs(["pdfjs-dist/build/pdf.worker"],function(t){e(t.WorkerMessageHandler)})}:null;var S,w=function(){function e(){this._capability=(0,l.createPromiseCapability)(),this._transport=null,this._worker=null,this.docId="d"+t++,this.destroyed=!1,this.onPassword=null,this.onProgress=null,this.onUnsupportedFeature=null}var t=0;return e.prototype={get promise(){return this._capability.promise},destroy:function(){var e=this;return this.destroyed=!0,(this._transport?this._transport.destroy():Promise.resolve()).then(function(){e._transport=null,e._worker&&(e._worker.destroy(),e._worker=null)})},then:function(e,t){return this.promise.then.apply(this.promise,arguments)}},e}(),P=function(){function e(e,t){this.length=e,this.initialData=t,this._rangeListeners=[],this._progressListeners=[],this._progressiveReadListeners=[],this._readyCapability=(0,l.createPromiseCapability)()}return e.prototype={addRangeListener:function(e){this._rangeListeners.push(e)},addProgressListener:function(e){this._progressListeners.push(e)},addProgressiveReadListener:function(e){this._progressiveReadListeners.push(e)},onDataRange:function(e,t){for(var r=this._rangeListeners,n=0,i=r.length;n<i;++n)r[n](e,t)},onDataProgress:function(e){var t=this;this._readyCapability.promise.then(function(){for(var r=t._progressListeners,n=0,i=r.length;n<i;++n)r[n](e)})},onDataProgressiveRead:function(e){var t=this;this._readyCapability.promise.then(function(){for(var r=t._progressiveReadListeners,n=0,i=r.length;n<i;++n)r[n](e)})},transportReady:function(){this._readyCapability.resolve()},requestDataRange:function(e,t){throw new Error("Abstract method PDFDataRangeTransport.requestDataRange")},abort:function(){}},e}(),R=function(){function e(e,t,r){this.pdfInfo=e,this.transport=t,this.loadingTask=r}return e.prototype={get numPages(){return this.pdfInfo.numPages},get fingerprint(){return this.pdfInfo.fingerprint},getPage:function(e){return this.transport.getPage(e)},getPageIndex:function(e){return this.transport.getPageIndex(e)},getDestinations:function(){return this.transport.getDestinations()},getDestination:function(e){return this.transport.getDestination(e)},getPageLabels:function(){return this.transport.getPageLabels()},getPageMode:function(){return this.transport.getPageMode()},getAttachments:function(){return this.transport.getAttachments()},getJavaScript:function(){return this.transport.getJavaScript()},getOutline:function(){return this.transport.getOutline()},getMetadata:function(){return this.transport.getMetadata()},getData:function(){return this.transport.getData()},getDownloadInfo:function(){return this.transport.downloadInfoCapability.promise},getStats:function(){return this.transport.getStats()},cleanup:function(){this.transport.startCleanup()},destroy:function(){return this.loadingTask.destroy()}},e}(),C=function(){function e(e,t,r){this.pageIndex=e,this.pageInfo=t,this.transport=r,this.stats=new l.StatTimer,this.stats.enabled=(0,u.getDefaultSetting)("enableStats"),this.commonObjs=r.commonObjs,this.objs=new E,this.cleanupAfterRender=!1,this.pendingCleanup=!1,this.intentStates=Object.create(null),this.destroyed=!1}return e.prototype={get pageNumber(){return this.pageIndex+1},get rotate(){return this.pageInfo.rotate},get ref(){return this.pageInfo.ref},get userUnit(){return this.pageInfo.userUnit},get view(){return this.pageInfo.view},getViewport:function(e,t){return arguments.length<2&&(t=this.rotate),new l.PageViewport(this.view,e,t,0,0)},getAnnotations:function(e){var t=e&&e.intent||null;return this.annotationsPromise&&this.annotationsIntent===t||(this.annotationsPromise=this.transport.getAnnotations(this.pageIndex,t),this.annotationsIntent=t),this.annotationsPromise},render:function(e){var t=this,r=this.stats;r.time("Overall"),this.pendingCleanup=!1;var n="print"===e.intent?"print":"display",i=e.canvasFactory||new u.DOMCanvasFactory;this.intentStates[n]||(this.intentStates[n]=Object.create(null));var a=this.intentStates[n];a.displayReadyCapability||(a.receivingOperatorList=!0,a.displayReadyCapability=(0,l.createPromiseCapability)(),a.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.stats.time("Page Request"),this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageNumber-1,intent:n,renderInteractiveForms:!0===e.renderInteractiveForms}));var o=function(e){var n=a.renderTasks.indexOf(s);n>=0&&a.renderTasks.splice(n,1),t.cleanupAfterRender&&(t.pendingCleanup=!0),t._tryCleanup(),e?s.capability.reject(e):s.capability.resolve(),r.timeEnd("Rendering"),r.timeEnd("Overall")},s=new I(o,e,this.objs,this.commonObjs,a.operatorList,this.pageNumber,i);s.useRequestAnimationFrame="print"!==n,a.renderTasks||(a.renderTasks=[]),a.renderTasks.push(s);var c=s.task;return e.continueCallback&&((0,l.deprecated)("render is used with continueCallback parameter"),c.onContinue=e.continueCallback),a.displayReadyCapability.promise.then(function(e){t.pendingCleanup?o():(r.time("Rendering"),s.initializeGraphics(e),s.operatorListChanged())}).catch(o),c},getOperatorList:function(){this.intentStates.oplist||(this.intentStates.oplist=Object.create(null));var e,t=this.intentStates.oplist;return t.opListReadCapability||((e={}).operatorListChanged=function(){if(t.operatorList.lastChunk){t.opListReadCapability.resolve(t.operatorList);var r=t.renderTasks.indexOf(e);r>=0&&t.renderTasks.splice(r,1)}},t.receivingOperatorList=!0,t.opListReadCapability=(0,l.createPromiseCapability)(),t.renderTasks=[],t.renderTasks.push(e),t.operatorList={fnArray:[],argsArray:[],lastChunk:!1},this.transport.messageHandler.send("RenderPageRequest",{pageIndex:this.pageIndex,intent:"oplist"})),t.opListReadCapability.promise},streamTextContent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this.pageNumber-1,normalizeWhitespace:!0===e.normalizeWhitespace,combineTextItems:!0!==e.disableCombineTextItems},{highWaterMark:100,size:function(e){return e.items.length}})},getTextContent:function(e){e=e||{};var t=this.streamTextContent(e);return new Promise(function(e,r){function n(){i.read().then(function(t){var r=t.value;t.done?e(a):(l.Util.extendObj(a.styles,r.styles),l.Util.appendToArray(a.items,r.items),n())},r)}var i=t.getReader(),a={items:[],styles:Object.create(null)};n()})},_destroy:function(){this.destroyed=!0,this.transport.pageCache[this.pageIndex]=null;var e=[];return Object.keys(this.intentStates).forEach(function(t){"oplist"!==t&&this.intentStates[t].renderTasks.forEach(function(t){var r=t.capability.promise.catch(function(){});e.push(r),t.cancel()})},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1,Promise.all(e)},destroy:function(){(0,l.deprecated)("page destroy method, use cleanup() instead"),this.cleanup()},cleanup:function(){this.pendingCleanup=!0,this._tryCleanup()},_tryCleanup:function(){this.pendingCleanup&&!Object.keys(this.intentStates).some(function(e){var t=this.intentStates[e];return 0!==t.renderTasks.length||t.receivingOperatorList},this)&&(Object.keys(this.intentStates).forEach(function(e){delete this.intentStates[e]},this),this.objs.clear(),this.annotationsPromise=null,this.pendingCleanup=!1)},_startRenderPage:function(e,t){var r=this.intentStates[t];r.displayReadyCapability&&r.displayReadyCapability.resolve(e)},_renderPageChunk:function(e,t){var r,n,i=this.intentStates[t];for(r=0,n=e.length;r<n;r++)i.operatorList.fnArray.push(e.fnArray[r]),i.operatorList.argsArray.push(e.argsArray[r]);for(i.operatorList.lastChunk=e.lastChunk,r=0;r<i.renderTasks.length;r++)i.renderTasks[r].operatorListChanged();e.lastChunk&&(i.receivingOperatorList=!1,this._tryCleanup())}},e}(),k=function(){function e(t){n(this,e),this._listeners=[],this._defer=t,this._deferred=Promise.resolve(void 0)}return o(e,[{key:"postMessage",value:function(e,t){function r(e){if("object"!==(void 0===e?"undefined":s(e))||null===e)return e;if(i.has(e))return i.get(e);var n,a;if((a=e.buffer)&&(0,l.isArrayBuffer)(a)){var o=t&&t.indexOf(a)>=0;return n=e===a?e:o?new e.constructor(a,e.byteOffset,e.byteLength):new e.constructor(e),i.set(e,n),n}n=Array.isArray(e)?[]:{},i.set(e,n);for(var u in e){for(var c,h=e;!(c=Object.getOwnPropertyDescriptor(h,u));)h=Object.getPrototypeOf(h);void 0!==c.value&&"function"!=typeof c.value&&(n[u]=r(c.value))}return n}var n=this;if(this._defer){var i=new WeakMap,a={data:r(e)};this._deferred.then(function(){n._listeners.forEach(function(e){e.call(this,a)},n)})}else this._listeners.forEach(function(t){t.call(this,{data:e})},this)}},{key:"addEventListener",value:function(e,t){this._listeners.push(t)}},{key:"removeEventListener",value:function(e,t){var r=this._listeners.indexOf(t);this._listeners.splice(r,1)}},{key:"terminate",value:function(){this._listeners=[]}}]),e}(),x=function(){function e(){if(void 0!==a)return a;if((0,u.getDefaultSetting)("workerSrc"))return(0,u.getDefaultSetting)("workerSrc");if(b)return b.replace(/(\.(?:min\.)?js)(\?.*)?$/i,".worker$1$2");throw new Error("No PDFJS.workerSrc specified")}function t(){return o?o.promise:(o=(0,l.createPromiseCapability)(),(_||function(t){l.Util.loadScript(e(),function(){t(window.pdfjsDistBuildPdfWorker.WorkerMessageHandler)})})(o.resolve),o.promise)}function r(e){var t="importScripts('"+e+"');";return URL.createObjectURL(new Blob([t]))}function n(e,t){if(t&&s.has(t))throw new Error("Cannot use more than one PDFWorker per port");if(this.name=e,this.destroyed=!1,this.postMessageTransfers=!0,this._readyCapability=(0,l.createPromiseCapability)(),this._port=null,this._webWorker=null,this._messageHandler=null,t)return s.set(t,this),void this._initializeFromPort(t);this._initialize()}var i=0,o=void 0,s=new WeakMap;return n.prototype={get promise(){return this._readyCapability.promise},get port(){return this._port},get messageHandler(){return this._messageHandler},_initializeFromPort:function(e){this._port=e,this._messageHandler=new l.MessageHandler("main","worker",e),this._messageHandler.on("ready",function(){}),this._readyCapability.resolve()},_initialize:function(){var t=this;if(!g&&!(0,u.getDefaultSetting)("disableWorker")&&"undefined"!=typeof Worker){var n=e();try{(0,l.isSameOrigin)(window.location.href,n)||(n=r(new URL(n,window.location).href));var i=new Worker(n),a=new l.MessageHandler("main","worker",i),o=function(){i.removeEventListener("error",s),a.destroy(),i.terminate(),t.destroyed?t._readyCapability.reject(new Error("Worker was destroyed")):t._setupFakeWorker()},s=function(){t._webWorker||o()};i.addEventListener("error",s),a.on("test",function(e){i.removeEventListener("error",s),t.destroyed?o():e&&e.supportTypedArray?(t._messageHandler=a,t._port=i,t._webWorker=i,e.supportTransfers||(t.postMessageTransfers=!1,v=!0),t._readyCapability.resolve(),a.send("configure",{verbosity:(0,l.getVerbosityLevel)()})):(t._setupFakeWorker(),a.destroy(),i.terminate())}),a.on("console_log",function(e){console.log.apply(console,e)}),a.on("console_error",function(e){console.error.apply(console,e)}),a.on("ready",function(e){if(i.removeEventListener("error",s),t.destroyed)o();else try{c()}catch(e){t._setupFakeWorker()}});var c=function(){var e=(0,u.getDefaultSetting)("postMessageTransfers")&&!v,t=new Uint8Array([e?255:0]);try{a.send("test",t,[t.buffer])}catch(e){(0,l.info)("Cannot use postMessage transfers"),t[0]=0,a.send("test",t)}};return void c()}catch(e){(0,l.info)("The worker has been disabled.")}}this._setupFakeWorker()},_setupFakeWorker:function(){var e=this;g||(0,u.getDefaultSetting)("disableWorker")||((0,l.warn)("Setting up fake worker."),g=!0),t().then(function(t){if(e.destroyed)e._readyCapability.reject(new Error("Worker was destroyed"));else{var r=Uint8Array!==Float32Array,n=new k(r);e._port=n;var a="fake"+i++,o=new l.MessageHandler(a+"_worker",a,n);t.setup(o,n);var s=new l.MessageHandler(a,a+"_worker",n);e._messageHandler=s,e._readyCapability.resolve()}})},destroy:function(){this.destroyed=!0,this._webWorker&&(this._webWorker.terminate(),this._webWorker=null),s.delete(this._port),this._port=null,this._messageHandler&&(this._messageHandler.destroy(),this._messageHandler=null)}},n.fromPort=function(e){return s.has(e)?s.get(e):new n(null,e)},n}(),T=function(){function e(e,t,r,n){this.messageHandler=e,this.loadingTask=t,this.commonObjs=new E,this.fontLoader=new c.FontLoader(t.docId),this.CMapReaderFactory=new n({baseUrl:(0,u.getDefaultSetting)("cMapUrl"),isCompressed:(0,u.getDefaultSetting)("cMapPacked")}),this.destroyed=!1,this.destroyCapability=null,this._passwordCapability=null,this._networkStream=r,this._fullReader=null,this._lastProgress=null,this.pageCache=[],this.pagePromises=[],this.downloadInfoCapability=(0,l.createPromiseCapability)(),this.setupMessageHandler()}return e.prototype={destroy:function(){var e=this;if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=(0,l.createPromiseCapability)(),this._passwordCapability&&this._passwordCapability.reject(new Error("Worker was destroyed during onPassword callback"));var t=[];this.pageCache.forEach(function(e){e&&t.push(e._destroy())}),this.pageCache=[],this.pagePromises=[];var r=this.messageHandler.sendWithPromise("Terminate",null);return t.push(r),Promise.all(t).then(function(){e.fontLoader.clear(),e._networkStream&&e._networkStream.cancelAllRequests(),e.messageHandler&&(e.messageHandler.destroy(),e.messageHandler=null),e.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise},setupMessageHandler:function(){var e=this.messageHandler,t=this.loadingTask;e.on("GetReader",function(e,t){var r=this;(0,l.assert)(this._networkStream),this._fullReader=this._networkStream.getFullReader(),this._fullReader.onProgress=function(e){r._lastProgress={loaded:e.loaded,total:e.total}},t.onPull=function(){r._fullReader.read().then(function(e){var r=e.value;e.done?t.close():((0,l.assert)((0,l.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r._fullReader.cancel(e)}},this),e.on("ReaderHeadersReady",function(e){var t=this,r=(0,l.createPromiseCapability)(),n=this._fullReader;return n.headersReady.then(function(){if(!n.isStreamingSupported||!n.isRangeSupported){if(t._lastProgress){var e=t.loadingTask;e.onProgress&&e.onProgress(t._lastProgress)}n.onProgress=function(e){var r=t.loadingTask;r.onProgress&&r.onProgress({loaded:e.loaded,total:e.total})}}r.resolve({isStreamingSupported:n.isStreamingSupported,isRangeSupported:n.isRangeSupported,contentLength:n.contentLength})},r.reject),r.promise},this),e.on("GetRangeReader",function(e,t){(0,l.assert)(this._networkStream);var r=this._networkStream.getRangeReader(e.begin,e.end);t.onPull=function(){r.read().then(function(e){var r=e.value;e.done?t.close():((0,l.assert)((0,l.isArrayBuffer)(r)),t.enqueue(new Uint8Array(r),1,[r]))}).catch(function(e){t.error(e)})},t.onCancel=function(e){r.cancel(e)}},this),e.on("GetDoc",function(e){var t=e.pdfInfo;this.numPages=e.pdfInfo.numPages;var r=this.loadingTask,n=new R(t,this,r);this.pdfDocument=n,r._capability.resolve(n)},this),e.on("PasswordRequest",function(e){var r=this;if(this._passwordCapability=(0,l.createPromiseCapability)(),t.onPassword){var n=function(e){r._passwordCapability.resolve({password:e})};t.onPassword(n,e.code)}else this._passwordCapability.reject(new l.PasswordException(e.message,e.code));return this._passwordCapability.promise},this),e.on("PasswordException",function(e){t._capability.reject(new l.PasswordException(e.message,e.code))},this),e.on("InvalidPDF",function(e){this.loadingTask._capability.reject(new l.InvalidPDFException(e.message))},this),e.on("MissingPDF",function(e){this.loadingTask._capability.reject(new l.MissingPDFException(e.message))},this),e.on("UnexpectedResponse",function(e){this.loadingTask._capability.reject(new l.UnexpectedResponseException(e.message,e.status))},this),e.on("UnknownError",function(e){this.loadingTask._capability.reject(new l.UnknownErrorException(e.message,e.details))},this),e.on("DataLoaded",function(e){this.downloadInfoCapability.resolve(e)},this),e.on("PDFManagerReady",function(e){},this),e.on("StartRenderPage",function(e){if(!this.destroyed){var t=this.pageCache[e.pageIndex];t.stats.timeEnd("Page Request"),t._startRenderPage(e.transparency,e.intent)}},this),e.on("RenderPageChunk",function(e){this.destroyed||this.pageCache[e.pageIndex]._renderPageChunk(e.operatorList,e.intent)},this),e.on("commonobj",function(e){var t=this;if(!this.destroyed){var r=e[0],n=e[1];if(!this.commonObjs.hasData(r))switch(n){case"Font":var i=e[2];if("error"in i){var a=i.error;(0,l.warn)("Error during font loading: "+a),this.commonObjs.resolve(r,a);break}var o=null;(0,u.getDefaultSetting)("pdfBug")&&d.default.FontInspector&&d.default.FontInspector.enabled&&(o={registerFont:function(e,t){d.default.FontInspector.fontAdded(e,t)}});var s=new c.FontFaceObject(i,{isEvalSuported:(0,u.getDefaultSetting)("isEvalSupported"),disableFontFace:(0,u.getDefaultSetting)("disableFontFace"),fontRegistry:o}),h=function(e){t.commonObjs.resolve(r,s)};this.fontLoader.bind([s],h);break;case"FontPath":this.commonObjs.resolve(r,e[2]);break;default:throw new Error("Got unknown common object type "+n)}}},this),e.on("obj",function(e){if(!this.destroyed){var t,r=e[0],n=e[1],i=e[2],a=this.pageCache[n];if(!a.objs.hasData(r))switch(i){case"JpegStream":t=e[3],(0,l.loadJpegStream)(r,t,a.objs);break;case"Image":t=e[3],a.objs.resolve(r,t);t&&"data"in t&&t.data.length>8e6&&(a.cleanupAfterRender=!0);break;default:throw new Error("Got unknown object type "+i)}}},this),e.on("DocProgress",function(e){if(!this.destroyed){var t=this.loadingTask;t.onProgress&&t.onProgress({loaded:e.loaded,total:e.total})}},this),e.on("PageError",function(e){if(!this.destroyed){var t=this.pageCache[e.pageNum-1].intentStates[e.intent];if(!t.displayReadyCapability)throw new Error(e.error);if(t.displayReadyCapability.reject(e.error),t.operatorList){t.operatorList.lastChunk=!0;for(var r=0;r<t.renderTasks.length;r++)t.renderTasks[r].operatorListChanged()}}},this),e.on("UnsupportedFeature",function(e){if(!this.destroyed){var t=e.featureId,r=this.loadingTask;r.onUnsupportedFeature&&r.onUnsupportedFeature(t),L.notify(t)}},this),e.on("JpegDecode",function(e){if(this.destroyed)return Promise.reject(new Error("Worker was destroyed"));if("undefined"==typeof document)return Promise.reject(new Error('"document" is not defined.'));var t=e[0],r=e[1];return 3!==r&&1!==r?Promise.reject(new Error("Only 3 components or 1 component can be returned")):new Promise(function(e,n){var i=new Image;i.onload=function(){var t=i.width,n=i.height,a=t*n,o=4*a,s=new Uint8Array(a*r),l=document.createElement("canvas");l.width=t,l.height=n;var u=l.getContext("2d");u.drawImage(i,0,0);var c,h,d=u.getImageData(0,0,t,n).data;if(3===r)for(c=0,h=0;c<o;c+=4,h+=3)s[h]=d[c],s[h+1]=d[c+1],s[h+2]=d[c+2];else if(1===r)for(c=0,h=0;c<o;c+=4,h++)s[h]=d[c];e({data:s,width:t,height:n})},i.onerror=function(){n(new Error("JpegDecode failed to load image"))},i.src=t})},this),e.on("FetchBuiltInCMap",function(e){return this.destroyed?Promise.reject(new Error("Worker was destroyed")):this.CMapReaderFactory.fetch({name:e.name})},this)},getData:function(){return this.messageHandler.sendWithPromise("GetData",null)},getPage:function(e,t){var r=this;if(!(0,l.isInt)(e)||e<=0||e>this.numPages)return Promise.reject(new Error("Invalid page request"));var n=e-1;if(n in this.pagePromises)return this.pagePromises[n];var i=this.messageHandler.sendWithPromise("GetPage",{pageIndex:n}).then(function(e){if(r.destroyed)throw new Error("Transport destroyed");var t=new C(n,e,r);return r.pageCache[n]=t,t});return this.pagePromises[n]=i,i},getPageIndex:function(e){return this.messageHandler.sendWithPromise("GetPageIndex",{ref:e}).catch(function(e){return Promise.reject(new Error(e))})},getAnnotations:function(e,t){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex:e,intent:t})},getDestinations:function(){return this.messageHandler.sendWithPromise("GetDestinations",null)},getDestination:function(e){return this.messageHandler.sendWithPromise("GetDestination",{id:e})},getPageLabels:function(){return this.messageHandler.sendWithPromise("GetPageLabels",null)},getPageMode:function(){return this.messageHandler.sendWithPromise("GetPageMode",null)},getAttachments:function(){return this.messageHandler.sendWithPromise("GetAttachments",null)},getJavaScript:function(){return this.messageHandler.sendWithPromise("GetJavaScript",null)},getOutline:function(){return this.messageHandler.sendWithPromise("GetOutline",null)},getMetadata:function(){return this.messageHandler.sendWithPromise("GetMetadata",null).then(function(e){return{info:e[0],metadata:e[1]?new f.Metadata(e[1]):null}})},getStats:function(){return this.messageHandler.sendWithPromise("GetStats",null)},startCleanup:function(){var e=this;this.messageHandler.sendWithPromise("Cleanup",null).then(function(){for(var t=0,r=e.pageCache.length;t<r;t++){var n=e.pageCache[t];n&&n.cleanup()}e.commonObjs.clear(),e.fontLoader.clear()})}},e}(),E=function(){function e(){this.objs=Object.create(null)}return e.prototype={ensureObj:function(e){if(this.objs[e])return this.objs[e];var t={capability:(0,l.createPromiseCapability)(),data:null,resolved:!1};return this.objs[e]=t,t},get:function(e,t){if(t)return this.ensureObj(e).capability.promise.then(t),null;var r=this.objs[e];if(!r||!r.resolved)throw new Error("Requesting object that isn't resolved yet "+e);return r.data},resolve:function(e,t){var r=this.ensureObj(e);r.resolved=!0,r.data=t,r.capability.resolve(t)},isResolved:function(e){var t=this.objs;return!!t[e]&&t[e].resolved},hasData:function(e){return this.isResolved(e)},getData:function(e){var t=this.objs;return t[e]&&t[e].resolved?t[e].data:null},clear:function(){this.objs=Object.create(null)}},e}(),O=function(){function e(e){this._internalRenderTask=e,this.onContinue=null}return e.prototype={get promise(){return this._internalRenderTask.capability.promise},cancel:function(){this._internalRenderTask.cancel()},then:function(e,t){return this.promise.then.apply(this.promise,arguments)}},e}(),I=function(){function e(e,t,r,n,i,a,o){this.callback=e,this.params=t,this.objs=r,this.commonObjs=n,this.operatorListIdx=null,this.operatorList=i,this.pageNumber=a,this.canvasFactory=o,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this.useRequestAnimationFrame=!1,this.cancelled=!1,this.capability=(0,l.createPromiseCapability)(),this.task=new O(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=this._next.bind(this),this._canvas=t.canvasContext.canvas}var t=new WeakMap;return e.prototype={initializeGraphics:function(e){if(this._canvas){if(t.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancelled or completed.");t.set(this._canvas,this)}if(!this.cancelled){(0,u.getDefaultSetting)("pdfBug")&&d.default.StepperManager&&d.default.StepperManager.enabled&&(this.stepper=d.default.StepperManager.create(this.pageNumber-1),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());var r=this.params;this.gfx=new h.CanvasGraphics(r.canvasContext,this.commonObjs,this.objs,this.canvasFactory,r.imageLayer),this.gfx.beginDrawing({transform:r.transform,viewport:r.viewport,transparency:e,background:r.background}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback&&this.graphicsReadyCallback()}},cancel:function(){this.running=!1,this.cancelled=!0,this._canvas&&t.delete(this._canvas),(0,u.getDefaultSetting)("pdfjsNext")?this.callback(new u.RenderingCancelledException("Rendering cancelled, page "+this.pageNumber,"canvas")):this.callback("cancelled")},operatorListChanged:function(){this.graphicsReady?(this.stepper&&this.stepper.updateOperatorList(this.operatorList),this.running||this._continue()):this.graphicsReadyCallback||(this.graphicsReadyCallback=this._continueBound)},_continue:function(){this.running=!0,this.cancelled||(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())},_scheduleNext:function(){this.useRequestAnimationFrame&&"undefined"!=typeof window?window.requestAnimationFrame(this._nextBound):Promise.resolve(void 0).then(this._nextBound)},_next:function(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),this._canvas&&t.delete(this._canvas),this.callback())))}},e}(),L=function(){var e=[];return{listen:function(t){(0,l.deprecated)("Global UnsupportedManager.listen is used: use PDFDocumentLoadingTask.onUnsupportedFeature instead"),e.push(t)},notify:function(t){for(var r=0,n=e.length;r<n;r++)e[r](t)}}}();t.version="1.9.504",t.build="0430e99d",t.getDocument=function(e,t,r,n){var a=new w;arguments.length>1&&(0,l.deprecated)("getDocument is called with pdfDataRangeTransport, passwordCallback or progressCallback argument"),t&&(t instanceof P||((t=Object.create(t)).length=e.length,t.initialData=e.initialData,t.abort||(t.abort=function(){})),(e=Object.create(e)).range=t),a.onPassword=r||null,a.onProgress=n||null;var o;if("string"==typeof e)o={url:e};else if((0,l.isArrayBuffer)(e))o={data:e};else if(e instanceof P)o={range:e};else{if("object"!==(void 0===e?"undefined":s(e)))throw new Error("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object");if(!e.url&&!e.data&&!e.range)throw new Error("Invalid parameter object: need either .data, .range or .url");o=e}var c={},h=null,d=null,f=u.DOMCMapReaderFactory;for(var g in o)if("url"!==g||"undefined"==typeof window)if("range"!==g)if("worker"!==g)if("data"!==g||o[g]instanceof Uint8Array)"CMapReaderFactory"!==g?c[g]=o[g]:f=o[g];else{var v=o[g];if("string"==typeof v)c[g]=(0,l.stringToBytes)(v);else if("object"!==(void 0===v?"undefined":s(v))||null===v||isNaN(v.length)){if(!(0,l.isArrayBuffer)(v))throw new Error("Invalid PDF binary data: either typed array, string or array-like object is expected in the data property.");c[g]=new Uint8Array(v)}else c[g]=new Uint8Array(v)}else d=o[g];else h=o[g];else c[g]=new URL(o[g],window.location).href;if(c.rangeChunkSize=c.rangeChunkSize||m,c.ignoreErrors=!0!==c.stopAtErrors,void 0!==c.disableNativeImageDecoder&&(0,l.deprecated)("parameter disableNativeImageDecoder, use nativeImageDecoderSupport instead"),c.nativeImageDecoderSupport=c.nativeImageDecoderSupport||(!0===c.disableNativeImageDecoder?l.NativeImageDecoding.NONE:l.NativeImageDecoding.DECODE),c.nativeImageDecoderSupport!==l.NativeImageDecoding.DECODE&&c.nativeImageDecoderSupport!==l.NativeImageDecoding.NONE&&c.nativeImageDecoderSupport!==l.NativeImageDecoding.DISPLAY&&((0,l.warn)("Invalid parameter nativeImageDecoderSupport: need a state of enum {NativeImageDecoding}"),c.nativeImageDecoderSupport=l.NativeImageDecoding.DECODE),!d){var b=(0,u.getDefaultSetting)("workerPort");d=b?x.fromPort(b):new x,a._worker=d}var _=a.docId;return d.promise.then(function(){if(a.destroyed)throw new Error("Loading aborted");return i(d,c,h,_).then(function(e){if(a.destroyed)throw new Error("Loading aborted");var t=void 0;h?t=new p.PDFDataTransportStream(c,h):c.data||(t=new S({source:c,disableRange:(0,u.getDefaultSetting)("disableRange")}));var r=new l.MessageHandler(_,e,d.port);r.postMessageTransfers=d.postMessageTransfers;var n=new T(r,a,t,f);a._transport=n,r.send("Ready",null)})}).catch(a._capability.reject),a},t.LoopbackPort=k,t.PDFDataRangeTransport=P,t.PDFWorker=x,t.PDFDocumentProxy=R,t.PDFPageProxy=C,t.setPDFNetworkStreamClass=function(e){S=e},t._UnsupportedManager=L,t.version="1.9.504",t.build="0430e99d"},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebGLUtils=void 0;var n=r(8),i=r(0),a=function(){function e(e,t,r){var n=e.createShader(r);if(e.shaderSource(n,t),e.compileShader(n),!e.getShaderParameter(n,e.COMPILE_STATUS)){var i=e.getShaderInfoLog(n);throw new Error("Error during shader compilation: "+i)}return n}function t(t,r){return e(t,r,t.VERTEX_SHADER)}function r(t,r){return e(t,r,t.FRAGMENT_SHADER)}function a(e,t){for(var r=e.createProgram(),n=0,i=t.length;n<i;++n)e.attachShader(r,t[n]);if(e.linkProgram(r),!e.getProgramParameter(r,e.LINK_STATUS)){var a=e.getProgramInfoLog(r);throw new Error("Error during program linking: "+a)}return r}function o(e,t,r){e.activeTexture(r);var n=e.createTexture();return e.bindTexture(e.TEXTURE_2D,n),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),n}function s(){c||(h=document.createElement("canvas"),c=h.getContext("webgl",{premultipliedalpha:!1}))}function l(){var e,n;s(),e=h,h=null,n=c,c=null;var i=a(n,[t(n,d),r(n,f)]);n.useProgram(i);var o={};o.gl=n,o.canvas=e,o.resolutionLocation=n.getUniformLocation(i,"u_resolution"),o.positionLocation=n.getAttribLocation(i,"a_position"),o.backdropLocation=n.getUniformLocation(i,"u_backdrop"),o.subtypeLocation=n.getUniformLocation(i,"u_subtype");var l=n.getAttribLocation(i,"a_texCoord"),u=n.getUniformLocation(i,"u_image"),m=n.getUniformLocation(i,"u_mask"),g=n.createBuffer();n.bindBuffer(n.ARRAY_BUFFER,g),n.bufferData(n.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,0,1,1,0,1,1]),n.STATIC_DRAW),n.enableVertexAttribArray(l),n.vertexAttribPointer(l,2,n.FLOAT,!1,0,0),n.uniform1i(u,0),n.uniform1i(m,1),p=o}function u(){var e,n;s(),e=h,h=null,n=c,c=null;var i=a(n,[t(n,m),r(n,g)]);n.useProgram(i);var o={};o.gl=n,o.canvas=e,o.resolutionLocation=n.getUniformLocation(i,"u_resolution"),o.scaleLocation=n.getUniformLocation(i,"u_scale"),o.offsetLocation=n.getUniformLocation(i,"u_offset"),o.positionLocation=n.getAttribLocation(i,"a_position"),o.colorLocation=n.getAttribLocation(i,"a_color"),v=o}var c,h,d=" attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; varying vec2 v_texCoord; void main() { vec2 clipSpace = (a_position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_texCoord = a_texCoord; } ",f=" precision mediump float; uniform vec4 u_backdrop; uniform int u_subtype; uniform sampler2D u_image; uniform sampler2D u_mask; varying vec2 v_texCoord; void main() { vec4 imageColor = texture2D(u_image, v_texCoord); vec4 maskColor = texture2D(u_mask, v_texCoord); if (u_backdrop.a > 0.0) { maskColor.rgb = maskColor.rgb * maskColor.a + u_backdrop.rgb * (1.0 - maskColor.a); } float lum; if (u_subtype == 0) { lum = maskColor.a; } else { lum = maskColor.r * 0.3 + maskColor.g * 0.59 + maskColor.b * 0.11; } imageColor.a *= lum; imageColor.rgb *= imageColor.a; gl_FragColor = imageColor; } ",p=null,m=" attribute vec2 a_position; attribute vec3 a_color; uniform vec2 u_resolution; uniform vec2 u_scale; uniform vec2 u_offset; varying vec4 v_color; void main() { vec2 position = (a_position + u_offset) * u_scale; vec2 clipSpace = (position / u_resolution) * 2.0 - 1.0; gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); v_color = vec4(a_color / 255.0, 1.0); } ",g=" precision mediump float; varying vec4 v_color; void main() { gl_FragColor = v_color; } ",v=null;return{get isEnabled(){if((0,n.getDefaultSetting)("disableWebGL"))return!1;var e=!1;try{s(),e=!!c}catch(e){}return(0,i.shadow)(this,"isEnabled",e)},composeSMask:function(e,t,r){var n=e.width,i=e.height;p||l();var a=p,s=a.canvas,u=a.gl;s.width=n,s.height=i,u.viewport(0,0,u.drawingBufferWidth,u.drawingBufferHeight),u.uniform2f(a.resolutionLocation,n,i),r.backdrop?u.uniform4f(a.resolutionLocation,r.backdrop[0],r.backdrop[1],r.backdrop[2],1):u.uniform4f(a.resolutionLocation,0,0,0,0),u.uniform1i(a.subtypeLocation,"Luminosity"===r.subtype?1:0);var c=o(u,e,u.TEXTURE0),h=o(u,t,u.TEXTURE1),d=u.createBuffer();return u.bindBuffer(u.ARRAY_BUFFER,d),u.bufferData(u.ARRAY_BUFFER,new Float32Array([0,0,n,0,0,i,0,i,n,0,n,i]),u.STATIC_DRAW),u.enableVertexAttribArray(a.positionLocation),u.vertexAttribPointer(a.positionLocation,2,u.FLOAT,!1,0,0),u.clearColor(0,0,0,0),u.enable(u.BLEND),u.blendFunc(u.ONE,u.ONE_MINUS_SRC_ALPHA),u.clear(u.COLOR_BUFFER_BIT),u.drawArrays(u.TRIANGLES,0,6),u.flush(),u.deleteTexture(c),u.deleteTexture(h),u.deleteBuffer(d),s},drawFigures:function(e,t,r,n,i){v||u();var a=v,o=a.canvas,s=a.gl;o.width=e,o.height=t,s.viewport(0,0,s.drawingBufferWidth,s.drawingBufferHeight),s.uniform2f(a.resolutionLocation,e,t);var l,c,h,d=0;for(l=0,c=n.length;l<c;l++)switch(n[l].type){case"lattice":d+=((h=n[l].coords.length/n[l].verticesPerRow|0)-1)*(n[l].verticesPerRow-1)*6;break;case"triangles":d+=n[l].coords.length}var f=new Float32Array(2*d),p=new Uint8Array(3*d),m=i.coords,g=i.colors,b=0,_=0;for(l=0,c=n.length;l<c;l++){var y=n[l],A=y.coords,S=y.colors;switch(y.type){case"lattice":var w=y.verticesPerRow;h=A.length/w|0;for(var P=1;P<h;P++)for(var R=P*w+1,C=1;C<w;C++,R++)f[b]=m[A[R-w-1]],f[b+1]=m[A[R-w-1]+1],f[b+2]=m[A[R-w]],f[b+3]=m[A[R-w]+1],f[b+4]=m[A[R-1]],f[b+5]=m[A[R-1]+1],p[_]=g[S[R-w-1]],p[_+1]=g[S[R-w-1]+1],p[_+2]=g[S[R-w-1]+2],p[_+3]=g[S[R-w]],p[_+4]=g[S[R-w]+1],p[_+5]=g[S[R-w]+2],p[_+6]=g[S[R-1]],p[_+7]=g[S[R-1]+1],p[_+8]=g[S[R-1]+2],f[b+6]=f[b+2],f[b+7]=f[b+3],f[b+8]=f[b+4],f[b+9]=f[b+5],f[b+10]=m[A[R]],f[b+11]=m[A[R]+1],p[_+9]=p[_+3],p[_+10]=p[_+4],p[_+11]=p[_+5],p[_+12]=p[_+6],p[_+13]=p[_+7],p[_+14]=p[_+8],p[_+15]=g[S[R]],p[_+16]=g[S[R]+1],p[_+17]=g[S[R]+2],b+=12,_+=18;break;case"triangles":for(var k=0,x=A.length;k<x;k++)f[b]=m[A[k]],f[b+1]=m[A[k]+1],p[_]=g[S[k]],p[_+1]=g[S[k]+1],p[_+2]=g[S[k]+2],b+=2,_+=3}}r?s.clearColor(r[0]/255,r[1]/255,r[2]/255,1):s.clearColor(0,0,0,0),s.clear(s.COLOR_BUFFER_BIT);var T=s.createBuffer();s.bindBuffer(s.ARRAY_BUFFER,T),s.bufferData(s.ARRAY_BUFFER,f,s.STATIC_DRAW),s.enableVertexAttribArray(a.positionLocation),s.vertexAttribPointer(a.positionLocation,2,s.FLOAT,!1,0,0);var E=s.createBuffer();return s.bindBuffer(s.ARRAY_BUFFER,E),s.bufferData(s.ARRAY_BUFFER,p,s.STATIC_DRAW),s.enableVertexAttribArray(a.colorLocation),s.vertexAttribPointer(a.colorLocation,3,s.UNSIGNED_BYTE,!1,0,0),s.uniform2f(a.scaleLocation,i.scaleX,i.scaleY),s.uniform2f(a.offsetLocation,i.offsetX,i.offsetY),s.drawArrays(s.TRIANGLES,0,d),s.flush(),s.deleteBuffer(T),s.deleteBuffer(E),o},clear:function(){p&&p.canvas&&(p.canvas.width=0,p.canvas.height=0),v&&v.canvas&&(v.canvas.width=0,v.canvas.height=0),p=null,v=null}}}();t.WebGLUtils=a},function(e,t,r){"use strict";function n(e){return e.replace(/>\\376\\377([^<]+)/g,function(e,t){for(var r=t.replace(/\\([0-3])([0-7])([0-7])/g,function(e,t,r,n){return String.fromCharCode(64*t+8*r+1*n)}),n="",i=0;i<r.length;i+=2){var a=256*r.charCodeAt(i)+r.charCodeAt(i+1);n+=a>=32&&a<127&&60!==a&&62!==a&&38!==a?String.fromCharCode(a):"&#x"+(65536+a).toString(16).substring(1)+";"}return">"+n})}function i(e){if("string"==typeof e)e=n(e),e=(new DOMParser).parseFromString(e,"application/xml");else if(!(e instanceof Document))throw new Error("Metadata: Invalid metadata object");this.metaDocument=e,this.metadata=Object.create(null),this.parse()}Object.defineProperty(t,"__esModule",{value:!0}),i.prototype={parse:function(){var e=this.metaDocument.documentElement;if("rdf:rdf"!==e.nodeName.toLowerCase())for(e=e.firstChild;e&&"rdf:rdf"!==e.nodeName.toLowerCase();)e=e.nextSibling;var t=e?e.nodeName.toLowerCase():null;if(e&&"rdf:rdf"===t&&e.hasChildNodes()){var r,n,i,a,o,s,l,u=e.childNodes;for(a=0,s=u.length;a<s;a++)if("rdf:description"===(r=u[a]).nodeName.toLowerCase())for(o=0,l=r.childNodes.length;o<l;o++)"#text"!==r.childNodes[o].nodeName.toLowerCase()&&(i=(n=r.childNodes[o]).nodeName.toLowerCase(),this.metadata[i]=n.textContent.trim())}},get:function(e){return this.metadata[e]||null},has:function(e){return void 0!==this.metadata[e]}},t.Metadata=i},function(e,t,r){"use strict";function n(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 i(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)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.AnnotationLayer=void 0;var o=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),s=r(8),l=r(0),u=function(){function e(){a(this,e)}return o(e,null,[{key:"create",value:function(e){switch(e.data.annotationType){case l.AnnotationType.LINK:return new h(e);case l.AnnotationType.TEXT:return new d(e);case l.AnnotationType.WIDGET:switch(e.data.fieldType){case"Tx":return new p(e);case"Btn":if(e.data.radioButton)return new g(e);if(e.data.checkBox)return new m(e);(0,l.warn)("Unimplemented button widget annotation: pushbutton");break;case"Ch":return new v(e)}return new f(e);case l.AnnotationType.POPUP:return new b(e);case l.AnnotationType.LINE:return new y(e);case l.AnnotationType.HIGHLIGHT:return new A(e);case l.AnnotationType.UNDERLINE:return new S(e);case l.AnnotationType.SQUIGGLY:return new w(e);case l.AnnotationType.STRIKEOUT:return new P(e);case l.AnnotationType.FILEATTACHMENT:return new R(e);default:return new c(e)}}}]),e}(),c=function(){function e(t){var r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];a(this,e),this.isRenderable=r,this.data=t.data,this.layer=t.layer,this.page=t.page,this.viewport=t.viewport,this.linkService=t.linkService,this.downloadManager=t.downloadManager,this.imageResourcesPath=t.imageResourcesPath,this.renderInteractiveForms=t.renderInteractiveForms,r&&(this.container=this._createContainer(n))}return o(e,[{key:"_createContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.data,r=this.page,n=this.viewport,i=document.createElement("section"),a=t.rect[2]-t.rect[0],o=t.rect[3]-t.rect[1];i.setAttribute("data-annotation-id",t.id);var u=l.Util.normalizeRect([t.rect[0],r.view[3]-t.rect[1]+r.view[1],t.rect[2],r.view[3]-t.rect[3]+r.view[1]]);if(s.CustomStyle.setProp("transform",i,"matrix("+n.transform.join(",")+")"),s.CustomStyle.setProp("transformOrigin",i,-u[0]+"px "+-u[1]+"px"),!e&&t.borderStyle.width>0){i.style.borderWidth=t.borderStyle.width+"px",t.borderStyle.style!==l.AnnotationBorderStyleType.UNDERLINE&&(a-=2*t.borderStyle.width,o-=2*t.borderStyle.width);var c=t.borderStyle.horizontalCornerRadius,h=t.borderStyle.verticalCornerRadius;if(c>0||h>0){var d=c+"px / "+h+"px";s.CustomStyle.setProp("borderRadius",i,d)}switch(t.borderStyle.style){case l.AnnotationBorderStyleType.SOLID:i.style.borderStyle="solid";break;case l.AnnotationBorderStyleType.DASHED:i.style.borderStyle="dashed";break;case l.AnnotationBorderStyleType.BEVELED:(0,l.warn)("Unimplemented border style: beveled");break;case l.AnnotationBorderStyleType.INSET:(0,l.warn)("Unimplemented border style: inset");break;case l.AnnotationBorderStyleType.UNDERLINE:i.style.borderBottomStyle="solid"}t.color?i.style.borderColor=l.Util.makeCssRgb(0|t.color[0],0|t.color[1],0|t.color[2]):i.style.borderWidth=0}return i.style.left=u[0]+"px",i.style.top=u[1]+"px",i.style.width=a+"px",i.style.height=o+"px",i}},{key:"_createPopup",value:function(e,t,r){t||((t=document.createElement("div")).style.height=e.style.height,t.style.width=e.style.width,e.appendChild(t));var n=new _({container:e,trigger:t,color:r.color,title:r.title,contents:r.contents,hideWrapper:!0}).render();n.style.left=e.style.width,e.appendChild(n)}},{key:"render",value:function(){throw new Error("Abstract method `AnnotationElement.render` called")}}]),e}(),h=function(e){function t(){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,c),o(t,[{key:"render",value:function(){this.container.className="linkAnnotation";var e=document.createElement("a");return(0,s.addLinkAttributes)(e,{url:this.data.url,target:this.data.newWindow?s.LinkTarget.BLANK:void 0}),this.data.url||(this.data.action?this._bindNamedAction(e,this.data.action):this._bindLink(e,this.data.dest)),this.container.appendChild(e),this.container}},{key:"_bindLink",value:function(e,t){var r=this;e.href=this.linkService.getDestinationHash(t),e.onclick=function(){return t&&r.linkService.navigateTo(t),!1},t&&(e.className="internalLink")}},{key:"_bindNamedAction",value:function(e,t){var r=this;e.href=this.linkService.getAnchorUrl(""),e.onclick=function(){return r.linkService.executeNamedAction(t),!1},e.className="internalLink"}}]),t}(),d=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return i(t,c),o(t,[{key:"render",value:function(){this.container.className="textAnnotation";var e=document.createElement("img");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+".svg",e.alt="[{{type}} Annotation]",e.dataset.l10nId="text_annotation_type",e.dataset.l10nArgs=JSON.stringify({type:this.data.name}),this.data.hasPopup||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}}]),t}(),f=function(e){function t(){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return i(t,c),o(t,[{key:"render",value:function(){return this.container}}]),t}(),p=function(e){function t(e){a(this,t);var r=e.renderInteractiveForms||!e.data.hasAppearance&&!!e.data.fieldValue;return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return i(t,f),o(t,[{key:"render",value:function(){var e=["left","center","right"];this.container.className="textWidgetAnnotation";var t=null;if(this.renderInteractiveForms){if(this.data.multiLine?(t=document.createElement("textarea")).textContent=this.data.fieldValue:((t=document.createElement("input")).type="text",t.setAttribute("value",this.data.fieldValue)),t.disabled=this.data.readOnly,null!==this.data.maxLen&&(t.maxLength=this.data.maxLen),this.data.comb){var r=(this.data.rect[2]-this.data.rect[0])/this.data.maxLen;t.classList.add("comb"),t.style.letterSpacing="calc("+r+"px - 1ch)"}}else{(t=document.createElement("div")).textContent=this.data.fieldValue,t.style.verticalAlign="middle",t.style.display="table-cell";var n=null;this.data.fontRefName&&(n=this.page.commonObjs.getData(this.data.fontRefName)),this._setTextStyle(t,n)}return null!==this.data.textAlignment&&(t.style.textAlign=e[this.data.textAlignment]),this.container.appendChild(t),this.container}},{key:"_setTextStyle",value:function(e,t){var r=e.style;if(r.fontSize=this.data.fontSize+"px",r.direction=this.data.fontDirection<0?"rtl":"ltr",t){r.fontWeight=t.black?t.bold?"900":"bold":t.bold?"bold":"normal",r.fontStyle=t.italic?"italic":"normal";var n=t.loadedName?'"'+t.loadedName+'", ':"",i=t.fallbackName||"Helvetica, sans-serif";r.fontFamily=n+i}}}]),t}(),m=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,e.renderInteractiveForms))}return i(t,f),o(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation checkBox";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="checkbox",this.data.fieldValue&&"Off"!==this.data.fieldValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),t}(),g=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,e.renderInteractiveForms))}return i(t,f),o(t,[{key:"render",value:function(){this.container.className="buttonWidgetAnnotation radioButton";var e=document.createElement("input");return e.disabled=this.data.readOnly,e.type="radio",e.name=this.data.fieldName,this.data.fieldValue===this.data.buttonValue&&e.setAttribute("checked",!0),this.container.appendChild(e),this.container}}]),t}(),v=function(e){function t(e){return a(this,t),n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,e.renderInteractiveForms))}return i(t,f),o(t,[{key:"render",value:function(){this.container.className="choiceWidgetAnnotation";var e=document.createElement("select");e.disabled=this.data.readOnly,this.data.combo||(e.size=this.data.options.length,this.data.multiSelect&&(e.multiple=!0));for(var t=0,r=this.data.options.length;t<r;t++){var n=this.data.options[t],i=document.createElement("option");i.textContent=n.displayValue,i.value=n.exportValue,this.data.fieldValue.indexOf(n.displayValue)>=0&&i.setAttribute("selected",!0),e.appendChild(i)}return this.container.appendChild(e),this.container}}]),t}(),b=function(e){function t(e){a(this,t);var r=!(!e.data.title&&!e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r))}return i(t,c),o(t,[{key:"render",value:function(){var e=["Line"];if(this.container.className="popupAnnotation",e.indexOf(this.data.parentType)>=0)return this.container;var t='[data-annotation-id="'+this.data.parentId+'"]',r=this.layer.querySelector(t);if(!r)return this.container;var n=new _({container:this.container,trigger:r,color:this.data.color,title:this.data.title,contents:this.data.contents}),i=parseFloat(r.style.left),a=parseFloat(r.style.width);return s.CustomStyle.setProp("transformOrigin",this.container,-(i+a)+"px -"+r.style.top),this.container.style.left=i+a+"px",this.container.appendChild(n.render()),this.container}}]),t}(),_=function(){function e(t){a(this,e),this.container=t.container,this.trigger=t.trigger,this.color=t.color,this.title=t.title,this.contents=t.contents,this.hideWrapper=t.hideWrapper||!1,this.pinned=!1}return o(e,[{key:"render",value:function(){var e=document.createElement("div");e.className="popupWrapper",this.hideElement=this.hideWrapper?e:this.container,this.hideElement.setAttribute("hidden",!0);var t=document.createElement("div");t.className="popup";var r=this.color;if(r){var n=.7*(255-r[0])+r[0],i=.7*(255-r[1])+r[1],a=.7*(255-r[2])+r[2];t.style.backgroundColor=l.Util.makeCssRgb(0|n,0|i,0|a)}var o=this._formatContents(this.contents),s=document.createElement("h1");return s.textContent=this.title,this.trigger.addEventListener("click",this._toggle.bind(this)),this.trigger.addEventListener("mouseover",this._show.bind(this,!1)),this.trigger.addEventListener("mouseout",this._hide.bind(this,!1)),t.addEventListener("click",this._hide.bind(this,!0)),t.appendChild(s),t.appendChild(o),e.appendChild(t),e}},{key:"_formatContents",value:function(e){for(var t=document.createElement("p"),r=e.split(/(?:\r\n?|\n)/),n=0,i=r.length;n<i;++n){var a=r[n];t.appendChild(document.createTextNode(a)),n<i-1&&t.appendChild(document.createElement("br"))}return t}},{key:"_toggle",value:function(){this.pinned?this._hide(!0):this._show(!0)}},{key:"_show",value:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0]&&(this.pinned=!0),this.hideElement.hasAttribute("hidden")&&(this.hideElement.removeAttribute("hidden"),this.container.style.zIndex+=1)}},{key:"_hide",value:function(){(!(arguments.length>0&&void 0!==arguments[0])||arguments[0])&&(this.pinned=!1),this.hideElement.hasAttribute("hidden")||this.pinned||(this.hideElement.setAttribute("hidden",!0),this.container.style.zIndex-=1)}}]),e}(),y=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return i(t,c),o(t,[{key:"render",value:function(){var e="http://www.w3.org/2000/svg";this.container.className="lineAnnotation";var t=this.data,r=t.rect[2]-t.rect[0],n=t.rect[3]-t.rect[1],i=document.createElementNS(e,"svg:svg");i.setAttributeNS(null,"version","1.1"),i.setAttributeNS(null,"width",r+"px"),i.setAttributeNS(null,"height",n+"px"),i.setAttributeNS(null,"preserveAspectRatio","none"),i.setAttributeNS(null,"viewBox","0 0 "+r+" "+n);var a=document.createElementNS(e,"svg:line");return a.setAttributeNS(null,"x1",t.rect[2]-t.lineCoordinates[0]),a.setAttributeNS(null,"y1",t.rect[3]-t.lineCoordinates[1]),a.setAttributeNS(null,"x2",t.rect[2]-t.lineCoordinates[2]),a.setAttributeNS(null,"y2",t.rect[3]-t.lineCoordinates[3]),a.setAttributeNS(null,"stroke-width",t.borderStyle.width),a.setAttributeNS(null,"stroke","transparent"),i.appendChild(a),this.container.append(i),this._createPopup(this.container,a,this.data),this.container}}]),t}(),A=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return i(t,c),o(t,[{key:"render",value:function(){return this.container.className="highlightAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),S=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return i(t,c),o(t,[{key:"render",value:function(){return this.container.className="underlineAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),w=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return i(t,c),o(t,[{key:"render",value:function(){return this.container.className="squigglyAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),P=function(e){function t(e){a(this,t);var r=!!(e.data.hasPopup||e.data.title||e.data.contents);return n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,r,!0))}return i(t,c),o(t,[{key:"render",value:function(){return this.container.className="strikeoutAnnotation",this.data.hasPopup||this._createPopup(this.container,null,this.data),this.container}}]),t}(),R=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,!0)),i=r.data.file;return r.filename=(0,s.getFilenameFromUrl)(i.filename),r.content=i.content,r.linkService.onFileAttachmentAnnotation({id:(0,l.stringToPDFString)(i.filename),filename:i.filename,content:i.content}),r}return i(t,c),o(t,[{key:"render",value:function(){this.container.className="fileAttachmentAnnotation";var e=document.createElement("div");return e.style.height=this.container.style.height,e.style.width=this.container.style.width,e.addEventListener("dblclick",this._download.bind(this)),this.data.hasPopup||!this.data.title&&!this.data.contents||this._createPopup(this.container,e,this.data),this.container.appendChild(e),this.container}},{key:"_download",value:function(){this.downloadManager?this.downloadManager.downloadData(this.content,this.filename,""):(0,l.warn)("Download cannot be started due to unavailable download manager")}}]),t}(),C=function(){function e(){a(this,e)}return o(e,null,[{key:"render",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var n=e.annotations[t];if(n){var i=u.create({data:n,layer:e.div,page:e.page,viewport:e.viewport,linkService:e.linkService,downloadManager:e.downloadManager,imageResourcesPath:e.imageResourcesPath||(0,s.getDefaultSetting)("imageResourcesPath"),renderInteractiveForms:e.renderInteractiveForms||!1});i.isRenderable&&e.div.appendChild(i.render())}}}},{key:"update",value:function(e){for(var t=0,r=e.annotations.length;t<r;t++){var n=e.annotations[t],i=e.div.querySelector('[data-annotation-id="'+n.id+'"]');i&&s.CustomStyle.setProp("transform",i,"matrix("+e.viewport.transform.join(",")+")")}e.div.removeAttribute("hidden")}}]),e}();t.AnnotationLayer=C},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.renderTextLayer=void 0;var n=r(0),i=r(8),a=function(){function e(e){return!c.test(e)}function t(t,r,a){var o=document.createElement("div"),s={style:null,angle:0,canvasWidth:0,isWhitespace:!1,originalTransform:null,paddingBottom:0,paddingLeft:0,paddingRight:0,paddingTop:0,scale:1};if(t._textDivs.push(o),e(r.str))return s.isWhitespace=!0,void t._textDivProperties.set(o,s);var l=n.Util.transform(t._viewport.transform,r.transform),u=Math.atan2(l[1],l[0]),c=a[r.fontName];c.vertical&&(u+=Math.PI/2);var d=Math.sqrt(l[2]*l[2]+l[3]*l[3]),f=d;c.ascent?f=c.ascent*f:c.descent&&(f=(1+c.descent)*f);var p,m;if(0===u?(p=l[4],m=l[5]-f):(p=l[4]+f*Math.sin(u),m=l[5]-f*Math.cos(u)),h[1]=p,h[3]=m,h[5]=d,h[7]=c.fontFamily,s.style=h.join(""),o.setAttribute("style",s.style),o.textContent=r.str,(0,i.getDefaultSetting)("pdfBug")&&(o.dataset.fontName=r.fontName),0!==u&&(s.angle=u*(180/Math.PI)),r.str.length>1&&(c.vertical?s.canvasWidth=r.height*t._viewport.scale:s.canvasWidth=r.width*t._viewport.scale),t._textDivProperties.set(o,s),t._textContentStream&&t._layoutText(o),t._enhanceTextSelection){var g=1,v=0;0!==u&&(g=Math.cos(u),v=Math.sin(u));var b,_,y=(c.vertical?r.height:r.width)*t._viewport.scale,A=d;0!==u?(b=[g,v,-v,g,p,m],_=n.Util.getAxialAlignedBoundingBox([0,0,y,A],b)):_=[p,m,p+y,m+A],t._bounds.push({left:_[0],top:_[1],right:_[2],bottom:_[3],div:o,size:[y,A],m:b})}}function r(e){if(!e._canceled){var t=e._textDivs,r=e._capability,n=t.length;if(n>u)return e._renderingDone=!0,void r.resolve();if(!e._textContentStream)for(var i=0;i<n;i++)e._layoutText(t[i]);e._renderingDone=!0,r.resolve()}}function a(e){for(var t=e._bounds,r=e._viewport,i=o(r.width,r.height,t),a=0;a<i.length;a++){var s=t[a].div,l=e._textDivProperties.get(s);if(0!==l.angle){var u=i[a],c=t[a],h=c.m,d=h[0],f=h[1],p=[[0,0],[0,c.size[1]],[c.size[0],0],c.size],m=new Float64Array(64);p.forEach(function(e,t){var r=n.Util.applyTransform(e,h);m[t+0]=d&&(u.left-r[0])/d,m[t+4]=f&&(u.top-r[1])/f,m[t+8]=d&&(u.right-r[0])/d,m[t+12]=f&&(u.bottom-r[1])/f,m[t+16]=f&&(u.left-r[0])/-f,m[t+20]=d&&(u.top-r[1])/d,m[t+24]=f&&(u.right-r[0])/-f,m[t+28]=d&&(u.bottom-r[1])/d,m[t+32]=d&&(u.left-r[0])/-d,m[t+36]=f&&(u.top-r[1])/-f,m[t+40]=d&&(u.right-r[0])/-d,m[t+44]=f&&(u.bottom-r[1])/-f,m[t+48]=f&&(u.left-r[0])/f,m[t+52]=d&&(u.top-r[1])/-d,m[t+56]=f&&(u.right-r[0])/f,m[t+60]=d&&(u.bottom-r[1])/-d});var g=function(e,t,r){for(var n=0,i=0;i<r;i++){var a=e[t++];a>0&&(n=n?Math.min(a,n):a)}return n},v=1+Math.min(Math.abs(d),Math.abs(f));l.paddingLeft=g(m,32,16)/v,l.paddingTop=g(m,48,16)/v,l.paddingRight=g(m,0,16)/v,l.paddingBottom=g(m,16,16)/v,e._textDivProperties.set(s,l)}else l.paddingLeft=t[a].left-i[a].left,l.paddingTop=t[a].top-i[a].top,l.paddingRight=i[a].right-t[a].right,l.paddingBottom=i[a].bottom-t[a].bottom,e._textDivProperties.set(s,l)}}function o(e,t,r){var n=r.map(function(e,t){return{x1:e.left,y1:e.top,x2:e.right,y2:e.bottom,index:t,x1New:void 0,x2New:void 0}});s(e,n);var i=new Array(r.length);return n.forEach(function(e){var t=e.index;i[t]={left:e.x1New,top:0,right:e.x2New,bottom:0}}),r.map(function(t,r){var a=i[r],o=n[r];o.x1=t.top,o.y1=e-a.right,o.x2=t.bottom,o.y2=e-a.left,o.index=r,o.x1New=void 0,o.x2New=void 0}),s(t,n),n.forEach(function(e){var t=e.index;i[t].top=e.x1New,i[t].bottom=e.x2New}),i}function s(e,t){t.sort(function(e,t){return e.x1-t.x1||e.index-t.index});var r=[{start:-1/0,end:1/0,boundary:{x1:-1/0,y1:-1/0,x2:0,y2:1/0,index:-1,x1New:0,x2New:0}}];t.forEach(function(e){for(var t=0;t<r.length&&r[t].end<=e.y1;)t++;for(var n=r.length-1;n>=0&&r[n].start>=e.y2;)n--;var i,a,o,s,l=-1/0;for(o=t;o<=n;o++){var u;(u=(a=(i=r[o]).boundary).x2>e.x1?a.index>e.index?a.x1New:e.x1:void 0===a.x2New?(a.x2+e.x1)/2:a.x2New)>l&&(l=u)}for(e.x1New=l,o=t;o<=n;o++)void 0===(a=(i=r[o]).boundary).x2New?a.x2>e.x1?a.index>e.index&&(a.x2New=a.x2):a.x2New=l:a.x2New>l&&(a.x2New=Math.max(l,a.x2));var c=[],h=null;for(o=t;o<=n;o++){var d=(a=(i=r[o]).boundary).x2>e.x2?a:e;h===d?c[c.length-1].end=i.end:(c.push({start:i.start,end:i.end,boundary:d}),h=d)}for(r[t].start<e.y1&&(c[0].start=e.y1,c.unshift({start:r[t].start,end:e.y1,boundary:r[t].boundary})),e.y2<r[n].end&&(c[c.length-1].end=e.y2,c.push({start:e.y2,end:r[n].end,boundary:r[n].boundary})),o=t;o<=n;o++)if(i=r[o],void 0===(a=i.boundary).x2New){var f=!1;for(s=t-1;!f&&s>=0&&r[s].start>=a.y1;s--)f=r[s].boundary===a;for(s=n+1;!f&&s<r.length&&r[s].end<=a.y2;s++)f=r[s].boundary===a;for(s=0;!f&&s<c.length;s++)f=c[s].boundary===a;f||(a.x2New=l)}Array.prototype.splice.apply(r,[t,n-t+1].concat(c))}),r.forEach(function(t){var r=t.boundary;void 0===r.x2New&&(r.x2New=Math.max(e,r.x2))})}function l(e){var t=e.textContent,r=e.textContentStream,i=e.container,a=e.viewport,o=e.textDivs,s=e.textContentItemsStr,l=e.enhanceTextSelection;this._textContent=t,this._textContentStream=r,this._container=i,this._viewport=a,this._textDivs=o||[],this._textContentItemsStr=s||[],this._enhanceTextSelection=!!l,this._reader=null,this._layoutTextLastFontSize=null,this._layoutTextLastFontFamily=null,this._layoutTextCtx=null,this._textDivProperties=new WeakMap,this._renderingDone=!1,this._canceled=!1,this._capability=(0,n.createPromiseCapability)(),this._renderTimer=null,this._bounds=[]}var u=1e5,c=/\S/,h=["left: ",0,"px; top: ",0,"px; font-size: ",0,"px; font-family: ","",";"];return l.prototype={get promise(){return this._capability.promise},cancel:function(){this._reader&&(this._reader.cancel(new n.AbortException("text layer task cancelled")),this._reader=null),this._canceled=!0,null!==this._renderTimer&&(clearTimeout(this._renderTimer),this._renderTimer=null),this._capability.reject("canceled")},_processItems:function(e,r){for(var n=0,i=e.length;n<i;n++)this._textContentItemsStr.push(e[n].str),t(this,e[n],r)},_layoutText:function(e){var t=this._container,r=this._textDivProperties.get(e);if(!r.isWhitespace){var n=e.style.fontSize,a=e.style.fontFamily;n===this._layoutTextLastFontSize&&a===this._layoutTextLastFontFamily||(this._layoutTextCtx.font=n+" "+a,this._lastFontSize=n,this._lastFontFamily=a);var o=this._layoutTextCtx.measureText(e.textContent).width,s="";0!==r.canvasWidth&&o>0&&(r.scale=r.canvasWidth/o,s="scaleX("+r.scale+")"),0!==r.angle&&(s="rotate("+r.angle+"deg) "+s),""!==s&&(r.originalTransform=s,i.CustomStyle.setProp("transform",e,s)),this._textDivProperties.set(e,r),t.appendChild(e)}},_render:function(e){var t=this,i=(0,n.createPromiseCapability)(),a=Object.create(null),o=document.createElement("canvas");if(o.mozOpaque=!0,this._layoutTextCtx=o.getContext("2d",{alpha:!1}),this._textContent){var s=this._textContent.items,l=this._textContent.styles;this._processItems(s,l),i.resolve()}else{if(!this._textContentStream)throw new Error('Neither "textContent" nor "textContentStream" parameters specified.');var u=function e(){t._reader.read().then(function(r){var o=r.value;r.done?i.resolve():(n.Util.extendObj(a,o.styles),t._processItems(o.items,a),e())},i.reject)};this._reader=this._textContentStream.getReader(),u()}i.promise.then(function(){a=null,e?t._renderTimer=setTimeout(function(){r(t),t._renderTimer=null},e):r(t)},this._capability.reject)},expandTextDivs:function(e){if(this._enhanceTextSelection&&this._renderingDone){null!==this._bounds&&(a(this),this._bounds=null);for(var t=0,r=this._textDivs.length;t<r;t++){var n=this._textDivs[t],o=this._textDivProperties.get(n);if(!o.isWhitespace)if(e){var s="",l="";1!==o.scale&&(s="scaleX("+o.scale+")"),0!==o.angle&&(s="rotate("+o.angle+"deg) "+s),0!==o.paddingLeft&&(l+=" padding-left: "+o.paddingLeft/o.scale+"px;",s+=" translateX("+-o.paddingLeft/o.scale+"px)"),0!==o.paddingTop&&(l+=" padding-top: "+o.paddingTop+"px;",s+=" translateY("+-o.paddingTop+"px)"),0!==o.paddingRight&&(l+=" padding-right: "+o.paddingRight/o.scale+"px;"),0!==o.paddingBottom&&(l+=" padding-bottom: "+o.paddingBottom+"px;"),""!==l&&n.setAttribute("style",o.style+l),""!==s&&i.CustomStyle.setProp("transform",n,s)}else n.style.padding=0,i.CustomStyle.setProp("transform",n,o.originalTransform||"")}}}},function(e){var t=new l({textContent:e.textContent,textContentStream:e.textContentStream,container:e.container,viewport:e.viewport,textDivs:e.textDivs,textContentItemsStr:e.textContentItemsStr,enhanceTextSelection:e.enhanceTextSelection});return t._render(e.timeout),t}}();t.renderTextLayer=a},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SVGGraphics=void 0;var n=r(0),i=function(){throw new Error("Not implemented: SVGGraphics")},a={fontStyle:"normal",fontWeight:"normal",fillColor:"#000000"},o=function(){function e(e,t,r){for(var n=-1,i=t;i<r;i++){var a=255&(n^e[i]);n=n>>>8^u[a]}return-1^n}function t(t,r,n,i){var a=i,o=r.length;n[a]=o>>24&255,n[a+1]=o>>16&255,n[a+2]=o>>8&255,n[a+3]=255&o,n[a+=4]=255&t.charCodeAt(0),n[a+1]=255&t.charCodeAt(1),n[a+2]=255&t.charCodeAt(2),n[a+3]=255&t.charCodeAt(3),a+=4,n.set(r,a);var s=e(n,i+4,a+=r.length);n[a]=s>>24&255,n[a+1]=s>>16&255,n[a+2]=s>>8&255,n[a+3]=255&s}function r(e,t,r){for(var n=1,i=0,a=t;a<r;++a)i=(i+(n=(n+(255&e[a]))%65521))%65521;return i<<16|n}function i(e){if(!(0,n.isNodeJS)())return a(e);try{var t;t=parseInt(process.versions.node)>=8?e:new Buffer(e);var r=require("zlib").deflateSync(t,{level:9});return r instanceof Uint8Array?r:new Uint8Array(r)}catch(e){(0,n.warn)("Not compressing PNG because zlib.deflateSync is unavailable: "+e)}return a(e)}function a(e){var t=e.length,n=Math.ceil(t/65535),i=new Uint8Array(2+t+5*n+4),a=0;i[a++]=120,i[a++]=156;for(var o=0;t>65535;)i[a++]=0,i[a++]=255,i[a++]=255,i[a++]=0,i[a++]=0,i.set(e.subarray(o,o+65535),a),a+=65535,o+=65535,t-=65535;i[a++]=1,i[a++]=255&t,i[a++]=t>>8&255,i[a++]=255&~t,i[a++]=(65535&~t)>>8&255,i.set(e.subarray(o),a),a+=e.length-o;var s=r(e,0,e.length);return i[a++]=s>>24&255,i[a++]=s>>16&255,i[a++]=s>>8&255,i[a++]=255&s,i}function o(e,r,a){var o,u,c,h=e.width,d=e.height,f=e.data;switch(r){case n.ImageKind.GRAYSCALE_1BPP:u=0,o=1,c=h+7>>3;break;case n.ImageKind.RGB_24BPP:u=2,o=8,c=3*h;break;case n.ImageKind.RGBA_32BPP:u=6,o=8,c=4*h;break;default:throw new Error("invalid format")}var p,m,g=new Uint8Array((1+c)*d),v=0,b=0;for(p=0;p<d;++p)g[v++]=0,g.set(f.subarray(b,b+c),v),b+=c,v+=c;if(r===n.ImageKind.GRAYSCALE_1BPP)for(v=0,p=0;p<d;p++)for(v++,m=0;m<c;m++)g[v++]^=255;var _=new Uint8Array([h>>24&255,h>>16&255,h>>8&255,255&h,d>>24&255,d>>16&255,d>>8&255,255&d,o,u,0,0,0]),y=i(g),A=s.length+3*l+_.length+y.length,S=new Uint8Array(A),w=0;return S.set(s,w),w+=s.length,t("IHDR",_,S,w),w+=l+_.length,t("IDATA",y,S,w),w+=l+y.length,t("IEND",new Uint8Array(0),S,w),(0,n.createObjectURL)(S,"image/png",a)}for(var s=new Uint8Array([137,80,78,71,13,10,26,10]),l=12,u=new Int32Array(256),c=0;c<256;c++){for(var h=c,d=0;d<8;d++)h=1&h?3988292384^h>>1&2147483647:h>>1&2147483647;u[c]=h}return function(e,t){return o(e,void 0===e.kind?n.ImageKind.GRAYSCALE_1BPP:e.kind,t)}}(),s=function(){function e(){this.fontSizeScale=1,this.fontWeight=a.fontWeight,this.fontSize=0,this.textMatrix=n.IDENTITY_MATRIX,this.fontMatrix=n.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRise=0,this.fillColor=a.fillColor,this.strokeColor="#000000",this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.lineJoin="",this.lineCap="",this.miterLimit=0,this.dashArray=[],this.dashPhase=0,this.dependencies=[],this.activeClipUrl=null,this.clipGroup=null,this.maskId=""}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}();t.SVGGraphics=i=function(){function e(e){for(var t=[],r=[],n=e.length,i=0;i<n;i++)"save"!==e[i].fn?"restore"===e[i].fn?t=r.pop():t.push(e[i]):(t.push({fnId:92,fn:"group",items:[]}),r.push(t),t=t[t.length-1].items);return t}function t(e){if(e===(0|e))return e.toString();var t=e.toFixed(10),r=t.length-1;if("0"!==t[r])return t;do{r--}while("0"===t[r]);return t.substr(0,"."===t[r]?r:r+1)}function r(e){if(0===e[4]&&0===e[5]){if(0===e[1]&&0===e[2])return 1===e[0]&&1===e[3]?"":"scale("+t(e[0])+" "+t(e[3])+")";if(e[0]===e[3]&&e[1]===-e[2])return"rotate("+t(180*Math.acos(e[0])/Math.PI)+")"}else if(1===e[0]&&0===e[1]&&0===e[2]&&1===e[3])return"translate("+t(e[4])+" "+t(e[5])+")";return"matrix("+t(e[0])+" "+t(e[1])+" "+t(e[2])+" "+t(e[3])+" "+t(e[4])+" "+t(e[5])+")"}function i(e,t,r){this.current=new s,this.transformMatrix=n.IDENTITY_MATRIX,this.transformStack=[],this.extraStack=[],this.commonObjs=e,this.objs=t,this.pendingClip=null,this.pendingEOFill=!1,this.embedFonts=!1,this.embeddedFonts=Object.create(null),this.cssStyle=null,this.forceDataSchema=!!r}var l="http://www.w3.org/2000/svg",u="http://www.w3.org/1999/xlink",c=["butt","round","square"],h=["miter","round","bevel"],d=0,f=0;return i.prototype={save:function(){this.transformStack.push(this.transformMatrix);var e=this.current;this.extraStack.push(e),this.current=e.clone()},restore:function(){this.transformMatrix=this.transformStack.pop(),this.current=this.extraStack.pop(),this.pendingClip=null,this.tgrp=null},group:function(e){this.save(),this.executeOpTree(e),this.restore()},loadDependencies:function(e){for(var t=this,r=e.fnArray,i=r.length,a=e.argsArray,o=0;o<i;o++)if(n.OPS.dependency===r[o])for(var s=a[o],l=0,u=s.length;l<u;l++){var c,h=s[l];c="g_"===h.substring(0,2)?new Promise(function(e){t.commonObjs.get(h,e)}):new Promise(function(e){t.objs.get(h,e)}),this.current.dependencies.push(c)}return Promise.all(this.current.dependencies)},transform:function(e,t,r,i,a,o){var s=[e,t,r,i,a,o];this.transformMatrix=n.Util.transform(this.transformMatrix,s),this.tgrp=null},getSVG:function(e,t){var r=this;this.viewport=t;var i=this._initialize(t);return this.loadDependencies(e).then(function(){r.transformMatrix=n.IDENTITY_MATRIX;var t=r.convertOpList(e);return r.executeOpTree(t),i})},convertOpList:function(t){var r=t.argsArray,i=t.fnArray,a=i.length,o=[],s=[];for(var l in n.OPS)o[n.OPS[l]]=l;for(var u=0;u<a;u++){var c=i[u];s.push({fnId:c,fn:o[c],args:r[u]})}return e(s)},executeOpTree:function(e){for(var t=e.length,r=0;r<t;r++){var i=e[r].fn,a=e[r].fnId,o=e[r].args;switch(0|a){case n.OPS.beginText:this.beginText();break;case n.OPS.setLeading:this.setLeading(o);break;case n.OPS.setLeadingMoveText:this.setLeadingMoveText(o[0],o[1]);break;case n.OPS.setFont:this.setFont(o);break;case n.OPS.showText:case n.OPS.showSpacedText:this.showText(o[0]);break;case n.OPS.endText:this.endText();break;case n.OPS.moveText:this.moveText(o[0],o[1]);break;case n.OPS.setCharSpacing:this.setCharSpacing(o[0]);break;case n.OPS.setWordSpacing:this.setWordSpacing(o[0]);break;case n.OPS.setHScale:this.setHScale(o[0]);break;case n.OPS.setTextMatrix:this.setTextMatrix(o[0],o[1],o[2],o[3],o[4],o[5]);break;case n.OPS.setTextRise:this.setTextRise(o[0]);break;case n.OPS.setLineWidth:this.setLineWidth(o[0]);break;case n.OPS.setLineJoin:this.setLineJoin(o[0]);break;case n.OPS.setLineCap:this.setLineCap(o[0]);break;case n.OPS.setMiterLimit:this.setMiterLimit(o[0]);break;case n.OPS.setFillRGBColor:this.setFillRGBColor(o[0],o[1],o[2]);break;case n.OPS.setStrokeRGBColor:this.setStrokeRGBColor(o[0],o[1],o[2]);break;case n.OPS.setDash:this.setDash(o[0],o[1]);break;case n.OPS.setGState:this.setGState(o[0]);break;case n.OPS.fill:this.fill();break;case n.OPS.eoFill:this.eoFill();break;case n.OPS.stroke:this.stroke();break;case n.OPS.fillStroke:this.fillStroke();break;case n.OPS.eoFillStroke:this.eoFillStroke();break;case n.OPS.clip:this.clip("nonzero");break;case n.OPS.eoClip:this.clip("evenodd");break;case n.OPS.paintSolidColorImageMask:this.paintSolidColorImageMask();break;case n.OPS.paintJpegXObject:this.paintJpegXObject(o[0],o[1],o[2]);break;case n.OPS.paintImageXObject:this.paintImageXObject(o[0]);break;case n.OPS.paintInlineImageXObject:this.paintInlineImageXObject(o[0]);break;case n.OPS.paintImageMaskXObject:this.paintImageMaskXObject(o[0]);break;case n.OPS.paintFormXObjectBegin:this.paintFormXObjectBegin(o[0],o[1]);break;case n.OPS.paintFormXObjectEnd:this.paintFormXObjectEnd();break;case n.OPS.closePath:this.closePath();break;case n.OPS.closeStroke:this.closeStroke();break;case n.OPS.closeFillStroke:this.closeFillStroke();break;case n.OPS.nextLine:this.nextLine();break;case n.OPS.transform:this.transform(o[0],o[1],o[2],o[3],o[4],o[5]);break;case n.OPS.constructPath:this.constructPath(o[0],o[1]);break;case n.OPS.endPath:this.endPath();break;case 92:this.group(e[r].items);break;default:(0,n.warn)("Unimplemented operator "+i)}}},setWordSpacing:function(e){this.current.wordSpacing=e},setCharSpacing:function(e){this.current.charSpacing=e},nextLine:function(){this.moveText(0,this.current.leading)},setTextMatrix:function(e,r,n,i,a,o){var s=this.current;this.current.textMatrix=this.current.lineMatrix=[e,r,n,i,a,o],this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,s.xcoords=[],s.tspan=document.createElementNS(l,"svg:tspan"),s.tspan.setAttributeNS(null,"font-family",s.fontFamily),s.tspan.setAttributeNS(null,"font-size",t(s.fontSize)+"px"),s.tspan.setAttributeNS(null,"y",t(-s.y)),s.txtElement=document.createElementNS(l,"svg:text"),s.txtElement.appendChild(s.tspan)},beginText:function(){this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0,this.current.textMatrix=n.IDENTITY_MATRIX,this.current.lineMatrix=n.IDENTITY_MATRIX,this.current.tspan=document.createElementNS(l,"svg:tspan"),this.current.txtElement=document.createElementNS(l,"svg:text"),this.current.txtgrp=document.createElementNS(l,"svg:g"),this.current.xcoords=[]},moveText:function(e,r){var n=this.current;this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=r,n.xcoords=[],n.tspan=document.createElementNS(l,"svg:tspan"),n.tspan.setAttributeNS(null,"font-family",n.fontFamily),n.tspan.setAttributeNS(null,"font-size",t(n.fontSize)+"px"),n.tspan.setAttributeNS(null,"y",t(-n.y))},showText:function(e){var i=this.current,o=i.font,s=i.fontSize;if(0!==s){var l,u=i.charSpacing,c=i.wordSpacing,h=i.fontDirection,d=i.textHScale*h,f=e.length,p=o.vertical,m=s*i.fontMatrix[0],g=0;for(l=0;l<f;++l){var v=e[l];if(null!==v)if((0,n.isNum)(v))g+=-v*s*.001;else{var b=v.width,_=v.fontChar,y=b*m+((v.isSpace?c:0)+u)*h;v.isInFont||o.missingFile?(i.xcoords.push(i.x+g*d),i.tspan.textContent+=_,g+=y):g+=y}else g+=h*c}p?i.y-=g*d:i.x+=g*d,i.tspan.setAttributeNS(null,"x",i.xcoords.map(t).join(" ")),i.tspan.setAttributeNS(null,"y",t(-i.y)),i.tspan.setAttributeNS(null,"font-family",i.fontFamily),i.tspan.setAttributeNS(null,"font-size",t(i.fontSize)+"px"),i.fontStyle!==a.fontStyle&&i.tspan.setAttributeNS(null,"font-style",i.fontStyle),i.fontWeight!==a.fontWeight&&i.tspan.setAttributeNS(null,"font-weight",i.fontWeight),i.fillColor!==a.fillColor&&i.tspan.setAttributeNS(null,"fill",i.fillColor);var A=i.textMatrix;0!==i.textRise&&((A=A.slice())[5]+=i.textRise),i.txtElement.setAttributeNS(null,"transform",r(A)+" scale(1, -1)"),i.txtElement.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.txtElement.appendChild(i.tspan),i.txtgrp.appendChild(i.txtElement),this._ensureTransformGroup().appendChild(i.txtElement)}},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},addFontStyle:function(e){this.cssStyle||(this.cssStyle=document.createElementNS(l,"svg:style"),this.cssStyle.setAttributeNS(null,"type","text/css"),this.defs.appendChild(this.cssStyle));var t=(0,n.createObjectURL)(e.data,e.mimetype,this.forceDataSchema);this.cssStyle.textContent+='@font-face { font-family: "'+e.loadedName+'"; src: url('+t+"); }\n"},setFont:function(e){var r=this.current,i=this.commonObjs.get(e[0]),a=e[1];this.current.font=i,this.embedFonts&&i.data&&!this.embeddedFonts[i.loadedName]&&(this.addFontStyle(i),this.embeddedFonts[i.loadedName]=i),r.fontMatrix=i.fontMatrix?i.fontMatrix:n.FONT_IDENTITY_MATRIX;var o=i.black?i.bold?"bolder":"bold":i.bold?"bold":"normal",s=i.italic?"italic":"normal";a<0?(a=-a,r.fontDirection=-1):r.fontDirection=1,r.fontSize=a,r.fontFamily=i.loadedName,r.fontWeight=o,r.fontStyle=s,r.tspan=document.createElementNS(l,"svg:tspan"),r.tspan.setAttributeNS(null,"y",t(-r.y)),r.xcoords=[]},endText:function(){},setLineWidth:function(e){this.current.lineWidth=e},setLineCap:function(e){this.current.lineCap=c[e]},setLineJoin:function(e){this.current.lineJoin=h[e]},setMiterLimit:function(e){this.current.miterLimit=e},setStrokeAlpha:function(e){this.current.strokeAlpha=e},setStrokeRGBColor:function(e,t,r){var i=n.Util.makeCssRgb(e,t,r);this.current.strokeColor=i},setFillAlpha:function(e){this.current.fillAlpha=e},setFillRGBColor:function(e,t,r){var i=n.Util.makeCssRgb(e,t,r);this.current.fillColor=i,this.current.tspan=document.createElementNS(l,"svg:tspan"),this.current.xcoords=[]},setDash:function(e,t){this.current.dashArray=e,this.current.dashPhase=t},constructPath:function(e,r){var i=this.current,a=i.x,o=i.y;i.path=document.createElementNS(l,"svg:path");for(var s=[],u=e.length,c=0,h=0;c<u;c++)switch(0|e[c]){case n.OPS.rectangle:a=r[h++],o=r[h++];var d=a+r[h++],f=o+r[h++];s.push("M",t(a),t(o),"L",t(d),t(o),"L",t(d),t(f),"L",t(a),t(f),"Z");break;case n.OPS.moveTo:a=r[h++],o=r[h++],s.push("M",t(a),t(o));break;case n.OPS.lineTo:a=r[h++],o=r[h++],s.push("L",t(a),t(o));break;case n.OPS.curveTo:a=r[h+4],o=r[h+5],s.push("C",t(r[h]),t(r[h+1]),t(r[h+2]),t(r[h+3]),t(a),t(o)),h+=6;break;case n.OPS.curveTo2:a=r[h+2],o=r[h+3],s.push("C",t(a),t(o),t(r[h]),t(r[h+1]),t(r[h+2]),t(r[h+3])),h+=4;break;case n.OPS.curveTo3:a=r[h+2],o=r[h+3],s.push("C",t(r[h]),t(r[h+1]),t(a),t(o),t(a),t(o)),h+=4;break;case n.OPS.closePath:s.push("Z")}i.path.setAttributeNS(null,"d",s.join(" ")),i.path.setAttributeNS(null,"fill","none"),this._ensureTransformGroup().appendChild(i.path),i.element=i.path,i.setCurrentPoint(a,o)},endPath:function(){if(this.pendingClip){var e=this.current,t="clippath"+d;d++;var n=document.createElementNS(l,"svg:clipPath");n.setAttributeNS(null,"id",t),n.setAttributeNS(null,"transform",r(this.transformMatrix));var i=e.element.cloneNode();"evenodd"===this.pendingClip?i.setAttributeNS(null,"clip-rule","evenodd"):i.setAttributeNS(null,"clip-rule","nonzero"),this.pendingClip=null,n.appendChild(i),this.defs.appendChild(n),e.activeClipUrl&&(e.clipGroup=null,this.extraStack.forEach(function(e){e.clipGroup=null})),e.activeClipUrl="url(#"+t+")",this.tgrp=null}},clip:function(e){this.pendingClip=e},closePath:function(){var e=this.current,t=e.path.getAttributeNS(null,"d");t+="Z",e.path.setAttributeNS(null,"d",t)},setLeading:function(e){this.current.leading=-e},setTextRise:function(e){this.current.textRise=e},setHScale:function(e){this.current.textHScale=e/100},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var i=e[t],a=i[0],o=i[1];switch(a){case"LW":this.setLineWidth(o);break;case"LC":this.setLineCap(o);break;case"LJ":this.setLineJoin(o);break;case"ML":this.setMiterLimit(o);break;case"D":this.setDash(o[0],o[1]);break;case"Font":this.setFont(o);break;case"CA":this.setStrokeAlpha(o);break;case"ca":this.setFillAlpha(o);break;default:(0,n.warn)("Unimplemented graphic state "+a)}}},fill:function(){var e=this.current;e.element.setAttributeNS(null,"fill",e.fillColor),e.element.setAttributeNS(null,"fill-opacity",e.fillAlpha)},stroke:function(){var e=this.current;e.element.setAttributeNS(null,"stroke",e.strokeColor),e.element.setAttributeNS(null,"stroke-opacity",e.strokeAlpha),e.element.setAttributeNS(null,"stroke-miterlimit",t(e.miterLimit)),e.element.setAttributeNS(null,"stroke-linecap",e.lineCap),e.element.setAttributeNS(null,"stroke-linejoin",e.lineJoin),e.element.setAttributeNS(null,"stroke-width",t(e.lineWidth)+"px"),e.element.setAttributeNS(null,"stroke-dasharray",e.dashArray.map(t).join(" ")),e.element.setAttributeNS(null,"stroke-dashoffset",t(e.dashPhase)+"px"),e.element.setAttributeNS(null,"fill","none")},eoFill:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fill()},fillStroke:function(){this.stroke(),this.fill()},eoFillStroke:function(){this.current.element.setAttributeNS(null,"fill-rule","evenodd"),this.fillStroke()},closeStroke:function(){this.closePath(),this.stroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},paintSolidColorImageMask:function(){var e=this.current,t=document.createElementNS(l,"svg:rect");t.setAttributeNS(null,"x","0"),t.setAttributeNS(null,"y","0"),t.setAttributeNS(null,"width","1px"),t.setAttributeNS(null,"height","1px"),t.setAttributeNS(null,"fill",e.fillColor),this._ensureTransformGroup().appendChild(t)},paintJpegXObject:function(e,r,n){var i=this.objs.get(e),a=document.createElementNS(l,"svg:image");a.setAttributeNS(u,"xlink:href",i.src),a.setAttributeNS(null,"width",t(r)),a.setAttributeNS(null,"height",t(n)),a.setAttributeNS(null,"x","0"),a.setAttributeNS(null,"y",t(-n)),a.setAttributeNS(null,"transform","scale("+t(1/r)+" "+t(-1/n)+")"),this._ensureTransformGroup().appendChild(a)},paintImageXObject:function(e){var t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,n.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e,r){var n=e.width,i=e.height,a=o(e,this.forceDataSchema),s=document.createElementNS(l,"svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",t(n)),s.setAttributeNS(null,"height",t(i)),this.current.element=s,this.clip("nonzero");var c=document.createElementNS(l,"svg:image");c.setAttributeNS(u,"xlink:href",a),c.setAttributeNS(null,"x","0"),c.setAttributeNS(null,"y",t(-i)),c.setAttributeNS(null,"width",t(n)+"px"),c.setAttributeNS(null,"height",t(i)+"px"),c.setAttributeNS(null,"transform","scale("+t(1/n)+" "+t(-1/i)+")"),r?r.appendChild(c):this._ensureTransformGroup().appendChild(c)},paintImageMaskXObject:function(e){var r=this.current,n=e.width,i=e.height,a=r.fillColor;r.maskId="mask"+f++;var o=document.createElementNS(l,"svg:mask");o.setAttributeNS(null,"id",r.maskId);var s=document.createElementNS(l,"svg:rect");s.setAttributeNS(null,"x","0"),s.setAttributeNS(null,"y","0"),s.setAttributeNS(null,"width",t(n)),s.setAttributeNS(null,"height",t(i)),s.setAttributeNS(null,"fill",a),s.setAttributeNS(null,"mask","url(#"+r.maskId+")"),this.defs.appendChild(o),this._ensureTransformGroup().appendChild(s),this.paintInlineImageXObject(e,o)},paintFormXObjectBegin:function(e,r){if((0,n.isArray)(e)&&6===e.length&&this.transform(e[0],e[1],e[2],e[3],e[4],e[5]),(0,n.isArray)(r)&&4===r.length){var i=r[2]-r[0],a=r[3]-r[1],o=document.createElementNS(l,"svg:rect");o.setAttributeNS(null,"x",r[0]),o.setAttributeNS(null,"y",r[1]),o.setAttributeNS(null,"width",t(i)),o.setAttributeNS(null,"height",t(a)),this.current.element=o,this.clip("nonzero"),this.endPath()}},paintFormXObjectEnd:function(){},_initialize:function(e){var t=document.createElementNS(l,"svg:svg");t.setAttributeNS(null,"version","1.1"),t.setAttributeNS(null,"width",e.width+"px"),t.setAttributeNS(null,"height",e.height+"px"),t.setAttributeNS(null,"preserveAspectRatio","none"),t.setAttributeNS(null,"viewBox","0 0 "+e.width+" "+e.height);var n=document.createElementNS(l,"svg:defs");t.appendChild(n),this.defs=n;var i=document.createElementNS(l,"svg:g");return i.setAttributeNS(null,"transform",r(e.transform)),t.appendChild(i),this.svg=i,t},_ensureClipGroup:function(){if(!this.current.clipGroup){var e=document.createElementNS(l,"svg:g");e.setAttributeNS(null,"clip-path",this.current.activeClipUrl),this.svg.appendChild(e),this.current.clipGroup=e}return this.current.clipGroup},_ensureTransformGroup:function(){return this.tgrp||(this.tgrp=document.createElementNS(l,"svg:g"),this.tgrp.setAttributeNS(null,"transform",r(this.transformMatrix)),this.current.activeClipUrl?this._ensureClipGroup().appendChild(this.tgrp):this.svg.appendChild(this.tgrp)),this.tgrp}},i}(),t.SVGGraphics=i},function(e,t,r){"use strict";var n=r(0),i=r(82),a=r(48),o=r(52),s=r(51),l=r(8),u=r(53);if(n.isNodeJS()){var c=r(87).PDFNodeStream;a.setPDFNetworkStreamClass(c)}else if("undefined"!=typeof Response&&"body"in Response.prototype&&"undefined"!=typeof ReadableStream){var h=r(88).PDFFetchStream;a.setPDFNetworkStreamClass(h)}else{var d=r(89).PDFNetworkStream;a.setPDFNetworkStreamClass(d)}t.PDFJS=i.PDFJS,t.build=a.build,t.version=a.version,t.getDocument=a.getDocument,t.LoopbackPort=a.LoopbackPort,t.PDFDataRangeTransport=a.PDFDataRangeTransport,t.PDFWorker=a.PDFWorker,t.renderTextLayer=o.renderTextLayer,t.AnnotationLayer=s.AnnotationLayer,t.CustomStyle=l.CustomStyle,t.createPromiseCapability=n.createPromiseCapability,t.PasswordResponses=n.PasswordResponses,t.InvalidPDFException=n.InvalidPDFException,t.MissingPDFException=n.MissingPDFException,t.SVGGraphics=u.SVGGraphics,t.NativeImageDecoding=n.NativeImageDecoding,t.UnexpectedResponseException=n.UnexpectedResponseException,t.OPS=n.OPS,t.UNSUPPORTED_FEATURES=n.UNSUPPORTED_FEATURES,t.isValidUrl=l.isValidUrl,t.createValidAbsoluteUrl=n.createValidAbsoluteUrl,t.createObjectURL=n.createObjectURL,t.removeNullCharacters=n.removeNullCharacters,t.shadow=n.shadow,t.createBlob=n.createBlob,t.RenderingCancelledException=l.RenderingCancelledException,t.getFilenameFromUrl=l.getFilenameFromUrl,t.addLinkAttributes=l.addLinkAttributes,t.StatTimer=n.StatTimer},function(e,t,r){"use strict";var n="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};if("undefined"==typeof PDFJS||!PDFJS.compatibilityChecked){var i=r(9),a="undefined"!=typeof navigator&&navigator.userAgent||"",o=/Android/.test(a),s=/Android\s[0-2][^\d]/.test(a),l=/Android\s[0-4][^\d]/.test(a),u=a.indexOf("Chrom")>=0,c=/Chrome\/(39|40)\./.test(a),h=a.indexOf("CriOS")>=0,d=a.indexOf("Trident")>=0,f=/\b(iPad|iPhone|iPod)(?=;)/.test(a),p=a.indexOf("Opera")>=0,m=/Safari\//.test(a)&&!/(Chrome\/|Android\s)/.test(a),g="object"===("undefined"==typeof window?"undefined":n(window))&&"object"===("undefined"==typeof document?"undefined":n(document));"undefined"==typeof PDFJS&&(i.PDFJS={}),PDFJS.compatibilityChecked=!0,function(){function e(e,t){return new l(this.slice(e,t))}function t(e,t){arguments.length<2&&(t=0);for(var r=0,n=e.length;r<n;++r,++t)this[t]=255&e[r]}function a(e,t){this.buffer=e,this.byteLength=e.length,this.length=t,s(this.length)}function o(e){return{get:function(){var t=this.buffer,r=e<<2;return(t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24)>>>0},set:function(t){var r=this.buffer,n=e<<2;r[n]=255&t,r[n+1]=t>>8&255,r[n+2]=t>>16&255,r[n+3]=t>>>24&255}}}function s(e){for(;u<e;)Object.defineProperty(a.prototype,u,o(u)),u++}function l(r){var i,a,o;if("number"==typeof r)for(i=[],a=0;a<r;++a)i[a]=0;else if("slice"in r)i=r.slice(0);else for(i=[],a=0,o=r.length;a<o;++a)i[a]=r[a];return i.subarray=e,i.buffer=i,i.byteLength=i.length,i.set=t,"object"===(void 0===r?"undefined":n(r))&&r.buffer&&(i.buffer=r.buffer),i}if("undefined"==typeof Uint8ClampedArray&&(i.Uint8ClampedArray=r(56)),"undefined"!=typeof Uint8Array)return void 0===Uint8Array.prototype.subarray&&(Uint8Array.prototype.subarray=function(e,t){return new Uint8Array(this.slice(e,t))},Float32Array.prototype.subarray=function(e,t){return new Float32Array(this.slice(e,t))}),void("undefined"==typeof Float64Array&&(i.Float64Array=Float32Array));a.prototype=Object.create(null);var u=0;i.Uint8Array=l,i.Int8Array=l,i.Int32Array=l,i.Uint16Array=l,i.Float32Array=l,i.Float64Array=l,i.Uint32Array=function(){if(3===arguments.length){if(0!==arguments[1])throw new Error("offset !== 0 is not supported");return new a(arguments[0],arguments[2])}return l.apply(this,arguments)}}(),function(){if(g&&window.CanvasPixelArray){var e=window.CanvasPixelArray.prototype;"buffer"in e||(Object.defineProperty(e,"buffer",{get:function(){return this},enumerable:!1,configurable:!0}),Object.defineProperty(e,"byteLength",{get:function(){return this.length},enumerable:!1,configurable:!0}))}}(),i.URL||(i.URL=i.webkitURL),function(){if(void 0!==Object.defineProperty){var e=!0;try{g&&Object.defineProperty(new Image,"id",{value:"test"});var t=function(){};t.prototype={get id(){}},Object.defineProperty(new t,"id",{value:"",configurable:!0,enumerable:!0,writable:!1})}catch(t){e=!1}if(e)return}Object.defineProperty=function(e,t,r){delete e[t],"get"in r&&e.__defineGetter__(t,r.get),"set"in r&&e.__defineSetter__(t,r.set),"value"in r&&(e.__defineSetter__(t,function(e){return this.__defineGetter__(t,function(){return e}),e}),e[t]=r.value)}}(),function(){if("undefined"!=typeof XMLHttpRequest){var e=XMLHttpRequest.prototype,t=new XMLHttpRequest;"overrideMimeType"in t||Object.defineProperty(e,"overrideMimeType",{value:function(e){}}),"responseType"in t||(Object.defineProperty(e,"responseType",{get:function(){return this._responseType||"text"},set:function(e){"text"!==e&&"arraybuffer"!==e||(this._responseType=e,"arraybuffer"===e&&"function"==typeof this.overrideMimeType&&this.overrideMimeType("text/plain; charset=x-user-defined"))}}),"undefined"==typeof VBArray?Object.defineProperty(e,"response",{get:function(){if("arraybuffer"!==this.responseType)return this.responseText;var e,t=this.responseText,r=t.length,n=new Uint8Array(r);for(e=0;e<r;++e)n[e]=255&t.charCodeAt(e);return n.buffer}}):Object.defineProperty(e,"response",{get:function(){return"arraybuffer"===this.responseType?new Uint8Array(new VBArray(this.responseBody).toArray()):this.responseText}}))}}(),function(){if(!("btoa"in i)){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";i.btoa=function(t){var r,n,i="";for(r=0,n=t.length;r<n;r+=3){var a=255&t.charCodeAt(r),o=255&t.charCodeAt(r+1),s=255&t.charCodeAt(r+2),l=a>>2,u=(3&a)<<4|o>>4,c=r+1<n?(15&o)<<2|s>>6:64,h=r+2<n?63&s:64;i+=e.charAt(l)+e.charAt(u)+e.charAt(c)+e.charAt(h)}return i}}}(),function(){if(!("atob"in i)){i.atob=function(e){if((e=e.replace(/=+$/,"")).length%4==1)throw new Error("bad atob input");for(var t,r,n=0,i=0,a="";r=e.charAt(i++);~r&&(t=n%4?64*t+r:r,n++%4)?a+=String.fromCharCode(255&t>>(-2*n&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a}}}(),void 0===Function.prototype.bind&&(Function.prototype.bind=function(e){var t=this,r=Array.prototype.slice.call(arguments,1);return function(){var n=r.concat(Array.prototype.slice.call(arguments));return t.apply(e,n)}}),g&&("dataset"in document.createElement("div")||Object.defineProperty(HTMLElement.prototype,"dataset",{get:function(){if(this._dataset)return this._dataset;for(var e={},t=0,r=this.attributes.length;t<r;t++){var n=this.attributes[t];"data-"===n.name.substring(0,5)&&(e[n.name.substring(5).replace(/\-([a-z])/g,function(e,t){return t.toUpperCase()})]=n.value)}return Object.defineProperty(this,"_dataset",{value:e,writable:!1,enumerable:!1}),e},enumerable:!0})),function(){function e(e,t,r,n){var i=(e.className||"").split(/\s+/g);""===i[0]&&i.shift();var a=i.indexOf(t);return a<0&&r&&i.push(t),a>=0&&n&&i.splice(a,1),e.className=i.join(" "),a>=0}if(g&&!("classList"in document.createElement("div"))){var t={add:function(t){e(this.element,t,!0,!1)},contains:function(t){return e(this.element,t,!1,!1)},remove:function(t){e(this.element,t,!1,!0)},toggle:function(t){e(this.element,t,!0,!0)}};Object.defineProperty(HTMLElement.prototype,"classList",{get:function(){if(this._classList)return this._classList;var e=Object.create(t,{element:{value:this,writable:!1,enumerable:!0}});return Object.defineProperty(this,"_classList",{value:e,writable:!1,enumerable:!1}),e},enumerable:!0})}}(),function(){if(!("undefined"==typeof importScripts||"console"in i)){var e={},t={log:function(){var e=Array.prototype.slice.call(arguments);i.postMessage({targetName:"main",action:"console_log",data:e})},error:function(){var e=Array.prototype.slice.call(arguments);i.postMessage({targetName:"main",action:"console_error",data:e})},time:function(t){e[t]=Date.now()},timeEnd:function(t){var r=e[t];if(!r)throw new Error("Unknown timer name "+t);this.log("Timer:",t,Date.now()-r)}};i.console=t}}(),function(){if(g){if("console"in window)return"bind"in console.log?void 0:(console.log=function(e){return function(t){return e(t)}}(console.log),console.error=function(e){return function(t){return e(t)}}(console.error),void(console.warn=function(e){return function(t){return e(t)}}(console.warn)));window.console={log:function(){},error:function(){},warn:function(){}}}}(),function(){function e(t){return t.disabled||t.parentNode&&e(t.parentNode)}p&&document.addEventListener("click",function(t){e(t.target)&&t.stopPropagation()},!0)}(),(d||h)&&(PDFJS.disableCreateObjectURL=!0),"undefined"!=typeof navigator&&("language"in navigator||(PDFJS.locale=navigator.userLanguage||"en-US")),(m||s||c||f)&&(PDFJS.disableRange=!0,PDFJS.disableStream=!0),g&&(history.pushState&&!s||(PDFJS.disableHistory=!0)),function(){if(g)if(window.CanvasPixelArray)"function"!=typeof window.CanvasPixelArray.prototype.set&&(window.CanvasPixelArray.prototype.set=function(e){for(var t=0,r=this.length;t<r;t++)this[t]=e[t]});else{var e,t=!1;if(u?t=(e=a.match(/Chrom(e|ium)\/([0-9]+)\./))&&parseInt(e[2])<21:o?t=l:m&&(t=(e=a.match(/Version\/([0-9]+)\.([0-9]+)\.([0-9]+) Safari\//))&&parseInt(e[1])<6),t){var r=window.CanvasRenderingContext2D.prototype,n=r.createImageData;r.createImageData=function(e,t){var r=n.call(this,e,t);return r.data.set=function(e){for(var t=0,r=this.length;t<r;t++)this[t]=e[t]},r},r=null}}}(),function(){function e(){window.requestAnimationFrame=function(e){return window.setTimeout(e,20)},window.cancelAnimationFrame=function(e){window.clearTimeout(e)}}g&&(f?e():"requestAnimationFrame"in window||(window.requestAnimationFrame=window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame,window.requestAnimationFrame||e()))}(),(f||o)&&(PDFJS.maxCanvasPixels=5242880),g&&d&&window.parent!==window&&(PDFJS.disableFullscreen=!0),g&&("currentScript"in document||Object.defineProperty(document,"currentScript",{get:function(){var e=document.getElementsByTagName("script");return e[e.length-1]},enumerable:!0,configurable:!0})),function(){if(g){var e=document.createElement("input");try{e.type="number"}catch(n){var t=e.constructor.prototype,r=Object.getOwnPropertyDescriptor(t,"type");Object.defineProperty(t,"type",{get:function(){return r.get.call(this)},set:function(e){r.set.call(this,"number"===e?"text":e)},enumerable:!0,configurable:!0})}}}(),function(){if(g&&document.attachEvent){var e=document.constructor.prototype,t=Object.getOwnPropertyDescriptor(e,"readyState");Object.defineProperty(e,"readyState",{get:function(){var e=t.get.call(this);return"interactive"===e?"loading":e},set:function(e){t.set.call(this,e)},enumerable:!0,configurable:!0})}}(),g&&void 0===Element.prototype.remove&&(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)}),Number.isNaN||(Number.isNaN=function(e){return"number"==typeof e&&isNaN(e)}),Number.isInteger||(Number.isInteger=function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}),function(){if(i.Promise)return"function"!=typeof i.Promise.all&&(i.Promise.all=function(e){var t,r,n=0,a=[],o=new i.Promise(function(e,n){t=e,r=n});return e.forEach(function(e,i){n++,e.then(function(e){a[i]=e,0===--n&&t(a)},r)}),0===n&&t(a),o}),"function"!=typeof i.Promise.resolve&&(i.Promise.resolve=function(e){return new i.Promise(function(t){t(e)})}),"function"!=typeof i.Promise.reject&&(i.Promise.reject=function(e){return new i.Promise(function(t,r){r(e)})}),void("function"!=typeof i.Promise.prototype.catch&&(i.Promise.prototype.catch=function(e){return i.Promise.prototype.then(void 0,e)}));var e=2,t={handlers:[],running:!1,unhandledRejections:[],pendingRejectionCheck:!1,scheduleHandlers:function(e){0!==e._status&&(this.handlers=this.handlers.concat(e._handlers),e._handlers=[],this.running||(this.running=!0,setTimeout(this.runHandlers.bind(this),0)))},runHandlers:function(){for(var t=Date.now()+1;this.handlers.length>0;){var r=this.handlers.shift(),n=r.thisPromise._status,i=r.thisPromise._value;try{1===n?"function"==typeof r.onResolve&&(i=r.onResolve(i)):"function"==typeof r.onReject&&(i=r.onReject(i),n=1,r.thisPromise._unhandledRejection&&this.removeUnhandeledRejection(r.thisPromise))}catch(t){n=e,i=t}if(r.nextPromise._updateStatus(n,i),Date.now()>=t)break}this.handlers.length>0?setTimeout(this.runHandlers.bind(this),0):this.running=!1},addUnhandledRejection:function(e){this.unhandledRejections.push({promise:e,time:Date.now()}),this.scheduleRejectionCheck()},removeUnhandeledRejection:function(e){e._unhandledRejection=!1;for(var t=0;t<this.unhandledRejections.length;t++)this.unhandledRejections[t].promise===e&&(this.unhandledRejections.splice(t),t--)},scheduleRejectionCheck:function(){var e=this;this.pendingRejectionCheck||(this.pendingRejectionCheck=!0,setTimeout(function(){e.pendingRejectionCheck=!1;for(var t=Date.now(),r=0;r<e.unhandledRejections.length;r++)if(t-e.unhandledRejections[r].time>500){var n=e.unhandledRejections[r].promise._value,i="Unhandled rejection: "+n;n.stack&&(i+="\n"+n.stack);try{throw new Error(i)}catch(e){console.warn(i)}e.unhandledRejections.splice(r),r--}e.unhandledRejections.length&&e.scheduleRejectionCheck()},500))}},r=function(e){this._status=0,this._handlers=[];try{e.call(this,this._resolve.bind(this),this._reject.bind(this))}catch(e){this._reject(e)}};r.all=function(t){var n,i,a=new r(function(e,t){n=e,i=t}),o=t.length,s=[];if(0===o)return n(s),a;for(var l=0,u=t.length;l<u;++l){var c=t[l],h=function(t){return function(r){a._status!==e&&(s[t]=r,0===--o&&n(s))}}(l);r.isPromise(c)?c.then(h,function(t){a._status!==e&&(s=[],i(t))}):h(c)}return a},r.isPromise=function(e){return e&&"function"==typeof e.then},r.resolve=function(e){return new r(function(t){t(e)})},r.reject=function(e){return new r(function(t,r){r(e)})},r.prototype={_status:null,_value:null,_handlers:null,_unhandledRejection:null,_updateStatus:function(n,i){1!==this._status&&this._status!==e&&(1===n&&r.isPromise(i)?i.then(this._updateStatus.bind(this,1),this._updateStatus.bind(this,e)):(this._status=n,this._value=i,n===e&&0===this._handlers.length&&(this._unhandledRejection=!0,t.addUnhandledRejection(this)),t.scheduleHandlers(this)))},_resolve:function(e){this._updateStatus(1,e)},_reject:function(t){this._updateStatus(e,t)},then:function(e,n){var i=new r(function(e,t){this.resolve=e,this.reject=t});return this._handlers.push({thisPromise:this,onResolve:e,onReject:n,nextPromise:i}),t.scheduleHandlers(this),i},catch:function(e){return this.then(void 0,e)}},i.Promise=r}(),function(){function e(){this.id="$weakmap"+t++}if(!i.WeakMap){var t=0;e.prototype={has:function(e){return("object"===(void 0===e?"undefined":n(e))||"function"==typeof e)&&null!==e&&!!Object.getOwnPropertyDescriptor(e,this.id)},get:function(e){return this.has(e)?e[this.id]:void 0},set:function(e,t){Object.defineProperty(e,this.id,{value:t,enumerable:!1,configurable:!0})},delete:function(e){delete e[this.id]}},i.WeakMap=e}}(),function(){function e(e){return void 0!==d[e]}function t(){l.call(this),this._isInvalid=!0}function r(e){return""===e&&t.call(this),e.toLowerCase()}function a(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function o(e){var t=e.charCodeAt(0);return t>32&&t<127&&-1===[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function s(n,i,s){function l(e){_.push(e)}var u=i||"scheme start",c=0,h="",v=!1,b=!1,_=[];e:for(;(n[c-1]!==p||0===c)&&!this._isInvalid;){var y=n[c];switch(u){case"scheme start":if(!y||!m.test(y)){if(i){l("Invalid scheme.");break e}h="",u="no scheme";continue}h+=y.toLowerCase(),u="scheme";break;case"scheme":if(y&&g.test(y))h+=y.toLowerCase();else{if(":"!==y){if(i){if(y===p)break e;l("Code point not allowed in scheme: "+y);break e}h="",c=0,u="no scheme";continue}if(this._scheme=h,h="",i)break e;e(this._scheme)&&(this._isRelative=!0),u="file"===this._scheme?"relative":this._isRelative&&s&&s._scheme===this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"===y?(this._query="?",u="query"):"#"===y?(this._fragment="#",u="fragment"):y!==p&&"\t"!==y&&"\n"!==y&&"\r"!==y&&(this._schemeData+=a(y));break;case"no scheme":if(s&&e(s._scheme)){u="relative";continue}l("Missing scheme."),t.call(this);break;case"relative or authority":if("/"!==y||"/"!==n[c+1]){l("Expected /, got: "+y),u="relative";continue}u="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!==this._scheme&&(this._scheme=s._scheme),y===p){this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._username=s._username,this._password=s._password;break e}if("/"===y||"\\"===y)"\\"===y&&l("\\ is an invalid code point."),u="relative slash";else if("?"===y)this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query="?",this._username=s._username,this._password=s._password,u="query";else{if("#"!==y){var A=n[c+1],S=n[c+2];("file"!==this._scheme||!m.test(y)||":"!==A&&"|"!==A||S!==p&&"/"!==S&&"\\"!==S&&"?"!==S&&"#"!==S)&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password,this._path=s._path.slice(),this._path.pop()),u="relative path";continue}this._host=s._host,this._port=s._port,this._path=s._path.slice(),this._query=s._query,this._fragment="#",this._username=s._username,this._password=s._password,u="fragment"}break;case"relative slash":if("/"!==y&&"\\"!==y){"file"!==this._scheme&&(this._host=s._host,this._port=s._port,this._username=s._username,this._password=s._password),u="relative path";continue}"\\"===y&&l("\\ is an invalid code point."),u="file"===this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!==y){l("Expected '/', got: "+y),u="authority ignore slashes";continue}u="authority second slash";break;case"authority second slash":if(u="authority ignore slashes","/"!==y){l("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!==y&&"\\"!==y){u="authority";continue}l("Expected authority, got: "+y);break;case"authority":if("@"===y){v&&(l("@ already seen."),h+="%40"),v=!0;for(var w=0;w<h.length;w++){var P=h[w];if("\t"!==P&&"\n"!==P&&"\r"!==P)if(":"!==P||null!==this._password){var R=a(P);null!==this._password?this._password+=R:this._username+=R}else this._password="";else l("Invalid whitespace in authority.")}h=""}else{if(y===p||"/"===y||"\\"===y||"?"===y||"#"===y){c-=h.length,h="",u="host";continue}h+=y}break;case"file host":if(y===p||"/"===y||"\\"===y||"?"===y||"#"===y){2!==h.length||!m.test(h[0])||":"!==h[1]&&"|"!==h[1]?0===h.length?u="relative path start":(this._host=r.call(this,h),h="",u="relative path start"):u="relative path";continue}"\t"===y||"\n"===y||"\r"===y?l("Invalid whitespace in file host."):h+=y;break;case"host":case"hostname":if(":"!==y||b){if(y===p||"/"===y||"\\"===y||"?"===y||"#"===y){if(this._host=r.call(this,h),h="",u="relative path start",i)break e;continue}"\t"!==y&&"\n"!==y&&"\r"!==y?("["===y?b=!0:"]"===y&&(b=!1),h+=y):l("Invalid code point in host/hostname: "+y)}else if(this._host=r.call(this,h),h="",u="port","hostname"===i)break e;break;case"port":if(/[0-9]/.test(y))h+=y;else{if(y===p||"/"===y||"\\"===y||"?"===y||"#"===y||i){if(""!==h){var C=parseInt(h,10);C!==d[this._scheme]&&(this._port=C+""),h=""}if(i)break e;u="relative path start";continue}"\t"===y||"\n"===y||"\r"===y?l("Invalid code point in port: "+y):t.call(this)}break;case"relative path start":if("\\"===y&&l("'\\' not allowed in path."),u="relative path","/"!==y&&"\\"!==y)continue;break;case"relative path":if(y!==p&&"/"!==y&&"\\"!==y&&(i||"?"!==y&&"#"!==y))"\t"!==y&&"\n"!==y&&"\r"!==y&&(h+=a(y));else{"\\"===y&&l("\\ not allowed in relative path.");var k;(k=f[h.toLowerCase()])&&(h=k),".."===h?(this._path.pop(),"/"!==y&&"\\"!==y&&this._path.push("")):"."===h&&"/"!==y&&"\\"!==y?this._path.push(""):"."!==h&&("file"===this._scheme&&0===this._path.length&&2===h.length&&m.test(h[0])&&"|"===h[1]&&(h=h[0]+":"),this._path.push(h)),h="","?"===y?(this._query="?",u="query"):"#"===y&&(this._fragment="#",u="fragment")}break;case"query":i||"#"!==y?y!==p&&"\t"!==y&&"\n"!==y&&"\r"!==y&&(this._query+=o(y)):(this._fragment="#",u="fragment");break;case"fragment":y!==p&&"\t"!==y&&"\n"!==y&&"\r"!==y&&(this._fragment+=y)}c++}}function l(){this._scheme="",this._schemeData="",this._username="",this._password=null,this._host="",this._port="",this._path=[],this._query="",this._fragment="",this._isInvalid=!1,this._isRelative=!1}function u(e,t){void 0===t||t instanceof u||(t=new u(String(t))),this._url=e,l.call(this);var r=e.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g,"");s.call(this,r,null,t)}var c=!1;try{if("function"==typeof URL&&"object"===n(URL.prototype)&&"origin"in URL.prototype){var h=new URL("b","http://a");h.pathname="c%20d",c="http://a/c%20d"===h.href}}catch(e){}if(!c){var d=Object.create(null);d.ftp=21,d.file=0,d.gopher=70,d.http=80,d.https=443,d.ws=80,d.wss=443;var f=Object.create(null);f["%2e"]=".",f[".%2e"]="..",f["%2e."]="..",f["%2e%2e"]="..";var p,m=/[a-zA-Z]/,g=/[a-zA-Z0-9\+\-\.]/;u.prototype={toString:function(){return this.href},get href(){if(this._isInvalid)return this._url;var e="";return""===this._username&&null===this._password||(e=this._username+(null!==this._password?":"+this._password:"")+"@"),this.protocol+(this._isRelative?"//"+e+this.host:"")+this.pathname+this._query+this._fragment},set href(e){l.call(this),s.call(this,e)},get protocol(){return this._scheme+":"},set protocol(e){this._isInvalid||s.call(this,e+":","scheme start")},get host(){return this._isInvalid?"":this._port?this._host+":"+this._port:this._host},set host(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"host")},get hostname(){return this._host},set hostname(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"hostname")},get port(){return this._port},set port(e){!this._isInvalid&&this._isRelative&&s.call(this,e,"port")},get pathname(){return this._isInvalid?"":this._isRelative?"/"+this._path.join("/"):this._schemeData},set pathname(e){!this._isInvalid&&this._isRelative&&(this._path=[],s.call(this,e,"relative path start"))},get search(){return this._isInvalid||!this._query||"?"===this._query?"":this._query},set search(e){!this._isInvalid&&this._isRelative&&(this._query="?","?"===e[0]&&(e=e.slice(1)),s.call(this,e,"query"))},get hash(){return this._isInvalid||!this._fragment||"#"===this._fragment?"":this._fragment},set hash(e){this._isInvalid||(this._fragment="#","#"===e[0]&&(e=e.slice(1)),s.call(this,e,"fragment"))},get origin(){var e;if(this._isInvalid||!this._scheme)return"";switch(this._scheme){case"data":case"file":case"javascript":case"mailto":return"null";case"blob":try{return new u(this._schemeData).origin||"null"}catch(e){}return"null"}return(e=this.host)?this._scheme+"://"+e:""}};var v=i.URL;v&&(u.createObjectURL=function(e){return v.createObjectURL.apply(v,arguments)},u.revokeObjectURL=function(e){v.revokeObjectURL(e)}),i.URL=u}}()}},function(e,t,r){"use strict";r(57),e.exports=r(16).Uint8ClampedArray},function(e,t,r){"use strict";r(58)("Uint8",1,function(e){return function(t,r,n){return e(this,t,r,n)}},!0)},function(e,t,r){"use strict";var n="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};if(r(3)){var i=r(21),a=r(2),o=r(15),s=r(30),l=r(34),u=r(59),c=r(24),h=r(36),d=r(18),f=r(4),p=r(35),m=r(12),g=r(6),v=r(37),b=r(20),_=r(22),y=r(5),A=r(45),S=r(10),w=r(13),P=r(60),R=r(46),C=r(47),k=r(38).f,x=r(64),T=r(11),E=r(1),O=r(65),I=r(42),L=r(69),D=r(70),F=r(14),j=r(75),N=r(76),M=r(44),q=r(77),W=r(7),U=r(78),B=W.f,z=U.f,G=a.RangeError,H=a.TypeError,X=a.Uint8Array,Y=Array.prototype,V=u.ArrayBuffer,J=u.DataView,Q=O(0),K=O(2),Z=O(3),$=O(4),ee=O(5),te=O(6),re=I(!0),ne=I(!1),ie=D.values,ae=D.keys,oe=D.entries,se=Y.lastIndexOf,le=Y.reduce,ue=Y.reduceRight,ce=Y.join,he=Y.sort,de=Y.slice,fe=Y.toString,pe=Y.toLocaleString,me=E("iterator"),ge=E("toStringTag"),ve=T("typed_constructor"),be=T("def_constructor"),_e=l.CONSTR,ye=l.TYPED,Ae=l.VIEW,Se=O(1,function(e,t){return ke(L(e,e[be]),t)}),we=o(function(){return 1===new X(new Uint16Array([1]).buffer)[0]}),Pe=!!X&&!!X.prototype.set&&o(function(){new X(1).set({})}),Re=function(e,t){var r=m(e);if(r<0||r%t)throw G("Wrong offset!");return r},Ce=function(e){if(S(e)&&ye in e)return e;throw H(e+" is not a typed array!")},ke=function(e,t){if(!(S(e)&&ve in e))throw H("It is not a typed array constructor!");return new e(t)},xe=function(e,t){return Te(L(e,e[be]),t)},Te=function(e,t){for(var r=0,n=t.length,i=ke(e,n);n>r;)i[r]=t[r++];return i},Ee=function(e,t,r){B(e,t,{get:function(){return this._d[r]}})},Oe=function(e){var t,r,n,i,a,o,s=w(e),l=arguments.length,u=l>1?arguments[1]:void 0,h=void 0!==u,d=x(s);if(void 0!=d&&!P(d)){for(o=d.call(s),n=[],t=0;!(a=o.next()).done;t++)n.push(a.value);s=n}for(h&&l>2&&(u=c(u,arguments[2],2)),t=0,r=g(s.length),i=ke(this,r);r>t;t++)i[t]=h?u(s[t],t):s[t];return i},Ie=function(){for(var e=0,t=arguments.length,r=ke(this,t);t>e;)r[e]=arguments[e++];return r},Le=!!X&&o(function(){pe.call(new X(1))}),De=function(){return pe.apply(Le?de.call(Ce(this)):Ce(this),arguments)},Fe={copyWithin:function(e,t){return q.call(Ce(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Ce(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return M.apply(Ce(this),arguments)},filter:function(e){return xe(this,K(Ce(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return ee(Ce(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return te(Ce(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){Q(Ce(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Ce(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return re(Ce(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Ce(this),arguments)},lastIndexOf:function(e){return se.apply(Ce(this),arguments)},map:function(e){return Se(Ce(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return le.apply(Ce(this),arguments)},reduceRight:function(e){return ue.apply(Ce(this),arguments)},reverse:function(){for(var e,t=this,r=Ce(t).length,n=Math.floor(r/2),i=0;i<n;)e=t[i],t[i++]=t[--r],t[r]=e;return t},some:function(e){return Z(Ce(this),e,arguments.length>1?arguments[1]:void 0)},sort:function(e){return he.call(Ce(this),e)},subarray:function(e,t){var r=Ce(this),n=r.length,i=b(e,n);return new(L(r,r[be]))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,g((void 0===t?n:b(t,n))-i))}},je=function(e,t){return xe(this,de.call(Ce(this),e,t))},Ne=function(e){Ce(this);var t=Re(arguments[1],1),r=this.length,n=w(e),i=g(n.length),a=0;if(i+t>r)throw G("Wrong length!");for(;a<i;)this[t+a]=n[a++]},Me={entries:function(){return oe.call(Ce(this))},keys:function(){return ae.call(Ce(this))},values:function(){return ie.call(Ce(this))}},qe=function(e,t){return S(e)&&e[ye]&&"symbol"!=(void 0===t?"undefined":n(t))&&t in e&&String(+t)==String(t)},We=function(e,t){return qe(e,t=_(t,!0))?d(2,e[t]):z(e,t)},Ue=function(e,t,r){return!(qe(e,t=_(t,!0))&&S(r)&&y(r,"value"))||y(r,"get")||y(r,"set")||r.configurable||y(r,"writable")&&!r.writable||y(r,"enumerable")&&!r.enumerable?B(e,t,r):(e[t]=r.value,e)};_e||(U.f=We,W.f=Ue),s(s.S+s.F*!_e,"Object",{getOwnPropertyDescriptor:We,defineProperty:Ue}),o(function(){fe.call({})})&&(fe=pe=function(){return ce.call(this)});var Be=p({},Fe);p(Be,Me),f(Be,me,Me.values),p(Be,{slice:je,set:Ne,constructor:function(){},toString:fe,toLocaleString:De}),Ee(Be,"buffer","b"),Ee(Be,"byteOffset","o"),Ee(Be,"byteLength","l"),Ee(Be,"length","e"),B(Be,ge,{get:function(){return this[ye]}}),e.exports=function(e,t,r,n){var u=e+((n=!!n)?"Clamped":"")+"Array",c="get"+e,d="set"+e,p=a[u],m=p||{},b=p&&C(p),_=!p||!l.ABV,y={},w=p&&p.prototype,P=function(e,r){var n=e._d;return n.v[c](r*t+n.o,we)},x=function(e,r,i){var a=e._d;n&&(i=(i=Math.round(i))<0?0:i>255?255:255&i),a.v[d](r*t+a.o,i,we)},T=function(e,t){B(e,t,{get:function(){return P(this,t)},set:function(e){return x(this,t,e)},enumerable:!0})};_?(p=r(function(e,r,n,i){h(e,p,u,"_d");var a,o,s,l,c=0,d=0;if(S(r)){if(!(r instanceof V||"ArrayBuffer"==(l=A(r))||"SharedArrayBuffer"==l))return ye in r?Te(p,r):Oe.call(p,r);a=r,d=Re(n,t);var m=r.byteLength;if(void 0===i){if(m%t)throw G("Wrong length!");if((o=m-d)<0)throw G("Wrong length!")}else if((o=g(i)*t)+d>m)throw G("Wrong length!");s=o/t}else s=v(r),a=new V(o=s*t);for(f(e,"_d",{b:a,o:d,l:o,e:s,v:new J(a)});c<s;)T(e,c++)}),w=p.prototype=R(Be),f(w,"constructor",p)):o(function(){p(1)})&&o(function(){new p(-1)})&&j(function(e){new p,new p(null),new p(1.5),new p(e)},!0)||(p=r(function(e,r,n,i){h(e,p,u);var a;return S(r)?r instanceof V||"ArrayBuffer"==(a=A(r))||"SharedArrayBuffer"==a?void 0!==i?new m(r,Re(n,t),i):void 0!==n?new m(r,Re(n,t)):new m(r):ye in r?Te(p,r):Oe.call(p,r):new m(v(r))}),Q(b!==Function.prototype?k(m).concat(k(b)):k(m),function(e){e in p||f(p,e,m[e])}),p.prototype=w,i||(w.constructor=p));var E=w[me],O=!!E&&("values"==E.name||void 0==E.name),I=Me.values;f(p,ve,!0),f(w,ye,u),f(w,Ae,!0),f(w,be,p),(n?new p(1)[ge]==u:ge in w)||B(w,ge,{get:function(){return u}}),y[u]=p,s(s.G+s.W+s.F*(p!=m),y),s(s.S,u,{BYTES_PER_ELEMENT:t}),s(s.S+s.F*o(function(){m.of.call(p,1)}),u,{from:Oe,of:Ie}),"BYTES_PER_ELEMENT"in w||f(w,"BYTES_PER_ELEMENT",t),s(s.P,u,Fe),N(u),s(s.P+s.F*Pe,u,{set:Ne}),s(s.P+s.F*!O,u,Me),i||w.toString==fe||(w.toString=fe),s(s.P+s.F*o(function(){new p(1).slice()}),u,{slice:je}),s(s.P+s.F*(o(function(){return[1,2].toLocaleString()!=new p([1,2]).toLocaleString()})||!o(function(){w.toLocaleString.call([1,2])})),u,{toLocaleString:De}),F[u]=O?E:I,i||O||f(w,me,I)}}else e.exports=function(){}},function(e,t,r){"use strict";function n(e,t,r){var n,i,a,o=Array(r),s=8*r-t-1,l=(1<<s)-1,u=l>>1,c=23===t?M(2,-24)-M(2,-77):0,h=0,d=e<0||0===e&&1/e<0?1:0;for((e=N(e))!=e||e===F?(i=e!=e?1:0,n=l):(n=q(W(e)/U),e*(a=M(2,-n))<1&&(n--,a*=2),(e+=n+u>=1?c/a:c*M(2,1-u))*a>=2&&(n++,a/=2),n+u>=l?(i=0,n=l):n+u>=1?(i=(e*a-1)*M(2,t),n+=u):(i=e*M(2,u-1)*M(2,t),n=0));t>=8;o[h++]=255&i,i/=256,t-=8);for(n=n<<t|i,s+=t;s>0;o[h++]=255&n,n/=256,s-=8);return o[--h]|=128*d,o}function i(e,t,r){var n,i=8*r-t-1,a=(1<<i)-1,o=a>>1,s=i-7,l=r-1,u=e[l--],c=127&u;for(u>>=7;s>0;c=256*c+e[l],l--,s-=8);for(n=c&(1<<-s)-1,c>>=-s,s+=t;s>0;n=256*n+e[l],l--,s-=8);if(0===c)c=1-o;else{if(c===a)return n?NaN:u?-F:F;n+=M(2,t),c-=o}return(u?-1:1)*n*M(2,c-t)}function a(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function o(e){return[255&e]}function s(e){return[255&e,e>>8&255]}function l(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function u(e){return n(e,52,8)}function c(e){return n(e,23,4)}function h(e,t,r){C(e[T],t,{get:function(){return this[r]}})}function d(e,t,r,n){var i=P(+r);if(i+t>e[z])throw D(E);var a=e[B]._b,o=i+e[G],s=a.slice(o,o+t);return n?s:s.reverse()}function f(e,t,r,n,i,a){var o=P(+r);if(o+t>e[z])throw D(E);for(var s=e[B]._b,l=o+e[G],u=n(+i),c=0;c<t;c++)s[l+c]=u[a?c:t-c-1]}var p=r(2),m=r(3),g=r(21),v=r(34),b=r(4),_=r(35),y=r(15),A=r(36),S=r(12),w=r(6),P=r(37),R=r(38).f,C=r(7).f,k=r(44),x=r(28),T="prototype",E="Wrong index!",O=p.ArrayBuffer,I=p.DataView,L=p.Math,D=p.RangeError,F=p.Infinity,j=O,N=L.abs,M=L.pow,q=L.floor,W=L.log,U=L.LN2,B=m?"_b":"buffer",z=m?"_l":"byteLength",G=m?"_o":"byteOffset";if(v.ABV){if(!y(function(){O(1)})||!y(function(){new O(-1)})||y(function(){return new O,new O(1.5),new O(NaN),"ArrayBuffer"!=O.name})){for(var H,X=(O=function(e){return A(this,O),new j(P(e))})[T]=j[T],Y=R(j),V=0;Y.length>V;)(H=Y[V++])in O||b(O,H,j[H]);g||(X.constructor=O)}var J=new I(new O(2)),Q=I[T].setInt8;J.setInt8(0,2147483648),J.setInt8(1,2147483649),!J.getInt8(0)&&J.getInt8(1)||_(I[T],{setInt8:function(e,t){Q.call(this,e,t<<24>>24)},setUint8:function(e,t){Q.call(this,e,t<<24>>24)}},!0)}else O=function(e){A(this,O,"ArrayBuffer");var t=P(e);this._b=k.call(Array(t),0),this[z]=t},I=function(e,t,r){A(this,I,"DataView"),A(e,O,"DataView");var n=e[z],i=S(t);if(i<0||i>n)throw D("Wrong offset!");if(r=void 0===r?n-i:w(r),i+r>n)throw D("Wrong length!");this[B]=e,this[G]=i,this[z]=r},m&&(h(O,"byteLength","_l"),h(I,"buffer","_b"),h(I,"byteLength","_l"),h(I,"byteOffset","_o")),_(I[T],{getInt8:function(e){return d(this,1,e)[0]<<24>>24},getUint8:function(e){return d(this,1,e)[0]},getInt16:function(e){var t=d(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=d(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return a(d(this,4,e,arguments[1]))},getUint32:function(e){return a(d(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return i(d(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return i(d(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){f(this,1,e,o,t)},setUint8:function(e,t){f(this,1,e,o,t)},setInt16:function(e,t){f(this,2,e,s,t,arguments[2])},setUint16:function(e,t){f(this,2,e,s,t,arguments[2])},setInt32:function(e,t){f(this,4,e,l,t,arguments[2])},setUint32:function(e,t){f(this,4,e,l,t,arguments[2])},setFloat32:function(e,t){f(this,4,e,c,t,arguments[2])},setFloat64:function(e,t){f(this,8,e,u,t,arguments[2])}});x(O,"ArrayBuffer"),x(I,"DataView"),b(I[T],v.VIEW,!0),t.ArrayBuffer=O,t.DataView=I},function(e,t,r){"use strict";var n=r(14),i=r(1)("iterator"),a=Array.prototype;e.exports=function(e){return void 0!==e&&(n.Array===e||a[i]===e)}},function(e,t,r){"use strict";var n=r(7),i=r(17),a=r(62);e.exports=r(3)?Object.defineProperties:function(e,t){i(e);for(var r,o=a(t),s=o.length,l=0;s>l;)n.f(e,r=o[l++],t[r]);return e}},function(e,t,r){"use strict";var n=r(39),i=r(27);e.exports=Object.keys||function(e){return n(e,i)}},function(e,t,r){"use strict";var n=r(2).document;e.exports=n&&n.documentElement},function(e,t,r){"use strict";var n=r(45),i=r(1)("iterator"),a=r(14);e.exports=r(16).getIteratorMethod=function(e){if(void 0!=e)return e[i]||e["@@iterator"]||a[n(e)]}},function(e,t,r){"use strict";var n=r(24),i=r(40),a=r(13),o=r(6),s=r(66);e.exports=function(e,t){var r=1==e,l=2==e,u=3==e,c=4==e,h=6==e,d=5==e||h,f=t||s;return function(t,s,p){for(var m,g,v=a(t),b=i(v),_=n(s,p,3),y=o(b.length),A=0,S=r?f(t,y):l?f(t,0):void 0;y>A;A++)if((d||A in b)&&(m=b[A],g=_(m,A,v),e))if(r)S[A]=g;else if(g)switch(e){case 3:return!0;case 5:return m;case 6:return A;case 2:S.push(m)}else if(c)return!1;return h?-1:u||c?c:S}}},function(e,t,r){"use strict";var n=r(67);e.exports=function(e,t){return new(n(e))(t)}},function(e,t,r){"use strict";var n=r(10),i=r(68),a=r(1)("species");e.exports=function(e){var t;return i(e)&&("function"!=typeof(t=e.constructor)||t!==Array&&!i(t.prototype)||(t=void 0),n(t)&&null===(t=t[a])&&(t=void 0)),void 0===t?Array:t}},function(e,t,r){"use strict";var n=r(25);e.exports=Array.isArray||function(e){return"Array"==n(e)}},function(e,t,r){"use strict";var n=r(17),i=r(33),a=r(1)("species");e.exports=function(e,t){var r,o=n(e).constructor;return void 0===o||void 0==(r=n(o)[a])?t:i(r)}},function(e,t,r){"use strict";var n=r(71),i=r(72),a=r(14),o=r(19);e.exports=r(73)(Array,"Array",function(e,t){this._t=o(e),this._i=0,this._k=t},function(){var e=this._t,t=this._k,r=this._i++;return!e||r>=e.length?(this._t=void 0,i(1)):"keys"==t?i(0,r):"values"==t?i(0,e[r]):i(0,[r,e[r]])},"values"),a.Arguments=a.Array,n("keys"),n("values"),n("entries")},function(e,t,r){"use strict";var n=r(1)("unscopables"),i=Array.prototype;void 0==i[n]&&r(4)(i,n,{}),e.exports=function(e){i[n][e]=!0}},function(e,t,r){"use strict";e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,r){"use strict";var n=r(21),i=r(30),a=r(23),o=r(4),s=r(5),l=r(14),u=r(74),c=r(28),h=r(47),d=r(1)("iterator"),f=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,r,m,g,v,b){u(r,t,m);var _,y,A,S=function(e){if(!f&&e in C)return C[e];switch(e){case"keys":case"values":return function(){return new r(this,e)}}return function(){return new r(this,e)}},w=t+" Iterator",P="values"==g,R=!1,C=e.prototype,k=C[d]||C["@@iterator"]||g&&C[g],x=k||S(g),T=g?P?S("entries"):x:void 0,E="Array"==t?C.entries||k:k;if(E&&(A=h(E.call(new e)))!==Object.prototype&&A.next&&(c(A,w,!0),n||s(A,d)||o(A,d,p)),P&&k&&"values"!==k.name&&(R=!0,x=function(){return k.call(this)}),n&&!b||!f&&!R&&C[d]||o(C,d,x),l[t]=x,l[w]=p,g)if(_={values:P?x:S("values"),keys:v?x:S("keys"),entries:T},b)for(y in _)y in C||a(C,y,_[y]);else i(i.P+i.F*(f||R),t,_);return _}},function(e,t,r){"use strict";var n=r(46),i=r(18),a=r(28),o={};r(4)(o,r(1)("iterator"),function(){return this}),e.exports=function(e,t,r){e.prototype=n(o,{next:i(1,r)}),a(e,t+" Iterator")}},function(e,t,r){"use strict";var n=r(1)("iterator"),i=!1;try{var a=[7][n]();a.return=function(){i=!0},Array.from(a,function(){throw 2})}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var r=!1;try{var a=[7],o=a[n]();o.next=function(){return{done:r=!0}},a[n]=function(){return o},e(a)}catch(e){}return r}},function(e,t,r){"use strict";var n=r(2),i=r(7),a=r(3),o=r(1)("species");e.exports=function(e){var t=n[e];a&&t&&!t[o]&&i.f(t,o,{configurable:!0,get:function(){return this}})}},function(e,t,r){"use strict";var n=r(13),i=r(20),a=r(6);e.exports=[].copyWithin||function(e,t){var r=n(this),o=a(r.length),s=i(e,o),l=i(t,o),u=arguments.length>2?arguments[2]:void 0,c=Math.min((void 0===u?o:i(u,o))-l,o-s),h=1;for(l<s&&s<l+c&&(h=-1,l+=c-1,s+=c-1);c-- >0;)l in r?r[s]=r[l]:delete r[s],s+=h,l+=h;return r}},function(e,t,r){"use strict";var n=r(79),i=r(18),a=r(19),o=r(22),s=r(5),l=r(31),u=Object.getOwnPropertyDescriptor;t.f=r(3)?u:function(e,t){if(e=a(e),t=o(t,!0),l)try{return u(e,t)}catch(e){}if(s(e,t))return i(!n.f.call(e,t),e[t])}},function(e,t,r){"use strict";t.f={}.propertyIsEnumerable},function(e,t,r){"use strict";var n=!1;if("undefined"!=typeof ReadableStream)try{new ReadableStream({start:function(e){e.close()}}),n=!0}catch(e){}t.ReadableStream=n?ReadableStream:r(81).ReadableStream},function(e,t,r){"use strict";var n="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(e,t){for(var r in t)e[r]=t[r]}(t,function(e){function t(n){if(r[n])return r[n].exports;var i=r[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=7)}([function(e,t,r){function i(e){return"string"==typeof e||"symbol"===(void 0===e?"undefined":o(e))}function a(e,t,r){if("function"!=typeof e)throw new TypeError("Argument is not a function");return Function.prototype.apply.call(e,t,r)}var o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return void 0===e?"undefined":n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":void 0===e?"undefined":n(e)},s=r(1).assert;t.typeIsObject=function(e){return"object"===(void 0===e?"undefined":o(e))&&null!==e||"function"==typeof e},t.createDataProperty=function(e,r,n){s(t.typeIsObject(e)),Object.defineProperty(e,r,{value:n,writable:!0,enumerable:!0,configurable:!0})},t.createArrayFromList=function(e){return e.slice()},t.ArrayBufferCopy=function(e,t,r,n,i){new Uint8Array(e).set(new Uint8Array(r,n,i),t)},t.CreateIterResultObject=function(e,t){s("boolean"==typeof t);var r={};return Object.defineProperty(r,"value",{value:e,enumerable:!0,writable:!0,configurable:!0}),Object.defineProperty(r,"done",{value:t,enumerable:!0,writable:!0,configurable:!0}),r},t.IsFiniteNonNegativeNumber=function(e){return!Number.isNaN(e)&&(e!==1/0&&!(e<0))},t.InvokeOrNoop=function(e,t,r){s(void 0!==e),s(i(t)),s(Array.isArray(r));var n=e[t];if(void 0!==n)return a(n,e,r)},t.PromiseInvokeOrNoop=function(e,r,n){s(void 0!==e),s(i(r)),s(Array.isArray(n));try{return Promise.resolve(t.InvokeOrNoop(e,r,n))}catch(e){return Promise.reject(e)}},t.PromiseInvokeOrPerformFallback=function(e,t,r,n,o){s(void 0!==e),s(i(t)),s(Array.isArray(r)),s(Array.isArray(o));var l=void 0;try{l=e[t]}catch(e){return Promise.reject(e)}if(void 0===l)return n.apply(null,o);try{return Promise.resolve(a(l,e,r))}catch(e){return Promise.reject(e)}},t.TransferArrayBuffer=function(e){return e.slice()},t.ValidateAndNormalizeHighWaterMark=function(e){if(e=Number(e),Number.isNaN(e)||e<0)throw new RangeError("highWaterMark property of a queuing strategy must be non-negative and non-NaN");return e},t.ValidateAndNormalizeQueuingStrategy=function(e,r){if(void 0!==e&&"function"!=typeof e)throw new TypeError("size property of a queuing strategy must be a function");return r=t.ValidateAndNormalizeHighWaterMark(r),{size:e,highWaterMark:r}}},function(e,t,r){function n(e){this.name="AssertionError",this.message=e||"",this.stack=(new Error).stack}n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.exports={rethrowAssertionErrorRejection:function(e){e&&e.constructor===n&&setTimeout(function(){throw e},0)},AssertionError:n,assert:function(e,t){if(!e)throw new n(t)}}},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new be(e)}function a(e){return!!le(e)&&!!Object.prototype.hasOwnProperty.call(e,"_writableStreamController")}function o(e){return ce(!0===a(e),"IsWritableStreamLocked should only be used on known writable streams"),void 0!==e._writer}function s(e,t){var r=e._state;if("closed"===r)return Promise.resolve(void 0);if("errored"===r)return Promise.reject(e._storedError);var n=new TypeError("Requested to abort");if(void 0!==e._pendingAbortRequest)return Promise.reject(n);ce("writable"===r||"erroring"===r,"state must be writable or erroring");var i=!1;"erroring"===r&&(i=!0,t=void 0);var a=new Promise(function(r,n){e._pendingAbortRequest={_resolve:r,_reject:n,_reason:t,_wasAlreadyErroring:i}});return!1===i&&c(e,n),a}function l(e){return ce(!0===o(e)),ce("writable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._writeRequests.push(n)})}function u(e,t){var r=e._state;"writable"!==r?(ce("erroring"===r),h(e)):c(e,t)}function c(e,t){ce(void 0===e._storedError,"stream._storedError === undefined"),ce("writable"===e._state,"state must be writable");var r=e._writableStreamController;ce(void 0!==r,"controller must not be undefined"),e._state="erroring",e._storedError=t;var n=e._writer;void 0!==n&&C(n,t),!1===v(e)&&!0===r._started&&h(e)}function h(e){ce("erroring"===e._state,"stream._state === erroring"),ce(!1===v(e),"WritableStreamHasOperationMarkedInFlight(stream) === false"),e._state="errored",e._writableStreamController.__errorSteps();for(var t=e._storedError,r=0;r<e._writeRequests.length;r++)e._writeRequests[r]._reject(t);if(e._writeRequests=[],void 0!==e._pendingAbortRequest){var n=e._pendingAbortRequest;if(e._pendingAbortRequest=void 0,!0===n._wasAlreadyErroring)return n._reject(t),void y(e);e._writableStreamController.__abortSteps(n._reason).then(function(){n._resolve(),y(e)},function(t){n._reject(t),y(e)})}else y(e)}function d(e){ce(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._resolve(void 0),e._inFlightWriteRequest=void 0}function f(e,t){ce(void 0!==e._inFlightWriteRequest),e._inFlightWriteRequest._reject(t),e._inFlightWriteRequest=void 0,ce("writable"===e._state||"erroring"===e._state),u(e,t)}function p(e){ce(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._resolve(void 0),e._inFlightCloseRequest=void 0;var t=e._state;ce("writable"===t||"erroring"===t),"erroring"===t&&(e._storedError=void 0,void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._resolve(),e._pendingAbortRequest=void 0)),e._state="closed";var r=e._writer;void 0!==r&&J(r),ce(void 0===e._pendingAbortRequest,"stream._pendingAbortRequest === undefined"),ce(void 0===e._storedError,"stream._storedError === undefined")}function m(e,t){ce(void 0!==e._inFlightCloseRequest),e._inFlightCloseRequest._reject(t),e._inFlightCloseRequest=void 0,ce("writable"===e._state||"erroring"===e._state),void 0!==e._pendingAbortRequest&&(e._pendingAbortRequest._reject(t),e._pendingAbortRequest=void 0),u(e,t)}function g(e){return void 0!==e._closeRequest||void 0!==e._inFlightCloseRequest}function v(e){return void 0!==e._inFlightWriteRequest||void 0!==e._inFlightCloseRequest}function b(e){ce(void 0===e._inFlightCloseRequest),ce(void 0!==e._closeRequest),e._inFlightCloseRequest=e._closeRequest,e._closeRequest=void 0}function _(e){ce(void 0===e._inFlightWriteRequest,"there must be no pending write request"),ce(0!==e._writeRequests.length,"writeRequests must not be empty"),e._inFlightWriteRequest=e._writeRequests.shift()}function y(e){ce("errored"===e._state,'_stream_.[[state]] is `"errored"`'),void 0!==e._closeRequest&&(ce(void 0===e._inFlightCloseRequest),e._closeRequest._reject(e._storedError),e._closeRequest=void 0);var t=e._writer;void 0!==t&&(Y(t,e._storedError),t._closedPromise.catch(function(){}))}function A(e,t){ce("writable"===e._state),ce(!1===g(e));var r=e._writer;void 0!==r&&t!==e._backpressure&&(!0===t?ee(r):(ce(!1===t),re(r))),e._backpressure=t}function S(e){return!!le(e)&&!!Object.prototype.hasOwnProperty.call(e,"_ownerWritableStream")}function w(e,t){var r=e._ownerWritableStream;return ce(void 0!==r),s(r,t)}function P(e){var t=e._ownerWritableStream;ce(void 0!==t);var r=t._state;if("closed"===r||"errored"===r)return Promise.reject(new TypeError("The stream (in "+r+" state) is not in the writable state and cannot be closed"));ce("writable"===r||"erroring"===r),ce(!1===g(t));var n=new Promise(function(e,r){var n={_resolve:e,_reject:r};t._closeRequest=n});return!0===t._backpressure&&"writable"===r&&re(e),E(t._writableStreamController),n}function R(e,t){"pending"===e._closedPromiseState?Y(e,t):V(e,t),e._closedPromise.catch(function(){})}function C(e,t){"pending"===e._readyPromiseState?$(e,t):te(e,t),e._readyPromise.catch(function(){})}function k(e){var t=e._ownerWritableStream,r=t._state;return"errored"===r||"erroring"===r?null:"closed"===r?0:I(t._writableStreamController)}function x(e){var t=e._ownerWritableStream;ce(void 0!==t),ce(t._writer===e);var r=new TypeError("Writer was released and can no longer be used to monitor the stream's closedness");C(e,r),R(e,r),t._writer=void 0,e._ownerWritableStream=void 0}function T(e,t){var r=e._ownerWritableStream;ce(void 0!==r);var n=r._writableStreamController,i=O(n,t);if(r!==e._ownerWritableStream)return Promise.reject(z("write to"));var a=r._state;if("errored"===a)return Promise.reject(r._storedError);if(!0===g(r)||"closed"===a)return Promise.reject(new TypeError("The stream is closing or closed and cannot be written to"));if("erroring"===a)return Promise.reject(r._storedError);ce("writable"===a);var o=l(r);return L(n,t,i),o}function E(e){pe(e,"close",0),F(e)}function O(e,t){var r=e._strategySize;if(void 0===r)return 1;try{return r(t)}catch(t){return j(e,t),1}}function I(e){return e._strategyHWM-e._queueTotalSize}function L(e,t,r){var n={chunk:t};try{pe(e,n,r)}catch(t){return void j(e,t)}var i=e._controlledWritableStream;!1===g(i)&&"writable"===i._state&&A(i,q(e)),F(e)}function D(e){return!!le(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSink")}function F(e){var t=e._controlledWritableStream;if(!1!==e._started&&void 0===t._inFlightWriteRequest){var r=t._state;if("closed"!==r&&"errored"!==r)if("erroring"!==r){if(0!==e._queue.length){var n=me(e);"close"===n?N(e):M(e,n.chunk)}}else h(t)}}function j(e,t){"writable"===e._controlledWritableStream._state&&W(e,t)}function N(e){var t=e._controlledWritableStream;b(t),fe(e),ce(0===e._queue.length,"queue must be empty once the final write record is dequeued"),oe(e._underlyingSink,"close",[]).then(function(){p(t)},function(e){m(t,e)}).catch(he)}function M(e,t){var r=e._controlledWritableStream;_(r),oe(e._underlyingSink,"write",[t,e]).then(function(){d(r);var t=r._state;if(ce("writable"===t||"erroring"===t),fe(e),!1===g(r)&&"writable"===t){var n=q(e);A(r,n)}F(e)},function(e){f(r,e)}).catch(he)}function q(e){return I(e)<=0}function W(e,t){var r=e._controlledWritableStream;ce("writable"===r._state),c(r,t)}function U(e){return new TypeError("WritableStream.prototype."+e+" can only be used on a WritableStream")}function B(e){return new TypeError("WritableStreamDefaultWriter.prototype."+e+" can only be used on a WritableStreamDefaultWriter")}function z(e){return new TypeError("Cannot "+e+" a stream using a released writer")}function G(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r,e._closedPromiseState="pending"})}function H(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function X(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function Y(e,t){ce(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),ce(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),ce("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="rejected"}function V(e,t){ce(void 0===e._closedPromise_resolve,"writer._closedPromise_resolve === undefined"),ce(void 0===e._closedPromise_reject,"writer._closedPromise_reject === undefined"),ce("pending"!==e._closedPromiseState,"writer._closedPromiseState is not pending"),e._closedPromise=Promise.reject(t),e._closedPromiseState="rejected"}function J(e){ce(void 0!==e._closedPromise_resolve,"writer._closedPromise_resolve !== undefined"),ce(void 0!==e._closedPromise_reject,"writer._closedPromise_reject !== undefined"),ce("pending"===e._closedPromiseState,"writer._closedPromiseState is pending"),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0,e._closedPromiseState="resolved"}function Q(e){e._readyPromise=new Promise(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function K(e,t){e._readyPromise=Promise.reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function Z(e){e._readyPromise=Promise.resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}function $(e,t){ce(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),ce(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_reject(t),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="rejected"}function ee(e){ce(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),ce(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=new Promise(function(t,r){e._readyPromise_resolve=t,e._readyPromise_reject=r}),e._readyPromiseState="pending"}function te(e,t){ce(void 0===e._readyPromise_resolve,"writer._readyPromise_resolve === undefined"),ce(void 0===e._readyPromise_reject,"writer._readyPromise_reject === undefined"),e._readyPromise=Promise.reject(t),e._readyPromiseState="rejected"}function re(e){ce(void 0!==e._readyPromise_resolve,"writer._readyPromise_resolve !== undefined"),ce(void 0!==e._readyPromise_reject,"writer._readyPromise_reject !== undefined"),e._readyPromise_resolve(void 0),e._readyPromise_resolve=void 0,e._readyPromise_reject=void 0,e._readyPromiseState="fulfilled"}var ne=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),ie=r(0),ae=ie.InvokeOrNoop,oe=ie.PromiseInvokeOrNoop,se=ie.ValidateAndNormalizeQueuingStrategy,le=ie.typeIsObject,ue=r(1),ce=ue.assert,he=ue.rethrowAssertionErrorRejection,de=r(3),fe=de.DequeueValue,pe=de.EnqueueValueWithSize,me=de.PeekQueueValue,ge=de.ResetQueue,ve=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark,o=void 0===a?1:a;if(n(this,e),this._state="writable",this._storedError=void 0,this._writer=void 0,this._writableStreamController=void 0,this._writeRequests=[],this._inFlightWriteRequest=void 0,this._closeRequest=void 0,this._inFlightCloseRequest=void 0,this._pendingAbortRequest=void 0,this._backpressure=!1,void 0!==t.type)throw new RangeError("Invalid type is specified");this._writableStreamController=new _e(this,t,i,o),this._writableStreamController.__startSteps()}return ne(e,[{key:"abort",value:function(e){return!1===a(this)?Promise.reject(U("abort")):!0===o(this)?Promise.reject(new TypeError("Cannot abort a stream that already has a writer")):s(this,e)}},{key:"getWriter",value:function(){if(!1===a(this))throw U("getWriter");return i(this)}},{key:"locked",get:function(){if(!1===a(this))throw U("locked");return o(this)}}]),e}();e.exports={AcquireWritableStreamDefaultWriter:i,IsWritableStream:a,IsWritableStreamLocked:o,WritableStream:ve,WritableStreamAbort:s,WritableStreamDefaultControllerError:W,WritableStreamDefaultWriterCloseWithErrorPropagation:function(e){var t=e._ownerWritableStream;ce(void 0!==t);var r=t._state;return!0===g(t)||"closed"===r?Promise.resolve():"errored"===r?Promise.reject(t._storedError):(ce("writable"===r||"erroring"===r),P(e))},WritableStreamDefaultWriterRelease:x,WritableStreamDefaultWriterWrite:T,WritableStreamCloseQueuedOrInFlight:g};var be=function(){function e(t){if(n(this,e),!1===a(t))throw new TypeError("WritableStreamDefaultWriter can only be constructed with a WritableStream instance");if(!0===o(t))throw new TypeError("This stream has already been locked for exclusive writing by another writer");this._ownerWritableStream=t,t._writer=this;var r=t._state;if("writable"===r)!1===g(t)&&!0===t._backpressure?Q(this):Z(this),G(this);else if("erroring"===r)K(this,t._storedError),this._readyPromise.catch(function(){}),G(this);else if("closed"===r)Z(this),X(this);else{ce("errored"===r,"state must be errored");var i=t._storedError;K(this,i),this._readyPromise.catch(function(){}),H(this,i),this._closedPromise.catch(function(){})}}return ne(e,[{key:"abort",value:function(e){return!1===S(this)?Promise.reject(B("abort")):void 0===this._ownerWritableStream?Promise.reject(z("abort")):w(this,e)}},{key:"close",value:function(){if(!1===S(this))return Promise.reject(B("close"));var e=this._ownerWritableStream;return void 0===e?Promise.reject(z("close")):!0===g(e)?Promise.reject(new TypeError("cannot close an already-closing stream")):P(this)}},{key:"releaseLock",value:function(){if(!1===S(this))throw B("releaseLock");var e=this._ownerWritableStream;void 0!==e&&(ce(void 0!==e._writer),x(this))}},{key:"write",value:function(e){return!1===S(this)?Promise.reject(B("write")):void 0===this._ownerWritableStream?Promise.reject(z("write to")):T(this,e)}},{key:"closed",get:function(){return!1===S(this)?Promise.reject(B("closed")):this._closedPromise}},{key:"desiredSize",get:function(){if(!1===S(this))throw B("desiredSize");if(void 0===this._ownerWritableStream)throw z("desiredSize");return k(this)}},{key:"ready",get:function(){return!1===S(this)?Promise.reject(B("ready")):this._readyPromise}}]),e}(),_e=function(){function e(t,r,i,o){if(n(this,e),!1===a(t))throw new TypeError("WritableStreamDefaultController can only be constructed with a WritableStream instance");if(void 0!==t._writableStreamController)throw new TypeError("WritableStreamDefaultController instances can only be created by the WritableStream constructor");this._controlledWritableStream=t,this._underlyingSink=r,this._queue=void 0,this._queueTotalSize=void 0,ge(this),this._started=!1;var s=se(i,o);this._strategySize=s.size,this._strategyHWM=s.highWaterMark,A(t,q(this))}return ne(e,[{key:"error",value:function(e){if(!1===D(this))throw new TypeError("WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController");"writable"===this._controlledWritableStream._state&&W(this,e)}},{key:"__abortSteps",value:function(e){return oe(this._underlyingSink,"abort",[e])}},{key:"__errorSteps",value:function(){ge(this)}},{key:"__startSteps",value:function(){var e=this,t=ae(this._underlyingSink,"start",[this]),r=this._controlledWritableStream;Promise.resolve(t).then(function(){ce("writable"===r._state||"erroring"===r._state),e._started=!0,F(e)},function(t){ce("writable"===r._state||"erroring"===r._state),e._started=!0,u(r,t)}).catch(he)}}]),e}()},function(e,t,r){var n=r(0).IsFiniteNonNegativeNumber,i=r(1).assert;t.DequeueValue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never dequeue from an empty queue.");var t=e._queue.shift();return e._queueTotalSize-=t.size,e._queueTotalSize<0&&(e._queueTotalSize=0),t.value},t.EnqueueValueWithSize=function(e,t,r){if(i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and [[queueTotalSize]]."),r=Number(r),!n(r))throw new RangeError("Size must be a finite, non-NaN, non-negative number.");e._queue.push({value:t,size:r}),e._queueTotalSize+=r},t.PeekQueueValue=function(e){return i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]]."),i(e._queue.length>0,"Spec-level failure: should never peek at an empty queue."),e._queue[0].value},t.ResetQueue=function(e){i("_queue"in e&&"_queueTotalSize"in e,"Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]]."),e._queue=[],e._queueTotalSize=0}},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){return new et(e)}function a(e){return new $e(e)}function o(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readableStreamController")}function s(e){return Ne(!0===o(e),"IsReadableStreamLocked should only be used on known readable streams"),void 0!==e._reader}function l(e,t){Ne(!0===o(e)),Ne("boolean"==typeof t);var r=a(e),n={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:void 0,reason2:void 0};n.promise=new Promise(function(e){n._resolve=e});var i=u();i._reader=r,i._teeState=n,i._cloneForBranch2=t;var s=c();s._stream=e,s._teeState=n;var l=h();l._stream=e,l._teeState=n;var d=Object.create(Object.prototype);De(d,"pull",i),De(d,"cancel",s);var f=new Ze(d),p=Object.create(Object.prototype);De(p,"pull",i),De(p,"cancel",l);var m=new Ze(p);return i._branch1=f._readableStreamController,i._branch2=m._readableStreamController,r._closedPromise.catch(function(e){!0!==n.closedOrErrored&&(F(i._branch1,e),F(i._branch2,e),n.closedOrErrored=!0)}),[f,m]}function u(){function e(){var t=e._reader,r=e._branch1,n=e._branch2,i=e._teeState;return T(t).then(function(e){Ne(Fe(e));var t=e.value,a=e.done;if(Ne("boolean"==typeof a),!0===a&&!1===i.closedOrErrored&&(!1===i.canceled1&&L(r),!1===i.canceled2&&L(n),i.closedOrErrored=!0),!0!==i.closedOrErrored){var o=t,s=t;!1===i.canceled1&&D(r,o),!1===i.canceled2&&D(n,s)}})}return e}function c(){function e(t){var r=e._stream,n=e._teeState;if(n.canceled1=!0,n.reason1=t,!0===n.canceled2){var i=p(r,Le([n.reason1,n.reason2]));n._resolve(i)}return n.promise}return e}function h(){function e(t){var r=e._stream,n=e._teeState;if(n.canceled2=!0,n.reason2=t,!0===n.canceled1){var i=p(r,Le([n.reason1,n.reason2]));n._resolve(i)}return n.promise}return e}function d(e){return Ne(!0===w(e._reader)),Ne("readable"===e._state||"closed"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readIntoRequests.push(n)})}function f(e){return Ne(!0===P(e._reader)),Ne("readable"===e._state),new Promise(function(t,r){var n={_resolve:t,_reject:r};e._reader._readRequests.push(n)})}function p(e,t){return e._disturbed=!0,"closed"===e._state?Promise.resolve(void 0):"errored"===e._state?Promise.reject(e._storedError):(m(e),e._readableStreamController.__cancelSteps(t).then(function(){}))}function m(e){Ne("readable"===e._state),e._state="closed";var t=e._reader;if(void 0!==t){if(!0===P(t)){for(var r=0;r<t._readRequests.length;r++)(0,t._readRequests[r]._resolve)(Re(void 0,!0));t._readRequests=[]}ge(t)}}function g(e,t){Ne(!0===o(e),"stream must be ReadableStream"),Ne("readable"===e._state,"state must be readable"),e._state="errored",e._storedError=t;var r=e._reader;if(void 0!==r){if(!0===P(r)){for(var n=0;n<r._readRequests.length;n++)r._readRequests[n]._reject(t);r._readRequests=[]}else{Ne(w(r),"reader must be ReadableStreamBYOBReader");for(var i=0;i<r._readIntoRequests.length;i++)r._readIntoRequests[i]._reject(t);r._readIntoRequests=[]}pe(r,t),r._closedPromise.catch(function(){})}}function v(e,t,r){var n=e._reader;Ne(n._readIntoRequests.length>0),n._readIntoRequests.shift()._resolve(Re(t,r))}function b(e,t,r){var n=e._reader;Ne(n._readRequests.length>0),n._readRequests.shift()._resolve(Re(t,r))}function _(e){return e._reader._readIntoRequests.length}function y(e){return e._reader._readRequests.length}function A(e){var t=e._reader;return void 0!==t&&!1!==w(t)}function S(e){var t=e._reader;return void 0!==t&&!1!==P(t)}function w(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readIntoRequests")}function P(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_readRequests")}function R(e,t){e._ownerReadableStream=t,t._reader=e,"readable"===t._state?he(e):"closed"===t._state?fe(e):(Ne("errored"===t._state,"state must be errored"),de(e,t._storedError),e._closedPromise.catch(function(){}))}function C(e,t){var r=e._ownerReadableStream;return Ne(void 0!==r),p(r,t)}function k(e){Ne(void 0!==e._ownerReadableStream),Ne(e._ownerReadableStream._reader===e),"readable"===e._ownerReadableStream._state?pe(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")):me(e,new TypeError("Reader was released and can no longer be used to monitor the stream's closedness")),e._closedPromise.catch(function(){}),e._ownerReadableStream._reader=void 0,e._ownerReadableStream=void 0}function x(e,t){var r=e._ownerReadableStream;return Ne(void 0!==r),r._disturbed=!0,"errored"===r._state?Promise.reject(r._storedError):Q(r._readableStreamController,t)}function T(e){var t=e._ownerReadableStream;return Ne(void 0!==t),t._disturbed=!0,"closed"===t._state?Promise.resolve(Re(void 0,!0)):"errored"===t._state?Promise.reject(t._storedError):(Ne("readable"===t._state),t._readableStreamController.__pullSteps())}function E(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingSource")}function O(e){!1!==I(e)&&(!0!==e._pulling?(Ne(!1===e._pullAgain),e._pulling=!0,xe(e._underlyingSource,"pull",[e]).then(function(){if(e._pulling=!1,!0===e._pullAgain)return e._pullAgain=!1,O(e)},function(t){j(e,t)}).catch(Me)):e._pullAgain=!0)}function I(e){var t=e._controlledReadableStream;return"closed"!==t._state&&"errored"!==t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===s(t)&&y(t)>0||N(e)>0)))}function L(e){var t=e._controlledReadableStream;Ne(!1===e._closeRequested),Ne("readable"===t._state),e._closeRequested=!0,0===e._queue.length&&m(t)}function D(e,t){var r=e._controlledReadableStream;if(Ne(!1===e._closeRequested),Ne("readable"===r._state),!0===s(r)&&y(r)>0)b(r,t,!1);else{var n=1;if(void 0!==e._strategySize){var i=e._strategySize;try{n=i(t)}catch(t){throw j(e,t),t}}try{Ue(e,t,n)}catch(t){throw j(e,t),t}}O(e)}function F(e,t){var r=e._controlledReadableStream;Ne("readable"===r._state),Be(e),g(r,t)}function j(e,t){"readable"===e._controlledReadableStream._state&&F(e,t)}function N(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function M(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_underlyingByteSource")}function q(e){return!!Fe(e)&&!!Object.prototype.hasOwnProperty.call(e,"_associatedReadableByteStreamController")}function W(e){!1!==te(e)&&(!0!==e._pulling?(Ne(!1===e._pullAgain),e._pulling=!0,xe(e._underlyingByteSource,"pull",[e]).then(function(){e._pulling=!1,!0===e._pullAgain&&(e._pullAgain=!1,W(e))},function(t){"readable"===e._controlledReadableStream._state&&ie(e,t)}).catch(Me)):e._pullAgain=!0)}function U(e){V(e),e._pendingPullIntos=[]}function B(e,t){Ne("errored"!==e._state,"state must not be errored");var r=!1;"closed"===e._state&&(Ne(0===t.bytesFilled),r=!0);var n=z(t);"default"===t.readerType?b(e,n,r):(Ne("byob"===t.readerType),v(e,n,r))}function z(e){var t=e.bytesFilled,r=e.elementSize;return Ne(t<=e.byteLength),Ne(t%r==0),new e.ctor(e.buffer,e.byteOffset,t/r)}function G(e,t,r,n){e._queue.push({buffer:t,byteOffset:r,byteLength:n}),e._queueTotalSize+=n}function H(e,t){var r=t.elementSize,n=t.bytesFilled-t.bytesFilled%r,i=Math.min(e._queueTotalSize,t.byteLength-t.bytesFilled),a=t.bytesFilled+i,o=a-a%r,s=i,l=!1;o>n&&(s=o-t.bytesFilled,l=!0);for(var u=e._queue;s>0;){var c=u[0],h=Math.min(s,c.byteLength),d=t.byteOffset+t.bytesFilled;Pe(t.buffer,d,c.buffer,c.byteOffset,h),c.byteLength===h?u.shift():(c.byteOffset+=h,c.byteLength-=h),e._queueTotalSize-=h,X(e,h,t),s-=h}return!1===l&&(Ne(0===e._queueTotalSize,"queue must be empty"),Ne(t.bytesFilled>0),Ne(t.bytesFilled<t.elementSize)),l}function X(e,t,r){Ne(0===e._pendingPullIntos.length||e._pendingPullIntos[0]===r),V(e),r.bytesFilled+=t}function Y(e){Ne("readable"===e._controlledReadableStream._state),0===e._queueTotalSize&&!0===e._closeRequested?m(e._controlledReadableStream):W(e)}function V(e){void 0!==e._byobRequest&&(e._byobRequest._associatedReadableByteStreamController=void 0,e._byobRequest._view=void 0,e._byobRequest=void 0)}function J(e){for(Ne(!1===e._closeRequested);e._pendingPullIntos.length>0;){if(0===e._queueTotalSize)return;var t=e._pendingPullIntos[0];!0===H(e,t)&&(ee(e),B(e._controlledReadableStream,t))}}function Q(e,t){var r=e._controlledReadableStream,n=1;t.constructor!==DataView&&(n=t.constructor.BYTES_PER_ELEMENT);var i=t.constructor,a={buffer:t.buffer,byteOffset:t.byteOffset,byteLength:t.byteLength,bytesFilled:0,elementSize:n,ctor:i,readerType:"byob"};if(e._pendingPullIntos.length>0)return a.buffer=Te(a.buffer),e._pendingPullIntos.push(a),d(r);if("closed"===r._state){var o=new t.constructor(a.buffer,a.byteOffset,0);return Promise.resolve(Re(o,!0))}if(e._queueTotalSize>0){if(!0===H(e,a)){var s=z(a);return Y(e),Promise.resolve(Re(s,!1))}if(!0===e._closeRequested){var l=new TypeError("Insufficient bytes to fill elements in the given buffer");return ie(e,l),Promise.reject(l)}}a.buffer=Te(a.buffer),e._pendingPullIntos.push(a);var u=d(r);return W(e),u}function K(e,t){t.buffer=Te(t.buffer),Ne(0===t.bytesFilled,"bytesFilled must be 0");var r=e._controlledReadableStream;if(!0===A(r))for(;_(r)>0;)B(r,ee(e))}function Z(e,t,r){if(r.bytesFilled+t>r.byteLength)throw new RangeError("bytesWritten out of range");if(X(e,t,r),!(r.bytesFilled<r.elementSize)){ee(e);var n=r.bytesFilled%r.elementSize;if(n>0){var i=r.byteOffset+r.bytesFilled,a=r.buffer.slice(i-n,i);G(e,a,0,a.byteLength)}r.buffer=Te(r.buffer),r.bytesFilled-=n,B(e._controlledReadableStream,r),J(e)}}function $(e,t){var r=e._pendingPullIntos[0],n=e._controlledReadableStream;if("closed"===n._state){if(0!==t)throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream");K(e,r)}else Ne("readable"===n._state),Z(e,t,r)}function ee(e){var t=e._pendingPullIntos.shift();return V(e),t}function te(e){var t=e._controlledReadableStream;return"readable"===t._state&&(!0!==e._closeRequested&&(!1!==e._started&&(!0===S(t)&&y(t)>0||(!0===A(t)&&_(t)>0||ae(e)>0))))}function re(e){var t=e._controlledReadableStream;if(Ne(!1===e._closeRequested),Ne("readable"===t._state),e._queueTotalSize>0)e._closeRequested=!0;else{if(e._pendingPullIntos.length>0&&e._pendingPullIntos[0].bytesFilled>0){var r=new TypeError("Insufficient bytes to fill elements in the given buffer");throw ie(e,r),r}m(t)}}function ne(e,t){var r=e._controlledReadableStream;Ne(!1===e._closeRequested),Ne("readable"===r._state);var n=t.buffer,i=t.byteOffset,a=t.byteLength,o=Te(n);!0===S(r)?0===y(r)?G(e,o,i,a):(Ne(0===e._queue.length),b(r,new Uint8Array(o,i,a),!1)):!0===A(r)?(G(e,o,i,a),J(e)):(Ne(!1===s(r),"stream must not be locked"),G(e,o,i,a))}function ie(e,t){var r=e._controlledReadableStream;Ne("readable"===r._state),U(e),Be(e),g(r,t)}function ae(e){var t=e._controlledReadableStream._state;return"errored"===t?null:"closed"===t?0:e._strategyHWM-e._queueTotalSize}function oe(e,t){if(t=Number(t),!1===Ce(t))throw new RangeError("bytesWritten must be a finite");Ne(e._pendingPullIntos.length>0),$(e,t)}function se(e,t){Ne(e._pendingPullIntos.length>0);var r=e._pendingPullIntos[0];if(r.byteOffset+r.bytesFilled!==t.byteOffset)throw new RangeError("The region specified by view does not match byobRequest");if(r.byteLength!==t.byteLength)throw new RangeError("The buffer of view has different capacity than byobRequest");r.buffer=t.buffer,$(e,t.byteLength)}function le(e){return new TypeError("ReadableStream.prototype."+e+" can only be used on a ReadableStream")}function ue(e){return new TypeError("Cannot "+e+" a stream using a released reader")}function ce(e){return new TypeError("ReadableStreamDefaultReader.prototype."+e+" can only be used on a ReadableStreamDefaultReader")}function he(e){e._closedPromise=new Promise(function(t,r){e._closedPromise_resolve=t,e._closedPromise_reject=r})}function de(e,t){e._closedPromise=Promise.reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function fe(e){e._closedPromise=Promise.resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function pe(e,t){Ne(void 0!==e._closedPromise_resolve),Ne(void 0!==e._closedPromise_reject),e._closedPromise_reject(t),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function me(e,t){Ne(void 0===e._closedPromise_resolve),Ne(void 0===e._closedPromise_reject),e._closedPromise=Promise.reject(t)}function ge(e){Ne(void 0!==e._closedPromise_resolve),Ne(void 0!==e._closedPromise_reject),e._closedPromise_resolve(void 0),e._closedPromise_resolve=void 0,e._closedPromise_reject=void 0}function ve(e){return new TypeError("ReadableStreamBYOBReader.prototype."+e+" can only be used on a ReadableStreamBYOBReader")}function be(e){return new TypeError("ReadableStreamDefaultController.prototype."+e+" can only be used on a ReadableStreamDefaultController")}function _e(e){return new TypeError("ReadableStreamBYOBRequest.prototype."+e+" can only be used on a ReadableStreamBYOBRequest")}function ye(e){return new TypeError("ReadableByteStreamController.prototype."+e+" can only be used on a ReadableByteStreamController")}function Ae(e){try{Promise.prototype.then.call(e,void 0,function(){})}catch(e){}}var Se=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),we=r(0),Pe=we.ArrayBufferCopy,Re=we.CreateIterResultObject,Ce=we.IsFiniteNonNegativeNumber,ke=we.InvokeOrNoop,xe=we.PromiseInvokeOrNoop,Te=we.TransferArrayBuffer,Ee=we.ValidateAndNormalizeQueuingStrategy,Oe=we.ValidateAndNormalizeHighWaterMark,Ie=r(0),Le=Ie.createArrayFromList,De=Ie.createDataProperty,Fe=Ie.typeIsObject,je=r(1),Ne=je.assert,Me=je.rethrowAssertionErrorRejection,qe=r(3),We=qe.DequeueValue,Ue=qe.EnqueueValueWithSize,Be=qe.ResetQueue,ze=r(2),Ge=ze.AcquireWritableStreamDefaultWriter,He=ze.IsWritableStream,Xe=ze.IsWritableStreamLocked,Ye=ze.WritableStreamAbort,Ve=ze.WritableStreamDefaultWriterCloseWithErrorPropagation,Je=ze.WritableStreamDefaultWriterRelease,Qe=ze.WritableStreamDefaultWriterWrite,Ke=ze.WritableStreamCloseQueuedOrInFlight,Ze=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.size,a=r.highWaterMark;n(this,e),this._state="readable",this._reader=void 0,this._storedError=void 0,this._disturbed=!1,this._readableStreamController=void 0;var o=t.type;if("bytes"===String(o))void 0===a&&(a=0),this._readableStreamController=new nt(this,t,a);else{if(void 0!==o)throw new RangeError("Invalid type is specified");void 0===a&&(a=1),this._readableStreamController=new tt(this,t,i,a)}}return Se(e,[{key:"cancel",value:function(e){return!1===o(this)?Promise.reject(le("cancel")):!0===s(this)?Promise.reject(new TypeError("Cannot cancel a stream that already has a reader")):p(this,e)}},{key:"getReader",value:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).mode;if(!1===o(this))throw le("getReader");if(void 0===e)return a(this);if("byob"===(e=String(e)))return i(this);throw new RangeError("Invalid mode is specified")}},{key:"pipeThrough",value:function(e,t){var r=e.writable,n=e.readable;return Ae(this.pipeTo(r,t)),n}},{key:"pipeTo",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.preventClose,i=r.preventAbort,l=r.preventCancel;if(!1===o(this))return Promise.reject(le("pipeTo"));if(!1===He(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo's first argument must be a WritableStream"));if(n=Boolean(n),i=Boolean(i),l=Boolean(l),!0===s(this))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"));if(!0===Xe(e))return Promise.reject(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"));var u=a(this),c=Ge(e),h=!1,d=Promise.resolve();return new Promise(function(r,a){function o(){return d=Promise.resolve(),!0===h?Promise.resolve():c._readyPromise.then(function(){return T(u).then(function(e){var t=e.value;!0!==e.done&&(d=Qe(c,t).catch(function(){}))})}).then(o)}function s(){var e=d;return d.then(function(){return e!==d?s():void 0})}function f(e,t,r){"errored"===e._state?r(e._storedError):t.catch(r).catch(Me)}function m(t,r,n){function i(){t().then(function(){return v(r,n)},function(e){return v(!0,e)}).catch(Me)}!0!==h&&(h=!0,"writable"===e._state&&!1===Ke(e)?s().then(i):i())}function g(t,r){!0!==h&&(h=!0,"writable"===e._state&&!1===Ke(e)?s().then(function(){return v(t,r)}).catch(Me):v(t,r))}function v(e,t){Je(c),k(u),e?a(t):r(void 0)}if(f(t,u._closedPromise,function(t){!1===i?m(function(){return Ye(e,t)},!0,t):g(!0,t)}),f(e,c._closedPromise,function(e){!1===l?m(function(){return p(t,e)},!0,e):g(!0,e)}),function(e,t,r){"closed"===e._state?r():t.then(r).catch(Me)}(t,u._closedPromise,function(){!1===n?m(function(){return Ve(c)}):g()}),!0===Ke(e)||"closed"===e._state){var b=new TypeError("the destination writable stream closed before all data could be piped to it");!1===l?m(function(){return p(t,b)},!0,b):g(!0,b)}o().catch(function(e){d=Promise.resolve(),Me(e)})})}},{key:"tee",value:function(){if(!1===o(this))throw le("tee");var e=l(this,!1);return Le(e)}},{key:"locked",get:function(){if(!1===o(this))throw le("locked");return s(this)}}]),e}();e.exports={ReadableStream:Ze,IsReadableStreamDisturbed:function(e){return Ne(!0===o(e),"IsReadableStreamDisturbed should only be used on known readable streams"),e._disturbed},ReadableStreamDefaultControllerClose:L,ReadableStreamDefaultControllerEnqueue:D,ReadableStreamDefaultControllerError:F,ReadableStreamDefaultControllerGetDesiredSize:N};var $e=function(){function e(t){if(n(this,e),!1===o(t))throw new TypeError("ReadableStreamDefaultReader can only be constructed with a ReadableStream instance");if(!0===s(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");R(this,t),this._readRequests=[]}return Se(e,[{key:"cancel",value:function(e){return!1===P(this)?Promise.reject(ce("cancel")):void 0===this._ownerReadableStream?Promise.reject(ue("cancel")):C(this,e)}},{key:"read",value:function(){return!1===P(this)?Promise.reject(ce("read")):void 0===this._ownerReadableStream?Promise.reject(ue("read from")):T(this)}},{key:"releaseLock",value:function(){if(!1===P(this))throw ce("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");k(this)}}},{key:"closed",get:function(){return!1===P(this)?Promise.reject(ce("closed")):this._closedPromise}}]),e}(),et=function(){function e(t){if(n(this,e),!o(t))throw new TypeError("ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a byte source");if(!1===M(t._readableStreamController))throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte source");if(s(t))throw new TypeError("This stream has already been locked for exclusive reading by another reader");R(this,t),this._readIntoRequests=[]}return Se(e,[{key:"cancel",value:function(e){return w(this)?void 0===this._ownerReadableStream?Promise.reject(ue("cancel")):C(this,e):Promise.reject(ve("cancel"))}},{key:"read",value:function(e){return w(this)?void 0===this._ownerReadableStream?Promise.reject(ue("read from")):ArrayBuffer.isView(e)?0===e.byteLength?Promise.reject(new TypeError("view must have non-zero byteLength")):x(this,e):Promise.reject(new TypeError("view must be an array buffer view")):Promise.reject(ve("read"))}},{key:"releaseLock",value:function(){if(!w(this))throw ve("releaseLock");if(void 0!==this._ownerReadableStream){if(this._readIntoRequests.length>0)throw new TypeError("Tried to release a reader lock when that reader has pending read() calls un-settled");k(this)}}},{key:"closed",get:function(){return w(this)?this._closedPromise:Promise.reject(ve("closed"))}}]),e}(),tt=function(){function e(t,r,i,a){if(n(this,e),!1===o(t))throw new TypeError("ReadableStreamDefaultController can only be constructed with a ReadableStream instance");if(void 0!==t._readableStreamController)throw new TypeError("ReadableStreamDefaultController instances can only be created by the ReadableStream constructor");this._controlledReadableStream=t,this._underlyingSource=r,this._queue=void 0,this._queueTotalSize=void 0,Be(this),this._started=!1,this._closeRequested=!1,this._pullAgain=!1,this._pulling=!1;var s=Ee(i,a);this._strategySize=s.size,this._strategyHWM=s.highWaterMark;var l=this,u=ke(r,"start",[this]);Promise.resolve(u).then(function(){l._started=!0,Ne(!1===l._pulling),Ne(!1===l._pullAgain),O(l)},function(e){j(l,e)}).catch(Me)}return Se(e,[{key:"close",value:function(){if(!1===E(this))throw be("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");L(this)}},{key:"enqueue",value:function(e){if(!1===E(this))throw be("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");return D(this,e)}},{key:"error",value:function(e){if(!1===E(this))throw be("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");F(this,e)}},{key:"__cancelSteps",value:function(e){return Be(this),xe(this._underlyingSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(this._queue.length>0){var t=We(this);return!0===this._closeRequested&&0===this._queue.length?m(e):O(this),Promise.resolve(Re(t,!1))}var r=f(e);return O(this),r}},{key:"desiredSize",get:function(){if(!1===E(this))throw be("desiredSize");return N(this)}}]),e}(),rt=function(){function e(t,r){n(this,e),this._associatedReadableByteStreamController=t,this._view=r}return Se(e,[{key:"respond",value:function(e){if(!1===q(this))throw _e("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");oe(this._associatedReadableByteStreamController,e)}},{key:"respondWithNewView",value:function(e){if(!1===q(this))throw _e("respond");if(void 0===this._associatedReadableByteStreamController)throw new TypeError("This BYOB request has been invalidated");if(!ArrayBuffer.isView(e))throw new TypeError("You can only respond with array buffer views");se(this._associatedReadableByteStreamController,e)}},{key:"view",get:function(){return this._view}}]),e}(),nt=function(){function e(t,r,i){if(n(this,e),!1===o(t))throw new TypeError("ReadableByteStreamController can only be constructed with a ReadableStream instance given a byte source");if(void 0!==t._readableStreamController)throw new TypeError("ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte source");this._controlledReadableStream=t,this._underlyingByteSource=r,this._pullAgain=!1,this._pulling=!1,U(this),this._queue=this._queueTotalSize=void 0,Be(this),this._closeRequested=!1,this._started=!1,this._strategyHWM=Oe(i);var a=r.autoAllocateChunkSize;if(void 0!==a&&(!1===Number.isInteger(a)||a<=0))throw new RangeError("autoAllocateChunkSize must be a positive integer");this._autoAllocateChunkSize=a,this._pendingPullIntos=[];var s=this,l=ke(r,"start",[this]);Promise.resolve(l).then(function(){s._started=!0,Ne(!1===s._pulling),Ne(!1===s._pullAgain),W(s)},function(e){"readable"===t._state&&ie(s,e)}).catch(Me)}return Se(e,[{key:"close",value:function(){if(!1===M(this))throw ye("close");if(!0===this._closeRequested)throw new TypeError("The stream has already been closed; do not close it again!");var e=this._controlledReadableStream._state;if("readable"!==e)throw new TypeError("The stream (in "+e+" state) is not in the readable state and cannot be closed");re(this)}},{key:"enqueue",value:function(e){if(!1===M(this))throw ye("enqueue");if(!0===this._closeRequested)throw new TypeError("stream is closed or draining");var t=this._controlledReadableStream._state;if("readable"!==t)throw new TypeError("The stream (in "+t+" state) is not in the readable state and cannot be enqueued to");if(!ArrayBuffer.isView(e))throw new TypeError("You can only enqueue array buffer views when using a ReadableByteStreamController");ne(this,e)}},{key:"error",value:function(e){if(!1===M(this))throw ye("error");var t=this._controlledReadableStream;if("readable"!==t._state)throw new TypeError("The stream is "+t._state+" and so cannot be errored");ie(this,e)}},{key:"__cancelSteps",value:function(e){return this._pendingPullIntos.length>0&&(this._pendingPullIntos[0].bytesFilled=0),Be(this),xe(this._underlyingByteSource,"cancel",[e])}},{key:"__pullSteps",value:function(){var e=this._controlledReadableStream;if(Ne(!0===S(e)),this._queueTotalSize>0){Ne(0===y(e));var t=this._queue.shift();this._queueTotalSize-=t.byteLength,Y(this);var r=void 0;try{r=new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}catch(e){return Promise.reject(e)}return Promise.resolve(Re(r,!1))}var n=this._autoAllocateChunkSize;if(void 0!==n){var i=void 0;try{i=new ArrayBuffer(n)}catch(e){return Promise.reject(e)}var a={buffer:i,byteOffset:0,byteLength:n,bytesFilled:0,elementSize:1,ctor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(a)}var o=f(e);return W(this),o}},{key:"byobRequest",get:function(){if(!1===M(this))throw ye("byobRequest");if(void 0===this._byobRequest&&this._pendingPullIntos.length>0){var e=this._pendingPullIntos[0],t=new Uint8Array(e.buffer,e.byteOffset+e.bytesFilled,e.byteLength-e.bytesFilled);this._byobRequest=new rt(this,t)}return this._byobRequest}},{key:"desiredSize",get:function(){if(!1===M(this))throw ye("desiredSize");return ae(this)}}]),e}()},function(e,t,r){var n=r(6),i=r(4),a=r(2);t.TransformStream=n.TransformStream,t.ReadableStream=i.ReadableStream,t.IsReadableStreamDisturbed=i.IsReadableStreamDisturbed,t.ReadableStreamDefaultControllerClose=i.ReadableStreamDefaultControllerClose,t.ReadableStreamDefaultControllerEnqueue=i.ReadableStreamDefaultControllerEnqueue,t.ReadableStreamDefaultControllerError=i.ReadableStreamDefaultControllerError,t.ReadableStreamDefaultControllerGetDesiredSize=i.ReadableStreamDefaultControllerGetDesiredSize,t.AcquireWritableStreamDefaultWriter=a.AcquireWritableStreamDefaultWriter,t.IsWritableStream=a.IsWritableStream,t.IsWritableStreamLocked=a.IsWritableStreamLocked,t.WritableStream=a.WritableStream,t.WritableStreamAbort=a.WritableStreamAbort,t.WritableStreamDefaultControllerError=a.WritableStreamDefaultControllerError,t.WritableStreamDefaultWriterCloseWithErrorPropagation=a.WritableStreamDefaultWriterCloseWithErrorPropagation,t.WritableStreamDefaultWriterRelease=a.WritableStreamDefaultWriterRelease,t.WritableStreamDefaultWriterWrite=a.WritableStreamDefaultWriterWrite},function(e,t,r){function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");s(e)}function a(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");if(!0===e._readableClosed)throw new TypeError("Readable side is already closed");var r=e._readableController;try{x(r,t)}catch(t){throw e._readableClosed=!0,l(e,t),e._storedError}!0===E(r)<=0&&!1===e._backpressure&&h(e,!0)}function o(e,t){if(!0===e._errored)throw new TypeError("TransformStream is already errored");u(e,t)}function s(e){_(!1===e._errored),_(!1===e._readableClosed);try{k(e._readableController)}catch(e){_(!1)}e._readableClosed=!0}function l(e,t){!1===e._errored&&u(e,t)}function u(e,t){_(!1===e._errored),e._errored=!0,e._storedError=t,!1===e._writableDone&&L(e._writableController,t),!1===e._readableClosed&&T(e._readableController,t)}function c(e){return _(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!1===e._backpressure?Promise.resolve():(_(!0===e._backpressure,"_backpressure should have been initialized"),e._backpressureChangePromise)}function h(e,t){_(e._backpressure!==t,"TransformStreamSetBackpressure() should be called only when backpressure is changed"),void 0!==e._backpressureChangePromise&&e._backpressureChangePromise_resolve(t),e._backpressureChangePromise=new Promise(function(t){e._backpressureChangePromise_resolve=t}),e._backpressureChangePromise.then(function(e){_(e!==t,"_backpressureChangePromise should be fulfilled only when backpressure is changed")}),e._backpressure=t}function d(e,t){return a(t._controlledTransformStream,e),Promise.resolve()}function f(e,t){_(!1===e._errored),_(!1===e._transforming),_(!1===e._backpressure),e._transforming=!0;var r=e._transformer,n=e._transformStreamController;return S(r,"transform",[t,n],d,[t,n]).then(function(){return e._transforming=!1,c(e)},function(t){return l(e,t),Promise.reject(t)})}function p(e){return!!P(e)&&!!Object.prototype.hasOwnProperty.call(e,"_controlledTransformStream")}function m(e){return!!P(e)&&!!Object.prototype.hasOwnProperty.call(e,"_transformStreamController")}function g(e){return new TypeError("TransformStreamDefaultController.prototype."+e+" can only be used on a TransformStreamDefaultController")}function v(e){return new TypeError("TransformStream.prototype."+e+" can only be used on a TransformStream")}var b=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),_=r(1).assert,y=r(0),A=y.InvokeOrNoop,S=y.PromiseInvokeOrPerformFallback,w=y.PromiseInvokeOrNoop,P=y.typeIsObject,R=r(4),C=R.ReadableStream,k=R.ReadableStreamDefaultControllerClose,x=R.ReadableStreamDefaultControllerEnqueue,T=R.ReadableStreamDefaultControllerError,E=R.ReadableStreamDefaultControllerGetDesiredSize,O=r(2),I=O.WritableStream,L=O.WritableStreamDefaultControllerError,D=function(){function e(t,r){n(this,e),this._transformStream=t,this._startPromise=r}return b(e,[{key:"start",value:function(e){var t=this._transformStream;return t._writableController=e,this._startPromise.then(function(){return c(t)})}},{key:"write",value:function(e){return f(this._transformStream,e)}},{key:"abort",value:function(){var e=this._transformStream;e._writableDone=!0,u(e,new TypeError("Writable side aborted"))}},{key:"close",value:function(){var e=this._transformStream;return _(!1===e._transforming),e._writableDone=!0,w(e._transformer,"flush",[e._transformStreamController]).then(function(){return!0===e._errored?Promise.reject(e._storedError):(!1===e._readableClosed&&s(e),Promise.resolve())}).catch(function(t){return l(e,t),Promise.reject(e._storedError)})}}]),e}(),F=function(){function e(t,r){n(this,e),this._transformStream=t,this._startPromise=r}return b(e,[{key:"start",value:function(e){var t=this._transformStream;return t._readableController=e,this._startPromise.then(function(){return _(void 0!==t._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),!0===t._backpressure?Promise.resolve():(_(!1===t._backpressure,"_backpressure should have been initialized"),t._backpressureChangePromise)})}},{key:"pull",value:function(){var e=this._transformStream;return _(!0===e._backpressure,"pull() should be never called while _backpressure is false"),_(void 0!==e._backpressureChangePromise,"_backpressureChangePromise should have been initialized"),h(e,!1),e._backpressureChangePromise}},{key:"cancel",value:function(){var e=this._transformStream;e._readableClosed=!0,u(e,new TypeError("Readable side canceled"))}}]),e}(),j=function(){function e(t){if(n(this,e),!1===m(t))throw new TypeError("TransformStreamDefaultController can only be constructed with a TransformStream instance");if(void 0!==t._transformStreamController)throw new TypeError("TransformStreamDefaultController instances can only be created by the TransformStream constructor");this._controlledTransformStream=t}return b(e,[{key:"enqueue",value:function(e){if(!1===p(this))throw g("enqueue");a(this._controlledTransformStream,e)}},{key:"close",value:function(){if(!1===p(this))throw g("close");i(this._controlledTransformStream)}},{key:"error",value:function(e){if(!1===p(this))throw g("error");o(this._controlledTransformStream,e)}},{key:"desiredSize",get:function(){if(!1===p(this))throw g("desiredSize");var e=this._controlledTransformStream._readableController;return E(e)}}]),e}(),N=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,e),this._transformer=t;var r=t.readableStrategy,i=t.writableStrategy;this._transforming=!1,this._errored=!1,this._storedError=void 0,this._writableController=void 0,this._readableController=void 0,this._transformStreamController=void 0,this._writableDone=!1,this._readableClosed=!1,this._backpressure=void 0,this._backpressureChangePromise=void 0,this._backpressureChangePromise_resolve=void 0,this._transformStreamController=new j(this);var a=void 0,o=new Promise(function(e){a=e}),s=new F(this,o);this._readable=new C(s,r);var l=new D(this,o);this._writable=new I(l,i),_(void 0!==this._writableController),_(void 0!==this._readableController),h(this,E(this._readableController)<=0);var u=this,c=A(t,"start",[u._transformStreamController]);a(c),o.catch(function(e){!1===u._errored&&(u._errored=!0,u._storedError=e)})}return b(e,[{key:"readable",get:function(){if(!1===m(this))throw v("readable");return this._readable}},{key:"writable",get:function(){if(!1===m(this))throw v("writable");return this._writable}}]),e}();e.exports={TransformStream:N}},function(e,t,r){e.exports=r(5)}]))},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFJS=t.isWorker=t.globalScope=void 0;var n=r(48),i=r(8),a=r(0),o=r(51),s=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),l=r(50),u=r(52),c=r(53),h="undefined"==typeof window;s.default.PDFJS||(s.default.PDFJS={});var d=s.default.PDFJS;d.version="1.9.504",d.build="0430e99d",d.pdfBug=!1,void 0!==d.verbosity&&(0,a.setVerbosityLevel)(d.verbosity),delete d.verbosity,Object.defineProperty(d,"verbosity",{get:function(){return(0,a.getVerbosityLevel)()},set:function(e){(0,a.setVerbosityLevel)(e)},enumerable:!0,configurable:!0}),d.VERBOSITY_LEVELS=a.VERBOSITY_LEVELS,d.OPS=a.OPS,d.UNSUPPORTED_FEATURES=a.UNSUPPORTED_FEATURES,d.isValidUrl=i.isValidUrl,d.shadow=a.shadow,d.createBlob=a.createBlob,d.createObjectURL=function(e,t){return(0,a.createObjectURL)(e,t,d.disableCreateObjectURL)},Object.defineProperty(d,"isLittleEndian",{configurable:!0,get:function(){return(0,a.shadow)(d,"isLittleEndian",(0,a.isLittleEndian)())}}),d.removeNullCharacters=a.removeNullCharacters,d.PasswordResponses=a.PasswordResponses,d.PasswordException=a.PasswordException,d.UnknownErrorException=a.UnknownErrorException,d.InvalidPDFException=a.InvalidPDFException,d.MissingPDFException=a.MissingPDFException,d.UnexpectedResponseException=a.UnexpectedResponseException,d.Util=a.Util,d.PageViewport=a.PageViewport,d.createPromiseCapability=a.createPromiseCapability,d.maxImageSize=void 0===d.maxImageSize?-1:d.maxImageSize,d.cMapUrl=void 0===d.cMapUrl?null:d.cMapUrl,d.cMapPacked=void 0!==d.cMapPacked&&d.cMapPacked,d.disableFontFace=void 0!==d.disableFontFace&&d.disableFontFace,d.imageResourcesPath=void 0===d.imageResourcesPath?"":d.imageResourcesPath,d.disableWorker=void 0!==d.disableWorker&&d.disableWorker,d.workerSrc=void 0===d.workerSrc?null:d.workerSrc,d.workerPort=void 0===d.workerPort?null:d.workerPort,d.disableRange=void 0!==d.disableRange&&d.disableRange,d.disableStream=void 0!==d.disableStream&&d.disableStream,d.disableAutoFetch=void 0!==d.disableAutoFetch&&d.disableAutoFetch,d.pdfBug=void 0!==d.pdfBug&&d.pdfBug,d.postMessageTransfers=void 0===d.postMessageTransfers||d.postMessageTransfers,d.disableCreateObjectURL=void 0!==d.disableCreateObjectURL&&d.disableCreateObjectURL,d.disableWebGL=void 0===d.disableWebGL||d.disableWebGL,d.externalLinkTarget=void 0===d.externalLinkTarget?i.LinkTarget.NONE:d.externalLinkTarget,d.externalLinkRel=void 0===d.externalLinkRel?i.DEFAULT_LINK_REL:d.externalLinkRel,d.isEvalSupported=void 0===d.isEvalSupported||d.isEvalSupported,d.pdfjsNext=void 0!==d.pdfjsNext&&d.pdfjsNext;var f=d.openExternalLinksInNewWindow;delete d.openExternalLinksInNewWindow,Object.defineProperty(d,"openExternalLinksInNewWindow",{get:function(){return d.externalLinkTarget===i.LinkTarget.BLANK},set:function(e){e&&(0,a.deprecated)('PDFJS.openExternalLinksInNewWindow, please use "PDFJS.externalLinkTarget = PDFJS.LinkTarget.BLANK" instead.'),d.externalLinkTarget===i.LinkTarget.NONE?d.externalLinkTarget=e?i.LinkTarget.BLANK:i.LinkTarget.NONE:(0,a.warn)("PDFJS.externalLinkTarget is already initialized")},enumerable:!0,configurable:!0}),f&&(d.openExternalLinksInNewWindow=f),d.getDocument=n.getDocument,d.LoopbackPort=n.LoopbackPort,d.PDFDataRangeTransport=n.PDFDataRangeTransport,d.PDFWorker=n.PDFWorker,d.hasCanvasTypedArrays=!0,d.CustomStyle=i.CustomStyle,d.LinkTarget=i.LinkTarget,d.addLinkAttributes=i.addLinkAttributes,d.getFilenameFromUrl=i.getFilenameFromUrl,d.isExternalLinkTargetSet=i.isExternalLinkTargetSet,d.AnnotationLayer=o.AnnotationLayer,d.renderTextLayer=u.renderTextLayer,d.Metadata=l.Metadata,d.SVGGraphics=c.SVGGraphics,d.UnsupportedManager=n._UnsupportedManager,t.globalScope=s.default,t.isWorker=h,t.PDFJS=d},function(e,t,r){"use strict";function n(e){this.docId=e,this.styleElement=null,this.nativeFontFaces=[],this.loadTestFontId=0,this.loadingContext={requests:[],nextRequestId:0}}Object.defineProperty(t,"__esModule",{value:!0}),t.FontLoader=t.FontFaceObject=void 0;var i=r(0);n.prototype={insertRule:function(e){var t=this.styleElement;t||((t=this.styleElement=document.createElement("style")).id="PDFJS_FONT_STYLE_TAG_"+this.docId,document.documentElement.getElementsByTagName("head")[0].appendChild(t));var r=t.sheet;r.insertRule(e,r.cssRules.length)},clear:function(){this.styleElement&&(this.styleElement.remove(),this.styleElement=null),this.nativeFontFaces.forEach(function(e){document.fonts.delete(e)}),this.nativeFontFaces.length=0}};var a=function(){return atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwAAACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAAAAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==")};Object.defineProperty(n.prototype,"loadTestFont",{get:function(){return(0,i.shadow)(this,"loadTestFont",a())},configurable:!0}),n.prototype.addNativeFontFace=function(e){this.nativeFontFaces.push(e),document.fonts.add(e)},n.prototype.bind=function(e,t){for(var r=[],a=[],o=[],s=n.isFontLoadingAPISupported&&!n.isSyncFontLoadingSupported,l=0,u=e.length;l<u;l++){var c=e[l];if(!c.attached&&!1!==c.loading)if(c.attached=!0,s){var h=c.createNativeFontFace();h&&(this.addNativeFontFace(h),o.push(function(e){return e.loaded.catch(function(t){(0,i.warn)('Failed to load font "'+e.family+'": '+t)})}(h)))}else{var d=c.createFontFaceRule();d&&(this.insertRule(d),r.push(d),a.push(c))}}var f=this.queueLoadingCallback(t);s?Promise.all(o).then(function(){f.complete()}):r.length>0&&!n.isSyncFontLoadingSupported?this.prepareFontLoadEvent(r,a,f):f.complete()},n.prototype.queueLoadingCallback=function(e){var t=this.loadingContext,r={id:"pdfjs-font-loading-"+t.nextRequestId++,complete:function(){for((0,i.assert)(!r.end,"completeRequest() cannot be called twice"),r.end=Date.now();t.requests.length>0&&t.requests[0].end;){var e=t.requests.shift();setTimeout(e.callback,0)}},callback:e,started:Date.now()};return t.requests.push(r),r},n.prototype.prepareFontLoadEvent=function(e,t,r){function n(e,t){return e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|255&e.charCodeAt(t+3)}function a(e,t,r,n){return e.substr(0,t)+n+e.substr(t+r)}function o(e,t){if(++h>30)return(0,i.warn)("Load test font never loaded."),void t();c.font="30px "+e,c.fillText(".",0,20),c.getImageData(0,0,1,1).data[3]>0?t():setTimeout(o.bind(null,e,t))}var s,l,u=document.createElement("canvas");u.width=1,u.height=1;var c=u.getContext("2d"),h=0,d="lt"+Date.now()+this.loadTestFontId++,f=this.loadTestFont,p=n(f=a(f,976,d.length,d),16);for(s=0,l=d.length-3;s<l;s+=4)p=p-1482184792+n(d,s)|0;s<d.length&&(p=p-1482184792+n(d+"XXX",s)|0),f=a(f,16,4,(0,i.string32)(p));var m='@font-face { font-family:"'+d+'";src:'+("url(data:font/opentype;base64,"+btoa(f)+");")+"}";this.insertRule(m);var g=[];for(s=0,l=t.length;s<l;s++)g.push(t[s].loadedName);g.push(d);var v=document.createElement("div");for(v.setAttribute("style","visibility: hidden;width: 10px; height: 10px;position: absolute; top: 0px; left: 0px;"),s=0,l=g.length;s<l;++s){var b=document.createElement("span");b.textContent="Hi",b.style.fontFamily=g[s],v.appendChild(b)}document.body.appendChild(v),o(d,function(){document.body.removeChild(v),r.complete()})},n.isFontLoadingAPISupported="undefined"!=typeof document&&!!document.fonts;var o=function(){if("undefined"==typeof navigator)return!0;var e=!1,t=/Mozilla\/5.0.*?rv:(\d+).*? Gecko/.exec(navigator.userAgent);return t&&t[1]>=14&&(e=!0),e};Object.defineProperty(n,"isSyncFontLoadingSupported",{get:function(){return(0,i.shadow)(n,"isSyncFontLoadingSupported",o())},enumerable:!0,configurable:!0});var s={get value(){return(0,i.shadow)(this,"value",(0,i.isEvalSupported)())}},l=function(){function e(e,t){this.compiledGlyphs=Object.create(null);for(var r in e)this[r]=e[r];this.options=t}return e.prototype={createNativeFontFace:function(){if(!this.data)return null;if(this.options.disableFontFace)return this.disableFontFace=!0,null;var e=new FontFace(this.loadedName,this.data,{});return this.options.fontRegistry&&this.options.fontRegistry.registerFont(this),e},createFontFaceRule:function(){if(!this.data)return null;if(this.options.disableFontFace)return this.disableFontFace=!0,null;var e=(0,i.bytesToString)(new Uint8Array(this.data)),t=this.loadedName,r="url(data:"+this.mimetype+";base64,"+btoa(e)+");",n='@font-face { font-family:"'+t+'";src:'+r+"}";return this.options.fontRegistry&&this.options.fontRegistry.registerFont(this,r),n},getPathGenerator:function(e,t){if(!(t in this.compiledGlyphs)){var r,n,i,a=e.get(this.loadedName+"_path_"+t);if(this.options.isEvalSupported&&s.value){var o,l="";for(n=0,i=a.length;n<i;n++)o=void 0!==(r=a[n]).args?r.args.join(","):"",l+="c."+r.cmd+"("+o+");\n";this.compiledGlyphs[t]=new Function("c","size",l)}else this.compiledGlyphs[t]=function(e,t){for(n=0,i=a.length;n<i;n++)"scale"===(r=a[n]).cmd&&(r.args=[t,-t]),e[r.cmd].apply(e,r.args)}}return this.compiledGlyphs[t]}},e}();t.FontFaceObject=l,t.FontLoader=n},function(e,t,r){"use strict";function n(e){e.mozCurrentTransform||(e._originalSave=e.save,e._originalRestore=e.restore,e._originalRotate=e.rotate,e._originalScale=e.scale,e._originalTranslate=e.translate,e._originalTransform=e.transform,e._originalSetTransform=e.setTransform,e._transformMatrix=e._transformMatrix||[1,0,0,1,0,0],e._transformStack=[],Object.defineProperty(e,"mozCurrentTransform",{get:function(){return this._transformMatrix}}),Object.defineProperty(e,"mozCurrentTransformInverse",{get:function(){var e=this._transformMatrix,t=e[0],r=e[1],n=e[2],i=e[3],a=e[4],o=e[5],s=t*i-r*n,l=r*n-t*i;return[i/s,r/l,n/l,t/s,(i*a-n*o)/l,(r*a-t*o)/s]}}),e.save=function(){var e=this._transformMatrix;this._transformStack.push(e),this._transformMatrix=e.slice(0,6),this._originalSave()},e.restore=function(){var e=this._transformStack.pop();e&&(this._transformMatrix=e,this._originalRestore())},e.translate=function(e,t){var r=this._transformMatrix;r[4]=r[0]*e+r[2]*t+r[4],r[5]=r[1]*e+r[3]*t+r[5],this._originalTranslate(e,t)},e.scale=function(e,t){var r=this._transformMatrix;r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*t,r[3]=r[3]*t,this._originalScale(e,t)},e.transform=function(t,r,n,i,a,o){var s=this._transformMatrix;this._transformMatrix=[s[0]*t+s[2]*r,s[1]*t+s[3]*r,s[0]*n+s[2]*i,s[1]*n+s[3]*i,s[0]*a+s[2]*o+s[4],s[1]*a+s[3]*o+s[5]],e._originalTransform(t,r,n,i,a,o)},e.setTransform=function(t,r,n,i,a,o){this._transformMatrix=[t,r,n,i,a,o],e._originalSetTransform(t,r,n,i,a,o)},e.rotate=function(e){var t=Math.cos(e),r=Math.sin(e),n=this._transformMatrix;this._transformMatrix=[n[0]*t+n[2]*r,n[1]*t+n[3]*r,n[0]*-r+n[2]*t,n[1]*-r+n[3]*t,n[4],n[5]],this._originalRotate(e)})}function i(e){var t,r,n,i,a=e.width,o=e.height,s=a+1,l=new Uint8Array(s*(o+1)),u=new Uint8Array([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),c=a+7&-8,h=e.data,d=new Uint8Array(c*o),f=0;for(t=0,i=h.length;t<i;t++)for(var p=128,m=h[t];p>0;)d[f++]=m&p?0:255,p>>=1;var g=0;for(0!==d[f=0]&&(l[0]=1,++g),r=1;r<a;r++)d[f]!==d[f+1]&&(l[r]=d[f]?2:1,++g),f++;for(0!==d[f]&&(l[r]=2,++g),t=1;t<o;t++){n=t*s,d[(f=t*c)-c]!==d[f]&&(l[n]=d[f]?1:8,++g);var v=(d[f]?4:0)+(d[f-c]?8:0);for(r=1;r<a;r++)u[v=(v>>2)+(d[f+1]?4:0)+(d[f-c+1]?8:0)]&&(l[n+r]=u[v],++g),f++;if(d[f-c]!==d[f]&&(l[n+r]=d[f]?2:4,++g),g>1e3)return null}for(n=t*s,0!==d[f=c*(o-1)]&&(l[n]=8,++g),r=1;r<a;r++)d[f]!==d[f+1]&&(l[n+r]=d[f]?4:8,++g),f++;if(0!==d[f]&&(l[n+r]=4,++g),g>1e3)return null;var b=new Int32Array([0,s,-1,0,-s,0,0,0,1]),_=[];for(t=0;g&&t<=o;t++){for(var y=t*s,A=y+a;y<A&&!l[y];)y++;if(y!==A){var S,w=[y%s,t],P=l[y],R=y;do{var C=b[P];do{y+=C}while(!l[y]);5!==(S=l[y])&&10!==S?(P=S,l[y]=0):(P=S&51*P>>4,l[y]&=P>>2|P<<2),w.push(y%s),w.push(y/s|0),--g}while(R!==y);_.push(w),--t}}return function(e){e.save(),e.scale(1/a,-1/o),e.translate(0,-o),e.beginPath();for(var t=0,r=_.length;t<r;t++){var n=_[t];e.moveTo(n[0],n[1]);for(var i=2,s=n.length;i<s;i+=2)e.lineTo(n[i],n[i+1])}e.fill(),e.beginPath(),e.restore()}}Object.defineProperty(t,"__esModule",{value:!0}),t.CanvasGraphics=void 0;var a=r(0),o=r(85),s=r(49),l=16,u={get value(){return(0,a.shadow)(u,"value",(0,a.isLittleEndian)())}},c=function(){function e(e){this.canvasFactory=e,this.cache=Object.create(null)}return e.prototype={getCanvas:function(e,t,r,i){var a;return void 0!==this.cache[e]?(a=this.cache[e],this.canvasFactory.reset(a,t,r),a.context.setTransform(1,0,0,1,0,0)):(a=this.canvasFactory.create(t,r),this.cache[e]=a),i&&n(a.context),a},clear:function(){for(var e in this.cache){var t=this.cache[e];this.canvasFactory.destroy(t),delete this.cache[e]}}},e}(),h=function(){function e(){this.alphaIsShape=!1,this.fontSize=0,this.fontSizeScale=1,this.textMatrix=a.IDENTITY_MATRIX,this.textMatrixScale=1,this.fontMatrix=a.FONT_IDENTITY_MATRIX,this.leading=0,this.x=0,this.y=0,this.lineX=0,this.lineY=0,this.charSpacing=0,this.wordSpacing=0,this.textHScale=1,this.textRenderingMode=a.TextRenderingMode.FILL,this.textRise=0,this.fillColor="#000000",this.strokeColor="#000000",this.patternFill=!1,this.fillAlpha=1,this.strokeAlpha=1,this.lineWidth=1,this.activeSMask=null,this.resumeSMaskCtx=null}return e.prototype={clone:function(){return Object.create(this)},setCurrentPoint:function(e,t){this.x=e,this.y=t}},e}(),d=function(){function e(e,t,r,i,a){this.ctx=e,this.current=new h,this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=t,this.objs=r,this.canvasFactory=i,this.imageLayer=a,this.groupStack=[],this.processingType3=null,this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.cachedCanvases=new c(this.canvasFactory),e&&n(e),this.cachedGetSinglePixelWidth=null}function t(e,t){if("undefined"!=typeof ImageData&&t instanceof ImageData)e.putImageData(t,0,0);else{var r,n,i,o,s,c=t.height,h=t.width,d=c%l,f=(c-d)/l,p=0===d?f:f+1,m=e.createImageData(h,l),g=0,v=t.data,b=m.data;if(t.kind===a.ImageKind.GRAYSCALE_1BPP){var _=v.byteLength,y=new Uint32Array(b.buffer,0,b.byteLength>>2),A=y.length,S=h+7>>3,w=4294967295,P=u.value?4278190080:255;for(n=0;n<p;n++){for(o=n<f?l:d,r=0,i=0;i<o;i++){for(var R=_-g,C=0,k=R>S?h:8*R-7,x=-8&k,T=0,E=0;C<x;C+=8)E=v[g++],y[r++]=128&E?w:P,y[r++]=64&E?w:P,y[r++]=32&E?w:P,y[r++]=16&E?w:P,y[r++]=8&E?w:P,y[r++]=4&E?w:P,y[r++]=2&E?w:P,y[r++]=1&E?w:P;for(;C<k;C++)0===T&&(E=v[g++],T=128),y[r++]=E&T?w:P,T>>=1}for(;r<A;)y[r++]=0;e.putImageData(m,0,n*l)}}else if(t.kind===a.ImageKind.RGBA_32BPP){for(i=0,s=h*l*4,n=0;n<f;n++)b.set(v.subarray(g,g+s)),g+=s,e.putImageData(m,0,i),i+=l;n<p&&(s=h*d*4,b.set(v.subarray(g,g+s)),e.putImageData(m,0,i))}else{if(t.kind!==a.ImageKind.RGB_24BPP)throw new Error("bad image kind: "+t.kind);for(s=h*(o=l),n=0;n<p;n++){for(n>=f&&(s=h*(o=d)),r=0,i=s;i--;)b[r++]=v[g++],b[r++]=v[g++],b[r++]=v[g++],b[r++]=255;e.putImageData(m,0,n*l)}}}}function r(e,t){for(var r=t.height,n=t.width,i=r%l,a=(r-i)/l,o=0===i?a:a+1,s=e.createImageData(n,l),u=0,c=t.data,h=s.data,d=0;d<o;d++){for(var f=d<a?l:i,p=3,m=0;m<f;m++)for(var g=0,v=0;v<n;v++){if(!g){var b=c[u++];g=128}h[p]=b&g?0:255,p+=4,g>>=1}e.putImageData(s,0,d*l)}}function d(e,t){for(var r=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth","lineCap","lineJoin","miterLimit","globalCompositeOperation","font"],n=0,i=r.length;n<i;n++){var a=r[n];void 0!==e[a]&&(t[a]=e[a])}void 0!==e.setLineDash&&(t.setLineDash(e.getLineDash()),t.lineDashOffset=e.lineDashOffset)}function f(e){e.strokeStyle="#000000",e.fillStyle="#000000",e.fillRule="nonzero",e.globalAlpha=1,e.lineWidth=1,e.lineCap="butt",e.lineJoin="miter",e.miterLimit=10,e.globalCompositeOperation="source-over",e.font="10px sans-serif",void 0!==e.setLineDash&&(e.setLineDash([]),e.lineDashOffset=0)}function p(e,t,r,n){for(var i=e.length,a=3;a<i;a+=4){var o=e[a];if(0===o)e[a-3]=t,e[a-2]=r,e[a-1]=n;else if(o<255){var s=255-o;e[a-3]=e[a-3]*o+t*s>>8,e[a-2]=e[a-2]*o+r*s>>8,e[a-1]=e[a-1]*o+n*s>>8}}}function m(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=r?r[e[i]]:e[i];t[i]=t[i]*a*(1/255)|0}}function g(e,t,r){for(var n=e.length,i=3;i<n;i+=4){var a=77*e[i-3]+152*e[i-2]+28*e[i-1];t[i]=r?t[i]*r[a>>8]>>8:t[i]*a>>16}}function v(e,t,r,n,i,a,o){var s,l=!!a,u=l?a[0]:0,c=l?a[1]:0,h=l?a[2]:0;s="Luminosity"===i?g:m;for(var d=Math.min(n,Math.ceil(1048576/r)),f=0;f<n;f+=d){var v=Math.min(d,n-f),b=e.getImageData(0,f,r,v),_=t.getImageData(0,f,r,v);l&&p(b.data,u,c,h),s(b.data,_.data,o),e.putImageData(_,0,f)}}function b(e,t,r){var n=t.canvas,i=t.context;e.setTransform(t.scaleX,0,0,t.scaleY,t.offsetX,t.offsetY);var a=t.backdrop||null;if(!t.transferMap&&s.WebGLUtils.isEnabled){var o=s.WebGLUtils.composeSMask(r.canvas,n,{subtype:t.subtype,backdrop:a});return e.setTransform(1,0,0,1,0,0),void e.drawImage(o,t.offsetX,t.offsetY)}v(i,r,n.width,n.height,t.subtype,a,t.transferMap),e.drawImage(n,0,0)}var _=["butt","round","square"],y=["miter","round","bevel"],A={},S={};e.prototype={beginDrawing:function(e){var t=e.transform,r=e.viewport,n=e.transparency,i=e.background,a=void 0===i?null:i,o=this.ctx.canvas.width,s=this.ctx.canvas.height;if(this.ctx.save(),this.ctx.fillStyle=a||"rgb(255, 255, 255)",this.ctx.fillRect(0,0,o,s),this.ctx.restore(),n){var l=this.cachedCanvases.getCanvas("transparent",o,s,!0);this.compositeCtx=this.ctx,this.transparentCanvas=l.canvas,this.ctx=l.context,this.ctx.save(),this.ctx.transform.apply(this.ctx,this.compositeCtx.mozCurrentTransform)}this.ctx.save(),f(this.ctx),t&&this.ctx.transform.apply(this.ctx,t),this.ctx.transform.apply(this.ctx,r.transform),this.baseTransform=this.ctx.mozCurrentTransform.slice(),this.imageLayer&&this.imageLayer.beginLayout()},executeOperatorList:function(e,t,r,n){var i=e.argsArray,o=e.fnArray,s=t||0,l=i.length;if(l===s)return s;for(var u,c=l-s>10&&"function"==typeof r,h=c?Date.now()+15:0,d=0,f=this.commonObjs,p=this.objs;;){if(void 0!==n&&s===n.nextBreakPoint)return n.breakIt(s,r),s;if((u=o[s])!==a.OPS.dependency)this[u].apply(this,i[s]);else for(var m=i[s],g=0,v=m.length;g<v;g++){var b=m[g],_="g"===b[0]&&"_"===b[1]?f:p;if(!_.isResolved(b))return _.get(b,r),s}if(++s===l)return s;if(c&&++d>10){if(Date.now()>h)return r(),s;d=0}}},endDrawing:function(){null!==this.current.activeSMask&&this.endSMaskGroup(),this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null),this.cachedCanvases.clear(),s.WebGLUtils.clear(),this.imageLayer&&this.imageLayer.endLayout()},setLineWidth:function(e){this.current.lineWidth=e,this.ctx.lineWidth=e},setLineCap:function(e){this.ctx.lineCap=_[e]},setLineJoin:function(e){this.ctx.lineJoin=y[e]},setMiterLimit:function(e){this.ctx.miterLimit=e},setDash:function(e,t){var r=this.ctx;void 0!==r.setLineDash&&(r.setLineDash(e),r.lineDashOffset=t)},setRenderingIntent:function(e){},setFlatness:function(e){},setGState:function(e){for(var t=0,r=e.length;t<r;t++){var n=e[t],i=n[0],a=n[1];switch(i){case"LW":this.setLineWidth(a);break;case"LC":this.setLineCap(a);break;case"LJ":this.setLineJoin(a);break;case"ML":this.setMiterLimit(a);break;case"D":this.setDash(a[0],a[1]);break;case"RI":this.setRenderingIntent(a);break;case"FL":this.setFlatness(a);break;case"Font":this.setFont(a[0],a[1]);break;case"CA":this.current.strokeAlpha=n[1];break;case"ca":this.current.fillAlpha=n[1],this.ctx.globalAlpha=n[1];break;case"BM":this.ctx.globalCompositeOperation=a;break;case"SMask":this.current.activeSMask&&(this.stateStack.length>0&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask?this.suspendSMaskGroup():this.endSMaskGroup()),this.current.activeSMask=a?this.tempSMask:null,this.current.activeSMask&&this.beginSMaskGroup(),this.tempSMask=null}}},beginSMaskGroup:function(){var e=this.current.activeSMask,t=e.canvas.width,r=e.canvas.height,n="smaskGroupAt"+this.groupLevel,i=this.cachedCanvases.getCanvas(n,t,r,!0),a=this.ctx,o=a.mozCurrentTransform;this.ctx.save();var s=i.context;s.scale(1/e.scaleX,1/e.scaleY),s.translate(-e.offsetX,-e.offsetY),s.transform.apply(s,o),e.startTransformInverse=s.mozCurrentTransformInverse,d(a,s),this.ctx=s,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(a),this.groupLevel++},suspendSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),b(this.ctx,this.current.activeSMask,e),this.ctx.restore(),this.ctx.save(),d(e,this.ctx),this.current.resumeSMaskCtx=e;var t=a.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t),e.save(),e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,e.canvas.width,e.canvas.height),e.restore()},resumeSMaskGroup:function(){var e=this.current.resumeSMaskCtx,t=this.ctx;this.ctx=e,this.groupStack.push(t),this.groupLevel++},endSMaskGroup:function(){var e=this.ctx;this.groupLevel--,this.ctx=this.groupStack.pop(),b(this.ctx,this.current.activeSMask,e),this.ctx.restore(),d(e,this.ctx);var t=a.Util.transform(this.current.activeSMask.startTransformInverse,e.mozCurrentTransform);this.ctx.transform.apply(this.ctx,t)},save:function(){this.ctx.save();var e=this.current;this.stateStack.push(e),this.current=e.clone(),this.current.resumeSMaskCtx=null},restore:function(){this.current.resumeSMaskCtx&&this.resumeSMaskGroup(),null===this.current.activeSMask||0!==this.stateStack.length&&this.stateStack[this.stateStack.length-1].activeSMask===this.current.activeSMask||this.endSMaskGroup(),0!==this.stateStack.length&&(this.current=this.stateStack.pop(),this.ctx.restore(),this.pendingClip=null,this.cachedGetSinglePixelWidth=null)},transform:function(e,t,r,n,i,a){this.ctx.transform(e,t,r,n,i,a),this.cachedGetSinglePixelWidth=null},constructPath:function(e,t){for(var r=this.ctx,n=this.current,i=n.x,o=n.y,s=0,l=0,u=e.length;s<u;s++)switch(0|e[s]){case a.OPS.rectangle:i=t[l++],o=t[l++];var c=t[l++],h=t[l++];0===c&&(c=this.getSinglePixelWidth()),0===h&&(h=this.getSinglePixelWidth());var d=i+c,f=o+h;this.ctx.moveTo(i,o),this.ctx.lineTo(d,o),this.ctx.lineTo(d,f),this.ctx.lineTo(i,f),this.ctx.lineTo(i,o),this.ctx.closePath();break;case a.OPS.moveTo:i=t[l++],o=t[l++],r.moveTo(i,o);break;case a.OPS.lineTo:i=t[l++],o=t[l++],r.lineTo(i,o);break;case a.OPS.curveTo:i=t[l+4],o=t[l+5],r.bezierCurveTo(t[l],t[l+1],t[l+2],t[l+3],i,o),l+=6;break;case a.OPS.curveTo2:r.bezierCurveTo(i,o,t[l],t[l+1],t[l+2],t[l+3]),i=t[l+2],o=t[l+3],l+=4;break;case a.OPS.curveTo3:i=t[l+2],o=t[l+3],r.bezierCurveTo(t[l],t[l+1],i,o,i,o),l+=4;break;case a.OPS.closePath:r.closePath()}n.setCurrentPoint(i,o)},closePath:function(){this.ctx.closePath()},stroke:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.strokeColor;t.lineWidth=Math.max(.65*this.getSinglePixelWidth(),this.current.lineWidth),t.globalAlpha=this.current.strokeAlpha,r&&r.hasOwnProperty("type")&&"Pattern"===r.type?(t.save(),t.strokeStyle=r.getPattern(t,this),t.stroke(),t.restore()):t.stroke(),e&&this.consumePath(),t.globalAlpha=this.current.fillAlpha},closeStroke:function(){this.closePath(),this.stroke()},fill:function(e){e=void 0===e||e;var t=this.ctx,r=this.current.fillColor,n=!1;this.current.patternFill&&(t.save(),this.baseTransform&&t.setTransform.apply(t,this.baseTransform),t.fillStyle=r.getPattern(t,this),n=!0),this.pendingEOFill?(t.fill("evenodd"),this.pendingEOFill=!1):t.fill(),n&&t.restore(),e&&this.consumePath()},eoFill:function(){this.pendingEOFill=!0,this.fill()},fillStroke:function(){this.fill(!1),this.stroke(!1),this.consumePath()},eoFillStroke:function(){this.pendingEOFill=!0,this.fillStroke()},closeFillStroke:function(){this.closePath(),this.fillStroke()},closeEOFillStroke:function(){this.pendingEOFill=!0,this.closePath(),this.fillStroke()},endPath:function(){this.consumePath()},clip:function(){this.pendingClip=A},eoClip:function(){this.pendingClip=S},beginText:function(){this.current.textMatrix=a.IDENTITY_MATRIX,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},endText:function(){var e=this.pendingTextPaths,t=this.ctx;if(void 0!==e){t.save(),t.beginPath();for(var r=0;r<e.length;r++){var n=e[r];t.setTransform.apply(t,n.transform),t.translate(n.x,n.y),n.addToPath(t,n.fontSize)}t.restore(),t.clip(),t.beginPath(),delete this.pendingTextPaths}else t.beginPath()},setCharSpacing:function(e){this.current.charSpacing=e},setWordSpacing:function(e){this.current.wordSpacing=e},setHScale:function(e){this.current.textHScale=e/100},setLeading:function(e){this.current.leading=-e},setFont:function(e,t){var r=this.commonObjs.get(e),n=this.current;if(!r)throw new Error("Can't find font for "+e);if(n.fontMatrix=r.fontMatrix?r.fontMatrix:a.FONT_IDENTITY_MATRIX,0!==n.fontMatrix[0]&&0!==n.fontMatrix[3]||(0,a.warn)("Invalid font matrix for font "+e),t<0?(t=-t,n.fontDirection=-1):n.fontDirection=1,this.current.font=r,this.current.fontSize=t,!r.isType3Font){var i=r.loadedName||"sans-serif",o=r.black?"900":r.bold?"bold":"normal",s=r.italic?"italic":"normal",l='"'+i+'", '+r.fallbackName,u=t<16?16:t>100?100:t;this.current.fontSizeScale=t/u;var c=s+" "+o+" "+u+"px "+l;this.ctx.font=c}},setTextRenderingMode:function(e){this.current.textRenderingMode=e},setTextRise:function(e){this.current.textRise=e},moveText:function(e,t){this.current.x=this.current.lineX+=e,this.current.y=this.current.lineY+=t},setLeadingMoveText:function(e,t){this.setLeading(-t),this.moveText(e,t)},setTextMatrix:function(e,t,r,n,i,a){this.current.textMatrix=[e,t,r,n,i,a],this.current.textMatrixScale=Math.sqrt(e*e+t*t),this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0},nextLine:function(){this.moveText(0,this.current.leading)},paintChar:function(e,t,r){var n,i=this.ctx,o=this.current,s=o.font,l=o.textRenderingMode,u=o.fontSize/o.fontSizeScale,c=l&a.TextRenderingMode.FILL_STROKE_MASK,h=!!(l&a.TextRenderingMode.ADD_TO_PATH_FLAG);(s.disableFontFace||h)&&(n=s.getPathGenerator(this.commonObjs,e)),s.disableFontFace?(i.save(),i.translate(t,r),i.beginPath(),n(i,u),c!==a.TextRenderingMode.FILL&&c!==a.TextRenderingMode.FILL_STROKE||i.fill(),c!==a.TextRenderingMode.STROKE&&c!==a.TextRenderingMode.FILL_STROKE||i.stroke(),i.restore()):(c!==a.TextRenderingMode.FILL&&c!==a.TextRenderingMode.FILL_STROKE||i.fillText(e,t,r),c!==a.TextRenderingMode.STROKE&&c!==a.TextRenderingMode.FILL_STROKE||i.strokeText(e,t,r)),h&&(this.pendingTextPaths||(this.pendingTextPaths=[])).push({transform:i.mozCurrentTransform,x:t,y:r,fontSize:u,addToPath:n})},get isFontSubpixelAAEnabled(){var e=this.canvasFactory.create(10,10).context;e.scale(1.5,1),e.fillText("I",0,10);for(var t=e.getImageData(0,0,10,10).data,r=!1,n=3;n<t.length;n+=4)if(t[n]>0&&t[n]<255){r=!0;break}return(0,a.shadow)(this,"isFontSubpixelAAEnabled",r)},showText:function(e){var t=this.current,r=t.font;if(r.isType3Font)return this.showType3Text(e);var n=t.fontSize;if(0!==n){var i=this.ctx,o=t.fontSizeScale,s=t.charSpacing,l=t.wordSpacing,u=t.fontDirection,c=t.textHScale*u,h=e.length,d=r.vertical,f=d?1:-1,p=r.defaultVMetrics,m=n*t.fontMatrix[0],g=t.textRenderingMode===a.TextRenderingMode.FILL&&!r.disableFontFace;i.save(),i.transform.apply(i,t.textMatrix),i.translate(t.x,t.y+t.textRise),t.patternFill&&(i.fillStyle=t.fillColor.getPattern(i,this)),u>0?i.scale(c,-1):i.scale(c,1);var v=t.lineWidth,b=t.textMatrixScale;if(0===b||0===v){var _=t.textRenderingMode&a.TextRenderingMode.FILL_STROKE_MASK;_!==a.TextRenderingMode.STROKE&&_!==a.TextRenderingMode.FILL_STROKE||(this.cachedGetSinglePixelWidth=null,v=.65*this.getSinglePixelWidth())}else v/=b;1!==o&&(i.scale(o,o),v/=o),i.lineWidth=v;var y,A=0;for(y=0;y<h;++y){var S=e[y];if((0,a.isNum)(S))A+=f*S*n/1e3;else{var w,P,R,C,k=!1,x=(S.isSpace?l:0)+s,T=S.fontChar,E=S.accent,O=S.width;if(d){var I,L,D;I=S.vmetric||p,L=-(L=S.vmetric?I[1]:.5*O)*m,D=I[2]*m,O=I?-I[0]:O,w=L/o,P=(A+D)/o}else w=A/o,P=0;if(r.remeasure&&O>0){var F=1e3*i.measureText(T).width/n*o;if(O<F&&this.isFontSubpixelAAEnabled){var j=O/F;k=!0,i.save(),i.scale(j,1),w/=j}else O!==F&&(w+=(O-F)/2e3*n/o)}(S.isInFont||r.missingFile)&&(g&&!E?i.fillText(T,w,P):(this.paintChar(T,w,P),E&&(R=w+E.offset.x/o,C=P-E.offset.y/o,this.paintChar(E.fontChar,R,C)))),A+=O*m+x*u,k&&i.restore()}}d?t.y-=A*c:t.x+=A*c,i.restore()}},showType3Text:function(e){var t,r,n,i,o=this.ctx,s=this.current,l=s.font,u=s.fontSize,c=s.fontDirection,h=l.vertical?1:-1,d=s.charSpacing,f=s.wordSpacing,p=s.textHScale*c,m=s.fontMatrix||a.FONT_IDENTITY_MATRIX,g=e.length;if(!(s.textRenderingMode===a.TextRenderingMode.INVISIBLE)&&0!==u){for(this.cachedGetSinglePixelWidth=null,o.save(),o.transform.apply(o,s.textMatrix),o.translate(s.x,s.y),o.scale(p,c),t=0;t<g;++t)if(r=e[t],(0,a.isNum)(r))i=h*r*u/1e3,this.ctx.translate(i,0),s.x+=i*p;else{var v=(r.isSpace?f:0)+d,b=l.charProcOperatorList[r.operatorListId];b?(this.processingType3=r,this.save(),o.scale(u,u),o.transform.apply(o,m),this.executeOperatorList(b),this.restore(),n=a.Util.applyTransform([r.width,0],m)[0]*u+v,o.translate(n,0),s.x+=n*p):(0,a.warn)('Type3 character "'+r.operatorListId+'" is not available.')}o.restore(),this.processingType3=null}},setCharWidth:function(e,t){},setCharWidthAndBounds:function(e,t,r,n,i,a){this.ctx.rect(r,n,i-r,a-n),this.clip(),this.endPath()},getColorN_Pattern:function(t){var r,n=this;if("TilingPattern"===t[0]){var i=t[1],a=this.baseTransform||this.ctx.mozCurrentTransform.slice(),s={createCanvasGraphics:function(t){return new e(t,n.commonObjs,n.objs,n.canvasFactory)}};r=new o.TilingPattern(t,i,this.ctx,s,a)}else r=(0,o.getShadingPatternFromIR)(t);return r},setStrokeColorN:function(){this.current.strokeColor=this.getColorN_Pattern(arguments)},setFillColorN:function(){this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0},setStrokeRGBColor:function(e,t,r){var n=a.Util.makeCssRgb(e,t,r);this.ctx.strokeStyle=n,this.current.strokeColor=n},setFillRGBColor:function(e,t,r){var n=a.Util.makeCssRgb(e,t,r);this.ctx.fillStyle=n,this.current.fillColor=n,this.current.patternFill=!1},shadingFill:function(e){var t=this.ctx;this.save();var r=(0,o.getShadingPatternFromIR)(e);t.fillStyle=r.getPattern(t,this,!0);var n=t.mozCurrentTransformInverse;if(n){var i=t.canvas,s=i.width,l=i.height,u=a.Util.applyTransform([0,0],n),c=a.Util.applyTransform([0,l],n),h=a.Util.applyTransform([s,0],n),d=a.Util.applyTransform([s,l],n),f=Math.min(u[0],c[0],h[0],d[0]),p=Math.min(u[1],c[1],h[1],d[1]),m=Math.max(u[0],c[0],h[0],d[0]),g=Math.max(u[1],c[1],h[1],d[1]);this.ctx.fillRect(f,p,m-f,g-p)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.restore()},beginInlineImage:function(){throw new Error("Should not call beginInlineImage")},beginImageData:function(){throw new Error("Should not call beginImageData")},paintFormXObjectBegin:function(e,t){if(this.save(),this.baseTransformStack.push(this.baseTransform),(0,a.isArray)(e)&&6===e.length&&this.transform.apply(this,e),this.baseTransform=this.ctx.mozCurrentTransform,(0,a.isArray)(t)&&4===t.length){var r=t[2]-t[0],n=t[3]-t[1];this.ctx.rect(t[0],t[1],r,n),this.clip(),this.endPath()}},paintFormXObjectEnd:function(){this.restore(),this.baseTransform=this.baseTransformStack.pop()},beginGroup:function(e){this.save();var t=this.ctx;e.isolated||(0,a.info)("TODO: Support non-isolated groups."),e.knockout&&(0,a.warn)("Knockout groups not supported.");var r=t.mozCurrentTransform;if(e.matrix&&t.transform.apply(t,e.matrix),!e.bbox)throw new Error("Bounding box is required.");var n=a.Util.getAxialAlignedBoundingBox(e.bbox,t.mozCurrentTransform),i=[0,0,t.canvas.width,t.canvas.height];n=a.Util.intersect(n,i)||[0,0,0,0];var o=Math.floor(n[0]),s=Math.floor(n[1]),l=Math.max(Math.ceil(n[2])-o,1),u=Math.max(Math.ceil(n[3])-s,1),c=1,h=1;l>4096&&(c=l/4096,l=4096),u>4096&&(h=u/4096,u=4096);var f="groupAt"+this.groupLevel;e.smask&&(f+="_smask_"+this.smaskCounter++%2);var p=this.cachedCanvases.getCanvas(f,l,u,!0),m=p.context;m.scale(1/c,1/h),m.translate(-o,-s),m.transform.apply(m,r),e.smask?this.smaskStack.push({canvas:p.canvas,context:m,offsetX:o,offsetY:s,scaleX:c,scaleY:h,subtype:e.smask.subtype,backdrop:e.smask.backdrop,transferMap:e.smask.transferMap||null,startTransformInverse:null}):(t.setTransform(1,0,0,1,0,0),t.translate(o,s),t.scale(c,h)),d(t,m),this.ctx=m,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(t),this.groupLevel++,this.current.activeSMask=null},endGroup:function(e){this.groupLevel--;var t=this.ctx;this.ctx=this.groupStack.pop(),void 0!==this.ctx.imageSmoothingEnabled?this.ctx.imageSmoothingEnabled=!1:this.ctx.mozImageSmoothingEnabled=!1,e.smask?this.tempSMask=this.smaskStack.pop():this.ctx.drawImage(t.canvas,0,0),this.restore()},beginAnnotations:function(){this.save(),this.baseTransform&&this.ctx.setTransform.apply(this.ctx,this.baseTransform)},endAnnotations:function(){this.restore()},beginAnnotation:function(e,t,r){if(this.save(),f(this.ctx),this.current=new h,(0,a.isArray)(e)&&4===e.length){var n=e[2]-e[0],i=e[3]-e[1];this.ctx.rect(e[0],e[1],n,i),this.clip(),this.endPath()}this.transform.apply(this,t),this.transform.apply(this,r)},endAnnotation:function(){this.restore()},paintJpegXObject:function(e,t,r){var n=this.objs.get(e);if(n){this.save();var i=this.ctx;if(i.scale(1/t,-1/r),i.drawImage(n,0,0,n.width,n.height,0,-r,t,r),this.imageLayer){var o=i.mozCurrentTransformInverse,s=this.getCanvasPosition(0,0);this.imageLayer.appendImage({objId:e,left:s[0],top:s[1],width:t/o[0],height:r/o[3]})}this.restore()}else(0,a.warn)("Dependent image isn't ready yet")},paintImageMaskXObject:function(e){var t=this.ctx,n=e.width,a=e.height,o=this.current.fillColor,s=this.current.patternFill,l=this.processingType3;if(l&&void 0===l.compiled&&(l.compiled=n<=1e3&&a<=1e3?i({data:e.data,width:n,height:a}):null),l&&l.compiled)l.compiled(t);else{var u=this.cachedCanvases.getCanvas("maskCanvas",n,a),c=u.context;c.save(),r(c,e),c.globalCompositeOperation="source-in",c.fillStyle=s?o.getPattern(c,this):o,c.fillRect(0,0,n,a),c.restore(),this.paintInlineImageXObject(u.canvas)}},paintImageMaskXObjectRepeat:function(e,t,n,i){var a=e.width,o=e.height,s=this.current.fillColor,l=this.current.patternFill,u=this.cachedCanvases.getCanvas("maskCanvas",a,o),c=u.context;c.save(),r(c,e),c.globalCompositeOperation="source-in",c.fillStyle=l?s.getPattern(c,this):s,c.fillRect(0,0,a,o),c.restore();for(var h=this.ctx,d=0,f=i.length;d<f;d+=2)h.save(),h.transform(t,0,0,n,i[d],i[d+1]),h.scale(1,-1),h.drawImage(u.canvas,0,0,a,o,0,-1,1,1),h.restore()},paintImageMaskXObjectGroup:function(e){for(var t=this.ctx,n=this.current.fillColor,i=this.current.patternFill,a=0,o=e.length;a<o;a++){var s=e[a],l=s.width,u=s.height,c=this.cachedCanvases.getCanvas("maskCanvas",l,u),h=c.context;h.save(),r(h,s),h.globalCompositeOperation="source-in",h.fillStyle=i?n.getPattern(h,this):n,h.fillRect(0,0,l,u),h.restore(),t.save(),t.transform.apply(t,s.transform),t.scale(1,-1),t.drawImage(c.canvas,0,0,l,u,0,-1,1,1),t.restore()}},paintImageXObject:function(e){var t=this.objs.get(e);t?this.paintInlineImageXObject(t):(0,a.warn)("Dependent image isn't ready yet")},paintImageXObjectRepeat:function(e,t,r,n){var i=this.objs.get(e);if(i){for(var o=i.width,s=i.height,l=[],u=0,c=n.length;u<c;u+=2)l.push({transform:[t,0,0,r,n[u],n[u+1]],x:0,y:0,w:o,h:s});this.paintInlineImageXObjectGroup(i,l)}else(0,a.warn)("Dependent image isn't ready yet")},paintInlineImageXObject:function(e){var r=e.width,n=e.height,i=this.ctx;this.save(),i.scale(1/r,-1/n);var a,o,s=i.mozCurrentTransformInverse,l=s[0],u=s[1],c=Math.max(Math.sqrt(l*l+u*u),1),h=s[2],d=s[3],f=Math.max(Math.sqrt(h*h+d*d),1);if(e instanceof HTMLElement||!e.data)a=e;else{var p=(o=this.cachedCanvases.getCanvas("inlineImage",r,n)).context;t(p,e),a=o.canvas}for(var m=r,g=n,v="prescale1";c>2&&m>1||f>2&&g>1;){var b=m,_=g;c>2&&m>1&&(c/=m/(b=Math.ceil(m/2))),f>2&&g>1&&(f/=g/(_=Math.ceil(g/2))),(p=(o=this.cachedCanvases.getCanvas(v,b,_)).context).clearRect(0,0,b,_),p.drawImage(a,0,0,m,g,0,0,b,_),a=o.canvas,m=b,g=_,v="prescale1"===v?"prescale2":"prescale1"}if(i.drawImage(a,0,0,m,g,0,-n,r,n),this.imageLayer){var y=this.getCanvasPosition(0,-n);this.imageLayer.appendImage({imgData:e,left:y[0],top:y[1],width:r/s[0],height:n/s[3]})}this.restore()},paintInlineImageXObjectGroup:function(e,r){var n=this.ctx,i=e.width,a=e.height,o=this.cachedCanvases.getCanvas("inlineImage",i,a);t(o.context,e);for(var s=0,l=r.length;s<l;s++){var u=r[s];if(n.save(),n.transform.apply(n,u.transform),n.scale(1,-1),n.drawImage(o.canvas,u.x,u.y,u.w,u.h,0,-1,1,1),this.imageLayer){var c=this.getCanvasPosition(u.x,u.y);this.imageLayer.appendImage({imgData:e,left:c[0],top:c[1],width:i,height:a})}n.restore()}},paintSolidColorImageMask:function(){this.ctx.fillRect(0,0,1,1)},paintXObject:function(){(0,a.warn)("Unsupported 'paintXObject' command.")},markPoint:function(e){},markPointProps:function(e,t){},beginMarkedContent:function(e){},beginMarkedContentProps:function(e,t){},endMarkedContent:function(){},beginCompat:function(){},endCompat:function(){},consumePath:function(){var e=this.ctx;this.pendingClip&&(this.pendingClip===S?e.clip("evenodd"):e.clip(),this.pendingClip=null),e.beginPath()},getSinglePixelWidth:function(e){if(null===this.cachedGetSinglePixelWidth){this.ctx.save();var t=this.ctx.mozCurrentTransformInverse;this.ctx.restore(),this.cachedGetSinglePixelWidth=Math.sqrt(Math.max(t[0]*t[0]+t[1]*t[1],t[2]*t[2]+t[3]*t[3]))}return this.cachedGetSinglePixelWidth},getCanvasPosition:function(e,t){var r=this.ctx.mozCurrentTransform;return[r[0]*e+r[2]*t+r[4],r[1]*e+r[3]*t+r[5]]}};for(var w in a.OPS)e.prototype[a.OPS[w]]=e.prototype[w];return e}();t.CanvasGraphics=d},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TilingPattern=t.getShadingPatternFromIR=void 0;var n=r(0),i=r(49),a={};a.RadialAxial={fromIR:function(e){var t=e[1],r=e[2],n=e[3],i=e[4],a=e[5],o=e[6];return{type:"Pattern",getPattern:function(e){var s;"axial"===t?s=e.createLinearGradient(n[0],n[1],i[0],i[1]):"radial"===t&&(s=e.createRadialGradient(n[0],n[1],a,i[0],i[1],o));for(var l=0,u=r.length;l<u;++l){var c=r[l];s.addColorStop(c[0],c[1])}return s}}}};var o=function(){function e(e,t,r,n,i,a,o,s){var l,u=t.coords,c=t.colors,h=e.data,d=4*e.width;u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=a,a=o,o=l),u[n+1]>u[i+1]&&(l=n,n=i,i=l,l=o,o=s,s=l),u[r+1]>u[n+1]&&(l=r,r=n,n=l,l=a,a=o,o=l);var f=(u[r]+t.offsetX)*t.scaleX,p=(u[r+1]+t.offsetY)*t.scaleY,m=(u[n]+t.offsetX)*t.scaleX,g=(u[n+1]+t.offsetY)*t.scaleY,v=(u[i]+t.offsetX)*t.scaleX,b=(u[i+1]+t.offsetY)*t.scaleY;if(!(p>=b))for(var _,y,A,S,w,P,R,C,k,x=c[a],T=c[a+1],E=c[a+2],O=c[o],I=c[o+1],L=c[o+2],D=c[s],F=c[s+1],j=c[s+2],N=Math.round(p),M=Math.round(b),q=N;q<=M;q++){q<g?(_=f-(f-m)*(k=q<p?0:p===g?1:(p-q)/(p-g)),y=x-(x-O)*k,A=T-(T-I)*k,S=E-(E-L)*k):(_=m-(m-v)*(k=q>b?1:g===b?0:(g-q)/(g-b)),y=O-(O-D)*k,A=I-(I-F)*k,S=L-(L-j)*k),w=f-(f-v)*(k=q<p?0:q>b?1:(p-q)/(p-b)),P=x-(x-D)*k,R=T-(T-F)*k,C=E-(E-j)*k;for(var W=Math.round(Math.min(_,w)),U=Math.round(Math.max(_,w)),B=d*q+4*W,z=W;z<=U;z++)k=(k=(_-z)/(_-w))<0?0:k>1?1:k,h[B++]=y-(y-P)*k|0,h[B++]=A-(A-R)*k|0,h[B++]=S-(S-C)*k|0,h[B++]=255}}function t(t,r,n){var i,a,o=r.coords,s=r.colors;switch(r.type){case"lattice":var l=r.verticesPerRow,u=Math.floor(o.length/l)-1,c=l-1;for(i=0;i<u;i++)for(var h=i*l,d=0;d<c;d++,h++)e(t,n,o[h],o[h+1],o[h+l],s[h],s[h+1],s[h+l]),e(t,n,o[h+l+1],o[h+1],o[h+l],s[h+l+1],s[h+1],s[h+l]);break;case"triangles":for(i=0,a=o.length;i<a;i+=3)e(t,n,o[i],o[i+1],o[i+2],s[i],s[i+1],s[i+2]);break;default:throw new Error("illegal figure")}}return function(e,r,n,a,o,s,l){var u,c,h,d,f=Math.floor(e[0]),p=Math.floor(e[1]),m=Math.ceil(e[2])-f,g=Math.ceil(e[3])-p,v=Math.min(Math.ceil(Math.abs(m*r[0]*1.1)),3e3),b=Math.min(Math.ceil(Math.abs(g*r[1]*1.1)),3e3),_=m/v,y=g/b,A={coords:n,colors:a,offsetX:-f,offsetY:-p,scaleX:1/_,scaleY:1/y},S=v+4,w=b+4;if(i.WebGLUtils.isEnabled)u=i.WebGLUtils.drawFigures(v,b,s,o,A),(c=l.getCanvas("mesh",S,w,!1)).context.drawImage(u,2,2),u=c.canvas;else{var P=(c=l.getCanvas("mesh",S,w,!1)).context,R=P.createImageData(v,b);if(s){var C=R.data;for(h=0,d=C.length;h<d;h+=4)C[h]=s[0],C[h+1]=s[1],C[h+2]=s[2],C[h+3]=255}for(h=0;h<o.length;h++)t(R,o[h],A);P.putImageData(R,2,2),u=c.canvas}return{canvas:u,offsetX:f-2*_,offsetY:p-2*y,scaleX:_,scaleY:y}}}();a.Mesh={fromIR:function(e){var t=e[2],r=e[3],i=e[4],a=e[5],s=e[6],l=e[8];return{type:"Pattern",getPattern:function(e,u,c){var h;if(c)h=n.Util.singularValueDecompose2dScale(e.mozCurrentTransform);else if(h=n.Util.singularValueDecompose2dScale(u.baseTransform),s){var d=n.Util.singularValueDecompose2dScale(s);h=[h[0]*d[0],h[1]*d[1]]}var f=o(a,h,t,r,i,c?null:l,u.cachedCanvases);return c||(e.setTransform.apply(e,u.baseTransform),s&&e.transform.apply(e,s)),e.translate(f.offsetX,f.offsetY),e.scale(f.scaleX,f.scaleY),e.createPattern(f.canvas,"no-repeat")}}}},a.Dummy={fromIR:function(){return{type:"Pattern",getPattern:function(){return"hotpink"}}}};var s=function(){function e(e,t,r,n,i){this.operatorList=e[2],this.matrix=e[3]||[1,0,0,1,0,0],this.bbox=e[4],this.xstep=e[5],this.ystep=e[6],this.paintType=e[7],this.tilingType=e[8],this.color=t,this.canvasGraphicsFactory=n,this.baseTransform=i,this.type="Pattern",this.ctx=r}var t={COLORED:1,UNCOLORED:2};return e.prototype={createPatternCanvas:function(e){var t=this.operatorList,r=this.bbox,i=this.xstep,a=this.ystep,o=this.paintType,s=this.tilingType,l=this.color,u=this.canvasGraphicsFactory;(0,n.info)("TilingType: "+s);var c=r[0],h=r[1],d=r[2],f=r[3],p=[c,h],m=[c+i,h+a],g=m[0]-p[0],v=m[1]-p[1],b=n.Util.singularValueDecompose2dScale(this.matrix),_=n.Util.singularValueDecompose2dScale(this.baseTransform),y=[b[0]*_[0],b[1]*_[1]];g=Math.min(Math.ceil(Math.abs(g*y[0])),3e3),v=Math.min(Math.ceil(Math.abs(v*y[1])),3e3);var A=e.cachedCanvases.getCanvas("pattern",g,v,!0),S=A.context,w=u.createCanvasGraphics(S);w.groupLevel=e.groupLevel,this.setFillAndStrokeStyleToContext(S,o,l),this.setScale(g,v,i,a),this.transformToScale(w);var P=[1,0,0,1,-p[0],-p[1]];return w.transform.apply(w,P),this.clipBbox(w,r,c,h,d,f),w.executeOperatorList(t),A.canvas},setScale:function(e,t,r,n){this.scale=[e/r,t/n]},transformToScale:function(e){var t=this.scale,r=[t[0],0,0,t[1],0,0];e.transform.apply(e,r)},scaleToContext:function(){var e=this.scale;this.ctx.scale(1/e[0],1/e[1])},clipBbox:function(e,t,r,i,a,o){if((0,n.isArray)(t)&&4===t.length){var s=a-r,l=o-i;e.ctx.rect(r,i,s,l),e.clip(),e.endPath()}},setFillAndStrokeStyleToContext:function(e,r,i){switch(r){case t.COLORED:var a=this.ctx;e.fillStyle=a.fillStyle,e.strokeStyle=a.strokeStyle;break;case t.UNCOLORED:var o=n.Util.makeCssRgb(i[0],i[1],i[2]);e.fillStyle=o,e.strokeStyle=o;break;default:throw new n.FormatError("Unsupported paint type: "+r)}},getPattern:function(e,t){var r=this.createPatternCanvas(t);return(e=this.ctx).setTransform.apply(e,this.baseTransform),e.transform.apply(e,this.matrix),this.scaleToContext(),e.createPattern(r,"repeat")}},e}();t.getShadingPatternFromIR=function(e){var t=a[e[0]];if(!t)throw new Error("Unknown IR type: "+e[0]);return t.fromIR(e)},t.TilingPattern=s},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PDFDataTransportStream=void 0;var n=r(0),i=function(){function e(e,t){var r=this;(0,n.assert)(t),this._queuedChunks=[];var i=e.initialData;if(i&&i.length>0){var a=new Uint8Array(i).buffer;this._queuedChunks.push(a)}this._pdfDataRangeTransport=t,this._isRangeSupported=!e.disableRange,this._isStreamingSupported=!e.disableStream,this._contentLength=e.length,this._fullRequestReader=null,this._rangeReaders=[],this._pdfDataRangeTransport.addRangeListener(function(e,t){r._onReceiveData({begin:e,chunk:t})}),this._pdfDataRangeTransport.addProgressListener(function(e){r._onProgress({loaded:e})}),this._pdfDataRangeTransport.addProgressiveReadListener(function(e){r._onReceiveData({chunk:e})}),this._pdfDataRangeTransport.transportReady()}function t(e,t){this._stream=e,this._done=!1,this._queuedChunks=t||[],this._requests=[],this._headersReady=Promise.resolve(),e._fullRequestReader=this,this.onProgress=null}function r(e,t,r){this._stream=e,this._begin=t,this._end=r,this._queuedChunk=null,this._requests=[],this._done=!1,this.onProgress=null}return e.prototype={_onReceiveData:function(e){var t=new Uint8Array(e.chunk).buffer;if(void 0===e.begin)this._fullRequestReader?this._fullRequestReader._enqueue(t):this._queuedChunks.push(t);else{var r=this._rangeReaders.some(function(r){return r._begin===e.begin&&(r._enqueue(t),!0)});(0,n.assert)(r)}},_onProgress:function(e){if(this._rangeReaders.length>0){var t=this._rangeReaders[0];t.onProgress&&t.onProgress({loaded:e.loaded})}},_removeRangeReader:function(e){var t=this._rangeReaders.indexOf(e);t>=0&&this._rangeReaders.splice(t,1)},getFullReader:function(){(0,n.assert)(!this._fullRequestReader);var e=this._queuedChunks;return this._queuedChunks=null,new t(this,e)},getRangeReader:function(e,t){var n=new r(this,e,t);return this._pdfDataRangeTransport.requestDataRange(e,t),this._rangeReaders.push(n),n},cancelAllRequests:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeReaders.slice(0).forEach(function(t){t.cancel(e)}),this._pdfDataRangeTransport.abort()}},t.prototype={_enqueue:function(e){this._done||(this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._queuedChunks.push(e))},get headersReady(){return this._headersReady},get isRangeSupported(){return this._stream._isRangeSupported},get isStreamingSupported(){return this._stream._isStreamingSupported},get contentLength(){return this._stream._contentLength},read:function(){if(this._queuedChunks.length>0){var e=this._queuedChunks.shift();return Promise.resolve({value:e,done:!1})}if(this._done)return Promise.resolve({value:void 0,done:!0});var t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise},cancel:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]}},r.prototype={_enqueue:function(e){this._done||(0===this._requests.length?this._queuedChunk=e:(this._requests.shift().resolve({value:e,done:!1}),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[]),this._done=!0,this._stream._removeRangeReader(this))},get isStreamingSupported(){return!1},read:function(){if(this._queuedChunk){var e=this._queuedChunk;return this._queuedChunk=null,Promise.resolve({value:e,done:!1})}if(this._done)return Promise.resolve({value:void 0,done:!0});var t=(0,n.createPromiseCapability)();return this._requests.push(t),t.promise},cancel:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._stream._removeRangeReader(this)}},e}();t.PDFDataTransportStream=i},function(e,t,r){"use strict";function n(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 i(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)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){return{protocol:e.protocol,auth:e.auth,host:e.hostname,port:e.port,path:e.path,method:"GET",headers:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFNodeStream=void 0;var s=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),l=r(0),u=r(29),c=require("fs"),h=require("http"),d=require("https"),f=require("url"),p=function(){function e(t){a(this,e),this.options=t,this.source=t.source,this.url=f.parse(this.source.url),this.isHttp="http:"===this.url.protocol||"https:"===this.url.protocol,this.isFsUrl="file:"===this.url.protocol||!this.url.host,this.httpHeaders=this.isHttp&&this.source.httpHeaders||{},this._fullRequest=null,this._rangeRequestReaders=[]}return s(e,[{key:"getFullReader",value:function(){return(0,l.assert)(!this._fullRequest),this._fullRequest=this.isFsUrl?new _(this):new v(this),this._fullRequest}},{key:"getRangeReader",value:function(e,t){var r=this.isFsUrl?new y(this,e,t):new b(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequest&&this._fullRequest.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}(),m=function(){function e(t){a(this,e),this._url=t.url,this._done=!1,this._errored=!1,this._reason=null,this.onProgress=null,this._contentLength=t.source.length,this._loaded=0,this._disableRange=t.options.disableRange||!1,this._rangeChunkSize=t.source.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!t.source.disableStream,this._isRangeSupported=!t.options.disableRange,this._readableStream=null,this._readCapability=(0,l.createPromiseCapability)(),this._headersCapability=(0,l.createPromiseCapability)()}return s(e,[{key:"read",value:function(){var e=this;return this._readCapability.promise.then(function(){if(e._done)return Promise.resolve({value:void 0,done:!0});if(e._errored)return Promise.reject(e._reason);var t=e._readableStream.read();if(null===t)return e._readCapability=(0,l.createPromiseCapability)(),e.read();e._loaded+=t.length,e.onProgress&&e.onProgress({loaded:e._loaded,total:e._contentLength});var r=new Uint8Array(t).buffer;return Promise.resolve({value:r,done:!1})})}},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._errored=!0,this._reason=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),!this._isStreamingSupported&&this._isRangeSupported&&this._error(new l.AbortException("streaming is disabled")),this._errored&&this._readableStream.destroy(this._reason)}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),g=function(){function e(t){a(this,e),this._url=t.url,this._done=!1,this._errored=!1,this._reason=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=(0,l.createPromiseCapability)(),this._isStreamingSupported=!t.source.disableStream}return s(e,[{key:"read",value:function(){var e=this;return this._readCapability.promise.then(function(){if(e._done)return Promise.resolve({value:void 0,done:!0});if(e._errored)return Promise.reject(e._reason);var t=e._readableStream.read();if(null===t)return e._readCapability=(0,l.createPromiseCapability)(),e.read();e._loaded+=t.length,e.onProgress&&e.onProgress({loaded:e._loaded});var r=new Uint8Array(t).buffer;return Promise.resolve({value:r,done:!1})})}},{key:"cancel",value:function(e){this._readableStream?this._readableStream.destroy(e):this._error(e)}},{key:"_error",value:function(e){this._errored=!0,this._reason=e,this._readCapability.resolve()}},{key:"_setReadableStream",value:function(e){var t=this;this._readableStream=e,e.on("readable",function(){t._readCapability.resolve()}),e.on("end",function(){e.destroy(),t._done=!0,t._readCapability.resolve()}),e.on("error",function(e){t._error(e)}),this._errored&&this._readableStream.destroy(this._reason)}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),v=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),i=function(t){r._headersCapability.resolve(),r._setReadableStream(t);var n=(0,u.validateRangeRequestCapabilities)({getResponseHeader:function(e){return r._readableStream.headers[e.toLowerCase()]},isHttp:e.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),i=n.allowRangeRequests,a=n.suggestedLength;i&&(r._isRangeSupported=!0),r._contentLength=a};return r._request=null,"http:"===r._url.protocol?r._request=h.request(o(r._url,e.httpHeaders),i):r._request=d.request(o(r._url,e.httpHeaders),i),r._request.on("error",function(e){r._errored=!0,r._reason=e,r._headersCapability.reject(e)}),r._request.end(),r}return i(t,m),t}(),b=function(e){function t(e,r,i){a(this,t);var s=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));s._httpHeaders={};for(var l in e.httpHeaders){var u=e.httpHeaders[l];void 0!==u&&(s._httpHeaders[l]=u)}return s._httpHeaders.Range="bytes="+r+"-"+(i-1),s._request=null,"http:"===s._url.protocol?s._request=h.request(o(s._url,s._httpHeaders),function(e){s._setReadableStream(e)}):s._request=d.request(o(s._url,s._httpHeaders),function(e){s._setReadableStream(e)}),s._request.on("error",function(e){s._errored=!0,s._reason=e}),s._request.end(),s}return i(t,g),t}(),_=function(e){function t(e){a(this,t);var r=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return c.lstat(r._url.path,function(e,t){if(e)return r._errored=!0,r._reason=e,void r._headersCapability.reject(e);r._contentLength=t.size,r._setReadableStream(c.createReadStream(r._url.path)),r._headersCapability.resolve()}),r}return i(t,m),t}(),y=function(e){function t(e,r,i){a(this,t);var o=n(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return o._setReadableStream(c.createReadStream(o._url.path,{start:r,end:i-1})),o}return i(t,g),t}();t.PDFNodeStream=p},function(e,t,r){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){return{method:"GET",headers:e,mode:"cors",credentials:t?"include":"omit",redirect:"follow"}}Object.defineProperty(t,"__esModule",{value:!0}),t.PDFFetchStream=void 0;var a=function(){function e(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)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),o=r(0),s=r(29),l=function(){function e(t){n(this,e),this.options=t,this.source=t.source,this.isHttp=/^https?:/i.test(this.source.url),this.httpHeaders=this.isHttp&&this.source.httpHeaders||{},this._fullRequestReader=null,this._rangeRequestReaders=[]}return a(e,[{key:"getFullReader",value:function(){return(0,o.assert)(!this._fullRequestReader),this._fullRequestReader=new u(this),this._fullRequestReader}},{key:"getRangeReader",value:function(e,t){var r=new c(this,e,t);return this._rangeRequestReaders.push(r),r}},{key:"cancelAllRequests",value:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}}]),e}(),u=function(){function e(t){var r=this;n(this,e),this._stream=t,this._reader=null,this._loaded=0,this._withCredentials=t.source.withCredentials,this._contentLength=this._stream.source.length,this._headersCapability=(0,o.createPromiseCapability)(),this._disableRange=this._stream.options.disableRange,this._rangeChunkSize=this._stream.source.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isRangeSupported=!this._stream.options.disableRange,this._isStreamingSupported=!this._stream.source.disableStream,this._headers=new Headers;for(var a in this._stream.httpHeaders){var l=this._stream.httpHeaders[a];void 0!==l&&this._headers.append(a,l)}var u=this._stream.source.url;fetch(u,i(this._headers,this._withCredentials)).then(function(e){if(!(0,s.validateResponseStatus)(e.status,r._stream.isHttp))throw(0,s.createResponseStatusError)(e.status,u);r._reader=e.body.getReader(),r._headersCapability.resolve();var t=(0,s.validateRangeRequestCapabilities)({getResponseHeader:function(t){return e.headers.get(t)},isHttp:r._stream.isHttp,rangeChunkSize:r._rangeChunkSize,disableRange:r._disableRange}),n=t.allowRangeRequests,i=t.suggestedLength;r._contentLength=i,r._isRangeSupported=n,!r._isStreamingSupported&&r._isRangeSupported&&r.cancel(new o.AbortException("streaming is disabled"))}).catch(this._headersCapability.reject),this.onProgress=null}return a(e,[{key:"read",value:function(){var e=this;return this._headersCapability.promise.then(function(){return e._reader.read().then(function(t){var r=t.value,n=t.done;if(n)return Promise.resolve({value:r,done:n});e._loaded+=r.byteLength,e.onProgress&&e.onProgress({loaded:e._loaded,total:e._contentLength});var i=new Uint8Array(r).buffer;return Promise.resolve({value:i,done:!1})})})}},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e)}},{key:"headersReady",get:function(){return this._headersCapability.promise}},{key:"contentLength",get:function(){return this._contentLength}},{key:"isRangeSupported",get:function(){return this._isRangeSupported}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}(),c=function(){function e(t,r,a){var l=this;n(this,e),this._stream=t,this._reader=null,this._loaded=0,this._withCredentials=t.source.withCredentials,this._readCapability=(0,o.createPromiseCapability)(),this._isStreamingSupported=!t.source.disableStream,this._headers=new Headers;for(var u in this._stream.httpHeaders){var c=this._stream.httpHeaders[u];void 0!==c&&this._headers.append(u,c)}var h=r+"-"+(a-1);this._headers.append("Range","bytes="+h);var d=this._stream.source.url;fetch(d,i(this._headers,this._withCredentials)).then(function(e){if(!(0,s.validateResponseStatus)(e.status,l._stream.isHttp))throw(0,s.createResponseStatusError)(e.status,d);l._readCapability.resolve(),l._reader=e.body.getReader()}),this.onProgress=null}return a(e,[{key:"read",value:function(){var e=this;return this._readCapability.promise.then(function(){return e._reader.read().then(function(t){var r=t.value,n=t.done;if(n)return Promise.resolve({value:r,done:n});e._loaded+=r.byteLength,e.onProgress&&e.onProgress({loaded:e._loaded});var i=new Uint8Array(r).buffer;return Promise.resolve({value:i,done:!1})})})}},{key:"cancel",value:function(e){this._reader&&this._reader.cancel(e)}},{key:"isStreamingSupported",get:function(){return this._isStreamingSupported}}]),e}();t.PDFFetchStream=l},function(e,t,r){"use strict";function n(e,t){this.url=e,t=t||{},this.isHttp=/^https?:/i.test(e),this.httpHeaders=this.isHttp&&t.httpHeaders||{},this.withCredentials=t.withCredentials||!1,this.getXhr=t.getXhr||function(){return new XMLHttpRequest},this.currXhrId=0,this.pendingRequests=Object.create(null),this.loadedRequests=Object.create(null)}function i(e){var t=e.response;if("string"!=typeof t)return t;for(var r=t.length,n=new Uint8Array(r),i=0;i<r;i++)n[i]=255&t.charCodeAt(i);return n.buffer}function a(e){this._options=e;var t=e.source;this._manager=new n(t.url,{httpHeaders:t.httpHeaders,withCredentials:t.withCredentials}),this._rangeChunkSize=t.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}function o(e,t){this._manager=e;var r=t.source,n={onHeadersReceived:this._onHeadersReceived.bind(this),onProgressiveData:r.disableStream?null:this._onProgressiveData.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)};this._url=r.url,this._fullRequestId=e.requestFull(n),this._headersReceivedCapability=(0,l.createPromiseCapability)(),this._disableRange=t.disableRange||!1,this._contentLength=r.length,this._rangeChunkSize=r.rangeChunkSize,this._rangeChunkSize||this._disableRange||(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this.onProgress=null}function s(e,t,r){this._manager=e;var n={onDone:this._onDone.bind(this),onProgress:this._onProgress.bind(this)};this._requestId=e.requestRange(t,r,n),this._requests=[],this._queuedChunk=null,this._done=!1,this.onProgress=null,this.onClosed=null}Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkManager=t.PDFNetworkStream=void 0;var l=r(0),u=r(29),c=function(e){return e&&e.__esModule?e:{default:e}}(r(9)),h=function(){try{var e=new XMLHttpRequest;return e.open("GET",c.default.location.href),e.responseType="moz-chunked-arraybuffer","moz-chunked-arraybuffer"===e.responseType}catch(e){return!1}}();n.prototype={requestRange:function(e,t,r){var n={begin:e,end:t};for(var i in r)n[i]=r[i];return this.request(n)},requestFull:function(e){return this.request(e)},request:function(e){var t=this.getXhr(),r=this.currXhrId++,n=this.pendingRequests[r]={xhr:t};t.open("GET",this.url),t.withCredentials=this.withCredentials;for(var i in this.httpHeaders){var a=this.httpHeaders[i];void 0!==a&&t.setRequestHeader(i,a)}if(this.isHttp&&"begin"in e&&"end"in e){var o=e.begin+"-"+(e.end-1);t.setRequestHeader("Range","bytes="+o),n.expectedStatus=206}else n.expectedStatus=200;return h&&!!e.onProgressiveData?(t.responseType="moz-chunked-arraybuffer",n.onProgressiveData=e.onProgressiveData,n.mozChunked=!0):t.responseType="arraybuffer",e.onError&&(t.onerror=function(r){e.onError(t.status)}),t.onreadystatechange=this.onStateChange.bind(this,r),t.onprogress=this.onProgress.bind(this,r),n.onHeadersReceived=e.onHeadersReceived,n.onDone=e.onDone,n.onError=e.onError,n.onProgress=e.onProgress,t.send(null),r},onProgress:function(e,t){var r=this.pendingRequests[e];if(r){if(r.mozChunked){var n=i(r.xhr);r.onProgressiveData(n)}var a=r.onProgress;a&&a(t)}},onStateChange:function(e,t){var r=this.pendingRequests[e];if(r){var n=r.xhr;if(n.readyState>=2&&r.onHeadersReceived&&(r.onHeadersReceived(),delete r.onHeadersReceived),4===n.readyState&&e in this.pendingRequests)if(delete this.pendingRequests[e],0===n.status&&this.isHttp)r.onError&&r.onError(n.status);else{var a=n.status||200;if(200===a&&206===r.expectedStatus||a===r.expectedStatus){this.loadedRequests[e]=!0;var o=i(n);if(206===a){var s=n.getResponseHeader("Content-Range"),l=/bytes (\d+)-(\d+)\/(\d+)/.exec(s),u=parseInt(l[1],10);r.onDone({begin:u,chunk:o})}else r.onProgressiveData?r.onDone(null):o?r.onDone({begin:0,chunk:o}):r.onError&&r.onError(n.status)}else r.onError&&r.onError(n.status)}}},hasPendingRequests:function(){for(var e in this.pendingRequests)return!0;return!1},getRequestXhr:function(e){return this.pendingRequests[e].xhr},isStreamingRequest:function(e){return!!this.pendingRequests[e].onProgressiveData},isPendingRequest:function(e){return e in this.pendingRequests},isLoadedRequest:function(e){return e in this.loadedRequests},abortAllRequests:function(){for(var e in this.pendingRequests)this.abortRequest(0|e)},abortRequest:function(e){var t=this.pendingRequests[e].xhr;delete this.pendingRequests[e],t.abort()}},a.prototype={_onRangeRequestReaderClosed:function(e){var t=this._rangeRequestReaders.indexOf(e);t>=0&&this._rangeRequestReaders.splice(t,1)},getFullReader:function(){return(0,l.assert)(!this._fullRequestReader),this._fullRequestReader=new o(this._manager,this._options),this._fullRequestReader},getRangeReader:function(e,t){var r=new s(this._manager,e,t);return r.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(r),r},cancelAllRequests:function(e){this._fullRequestReader&&this._fullRequestReader.cancel(e),this._rangeRequestReaders.slice(0).forEach(function(t){t.cancel(e)})}},o.prototype={_onHeadersReceived:function(){var e=this._fullRequestId,t=this._manager.getRequestXhr(e),r=(0,u.validateRangeRequestCapabilities)({getResponseHeader:function(e){return t.getResponseHeader(e)},isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange}),n=r.allowRangeRequests,i=r.suggestedLength;this._contentLength=i||this._contentLength,n&&(this._isRangeSupported=!0);var a=this._manager;a.isStreamingRequest(e)?this._isStreamingSupported=!0:this._isRangeSupported&&a.abortRequest(e),this._headersReceivedCapability.resolve()},_onProgressiveData:function(e){this._requests.length>0?this._requests.shift().resolve({value:e,done:!1}):this._cachedChunks.push(e)},_onDone:function(e){e&&this._onProgressiveData(e.chunk),this._done=!0,this._cachedChunks.length>0||(this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[])},_onError:function(e){var t=this._url,r=(0,u.createResponseStatusError)(e,t);this._storedError=r,this._headersReceivedCapability.reject(r),this._requests.forEach(function(e){e.reject(r)}),this._requests=[],this._cachedChunks=[]},_onProgress:function(e){this.onProgress&&this.onProgress({loaded:e.loaded,total:e.lengthComputable?e.total:this._contentLength})},get isRangeSupported(){return this._isRangeSupported},get isStreamingSupported(){return this._isStreamingSupported},get contentLength(){return this._contentLength},get headersReady(){return this._headersReceivedCapability.promise},read:function(){if(this._storedError)return Promise.reject(this._storedError);if(this._cachedChunks.length>0){var e=this._cachedChunks.shift();return Promise.resolve({value:e,done:!1})}if(this._done)return Promise.resolve({value:void 0,done:!0});var t=(0,l.createPromiseCapability)();return this._requests.push(t),t.promise},cancel:function(e){this._done=!0,this._headersReceivedCapability.reject(e),this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}},s.prototype={_close:function(){this.onClosed&&this.onClosed(this)},_onDone:function(e){var t=e.chunk;this._requests.length>0?this._requests.shift().resolve({value:t,done:!1}):this._queuedChunk=t,this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._close()},_onProgress:function(e){!this.isStreamingSupported&&this.onProgress&&this.onProgress({loaded:e.loaded})},get isStreamingSupported(){return!1},read:function(){if(null!==this._queuedChunk){var e=this._queuedChunk;return this._queuedChunk=null,Promise.resolve({value:e,done:!1})}if(this._done)return Promise.resolve({value:void 0,done:!0});var t=(0,l.createPromiseCapability)();return this._requests.push(t),t.promise},cancel:function(e){this._done=!0,this._requests.forEach(function(e){e.resolve({value:void 0,done:!0})}),this._requests=[],this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}},t.PDFNetworkStream=a,t.NetworkManager=n}])});
nolsherry/cdnjs
ajax/libs/pdf.js/1.9.504/pdf.min.js
JavaScript
mit
283,239
/*! instantsearch.js 2.1.0 | © Algolia Inc. and other contributors; Licensed MIT | github.com/algolia/instantsearch.js */ !function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t():"function"===typeof define&&define.amd?define([],t):"object"===typeof exports?exports.instantsearch=t():e.instantsearch=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=206)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return null}function i(e){var t=e.nodeName,n=e.attributes;e.attributes={},t.defaultProps&&w(e.attributes,t.defaultProps),n&&w(e.attributes,n)}function a(e,t){var n,r,i;if(t){for(i in t)if(n=W.test(i))break;if(n){r=e.attributes={};for(i in t)t.hasOwnProperty(i)&&(r[W.test(i)?i.replace(/([A-Z0-9])/,"-$1").toLowerCase():i]=t[i])}}}function o(e,t,n){var r=t&&t._preactCompatRendered&&t._preactCompatRendered.base;r&&r.parentNode!==t&&(r=null),!r&&t&&(r=t.firstElementChild);for(var i=t.childNodes.length;i--;)t.childNodes[i]!==r&&t.removeChild(t.childNodes[i]);var a=Object(U.e)(e,t,r);return t&&(t._preactCompatRendered=a&&(a._component||{base:a})),"function"===typeof n&&n(),a&&a._component||a}function s(e,t,n,r){var i=Object(U.c)(G,{context:e.context},t),a=o(i,n),s=a._component||a.base;return r&&r.call(s,a),s}function u(e){var t=e._preactCompatRendered&&e._preactCompatRendered.base;return!(!t||t.parentNode!==e)&&(Object(U.e)(Object(U.c)(r),e,t),!0)}function c(e){return h.bind(null,e)}function l(e,t){for(var n=t||0;n<e.length;n++){var r=e[n];Array.isArray(r)?l(r):r&&"object"===typeof r&&!g(r)&&(r.props&&r.type||r.attributes&&r.nodeName||r.children)&&(e[n]=h(r.type||r.nodeName,r.props||r.attributes,r.children))}}function f(e){return"function"===typeof e&&!(e.prototype&&e.prototype.render)}function p(e){return j({displayName:e.displayName||e.name,render:function(){return e(this.props,this.context)}})}function d(e){var t=e[Q];return t?!0===t?e:t:(t=p(e),Object.defineProperty(t,Q,{configurable:!0,value:!0}),t.displayName=e.displayName,t.propTypes=e.propTypes,t.defaultProps=e.defaultProps,Object.defineProperty(e,Q,{configurable:!0,value:t}),t)}function h(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return l(e,2),m(U.c.apply(void 0,e))}function m(e){e.preactCompatNormalized=!0,_(e),f(e.nodeName)&&(e.nodeName=d(e.nodeName));var t=e.attributes.ref,n=t&&typeof t;return!X||"string"!==n&&"number"!==n||(e.attributes.ref=y(t,X)),b(e),e}function v(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];if(!g(e))return e;var i=e.attributes||e.props,a=Object(U.c)(e.nodeName||e.type,i,e.children||i&&i.children),o=[a,t];return n&&n.length?o.push(n):t&&t.children&&o.push(t.children),m(U.b.apply(void 0,o))}function g(e){return e&&(e instanceof $||e.$$typeof===B)}function y(e,t){return t._refProxies[e]||(t._refProxies[e]=function(n){t&&t.refs&&(t.refs[e]=n,null===n&&(delete t._refProxies[e],t=null))})}function b(e){var t=e.nodeName,n=e.attributes;if(n&&"string"===typeof t){var r={};for(var i in n)r[i.toLowerCase()]=i;if(r.ondoubleclick&&(n.ondblclick=n[r.ondoubleclick],delete n[r.ondoubleclick]),r.onchange&&("textarea"===t||"input"===t.toLowerCase()&&!/^fil|che|rad/i.test(n.type))){var a=r.oninput||"oninput";n[a]||(n[a]=F([n[a],n[r.onchange]]),delete n[r.onchange])}}}function _(e){var t=e.attributes||(e.attributes={});re.enumerable="className"in t,t.className&&(t.class=t.className),Object.defineProperty(t,"className",re)}function w(e,t){for(var n=arguments,r=1,i=void 0;r<arguments.length;r++)if(i=n[r])for(var a in i)i.hasOwnProperty(a)&&(e[a]=i[a]);return e}function R(e,t){for(var n in e)if(!(n in t))return!0;for(var r in t)if(e[r]!==t[r])return!0;return!1}function P(e){return e&&e.base||e}function x(){}function j(e){function t(e,t){O(this),A.call(this,e,t,z),N.call(this,e,t)}return e=w({constructor:t},e),e.mixins&&C(e,S(e.mixins)),e.statics&&w(t,e.statics),e.propTypes&&(t.propTypes=e.propTypes),e.defaultProps&&(t.defaultProps=e.defaultProps),e.getDefaultProps&&(t.defaultProps=e.getDefaultProps()),x.prototype=A.prototype,t.prototype=w(new x,e),t.displayName=e.displayName||"Component",t}function S(e){for(var t={},n=0;n<e.length;n++){var r=e[n];for(var i in r)r.hasOwnProperty(i)&&"function"===typeof r[i]&&(t[i]||(t[i]=[])).push(r[i])}return t}function C(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=F(t[n].concat(e[n]||Z),"getDefaultProps"===n||"getInitialState"===n||"getChildContext"===n))}function O(e){for(var t in e){var n=e[t];"function"!==typeof n||n.__bound||q.hasOwnProperty(t)||((e[t]=n.bind(e)).__bound=!0)}}function E(e,t,n){if("string"===typeof t&&(t=e.constructor.prototype[t]),"function"===typeof t)return t.apply(e,n)}function F(e,t){return function(){for(var n,r=arguments,i=this,a=0;a<e.length;a++){var o=E(i,e[a],r);if(t&&null!=o){n||(n={});for(var s in o)o.hasOwnProperty(s)&&(n[s]=o[s])}else"undefined"!==typeof o&&(n=o)}return n}}function N(e,t){k.call(this,e,t),this.componentWillReceiveProps=F([k,this.componentWillReceiveProps||"componentWillReceiveProps"]),this.render=F([k,T,this.render||"render",M])}function k(e,t){if(e){var n=e.children;if(n&&Array.isArray(n)&&1===n.length&&("string"===typeof n[0]||"function"===typeof n[0]||n[0]instanceof $)&&(e.children=n[0],e.children&&"object"===typeof e.children&&(e.children.length=1,e.children[0]=e.children)),K){var r="function"===typeof this?this:this.constructor,i=this.propTypes||r.propTypes,a=this.displayName||r.name;i&&I.a.checkPropTypes(i,e,"prop",a)}}}function T(e){X=this}function M(){X===this&&(X=null)}function A(e,t,n){U.a.call(this,e,t),this.state=this.getInitialState?this.getInitialState():{},this.refs={},this._refProxies={},n!==z&&N.call(this,e,t)}function L(e,t){A.call(this,e,t)}n.d(t,"version",function(){return D}),n.d(t,"DOM",function(){return te}),n.d(t,"Children",function(){return ee}),n.d(t,"render",function(){return o}),n.d(t,"createClass",function(){return j}),n.d(t,"createFactory",function(){return c}),n.d(t,"createElement",function(){return h}),n.d(t,"cloneElement",function(){return v}),n.d(t,"isValidElement",function(){return g}),n.d(t,"findDOMNode",function(){return P}),n.d(t,"unmountComponentAtNode",function(){return u}),n.d(t,"Component",function(){return A}),n.d(t,"PureComponent",function(){return L}),n.d(t,"unstable_renderSubtreeIntoContainer",function(){return s}),n.d(t,"__spread",function(){return w});var H=n(4),I=n.n(H),U=n(399);n.d(t,"PropTypes",function(){return I.a});var D="15.1.0",V="a abbr address area article aside audio b base bdi bdo big blockquote body br button canvas caption cite code col colgroup data datalist dd del details dfn dialog div dl dt em embed fieldset figcaption figure footer form h1 h2 h3 h4 h5 h6 head header hgroup hr html i iframe img input ins kbd keygen label legend li link main map mark menu menuitem meta meter nav noscript object ol optgroup option output p param picture pre progress q rp rt ruby s samp script section select small source span strong style sub summary sup table tbody td textarea tfoot th thead time title tr track u ul var video wbr circle clipPath defs ellipse g image line linearGradient mask path pattern polygon polyline radialGradient rect stop svg text tspan".split(" "),B="undefined"!==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Q="undefined"!==typeof Symbol?Symbol.for("__preactCompatWrapper"):"__preactCompatWrapper",q={constructor:1,render:1,shouldComponentUpdate:1,componentWillReceiveProps:1,componentWillUpdate:1,componentDidUpdate:1,componentWillMount:1,componentDidMount:1,componentWillUnmount:1,componentDidUnmount:1},W=/^(?:accent|alignment|arabic|baseline|cap|clip|color|fill|flood|font|glyph|horiz|marker|overline|paint|stop|strikethrough|stroke|text|underline|unicode|units|v|vector|vert|word|writing|x)[A-Z]/,z={},K="undefined"===typeof e||!Object({NODE_ENV:"production"})||!1,$=Object(U.c)("a",null).constructor;$.prototype.$$typeof=B,$.prototype.preactCompatUpgraded=!1,$.prototype.preactCompatNormalized=!1,Object.defineProperty($.prototype,"type",{get:function(){return this.nodeName},set:function(e){this.nodeName=e},configurable:!0}),Object.defineProperty($.prototype,"props",{get:function(){return this.attributes},set:function(e){this.attributes=e},configurable:!0});var J=U.d.event;U.d.event=function(e){return J&&(e=J(e)),e.persist=Object,e.nativeEvent=e,e};var Y=U.d.vnode;U.d.vnode=function(e){if(!e.preactCompatUpgraded){e.preactCompatUpgraded=!0;var t=e.nodeName,n=e.attributes=w({},e.attributes);"function"===typeof t?(!0===t[Q]||t.prototype&&"isReactComponent"in t.prototype)&&(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),e.preactCompatNormalized||m(e),i(e)):(e.children&&""===String(e.children)&&(e.children=void 0),e.children&&(n.children=e.children),n.defaultValue&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),a(e,n))}Y&&Y(e)};var G=function(){};G.prototype.getChildContext=function(){return this.props.context},G.prototype.render=function(e){return e.children[0]};for(var X,Z=[],ee={map:function(e,t,n){return null==e?null:(e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.map(t))},forEach:function(e,t,n){if(null==e)return null;e=ee.toArray(e),n&&n!==e&&(t=t.bind(n)),e.forEach(t)},count:function(e){return e&&e.length||0},only:function(e){if(e=ee.toArray(e),1!==e.length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:function(e){return null==e?[]:Z.concat(e)}},te={},ne=V.length;ne--;)te[V[ne]]=c(V[ne]);var re={configurable:!0,get:function(){return this.class},set:function(e){this.class=e}};w(A.prototype=new U.a,{constructor:A,isReactComponent:{},replaceState:function(e,t){var n=this;this.setState(e,t);for(var r in n.state)r in e||delete n.state[r]},getDOMNode:function(){return this.base},isMounted:function(){return!!this.base}}),x.prototype=A.prototype,L.prototype=new x,L.prototype.isPureReactComponent=!0,L.prototype.shouldComponentUpdate=function(e,t){return R(this.props,e)||R(this.state,t)};var ie={version:D,DOM:te,PropTypes:I.a,Children:ee,render:o,createClass:j,createFactory:c,createElement:h,cloneElement:v,isValidElement:g,findDOMNode:P,unmountComponentAtNode:u,Component:A,PureComponent:L,unstable_renderSubtreeIntoContainer:s,__spread:w};t.default=ie}.call(t,n(71))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e){var t="string"===typeof e,n=void 0;if(n=t?document.querySelector(e):e,!o(n)){var r="Container must be `string` or `HTMLElement`.";throw t&&(r+=" Unable to find "+e),new Error(r)}return n}function o(e){return e instanceof window.HTMLElement||Boolean(e)&&e.nodeType>0}function s(e){return 1===e.button||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey}function u(e){return function(t,n){return t&&!n?e+"--"+t:t&&n?e+"--"+t+"__"+n:!t&&n?e+"__"+n:e}}function c(e){var t=e.transformData,n=e.defaultTemplates,r=e.templates,i=e.templatesConfig,a=l(n,r);return w({transformData:t,templatesConfig:i},a)}function l(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(0,A.default)([].concat(i((0,T.default)(e)),i((0,T.default)(t))));return(0,P.default)(n,function(n,r){var i=e[r],a=t[r],o=void 0!==a&&a!==i;return n.templates[r]=o?a:i,n.useCustomCompileOptions[r]=o,n},{templates:{},useCustomCompileOptions:{}})}function f(e,t,n,r,i){var a={type:t,attributeName:n,name:r},o=(0,C.default)(i,{name:n}),s=void 0;if("hierarchical"===t){var u=e.getHierarchicalFacetByName(n),c=r.split(u.separator);a.name=c[c.length-1];for(var l=0;void 0!==o&&l<c.length;++l)o=(0,C.default)(o.data,{name:c[l]});s=(0,E.default)(o,"count")}else s=(0,E.default)(o,'data["'+a.name+'"]');var f=(0,E.default)(o,"exhaustive");return void 0!==s&&(a.count=s),void 0!==f&&(a.exhaustive=f),a}function p(e,t){var n=[];return(0,j.default)(t.facetsRefinements,function(r,i){(0,j.default)(r,function(r){n.push(f(t,"facet",i,r,e.facets))})}),(0,j.default)(t.facetsExcludes,function(e,t){(0,j.default)(e,function(e){n.push({type:"exclude",attributeName:t,name:e,exclude:!0})})}),(0,j.default)(t.disjunctiveFacetsRefinements,function(r,i){(0,j.default)(r,function(r){n.push(f(t,"disjunctive",i,g(r),e.disjunctiveFacets))})}),(0,j.default)(t.hierarchicalFacetsRefinements,function(r,i){(0,j.default)(r,function(r){n.push(f(t,"hierarchical",i,r,e.hierarchicalFacets))})}),(0,j.default)(t.numericRefinements,function(e,t){(0,j.default)(e,function(e,r){(0,j.default)(e,function(e){n.push({type:"numeric",attributeName:t,name:""+e,numericValue:e,operator:r})})})}),(0,j.default)(t.tagRefinements,function(e){n.push({type:"tag",attributeName:"_tags",name:e})}),n}function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e;return n&&(r=r.setQuery("")),(0,N.default)(t)?(r=r.clearTags(),r=r.clearRefinements()):((0,j.default)(t,function(e){r="_tags"===e?r.clearTags():r.clearRefinements(e)}),r)}function h(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];e.setState(d(e.state,t,n)).search()}function m(e,t){if(t)return(0,H.default)(t,function(t,n){return e+n})}function v(e){return"number"===typeof e&&e<0&&(e=String(e).replace(/^-/,"\\-")),e}function g(e){return String(e).replace(/^\\-/,"-")}function y(e,t){if(void 0===e||"function"!==typeof e)throw new Error(t)}function b(e){return"object"===("undefined"===typeof e?"undefined":_(e))&&null!==e&&e.$$typeof===I}Object.defineProperty(t,"__esModule",{value:!0}),t.isReactElement=t.checkRendering=t.unescapeRefinement=t.escapeRefinement=t.prefixKeys=t.clearRefinementsAndSearch=t.clearRefinementsFromState=t.getRefinements=t.isDomElement=t.isSpecialClick=t.prepareTemplateProps=t.bemHelper=t.getContainerNode=void 0;var _="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},w=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},R=n(15),P=r(R),x=n(12),j=r(x),S=n(16),C=r(S),O=n(59),E=r(O),F=n(26),N=r(F),k=n(7),T=r(k),M=n(386),A=r(M),L=n(173),H=r(L);t.getContainerNode=a,t.bemHelper=u,t.prepareTemplateProps=c,t.isSpecialClick=s,t.isDomElement=o,t.getRefinements=p,t.clearRefinementsFromState=d,t.clearRefinementsAndSearch=h,t.prefixKeys=m,t.escapeRefinement=v,t.unescapeRefinement=g,t.checkRendering=y,t.isReactElement=b;var I="function"===typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r,i;!function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var i=typeof r;if("string"===i||"number"===i)e.push(r);else if(Array.isArray(r))e.push(n.apply(null,r));else if("object"===i)for(var o in r)a.call(r,o)&&r[o]&&e.push(o)}}return e.join(" ")}var a={}.hasOwnProperty;"undefined"!==typeof e&&e.exports?e.exports=n:(r=[],void 0!==(i=function(){return n}.apply(t,r))&&(e.exports=i))}()},function(e,t,n){e.exports=n(395)()},function(e,t,n){var r=n(113),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();e.exports=a},function(e,t){function n(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}e.exports=n},function(e,t,n){function r(e){return o(e)?i(e):a(e)}var i=n(111),a=n(114),o=n(11);e.exports=r},function(e,t){function n(e){return null!=e&&"object"==typeof e}e.exports=n},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?a(e[0],e[1]):i(e):u(e)}var i=n(255),a=n(268),o=n(24),s=n(2),u=n(273);e.exports=r},function(e,t,n){function r(e,t){return(s(e)?i:o)(e,a(t,3))}var i=n(17),a=n(9),o=n(138),s=n(2);e.exports=r},function(e,t,n){function r(e){return null!=e&&a(e.length)&&!i(e)}var i=n(14),a=n(77);e.exports=r},function(e,t,n){function r(e,t){return(s(e)?i:a)(e,o(t))}var i=n(87),a=n(45),o=n(86),s=n(2);e.exports=r},function(e,t,n){function r(e){return null==e?void 0===e?u:s:c&&c in Object(e)?a(e):o(e)}var i=n(29),a=n(216),o=n(217),s="[object Null]",u="[object Undefined]",c=i?i.toStringTag:void 0;e.exports=r},function(e,t,n){function r(e){if(!a(e))return!1;var t=i(e);return t==s||t==u||t==o||t==c}var i=n(13),a=n(6),o="[object AsyncFunction]",s="[object Function]",u="[object GeneratorFunction]",c="[object Proxy]";e.exports=r},function(e,t,n){function r(e,t,n){var r=u(e)?i:s,c=arguments.length<3;return r(e,o(t,4),n,c,a)}var i=n(94),a=n(45),o=n(9),s=n(276),u=n(2);e.exports=r},function(e,t,n){var r=n(298),i=n(152),a=r(i);e.exports=a},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}e.exports=n},function(e,t,n){function r(e,t){return o(a(e,t,i),e+"")}var i=n(24),a=n(119),o=n(84);e.exports=r},function(e,t,n){function r(e,t,n,r){var o=!n;n||(n={});for(var s=-1,u=t.length;++s<u;){var c=t[s],l=r?r(n[c],e[c],c,n,e):void 0;void 0===l&&(l=e[c]),o?a(n,c,l):i(n,c,l)}return n}var i=n(62),a=n(48);e.exports=r},function(e,t,n){function r(e,t){return i(e,t)}var i=n(88);e.exports=r},function(e,t,n){function r(e){return"string"==typeof e||!a(e)&&o(e)&&i(e)==s}var i=n(13),a=n(2),o=n(8),s="[object String]";e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}function s(e,t,n){if(!e)return n;var r=(0,w.default)(n),i=void 0,a="undefined"===typeof e?"undefined":l(e);if("function"===a)i=e(r);else{if("object"!==a)throw new Error("transformData must be a function or an object, was "+a+" (key : "+t+")");i=e[t]?e[t](r):n}var o="undefined"===typeof i?"undefined":l(i),s="undefined"===typeof n?"undefined":l(n);if(o!==s)throw new Error("`transformData` must return a `"+s+"`, got `"+o+"`.");return i}function u(e){var t=e.templates,n=e.templateKey,r=e.compileOptions,i=e.helpers,a=e.data,o=t[n],s="undefined"===typeof o?"undefined":l(o),u="string"===s,p="function"===s;if(u||p){if(p)return o(a);var d=c(i,r,a),h=f({},a,{helpers:d});return g.default.compile(o,r).render(h)}throw new Error("Template must be 'string' or 'function', was '"+s+"' (key: "+n+")")}function c(e,t,n){return(0,P.default)(e,function(e){return(0,b.default)(function(r){var i=this,a=function(e){return g.default.compile(e,t).render(i)};return e.call(n,r,a)})})}Object.defineProperty(t,"__esModule",{value:!0}),t.PureTemplate=void 0;var l="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},f=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},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(4),h=(r(d),n(0)),m=r(h),v=n(200),g=r(v),y=n(403),b=r(y),_=n(201),w=r(_),R=n(107),P=r(R),x=n(20),j=r(x),S=n(1),C=t.PureTemplate=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),p(t,[{key:"shouldComponentUpdate",value:function(e){return!(0,j.default)(this.props.data,e.data)||this.props.templateKey!==e.templateKey}},{key:"render",value:function(){var e=this.props.useCustomCompileOptions[this.props.templateKey],t=e?this.props.templatesConfig.compileOptions:{},n=u({templates:this.props.templates,templateKey:this.props.templateKey,compileOptions:t,helpers:this.props.templatesConfig.helpers,data:this.props.data});if(null===n)return null;if((0,S.isReactElement)(n))throw new Error("Support for templates as React elements has been removed, please use react-instantsearch");return m.default.createElement("div",f({},this.props.rootProps,{dangerouslySetInnerHTML:{__html:n}}))}}]),t}(m.default.Component);C.defaultProps={data:{},useCustomCompileOptions:{},templates:{},templatesConfig:{}};t.default=function(e){return function(t){var n=void 0===t.data?{}:t.data;return m.default.createElement(e,f({},t,{data:s(t.transformData,t.templateKey,n)}))}}(C)},function(e,t,n){function r(e,t){var n=a(e,t);return i(n)?n:void 0}var i=n(227),a=n(230);e.exports=r},function(e,t){function n(e){return e}e.exports=n},function(e,t,n){function r(e){if(!o(e)||i(e)!=s)return!1;var t=a(e);if(null===t)return!0;var n=f.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==p}var i=n(13),a=n(95),o=n(8),s="[object Object]",u=Function.prototype,c=Object.prototype,l=u.toString,f=c.hasOwnProperty,p=l.call(Object);e.exports=r},function(e,t,n){function r(e){if(null==e)return!0;if(u(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||c(e)||f(e)||o(e)))return!e.length;var t=a(e);if(t==p||t==d)return!e.size;if(l(e))return!i(e).length;for(var n in e)if(m.call(e,n))return!1;return!0}var i=n(114),a=n(91),o=n(37),s=n(2),u=n(11),c=n(39),l=n(41),f=n(52),p="[object Map]",d="[object Set]",h=Object.prototype,m=h.hasOwnProperty;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();t.default=function(e){var t,n;return n=t=function(t){function n(){return i(this,n),a(this,(n.__proto__||Object.getPrototypeOf(n)).apply(this,arguments))}return o(n,t),s(n,[{key:"render",value:function(){var t=this.props.shouldAutoHideContainer;return l.default.createElement("div",{style:{display:t?"none":""}},l.default.createElement(e,this.props))}}]),n}(c.Component),t.displayName=e.name+"-AutoHide",n};var u=n(4),c=(r(u),n(0)),l=r(c)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}function s(e){var t=function(t){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.handleHeaderClick=t.handleHeaderClick.bind(t),t.state={collapsed:e.collapsible&&e.collapsible.collapsed},t._cssClasses={root:(0,h.default)("ais-root",t.props.cssClasses.root),body:(0,h.default)("ais-body",t.props.cssClasses.body)},t._footerElement=t._getElement({type:"footer"}),t}return o(n,t),c(n,[{key:"_getElement",value:function(e){var t=e.type,n=e.handleClick,r=void 0===n?null:n,i=this.props.templateProps&&this.props.templateProps.templates;if(!i||!i[t])return null;var a=(0,h.default)(this.props.cssClasses[t],"ais-"+t),o=(0,v.default)(this.props,"headerFooterData."+t);return p.default.createElement(y.default,u({},this.props.templateProps,{data:o,rootProps:{className:a,onClick:r},templateKey:t,transformData:null}))}},{key:"handleHeaderClick",value:function(){this.setState({collapsed:!this.state.collapsed})}},{key:"render",value:function(){var t=[this._cssClasses.root];this.props.collapsible&&t.push("ais-root__collapsible"),this.state.collapsed&&t.push("ais-root__collapsed");var n=u({},this._cssClasses,{root:(0,h.default)(t)}),r=this._getElement({type:"header",handleClick:this.props.collapsible?this.handleHeaderClick:null});return p.default.createElement("div",{className:n.root},r,p.default.createElement("div",{className:n.body},p.default.createElement(e,this.props)),this._footerElement)}}]),n}(p.default.Component);return t.defaultProps={cssClasses:{},collapsible:!1},t.displayName=e.name+"-HeaderFooter",t}Object.defineProperty(t,"__esModule",{value:!0});var u=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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),f=(r(l),n(0)),p=r(f),d=n(3),h=r(d),m=n(59),v=r(m),g=n(22),y=r(g);t.default=s},function(e,t,n){var r=n(5),i=r.Symbol;e.exports=i},function(e,t){function n(e,t){return e===t||e!==e&&t!==t}e.exports=n},function(e,t,n){function r(e,t){return i(e)?e:a(e,t)?[e]:o(s(e))}var i=n(2),a=n(92),o=n(269),s=n(61);e.exports=r},function(e,t,n){function r(e){if("string"==typeof e||i(e))return e;var t=e+"";return"0"==t&&1/e==-a?"-0":t}var i=n(47),a=1/0;e.exports=r},function(e,t,n){function r(e){var t=i(e),n=t%1;return t===t?n?t-n:t:0}var i=n(150);e.exports=r},function(e,t){function n(e,t){for(var n=-1,i=e.length,a=0,o=[];++n<i;){var s=e[n];s!==t&&s!==r||(e[n]=r,o[a++]=n)}return o}var r="__lodash_placeholder__";e.exports=n},function(e,t){var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString;e.exports=function(e,t,i){if("[object Function]"!==r.call(t))throw new TypeError("iterator must be a function");var a=e.length;if(a===+a)for(var o=0;o<a;o++)t.call(i,e[o],o,e);else for(var s in e)n.call(e,s)&&t.call(i,e[s],s,e)}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.RawRefinementList=void 0;var u=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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),f=(r(l),n(0)),p=r(f),d=n(3),h=r(d),m=n(1),v=n(22),g=r(v),y=n(409),b=r(y),_=n(20),w=r(_),R=n(410),P=r(R),x=n(27),j=r(x),S=n(28),C=r(S),O=t.RawRefinementList=function(e){function t(e){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.handleItemClick=n.handleItemClick.bind(n),n}return s(t,e),c(t,[{key:"shouldComponentUpdate",value:function(e,t){var n=t!==this.state,r=!(0,w.default)(this.props.facetValues,e.facetValues);return n||r}},{key:"refine",value:function(e,t){this.props.toggleRefinement(e,t)}},{key:"_generateFacetItem",value:function(e){var n=void 0;e.data&&e.data.length>0&&(n=p.default.createElement(t,u({},this.props,{depth:this.props.depth+1,facetValues:e.data})));var r=this.props.createURL(e.value),a=u({},e,{url:r,cssClasses:this.props.cssClasses}),o=(0,h.default)(this.props.cssClasses.item,i({},this.props.cssClasses.active,e.isRefined)),s=e.value;return void 0!==e.isRefined&&(s+="/"+e.isRefined),void 0!==e.count&&(s+="/"+e.count),p.default.createElement(b.default,{facetValueToRefine:e.value,handleClick:this.handleItemClick,isRefined:e.isRefined,itemClassName:o,key:s,subItems:n,templateData:a,templateKey:"item",templateProps:this.props.templateProps})}},{key:"handleItemClick",value:function(e){var t=e.facetValueToRefine,n=e.originalEvent,r=e.isRefined;if(!(0,m.isSpecialClick)(n)){if("INPUT"===n.target.tagName)return void this.refine(t,r);for(var i=n.target;i!==n.currentTarget;){if("LABEL"===i.tagName&&(i.querySelector('input[type="checkbox"]')||i.querySelector('input[type="radio"]')))return;"A"===i.tagName&&i.href&&n.preventDefault(),i=i.parentNode}n.stopPropagation(),this.refine(t,r)}}},{key:"componentWillReceiveProps",value:function(e){this.searchbox&&!e.isFromSearch&&this.searchbox.clearInput()}},{key:"refineFirstValue",value:function(){var e=this.props.facetValues[0];if(e){var t=e.value;this.props.toggleRefinement(t)}}},{key:"render",value:function(){var e=this,t=[this.props.cssClasses.list];this.props.cssClasses.depth&&t.push(""+this.props.cssClasses.depth+this.props.depth);var n=!0===this.props.showMore&&this.props.canToggleShowMore?p.default.createElement(g.default,u({rootProps:{onClick:this.props.toggleShowMore},templateKey:"show-more-"+(this.props.isShowingMore?"active":"inactive")},this.props.templateProps)):void 0,r=!0!==this.props.searchIsAlwaysActive&&!(this.props.isFromSearch||!this.props.hasExhaustiveItems),i=this.props.searchFacetValues?p.default.createElement(P.default,{ref:function(t){e.searchbox=t},placeholder:this.props.searchPlaceholder,onChange:this.props.searchFacetValues,onValidate:function(){return e.refineFirstValue()},disabled:r}):null,a=this.props.searchFacetValues&&this.props.isFromSearch&&0===this.props.facetValues.length?p.default.createElement(g.default,u({templateKey:"noResults"},this.props.templateProps)):null;return p.default.createElement("div",{className:(0,h.default)(t)},i,this.props.facetValues.map(this._generateFacetItem,this),a,n)}}]),t}(p.default.Component);O.defaultProps={cssClasses:{},depth:0},t.default=(0,j.default)((0,C.default)(O))},function(e,t,n){var r=n(215),i=n(8),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,u=r(function(){return arguments}())?r:function(e){return i(e)&&o.call(e,"callee")&&!s.call(e,"callee")};e.exports=u},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"===typeof window&&(n=window)}e.exports=n},function(e,t,n){(function(e){var r=n(5),i=n(218),a="object"==typeof t&&t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a,u=s?r.Buffer:void 0,c=u?u.isBuffer:void 0,l=c||i;e.exports=l}).call(t,n(76)(e))},function(e,t){function n(e,t){return!!(t=null==t?r:t)&&("number"==typeof e||i.test(e))&&e>-1&&e%1==0&&e<t}var r=9007199254740991,i=/^(?:0|[1-9]\d*)$/;e.exports=n},function(e,t){function n(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||r)}var r=Object.prototype;e.exports=n},function(e,t,n){function r(e,t,n){return t===t?o(e,t,n):i(e,a,n)}var i=n(117),a=n(247),o=n(248);e.exports=r},function(e,t){function n(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}e.exports=n},function(e,t,n){function r(e,t){return e&&i(e,t,a)}var i=n(123),a=n(7);e.exports=r},function(e,t,n){var r=n(44),i=n(253),a=i(r);e.exports=a},function(e,t,n){function r(e,t){return(s(e)?i:a)(e,o(t,3))}var i=n(124),a=n(254),o=n(9),s=n(2);e.exports=r},function(e,t,n){function r(e){return"symbol"==typeof e||a(e)&&i(e)==o}var i=n(13),a=n(8),o="[object Symbol]";e.exports=r},function(e,t,n){function r(e,t,n){"__proto__"==t&&i?i(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}var i=n(121);e.exports=r},function(e,t,n){function r(e){return o(e)?i(e,!0):a(e)}var i=n(111),a=n(279),o=n(11);e.exports=r},function(e,t){function n(e){return e.placeholder}e.exports=n},function(e,t){e.exports=function(e){return JSON.parse(JSON.stringify(e))}},function(e,t,n){var r=n(219),i=n(78),a=n(220),o=a&&a.isTypedArray,s=o?i(o):r;e.exports=s},function(e,t,n){var r=n(23),i=r(Object,"create");e.exports=i},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(235),a=n(236),o=n(237),s=n(238),u=n(239);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--;)if(i(e[n][0],t))return n;return-1}var i=n(30);e.exports=r},function(e,t,n){function r(e,t){var n=e.__data__;return i(t)?n["string"==typeof t?"string":"hash"]:n.map}var i=n(241);e.exports=r},function(e,t,n){function r(e){var t=this.__data__=new i(e);this.size=t.size}var i=n(54),a=n(257),o=n(258),s=n(259),u=n(260),c=n(261);r.prototype.clear=a,r.prototype.delete=o,r.prototype.get=s,r.prototype.has=u,r.prototype.set=c,e.exports=r},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}e.exports=n},function(e,t,n){function r(e,t,n){var r=null==e?void 0:i(e,t);return void 0===r?n:r}var i=n(60);e.exports=r},function(e,t,n){function r(e,t){t=i(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[a(t[n++])];return n&&n==r?e:void 0}var i=n(31),a=n(32);e.exports=r},function(e,t,n){function r(e){return null==e?"":i(e)}var i=n(93);e.exports=r},function(e,t,n){function r(e,t,n){var r=e[t];s.call(e,t)&&a(r,n)&&(void 0!==n||t in e)||i(e,t,n)}var i=n(48),a=n(30),o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t){function n(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}e.exports=n},function(e,t,n){var r=n(6),i=Object.create,a=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=a},function(e,t,n){function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var s=null==n?0:a(n);return s<0&&(s=o(r+s,0)),i(e,t,s)}var i=n(42),a=n(33),o=Math.max;e.exports=r},function(e,t){function n(e){return void 0===e}e.exports=n},function(e,t,n){var r=n(43),i=n(306),a=n(18),o=n(307),s=a(function(e){return e.push(void 0,o),r(i,void 0,e)});e.exports=s},function(e,t,n){function r(e){return i(function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&a(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var u=n[r];u&&e(t,u,r,o)}return t})}var i=n(18),a=n(98);e.exports=r},function(e,t,n){function r(e,t,n,r,R,P,x,j){var S=t&v;if(!S&&"function"!=typeof e)throw new TypeError(h);var C=r?r.length:0;if(C||(t&=~(b|_),r=R=void 0),x=void 0===x?x:w(d(x),0),j=void 0===j?j:d(j),C-=R?R.length:0,t&_){var O=r,E=R;r=R=void 0}var F=S?void 0:c(e),N=[e,t,n,r,R,O,E,P,x,j];if(F&&l(N,F),e=N[0],t=N[1],n=N[2],r=N[3],R=N[4],j=N[9]=void 0===N[9]?S?0:e.length:w(N[9]-C,0),!j&&t&(g|y)&&(t&=~(g|y)),t&&t!=m)k=t==g||t==y?o(e,t,j):t!=b&&t!=(m|b)||R.length?s.apply(void 0,N):u(e,t,n,r);else var k=a(e,t,n);return p((F?i:f)(k,N),e,t)}var i=n(157),a=n(323),o=n(324),s=n(159),u=n(335),c=n(163),l=n(336),f=n(166),p=n(167),d=n(33),h="Expected a function",m=1,v=2,g=8,y=16,b=32,_=64,w=Math.max;e.exports=r},function(e,t,n){function r(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=i(e.prototype),r=e.apply(n,t);return a(r)?r:n}}var i=n(64),a=n(6);e.exports=r},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function i(e){if(l===setTimeout)return setTimeout(e,0);if((l===n||!l)&&setTimeout)return l=setTimeout,setTimeout(e,0);try{return l(e,0)}catch(t){try{return l.call(null,e,0)}catch(t){return l.call(this,e,0)}}}function a(e){if(f===clearTimeout)return clearTimeout(e);if((f===r||!f)&&clearTimeout)return f=clearTimeout,clearTimeout(e);try{return f(e)}catch(t){try{return f.call(null,e)}catch(t){return f.call(this,e)}}}function o(){m&&d&&(m=!1,d.length?h=d.concat(h):v=-1,h.length&&s())}function s(){if(!m){var e=i(o);m=!0;for(var t=h.length;t;){for(d=h,h=[];++v<t;)d&&d[v].run();v=-1,t=h.length}d=null,m=!1,a(e)}}function u(e,t){this.fun=e,this.array=t}function c(){}var l,f,p=e.exports={};!function(){try{l="function"===typeof setTimeout?setTimeout:n}catch(e){l=n}try{f="function"===typeof clearTimeout?clearTimeout:r}catch(e){f=r}}();var d,h=[],m=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];h.push(new u(e,t)),1!==h.length||m||i(s)},u.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t,n){"use strict";function r(e,t){var r=n(35),i=this;"function"===typeof Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):i.stack=(new Error).stack||"Cannot get a stacktrace, browser is too old",this.name="AlgoliaSearchError",this.message=e||"Unknown error",t&&r(t,function(e,t){i[t]=e})}function i(e,t){function n(){var n=Array.prototype.slice.call(arguments,0);"string"!==typeof n[0]&&n.unshift(t),r.apply(this,n),this.name="AlgoliaSearch"+e+"Error"}return a(n,r),n}var a=n(175);a(r,Error),e.exports={AlgoliaSearchError:r,UnparsableJSON:i("UnparsableJSON","Could not parse the incoming response as JSON, see err.more for details"),RequestTimeout:i("RequestTimeout","Request timedout before getting a response"),Network:i("Network","Network issue, see err.more for details"),JSONPScriptFail:i("JSONPScriptFail","<script> was loaded but did not call our provided callback"),JSONPScriptError:i("JSONPScriptError","<script> unable to load due to an `error` event on it"),Unknown:i("Unknown","Unknown error occured")}},function(e,t,n){(function(r){function i(){return!("undefined"===typeof window||!window.process||"renderer"!==window.process.type)||("undefined"!==typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!==typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function a(e){var n=this.useColors;if(e[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+e[0]+(n?"%c ":" ")+"+"+t.humanize(this.diff),n){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var i=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))}),e.splice(a,0,r)}}function o(){return"object"===typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?t.storage.removeItem("debug"):t.storage.debug=e}catch(e){}}function u(){var e;try{e=t.storage.debug}catch(e){}return!e&&"undefined"!==typeof r&&"env"in r&&(e=Object({NODE_ENV:"production"}).DEBUG),e}t=e.exports=n(368),t.log=o,t.formatArgs=a,t.save=s,t.load=u,t.useColors=i,t.storage="undefined"!=typeof chrome&&"undefined"!=typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),t.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],t.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},t.enable(u())}).call(t,n(71))},function(e,t,n){"use strict";function r(e,t,n){return new i(e,t,n)}var i=n(214),a=n(75),o=n(155);r.version=n(174),r.AlgoliaSearchHelper=i,r.SearchParameters=a,r.SearchResults=o,r.url=n(105),e.exports=r},function(e,t,n){"use strict";function r(e,t){return w(e,function(e){return g(e,t)})}function i(e){var t=e?i._parseNumbers(e):{};this.index=t.index||"",this.query=t.query||"",this.facets=t.facets||[],this.disjunctiveFacets=t.disjunctiveFacets||[],this.hierarchicalFacets=t.hierarchicalFacets||[],this.facetsRefinements=t.facetsRefinements||{},this.facetsExcludes=t.facetsExcludes||{},this.disjunctiveFacetsRefinements=t.disjunctiveFacetsRefinements||{},this.numericRefinements=t.numericRefinements||{},this.tagRefinements=t.tagRefinements||[],this.hierarchicalFacetsRefinements=t.hierarchicalFacetsRefinements||{},this.numericFilters=t.numericFilters,this.tagFilters=t.tagFilters,this.optionalTagFilters=t.optionalTagFilters,this.optionalFacetFilters=t.optionalFacetFilters,this.hitsPerPage=t.hitsPerPage,this.maxValuesPerFacet=t.maxValuesPerFacet,this.page=t.page||0,this.queryType=t.queryType,this.typoTolerance=t.typoTolerance,this.minWordSizefor1Typo=t.minWordSizefor1Typo,this.minWordSizefor2Typos=t.minWordSizefor2Typos,this.minProximity=t.minProximity,this.allowTyposOnNumericTokens=t.allowTyposOnNumericTokens,this.ignorePlurals=t.ignorePlurals,this.restrictSearchableAttributes=t.restrictSearchableAttributes,this.advancedSyntax=t.advancedSyntax,this.analytics=t.analytics,this.analyticsTags=t.analyticsTags,this.synonyms=t.synonyms,this.replaceSynonymsInHighlight=t.replaceSynonymsInHighlight,this.optionalWords=t.optionalWords,this.removeWordsIfNoResults=t.removeWordsIfNoResults,this.attributesToRetrieve=t.attributesToRetrieve,this.attributesToHighlight=t.attributesToHighlight,this.highlightPreTag=t.highlightPreTag,this.highlightPostTag=t.highlightPostTag,this.attributesToSnippet=t.attributesToSnippet,this.getRankingInfo=t.getRankingInfo,this.distinct=t.distinct,this.aroundLatLng=t.aroundLatLng,this.aroundLatLngViaIP=t.aroundLatLngViaIP,this.aroundRadius=t.aroundRadius,this.minimumAroundRadius=t.minimumAroundRadius,this.aroundPrecision=t.aroundPrecision,this.insideBoundingBox=t.insideBoundingBox,this.insidePolygon=t.insidePolygon,this.snippetEllipsisText=t.snippetEllipsisText,this.disableExactOnAttributes=t.disableExactOnAttributes,this.enableExactOnSingleWordQuery=t.enableExactOnSingleWordQuery,this.offset=t.offset,this.length=t.length;var n=this;s(t,function(e,t){-1===i.PARAMETERS.indexOf(t)&&(n[t]=e)})}var a=n(7),o=n(222),s=n(251),u=n(12),c=n(46),l=n(10),f=n(15),p=n(139),d=n(65),h=n(297),m=n(2),v=n(26),g=n(20),y=n(66),b=n(21),_=n(14),w=n(16),R=n(153),P=n(67),x=n(99),j=n(310),S=n(311),C=n(312);i.PARAMETERS=a(new i),i._parseNumbers=function(e){if(e instanceof i)return e;var t={};if(u(["aroundPrecision","aroundRadius","getRankingInfo","minWordSizefor2Typos","minWordSizefor1Typo","page","maxValuesPerFacet","distinct","minimumAroundRadius","hitsPerPage","minProximity"],function(n){var r=e[n];if(b(r)){var i=parseFloat(r);t[n]=h(i)?r:i}}),e.numericRefinements){var n={};u(e.numericRefinements,function(e,t){n[t]={},u(e,function(e,r){var i=l(e,function(e){return m(e)?l(e,function(e){return b(e)?parseFloat(e):e}):b(e)?parseFloat(e):e});n[t][r]=i})}),t.numericRefinements=n}return x({},e,t)},i.make=function(e){var t=new i(e);return u(e.hierarchicalFacets,function(e){if(e.rootPath){var n=t.getHierarchicalRefinement(e.name);n.length>0&&0!==n[0].indexOf(e.rootPath)&&(t=t.clearRefinements(e.name)),n=t.getHierarchicalRefinement(e.name),0===n.length&&(t=t.toggleHierarchicalFacetRefinement(e.name,e.rootPath))}}),t},i.validate=function(e,t){var n=t||{};return e.tagFilters&&n.tagRefinements&&n.tagRefinements.length>0?new Error("[Tags] Cannot switch from the managed tag API to the advanced API. It is probably an error, if it is really what you want, you should first clear the tags with clearTags method."):e.tagRefinements.length>0&&n.tagFilters?new Error("[Tags] Cannot switch from the advanced tag API to the managed API. It is probably an error, if it is not, you should first clear the tags with clearTags method."):e.numericFilters&&n.numericRefinements&&!v(n.numericRefinements)?new Error("[Numeric filters] Can't switch from the advanced to the managed API. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):!v(e.numericRefinements)&&n.numericFilters?new Error("[Numeric filters] Can't switch from the managed API to the advanced. It is probably an error, if this is really what you want, you have to first clear the numeric filters."):null},i.prototype={constructor:i,clearRefinements:function(e){var t=C.clearRefinement;return this.setQueryParameters({numericRefinements:this._clearNumericRefinements(e),facetsRefinements:t(this.facetsRefinements,e,"conjunctiveFacet"),facetsExcludes:t(this.facetsExcludes,e,"exclude"),disjunctiveFacetsRefinements:t(this.disjunctiveFacetsRefinements,e,"disjunctiveFacet"),hierarchicalFacetsRefinements:t(this.hierarchicalFacetsRefinements,e,"hierarchicalFacet")})},clearTags:function(){return void 0===this.tagFilters&&0===this.tagRefinements.length?this:this.setQueryParameters({tagFilters:void 0,tagRefinements:[]})},setIndex:function(e){return e===this.index?this:this.setQueryParameters({index:e})},setQuery:function(e){return e===this.query?this:this.setQueryParameters({query:e})},setPage:function(e){return e===this.page?this:this.setQueryParameters({page:e})},setFacets:function(e){return this.setQueryParameters({facets:e})},setDisjunctiveFacets:function(e){return this.setQueryParameters({disjunctiveFacets:e})},setHitsPerPage:function(e){return this.hitsPerPage===e?this:this.setQueryParameters({hitsPerPage:e})},setTypoTolerance:function(e){return this.typoTolerance===e?this:this.setQueryParameters({typoTolerance:e})},addNumericRefinement:function(e,t,n){var r=j(n);if(this.isNumericRefined(e,t,r))return this;var i=x({},this.numericRefinements);return i[e]=x({},i[e]),i[e][t]?(i[e][t]=i[e][t].slice(),i[e][t].push(r)):i[e][t]=[r],this.setQueryParameters({numericRefinements:i})},getConjunctiveRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsRefinements[e]||[]},getDisjunctiveRefinements:function(e){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.disjunctiveFacetsRefinements[e]||[]},getHierarchicalRefinement:function(e){return this.hierarchicalFacetsRefinements[e]||[]},getExcludeRefinements:function(e){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.facetsExcludes[e]||[]},removeNumericRefinement:function(e,t,n){if(void 0!==n){var r=j(n);return this.isNumericRefined(e,t,r)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,i){return i===e&&n.op===t&&g(n.val,r)})}):this}return void 0!==t?this.isNumericRefined(e,t)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(n,r){return r===e&&n.op===t})}):this:this.isNumericRefined(e)?this.setQueryParameters({numericRefinements:this._clearNumericRefinements(function(t,n){return n===e})}):this},getNumericRefinements:function(e){return this.numericRefinements[e]||{}},getNumericRefinement:function(e,t){return this.numericRefinements[e]&&this.numericRefinements[e][t]},_clearNumericRefinements:function(e){return y(e)?{}:b(e)?p(this.numericRefinements,e):_(e)?f(this.numericRefinements,function(t,n,r){var i={};return u(n,function(t,n){var a=[];u(t,function(t){e({val:t,op:n},r,"numeric")||a.push(t)}),v(a)||(i[n]=a)}),v(i)||(t[r]=i),t},{}):void 0},addFacet:function(e){return this.isConjunctiveFacet(e)?this:this.setQueryParameters({facets:this.facets.concat([e])})},addDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this:this.setQueryParameters({disjunctiveFacets:this.disjunctiveFacets.concat([e])})},addHierarchicalFacet:function(e){if(this.isHierarchicalFacet(e.name))throw new Error("Cannot declare two hierarchical facets with the same name: `"+e.name+"`");return this.setQueryParameters({hierarchicalFacets:this.hierarchicalFacets.concat([e])})},addFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsRefinements,e,t)?this:this.setQueryParameters({facetsRefinements:C.addRefinement(this.facetsRefinements,e,t)})},addExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsExcludes,e,t)?this:this.setQueryParameters({facetsExcludes:C.addRefinement(this.facetsExcludes,e,t)})},addDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return C.isRefined(this.disjunctiveFacetsRefinements,e,t)?this:this.setQueryParameters({disjunctiveFacetsRefinements:C.addRefinement(this.disjunctiveFacetsRefinements,e,t)})},addTagRefinement:function(e){if(this.isTagRefined(e))return this;var t={tagRefinements:this.tagRefinements.concat(e)};return this.setQueryParameters(t)},removeFacet:function(e){return this.isConjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({facets:c(this.facets,function(t){return t!==e})}):this},removeDisjunctiveFacet:function(e){return this.isDisjunctiveFacet(e)?this.clearRefinements(e).setQueryParameters({disjunctiveFacets:c(this.disjunctiveFacets,function(t){return t!==e})}):this},removeHierarchicalFacet:function(e){return this.isHierarchicalFacet(e)?this.clearRefinements(e).setQueryParameters({hierarchicalFacets:c(this.hierarchicalFacets,function(t){return t.name!==e})}):this},removeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsRefinements,e,t)?this.setQueryParameters({facetsRefinements:C.removeRefinement(this.facetsRefinements,e,t)}):this},removeExcludeRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsExcludes,e,t)?this.setQueryParameters({facetsExcludes:C.removeRefinement(this.facetsExcludes,e,t)}):this},removeDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return C.isRefined(this.disjunctiveFacetsRefinements,e,t)?this.setQueryParameters({disjunctiveFacetsRefinements:C.removeRefinement(this.disjunctiveFacetsRefinements,e,t)}):this},removeTagRefinement:function(e){if(!this.isTagRefined(e))return this;var t={tagRefinements:c(this.tagRefinements,function(t){return t!==e})};return this.setQueryParameters(t)},toggleRefinement:function(e,t){return this.toggleFacetRefinement(e,t)},toggleFacetRefinement:function(e,t){if(this.isHierarchicalFacet(e))return this.toggleHierarchicalFacetRefinement(e,t);if(this.isConjunctiveFacet(e))return this.toggleConjunctiveFacetRefinement(e,t);if(this.isDisjunctiveFacet(e))return this.toggleDisjunctiveFacetRefinement(e,t);throw new Error("Cannot refine the undeclared facet "+e+"; it should be added to the helper options facets, disjunctiveFacets or hierarchicalFacets")},toggleConjunctiveFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsRefinements:C.toggleRefinement(this.facetsRefinements,e,t)})},toggleExcludeFacetRefinement:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return this.setQueryParameters({facetsExcludes:C.toggleRefinement(this.facetsExcludes,e,t)})},toggleDisjunctiveFacetRefinement:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return this.setQueryParameters({disjunctiveFacetsRefinements:C.toggleRefinement(this.disjunctiveFacetsRefinements,e,t)})},toggleHierarchicalFacetRefinement:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r={};return void 0!==this.hierarchicalFacetsRefinements[e]&&this.hierarchicalFacetsRefinements[e].length>0&&(this.hierarchicalFacetsRefinements[e][0]===t||0===this.hierarchicalFacetsRefinements[e][0].indexOf(t+n))?-1===t.indexOf(n)?r[e]=[]:r[e]=[t.slice(0,t.lastIndexOf(n))]:r[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:P({},r,this.hierarchicalFacetsRefinements)})},addHierarchicalFacetRefinement:function(e,t){if(this.isHierarchicalFacetRefined(e))throw new Error(e+" is already refined.");var n={};return n[e]=[t],this.setQueryParameters({hierarchicalFacetsRefinements:P({},n,this.hierarchicalFacetsRefinements)})},removeHierarchicalFacetRefinement:function(e){if(!this.isHierarchicalFacetRefined(e))throw new Error(e+" is not refined.");var t={};return t[e]=[],this.setQueryParameters({hierarchicalFacetsRefinements:P({},t,this.hierarchicalFacetsRefinements)})},toggleTagRefinement:function(e){return this.isTagRefined(e)?this.removeTagRefinement(e):this.addTagRefinement(e)},isDisjunctiveFacet:function(e){return d(this.disjunctiveFacets,e)>-1},isHierarchicalFacet:function(e){return void 0!==this.getHierarchicalFacetByName(e)},isConjunctiveFacet:function(e){return d(this.facets,e)>-1},isFacetRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsRefinements,e,t)},isExcludeRefined:function(e,t){if(!this.isConjunctiveFacet(e))throw new Error(e+" is not defined in the facets attribute of the helper configuration");return C.isRefined(this.facetsExcludes,e,t)},isDisjunctiveFacetRefined:function(e,t){if(!this.isDisjunctiveFacet(e))throw new Error(e+" is not defined in the disjunctiveFacets attribute of the helper configuration");return C.isRefined(this.disjunctiveFacetsRefinements,e,t)},isHierarchicalFacetRefined:function(e,t){if(!this.isHierarchicalFacet(e))throw new Error(e+" is not defined in the hierarchicalFacets attribute of the helper configuration");var n=this.getHierarchicalRefinement(e);return t?-1!==d(n,t):n.length>0},isNumericRefined:function(e,t,n){if(y(n)&&y(t))return!!this.numericRefinements[e];var i=this.numericRefinements[e]&&!y(this.numericRefinements[e][t]);if(y(n)||!i)return i;var a=j(n),o=!y(r(this.numericRefinements[e][t],a));return i&&o},isTagRefined:function(e){return-1!==d(this.tagRefinements,e)},getRefinedDisjunctiveFacets:function(){var e=o(a(this.numericRefinements),this.disjunctiveFacets);return a(this.disjunctiveFacetsRefinements).concat(e).concat(this.getRefinedHierarchicalFacets())},getRefinedHierarchicalFacets:function(){return o(l(this.hierarchicalFacets,"name"),a(this.hierarchicalFacetsRefinements))},getUnrefinedDisjunctiveFacets:function(){var e=this.getRefinedDisjunctiveFacets();return c(this.disjunctiveFacets,function(t){return-1===d(e,t)})},managedParameters:["index","facets","disjunctiveFacets","facetsRefinements","facetsExcludes","disjunctiveFacetsRefinements","numericRefinements","tagRefinements","hierarchicalFacets","hierarchicalFacetsRefinements"],getQueryParams:function(){var e=this.managedParameters,t={};return s(this,function(n,r){-1===d(e,r)&&void 0!==n&&(t[r]=n)}),t},getQueryParameter:function(e){if(!this.hasOwnProperty(e))throw new Error("Parameter '"+e+"' is not an attribute of SearchParameters (http://algolia.github.io/algoliasearch-helper-js/docs/SearchParameters.html)");return this[e]},setQueryParameter:function(e,t){if(this[e]===t)return this;var n={};return n[e]=t,this.setQueryParameters(n)},setQueryParameters:function(e){if(!e)return this;var t=i.validate(this,e);if(t)throw t;var n=i._parseNumbers(e);return this.mutateMe(function(t){var r=a(e);return u(r,function(e){t[e]=n[e]}),t})},filter:function(e){return S(this,e)},mutateMe:function(e){var t=new this.constructor(this);return e(t,this),t},_getHierarchicalFacetSortBy:function(e){return e.sortBy||["isRefined:desc","name:asc"]},_getHierarchicalFacetSeparator:function(e){return e.separator||" > "},_getHierarchicalRootPath:function(e){return e.rootPath||null},_getHierarchicalShowParentLevel:function(e){return"boolean"!==typeof e.showParentLevel||e.showParentLevel},getHierarchicalFacetByName:function(e){return w(this.hierarchicalFacets,{name:e})},getHierarchicalFacetBreadcrumb:function(e){if(!this.isHierarchicalFacet(e))throw new Error("Cannot get the breadcrumb of an unknown hierarchical facet: `"+e+"`");var t=this.getHierarchicalRefinement(e)[0];if(!t)return[];var n=this._getHierarchicalFacetSeparator(this.getHierarchicalFacetByName(e)),r=t.split(n);return l(r,R)}},e.exports=i},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=r}var r=9007199254740991;e.exports=n},function(e,t){function n(e){return function(t){return e(t)}}e.exports=n},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new i;++t<n;)this.add(e[t])}var i=n(80),a=n(245),o=n(246);r.prototype.add=r.prototype.push=a,r.prototype.has=o,e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(224),a=n(240),o=n(242),s=n(243),u=n(244);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){var r=n(23),i=n(5),a=r(i,"Map");e.exports=a},function(e,t,n){function r(e,t){return!!(null==e?0:e.length)&&i(e,t,0)>-1}var i=n(42);e.exports=r},function(e,t){function n(e,t){return e.has(t)}e.exports=n},function(e,t,n){var r=n(249),i=n(122),a=i(r);e.exports=a},function(e,t,n){function r(e){return a(e)&&i(e)}var i=n(11),a=n(8);e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:i}var i=n(24);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}e.exports=n},function(e,t,n){function r(e,t,n,o,s){return e===t||(null==e||null==t||!a(e)&&!a(t)?e!==e&&t!==t:i(e,t,n,o,r,s))}var i=n(262),a=n(8);e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}e.exports=n},function(e,t,n){var r=n(124),i=n(131),a=Object.prototype,o=a.propertyIsEnumerable,s=Object.getOwnPropertySymbols,u=s?function(e){return null==e?[]:(e=Object(e),r(s(e),function(t){return o.call(e,t)}))}:i;e.exports=u},function(e,t,n){var r=n(265),i=n(81),a=n(266),o=n(132),s=n(133),u=n(13),c=n(116),l=c(r),f=c(i),p=c(a),d=c(o),h=c(s),m=u;(r&&"[object DataView]"!=m(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=m(new i)||a&&"[object Promise]"!=m(a.resolve())||o&&"[object Set]"!=m(new o)||s&&"[object WeakMap]"!=m(new s))&&(m=function(e){var t=u(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case l:return"[object DataView]";case f:return"[object Map]";case p:return"[object Promise]";case d:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=m},function(e,t,n){function r(e,t){if(i(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!a(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}var i=n(2),a=n(47),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=r},function(e,t,n){function r(e){if("string"==typeof e)return e;if(o(e))return a(e,r)+"";if(s(e))return l?l.call(e):"";var t=e+"";return"0"==t&&1/e==-u?"-0":t}var i=n(29),a=n(17),o=n(2),s=n(47),u=1/0,c=i?i.prototype:void 0,l=c?c.toString:void 0;e.exports=r},function(e,t){function n(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}e.exports=n},function(e,t,n){var r=n(115),i=r(Object.getPrototypeOf,Object);e.exports=i},function(e,t,n){function r(e){return i(e,o,a)}var i=n(130),a=n(142),o=n(49);e.exports=r},function(e,t,n){function r(e){var t=new e.constructor(e.byteLength);return new i(t).set(new i(e)),t}var i=n(127);e.exports=r},function(e,t,n){function r(e,t,n){if(!s(n))return!1;var r=typeof t;return!!("number"==r?a(n)&&o(t,n.length):"string"==r&&t in n)&&i(n[t],e)}var i=n(30),a=n(11),o=n(40),s=n(6);e.exports=r},function(e,t,n){var r=n(100),i=n(68),a=i(function(e,t,n){r(e,t,n)});e.exports=a},function(e,t,n){function r(e,t,n,l,f){e!==t&&o(t,function(o,c){if(u(o))f||(f=new i),s(e,t,c,n,r,l,f);else{var p=l?l(e[c],o,c+"",e,t,f):void 0;void 0===p&&(p=o),a(e,c,p)}},c)}var i=n(57),a=n(154),o=n(123),s=n(308),u=n(6),c=n(49);e.exports=r},function(e,t,n){function r(e,t,n,r){e=a(e)?e:u(e),n=n&&!r?s(n):0;var l=e.length;return n<0&&(n=c(l+n,0)),o(e)?n<=l&&e.indexOf(t,n)>-1:!!l&&i(e,t,n)>-1}var i=n(42),a=n(11),o=n(21),s=n(33),u=n(316),c=Math.max;e.exports=r},function(e,t,n){function r(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=o,this.__views__=[]}var i=n(64),a=n(103),o=4294967295;r.prototype=i(a.prototype),r.prototype.constructor=r,e.exports=r},function(e,t){function n(){}e.exports=n},function(e,t){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(e){return"function"===typeof e}function i(e){return"number"===typeof e}function a(e){return"object"===typeof e&&null!==e}function o(e){return void 0===e}e.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(e){if(!i(e)||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},n.prototype.emit=function(e){var t,n,i,s,u,c;if(this._events||(this._events={}),"error"===e&&(!this._events.error||a(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var l=new Error('Uncaught, unspecified "error" event. ('+t+")");throw l.context=t,l}if(n=this._events[e],o(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(a(n))for(s=Array.prototype.slice.call(arguments,1),c=n.slice(),i=c.length,u=0;u<i;u++)c[u].apply(this,s);return!0},n.prototype.addListener=function(e,t){var i;if(!r(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,r(t.listener)?t.listener:t),this._events[e]?a(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,a(this._events[e])&&!this._events[e].warned&&(i=o(this._maxListeners)?n.defaultMaxListeners:this._maxListeners)&&i>0&&this._events[e].length>i&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"===typeof console.trace&&console.trace()),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(e,t){function n(){this.removeListener(e,n),i||(i=!0,t.apply(this,arguments))}if(!r(t))throw TypeError("listener must be a function");var i=!1;return n.listener=t,this.on(e,n),this},n.prototype.removeListener=function(e,t){var n,i,o,s;if(!r(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(n=this._events[e],o=n.length,i=-1,n===t||r(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(a(n)){for(s=o;s-- >0;)if(n[s]===t||n[s].listener&&n[s].listener===t){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},n.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[e],r(n))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},n.prototype.listeners=function(e){return this._events&&this._events[e]?r(this._events[e])?[this._events[e]]:this._events[e].slice():[]},n.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(r(t))return 1;if(t)return t.length}return 0},n.listenerCount=function(e,t){return e.listenerCount(t)}},function(e,t,n){"use strict";function r(e){return m(e)?d(e,r):v(e)?f(e,r):h(e)?b(e):e}function i(e,t,n,r){if(null!==e&&(n=n.replace(e,""),r=r.replace(e,"")),n=t[n]||n,r=t[r]||r,-1!==w.indexOf(n)||-1!==w.indexOf(r)){if("q"===n)return-1;if("q"===r)return 1;var i=-1!==_.indexOf(n),a=-1!==_.indexOf(r);if(i&&!a)return 1;if(a&&!i)return-1}return n.localeCompare(r)}var a=n(347),o=n(75),s=n(350),u=n(353),c=n(12),l=n(354),f=n(10),p=n(173),d=n(107),h=n(21),m=n(25),v=n(2),g=n(26),y=n(171),b=n(106).encode,_=["dFR","fR","nR","hFR","tR"],w=a.ENCODED_PARAMETERS;t.getStateFromQueryString=function(e,t){var n=t&&t.prefix||"",r=t&&t.mapping||{},i=y(r),u=s.parse(e),c=new RegExp("^"+n),f=p(u,function(e,t){var r=n&&c.test(t),o=r?t.replace(c,""):t;return a.decode(i[o]||o)||o}),d=o._parseNumbers(f);return l(d,o.PARAMETERS)},t.getUnrecognizedParametersInQueryString=function(e,t){var n=t&&t.prefix,r=t&&t.mapping||{},i=y(r),o={},u=s.parse(e);if(n){var l=new RegExp("^"+n);c(u,function(e,t){l.test(t)||(o[t]=e)})}else c(u,function(e,t){a.decode(i[t]||t)||(o[t]=e)});return o},t.getQueryStringFromState=function(e,t){var n=t&&t.moreAttributes,o=t&&t.prefix||"",c=t&&t.mapping||{},l=t&&t.safe||!1,f=y(c),d=l?e:r(e),h=p(d,function(e,t){var n=a.encode(t);return o+(c[n]||n)}),m=""===o?null:new RegExp("^"+o),v=u(i,null,m,f);if(!g(n)){var b=s.stringify(h,{encode:l,sort:v}),_=s.stringify(n,{encode:l});return b?b+"&"+_:_}return s.stringify(h,{encode:l,sort:v})}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var n=t&&t.plainObjects?Object.create(null):{},r=0;r<e.length;++r)"undefined"!==typeof e[r]&&(n[r]=e[r]);return n},t.merge=function(e,n,i){if(!n)return e;if("object"!==typeof n){if(Array.isArray(e))e.push(n);else{if("object"!==typeof e)return[e,n];(i.plainObjects||i.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!==typeof e)return[e].concat(n);var a=e;return Array.isArray(e)&&!Array.isArray(n)&&(a=t.arrayToObject(e,i)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,a){r.call(e,a)?e[a]&&"object"===typeof e[a]?e[a]=t.merge(e[a],n,i):e.push(n):e[a]=n}),e):Object.keys(n).reduce(function(e,a){var o=n[a];return r.call(e,a)?e[a]=t.merge(e[a],o,i):e[a]=o,e},a)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,n){return e[n]=t[n],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"===typeof e?e:String(e),n="",r=0;r<t.length;++r){var a=t.charCodeAt(r);45===a||46===a||95===a||126===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n+=t.charAt(r):a<128?n+=i[a]:a<2048?n+=i[192|a>>6]+i[128|63&a]:a<55296||a>=57344?n+=i[224|a>>12]+i[128|a>>6&63]+i[128|63&a]:(r+=1,a=65536+((1023&a)<<10|1023&t.charCodeAt(r)),n+=i[240|a>>18]+i[128|a>>12&63]+i[128|a>>6&63]+i[128|63&a])}return n},t.compact=function(e,n){if("object"!==typeof e||null===e)return e;var r=n||[],i=r.indexOf(e);if(-1!==i)return r[i];if(r.push(e),Array.isArray(e)){for(var a=[],o=0;o<e.length;++o)e[o]&&"object"===typeof e[o]?a.push(t.compact(e[o],r)):"undefined"!==typeof e[o]&&a.push(e[o]);return a}return Object.keys(e).forEach(function(n){e[n]=t.compact(e[n],r)}),e},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!==e&&"undefined"!==typeof e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}},function(e,t,n){function r(e,t){var n={};return t=o(t,3),a(e,function(e,r,a){i(n,r,t(e,r,a))}),n}var i=n(48),a=n(44),o=n(9);e.exports=r},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){var r=n(35);e.exports=function(e,t){var n=[];return r(e,function(r,i){n.push(t(r,i,e))}),n}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.RawSelector=void 0;var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(4),c=(r(u),n(0)),l=r(c),f=n(27),p=r(f),d=n(28),h=r(d),m=t.RawSelector=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"componentWillMount",value:function(){this.handleChange=this.handleChange.bind(this)}},{key:"handleChange",value:function(e){this.props.setValue(e.target.value)}},{key:"render",value:function(){var e=this,t=this.props,n=t.currentValue,r=t.options;return l.default.createElement("select",{className:this.props.cssClasses.root,onChange:this.handleChange,value:n},r.map(function(t){return l.default.createElement("option",{className:e.props.cssClasses.item,key:t.label+t.value,value:t.value},t.label)}))}}]),t}(l.default.Component);t.default=(0,p.default)((0,h.default)(m))},function(e,t,n){function r(e,t){var n=o(e),r=!n&&a(e),l=!n&&!r&&s(e),p=!n&&!r&&!l&&c(e),d=n||r||l||p,h=d?i(e.length,String):[],m=h.length;for(var v in e)!t&&!f.call(e,v)||d&&("length"==v||l&&("offset"==v||"parent"==v)||p&&("buffer"==v||"byteLength"==v||"byteOffset"==v)||u(v,m))||h.push(v);return h}var i=n(112),a=n(37),o=n(2),s=n(39),u=n(40),c=n(52),l=Object.prototype,f=l.hasOwnProperty;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}e.exports=n},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(t,n(38))},function(e,t,n){function r(e){if(!i(e))return a(e);var t=[];for(var n in Object(e))s.call(e,n)&&"constructor"!=n&&t.push(n);return t}var i=n(41),a=n(221),o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t){function n(e,t){return function(n){return e(t(n))}}e.exports=n},function(e,t){function n(e){if(null!=e){try{return i.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var r=Function.prototype,i=r.toString;e.exports=n},function(e,t){function n(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}e.exports=n},function(e,t){function n(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}e.exports=n},function(e,t,n){function r(e,t,n){return t=a(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,s=a(r.length-t,0),u=Array(s);++o<s;)u[o]=r[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=r[o];return c[t]=n(u),i(e,this,c)}}var i=n(43),a=Math.max;e.exports=r},function(e,t){function n(e){return function(){return e}}e.exports=n},function(e,t,n){var r=n(23),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t){function n(e){var t=0,n=0;return function(){var o=a(),s=i-(o-n);if(n=o,s>0){if(++t>=r)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var r=800,i=16,a=Date.now;e.exports=n},function(e,t,n){var r=n(252),i=r();e.exports=i},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}e.exports=n},function(e,t,n){function r(e,t,n,r,c,l){var f=n&s,p=e.length,d=t.length;if(p!=d&&!(f&&d>p))return!1;var h=l.get(e);if(h&&l.get(t))return h==t;var m=-1,v=!0,g=n&u?new i:void 0;for(l.set(e,t),l.set(t,e);++m<p;){var y=e[m],b=t[m];if(r)var _=f?r(b,y,m,t,e,l):r(y,b,m,e,t,l);if(void 0!==_){if(_)continue;v=!1;break}if(g){if(!a(t,function(e,t){if(!o(g,t)&&(y===e||c(y,e,n,r,l)))return g.push(t)})){v=!1;break}}else if(y!==b&&!c(y,b,n,r,l)){v=!1;break}}return l.delete(e),l.delete(t),v}var i=n(79),a=n(126),o=n(83),s=1,u=2;e.exports=r},function(e,t){function n(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}e.exports=n},function(e,t,n){var r=n(5),i=r.Uint8Array;e.exports=i},function(e,t){function n(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}e.exports=n},function(e,t,n){function r(e){return i(e,o,a)}var i=n(130),a=n(90),o=n(7);e.exports=r},function(e,t,n){function r(e,t,n){var r=t(e);return a(e)?r:i(r,n(e))}var i=n(89),a=n(2);e.exports=r},function(e,t){function n(){return[]}e.exports=n},function(e,t,n){var r=n(23),i=n(5),a=r(i,"Set");e.exports=a},function(e,t,n){var r=n(23),i=n(5),a=r(i,"WeakMap");e.exports=a},function(e,t,n){function r(e){return e===e&&!i(e)}var i=n(6);e.exports=r},function(e,t){function n(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}e.exports=n},function(e,t,n){function r(e,t){return null!=e&&a(e,t,i)}var i=n(272),a=n(137);e.exports=r},function(e,t,n){function r(e,t,n){t=i(t,e);for(var r=-1,l=t.length,f=!1;++r<l;){var p=c(t[r]);if(!(f=null!=e&&n(e,p)))break;e=e[p]}return f||++r!=l?f:!!(l=null==e?0:e.length)&&u(l)&&s(p,l)&&(o(e)||a(e))}var i=n(31),a=n(37),o=n(2),s=n(40),u=n(77),c=n(32);e.exports=r},function(e,t,n){function r(e,t){var n=-1,r=a(e)?Array(e.length):[];return i(e,function(e,i,a){r[++n]=t(e,i,a)}),r}var i=n(45),a=n(11);e.exports=r},function(e,t,n){var r=n(17),i=n(140),a=n(292),o=n(31),s=n(19),u=n(294),c=n(147),l=n(96),f=c(function(e,t){var n={};if(null==e)return n;var c=!1;t=r(t,function(t){return t=o(t,e),c||(c=t.length>1),t}),s(e,l(e),n),c&&(n=i(n,7,u));for(var f=t.length;f--;)a(n,t[f]);return n});e.exports=f},function(e,t,n){function r(e,t,n,N,k,T){var M,A=t&P,L=t&x,H=t&j;if(n&&(M=k?n(e,N,k,T):n(e)),void 0!==M)return M;if(!w(e))return e;var I=b(e);if(I){if(M=v(e),!A)return l(e,M)}else{var U=m(e),D=U==C||U==O;if(_(e))return c(e,A);if(U==E||U==S||D&&!k){if(M=L||D?{}:y(e),!A)return L?p(e,u(M,e)):f(e,s(M,e))}else{if(!F[U])return k?e:{};M=g(e,U,r,A)}}T||(T=new i);var V=T.get(e);if(V)return V;T.set(e,M);var B=H?L?h:d:L?keysIn:R,Q=I?void 0:B(e);return a(Q||e,function(i,a){Q&&(a=i,i=e[a]),o(M,a,r(i,t,n,a,e,T))}),M}var i=n(57),a=n(87),o=n(62),s=n(277),u=n(278),c=n(141),l=n(63),f=n(281),p=n(282),d=n(129),h=n(96),m=n(91),v=n(283),g=n(284),y=n(144),b=n(2),_=n(39),w=n(6),R=n(7),P=1,x=2,j=4,S="[object Arguments]",C="[object Function]",O="[object GeneratorFunction]",E="[object Object]",F={};F[S]=F["[object Array]"]=F["[object ArrayBuffer]"]=F["[object DataView]"]=F["[object Boolean]"]=F["[object Date]"]=F["[object Float32Array]"]=F["[object Float64Array]"]=F["[object Int8Array]"]=F["[object Int16Array]"]=F["[object Int32Array]"]=F["[object Map]"]=F["[object Number]"]=F[E]=F["[object RegExp]"]=F["[object Set]"]=F["[object String]"]=F["[object Symbol]"]=F["[object Uint8Array]"]=F["[object Uint8ClampedArray]"]=F["[object Uint16Array]"]=F["[object Uint32Array]"]=!0,F["[object Error]"]=F[C]=F["[object WeakMap]"]=!1,e.exports=r},function(e,t,n){(function(e){function r(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}var i=n(5),a="object"==typeof t&&t&&!t.nodeType&&t,o=a&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===a,u=s?i.Buffer:void 0,c=u?u.allocUnsafe:void 0;e.exports=r}).call(t,n(76)(e))},function(e,t,n){var r=n(89),i=n(95),a=n(90),o=n(131),s=Object.getOwnPropertySymbols,u=s?function(e){for(var t=[];e;)r(t,a(e)),e=i(e);return t}:o;e.exports=u},function(e,t,n){function r(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}var i=n(97);e.exports=r},function(e,t,n){function r(e){return"function"!=typeof e.constructor||o(e)?{}:i(a(e))}var i=n(64),a=n(95),o=n(41);e.exports=r},function(e,t){function n(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}e.exports=n},function(e,t){function n(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}e.exports=n},function(e,t,n){function r(e){return o(a(e,void 0,i),e+"")}var i=n(148),a=n(119),o=n(84);e.exports=r},function(e,t,n){function r(e){return(null==e?0:e.length)?i(e,1):[]}var i=n(149);e.exports=r},function(e,t,n){function r(e,t,n,o,s){var u=-1,c=e.length;for(n||(n=a),s||(s=[]);++u<c;){var l=e[u];t>0&&n(l)?t>1?r(l,t-1,n,o,s):i(s,l):o||(s[s.length]=l)}return s}var i=n(89),a=n(295);e.exports=r},function(e,t,n){function r(e){if(!e)return 0===e?e:0;if((e=i(e))===a||e===-a){return(e<0?-1:1)*o}return e===e?e:0}var i=n(296),a=1/0,o=1.7976931348623157e308;e.exports=r},function(e,t,n){function r(e){return"number"==typeof e||a(e)&&i(e)==o}var i=n(13),a=n(8),o="[object Number]";e.exports=r},function(e,t,n){function r(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var u=null==n?0:o(n);return u<0&&(u=s(r+u,0)),i(e,a(t,3),u)}var i=n(117),a=n(9),o=n(33),s=Math.max;e.exports=r},function(e,t,n){function r(e,t,n){if((e=c(e))&&(n||void 0===t))return e.replace(l,"");if(!e||!(t=i(t)))return e;var r=u(e),f=u(t),p=s(r,f),d=o(r,f)+1;return a(r,p,d).join("")}var i=n(93),a=n(299),o=n(300),s=n(301),u=n(302),c=n(61),l=/^\s+|\s+$/g;e.exports=r},function(e,t,n){function r(e,t,n){(void 0===n||a(e[t],n))&&(void 0!==n||t in e)||i(e,t,n)}var i=n(48),a=n(30);e.exports=r},function(e,t,n){"use strict";function r(e){var t={};return d(e,function(e,n){t[e]=n}),t}function i(e,t,n){t&&t[n]&&(e.stats=t[n])}function a(e,t){return b(e,function(e){return _(e.attributes,t)})}function o(e,t){var n=t[0];this._rawResults=t,this.query=n.query,this.parsedQuery=n.parsedQuery,this.hits=n.hits,this.index=n.index,this.hitsPerPage=n.hitsPerPage,this.nbHits=n.nbHits,this.nbPages=n.nbPages,this.page=n.page,this.processingTimeMS=y(t,"processingTimeMS"),this.aroundLatLng=n.aroundLatLng,this.automaticRadius=n.automaticRadius,this.serverUsed=n.serverUsed,this.timeoutCounts=n.timeoutCounts,this.timeoutHits=n.timeoutHits,this.exhaustiveFacetsCount=n.exhaustiveFacetsCount,this.exhaustiveNbHits=n.exhaustiveNbHits,this.disjunctiveFacets=[],this.hierarchicalFacets=w(e.hierarchicalFacets,function(){return[]}),this.facets=[];var o=e.getRefinedDisjunctiveFacets(),s=r(e.facets),u=r(e.disjunctiveFacets),c=1,l=this;d(n.facets,function(t,r){var o=a(e.hierarchicalFacets,r);if(o){var c=o.attributes.indexOf(r),f=v(e.hierarchicalFacets,{name:o.name});l.hierarchicalFacets[f][c]={attribute:r,data:t,exhaustive:n.exhaustiveFacetsCount}}else{var p,d=-1!==m(e.disjunctiveFacets,r),h=-1!==m(e.facets,r);d&&(p=u[r],l.disjunctiveFacets[p]={name:r,data:t,exhaustive:n.exhaustiveFacetsCount},i(l.disjunctiveFacets[p],n.facets_stats,r)),h&&(p=s[r],l.facets[p]={name:r,data:t,exhaustive:n.exhaustiveFacetsCount},i(l.facets[p],n.facets_stats,r))}}),this.hierarchicalFacets=h(this.hierarchicalFacets),d(o,function(r){var a=t[c],o=e.getHierarchicalFacetByName(r);d(a.facets,function(t,r){var s;if(o){s=v(e.hierarchicalFacets,{name:o.name});var c=v(l.hierarchicalFacets[s],{attribute:r});if(-1===c)return;l.hierarchicalFacets[s][c].data=x({},l.hierarchicalFacets[s][c].data,t)}else{s=u[r];var f=n.facets&&n.facets[r]||{};l.disjunctiveFacets[s]={name:r,data:P({},t,f),exhaustive:a.exhaustiveFacetsCount},i(l.disjunctiveFacets[s],a.facets_stats,r),e.disjunctiveFacetsRefinements[r]&&d(e.disjunctiveFacetsRefinements[r],function(t){!l.disjunctiveFacets[s].data[t]&&m(e.disjunctiveFacetsRefinements[r],t)>-1&&(l.disjunctiveFacets[s].data[t]=0)})}}),c++}),d(e.getRefinedHierarchicalFacets(),function(n){var r=e.getHierarchicalFacetByName(n),i=e._getHierarchicalFacetSeparator(r),a=e.getHierarchicalRefinement(n);if(!(0===a.length||a[0].split(i).length<2)){var o=t[c];d(o.facets,function(t,n){var o=v(e.hierarchicalFacets,{name:r.name}),s=v(l.hierarchicalFacets[o],{attribute:n});if(-1!==s){var u={};if(a.length>0){var c=a[0].split(i)[0];u[c]=l.hierarchicalFacets[o][s].data[c]}l.hierarchicalFacets[o][s].data=P(u,t,l.hierarchicalFacets[o][s].data)}}),c++}}),d(e.facetsExcludes,function(e,t){var r=s[t];l.facets[r]={name:t,data:n.facets[t],exhaustive:n.exhaustiveFacetsCount},d(e,function(e){l.facets[r]=l.facets[r]||{name:t},l.facets[r].data=l.facets[r].data||{},l.facets[r].data[e]=0})}),this.hierarchicalFacets=w(this.hierarchicalFacets,F(e)),this.facets=h(this.facets),this.disjunctiveFacets=h(this.disjunctiveFacets),this._state=e}function s(e,t){var n={name:t};if(e._state.isConjunctiveFacet(t)){var r=b(e.facets,n);return r?w(r.data,function(n,r){return{name:r,count:n,isRefined:e._state.isFacetRefined(t,r),isExcluded:e._state.isExcludeRefined(t,r)}}):[]}if(e._state.isDisjunctiveFacet(t)){var i=b(e.disjunctiveFacets,n);return i?w(i.data,function(n,r){return{name:r,count:n,isRefined:e._state.isDisjunctiveFacetRefined(t,r)}}):[]}if(e._state.isHierarchicalFacet(t))return b(e.hierarchicalFacets,n)}function u(e,t){if(!t.data||0===t.data.length)return t;var n=w(t.data,C(u,e)),r=e(n);return x({},t,{data:r})}function c(e,t){return t.sort(e)}function l(e,t){var n=b(e,{name:t});return n&&n.stats}function f(e,t,n,r,i){var a=b(i,{name:n}),o=g(a,"data["+r+"]"),s=g(a,"exhaustive");return{type:t,attributeName:n,name:r,count:o||0,exhaustive:s||!1}}function p(e,t,n,r){for(var i=b(r,{name:t}),a=e.getHierarchicalFacetByName(t),o=n.split(a.separator),s=o[o.length-1],u=0;void 0!==i&&u<o.length;++u)i=b(i.data,{name:o[u]});var c=g(i,"count"),l=g(i,"exhaustive");return{type:"hierarchical",attributeName:t,name:s,count:c||0,exhaustive:l||!1}}var d=n(12),h=n(313),m=n(65),v=n(152),g=n(59),y=n(314),b=n(16),_=n(101),w=n(10),R=n(156),P=n(67),x=n(99),j=n(2),S=n(14),C=n(322),O=n(337),E=n(168),F=n(340);o.prototype.getFacetByName=function(e){var t={name:e};return b(this.facets,t)||b(this.disjunctiveFacets,t)||b(this.hierarchicalFacets,t)},o.DEFAULT_SORT=["isRefined:desc","count:desc","name:asc"],o.prototype.getFacetValues=function(e,t){var n=s(this,e);if(!n)throw new Error(e+" is not a retrieved facet.");var r=P({},t,{sortBy:o.DEFAULT_SORT});if(j(r.sortBy)){var i=E(r.sortBy,o.DEFAULT_SORT);return j(n)?R(n,i[0],i[1]):u(O(R,i[0],i[1]),n)}if(S(r.sortBy))return j(n)?n.sort(r.sortBy):u(C(c,r.sortBy),n);throw new Error("options.sortBy is optional but if defined it must be either an array of string (predicates) or a sorting function")},o.prototype.getFacetStats=function(e){if(this._state.isConjunctiveFacet(e))return l(this.facets,e);if(this._state.isDisjunctiveFacet(e))return l(this.disjunctiveFacets,e);throw new Error(e+" is not present in `facets` or `disjunctiveFacets`")},o.prototype.getRefinements=function(){var e=this._state,t=this,n=[];return d(e.facetsRefinements,function(r,i){d(r,function(r){n.push(f(e,"facet",i,r,t.facets))})}),d(e.facetsExcludes,function(r,i){d(r,function(r){n.push(f(e,"exclude",i,r,t.facets))})}),d(e.disjunctiveFacetsRefinements,function(r,i){d(r,function(r){n.push(f(e,"disjunctive",i,r,t.disjunctiveFacets))})}),d(e.hierarchicalFacetsRefinements,function(r,i){d(r,function(r){n.push(p(e,i,r,t.hierarchicalFacets))})}),d(e.numericRefinements,function(e,t){d(e,function(e,r){d(e,function(e){n.push({type:"numeric",attributeName:t,name:e,numericValue:e,operator:r})})})}),d(e.tagRefinements,function(e){n.push({type:"tag",attributeName:"_tags",name:e})}),n},e.exports=o},function(e,t,n){function r(e,t,n,r){return null==e?[]:(a(t)||(t=null==t?[]:[t]),n=r?void 0:n,a(n)||(n=null==n?[]:[n]),i(e,t,n))}var i=n(318),a=n(2);e.exports=r},function(e,t,n){var r=n(24),i=n(158),a=i?function(e,t){return i.set(e,t),e}:r;e.exports=a},function(e,t,n){var r=n(133),i=r&&new r;e.exports=i},function(e,t,n){function r(e,t,n,b,_,w,R,P,x,j){function S(){for(var d=arguments.length,h=Array(d),m=d;m--;)h[m]=arguments[m];if(F)var v=c(S),g=o(h,v);if(b&&(h=i(h,b,_,F)),w&&(h=a(h,w,R,F)),d-=g,F&&d<j){var y=f(h,v);return u(e,t,r,S.placeholder,n,h,y,P,x,j-d)}var T=O?n:this,M=E?T[e]:e;return d=h.length,P?h=l(h,P):N&&d>1&&h.reverse(),C&&x<d&&(h.length=x),this&&this!==p&&this instanceof S&&(M=k||s(M)),M.apply(T,h)}var C=t&g,O=t&d,E=t&h,F=t&(m|v),N=t&y,k=E?void 0:s(e);return S}var i=n(160),a=n(161),o=n(325),s=n(70),u=n(162),c=n(50),l=n(334),f=n(34),p=n(5),d=1,h=2,m=8,v=16,g=128,y=512;e.exports=r},function(e,t){function n(e,t,n,i){for(var a=-1,o=e.length,s=n.length,u=-1,c=t.length,l=r(o-s,0),f=Array(c+l),p=!i;++u<c;)f[u]=t[u];for(;++a<s;)(p||a<o)&&(f[n[a]]=e[a]);for(;l--;)f[u++]=e[a++];return f}var r=Math.max;e.exports=n},function(e,t){function n(e,t,n,i){for(var a=-1,o=e.length,s=-1,u=n.length,c=-1,l=t.length,f=r(o-u,0),p=Array(f+l),d=!i;++a<f;)p[a]=e[a];for(var h=a;++c<l;)p[h+c]=t[c];for(;++s<u;)(d||a<o)&&(p[h+n[s]]=e[a++]);return p}var r=Math.max;e.exports=n},function(e,t,n){function r(e,t,n,r,d,h,m,v,g,y){var b=t&l,_=b?m:void 0,w=b?void 0:m,R=b?h:void 0,P=b?void 0:h;t|=b?f:p,(t&=~(b?p:f))&c||(t&=~(s|u));var x=[e,t,d,R,_,P,w,v,g,y],j=n.apply(void 0,x);return i(e)&&a(j,x),j.placeholder=r,o(j,e,t)}var i=n(326),a=n(166),o=n(167),s=1,u=2,c=4,l=8,f=32,p=64;e.exports=r},function(e,t,n){var r=n(158),i=n(164),a=r?function(e){return r.get(e)}:i;e.exports=a},function(e,t){function n(){}e.exports=n},function(e,t,n){function r(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}var i=n(64),a=n(103);r.prototype=i(a.prototype),r.prototype.constructor=r,e.exports=r},function(e,t,n){var r=n(157),i=n(122),a=i(r);e.exports=a},function(e,t,n){function r(e,t,n){var r=t+"";return o(e,a(r,s(i(r),n)))}var i=n(331),a=n(332),o=n(84),s=n(333);e.exports=r},function(e,t,n){"use strict";var r=n(15),i=n(16),a=n(338);e.exports=function(e,t){return r(e,function(e,n){var r=n.split(":");if(t&&1===r.length){var o=i(t,function(e){return a(e,n[0])});o&&(r=o.split(":"))}return e[0].push(r[0]),e[1].push(r[1]),e},[[],[]])}},function(e,t,n){function r(e,t,n){for(var r=-1,s=t.length,u={};++r<s;){var c=t[r],l=i(e,c);n(l,c)&&a(u,o(c,e),l)}return u}var i=n(60),a=n(342),o=n(31);e.exports=r},function(e,t,n){(function(e,r){function i(e,n){var r={seen:[],stylize:o};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),m(n)?r.showHidden=n:n&&t._extend(r,n),w(r.showHidden)&&(r.showHidden=!1),w(r.depth)&&(r.depth=2),w(r.colors)&&(r.colors=!1),w(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=a),u(r,e,r.depth)}function a(e,t){var n=i.styles[t];return n?"\x1b["+i.colors[n][0]+"m"+e+"\x1b["+i.colors[n][1]+"m":e}function o(e,t){return e}function s(e){var t={};return e.forEach(function(e,n){t[e]=!0}),t}function u(e,n,r){if(e.customInspect&&n&&S(n.inspect)&&n.inspect!==t.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(r,e);return b(i)||(i=u(e,i,r)),i}var a=c(e,n);if(a)return a;var o=Object.keys(n),m=s(o);if(e.showHidden&&(o=Object.getOwnPropertyNames(n)),j(n)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return l(n);if(0===o.length){if(S(n)){var v=n.name?": "+n.name:"";return e.stylize("[Function"+v+"]","special")}if(R(n))return e.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return e.stylize(Date.prototype.toString.call(n),"date");if(j(n))return l(n)}var g="",y=!1,_=["{","}"];if(h(n)&&(y=!0,_=["[","]"]),S(n)){g=" [Function"+(n.name?": "+n.name:"")+"]"}if(R(n)&&(g=" "+RegExp.prototype.toString.call(n)),x(n)&&(g=" "+Date.prototype.toUTCString.call(n)),j(n)&&(g=" "+l(n)),0===o.length&&(!y||0==n.length))return _[0]+g+_[1];if(r<0)return R(n)?e.stylize(RegExp.prototype.toString.call(n),"regexp"):e.stylize("[Object]","special");e.seen.push(n);var w;return w=y?f(e,n,r,m,o):o.map(function(t){return p(e,n,r,m,t,y)}),e.seen.pop(),d(w,g,_)}function c(e,t){if(w(t))return e.stylize("undefined","undefined");if(b(t)){var n="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(n,"string")}return y(t)?e.stylize(""+t,"number"):m(t)?e.stylize(""+t,"boolean"):v(t)?e.stylize("null","null"):void 0}function l(e){return"["+Error.prototype.toString.call(e)+"]"}function f(e,t,n,r,i){for(var a=[],o=0,s=t.length;o<s;++o)N(t,String(o))?a.push(p(e,t,n,r,String(o),!0)):a.push("");return i.forEach(function(i){i.match(/^\d+$/)||a.push(p(e,t,n,r,i,!0))}),a}function p(e,t,n,r,i,a){var o,s,c;if(c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]},c.get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),N(r,i)||(o="["+i+"]"),s||(e.seen.indexOf(c.value)<0?(s=v(n)?u(e,c.value,null):u(e,c.value,n-1),s.indexOf("\n")>-1&&(s=a?s.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+s.split("\n").map(function(e){return" "+e}).join("\n"))):s=e.stylize("[Circular]","special")),w(o)){if(a&&i.match(/^\d+$/))return s;o=JSON.stringify(""+i),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.substr(1,o.length-2),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function d(e,t,n){var r=0;return e.reduce(function(e,t){return r++,t.indexOf("\n")>=0&&r++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?n[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+n[1]:n[0]+t+" "+e.join(", ")+" "+n[1]}function h(e){return Array.isArray(e)}function m(e){return"boolean"===typeof e}function v(e){return null===e}function g(e){return null==e}function y(e){return"number"===typeof e}function b(e){return"string"===typeof e}function _(e){return"symbol"===typeof e}function w(e){return void 0===e}function R(e){return P(e)&&"[object RegExp]"===O(e)}function P(e){return"object"===typeof e&&null!==e}function x(e){return P(e)&&"[object Date]"===O(e)}function j(e){return P(e)&&("[object Error]"===O(e)||e instanceof Error)}function S(e){return"function"===typeof e}function C(e){return null===e||"boolean"===typeof e||"number"===typeof e||"string"===typeof e||"symbol"===typeof e||"undefined"===typeof e}function O(e){return Object.prototype.toString.call(e)}function E(e){return e<10?"0"+e.toString(10):e.toString(10)}function F(){var e=new Date,t=[E(e.getHours()),E(e.getMinutes()),E(e.getSeconds())].join(":");return[e.getDate(),A[e.getMonth()],t].join(" ")}function N(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var k=/%[sdj%]/g;t.format=function(e){if(!b(e)){for(var t=[],n=0;n<arguments.length;n++)t.push(i(arguments[n]));return t.join(" ")}for(var n=1,r=arguments,a=r.length,o=String(e).replace(k,function(e){if("%%"===e)return"%";if(n>=a)return e;switch(e){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(e){return"[Circular]"}default:return e}}),s=r[n];n<a;s=r[++n])v(s)||!P(s)?o+=" "+s:o+=" "+i(s);return o},t.deprecate=function(n,i){function a(){if(!o){if(r.throwDeprecation)throw new Error(i);r.traceDeprecation?console.trace(i):console.error(i),o=!0}return n.apply(this,arguments)}if(w(e.process))return function(){return t.deprecate(n,i).apply(this,arguments)};if(!0===r.noDeprecation)return n;var o=!1;return a};var T,M={};t.debuglog=function(e){if(w(T)&&(T=Object({NODE_ENV:"production"}).NODE_DEBUG||""),e=e.toUpperCase(),!M[e])if(new RegExp("\\b"+e+"\\b","i").test(T)){var n=r.pid;M[e]=function(){var r=t.format.apply(t,arguments);console.error("%s %d: %s",e,n,r)}}else M[e]=function(){};return M[e]},t.inspect=i,i.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},i.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=h,t.isBoolean=m,t.isNull=v,t.isNullOrUndefined=g,t.isNumber=y,t.isString=b,t.isSymbol=_,t.isUndefined=w,t.isRegExp=R,t.isObject=P,t.isDate=x,t.isError=j,t.isFunction=S,t.isPrimitive=C,t.isBuffer=n(344);var A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];t.log=function(){console.log("%s - %s",F(),t.format.apply(t,arguments))},t.inherits=n(345),t._extend=function(e,t){if(!t||!P(t))return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}}).call(t,n(38),n(71))},function(e,t,n){var r=n(120),i=n(348),a=n(24),o=i(function(e,t,n){e[t]=n},r(a));e.exports=o},function(e,t,n){"use strict";var r=String.prototype.replace,i=/%20/g;e.exports={default:"RFC3986",formatters:{RFC1738:function(e){return r.call(e,i,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"}},function(e,t,n){function r(e,t){var n={};return t=o(t,3),a(e,function(e,r,a){i(n,t(e,r,a),e)}),n}var i=n(48),a=n(44),o=n(9);e.exports=r},function(e,t,n){"use strict";e.exports="2.21.2"},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){function r(e,t){return function(n,r,a){if("function"===typeof n&&"object"===typeof r||"object"===typeof a)throw new i.AlgoliaSearchError("index.search usage is index.search(query, params, cb)");0===arguments.length||"function"===typeof n?(a=n,n=""):1!==arguments.length&&"function"!==typeof r||(a=r,r=void 0),"object"===typeof n&&null!==n?(r=n,n=void 0):void 0!==n&&null!==n||(n="");var o="";void 0!==n&&(o+=e+"="+encodeURIComponent(n));var s;return void 0!==r&&(r.additionalUA&&(s=r.additionalUA,delete r.additionalUA),o=this.as._getSearchParams(r,o)),this._search(o,t,a,s)}}e.exports=r;var i=n(72)},function(e,t,n){var r=n(100),i=n(68),a=i(function(e,t,n,i){r(e,t,n,i)});e.exports=a},function(e,t,n){function r(e,t,n){var r=-1,f=a,p=e.length,d=!0,h=[],m=h;if(n)d=!1,f=o;else if(p>=l){var v=t?null:u(e);if(v)return c(v);d=!1,f=s,m=new i}else m=t?[]:h;e:for(;++r<p;){var g=e[r],y=t?t(g):g;if(g=n||0!==g?g:0,d&&y===y){for(var b=m.length;b--;)if(m[b]===y)continue e;t&&m.push(y),h.push(g)}else f(m,y,n)||(m!==h&&m.push(y),h.push(g))}return h}var i=n(79),a=n(82),o=n(118),s=n(83),u=n(381),c=n(58),l=200;e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default="2.1.0"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,a),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.excludeAttributes,r=void 0===n?[]:n,a=t.clearsQuery,s=void 0!==a&&a;return{_refine:function(){},_cachedRefine:function(){this._refine()},init:function(n){var a=n.helper,u=n.instantSearchInstance,c=n.createURL;this._cachedRefine=this._cachedRefine.bind(this);var l=(0,i.getRefinements)({},a.state).map(function(e){return e.attributeName}).filter(function(e){return-1===r.indexOf(e)}),f=s?0!==l.length||""!==a.state.query:0!==l.length,p=function(){return c((0,i.clearRefinementsFromState)(a.state,[],s))};this._refine=o({helper:a,clearAttributes:l,hasRefinements:f,clearsQuery:s}),e({refine:this._cachedRefine,hasRefinements:f,createURL:p,instantSearchInstance:u,widgetParams:t},!0)},render:function(n){var a=n.results,u=n.state,c=n.createURL,l=n.helper,f=n.instantSearchInstance,p=(0,i.getRefinements)(a,u).map(function(e){return e.attributeName}).filter(function(e){return-1===r.indexOf(e)}),d=s?0!==p.length||""!==l.state.query:0!==p.length,h=function(){return c((0,i.clearRefinementsFromState)(u,[],s))};this._refine=o({helper:l,clearAttributes:p,hasRefinements:d,clearsQuery:s}),e({refine:this._cachedRefine,hasRefinements:d,createURL:h,instantSearchInstance:f,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a="Usage:\nvar customClearAll = connectClearAll(function render(params, isFirstRendering) {\n // params = {\n // refine,\n // hasRefinements,\n // createURL,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customClearAll({\n [ excludeAttributes = [] ],\n [ clearsQuery = false ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectClearAll.html\n",o=function(e){var t=e.helper,n=e.clearAttributes,r=e.hasRefinements,a=e.clearsQuery;return function(){r&&(0,i.clearRefinementsAndSearch)(t,n,a)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){return(0,N.checkRendering)(e,k),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributes,r=void 0===n?[]:n,i=t.onlyListedAttributes,a=void 0!==i&&i,o=t.clearsQuery,l=void 0!==o&&o,f=(0,y.default)(r)&&(0,O.default)(r,function(e,t){return e&&(0,_.default)(t)&&(0,v.default)(t.name)&&((0,p.default)(t.label)||(0,v.default)(t.label))&&((0,p.default)(t.template)||(0,v.default)(t.template)||(0,R.default)(t.template))&&((0,p.default)(t.transformData)||(0,R.default)(t.transformData))},!0);if(!(0,y.default)(r)||!f||!(0,h.default)(a))throw new Error(k);var d=(0,S.default)(r,function(e){return e.name}),m=a?d:[],g=(0,O.default)(r,function(e,t){return e[t.name]=t,e},{});return{init:function(n){var r=n.helper,i=n.createURL,o=n.instantSearchInstance;this._clearRefinementsAndSearch=N.clearRefinementsAndSearch.bind(null,r,m,l);var f=i((0,N.clearRefinementsFromState)(r.state,m,l)),p=s({},r.state,d,a),h=function(e){return i(u(r.state,e))},v=function(e){return c(r,e)};e({attributes:g,clearAllClick:this._clearRefinementsAndSearch,clearAllURL:f,refine:v,createURL:h,refinements:p,instantSearchInstance:o,widgetParams:t},!0)},render:function(n){var r=n.results,i=n.helper,o=n.state,f=n.createURL,p=n.instantSearchInstance,h=f((0,N.clearRefinementsFromState)(o,m,l)),v=s(r,o,d,a),y=function(e){return f(u(i.state,e))},b=function(e){return c(i,e)};e({attributes:g,clearAllClick:this._clearRefinementsAndSearch,clearAllURL:h,refine:b,createURL:y,refinements:v,instantSearchInstance:p,widgetParams:t},!1)}}}}function a(e,t,n){var r=e.indexOf(n);return-1!==r?r:e.length+t.indexOf(n)}function o(e,t,n,r){var i=a(e,t,n.attributeName),o=a(e,t,r.attributeName);return i===o?n.name===r.name?0:n.name<r.name?-1:1:i<o?-1:1}function s(e,t,n,r){var i=(0,N.getRefinements)(e,t),a=(0,O.default)(i,function(e,t){return-1===n.indexOf(t.attributeName)&&e.indexOf(-1===t.attributeName)&&e.push(t.attributeName),e},[]);return i=i.sort(o.bind(null,n,a)),r&&!(0,x.default)(n)&&(i=(0,F.default)(i,function(e){return-1!==n.indexOf(e.attributeName)})),i.map(l)}function u(e,t){switch(t.type){case"facet":return e.removeFacetRefinement(t.attributeName,t.name);case"disjunctive":return e.removeDisjunctiveFacetRefinement(t.attributeName,t.name);case"hierarchical":return e.clearRefinements(t.attributeName);case"exclude":return e.removeExcludeRefinement(t.attributeName,t.name);case"numeric":return e.removeNumericRefinement(t.attributeName,t.operator,t.numericValue);case"tag":return e.removeTagRefinement(t.name);default:throw new Error("clearRefinement: type "+t.type+" is not handled")}}function c(e,t){e.setState(u(e.state,t)).search()}function l(e){if(e.computedLabel=e.name,e.hasOwnProperty("operator")&&"string"===typeof e.operator){var t=e.operator;">="===e.operator&&(t="\u2265"),"<="===e.operator&&(t="\u2264"),e.computedLabel=t+" "+e.name}return e}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var f=n(66),p=r(f),d=n(182),h=r(d),m=n(21),v=r(m),g=n(2),y=r(g),b=n(25),_=r(b),w=n(14),R=r(w),P=n(26),x=r(P),j=n(10),S=r(j),C=n(15),O=r(C),E=n(46),F=r(E),N=n(1),k="Usage:\nvar customCurrentRefinedValues = connectCurrentRefinedValues(function renderFn(params, isFirstRendering) {\n // params = {\n // attributes,\n // clearAllClick,\n // clearAllPosition,\n // clearAllURL,\n // refine,\n // createURL,\n // refinements,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customCurrentRefinedValues({\n [ attributes = [] ],\n [ onlyListedAttributes = false ],\n [ clearsQuery = false ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectCurrentRefinedValues.html\n"},function(e,t,n){function r(e){return!0===e||!1===e||a(e)&&i(e)==o}var i=n(13),a=n(8),o="[object Boolean]";e.exports=r},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return(0,s.checkRendering)(e,u),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributes,i=t.separator,s=void 0===i?" > ":i,c=t.rootPath,l=void 0===c?null:c,f=t.showParentLevel,p=void 0===f||f,d=t.limit,h=void 0===d?10:d,m=t.sortBy,v=void 0===m?["name:asc"]:m;if(!n||!n.length)throw new Error(u);var g=o(n,1),y=g[0];return{getConfiguration:function(e){return{hierarchicalFacets:[{name:y,attributes:n,separator:s,rootPath:l,showParentLevel:p}],maxValuesPerFacet:void 0!==e.maxValuesPerFacet?Math.max(e.maxValuesPerFacet,h):h}},init:function(n){function r(e){return a(i.state.toggleRefinement(y,e))}var i=n.helper,a=n.createURL,o=n.instantSearchInstance;this._refine=function(e){return i.toggleRefinement(y,e).search()},e({createURL:r,items:[],refine:this._refine,instantSearchInstance:o,widgetParams:t},!0)},_prepareFacetValues:function(e,t){var n=this;return e.slice(0,h).map(function(e){var i=e.name,o=e.path,s=r(e,["name","path"]);return Array.isArray(s.data)&&(s.data=n._prepareFacetValues(s.data,t)),a({},s,{label:i,value:o})})},render:function(n){function r(e){return o(a.toggleRefinement(y,e))}var i=n.results,a=n.state,o=n.createURL,s=n.instantSearchInstance,u=this._prepareFacetValues(i.getFacetValues(y,{sortBy:v}).data||[],a);e({createURL:r,items:u,refine:this._refine,instantSearchInstance:s,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0});var a=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},o=function(){function e(e,t){var n=[],r=!0,i=!1,a=void 0;try{for(var o,s=e[Symbol.iterator]();!(r=(o=s.next()).done)&&(n.push(o.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();t.default=i;var s=n(1),u="Usage:\nvar customHierarchicalMenu = connectHierarchicalMenu(function renderFn(params, isFirstRendering) {\n // params = {\n // createURL,\n // items,\n // refine,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customHierarchicalMenu({\n attributes,\n [ separator = ' > ' ],\n [ rootPath = null ],\n [ showParentLevel = true ],\n [ limit = 10 ],\n [ sortBy = ['name:asc'] ],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectHierarchicalMenu.html\n"},function(e,t,n){"use strict";function r(e){return(0,o.checkRendering)(e,s),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{getConfiguration:function(){return t.escapeHits?i.tagConfig:void 0},init:function(n){var r=n.instantSearchInstance;e({hits:[],results:void 0,instantSearchInstance:r,widgetParams:t},!0)},render:function(n){var r=n.results,i=n.instantSearchInstance;t.escapeHits&&r.hits&&r.hits.length>0&&(r.hits=(0,a.default)(r.hits)),e({hits:r.hits,results:r,instantSearchInstance:i,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(185),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(1),s="Usage:\nvar customHits = connectHits(function render(params, isFirstRendering) {\n // params = {\n // hits,\n // results,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customHits({\n [ escapeHits = false ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectHits.html\n"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e){return(0,p.default)(e).replace(new RegExp(b.highlightPreTag,"g"),"<em>").replace(new RegExp(b.highlightPostTag,"g"),"</em>")}function o(e){return(0,l.default)(e,function(e,t,n){return"string"===typeof t.value&&(t.value=a(t.value)),(0,h.default)(t.value)&&(t.value=(0,y.default)(t.value,a)),(0,v.default)(t.value)&&(t.value=t.value.map(a)),u({},e,i({},n,t))},{})}function s(e){return void 0===e.__escaped?(e.__escaped=!0,e.map(function(e){return e._highlightResult&&(e._highlightResult=o(e._highlightResult)),e._snippetResult&&(e._snippetResult=o(e._snippetResult)),e})):e}Object.defineProperty(t,"__esModule",{value:!0}),t.tagConfig=void 0;var u=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};t.default=s;var c=n(15),l=r(c),f=n(387),p=r(f),d=n(25),h=r(d),m=n(2),v=r(m),g=n(107),y=r(g),b=t.tagConfig={highlightPreTag:"__ais-highlight__",highlightPostTag:"__/ais-highlight__"}},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){return(0,u.checkRendering)(e,c),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.items,i=n;if(!i)throw new Error(c);return{init:function(n){var a=n.helper,o=n.state,u=n.instantSearchInstance;(0,s.default)(i,function(e){return Number(o.hitsPerPage)===Number(e.value)})||(void 0===o.hitsPerPage?window.console&&window.console.warn("[Warning][hitsPerPageSelector] hitsPerPage not defined.\n You should probably set the value `hitsPerPage`\n using the searchParameters attribute of the instantsearch constructor."):window.console&&window.console.warn("[Warning][hitsPerPageSelector] No item in `items`\n with `value: hitsPerPage` (hitsPerPage: "+o.hitsPerPage+")"),i=[{value:void 0,label:""}].concat(r(i))),this.setHitsPerPage=function(e){return a.setQueryParameter("hitsPerPage",e).search()},e({items:this._transformItems(o),refine:this.setHitsPerPage,hasNoResults:!0,widgetParams:t,instantSearchInstance:u},!0)},render:function(n){var r=n.state,i=n.results,a=n.instantSearchInstance,o=0===i.nbHits;e({items:this._transformItems(r),refine:this.setHitsPerPage,hasNoResults:o,widgetParams:t,instantSearchInstance:a},!1)},_transformItems:function(e){var t=e.hitsPerPage;return i.map(function(e){return a({},e,{isRefined:Number(e.value)===Number(t)})})}}}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(390),s=function(e){return e&&e.__esModule?e:{default:e}}(o),u=n(1),c="Usage:\nvar customHitsPerPage = connectHitsPerPage(function render(params, isFirstRendering) {\n // params = {\n // items,\n // refine,\n // hasNoResults,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customHitsPerPage({\n items: [\n {value: 10, label: '10 results per page'},\n {value: 42, label: '42 results per page'},\n ],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectHitsPerPage.html\n"},function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e){return(0,s.checkRendering)(e,u),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],i=function(e){return function(){return e.nextPage().search()}};return{getConfiguration:function(){return t.escapeHits?a.tagConfig:void 0},init:function(r){var a=r.instantSearchInstance,o=r.helper;this.showMore=i(o),e({hits:n,results:void 0,showMore:this.showMore,isLastPage:!0,instantSearchInstance:a,widgetParams:t},!0)},render:function(i){var a=i.results,s=i.state,u=i.instantSearchInstance;0===s.page&&(n=[]),t.escapeHits&&a.hits&&a.hits.length>0&&(a.hits=(0,o.default)(a.hits)),n=[].concat(r(n),r(a.hits));var c=a.nbPages<=a.page+1;e({hits:n,results:a,showMore:this.showMore,isLastPage:c,instantSearchInstance:u,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(185),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(1),u="Usage:\nvar customInfiniteHits = connectInfiniteHits(function render(params, isFirstRendering) {\n // params = {\n // hits,\n // results,\n // showMore,\n // isLastPage,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customInfiniteHits({\n escapeHits: true,\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectInfiniteHits.html\n"},function(e,t,n){"use strict";function r(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function i(e){return(0,o.checkRendering)(e,s),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,i=t.limit,o=void 0===i?10:i,u=t.sortBy,c=void 0===u?["name:asc"]:u,l=t.showMoreLimit;if(!n||!isNaN(l)&&l<o)throw new Error(s);return{isShowingMore:!1,toggleShowMore:function(){},cachedToggleShowMore:function(){this.toggleShowMore()},createToggleShowMore:function(e){var t=this,n=e.results,r=e.instantSearchInstance;return function(){t.isShowingMore=!t.isShowingMore,t.render({results:n,instantSearchInstance:r})}},getLimit:function(){return this.isShowingMore?l:o},getConfiguration:function(e){var t={hierarchicalFacets:[{name:n,attributes:[n]}]},r=e.maxValuesPerFacet||0;return t.maxValuesPerFacet=Math.max(r,l||o),t},init:function(r){var i=r.helper,a=r.createURL,o=r.instantSearchInstance;this.cachedToggleShowMore=this.cachedToggleShowMore.bind(this),this._createURL=function(e){return a(i.state.toggleRefinement(n,e))},this._refine=function(e){return i.toggleRefinement(n,e).search()},e({items:[],createURL:this._createURL,refine:this._refine,instantSearchInstance:o,canRefine:!1,widgetParams:t,isShowingMore:this.isShowingMore,toggleShowMore:this.cachedToggleShowMore,canToggleShowMore:!1},!0)},render:function(i){var o=i.results,s=i.instantSearchInstance,u=o.getFacetValues(n,{sortBy:c}).data||[],l=u.slice(0,this.getLimit()).map(function(e){var t=e.name,n=e.path,i=r(e,["name","path"]);return a({},i,{label:t,value:n})});this.toggleShowMore=this.createToggleShowMore({results:o,instantSearchInstance:s}),e({items:l,createURL:this._createURL,refine:this._refine,instantSearchInstance:s,canRefine:l.length>0,widgetParams:t,isShowingMore:this.isShowingMore,toggleShowMore:this.cachedToggleShowMore,canToggleShowMore:this.isShowingMore||u.length>this.getLimit()},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(1),s="Usage:\nvar customMenu = connectMenu(function render(params, isFirstRendering) {\n // params = {\n // items,\n // createURL,\n // refine,\n // instantSearchInstance,\n // canRefine,\n // widgetParams,\n // isShowingMore,\n // toggleShowMore\n // }\n});\nsearch.addWidget(\n customMenu({\n attributeName,\n [ limit ],\n [ showMoreLimit ]\n [ sortBy = ['name:asc'] ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectMenu.html\n"},function(e,t,n){"use strict";function r(e){return(0,c.checkRendering)(e,l),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,r=t.options;if(!n||!r)throw new Error(l);return{init:function(o){var s=o.helper,u=o.createURL,c=o.instantSearchInstance;this._refine=function(e){var t=a(s.state,n,r,e);s.setState(t).search()},this._createURL=function(e){return function(t){return u(a(e,n,r,t))}},this._prepareItems=function(e){return r.map(function(t){var r=t.start,a=t.end;return{label:t.name,value:window.encodeURI(JSON.stringify({start:r,end:a})),isRefined:i(e,n,{start:r,end:a})}})},e({createURL:this._createURL(s.state),items:this._prepareItems(s.state),hasNoResults:!0,refine:this._refine,instantSearchInstance:c,widgetParams:t},!0)},render:function(n){var r=n.results,i=n.state,a=n.instantSearchInstance;e({createURL:this._createURL(i),items:this._prepareItems(i),hasNoResults:0===r.nbHits,refine:this._refine,instantSearchInstance:a,widgetParams:t},!1)}}}}function i(e,t,n){var r=e.getNumericRefinements(t);return void 0!==n.start&&void 0!==n.end&&n.start===n.end?o(r,"=",n.start):void 0!==n.start?o(r,">=",n.start):void 0!==n.end?o(r,"<=",n.end):void 0===n.start&&void 0===n.end?0===Object.keys(r).length:void 0}function a(e,t,n,r){var a=e,s=JSON.parse(window.decodeURI(r)),u=a.getNumericRefinements(t);if(void 0===s.start&&void 0===s.end)return a.clearRefinements(t);if(i(a,t,s)||(a=a.clearRefinements(t)),void 0!==s.start&&void 0!==s.end){if(s.start>s.end)throw new Error("option.start should be > to option.end");if(s.start===s.end)return a=o(u,"=",s.start)?a.removeNumericRefinement(t,"=",s.start):a.addNumericRefinement(t,"=",s.start)}return void 0!==s.start&&(a=o(u,">=",s.start)?a.removeNumericRefinement(t,">=",s.start):a.addNumericRefinement(t,">=",s.start)),void 0!==s.end&&(a=o(u,"<=",s.end)?a.removeNumericRefinement(t,"<=",s.end):a.addNumericRefinement(t,"<=",s.end)),a.page=0,a}function o(e,t,n){var r=void 0!==e[t],i=(0,u.default)(e[t],n);return r&&i}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var s=n(101),u=function(e){return e&&e.__esModule?e:{default:e}}(s),c=n(1),l="Usage:\nvar customNumericRefinementList = connectNumericRefinementList(function renderFn(params, isFirstRendering) {\n // params = {\n // createURL,\n // items,\n // hasNoResults,\n // refine,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customNumericRefinementList({\n attributeName,\n options,\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectNumericRefinementList.html\n"},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(0,a.checkRendering)(e,o),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,i=t.options,a=t.operator,s=void 0===a?"=":a;if(!n||!i)throw new Error(o);return{getConfiguration:function(e,t){return{numericRefinements:r({},n,r({},s,[this._getRefinedValue(t)]))}},init:function(r){var a=r.helper,o=r.instantSearchInstance;this._refine=function(e){a.clearRefinements(n),void 0!==e&&a.addNumericRefinement(n,s,e),a.search()},e({currentRefinement:this._getRefinedValue(a.state),options:i,refine:this._refine,hasNoResults:!0,instantSearchInstance:o,widgetParams:t},!0)},render:function(n){var r=n.helper,a=n.results,o=n.instantSearchInstance;e({currentRefinement:this._getRefinedValue(r.state),options:i,refine:this._refine,hasNoResults:0===a.nbHits,instantSearchInstance:o,widgetParams:t},!1)},_getRefinedValue:function(e){return e&&e.numericRefinements&&void 0!==e.numericRefinements[n]&&void 0!==e.numericRefinements[n][s]&&void 0!==e.numericRefinements[n][s][0]?e.numericRefinements[n][s][0]:i[0].value}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(1),o="Usage:\nvar customNumericSelector = connectNumericSelector(function renderFn(params, isFirstRendering) {\n // params = {\n // currentRefinement,\n // options,\n // refine,\n // hasNoResults,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customNumericSelector({\n attributeName,\n options,\n [ operator = '=' ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectNumericSelector.html\n"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,a),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.maxPages;return{init:function(n){var r=n.helper,i=n.createURL,a=n.instantSearchInstance;this.refine=function(e){r.setPage(e),r.search()},this.createURL=function(e){return function(t){return i(e.setPage(t))}},e({createURL:this.createURL(r.state),currentRefinement:r.getPage()||0,nbHits:0,nbPages:0,refine:this.refine,widgetParams:t,instantSearchInstance:a},!0)},getMaxPage:function(e){var t=e.nbPages;return void 0!==n?Math.min(n,t):t},render:function(n){var r=n.results,i=n.state,a=n.instantSearchInstance;e({createURL:this.createURL(i),currentRefinement:i.page,refine:this.refine,nbHits:r.nbHits,nbPages:this.getMaxPage(r),widgetParams:t,instantSearchInstance:a},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a="Usage:\nvar customPagination = connectPagination(function render(params, isFirstRendering) {\n // params = {\n // createURL,\n // currentRefinement,\n // nbHits,\n // nbPages,\n // refine,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customPagination({\n [ maxPages ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectPagination.html\n"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,s),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName;if(!n)throw new Error(s);return{getConfiguration:function(){return{facets:[n]}},_generateRanges:function(e){var t=e.getFacetStats(n);return(0,o.default)(t)},_extractRefinedRange:function(e){var t=e.getRefinements(n),r=void 0,i=void 0;return 0===t.length?[]:(t.forEach(function(e){-1!==e.operator.indexOf(">")?r=Math.floor(e.value[0]):-1!==e.operator.indexOf("<")&&(i=Math.ceil(e.value[0]))}),[{from:r,to:i,isRefined:!0}])},_refine:function(e,t){var r=t.from,i=t.to,a=this._extractRefinedRange(e);e.clearRefinements(n),0!==a.length&&a[0].from===r&&a[0].to===i||("undefined"!==typeof r&&e.addNumericRefinement(n,">=",Math.floor(r)),"undefined"!==typeof i&&e.addNumericRefinement(n,"<=",Math.ceil(i))),e.search()},init:function(n){var r=n.helper,i=n.instantSearchInstance;this._refine=this._refine.bind(this,r),e({instantSearchInstance:i,items:[],refine:this._refine,widgetParams:t},!0)},render:function(r){var i=r.results,a=r.helper,o=r.state,s=r.createURL,u=r.instantSearchInstance,c=void 0;i&&i.hits&&i.hits.length>0?(c=this._extractRefinedRange(a),0===c.length&&(c=this._generateRanges(i))):c=[],c.map(function(e){var t=o.clearRefinements(n);return e.isRefined||(void 0!==e.from&&(t=t.addNumericRefinement(n,">=",Math.floor(e.from))),void 0!==e.to&&(t=t.addNumericRefinement(n,"<=",Math.ceil(e.to)))),e.url=s(t),e}),e({items:c,refine:this._refine,widgetParams:t,instantSearchInstance:u},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a=n(392),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s="Usage:\nvar customPriceRanges = connectToggle(function render(params, isFirstRendering) {\n // params = {\n // items,\n // refine,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customPriceRanges({\n attributeName,\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectPriceRanges.html\n"},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e){return(0,s.checkRendering)(e,u),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,i=t.min,a=t.max,s=t.precision,c=void 0===s?2:s;if(!n)throw new Error(u);var l=function(e){return Number(Number(e).toFixed(c))},f={from:function(e){return e},to:function(e){return l(e).toLocaleString()}};return{getConfiguration:function(e){var t={disjunctiveFacets:[n]},o=void 0!==i||void 0!==a,s=!e||e.numericRefinements&&void 0===e.numericRefinements[n];return o&&s&&(t.numericRefinements=r({},n,{}),void 0!==i&&(t.numericRefinements[n][">="]=[i]),void 0!==a&&(t.numericRefinements[n]["<="]=[a])),t},_getCurrentRefinement:function(e){var t=e.state.getNumericRefinement(n,">="),r=e.state.getNumericRefinement(n,"<=");return t=t&&t.length?t[0]:-1/0,r=r&&r.length?r[0]:1/0,{min:t,max:r}},init:function(r){var o=r.helper,s=r.instantSearchInstance;this._refine=function(e){return function(t){var r=[o.getNumericRefinement(n,">="),o.getNumericRefinement(n,"<=")];r[0]===t[0]&&r[1]===t[1]||(o.clearRefinements(n),(!e.min||t[0]>e.min)&&o.addNumericRefinement(n,">=",l(t[0])),(!e.max||t[1]<e.max)&&o.addNumericRefinement(n,"<=",l(t[1])),o.search())}};var u={min:i||null,max:a||null},c=this._getCurrentRefinement(o);e({refine:this._refine(u),range:{min:Math.floor(u.min),max:Math.ceil(u.max)},start:[c.min,c.max],format:f,widgetParams:t,instantSearchInstance:s},!0)},render:function(r){var s=r.results,u=r.helper,c=r.instantSearchInstance,l=s.disjunctiveFacets||[],p=(0,o.default)(l,function(e){return e.name===n}),d=void 0!==p&&void 0!==p.stats?p.stats:{min:null,max:null};void 0!==i&&(d.min=i),void 0!==a&&(d.max=a);var h=this._getCurrentRefinement(u);e({refine:this._refine(d),range:{min:Math.floor(d.min),max:Math.ceil(d.max)},start:[h.min,h.max],format:f,widgetParams:t,instantSearchInstance:c},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(16),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=n(1),u="Usage:\nvar customRangeSlider = connectRangeSlider(function render(params, isFirstRendering) {\n // params = {\n // refine,\n // range,\n // start,\n // format,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customRangeSlider({\n attributeName,\n [ min ],\n [ max ],\n [ precision = 2 ],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectRangeSlider.html\n"},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){var n={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}function a(e){return(0,s.checkRendering)(e,u),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,a=t.operator,s=void 0===a?"or":a,l=t.limit,f=t.showMoreLimit,p=t.sortBy,d=void 0===p?["isRefined","count:desc","name:asc"]:p;c({attributeName:n,operator:s,usage:u,limit:l,showMoreLimit:f});var h=function(e){var t=e.name,n=i(e,["name"]);return o({},n,{label:t,value:t,highlighted:t})},m=function(r){var i=r.items,a=r.state,o=r.createURL,s=r.helperSpecializedSearchFacetValues,u=r.refine,c=r.isFromSearch,l=r.isFirstSearch,f=r.isShowingMore,p=r.toggleShowMore,d=r.hasExhaustiveItems,h=r.instantSearchInstance,m=function(e){return o(a.toggleRefinement(n,e))},v=s&&s(a,o,s,u,h);e({createURL:m,items:i,refine:u,searchForItems:v,instantSearchInstance:h,isFromSearch:c,canRefine:c||i.length>0,widgetParams:t,isShowingMore:f,canToggleShowMore:f||!d,toggleShowMore:p,hasExhaustiveItems:d},l)},v=void 0,g=void 0,y=void 0,b=function(e){return function(t,r,i,a,o){return function(s){""===s&&v?m({items:v,state:t,createURL:r,helperSpecializedSearchFacetValues:i,refine:a,isFromSearch:!1,isFirstSearch:!1,instantSearchInstance:o,hasExhaustiveItems:!1}):e.searchForFacetValues(n,s).then(function(e){var n=e.facetHits;m({items:n,state:t,createURL:r,helperSpecializedSearchFacetValues:i,refine:a,isFromSearch:!0,isFirstSearch:!1,instantSearchInstance:o,hasExhaustiveItems:!1})})}}};return{isShowingMore:!1,toggleShowMore:function(){},cachedToggleShowMore:function(){this.toggleShowMore()},createToggleShowMore:function(e){var t=this;return function(){t.isShowingMore=!t.isShowingMore,t.render(e)}},getLimit:function(){return this.isShowingMore?f:l},getConfiguration:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r({},"and"===s?"facets":"disjunctiveFacets",[n]);if(void 0!==l){var i=e.maxValuesPerFacet||0;t.maxValuesPerFacet=void 0===f?Math.max(i,l):Math.max(i,l,f)}return t},init:function(e){var t=e.helper,r=e.createURL,i=e.instantSearchInstance;this.cachedToggleShowMore=this.cachedToggleShowMore.bind(this),y=function(e){return t.toggleRefinement(n,e).search()},g=b(t),m({items:[],state:t.state,createURL:r,helperSpecializedSearchFacetValues:g,refine:y,isFromSearch:!1,isFirstSearch:!0,instantSearchInstance:i,isShowingMore:this.isShowingMore,toggleShowMore:this.cachedToggleShowMore,hasExhaustiveItems:!0})},render:function(e){var t=e.results,r=e.state,i=e.createURL,a=e.instantSearchInstance,o=t.getFacetValues(n,{sortBy:d}).slice(0,this.getLimit()).map(h),s=o.length<this.getLimit();v=o,this.toggleShowMore=this.createToggleShowMore(e),m({items:o,state:r,createURL:i,helperSpecializedSearchFacetValues:g,refine:y,isFromSearch:!1,isFirstSearch:!1,instantSearchInstance:a,isShowingMore:this.isShowingMore,toggleShowMore:this.cachedToggleShowMore,hasExhaustiveItems:s})}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.checkUsage=void 0;var o=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};t.default=a;var s=n(1),u="Usage:\nvar customRefinementList = connectRefinementList(function render(params) {\n // params = {\n // isFromSearch,\n // createURL,\n // items,\n // refine,\n // searchForItems,\n // instantSearchInstance,\n // canRefine,\n // toggleShowMore,\n // isShowingMore,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customRefinementList({\n attributeName,\n [ operator = 'or' ],\n [ limit ],\n [ showMoreLimit ],\n [ sortBy = ['isRefined', 'count:desc', 'name:asc']],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectRefinementList.html\n",c=t.checkUsage=function(e){var t=e.attributeName,n=e.operator,r=e.usageMessage,i=e.showMoreLimit,a=e.limit,o=void 0===t,s=!/^(and|or)$/.test(n),u=void 0!==i&&(isNaN(i)||i<a);if(o||s||u)throw new Error(r)}},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,a),function(){function t(e){return function(){e.setQuery(""),e.search()}}var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.queryHook;return{_clear:function(){},_cachedClear:function(){this._clear()},init:function(i){var a=i.helper,o=i.onHistoryChange,s=i.instantSearchInstance;this._cachedClear=this._cachedClear.bind(this),this._clear=t(a),this._refine=function(){var e=void 0,t=function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t!==a.state.query&&(e=a.state.query,a.setQuery(t)),n&&void 0!==e&&e!==t&&a.search()};return r?function(e){return r(e,t)}:t}(),this._onHistoryChange=o,e({query:a.state.query,onHistoryChange:this._onHistoryChange,refine:this._refine,clear:this._cachedClear,widgetParams:n,instantSearchInstance:s},!0)},render:function(r){var i=r.helper,a=r.instantSearchInstance;this._clear=t(i),e({query:i.state.query,onHistoryChange:this._onHistoryChange,refine:this._refine,clear:this._cachedClear,widgetParams:n,instantSearchInstance:a},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a="Usage:\nvar customSearchBox = connectSearchBox(function render(params, isFirstRendering) {\n // params = {\n // query,\n // onHistoryChange,\n // refine,\n // instantSearchInstance,\n // widgetParams,\n // clear,\n // }\n});\nsearch.addWidget(\n customSearchBox({\n [ queryHook ],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectSearchBox.html\n"},function(e,t,n){"use strict";function r(e){return(0,o.checkRendering)(e,s),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.indices;if(!n)throw new Error(s);var r=n.map(function(e){return{label:e.label,value:e.name}});return{init:function(i){var o=i.helper,s=i.instantSearchInstance,u=o.getIndex();if(!(0,a.default)(n,function(e){return e.name===u}))throw new Error("[sortBySelector]: Index "+u+" not present in `indices`");this.setIndex=function(e){return o.setIndex(e).search()},e({currentRefinement:u,options:r,refine:this.setIndex,hasNoResults:!0,widgetParams:t,instantSearchInstance:s},!0)},render:function(n){var i=n.helper,a=n.results,o=n.instantSearchInstance;e({currentRefinement:i.getIndex(),options:r,refine:this.setIndex,hasNoResults:0===a.nbHits,widgetParams:t,instantSearchInstance:o},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(16),a=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(1),s="Usage:\nvar customSortBySelector = connectSortBySelector(function render(params, isFirstRendering) {\n // params = {\n // currentRefinement,\n // options,\n // refine,\n // hasNoResults,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customSortBySelector({ indices })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectSortBySelector.html\n"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,a),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,r=t.max,i=void 0===r?5:r;if(!n)throw new Error(a);return{getConfiguration:function(){return{disjunctiveFacets:[n]}},init:function(r){var i=r.helper,a=r.createURL,o=r.instantSearchInstance;this._toggleRefinement=this._toggleRefinement.bind(this,i),this._createURL=function(e){return function(t){return a(e.toggleRefinement(n,t))}},e({instantSearchInstance:o,items:[],hasNoResults:!0,refine:this._toggleRefinement,createURL:this._createURL(i.state),widgetParams:t},!0)},render:function(r){for(var a=r.helper,o=r.results,s=r.state,u=r.instantSearchInstance,c=[],l={},f=i;f>=0;--f)l[f]=0;o.getFacetValues(n).forEach(function(e){var t=Math.round(e.name);if(t&&!(t>i))for(var n=t;n>=1;--n)l[n]+=e.count});for(var p=this._getRefinedStar(a),d=i-1;d>=1;--d){var h=l[d];if(!p||d===p||0!==h){for(var m=[],v=1;v<=i;++v)m.push(v<=d);c.push({stars:m,name:String(d),value:String(d),count:h,isRefined:p===d})}}e({instantSearchInstance:u,items:c,hasNoResults:0===o.nbHits,refine:this._toggleRefinement,createURL:this._createURL(s),widgetParams:t},!1)},_toggleRefinement:function(e,t){var r=this._getRefinedStar(e)===Number(t);if(e.clearRefinements(n),!r)for(var a=Number(t);a<=i;++a)e.addDisjunctiveFacetRefinement(n,a);e.search()},_getRefinedStar:function(e){var t=void 0;return e.getRefinements(n).forEach(function(e){(!t||Number(e.value)<t)&&(t=Number(e.value))}),t}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a="Usage:\nvar customStarRating = connectStarRating(function render(params, isFirstRendering) {\n // params = {\n // items,\n // createURL,\n // refine,\n // instantSearchInstance,\n // hasNoResults,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customStarRatingI({\n attributeName,\n [ max=5 ],\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectStarRating.html\n"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,a),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{init:function(n){var r=n.helper,i=n.instantSearchInstance;e({instantSearchInstance:i,hitsPerPage:r.state.hitsPerPage,nbHits:0,nbPages:0,page:r.state.page,processingTimeMS:-1,query:r.state.query,widgetParams:t},!0)},render:function(n){var r=n.results,i=n.instantSearchInstance;e({instantSearchInstance:i,hitsPerPage:r.hitsPerPage,nbHits:r.nbHits,nbPages:r.nbPages,page:r.page,processingTimeMS:r.processingTimeMS,query:r.query,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a="Usage:\nvar customStats = connectState(function render(params, isFirstRendering) {\n // params = {\n // instantSearchInstance,\n // hitsPerPage,\n // nbHits,\n // nbPages,\n // page,\n // processingTimeMS,\n // query,\n // widgetParams,\n // }\n});\nsearch.addWidget(customStats());\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectStats.html"},function(e,t,n){"use strict";function r(e){return(0,i.checkRendering)(e,s),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.attributeName,r=t.label,a=t.values,u=void 0===a?{on:!0,off:void 0}:a;if(!n||!r)throw new Error(s);var c=void 0!==u.off,l=u?(0,i.escapeRefinement)(u.on):void 0,f=u?(0,i.escapeRefinement)(u.off):void 0;return{getConfiguration:function(){return{disjunctiveFacets:[n]}},toggleRefinement:function(e){(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).isRefined?(e.removeDisjunctiveFacetRefinement(n,l),c&&e.addDisjunctiveFacetRefinement(n,f)):(c&&e.removeDisjunctiveFacetRefinement(n,f),e.addDisjunctiveFacetRefinement(n,l)),e.search()},init:function(i){var a=i.state,o=i.helper,s=i.createURL,u=i.instantSearchInstance;this._createURL=function(e){return function(){return s(a.removeDisjunctiveFacetRefinement(n,e?l:f).addDisjunctiveFacetRefinement(n,e?f:l))}},this.toggleRefinement=this.toggleRefinement.bind(this,o);var p=a.isDisjunctiveFacetRefined(n,l);c&&(p||o.addDisjunctiveFacetRefinement(n,f));var d={name:r,isRefined:p,count:0},h={name:r,isRefined:c&&!p,count:0},m={name:r,isRefined:p,count:null,onFacetValue:d,offFacetValue:h};e({value:m,createURL:this._createURL(m.isRefined),refine:this.toggleRefinement,instantSearchInstance:u,widgetParams:t},!0)},render:function(a){var s=a.helper,u=a.results,p=a.state,d=a.instantSearchInstance,h=s.state.isDisjunctiveFacetRefined(n,l),m=void 0!==f&&f,v=u.getFacetValues(n),g=(0,o.default)(v,function(e){return e.name===(0,i.unescapeRefinement)(l)}),y={name:r,isRefined:void 0!==g&&g.isRefined,count:void 0===g?null:g.count},b=c?(0,o.default)(v,function(e){return e.name===(0,i.unescapeRefinement)(m)}):void 0,_={name:r,isRefined:void 0!==b&&b.isRefined,count:void 0===b?v.reduce(function(e,t){return e+t.count},0):b.count},w=h?_:y,R={name:r,isRefined:h,count:void 0===w?null:w.count,onFacetValue:y,offFacetValue:_};e({value:R,state:p,createURL:this._createURL(R.isRefined),refine:this.toggleRefinement,helper:s,instantSearchInstance:d,widgetParams:t},!1)}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;var i=n(1),a=n(16),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s="Usage:\nvar customToggle = connectToggle(function render(params, isFirstRendering) {\n // params = {\n // value,\n // createURL,\n // refine,\n // instantSearchInstance,\n // widgetParams,\n // }\n});\nsearch.addWidget(\n customToggle({\n attributeName,\n label,\n [ values = {on: true, off: undefined} ]\n })\n);\nFull documentation available at https://community.algolia.com/instantsearch.js/connectors/connectToggle.html\n"},function(e,t,n){var r=n(401);r.Template=n(402).Template,r.template=r.Template,e.exports=r},function(e,t,n){function r(e){return i(e,a|o)}var i=n(140),a=1,o=4;e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=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},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=n(10),d=r(p),h=n(22),m=r(h),v=n(203),g=r(v),y=n(3),b=r(y),_=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"renderWithResults",value:function(){var e=this,t=(0,d.default)(this.props.hits,function(t,n){var r=s({},t,{__hitIndex:n});return f.default.createElement(m.default,s({data:r,key:r.objectID,rootProps:{className:e.props.cssClasses.item},templateKey:"item"},e.props.templateProps))});return f.default.createElement("div",{className:this.props.cssClasses.root},t)}},{key:"renderAllResults",value:function(){var e=(0,b.default)(this.props.cssClasses.root,this.props.cssClasses.allItems);return f.default.createElement(m.default,s({data:this.props.results,rootProps:{className:e},templateKey:"allItems"},this.props.templateProps))}},{key:"renderNoResults",value:function(){var e=(0,b.default)(this.props.cssClasses.root,this.props.cssClasses.empty);return f.default.createElement(m.default,s({data:this.props.results,rootProps:{className:e},templateKey:"empty"},this.props.templateProps))}},{key:"render",value:function(){var e=this.props.results.hits.length>0,t=(0,g.default)(this.props,"templateProps.templates.allItems");return e?t?this.renderAllResults():this.renderWithResults():this.renderNoResults()}}]),t}(f.default.Component);_.defaultProps={results:{hits:[]}},t.default=_},function(e,t,n){function r(e,t){return null!=e&&a(e,t,i)}var i=n(413),a=n(137);e.exports=r},function(e,t,n){"use strict";function r(e){if(!e)return null;if(!0===e)return s;var t=i({},e);return e.templates||(t.templates=s.templates),e.limit||(t.limit=s.limit),t}Object.defineProperty(t,"__esModule",{value:!0});var i=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};t.default=r;var a=n(421),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s={templates:o.default,limit:100}},function(e,t,n){var r=n(432),i=r();e.exports=i},function(e,t,n){n(207),n(208),e.exports=n(209)},function(e,t){},function(e,t){},function(e,t,n){"use strict";var r=n(210),i=function(e){return e&&e.__esModule?e:{default:e}}(r);e.exports=i.default},function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),n(211),n(212);var a=n(213),o=i(a),s=n(74),u=i(s),c=n(356),l=i(c),f=n(179),p=i(f),d=n(385),h=r(d),m=n(393),v=r(m),g=(0,o.default)(l.default);g.createQueryString=u.default.url.getQueryStringFromState,g.connectors=h,g.widgets=v,g.version=p.default,t.default=g},function(e,t,n){"use strict";Object.freeze||(Object.freeze=function(e){if(Object(e)!==e)throw new TypeError("Object.freeze can only be called on Objects.");return e})},function(e,t,n){"use strict";var r={};if(!Object.setPrototypeOf&&!r.__proto__){var i=Object.getPrototypeOf;Object.getPrototypeOf=function(e){return e.__proto__?e.__proto__:i.call(Object,e)}}},function(e,t,n){"use strict";function r(e){var t=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return new(i.apply(e,[null].concat(n)))};return t.__proto__=e,t.prototype=e.prototype,t}var i=Function.prototype.bind;e.exports=r},function(e,t,n){"use strict";function r(e,t,n){e.addAlgoliaAgent?o(e)||e.addAlgoliaAgent("JS Helper "+y):console.log("Please upgrade to the newest version of the JS Client."),this.setClient(e);var r=n||{};r.index=t,this.state=s.make(r),this.lastResults=null,this._queryId=0,this._lastQueryIdReceived=-1,this.derivedHelpers=[],this._currentNbQueries=0}function i(e){if(e<0)throw new Error("Page requested below 0.");return this.state=this.state.setPage(e),this._change(),this}function a(){return this.state.page}function o(e){var t=e._ua;return!!t&&-1!==t.indexOf("JS Helper")}var s=n(75),u=n(155),c=n(343),l=n(346),f=n(170),p=n(104),d=n(148),h=n(12),m=n(26),v=n(10),g=n(105),y=n(174);f.inherits(r,p.EventEmitter),r.prototype.search=function(){return this._search(),this},r.prototype.getQuery=function(){var e=this.state;return l._getHitsSearchParams(e)},r.prototype.searchOnce=function(e,t){var n=e?this.state.setQueryParameters(e):this.state,r=l._getQueries(n.index,n),i=this;return this._currentNbQueries++,this.emit("searchOnce",n),t?this.client.search(r,function(e,r){i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e?t(e,null,n):t(e,new u(n,r.results),n)}):this.client.search(r).then(function(e){return i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),{content:new u(n,e.results),state:n,_originalResponse:e}},function(e){throw i._currentNbQueries--,0===i._currentNbQueries&&i.emit("searchQueueEmpty"),e})},r.prototype.searchForFacetValues=function(e,t,n){var r=this.state,i=this.client.initIndex(this.state.index),a=r.isDisjunctiveFacet(e),o=l.getSearchForFacetQuery(e,t,n,this.state);this._currentNbQueries++;var s=this;return this.emit("searchForFacetValues",r,e,t),i.searchForFacetValues(o).then(function(t){return s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),t.facetHits=h(t.facetHits,function(t){t.isRefined=a?r.isDisjunctiveFacetRefined(e,t.value):r.isFacetRefined(e,t.value)}),t},function(e){throw s._currentNbQueries--,0===s._currentNbQueries&&s.emit("searchQueueEmpty"),e})},r.prototype.setQuery=function(e){return this.state=this.state.setPage(0).setQuery(e),this._change(),this},r.prototype.clearRefinements=function(e){return this.state=this.state.setPage(0).clearRefinements(e),this._change(),this},r.prototype.clearTags=function(){return this.state=this.state.setPage(0).clearTags(),this._change(),this},r.prototype.addDisjunctiveFacetRefinement=function(e,t){return this.state=this.state.setPage(0).addDisjunctiveFacetRefinement(e,t),this._change(),this},r.prototype.addDisjunctiveRefine=function(){return this.addDisjunctiveFacetRefinement.apply(this,arguments)},r.prototype.addHierarchicalFacetRefinement=function(e,t){return this.state=this.state.setPage(0).addHierarchicalFacetRefinement(e,t),this._change(),this},r.prototype.addNumericRefinement=function(e,t,n){return this.state=this.state.setPage(0).addNumericRefinement(e,t,n),this._change(),this},r.prototype.addFacetRefinement=function(e,t){return this.state=this.state.setPage(0).addFacetRefinement(e,t),this._change(),this},r.prototype.addRefine=function(){return this.addFacetRefinement.apply(this,arguments)},r.prototype.addFacetExclusion=function(e,t){return this.state=this.state.setPage(0).addExcludeRefinement(e,t),this._change(),this},r.prototype.addExclude=function(){return this.addFacetExclusion.apply(this,arguments)},r.prototype.addTag=function(e){return this.state=this.state.setPage(0).addTagRefinement(e),this._change(),this},r.prototype.removeNumericRefinement=function(e,t,n){return this.state=this.state.setPage(0).removeNumericRefinement(e,t,n),this._change(),this},r.prototype.removeDisjunctiveFacetRefinement=function(e,t){return this.state=this.state.setPage(0).removeDisjunctiveFacetRefinement(e,t),this._change(),this},r.prototype.removeDisjunctiveRefine=function(){return this.removeDisjunctiveFacetRefinement.apply(this,arguments)},r.prototype.removeHierarchicalFacetRefinement=function(e){return this.state=this.state.setPage(0).removeHierarchicalFacetRefinement(e),this._change(),this},r.prototype.removeFacetRefinement=function(e,t){return this.state=this.state.setPage(0).removeFacetRefinement(e,t),this._change(),this},r.prototype.removeRefine=function(){return this.removeFacetRefinement.apply(this,arguments)},r.prototype.removeFacetExclusion=function(e,t){return this.state=this.state.setPage(0).removeExcludeRefinement(e,t),this._change(),this},r.prototype.removeExclude=function(){return this.removeFacetExclusion.apply(this,arguments)},r.prototype.removeTag=function(e){return this.state=this.state.setPage(0).removeTagRefinement(e),this._change(),this},r.prototype.toggleFacetExclusion=function(e,t){return this.state=this.state.setPage(0).toggleExcludeFacetRefinement(e,t),this._change(),this},r.prototype.toggleExclude=function(){return this.toggleFacetExclusion.apply(this,arguments)},r.prototype.toggleRefinement=function(e,t){return this.toggleFacetRefinement(e,t)},r.prototype.toggleFacetRefinement=function(e,t){return this.state=this.state.setPage(0).toggleFacetRefinement(e,t),this._change(),this},r.prototype.toggleRefine=function(){return this.toggleFacetRefinement.apply(this,arguments)},r.prototype.toggleTag=function(e){return this.state=this.state.setPage(0).toggleTagRefinement(e),this._change(),this},r.prototype.nextPage=function(){return this.setPage(this.state.page+1)},r.prototype.previousPage=function(){return this.setPage(this.state.page-1)},r.prototype.setCurrentPage=i,r.prototype.setPage=i,r.prototype.setIndex=function(e){return this.state=this.state.setPage(0).setIndex(e),this._change(),this},r.prototype.setQueryParameter=function(e,t){var n=this.state.setPage(0).setQueryParameter(e,t);return this.state===n?this:(this.state=n,this._change(),this)},r.prototype.setState=function(e){return this.state=new s(e),this._change(),this},r.prototype.getState=function(e){return void 0===e?this.state:this.state.filter(e)},r.prototype.getStateAsQueryString=function(e){var t=e&&e.filters||["query","attribute:*"],n=this.getState(t);return g.getQueryStringFromState(n,e)},r.getConfigurationFromQueryString=g.getStateFromQueryString,r.getForeignConfigurationInQueryString=g.getUnrecognizedParametersInQueryString,r.prototype.setStateFromQueryString=function(e,t){var n=t&&t.triggerChange||!1,r=g.getStateFromQueryString(e,t),i=this.state.setQueryParameters(r);n?this.setState(i):this.overrideStateWithoutTriggeringChangeEvent(i)},r.prototype.overrideStateWithoutTriggeringChangeEvent=function(e){return this.state=new s(e),this},r.prototype.isRefined=function(e,t){if(this.state.isConjunctiveFacet(e))return this.state.isFacetRefined(e,t);if(this.state.isDisjunctiveFacet(e))return this.state.isDisjunctiveFacetRefined(e,t);throw new Error(e+" is not properly defined in this helper configuration(use the facets or disjunctiveFacets keys to configure it)")},r.prototype.hasRefinements=function(e){return!m(this.state.getNumericRefinements(e))||(this.state.isConjunctiveFacet(e)?this.state.isFacetRefined(e):this.state.isDisjunctiveFacet(e)?this.state.isDisjunctiveFacetRefined(e):!!this.state.isHierarchicalFacet(e)&&this.state.isHierarchicalFacetRefined(e))},r.prototype.isExcluded=function(e,t){return this.state.isExcludeRefined(e,t)},r.prototype.isDisjunctiveRefined=function(e,t){return this.state.isDisjunctiveFacetRefined(e,t)},r.prototype.hasTag=function(e){return this.state.isTagRefined(e)},r.prototype.isTagRefined=function(){return this.hasTagRefinements.apply(this,arguments)},r.prototype.getIndex=function(){return this.state.index},r.prototype.getCurrentPage=a,r.prototype.getPage=a,r.prototype.getTags=function(){return this.state.tagRefinements},r.prototype.getQueryParameter=function(e){return this.state.getQueryParameter(e)},r.prototype.getRefinements=function(e){var t=[];if(this.state.isConjunctiveFacet(e)){var n=this.state.getConjunctiveRefinements(e);h(n,function(e){t.push({value:e,type:"conjunctive"})});var r=this.state.getExcludeRefinements(e);h(r,function(e){t.push({value:e,type:"exclude"})})}else if(this.state.isDisjunctiveFacet(e)){var i=this.state.getDisjunctiveRefinements(e);h(i,function(e){t.push({value:e,type:"disjunctive"})})}var a=this.state.getNumericRefinements(e);return h(a,function(e,n){t.push({value:e,operator:n,type:"numeric"})}),t},r.prototype.getNumericRefinement=function(e,t){return this.state.getNumericRefinement(e,t)},r.prototype.getHierarchicalFacetBreadcrumb=function(e){return this.state.getHierarchicalFacetBreadcrumb(e)},r.prototype._search=function(){var e=this.state,t=l._getQueries(e.index,e),n=[{state:e,queriesCount:t.length,helper:this}];this.emit("search",e,this.lastResults);var r=v(this.derivedHelpers,function(t){var r=t.getModifiedState(e),i=l._getQueries(r.index,r);return n.push({state:r,queriesCount:i.length,helper:t}),t.emit("search",r,t.lastResults),i}),i=t.concat(d(r)),a=this._queryId++;this._currentNbQueries++,this.client.search(i,this._dispatchAlgoliaResponse.bind(this,n,a))},r.prototype._dispatchAlgoliaResponse=function(e,t,n,r){if(!(t<this._lastQueryIdReceived))if(this._currentNbQueries-=t-this._lastQueryIdReceived,this._lastQueryIdReceived=t,n)this.emit("error",n),0===this._currentNbQueries&&this.emit("searchQueueEmpty");else{0===this._currentNbQueries&&this.emit("searchQueueEmpty");var i=r.results;h(e,function(e){var t=e.state,n=e.queriesCount,r=e.helper,a=i.splice(0,n),o=r.lastResults=new u(t,a);r.emit("result",o,t)})}},r.prototype.containsRefinement=function(e,t,n,r){return e||0!==t.length||0!==n.length||0!==r.length},r.prototype._hasDisjunctiveRefinements=function(e){return this.state.disjunctiveRefinements[e]&&this.state.disjunctiveRefinements[e].length>0},r.prototype._change=function(){this.emit("change",this.state,this.lastResults)},r.prototype.clearCache=function(){return this.client.clearCache(),this},r.prototype.setClient=function(e){return this.client===e?this:(e.addAlgoliaAgent&&!o(e)&&e.addAlgoliaAgent("JS Helper "+y),this.client=e,this)},r.prototype.getClient=function(){return this.client},r.prototype.derive=function(e){var t=new c(this,e);return this.derivedHelpers.push(t),t},r.prototype.detachDerivedHelper=function(e){var t=this.derivedHelpers.indexOf(e);if(-1===t)throw new Error("Derived helper already detached");this.derivedHelpers.splice(t,1)},r.prototype.hasPendingRequests=function(){return this._currentNbQueries>0},e.exports=r},function(e,t,n){function r(e){return a(e)&&i(e)==o}var i=n(13),a=n(8),o="[object Arguments]";e.exports=r},function(e,t,n){function r(e){var t=o.call(e,u),n=e[u];try{e[u]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[u]=n:delete e[u]),i}var i=n(29),a=Object.prototype,o=a.hasOwnProperty,s=a.toString,u=i?i.toStringTag:void 0;e.exports=r},function(e,t){function n(e){return i.call(e)}var r=Object.prototype,i=r.toString;e.exports=n},function(e,t){function n(){return!1}e.exports=n},function(e,t,n){function r(e){return o(e)&&a(e.length)&&!!s[i(e)]}var i=n(13),a=n(77),o=n(8),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=r},function(e,t,n){(function(e){var r=n(113),i="object"==typeof t&&t&&!t.nodeType&&t,a=i&&"object"==typeof e&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o&&r.process,u=function(){try{return s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=u}).call(t,n(76)(e))},function(e,t,n){var r=n(115),i=r(Object.keys,Object);e.exports=i},function(e,t,n){var r=n(17),i=n(223),a=n(18),o=n(250),s=a(function(e){var t=r(e,o);return t.length&&t[0]===e[0]?i(t):[]});e.exports=s},function(e,t,n){function r(e,t,n){for(var r=n?o:a,f=e[0].length,p=e.length,d=p,h=Array(p),m=1/0,v=[];d--;){var g=e[d];d&&t&&(g=s(g,u(t))),m=l(g.length,m),h[d]=!n&&(t||f>=120&&g.length>=120)?new i(d&&g):void 0}g=e[0];var y=-1,b=h[0];e:for(;++y<f&&v.length<m;){var _=g[y],w=t?t(_):_;if(_=n||0!==_?_:0,!(b?c(b,w):r(v,w,n))){for(d=p;--d;){var R=h[d];if(!(R?c(R,w):r(e[d],w,n)))continue e}b&&b.push(w),v.push(_)}}return v}var i=n(79),a=n(82),o=n(118),s=n(17),u=n(78),c=n(83),l=Math.min;e.exports=r},function(e,t,n){function r(){this.size=0,this.__data__={hash:new i,map:new(o||a),string:new i}}var i=n(225),a=n(54),o=n(81);e.exports=r},function(e,t,n){function r(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}var i=n(226),a=n(231),o=n(232),s=n(233),u=n(234);r.prototype.clear=i,r.prototype.delete=a,r.prototype.get=o,r.prototype.has=s,r.prototype.set=u,e.exports=r},function(e,t,n){function r(){this.__data__=i?i(null):{},this.size=0}var i=n(53);e.exports=r},function(e,t,n){function r(e){return!(!o(e)||a(e))&&(i(e)?h:c).test(s(e))}var i=n(14),a=n(228),o=n(6),s=n(116),u=/[\\^$.*+?()[\]{}|]/g,c=/^\[object .+?Constructor\]$/,l=Function.prototype,f=Object.prototype,p=l.toString,d=f.hasOwnProperty,h=RegExp("^"+p.call(d).replace(u,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=r},function(e,t,n){function r(e){return!!a&&a in e}var i=n(229),a=function(){var e=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=r},function(e,t,n){var r=n(5),i=r["__core-js_shared__"];e.exports=i},function(e,t){function n(e,t){return null==e?void 0:e[t]}e.exports=n},function(e,t){function n(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}e.exports=n},function(e,t,n){function r(e){var t=this.__data__;if(i){var n=t[e];return n===a?void 0:n}return s.call(t,e)?t[e]:void 0}var i=n(53),a="__lodash_hash_undefined__",o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){function r(e){var t=this.__data__;return i?void 0!==t[e]:o.call(t,e)}var i=n(53),a=Object.prototype,o=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=i&&void 0===t?a:t,this}var i=n(53),a="__lodash_hash_undefined__";e.exports=r},function(e,t){function n(){this.__data__=[],this.size=0}e.exports=n},function(e,t,n){function r(e){var t=this.__data__,n=i(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}var i=n(55),a=Array.prototype,o=a.splice;e.exports=r},function(e,t,n){function r(e){var t=this.__data__,n=i(t,e);return n<0?void 0:t[n][1]}var i=n(55);e.exports=r},function(e,t,n){function r(e){return i(this.__data__,e)>-1}var i=n(55);e.exports=r},function(e,t,n){function r(e,t){var n=this.__data__,r=i(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var i=n(55);e.exports=r},function(e,t,n){function r(e){var t=i(this,e).delete(e);return this.size-=t?1:0,t}var i=n(56);e.exports=r},function(e,t){function n(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}e.exports=n},function(e,t,n){function r(e){return i(this,e).get(e)}var i=n(56);e.exports=r},function(e,t,n){function r(e){return i(this,e).has(e)}var i=n(56);e.exports=r},function(e,t,n){function r(e,t){var n=i(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var i=n(56);e.exports=r},function(e,t){function n(e){return this.__data__.set(e,r),this}var r="__lodash_hash_undefined__";e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t){function n(e){return e!==e}e.exports=n},function(e,t){function n(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}e.exports=n},function(e,t,n){var r=n(120),i=n(121),a=n(24),o=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:a;e.exports=o},function(e,t,n){function r(e){return i(e)?e:[]}var i=n(85);e.exports=r},function(e,t,n){function r(e,t){return e&&i(e,a(t))}var i=n(44),a=n(86);e.exports=r},function(e,t){function n(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var u=o[e?s:++i];if(!1===n(a[u],u,a))break}return t}}e.exports=n},function(e,t,n){function r(e,t){return function(n,r){if(null==n)return n;if(!i(n))return e(n,r);for(var a=n.length,o=t?a:-1,s=Object(n);(t?o--:++o<a)&&!1!==r(s[o],o,s););return n}}var i=n(11);e.exports=r},function(e,t,n){function r(e,t){var n=[];return i(e,function(e,r,i){t(e,r,i)&&n.push(e)}),n}var i=n(45);e.exports=r},function(e,t,n){function r(e){var t=a(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||i(n,e,t)}}var i=n(256),a=n(267),o=n(135);e.exports=r},function(e,t,n){function r(e,t,n,r){var u=n.length,c=u,l=!r;if(null==e)return!c;for(e=Object(e);u--;){var f=n[u];if(l&&f[2]?f[1]!==e[f[0]]:!(f[0]in e))return!1}for(;++u<c;){f=n[u];var p=f[0],d=e[p],h=f[1];if(l&&f[2]){if(void 0===d&&!(p in e))return!1}else{var m=new i;if(r)var v=r(d,h,p,e,t,m);if(!(void 0===v?a(h,d,o|s,r,m):v))return!1}}return!0}var i=n(57),a=n(88),o=1,s=2;e.exports=r},function(e,t,n){function r(){this.__data__=new i,this.size=0}var i=n(54);e.exports=r},function(e,t){function n(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}e.exports=n},function(e,t){function n(e){return this.__data__.get(e)}e.exports=n},function(e,t){function n(e){return this.__data__.has(e)}e.exports=n},function(e,t,n){function r(e,t){var n=this.__data__;if(n instanceof i){var r=n.__data__;if(!a||r.length<s-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(r)}return n.set(e,t),this.size=n.size,this}var i=n(54),a=n(81),o=n(80),s=200;e.exports=r},function(e,t,n){function r(e,t,n,r,v,y){var b=c(e),_=c(t),w=b?h:u(e),R=_?h:u(t);w=w==d?m:w,R=R==d?m:R;var P=w==m,x=R==m,j=w==R;if(j&&l(e)){if(!l(t))return!1;b=!0,P=!1}if(j&&!P)return y||(y=new i),b||f(e)?a(e,t,n,r,v,y):o(e,t,w,n,r,v,y);if(!(n&p)){var S=P&&g.call(e,"__wrapped__"),C=x&&g.call(t,"__wrapped__");if(S||C){var O=S?e.value():e,E=C?t.value():t;return y||(y=new i),v(O,E,n,r,y)}}return!!j&&(y||(y=new i),s(e,t,n,r,v,y))}var i=n(57),a=n(125),o=n(263),s=n(264),u=n(91),c=n(2),l=n(39),f=n(52),p=1,d="[object Arguments]",h="[object Array]",m="[object Object]",v=Object.prototype,g=v.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r,i,P,j){switch(n){case R:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case w:return!(e.byteLength!=t.byteLength||!P(new a(e),new a(t)));case p:case d:case v:return o(+e,+t);case h:return e.name==t.name&&e.message==t.message;case g:case b:return e==t+"";case m:var S=u;case y:var C=r&l;if(S||(S=c),e.size!=t.size&&!C)return!1;var O=j.get(e);if(O)return O==t;r|=f,j.set(e,t);var E=s(S(e),S(t),r,i,P,j);return j.delete(e),E;case _:if(x)return x.call(e)==x.call(t)}return!1}var i=n(29),a=n(127),o=n(30),s=n(125),u=n(128),c=n(58),l=1,f=2,p="[object Boolean]",d="[object Date]",h="[object Error]",m="[object Map]",v="[object Number]",g="[object RegExp]",y="[object Set]",b="[object String]",_="[object Symbol]",w="[object ArrayBuffer]",R="[object DataView]",P=i?i.prototype:void 0,x=P?P.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t,n,r,o,u){var c=n&a,l=i(e),f=l.length;if(f!=i(t).length&&!c)return!1;for(var p=f;p--;){var d=l[p];if(!(c?d in t:s.call(t,d)))return!1}var h=u.get(e);if(h&&u.get(t))return h==t;var m=!0;u.set(e,t),u.set(t,e);for(var v=c;++p<f;){d=l[p];var g=e[d],y=t[d];if(r)var b=c?r(y,g,d,t,e,u):r(g,y,d,e,t,u);if(!(void 0===b?g===y||o(g,y,n,r,u):b)){m=!1;break}v||(v="constructor"==d)}if(m&&!v){var _=e.constructor,w=t.constructor;_!=w&&"constructor"in e&&"constructor"in t&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(m=!1)}return u.delete(e),u.delete(t),m}var i=n(129),a=1,o=Object.prototype,s=o.hasOwnProperty;e.exports=r},function(e,t,n){var r=n(23),i=n(5),a=r(i,"DataView");e.exports=a},function(e,t,n){var r=n(23),i=n(5),a=r(i,"Promise");e.exports=a},function(e,t,n){function r(e){for(var t=a(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,i(o)]}return t}var i=n(134),a=n(7);e.exports=r},function(e,t,n){function r(e,t){return s(e)&&u(t)?c(l(e),t):function(n){var r=a(n,e);return void 0===r&&r===t?o(n,e):i(t,r,f|p)}}var i=n(88),a=n(59),o=n(136),s=n(92),u=n(134),c=n(135),l=n(32),f=1,p=2;e.exports=r},function(e,t,n){var r=n(270),i=/^\./,a=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r(function(e){var t=[];return i.test(e)&&t.push(""),e.replace(a,function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)}),t});e.exports=s},function(e,t,n){function r(e){var t=i(e,function(e){return n.size===a&&n.clear(),e}),n=t.cache;return t}var i=n(271),a=500;e.exports=r},function(e,t,n){function r(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError(a);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(r.Cache||i),n}var i=n(80),a="Expected a function";r.Cache=i,e.exports=r},function(e,t){function n(e,t){return null!=e&&t in Object(e)}e.exports=n},function(e,t,n){function r(e){return o(e)?i(s(e)):a(e)}var i=n(274),a=n(275),o=n(92),s=n(32);e.exports=r},function(e,t){function n(e){return function(t){return null==t?void 0:t[e]}}e.exports=n},function(e,t,n){function r(e){return function(t){return i(t,e)}}var i=n(60);e.exports=r},function(e,t){function n(e,t,n,r,i){return i(e,function(e,i,a){n=r?(r=!1,e):t(n,e,i,a)}),n}e.exports=n},function(e,t,n){function r(e,t){return e&&i(t,a(t),e)}var i=n(19),a=n(7);e.exports=r},function(e,t,n){function r(e,t){return e&&i(t,a(t),e)}var i=n(19),a=n(49);e.exports=r},function(e,t,n){function r(e){if(!i(e))return o(e);var t=a(e),n=[];for(var r in e)("constructor"!=r||!t&&u.call(e,r))&&n.push(r);return n}var i=n(6),a=n(41),o=n(280),s=Object.prototype,u=s.hasOwnProperty;e.exports=r},function(e,t){function n(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}e.exports=n},function(e,t,n){function r(e,t){return i(e,a(e),t)}var i=n(19),a=n(90);e.exports=r},function(e,t,n){function r(e,t){return i(e,a(e),t)}var i=n(19),a=n(142);e.exports=r},function(e,t){function n(e){var t=e.length,n=e.constructor(t);return t&&"string"==typeof e[0]&&i.call(e,"index")&&(n.index=e.index,n.input=e.input),n}var r=Object.prototype,i=r.hasOwnProperty;e.exports=n},function(e,t,n){function r(e,t,n,r){var F=e.constructor;switch(t){case b:return i(e);case f:case p:return new F(+e);case _:return a(e,r);case w:case R:case P:case x:case j:case S:case C:case O:case E:return l(e,r);case d:return o(e,r,n);case h:case g:return new F(e);case m:return s(e);case v:return u(e,r,n);case y:return c(e)}}var i=n(97),a=n(285),o=n(286),s=n(288),u=n(289),c=n(291),l=n(143),f="[object Boolean]",p="[object Date]",d="[object Map]",h="[object Number]",m="[object RegExp]",v="[object Set]",g="[object String]",y="[object Symbol]",b="[object ArrayBuffer]",_="[object DataView]",w="[object Float32Array]",R="[object Float64Array]",P="[object Int8Array]",x="[object Int16Array]",j="[object Int32Array]",S="[object Uint8Array]",C="[object Uint8ClampedArray]",O="[object Uint16Array]",E="[object Uint32Array]";e.exports=r},function(e,t,n){function r(e,t){var n=t?i(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}var i=n(97);e.exports=r},function(e,t,n){function r(e,t,n){var r=t?n(o(e),s):o(e);return a(r,i,new e.constructor)}var i=n(287),a=n(94),o=n(128),s=1;e.exports=r},function(e,t){function n(e,t){return e.set(t[0],t[1]),e}e.exports=n},function(e,t){function n(e){var t=new e.constructor(e.source,r.exec(e));return t.lastIndex=e.lastIndex,t}var r=/\w*$/;e.exports=n},function(e,t,n){function r(e,t,n){var r=t?n(o(e),s):o(e);return a(r,i,new e.constructor)}var i=n(290),a=n(94),o=n(58),s=1;e.exports=r},function(e,t){function n(e,t){return e.add(t),e}e.exports=n},function(e,t,n){function r(e){return o?Object(o.call(e)):{}}var i=n(29),a=i?i.prototype:void 0,o=a?a.valueOf:void 0;e.exports=r},function(e,t,n){function r(e,t){return t=i(t,e),null==(e=o(e,t))||delete e[s(a(t))]}var i=n(31),a=n(145),o=n(293),s=n(32);e.exports=r},function(e,t,n){function r(e,t){return t.length<2?e:i(e,a(t,0,-1))}var i=n(60),a=n(146);e.exports=r},function(e,t,n){function r(e){return i(e)?void 0:e}var i=n(25);e.exports=r},function(e,t,n){function r(e){return o(e)||a(e)||!!(s&&e&&e[s])}var i=n(29),a=n(37),o=n(2),s=i?i.isConcatSpreadable:void 0;e.exports=r},function(e,t,n){function r(e){if("number"==typeof e)return e;if(a(e))return o;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(s,"");var n=c.test(e);return n||l.test(e)?f(e.slice(2),n?2:8):u.test(e)?o:+e}var i=n(6),a=n(47),o=NaN,s=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,c=/^0b[01]+$/i,l=/^0o[0-7]+$/i,f=parseInt;e.exports=r},function(e,t,n){function r(e){return i(e)&&e!=+e}var i=n(151);e.exports=r},function(e,t,n){function r(e){return function(t,n,r){var s=Object(t);if(!a(t)){var u=i(n,3);t=o(t),n=function(e){return u(s[e],e,s)}}var c=e(t,n,r);return c>-1?s[u?t[c]:c]:void 0}}var i=n(9),a=n(11),o=n(7);e.exports=r},function(e,t,n){function r(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:i(e,t,n)}var i=n(146);e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length;n--&&i(t,e[n],0)>-1;);return n}var i=n(42);e.exports=r},function(e,t,n){function r(e,t){for(var n=-1,r=e.length;++n<r&&i(t,e[n],0)>-1;);return n}var i=n(42);e.exports=r},function(e,t,n){function r(e){return a(e)?o(e):i(e)}var i=n(303),a=n(304),o=n(305);e.exports=r},function(e,t){function n(e){return e.split("")}e.exports=n},function(e,t){function n(e){return r.test(e)}var r=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=n},function(e,t){function n(e){return e.match(f)||[]}var r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",o="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",u="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",a,o].join("|")+")[\\ufe0e\\ufe0f]?"+s+")*",c="[\\ufe0e\\ufe0f]?"+s+u,l="(?:"+["[^\\ud800-\\udfff]"+r+"?",r,a,o,"[\\ud800-\\udfff]"].join("|")+")",f=RegExp(i+"(?="+i+")|"+l+c,"g");e.exports=n},function(e,t,n){var r=n(19),i=n(68),a=n(49),o=i(function(e,t,n,i){r(t,a(t),e,i)});e.exports=o},function(e,t,n){function r(e,t,n,r){return void 0===e||i(e,a[n])&&!o.call(r,n)?t:e}var i=n(30),a=Object.prototype,o=a.hasOwnProperty;e.exports=r},function(e,t,n){function r(e,t,n,r,y,b,_){var w=e[n],R=t[n],P=_.get(R);if(P)return void i(e,n,P);var x=b?b(w,R,n+"",e,t,_):void 0,j=void 0===x;if(j){var S=l(R),C=!S&&p(R),O=!S&&!C&&v(R);x=R,S||C||O?l(w)?x=w:f(w)?x=s(w):C?(j=!1,x=a(R,!0)):O?(j=!1,x=o(R,!0)):x=[]:m(R)||c(R)?(x=w,c(w)?x=g(w):(!h(w)||r&&d(w))&&(x=u(R))):j=!1}j&&(_.set(R,x),y(x,R,r,b,_),_.delete(R)),i(e,n,x)}var i=n(154),a=n(141),o=n(143),s=n(63),u=n(144),c=n(37),l=n(2),f=n(85),p=n(39),d=n(14),h=n(6),m=n(25),v=n(52),g=n(309);e.exports=r},function(e,t,n){function r(e){return i(e,a(e))}var i=n(19),a=n(49);e.exports=r},function(e,t,n){"use strict";function r(e){if(o(e))return e;if(s(e))return parseFloat(e);if(a(e))return i(e,r);throw new Error("The value should be a number, a parseable string or an array of those.")}var i=n(10),a=n(2),o=n(151),s=n(21);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n={},r=a(t,function(e){return-1!==e.indexOf("attribute:")}),c=o(r,function(e){return e.split(":")[1]});-1===u(c,"*")?i(c,function(t){e.isConjunctiveFacet(t)&&e.isFacetRefined(t)&&(n.facetsRefinements||(n.facetsRefinements={}),n.facetsRefinements[t]=e.facetsRefinements[t]),e.isDisjunctiveFacet(t)&&e.isDisjunctiveFacetRefined(t)&&(n.disjunctiveFacetsRefinements||(n.disjunctiveFacetsRefinements={}),n.disjunctiveFacetsRefinements[t]=e.disjunctiveFacetsRefinements[t]),e.isHierarchicalFacet(t)&&e.isHierarchicalFacetRefined(t)&&(n.hierarchicalFacetsRefinements||(n.hierarchicalFacetsRefinements={}),n.hierarchicalFacetsRefinements[t]=e.hierarchicalFacetsRefinements[t]);var r=e.getNumericRefinements(t);s(r)||(n.numericRefinements||(n.numericRefinements={}),n.numericRefinements[t]=e.numericRefinements[t])}):(s(e.numericRefinements)||(n.numericRefinements=e.numericRefinements),s(e.facetsRefinements)||(n.facetsRefinements=e.facetsRefinements),s(e.disjunctiveFacetsRefinements)||(n.disjunctiveFacetsRefinements=e.disjunctiveFacetsRefinements),s(e.hierarchicalFacetsRefinements)||(n.hierarchicalFacetsRefinements=e.hierarchicalFacetsRefinements));var l=a(t,function(e){return-1===e.indexOf("attribute:")});return i(l,function(t){n[t]=e[t]}),n}var i=n(12),a=n(46),o=n(10),s=n(26),u=n(65);e.exports=r},function(e,t,n){"use strict";var r=n(66),i=n(21),a=n(14),o=n(26),s=n(67),u=n(15),c=n(46),l=n(139),f={addRefinement:function(e,t,n){if(f.isRefined(e,t,n))return e;var r=""+n,i=e[t]?e[t].concat(r):[r],a={};return a[t]=i,s({},a,e)},removeRefinement:function(e,t,n){if(r(n))return f.clearRefinement(e,t);var i=""+n;return f.clearRefinement(e,function(e,n){return t===n&&i===e})},toggleRefinement:function(e,t,n){if(r(n))throw new Error("toggleRefinement should be used with a value");return f.isRefined(e,t,n)?f.removeRefinement(e,t,n):f.addRefinement(e,t,n)},clearRefinement:function(e,t,n){return r(t)?{}:i(t)?l(e,t):a(t)?u(e,function(e,r,i){var a=c(r,function(e){return!t(e,i,n)});return o(a)||(e[i]=a),e},{}):void 0},isRefined:function(e,t,i){var a=n(65),o=!!e[t]&&e[t].length>0;if(r(i)||!o)return o;var s=""+i;return-1!==a(e[t],s)}};e.exports=f},function(e,t){function n(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i}e.exports=n},function(e,t,n){function r(e,t){return e&&e.length?a(e,i(t,2)):0}var i=n(9),a=n(315);e.exports=r},function(e,t){function n(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);void 0!==a&&(n=void 0===n?a:n+a)}return n}e.exports=n},function(e,t,n){function r(e){return null==e?[]:i(e,a(e))}var i=n(317),a=n(7);e.exports=r},function(e,t,n){function r(e,t){return i(t,function(t){return e[t]})}var i=n(17);e.exports=r},function(e,t,n){function r(e,t,n){var r=-1;t=i(t.length?t:[l],u(a));var f=o(e,function(e,n,a){return{criteria:i(t,function(t){return t(e)}),index:++r,value:e}});return s(f,function(e,t){return c(e,t,n)})}var i=n(17),a=n(9),o=n(138),s=n(319),u=n(78),c=n(320),l=n(24);e.exports=r},function(e,t){function n(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}e.exports=n},function(e,t,n){function r(e,t,n){for(var r=-1,a=e.criteria,o=t.criteria,s=a.length,u=n.length;++r<s;){var c=i(a[r],o[r]);if(c){if(r>=u)return c;return c*("desc"==n[r]?-1:1)}}return e.index-t.index}var i=n(321);e.exports=r},function(e,t,n){function r(e,t){if(e!==t){var n=void 0!==e,r=null===e,a=e===e,o=i(e),s=void 0!==t,u=null===t,c=t===t,l=i(t);if(!u&&!l&&!o&&e>t||o&&s&&c&&!u&&!l||r&&s&&c||!n&&c||!a)return 1;if(!r&&!o&&!l&&e<t||l&&n&&a&&!r&&!o||u&&n&&a||!s&&a||!c)return-1}return 0}var i=n(47);e.exports=r},function(e,t,n){var r=n(18),i=n(69),a=n(50),o=n(34),s=r(function(e,t){var n=o(t,a(s));return i(e,32,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e,t,n){function r(){return(this&&this!==a&&this instanceof r?u:e).apply(s?n:this,arguments)}var s=t&o,u=i(e);return r}var i=n(70),a=n(5),o=1;e.exports=r},function(e,t,n){function r(e,t,n){function r(){for(var a=arguments.length,p=Array(a),d=a,h=u(r);d--;)p[d]=arguments[d];var m=a<3&&p[0]!==h&&p[a-1]!==h?[]:c(p,h);return(a-=m.length)<n?s(e,t,o,r.placeholder,void 0,p,m,void 0,void 0,n-a):i(this&&this!==l&&this instanceof r?f:e,this,p)}var f=a(e);return r}var i=n(43),a=n(70),o=n(159),s=n(162),u=n(50),c=n(34),l=n(5);e.exports=r},function(e,t){function n(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}e.exports=n},function(e,t,n){function r(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in i.prototype))return!1;if(e===n)return!0;var r=a(n);return!!r&&e===r[0]}var i=n(102),a=n(163),o=n(327),s=n(329);e.exports=r},function(e,t,n){function r(e){for(var t=e.name+"",n=i[t],r=o.call(i,t)?n.length:0;r--;){var a=n[r],s=a.func;if(null==s||s==e)return a.name}return t}var i=n(328),a=Object.prototype,o=a.hasOwnProperty;e.exports=r},function(e,t){var n={};e.exports=n},function(e,t,n){function r(e){if(u(e)&&!s(e)&&!(e instanceof i)){if(e instanceof a)return e;if(f.call(e,"__wrapped__"))return c(e)}return new a(e)}var i=n(102),a=n(165),o=n(103),s=n(2),u=n(8),c=n(330),l=Object.prototype,f=l.hasOwnProperty;r.prototype=o.prototype,r.prototype.constructor=r,e.exports=r},function(e,t,n){function r(e){if(e instanceof i)return e.clone();var t=new a(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var i=n(102),a=n(165),o=n(63);e.exports=r},function(e,t){function n(e){var t=e.match(r);return t?t[1].split(i):[]}var r=/\{\n\/\* \[wrapped with (.+)\] \*/,i=/,? & /;e.exports=n},function(e,t){function n(e,t){var n=t.length;if(!n)return e;var i=n-1;return t[i]=(n>1?"& ":"")+t[i],t=t.join(n>2?", ":" "),e.replace(r,"{\n/* [wrapped with "+t+"] */\n")}var r=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=n},function(e,t,n){function r(e,t){return i(o,function(n){var r="_."+n[0];t&n[1]&&!a(e,r)&&e.push(r)}),e.sort()}var i=n(87),a=n(82),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=r},function(e,t,n){function r(e,t){for(var n=e.length,r=o(t.length,n),s=i(e);r--;){var u=t[r];e[r]=a(u,n)?s[u]:void 0}return e}var i=n(63),a=n(40),o=Math.min;e.exports=r},function(e,t,n){function r(e,t,n,r){function u(){for(var t=-1,a=arguments.length,s=-1,f=r.length,p=Array(f+a),d=this&&this!==o&&this instanceof u?l:e;++s<f;)p[s]=r[s];for(;a--;)p[s++]=arguments[++t];return i(d,c?n:this,p)}var c=t&s,l=a(e);return u}var i=n(43),a=n(70),o=n(5),s=1;e.exports=r},function(e,t,n){function r(e,t){var n=e[1],r=t[1],m=n|r,v=m<(u|c|p),g=r==p&&n==f||r==p&&n==d&&e[7].length<=t[8]||r==(p|d)&&t[7].length<=t[8]&&n==f;if(!v&&!g)return e;r&u&&(e[2]=t[2],m|=n&u?0:l);var y=t[3];if(y){var b=e[3];e[3]=b?i(b,y,t[4]):y,e[4]=b?o(e[3],s):t[4]}return y=t[5],y&&(b=e[5],e[5]=b?a(b,y,t[6]):y,e[6]=b?o(e[5],s):t[6]),y=t[7],y&&(e[7]=y),r&p&&(e[8]=null==e[8]?t[8]:h(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=m,e}var i=n(160),a=n(161),o=n(34),s="__lodash_placeholder__",u=1,c=2,l=4,f=8,p=128,d=256,h=Math.min;e.exports=r},function(e,t,n){var r=n(18),i=n(69),a=n(50),o=n(34),s=r(function(e,t){var n=o(t,a(s));return i(e,64,void 0,t,n)});s.placeholder={},e.exports=s},function(e,t,n){function r(e,t,n){return e=s(e),n=null==n?0:i(o(n),0,e.length),t=a(t),e.slice(n,n+t.length)==t}var i=n(339),a=n(93),o=n(33),s=n(61);e.exports=r},function(e,t){function n(e,t,n){return e===e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}e.exports=n},function(e,t,n){"use strict";function r(e){return function(t,n){var r=e.hierarchicalFacets[n],a=e.hierarchicalFacetsRefinements[r.name]&&e.hierarchicalFacetsRefinements[r.name][0]||"",o=e._getHierarchicalFacetSeparator(r),s=e._getHierarchicalRootPath(r),u=e._getHierarchicalShowParentLevel(r),l=h(e._getHierarchicalFacetSortBy(r)),f=i(l,o,s,u,a),p=t;return s&&(p=t.slice(s.split(o).length)),c(p,f,{name:e.hierarchicalFacets[n].name,count:null,isRefined:!0,path:null,data:null})}}function i(e,t,n,r,i){return function(s,c,f){var h=s;if(f>0){var m=0;for(h=s;m<f;)h=h&&p(h.data,{isRefined:!0}),m++}if(h){var v=a(h.path||n,i,t,n,r);h.data=l(u(d(c.data,v),o(t,i)),e[0],e[1])}return s}}function a(e,t,n,r,i){return function(a,o){return(!r||0===o.indexOf(r)&&r!==o)&&(!r&&-1===o.indexOf(n)||r&&o.split(n).length-r.split(n).length===1||-1===o.indexOf(n)&&-1===t.indexOf(n)||0===t.indexOf(o)||0===o.indexOf(e+n)&&(i||0===o.indexOf(t)))}}function o(e,t){return function(n,r){return{name:f(s(r.split(e))),path:r,count:n,isRefined:t===r||0===t.indexOf(r+e),data:null}}}e.exports=r;var s=n(145),u=n(10),c=n(15),l=n(156),f=n(153),p=n(16),d=n(341),h=n(168)},function(e,t,n){function r(e,t){if(null==e)return{};var n=i(s(e),function(e){return[e]});return t=a(t),o(e,n,function(e,n){return t(e,n[0])})}var i=n(17),a=n(9),o=n(169),s=n(96);e.exports=r},function(e,t,n){function r(e,t,n,r){if(!s(e))return e;t=a(t,e);for(var c=-1,l=t.length,f=l-1,p=e;null!=p&&++c<l;){var d=u(t[c]),h=n;if(c!=f){var m=p[d];h=r?r(m,d,p):void 0,void 0===h&&(h=s(m)?m:o(t[c+1])?[]:{})}i(p,d,h),p=p[d]}return e}var i=n(62),a=n(31),o=n(40),s=n(6),u=n(32);e.exports=r},function(e,t,n){"use strict";function r(e,t){this.main=e,this.fn=t,this.lastResults=null}var i=n(170),a=n(104);i.inherits(r,a.EventEmitter),r.prototype.detach=function(){this.removeAllListeners(),this.main.detachDerivedHelper(this)},r.prototype.getModifiedState=function(e){return this.fn(e)},e.exports=r},function(e,t){e.exports=function(e){return e&&"object"===typeof e&&"function"===typeof e.copy&&"function"===typeof e.fill&&"function"===typeof e.readUInt8}},function(e,t){"function"===typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},function(e,t,n){"use strict";var r=n(12),i=n(10),a=n(15),o=n(99),s=n(2),u={_getQueries:function(e,t){var n=[];return n.push({indexName:e,params:u._getHitsSearchParams(t)}),r(t.getRefinedDisjunctiveFacets(),function(r){n.push({indexName:e,params:u._getDisjunctiveFacetSearchParams(t,r)})}),r(t.getRefinedHierarchicalFacets(),function(r){var i=t.getHierarchicalFacetByName(r),a=t.getHierarchicalRefinement(r),o=t._getHierarchicalFacetSeparator(i);a.length>0&&a[0].split(o).length>1&&n.push({indexName:e,params:u._getDisjunctiveFacetSearchParams(t,r,!0)})}),n},_getHitsSearchParams:function(e){var t=e.facets.concat(e.disjunctiveFacets).concat(u._getHitsHierarchicalFacetsAttributes(e)),n=u._getFacetFilters(e),r=u._getNumericFilters(e),i=u._getTagFilters(e),a={facets:t,tagFilters:i};return n.length>0&&(a.facetFilters=n),r.length>0&&(a.numericFilters=r),o(e.getQueryParams(),a)},_getDisjunctiveFacetSearchParams:function(e,t,n){var r=u._getFacetFilters(e,t,n),i=u._getNumericFilters(e,t),a=u._getTagFilters(e),s={hitsPerPage:1,page:0,attributesToRetrieve:[],attributesToHighlight:[],attributesToSnippet:[],tagFilters:a},c=e.getHierarchicalFacetByName(t);return s.facets=c?u._getDisjunctiveHierarchicalFacetAttribute(e,c,n):t,i.length>0&&(s.numericFilters=i),r.length>0&&(s.facetFilters=r),o(e.getQueryParams(),s)},_getNumericFilters:function(e,t){if(e.numericFilters)return e.numericFilters;var n=[];return r(e.numericRefinements,function(e,a){r(e,function(e,o){t!==a&&r(e,function(e){if(s(e)){var t=i(e,function(e){return a+o+e});n.push(t)}else n.push(a+o+e)})})}),n},_getTagFilters:function(e){return e.tagFilters?e.tagFilters:e.tagRefinements.join(",")},_getFacetFilters:function(e,t,n){var i=[];return r(e.facetsRefinements,function(e,t){r(e,function(e){i.push(t+":"+e)})}),r(e.facetsExcludes,function(e,t){r(e,function(e){i.push(t+":-"+e)})}),r(e.disjunctiveFacetsRefinements,function(e,n){if(n!==t&&e&&0!==e.length){var a=[];r(e,function(e){a.push(n+":"+e)}),i.push(a)}}),r(e.hierarchicalFacetsRefinements,function(r,a){var o=r[0];if(void 0!==o){var s,u,c=e.getHierarchicalFacetByName(a),l=e._getHierarchicalFacetSeparator(c),f=e._getHierarchicalRootPath(c);if(t===a){if(-1===o.indexOf(l)||!f&&!0===n||f&&f.split(l).length===o.split(l).length)return;f?(u=f.split(l).length-1,o=f):(u=o.split(l).length-2,o=o.slice(0,o.lastIndexOf(l))),s=c.attributes[u]}else u=o.split(l).length-1,s=c.attributes[u];s&&i.push([s+":"+o])}}),i},_getHitsHierarchicalFacetsAttributes:function(e){var t=[];return a(e.hierarchicalFacets,function(t,n){var r=e.getHierarchicalRefinement(n.name)[0];if(!r)return t.push(n.attributes[0]),t;var i=e._getHierarchicalFacetSeparator(n),a=r.split(i).length,o=n.attributes.slice(0,a+1);return t.concat(o)},t)},_getDisjunctiveHierarchicalFacetAttribute:function(e,t,n){var r=e._getHierarchicalFacetSeparator(t);if(!0===n){var i=e._getHierarchicalRootPath(t),a=0;return i&&(a=i.split(r).length),[t.attributes[a]]}var o=e.getHierarchicalRefinement(t.name)[0]||"",s=o.split(r).length-1;return t.attributes.slice(0,s+1)},getSearchForFacetQuery:function(e,t,n,r){var i=r.isDisjunctiveFacet(e)?r.clearRefinements(e):r,a={facetQuery:t,facetName:e};return"number"===typeof n&&(a.maxFacetHits=n),o(u._getHitsSearchParams(i),a)}};e.exports=u},function(e,t,n){"use strict";var r=n(171),i=n(7),a={advancedSyntax:"aS",allowTyposOnNumericTokens:"aTONT",analyticsTags:"aT",analytics:"a",aroundLatLngViaIP:"aLLVIP",aroundLatLng:"aLL",aroundPrecision:"aP",aroundRadius:"aR",attributesToHighlight:"aTH",attributesToRetrieve:"aTR",attributesToSnippet:"aTS",disjunctiveFacetsRefinements:"dFR",disjunctiveFacets:"dF",distinct:"d",facetsExcludes:"fE",facetsRefinements:"fR",facets:"f",getRankingInfo:"gRI",hierarchicalFacetsRefinements:"hFR",hierarchicalFacets:"hF",highlightPostTag:"hPoT",highlightPreTag:"hPrT",hitsPerPage:"hPP",ignorePlurals:"iP",index:"idx",insideBoundingBox:"iBB",insidePolygon:"iPg",length:"l",maxValuesPerFacet:"mVPF",minimumAroundRadius:"mAR",minProximity:"mP",minWordSizefor1Typo:"mWS1T",minWordSizefor2Typos:"mWS2T",numericFilters:"nF",numericRefinements:"nR",offset:"o",optionalWords:"oW",page:"p",queryType:"qT",query:"q",removeWordsIfNoResults:"rWINR",replaceSynonymsInHighlight:"rSIH",restrictSearchableAttributes:"rSA",synonyms:"s",tagFilters:"tF",tagRefinements:"tR",typoTolerance:"tT",optionalTagFilters:"oTF",optionalFacetFilters:"oFF",snippetEllipsisText:"sET",disableExactOnAttributes:"dEOA",enableExactOnSingleWordQuery:"eEOSWQ"},o=r(a);e.exports={ENCODED_PARAMETERS:i(o),decode:function(e){return o[e]},encode:function(e){return a[e]}}},function(e,t,n){function r(e,t){return function(n,r){return i(n,e,t(r),{})}}var i=n(349);e.exports=r},function(e,t,n){function r(e,t,n,r){return i(e,function(e,i,a){t(r,n(e),i,a)}),r}var i=n(44);e.exports=r},function(e,t,n){"use strict";var r=n(351),i=n(352),a=n(172);e.exports={formats:a,parse:i,stringify:r}},function(e,t,n){"use strict";var r=n(106),i=n(172),a={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},o=Date.prototype.toISOString,s={delimiter:"&",encode:!0,encoder:r.encode,encodeValuesOnly:!1,serializeDate:function(e){return o.call(e)},skipNulls:!1,strictNullHandling:!1},u=function e(t,n,i,a,o,u,c,l,f,p,d,h){var m=t;if("function"===typeof c)m=c(n,m);else if(m instanceof Date)m=p(m);else if(null===m){if(a)return u&&!h?u(n,s.encoder):n;m=""}if("string"===typeof m||"number"===typeof m||"boolean"===typeof m||r.isBuffer(m)){if(u){return[d(h?n:u(n,s.encoder))+"="+d(u(m,s.encoder))]}return[d(n)+"="+d(String(m))]}var v=[];if("undefined"===typeof m)return v;var g;if(Array.isArray(c))g=c;else{var y=Object.keys(m);g=l?y.sort(l):y}for(var b=0;b<g.length;++b){var _=g[b];o&&null===m[_]||(v=Array.isArray(m)?v.concat(e(m[_],i(n,_),i,a,o,u,c,l,f,p,d,h)):v.concat(e(m[_],n+(f?"."+_:"["+_+"]"),i,a,o,u,c,l,f,p,d,h)))}return v};e.exports=function(e,t){var n=e,o=t?r.assign({},t):{};if(null!==o.encoder&&void 0!==o.encoder&&"function"!==typeof o.encoder)throw new TypeError("Encoder has to be a function.");var c="undefined"===typeof o.delimiter?s.delimiter:o.delimiter,l="boolean"===typeof o.strictNullHandling?o.strictNullHandling:s.strictNullHandling,f="boolean"===typeof o.skipNulls?o.skipNulls:s.skipNulls,p="boolean"===typeof o.encode?o.encode:s.encode,d="function"===typeof o.encoder?o.encoder:s.encoder,h="function"===typeof o.sort?o.sort:null,m="undefined"!==typeof o.allowDots&&o.allowDots,v="function"===typeof o.serializeDate?o.serializeDate:s.serializeDate,g="boolean"===typeof o.encodeValuesOnly?o.encodeValuesOnly:s.encodeValuesOnly;if("undefined"===typeof o.format)o.format=i.default;else if(!Object.prototype.hasOwnProperty.call(i.formatters,o.format))throw new TypeError("Unknown format option provided.");var y,b,_=i.formatters[o.format];"function"===typeof o.filter?(b=o.filter,n=b("",n)):Array.isArray(o.filter)&&(b=o.filter,y=b);var w=[];if("object"!==typeof n||null===n)return"";var R;R=o.arrayFormat in a?o.arrayFormat:"indices"in o?o.indices?"indices":"repeat":"indices";var P=a[R];y||(y=Object.keys(n)),h&&y.sort(h);for(var x=0;x<y.length;++x){var j=y[x];f&&null===n[j]||(w=w.concat(u(n[j],j,P,l,f,p?d:null,b,h,m,v,_,g)))}var S=w.join(c),C=!0===o.addQueryPrefix?"?":"";return S.length>0?C+S:""}},function(e,t,n){"use strict";var r=n(106),i=Object.prototype.hasOwnProperty,a={allowDots:!1,allowPrototypes:!1,arrayLimit:20,decoder:r.decode,delimiter:"&",depth:5,parameterLimit:1e3,plainObjects:!1,strictNullHandling:!1},o=function(e,t){for(var n={},r=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,o=t.parameterLimit===1/0?void 0:t.parameterLimit,s=r.split(t.delimiter,o),u=0;u<s.length;++u){var c,l,f=s[u],p=f.indexOf("]="),d=-1===p?f.indexOf("="):p+1;-1===d?(c=t.decoder(f,a.decoder),l=t.strictNullHandling?null:""):(c=t.decoder(f.slice(0,d),a.decoder),l=t.decoder(f.slice(d+1),a.decoder)),i.call(n,c)?n[c]=[].concat(n[c]).concat(l):n[c]=l}return n},s=function(e,t,n){if(!e.length)return t;var r,i=e.shift();if("[]"===i)r=[],r=r.concat(s(e,t,n));else{r=n.plainObjects?Object.create(null):{};var a="["===i.charAt(0)&&"]"===i.charAt(i.length-1)?i.slice(1,-1):i,o=parseInt(a,10);!isNaN(o)&&i!==a&&String(o)===a&&o>=0&&n.parseArrays&&o<=n.arrayLimit?(r=[],r[o]=s(e,t,n)):r[a]=s(e,t,n)}return r},u=function(e,t,n){if(e){var r=n.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/,o=/(\[[^[\]]*])/g,u=a.exec(r),c=u?r.slice(0,u.index):r,l=[];if(c){if(!n.plainObjects&&i.call(Object.prototype,c)&&!n.allowPrototypes)return;l.push(c)}for(var f=0;null!==(u=o.exec(r))&&f<n.depth;){if(f+=1,!n.plainObjects&&i.call(Object.prototype,u[1].slice(1,-1))&&!n.allowPrototypes)return;l.push(u[1])}return u&&l.push("["+r.slice(u.index)+"]"),s(l,t,n)}};e.exports=function(e,t){var n=t?r.assign({},t):{};if(null!==n.decoder&&void 0!==n.decoder&&"function"!==typeof n.decoder)throw new TypeError("Decoder has to be a function.");if(n.ignoreQueryPrefix=!0===n.ignoreQueryPrefix,n.delimiter="string"===typeof n.delimiter||r.isRegExp(n.delimiter)?n.delimiter:a.delimiter,n.depth="number"===typeof n.depth?n.depth:a.depth,n.arrayLimit="number"===typeof n.arrayLimit?n.arrayLimit:a.arrayLimit,n.parseArrays=!1!==n.parseArrays,n.decoder="function"===typeof n.decoder?n.decoder:a.decoder,n.allowDots="boolean"===typeof n.allowDots?n.allowDots:a.allowDots,n.plainObjects="boolean"===typeof n.plainObjects?n.plainObjects:a.plainObjects,n.allowPrototypes="boolean"===typeof n.allowPrototypes?n.allowPrototypes:a.allowPrototypes,n.parameterLimit="number"===typeof n.parameterLimit?n.parameterLimit:a.parameterLimit,n.strictNullHandling="boolean"===typeof n.strictNullHandling?n.strictNullHandling:a.strictNullHandling,""===e||null===e||"undefined"===typeof e)return n.plainObjects?Object.create(null):{};for(var i="string"===typeof e?o(e,n):e,s=n.plainObjects?Object.create(null):{},c=Object.keys(i),l=0;l<c.length;++l){var f=c[l],p=u(f,i[f],n);s=r.merge(s,p,n)}return r.compact(s)}},function(e,t,n){var r=n(18),i=n(69),a=n(50),o=n(34),s=r(function(e,t,n){var r=1;if(n.length){var u=o(n,a(s));r|=32}return i(e,r,t,n,u)});s.placeholder={},e.exports=s},function(e,t,n){var r=n(355),i=n(147),a=i(function(e,t){return null==e?{}:r(e,t)});e.exports=a},function(e,t,n){function r(e,t){return i(e,t,function(t,n){return a(e,n)})}var i=n(169),a=n(136);e.exports=r},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}function s(){return"#"}function u(e){return function(t,n){if(!n.getConfiguration)return t;var r=n.getConfiguration(t,e),i=function e(t,n){return Array.isArray(t)?(0,_.default)(t,n):(0,R.default)(t)?(0,y.default)({},t,n,e):void 0};return(0,y.default)({},t,r,i)}}Object.defineProperty(t,"__esModule",{value:!0});var c=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},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),f=n(357),p=r(f),d=n(74),h=r(d),m=n(12),v=r(m),g=n(177),y=r(g),b=n(380),_=r(b),w=n(25),R=r(w),P=n(104),x=n(382),j=r(x),S=n(179),C=r(S),O=n(384),E=r(O),F=function(e,t,n){return e(t,n)},N=function(e){function t(e){var n=e.appId,r=void 0===n?null:n,o=e.apiKey,s=void 0===o?null:o,u=e.indexName,l=void 0===u?null:u,f=e.numberLocale,d=e.searchParameters,h=void 0===d?{}:d,m=e.urlSync,v=void 0===m?null:m,g=e.searchFunction,y=e.createAlgoliaClient,b=void 0===y?F:y;i(this,t);var _=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));if(null===r||null===s||null===l){throw new Error("\nUsage: instantsearch({\n appId: 'my_application_id',\n apiKey: 'my_search_api_key',\n indexName: 'my_index_name'\n});")}var w=b(p.default,r,s);return w.addAlgoliaAgent("instantsearch.js "+C.default),_.client=w,_.helper=null,_.indexName=l,_.searchParameters=c({},h,{index:l}),_.widgets=[],_.templatesConfig={helpers:(0,E.default)({numberLocale:f}),compileOptions:{}},g&&(_._searchFunction=g),_.urlSync=!0===v?{}:v,_}return o(t,e),l(t,[{key:"addWidget",value:function(e){if(void 0===e.render&&void 0===e.init)throw new Error("Widget definition missing render or init method");this.widgets.push(e)}},{key:"start",value:function(){var e=this;if(!this.widgets)throw new Error("No widgets were added to instantsearch.js");var t=void 0;if(this.urlSync){var n=(0,j.default)(this.urlSync);this._createURL=n.createURL.bind(n),this._createAbsoluteURL=function(t){return e._createURL(t,{absolute:!0})},this._onHistoryChange=n.onHistoryChange.bind(n),this.widgets.push(n),t=n.searchParametersFromUrl}else this._createURL=s,this._createAbsoluteURL=s,this._onHistoryChange=function(){};this.searchParameters=this.widgets.reduce(u(t),this.searchParameters);var r=(0,h.default)(this.client,this.searchParameters.index||this.indexName,this.searchParameters);this._searchFunction&&(this._mainHelperSearch=r.search.bind(r),r.search=function(){var t=(0,h.default)({addAlgoliaAgent:function(){},search:function(){}},r.state.index,r.state);t.once("search",function(t){r.overrideStateWithoutTriggeringChangeEvent(t),e._mainHelperSearch()}),e._searchFunction(t)}),this.helper=r,this._init(r.state,this.helper),this.helper.on("result",this._render.bind(this,this.helper)),this.helper.search()}},{key:"createURL",value:function(e){if(!this._createURL)throw new Error("You need to call start() before calling createURL()");return this._createURL(this.helper.state.setQueryParameters(e))}},{key:"_render",value:function(e,t,n){var r=this;(0,v.default)(this.widgets,function(i){i.render&&i.render({templatesConfig:r.templatesConfig,results:t,state:n,helper:e,createURL:r._createAbsoluteURL,instantSearchInstance:r})}),this.emit("render")}},{key:"_init",value:function(e,t){var n=this;(0,v.default)(this.widgets,function(r){r.init&&r.init({state:e,helper:t,templatesConfig:n.templatesConfig,createURL:n._createAbsoluteURL,onHistoryChange:n._onHistoryChange,instantSearchInstance:n})})}}]),t}(P.EventEmitter);t.default=N},function(e,t,n){"use strict";var r=n(358),i=n(370);e.exports=i(r,"(lite) ")},function(e,t,n){function r(e,t,r){var a=n(73)("algoliasearch"),o=n(51),s=n(108),c=n(109),l="Usage: algoliasearch(applicationID, apiKey, opts)";if(!0!==r._allowEmptyCredentials&&!e)throw new u.AlgoliaSearchError("Please provide an application ID. "+l);if(!0!==r._allowEmptyCredentials&&!t)throw new u.AlgoliaSearchError("Please provide an API key. "+l);this.applicationID=e,this.apiKey=t,this.hosts={read:[],write:[]},r=r||{};var f=r.protocol||"https:";if(this._timeouts=r.timeouts||{connect:1e3,read:2e3,write:3e4},r.timeout&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=r.timeout),/:$/.test(f)||(f+=":"),"http:"!==r.protocol&&"https:"!==r.protocol)throw new u.AlgoliaSearchError("protocol must be `http:` or `https:` (was `"+r.protocol+"`)");if(this._checkAppIdData(),r.hosts)s(r.hosts)?(this.hosts.read=o(r.hosts),this.hosts.write=o(r.hosts)):(this.hosts.read=o(r.hosts.read),this.hosts.write=o(r.hosts.write));else{var p=c(this._shuffleResult,function(t){return e+"-"+t+".algolianet.com"});this.hosts.read=[this.applicationID+"-dsn.algolia.net"].concat(p),this.hosts.write=[this.applicationID+".algolia.net"].concat(p)}this.hosts.read=c(this.hosts.read,i(f)),this.hosts.write=c(this.hosts.write,i(f)),this.extraHeaders={},this.cache=r._cache||{},this._ua=r._ua,this._useCache=!(void 0!==r._useCache&&!r._cache)||r._useCache,this._useFallback=void 0===r.useFallback||r.useFallback,this._setTimeout=r._setTimeout,a("init done, %j",this)}function i(e){return function(t){return e+"//"+t.toLowerCase()}}function a(e){if(void 0===Array.prototype.toJSON)return JSON.stringify(e);var t=Array.prototype.toJSON;delete Array.prototype.toJSON;var n=JSON.stringify(e);return Array.prototype.toJSON=t,n}function o(e){for(var t,n,r=e.length;0!==r;)n=Math.floor(Math.random()*r),r-=1,t=e[r],e[r]=e[n],e[n]=t;return e}function s(e){var t={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r;r="x-algolia-api-key"===n||"x-algolia-application-id"===n?"**hidden for security purposes**":e[n],t[n]=r}return t}e.exports=r;var u=n(72),c=n(359),l=n(360),f=n(367),p=Object({NODE_ENV:"production"}).RESET_APP_DATA_TIMER&&parseInt(Object({NODE_ENV:"production"}).RESET_APP_DATA_TIMER,10)||12e4;r.prototype.initIndex=function(e){return new l(this,e)},r.prototype.setExtraHeader=function(e,t){this.extraHeaders[e.toLowerCase()]=t},r.prototype.getExtraHeader=function(e){return this.extraHeaders[e.toLowerCase()]},r.prototype.unsetExtraHeader=function(e){delete this.extraHeaders[e.toLowerCase()]},r.prototype.addAlgoliaAgent=function(e){-1===this._ua.indexOf(";"+e)&&(this._ua+=";"+e)},r.prototype._jsonRequest=function(e){function t(n,c){function g(e){var t=e&&e.body&&e.body.message&&e.body.status||e.statusCode||e&&e.body&&200;o("received response: statusCode: %s, computed statusCode: %d, headers: %j",e.statusCode,t,e.headers);var n=2===Math.floor(t/100),a=new Date;if(v.push({currentHost:P,headers:s(i),content:r||null,contentLength:void 0!==r?r.length:null,method:c.method,timeouts:c.timeouts,url:c.url,startTime:R,endTime:a,duration:a-R,statusCode:t}),n)return p._useCache&&f&&(f[w]=e.responseText),e.body;if(4!==Math.floor(t/100))return d+=1,b();o("unrecoverable error");var l=new u.AlgoliaSearchError(e.body&&e.body.message,{debugData:v,statusCode:t});return p._promise.reject(l)}function y(t){o("error: %s, stack: %s",t.message,t.stack);var n=new Date;return v.push({currentHost:P,headers:s(i),content:r||null,contentLength:void 0!==r?r.length:null,method:c.method,timeouts:c.timeouts,url:c.url,startTime:R,endTime:n,duration:n-R}),t instanceof u.AlgoliaSearchError||(t=new u.Unknown(t&&t.message,t)),d+=1,t instanceof u.Unknown||t instanceof u.UnparsableJSON||d>=p.hosts[e.hostType].length&&(h||!m)?(t.debugData=v,p._promise.reject(t)):t instanceof u.RequestTimeout?_():b()}function b(){return o("retrying request"),p._incrementHostIndex(e.hostType),t(n,c)}function _(){return o("retrying request with higher timeout"),p._incrementHostIndex(e.hostType),p._incrementTimeoutMultipler(),c.timeouts=p._getTimeoutsForRequest(e.hostType),t(n,c)}p._checkAppIdData();var w,R=new Date;if(p._useCache&&(w=e.url),p._useCache&&r&&(w+="_body_"+c.body),p._useCache&&f&&void 0!==f[w])return o("serving response from cache"),p._promise.resolve(JSON.parse(f[w]));if(d>=p.hosts[e.hostType].length)return!m||h?(o("could not get any response"),p._promise.reject(new u.AlgoliaSearchError("Cannot connect to the AlgoliaSearch API. Send an email to support@algolia.com to report and resolve the issue. Application id was: "+p.applicationID,{debugData:v}))):(o("switching to fallback"),d=0,c.method=e.fallback.method,c.url=e.fallback.url,c.jsonBody=e.fallback.body,c.jsonBody&&(c.body=a(c.jsonBody)),i=p._computeRequestHeaders(l),c.timeouts=p._getTimeoutsForRequest(e.hostType),p._setHostIndexByType(0,e.hostType),h=!0,t(p._request.fallback,c));var P=p._getHostByType(e.hostType),x=P+c.url,j={body:c.body,jsonBody:c.jsonBody,method:c.method,headers:i,timeouts:c.timeouts,debug:o};return o("method: %s, url: %s, headers: %j, timeouts: %d",j.method,x,j.headers,j.timeouts),n===p._request.fallback&&o("using fallback"),n.call(p,x,j).then(g,y)}this._checkAppIdData();var r,i,o=n(73)("algoliasearch:"+e.url),l=e.additionalUA||"",f=e.cache,p=this,d=0,h=!1,m=p._useFallback&&p._request.fallback&&e.fallback;this.apiKey.length>500&&void 0!==e.body&&(void 0!==e.body.params||void 0!==e.body.requests)?(e.body.apiKey=this.apiKey,i=this._computeRequestHeaders(l,!1)):i=this._computeRequestHeaders(l),void 0!==e.body&&(r=a(e.body)),o("request start");var v=[],g=t(p._request,{url:e.url,method:e.method,body:r,jsonBody:e.body,timeouts:p._getTimeoutsForRequest(e.hostType)});if("function"!==typeof e.callback)return g;g.then(function(t){c(function(){e.callback(null,t)},p._setTimeout||setTimeout)},function(t){c(function(){e.callback(t)},p._setTimeout||setTimeout)})},r.prototype._getSearchParams=function(e,t){if(void 0===e||null===e)return t;for(var n in e)null!==n&&void 0!==e[n]&&e.hasOwnProperty(n)&&(t+=""===t?"":"&",t+=n+"="+encodeURIComponent("[object Array]"===Object.prototype.toString.call(e[n])?a(e[n]):e[n]));return t},r.prototype._computeRequestHeaders=function(e,t){var r=n(35),i=e?this._ua+";"+e:this._ua,a={"x-algolia-agent":i,"x-algolia-application-id":this.applicationID};return!1!==t&&(a["x-algolia-api-key"]=this.apiKey),this.userToken&&(a["x-algolia-usertoken"]=this.userToken),this.securityTags&&(a["x-algolia-tagfilters"]=this.securityTags),r(this.extraHeaders,function(e,t){a[t]=e}),a},r.prototype.search=function(e,t,r){var i=n(108),a=n(109);if(!i(e))throw new Error("Usage: client.search(arrayOfQueries[, callback])");"function"===typeof t?(r=t,t={}):void 0===t&&(t={});var o=this,s={requests:a(e,function(e){var t="";return void 0!==e.query&&(t+="query="+encodeURIComponent(e.query)),{indexName:e.indexName,params:o._getSearchParams(e.params,t)}})},u=a(s.requests,function(e,t){return t+"="+encodeURIComponent("/1/indexes/"+encodeURIComponent(e.indexName)+"?"+e.params)}).join("&"),c="/1/indexes/*/queries";return void 0!==t.strategy&&(c+="?strategy="+t.strategy),this._jsonRequest({cache:this.cache,method:"POST",url:c,body:s,hostType:"read",fallback:{method:"GET",url:"/1/indexes/*",body:{params:u}},callback:r})},r.prototype.setSecurityTags=function(e){if("[object Array]"===Object.prototype.toString.call(e)){for(var t=[],n=0;n<e.length;++n)if("[object Array]"===Object.prototype.toString.call(e[n])){for(var r=[],i=0;i<e[n].length;++i)r.push(e[n][i]);t.push("("+r.join(",")+")")}else t.push(e[n]);e=t.join(",")}this.securityTags=e},r.prototype.setUserToken=function(e){this.userToken=e},r.prototype.clearCache=function(){this.cache={}},r.prototype.setRequestTimeout=function(e){e&&(this._timeouts.connect=this._timeouts.read=this._timeouts.write=e)},r.prototype.setTimeouts=function(e){this._timeouts=e},r.prototype.getTimeouts=function(){return this._timeouts},r.prototype._getAppIdData=function(){var e=f.get(this.applicationID);return null!==e&&this._cacheAppIdData(e),e},r.prototype._setAppIdData=function(e){return e.lastChange=(new Date).getTime(),this._cacheAppIdData(e),f.set(this.applicationID,e)},r.prototype._checkAppIdData=function(){var e=this._getAppIdData(),t=(new Date).getTime();return null===e||t-e.lastChange>p?this._resetInitialAppIdData(e):e},r.prototype._resetInitialAppIdData=function(e){var t=e||{};return t.hostIndexes={read:0,write:0},t.timeoutMultiplier=1,t.shuffleResult=t.shuffleResult||o([1,2,3]),this._setAppIdData(t)},r.prototype._cacheAppIdData=function(e){this._hostIndexes=e.hostIndexes,this._timeoutMultiplier=e.timeoutMultiplier,this._shuffleResult=e.shuffleResult},r.prototype._partialAppIdDataUpdate=function(e){var t=n(35),r=this._getAppIdData();return t(e,function(e,t){r[t]=e}),this._setAppIdData(r)},r.prototype._getHostByType=function(e){return this.hosts[e][this._getHostIndexByType(e)]},r.prototype._getTimeoutMultiplier=function(){return this._timeoutMultiplier},r.prototype._getHostIndexByType=function(e){return this._hostIndexes[e]},r.prototype._setHostIndexByType=function(e,t){var r=n(51),i=r(this._hostIndexes);return i[t]=e,this._partialAppIdDataUpdate({hostIndexes:i}),e},r.prototype._incrementHostIndex=function(e){return this._setHostIndexByType((this._getHostIndexByType(e)+1)%this.hosts[e].length,e)},r.prototype._incrementTimeoutMultipler=function(){var e=Math.max(this._timeoutMultiplier+1,4);return this._partialAppIdDataUpdate({timeoutMultiplier:e})},r.prototype._getTimeoutsForRequest=function(e){return{connect:this._timeouts.connect*this._timeoutMultiplier,complete:this._timeouts[e]*this._timeoutMultiplier}}},function(e,t){e.exports=function(e,t){t(e,0)}},function(e,t,n){function r(e,t){this.indexName=t,this.as=e,this.typeAheadArgs=null,this.typeAheadValueOption=null,this.cache={}}var i=n(176),a=n(361),o=n(362);e.exports=r,r.prototype.clearCache=function(){this.cache={}},r.prototype.search=i("query"),r.prototype.similarSearch=i("similarQuery"),r.prototype.browse=function(e,t,r){var i,a,o=n(363),s=this;0===arguments.length||1===arguments.length&&"function"===typeof arguments[0]?(i=0,r=arguments[0],e=void 0):"number"===typeof arguments[0]?(i=arguments[0],"number"===typeof arguments[1]?a=arguments[1]:"function"===typeof arguments[1]&&(r=arguments[1],a=void 0),e=void 0,t=void 0):"object"===typeof arguments[0]?("function"===typeof arguments[1]&&(r=arguments[1]),t=arguments[0],e=void 0):"string"===typeof arguments[0]&&"function"===typeof arguments[1]&&(r=arguments[1],t=void 0),t=o({},t||{},{page:i,hitsPerPage:a,query:e});var u=this.as._getSearchParams(t,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(s.indexName)+"/browse",body:{params:u},hostType:"read",callback:r})},r.prototype.browseFrom=function(e,t){return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/browse",body:{cursor:e},hostType:"read",callback:t})},r.prototype.searchForFacetValues=function(e,t){var r=n(51),i=n(364);if(void 0===e.facetName||void 0===e.facetQuery)throw new Error("Usage: index.searchForFacetValues({facetName, facetQuery, ...params}[, callback])");var a=e.facetName,o=i(r(e),function(e){return"facetName"===e}),s=this.as._getSearchParams(o,"");return this.as._jsonRequest({method:"POST",url:"/1/indexes/"+encodeURIComponent(this.indexName)+"/facets/"+encodeURIComponent(a)+"/query",hostType:"read",body:{params:s},callback:t})},r.prototype.searchFacet=a(function(e,t){return this.searchForFacetValues(e,t)},o("index.searchFacet(params[, callback])","index.searchForFacetValues(params[, callback])")),r.prototype._search=function(e,t,n,r){return this.as._jsonRequest({cache:this.cache,method:"POST",url:t||"/1/indexes/"+encodeURIComponent(this.indexName)+"/query",body:{params:e},hostType:"read",fallback:{method:"GET",url:"/1/indexes/"+encodeURIComponent(this.indexName),body:{params:e}},callback:n,additionalUA:r})},r.prototype.getObject=function(e,t,n){var r=this;1!==arguments.length&&"function"!==typeof t||(n=t,t=void 0);var i="";if(void 0!==t){i="?attributes=";for(var a=0;a<t.length;++a)0!==a&&(i+=","),i+=t[a]}return this.as._jsonRequest({method:"GET",url:"/1/indexes/"+encodeURIComponent(r.indexName)+"/"+encodeURIComponent(e)+i,hostType:"read",callback:n})},r.prototype.getObjects=function(e,t,r){var i=n(108),a=n(109);if(!i(e))throw new Error("Usage: index.getObjects(arrayOfObjectIDs[, callback])");var o=this;1!==arguments.length&&"function"!==typeof t||(r=t,t=void 0);var s={requests:a(e,function(e){var n={indexName:o.indexName,objectID:e};return t&&(n.attributesToRetrieve=t.join(",")),n})};return this.as._jsonRequest({method:"POST",url:"/1/indexes/*/objects",hostType:"read",body:s,callback:r})},r.prototype.as=null,r.prototype.indexName=null,r.prototype.typeAheadArgs=null,r.prototype.typeAheadValueOption=null},function(e,t){e.exports=function(e,t){function n(){return r||(console.warn(t),r=!0),e.apply(this,arguments)}var r=!1;return n}},function(e,t){e.exports=function(e,t){return"algoliasearch: `"+e+"` was replaced by `"+t+"`. Please see https://github.com/algolia/algoliasearch-client-javascript/wiki/Deprecated#"+e.toLowerCase().replace(/[\.\(\)]/g,"")}},function(e,t,n){var r=n(35);e.exports=function e(t){var n=Array.prototype.slice.call(arguments);return r(n,function(n){for(var r in n)n.hasOwnProperty(r)&&("object"===typeof t[r]&&"object"===typeof n[r]?t[r]=e({},t[r],n[r]):void 0!==n[r]&&(t[r]=n[r]))}),t}},function(e,t,n){e.exports=function(e,t){var r=n(365),i=n(35),a={};return i(r(e),function(n){!0!==t(n)&&(a[n]=e[n])}),a}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=Array.prototype.slice,o=n(366),s=Object.prototype.propertyIsEnumerable,u=!s.call({toString:null},"toString"),c=s.call(function(){},"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"===typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&r.call(window,e)&&null!==window[e]&&"object"===typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}(),h=function(e){if("undefined"===typeof window||!d)return f(e);try{return f(e)}catch(e){return!1}},m=function(e){var t=null!==e&&"object"===typeof e,n="[object Function]"===i.call(e),a=o(e),s=t&&"[object String]"===i.call(e),f=[];if(!t&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var p=c&&n;if(s&&e.length>0&&!r.call(e,0))for(var d=0;d<e.length;++d)f.push(String(d));if(a&&e.length>0)for(var m=0;m<e.length;++m)f.push(String(m));else for(var v in e)p&&"prototype"===v||!r.call(e,v)||f.push(String(v));if(u)for(var g=h(e),y=0;y<l.length;++y)g&&"constructor"===l[y]||!r.call(e,l[y])||f.push(l[y]);return f};m.shim=function(){if(Object.keys){if(!function(){return 2===(Object.keys(arguments)||"").length}(1,2)){var e=Object.keys;Object.keys=function(t){return e(o(t)?a.call(t):t)}}}else Object.keys=m;return Object.keys||m},e.exports=m},function(e,t,n){"use strict";var r=Object.prototype.toString;e.exports=function(e){var t=r.call(e),n="[object Arguments]"===t;return n||(n="[object Array]"!==t&&null!==e&&"object"===typeof e&&"number"===typeof e.length&&e.length>=0&&"[object Function]"===r.call(e.callee)),n}},function(e,t,n){(function(t){function r(e,t){return u("localStorage failed with",t),o(),s=l,s.get(e)}function i(e,t){return 1===arguments.length?s.get(e):s.set(e,t)}function a(){try{return"localStorage"in t&&null!==t.localStorage&&(t.localStorage[c]||t.localStorage.setItem(c,JSON.stringify({})),!0)}catch(e){return!1}}function o(){try{t.localStorage.removeItem(c)}catch(e){}}var s,u=n(73)("algoliasearch:src/hostIndexState.js"),c="algoliasearch-client-js",l={state:{},set:function(e,t){return this.state[e]=t,this.state[e]},get:function(e){return this.state[e]||null}},f={set:function(e,n){l.set(e,n);try{var i=JSON.parse(t.localStorage[c]);return i[e]=n,t.localStorage[c]=JSON.stringify(i),i[e]}catch(t){return r(e,t)}},get:function(e){try{return JSON.parse(t.localStorage[c])[e]||null}catch(t){return r(e,t)}}};s=a()?f:l,e.exports={get:i,set:i,supportsLocalStorage:a}}).call(t,n(38))},function(e,t,n){function r(e){var n,r=0;for(n in e)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]}function i(e){function n(){if(n.enabled){var e=n,r=+new Date,i=r-(c||r);e.diff=i,e.prev=c,e.curr=r,c=r;for(var a=new Array(arguments.length),o=0;o<a.length;o++)a[o]=arguments[o];a[0]=t.coerce(a[0]),"string"!==typeof a[0]&&a.unshift("%O");var s=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(n,r){if("%%"===n)return n;s++;var i=t.formatters[r];if("function"===typeof i){var o=a[s];n=i.call(e,o),a.splice(s,1),s--}return n}),t.formatArgs.call(e,a);(n.log||t.log||console.log.bind(console)).apply(e,a)}}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=r(e),"function"===typeof t.init&&t.init(n),n}function a(e){t.save(e),t.names=[],t.skips=[];for(var n=("string"===typeof e?e:"").split(/[\s,]+/),r=n.length,i=0;i<r;i++)n[i]&&(e=n[i].replace(/\*/g,".*?"),"-"===e[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))}function o(){t.enable("")}function s(e){var n,r;for(n=0,r=t.skips.length;n<r;n++)if(t.skips[n].test(e))return!1;for(n=0,r=t.names.length;n<r;n++)if(t.names[n].test(e))return!0;return!1}function u(e){return e instanceof Error?e.stack||e.message:e}t=e.exports=i.debug=i.default=i,t.coerce=u,t.disable=o,t.enable=a,t.enabled=s,t.humanize=n(369),t.names=[],t.skips=[],t.formatters={};var c},function(e,t){function n(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return n*l;case"days":case"day":case"d":return n*c;case"hours":case"hour":case"hrs":case"hr":case"h":return n*u;case"minutes":case"minute":case"mins":case"min":case"m":return n*s;case"seconds":case"second":case"secs":case"sec":case"s":return n*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}}function r(e){return e>=c?Math.round(e/c)+"d":e>=u?Math.round(e/u)+"h":e>=s?Math.round(e/s)+"m":e>=o?Math.round(e/o)+"s":e+"ms"}function i(e){return a(e,c,"day")||a(e,u,"hour")||a(e,s,"minute")||a(e,o,"second")||e+" ms"}function a(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var o=1e3,s=60*o,u=60*s,c=24*u,l=365.25*c;e.exports=function(e,t){t=t||{};var a=typeof e;if("string"===a&&e.length>0)return n(e);if("number"===a&&!1===isNaN(e))return t.long?i(e):r(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){"use strict";var r=n(371),i=r.Promise||n(372).Promise;e.exports=function(e,t){function a(e,t,r){var i=n(51),s=n(378);return r=i(r||{}),void 0===r.protocol&&(r.protocol=s()),r._ua=r._ua||a.ua,new o(e,t,r)}function o(){e.apply(this,arguments)}var s=n(175),u=n(72),c=n(374),l=n(376),f=n(377);t=t||"",a.version=n(379),a.ua="Algolia for vanilla JavaScript "+t+a.version,a.initPlaces=f(a),r.__algolia={debug:n(73),algoliasearch:a};var p={hasXMLHttpRequest:"XMLHttpRequest"in r,hasXDomainRequest:"XDomainRequest"in r};return p.hasXMLHttpRequest&&(p.cors="withCredentials"in new XMLHttpRequest),s(o,e),o.prototype._request=function(e,t){return new i(function(n,r){function i(){if(!h){clearTimeout(d);var e;try{e={body:JSON.parse(v.responseText),responseText:v.responseText,statusCode:v.status,headers:v.getAllResponseHeaders&&v.getAllResponseHeaders()||{}}}catch(t){e=new u.UnparsableJSON({more:v.responseText})}e instanceof u.UnparsableJSON?r(e):n(e)}}function a(e){h||(clearTimeout(d),r(new u.Network({more:e})))}function o(){h=!0,v.abort(),r(new u.RequestTimeout)}function s(){g=!0,clearTimeout(d),d=setTimeout(o,t.timeouts.complete)}function l(){g||s()}function f(){!g&&v.readyState>1&&s()}if(!p.cors&&!p.hasXDomainRequest)return void r(new u.Network("CORS not supported"));e=c(e,t.headers);var d,h,m=t.body,v=p.cors?new XMLHttpRequest:new XDomainRequest,g=!1;d=setTimeout(o,t.timeouts.connect),v.onprogress=l,"onreadystatechange"in v&&(v.onreadystatechange=f),v.onload=i,v.onerror=a,v instanceof XMLHttpRequest?v.open(t.method,e,!0):v.open(t.method,e),p.cors&&(m&&("POST"===t.method?v.setRequestHeader("content-type","application/x-www-form-urlencoded"):v.setRequestHeader("content-type","application/json")),v.setRequestHeader("accept","application/json")),v.send(m)})},o.prototype._request.fallback=function(e,t){return e=c(e,t.headers),new i(function(n,r){l(e,t,function(e,t){if(e)return void r(e);n(t)})})},o.prototype._promise={reject:function(e){return i.reject(e)},resolve:function(e){return i.resolve(e)},delay:function(e){return new i(function(t){setTimeout(t,e)})}},a}},function(e,t,n){(function(t){var n;n="undefined"!==typeof window?window:"undefined"!==typeof t?t:"undefined"!==typeof self?self:{},e.exports=n}).call(t,n(38))},function(e,t,n){(function(t,r){!function(t,n){e.exports=n()}(0,function(){"use strict";function e(e){var t=typeof e;return null!==e&&("object"===t||"function"===t)}function i(e){return"function"===typeof e}function a(e){W=e}function o(e){z=e}function s(){return"undefined"!==typeof q?function(){q(c)}:u()}function u(){var e=setTimeout;return function(){return e(c,1)}}function c(){for(var e=0;e<Q;e+=2){(0,X[e])(X[e+1]),X[e]=void 0,X[e+1]=void 0}Q=0}function l(e,t){var n=arguments,r=this,i=new this.constructor(p);void 0===i[ee]&&N(i);var a=r._state;return a?function(){var e=n[a-1];z(function(){return O(a,i,e,r._result)})}():x(r,i,e,t),i}function f(e){var t=this;if(e&&"object"===typeof e&&e.constructor===t)return e;var n=new t(p);return _(n,e),n}function p(){}function d(){return new TypeError("You cannot resolve a promise with itself")}function h(){return new TypeError("A promises callback cannot return that same promise.")}function m(e){try{return e.then}catch(e){return ie.error=e,ie}}function v(e,t,n,r){try{e.call(t,n,r)}catch(e){return e}}function g(e,t,n){z(function(e){var r=!1,i=v(n,t,function(n){r||(r=!0,t!==n?_(e,n):R(e,n))},function(t){r||(r=!0,P(e,t))},"Settle: "+(e._label||" unknown promise"));!r&&i&&(r=!0,P(e,i))},e)}function y(e,t){t._state===ne?R(e,t._result):t._state===re?P(e,t._result):x(t,void 0,function(t){return _(e,t)},function(t){return P(e,t)})}function b(e,t,n){t.constructor===e.constructor&&n===l&&t.constructor.resolve===f?y(e,t):n===ie?(P(e,ie.error),ie.error=null):void 0===n?R(e,t):i(n)?g(e,t,n):R(e,t)}function _(t,n){t===n?P(t,d()):e(n)?b(t,n,m(n)):R(t,n)}function w(e){e._onerror&&e._onerror(e._result),j(e)}function R(e,t){e._state===te&&(e._result=t,e._state=ne,0!==e._subscribers.length&&z(j,e))}function P(e,t){e._state===te&&(e._state=re,e._result=t,z(w,e))}function x(e,t,n,r){var i=e._subscribers,a=i.length;e._onerror=null,i[a]=t,i[a+ne]=n,i[a+re]=r,0===a&&e._state&&z(j,e)}function j(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var r=void 0,i=void 0,a=e._result,o=0;o<t.length;o+=3)r=t[o],i=t[o+n],r?O(n,r,i,a):i(a);e._subscribers.length=0}}function S(){this.error=null}function C(e,t){try{return e(t)}catch(e){return ae.error=e,ae}}function O(e,t,n,r){var a=i(n),o=void 0,s=void 0,u=void 0,c=void 0;if(a){if(o=C(n,r),o===ae?(c=!0,s=o.error,o.error=null):u=!0,t===o)return void P(t,h())}else o=r,u=!0;t._state!==te||(a&&u?_(t,o):c?P(t,s):e===ne?R(t,o):e===re&&P(t,o))}function E(e,t){try{t(function(t){_(e,t)},function(t){P(e,t)})}catch(t){P(e,t)}}function F(){return oe++}function N(e){e[ee]=oe++,e._state=void 0,e._result=void 0,e._subscribers=[]}function k(e,t){this._instanceConstructor=e,this.promise=new e(p),this.promise[ee]||N(this.promise),B(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?R(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&R(this.promise,this._result))):P(this.promise,T())}function T(){return new Error("Array Methods must be provided an Array")}function M(e){return new k(this,e).promise}function A(e){var t=this;return new t(B(e)?function(n,r){for(var i=e.length,a=0;a<i;a++)t.resolve(e[a]).then(n,r)}:function(e,t){return t(new TypeError("You must pass an array to race."))})}function L(e){var t=this,n=new t(p);return P(n,e),n}function H(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function I(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}function U(e){this[ee]=F(),this._result=this._state=void 0,this._subscribers=[],p!==e&&("function"!==typeof e&&H(),this instanceof U?E(this,e):I())}function D(){var e=void 0;if("undefined"!==typeof r)e=r;else if("undefined"!==typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=U}var V=void 0;V=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)};var B=V,Q=0,q=void 0,W=void 0,z=function(e,t){X[Q]=e,X[Q+1]=t,2===(Q+=2)&&(W?W(c):Z())},K="undefined"!==typeof window?window:void 0,$=K||{},J=$.MutationObserver||$.WebKitMutationObserver,Y="undefined"===typeof self&&"undefined"!==typeof t&&"[object process]"==={}.toString.call(t),G="undefined"!==typeof Uint8ClampedArray&&"undefined"!==typeof importScripts&&"undefined"!==typeof MessageChannel,X=new Array(1e3),Z=void 0;Z=Y?function(){return function(){return t.nextTick(c)}}():J?function(){var e=0,t=new J(c),n=document.createTextNode("");return t.observe(n,{characterData:!0}),function(){n.data=e=++e%2}}():G?function(){var e=new MessageChannel;return e.port1.onmessage=c,function(){return e.port2.postMessage(0)}}():void 0===K?function(){try{var e=n(373);return q=e.runOnLoop||e.runOnContext,s()}catch(e){return u()}}():u();var ee=Math.random().toString(36).substring(16),te=void 0,ne=1,re=2,ie=new S,ae=new S,oe=0;return k.prototype._enumerate=function(e){for(var t=0;this._state===te&&t<e.length;t++)this._eachEntry(e[t],t)},k.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,r=n.resolve;if(r===f){var i=m(e);if(i===l&&e._state!==te)this._settledAt(e._state,t,e._result);else if("function"!==typeof i)this._remaining--,this._result[t]=e;else if(n===U){var a=new n(p);b(a,e,i),this._willSettleAt(a,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(r(e),t)},k.prototype._settledAt=function(e,t,n){var r=this.promise;r._state===te&&(this._remaining--,e===re?P(r,n):this._result[t]=n),0===this._remaining&&R(r,this._result)},k.prototype._willSettleAt=function(e,t){var n=this;x(e,void 0,function(e){return n._settledAt(ne,t,e)},function(e){return n._settledAt(re,t,e)})},U.all=M,U.race=A,U.resolve=f,U.reject=L,U._setScheduler=a,U._setAsap=o,U._asap=z,U.prototype={constructor:U,then:l,catch:function(e){return this.then(null,e)}},U.polyfill=D,U.Promise=U,U})}).call(t,n(71),n(38))},function(e,t){},function(e,t,n){"use strict";function r(e,t){return/\?/.test(e)?e+="&":e+="?",e+i(t)}e.exports=r;var i=n(375)},function(e,t,n){"use strict";function r(e,t){if(e.map)return e.map(t);for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n}var i=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,t,n,s){return t=t||"&",n=n||"=",null===e&&(e=void 0),"object"===typeof e?r(o(e),function(o){var s=encodeURIComponent(i(o))+n;return a(e[o])?r(e[o],function(e){return s+encodeURIComponent(i(e))}).join(t):s+encodeURIComponent(i(e[o]))}).join(t):s?encodeURIComponent(i(s))+n+encodeURIComponent(i(e)):""};var a=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},o=Object.keys||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t}},function(e,t,n){"use strict";function r(e,t,n){function r(){t.debug("JSONP: success"),v||p||(v=!0,f||(t.debug("JSONP: Fail. Script loaded but did not call the callback"),s(),n(new i.JSONPScriptFail)))}function o(){"loaded"!==this.readyState&&"complete"!==this.readyState||r()}function s(){clearTimeout(g),h.onload=null,h.onreadystatechange=null,h.onerror=null,d.removeChild(h)}function u(){try{delete window[m],delete window[m+"_loaded"]}catch(e){window[m]=window[m+"_loaded"]=void 0}}function c(){t.debug("JSONP: Script timeout"),p=!0,s(),n(new i.RequestTimeout)}function l(){t.debug("JSONP: Script error"),v||p||(s(),n(new i.JSONPScriptError))}if("GET"!==t.method)return void n(new Error("Method "+t.method+" "+e+" is not supported by JSONP."));t.debug("JSONP: start");var f=!1,p=!1;a+=1;var d=document.getElementsByTagName("head")[0],h=document.createElement("script"),m="algoliaJSONP_"+a,v=!1;window[m]=function(e){if(u(),p)return void t.debug("JSONP: Late answer, ignoring");f=!0,s(),n(null,{body:e})},e+="&callback="+m,t.jsonBody&&t.jsonBody.params&&(e+="&"+t.jsonBody.params);var g=setTimeout(c,t.timeouts.complete);h.onreadystatechange=o,h.onload=r,h.onerror=l,h.async=!0,h.defer=!0,h.src=e,d.appendChild(h)}e.exports=r;var i=n(72),a=0},function(e,t,n){function r(e){return function(t,r,a){var o=n(51);a=a&&o(a)||{},a.hosts=a.hosts||["places-dsn.algolia.net","places-1.algolianet.com","places-2.algolianet.com","places-3.algolianet.com"],0!==arguments.length&&"object"!==typeof t&&void 0!==t||(t="",r="",a._allowEmptyCredentials=!0);var s=e(t,r,a),u=s.initIndex("places");return u.search=i("query","/1/places/query"),u.getObject=function(e,t){return this.as._jsonRequest({method:"GET",url:"/1/places/"+encodeURIComponent(e),hostType:"read",callback:t})},u}}e.exports=r;var i=n(176)},function(e,t,n){"use strict";function r(){var e=window.document.location.protocol;return"http:"!==e&&"https:"!==e&&(e="http:"),e}e.exports=r},function(e,t,n){"use strict";e.exports="3.24.3"},function(e,t,n){var r=n(149),i=n(18),a=n(178),o=n(85),s=i(function(e){return a(r(e,1,o,!0))});e.exports=s},function(e,t,n){var r=n(132),i=n(164),a=n(58),o=r&&1/a(new r([,-0]))[1]==1/0?function(e){return new r(e)}:i;e.exports=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e){var t=e;return function(){var e=Date.now(),n=e-t;return t=e,n}}function o(e){return s()+window.location.pathname+e}function s(){return window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")}function u(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.useHash||!1,n=e.urlUtils;return new w(n||(t?b:_),e)}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(74),f=r(l),p=n(105),d=r(p),h=n(20),m=r(h),v=n(383),g=r(v),y=f.default.AlgoliaSearchHelper,b={ignoreNextPopState:!1,character:"#",onpopstate:function(e){var t=this;window.addEventListener("hashchange",function(n){if(t.ignoreNextPopState)return void(t.ignoreNextPopState=!1);e(n)})},pushState:function(e){this.ignoreNextPopState=!0,window.location.assign(o(this.createURL(e)))},createURL:function(e){return window.location.search+this.character+e},readUrl:function(){return window.location.hash.slice(1)}},_={character:"?",onpopstate:function(e){window.addEventListener("popstate",e)},pushState:function(e,t){var n=t.getHistoryState;window.history.pushState(n(),"",o(this.createURL(e)))},createURL:function(e){return this.character+e+document.location.hash},readUrl:function(){return window.location.search.slice(1)}},w=function(){function e(t,n){i(this,e),this.urlUtils=t,this.originalConfig=null,this.timer=a(Date.now()),this.mapping=n.mapping||{},this.getHistoryState=n.getHistoryState||function(){return null},this.threshold=n.threshold||700,this.trackedParameters=n.trackedParameters||["query","attribute:*","index","page","hitsPerPage"],this.firstRender=!0,this.searchParametersFromUrl=y.getConfigurationFromQueryString(this.urlUtils.readUrl(),{mapping:this.mapping})}return c(e,[{key:"getConfiguration",value:function(e){return this.originalConfig=(0,f.default)({addAlgoliaAgent:function(){}},e.index,e).state,this.searchParametersFromUrl}},{key:"render",value:function(e){var t=this,n=e.helper;this.firstRender&&(this.firstRender=!1,this.onHistoryChange(this.onPopState.bind(this,n)),n.on("change",function(e){return t.renderURLFromState(e)}))}},{key:"onPopState",value:function(e,t){clearTimeout(this.urlUpdateTimeout);var n=e.getState(this.trackedParameters),r=(0,g.default)({},this.originalConfig,n);(0,m.default)(r,t)||e.overrideStateWithoutTriggeringChangeEvent(t).search()}},{key:"renderURLFromState",value:function(e){var t=this,n=this.urlUtils.readUrl(),r=y.getForeignConfigurationInQueryString(n,{mapping:this.mapping}),i=d.default.getQueryStringFromState(e.filter(this.trackedParameters),{moreAttributes:r,mapping:this.mapping,safe:!0});clearTimeout(this.urlUpdateTimeout),this.urlUpdateTimeout=setTimeout(function(){t.urlUtils.pushState(i,{getHistoryState:t.getHistoryState})},this.threshold)}},{key:"createURL",value:function(e,t){var n=t.absolute,r=e.filter(this.trackedParameters),i=this.urlUtils.createURL(f.default.url.getQueryStringFromState(r,{mapping:this.mapping}));return n?o(i):i}},{key:"onHistoryChange",value:function(e){var t=this;this.urlUtils.onpopstate(function(){var n=t.urlUtils.readUrl(),r=y.getConfigurationFromQueryString(n,{mapping:t.mapping}),i=(0,g.default)({},t.originalConfig,r);e(i)})}}]),e}();t.default=u},function(e,t,n){var r=n(62),i=n(19),a=n(68),o=n(11),s=n(41),u=n(7),c=Object.prototype,l=c.hasOwnProperty,f=a(function(e,t){if(s(t)||o(t))return void i(t,u(t),e);for(var n in t)l.call(t,n)&&r(e,n,t[n])});e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.numberLocale;return{formatNumber:function(e,n){return Number(n(e)).toLocaleString(t)}}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(180);Object.defineProperty(t,"connectClearAll",{enumerable:!0,get:function(){return r(i).default}});var a=n(181);Object.defineProperty(t,"connectCurrentRefinedValues",{enumerable:!0,get:function(){return r(a).default}});var o=n(183);Object.defineProperty(t,"connectHierarchicalMenu",{enumerable:!0,get:function(){return r(o).default}});var s=n(184);Object.defineProperty(t,"connectHits",{enumerable:!0,get:function(){return r(s).default}});var u=n(186);Object.defineProperty(t,"connectHitsPerPage",{enumerable:!0,get:function(){return r(u).default}});var c=n(187);Object.defineProperty(t,"connectInfiniteHits",{enumerable:!0,get:function(){return r(c).default}});var l=n(188);Object.defineProperty(t,"connectMenu",{enumerable:!0,get:function(){return r(l).default}});var f=n(189);Object.defineProperty(t,"connectNumericRefinementList",{enumerable:!0,get:function(){return r(f).default}});var p=n(190);Object.defineProperty(t,"connectNumericSelector",{enumerable:!0,get:function(){return r(p).default}});var d=n(191);Object.defineProperty(t,"connectPagination",{enumerable:!0,get:function(){return r(d).default}});var h=n(192);Object.defineProperty(t,"connectPriceRanges",{enumerable:!0,get:function(){return r(h).default}});var m=n(193);Object.defineProperty(t,"connectRangeSlider",{enumerable:!0,get:function(){return r(m).default}});var v=n(194);Object.defineProperty(t,"connectRefinementList",{enumerable:!0,get:function(){return r(v).default}});var g=n(195);Object.defineProperty(t,"connectSearchBox",{enumerable:!0,get:function(){return r(g).default}});var y=n(196);Object.defineProperty(t,"connectSortBySelector",{enumerable:!0,get:function(){return r(y).default}});var b=n(197);Object.defineProperty(t,"connectStarRating",{enumerable:!0,get:function(){return r(b).default}});var _=n(198);Object.defineProperty(t,"connectStats",{enumerable:!0,get:function(){return r(_).default}});var w=n(199);Object.defineProperty(t,"connectToggle",{enumerable:!0,get:function(){return r(w).default}})},function(e,t,n){function r(e){return e&&e.length?i(e):[]}var i=n(178);e.exports=r},function(e,t,n){function r(e){return e=a(e),e&&s.test(e)?e.replace(o,i):e}var i=n(388),a=n(61),o=/[&<>"']/g,s=RegExp(o.source);e.exports=r},function(e,t,n){var r=n(389),i={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},a=r(i);e.exports=a},function(e,t){function n(e){return function(t){return null==e?void 0:e[t]}}e.exports=n},function(e,t,n){function r(e,t,n){var r=s(e)?i:o;return n&&u(e,t,n)&&(t=void 0),r(e,a(t,3))}var i=n(126),a=n(9),o=n(391),s=n(2),u=n(98);e.exports=r},function(e,t,n){function r(e,t){var n;return i(e,function(e,r,i){return!(n=t(e,r,i))}),!!n}var i=n(45);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=Math.round(e/t)*t;return n<1&&(n=1),n}function i(e){if(e.min===e.max)return[];var t=void 0;t=e.avg<100?1:e.avg<1e3?10:100;for(var n=r(Math.round(e.avg),t),i=Math.ceil(e.min),a=r(Math.floor(e.max),t);a>e.max;)a-=t;var o=void 0,s=void 0,u=[];if(i!==a){for(o=i,u.push({to:o});o<n;)s=u[u.length-1].to,o=r(s+(n-i)/3,t),o<=s&&(o=s+1),u.push({from:s,to:o});for(;o<a;)s=u[u.length-1].to,o=r(s+(a-n)/3,t),o<=s&&(o=s+1),u.push({from:s,to:o});1===u.length&&o!==n&&(u.push({from:o,to:n}),o=n),1===u.length?(u[0].from=e.min,u[0].to=e.max):delete u[u.length-1].to}return u}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=n(394);Object.defineProperty(t,"clearAll",{enumerable:!0,get:function(){return r(i).default}});var a=n(405);Object.defineProperty(t,"currentRefinedValues",{enumerable:!0,get:function(){return r(a).default}});var o=n(408);Object.defineProperty(t,"hierarchicalMenu",{enumerable:!0,get:function(){return r(o).default}});var s=n(412);Object.defineProperty(t,"hits",{enumerable:!0,get:function(){return r(s).default}});var u=n(415);Object.defineProperty(t,"hitsPerPageSelector",{enumerable:!0,get:function(){return r(u).default}});var c=n(416);Object.defineProperty(t,"infiniteHits",{enumerable:!0,get:function(){return r(c).default}});var l=n(419);Object.defineProperty(t,"menu",{enumerable:!0,get:function(){return r(l).default}});var f=n(422);Object.defineProperty(t,"refinementList",{enumerable:!0,get:function(){return r(f).default}});var p=n(424);Object.defineProperty(t,"numericRefinementList",{enumerable:!0,get:function(){return r(p).default}});var d=n(426);Object.defineProperty(t,"numericSelector",{enumerable:!0,get:function(){return r(d).default}});var h=n(427);Object.defineProperty(t,"pagination",{enumerable:!0,get:function(){return r(h).default}});var m=n(435);Object.defineProperty(t,"priceRanges",{enumerable:!0,get:function(){return r(m).default}});var v=n(439);Object.defineProperty(t,"searchBox",{enumerable:!0,get:function(){return r(v).default}});var g=n(441);Object.defineProperty(t,"rangeSlider",{enumerable:!0,get:function(){return r(g).default}});var y=n(448);Object.defineProperty(t,"sortBySelector",{enumerable:!0,get:function(){return r(y).default}});var b=n(449);Object.defineProperty(t,"starRating",{enumerable:!0,get:function(){return r(b).default}});var _=n(452);Object.defineProperty(t,"stats",{enumerable:!0,get:function(){return r(_).default}});var w=n(455);Object.defineProperty(t,"toggle",{enumerable:!0,get:function(){return r(w).default}});var R=n(457);Object.defineProperty(t,"analytics",{enumerable:!0,get:function(){return r(R).default}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.container,n=e.templates,r=void 0===n?g.default:n,i=e.cssClasses,a=void 0===i?{}:i,o=e.collapsible,s=void 0!==o&&o,u=e.autoHideContainer,c=void 0===u||u,l=e.excludeAttributes,f=void 0===l?[]:l,h=e.clearsQuery,v=void 0!==h&&h;if(!t)throw new Error(_);var w=(0,d.getContainerNode)(t),R={root:(0,p.default)(y(null),a.root),header:(0,p.default)(y("header"),a.header),body:(0,p.default)(y("body"),a.body),footer:(0,p.default)(y("footer"),a.footer),link:(0,p.default)(y("link"),a.link)},P=b({containerNode:w,cssClasses:R,collapsible:s,autoHideContainer:c,renderState:{},templates:r});try{return(0,m.default)(P)({excludeAttributes:f,clearsQuery:v})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(400),l=r(c),f=n(3),p=r(f),d=n(1),h=n(180),m=r(h),v=n(404),g=r(v),y=(0,d.bemHelper)("ais-clear-all"),b=function(e){var t=e.containerNode,n=e.cssClasses,r=e.collapsible,i=e.autoHideContainer,a=e.renderState,s=e.templates;return function(e,c){var f=e.refine,p=e.hasRefinements,h=e.createURL,m=e.instantSearchInstance;if(c)return void(a.templateProps=(0,d.prepareTemplateProps)({defaultTemplates:g.default,templatesConfig:m.templatesConfig,templates:s}));var v=i&&!p;u.default.render(o.default.createElement(l.default,{refine:f,collapsible:r,cssClasses:n,hasRefinements:p,shouldAutoHideContainer:v,templateProps:a.templateProps,url:h()}),t)}},_="Usage:\nclearAll({\n container,\n [ cssClasses.{root,header,body,footer,link}={} ],\n [ templates.{header,link,footer}={link: 'Clear all'} ],\n [ autoHideContainer=true ],\n [ collapsible=false ],\n [ excludeAttributes=[] ]\n})"},function(e,t,n){"use strict";var r=n(396),i=n(397),a=n(398);e.exports=function(){function e(e,t,n,r,o,s){s!==a&&i(!1,"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")}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,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){"use strict";function r(e){return function(){return e}}var i=function(){};i.thatReturns=r,i.thatReturnsFalse=r(!1),i.thatReturnsTrue=r(!0),i.thatReturnsNull=r(null),i.thatReturnsThis=function(){return this},i.thatReturnsArgument=function(e){return e},e.exports=i},function(e,t,n){"use strict";function r(e,t,n,r,a,o,s,u){if(i(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var l=[n,r,a,o,s,u],f=0;c=new Error(t.replace(/%s/g,function(){return l[f++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var i=function(e){};e.exports=r},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";function r(){}function i(e,t){var n,i,a,o,s=A;for(o=arguments.length;o-- >2;)M.push(arguments[o]);for(t&&null!=t.children&&(M.length||M.push(t.children),delete t.children);M.length;)if((i=M.pop())&&void 0!==i.pop)for(o=i.length;o--;)M.push(i[o]);else"boolean"===typeof i&&(i=null),(a="function"!==typeof e)&&(null==i?i="":"number"===typeof i?i=String(i):"string"!==typeof i&&(a=!1)),a&&n?s[s.length-1]+=i:s===A?s=[i]:s.push(i),n=a;var u=new r;return u.nodeName=e,u.children=s,u.attributes=null==t?void 0:t,u.key=null==t?void 0:t.key,void 0!==T.vnode&&T.vnode(u),u}function a(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){return i(e.nodeName,a(a({},e.attributes),t),arguments.length>2?[].slice.call(arguments,2):e.children)}function s(e){!e._dirty&&(e._dirty=!0)&&1==I.push(e)&&(T.debounceRendering||L)(u)}function u(){var e,t=I;for(I=[];e=t.pop();)e._dirty&&O(e)}function c(e,t,n){return"string"===typeof t||"number"===typeof t?void 0!==e.splitText:"string"===typeof t.nodeName?!e._componentConstructor&&l(e,t.nodeName):n||e._componentConstructor===t.nodeName}function l(e,t){return e.normalizedNodeName===t||e.nodeName.toLowerCase()===t.toLowerCase()}function f(e){var t=a({},e.attributes);t.children=e.children;var n=e.nodeName.defaultProps;if(void 0!==n)for(var r in n)void 0===t[r]&&(t[r]=n[r]);return t}function p(e,t){var n=t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e);return n.normalizedNodeName=e,n}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(e,t,n,r,i){if("className"===t&&(t="class"),"key"===t);else if("ref"===t)n&&n(null),r&&r(e);else if("class"!==t||i)if("style"===t){if(r&&"string"!==typeof r&&"string"!==typeof n||(e.style.cssText=r||""),r&&"object"===typeof r){if("string"!==typeof n)for(var a in n)a in r||(e.style[a]="");for(var a in r)e.style[a]="number"===typeof r[a]&&!1===H.test(a)?r[a]+"px":r[a]}}else if("dangerouslySetInnerHTML"===t)r&&(e.innerHTML=r.__html||"");else if("o"==t[0]&&"n"==t[1]){var o=t!==(t=t.replace(/Capture$/,""));t=t.toLowerCase().substring(2),r?n||e.addEventListener(t,v,o):e.removeEventListener(t,v,o),(e._listeners||(e._listeners={}))[t]=r}else if("list"!==t&&"type"!==t&&!i&&t in e)m(e,t,null==r?"":r),null!=r&&!1!==r||e.removeAttribute(t);else{var s=i&&t!==(t=t.replace(/^xlink\:?/,""));null==r||!1===r?s?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.removeAttribute(t):"function"!==typeof r&&(s?e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),r):e.setAttribute(t,r))}else e.className=r||""}function m(e,t,n){try{e[t]=n}catch(e){}}function v(e){return this._listeners[e.type](T.event&&T.event(e)||e)}function g(){for(var e;e=U.pop();)T.afterMount&&T.afterMount(e),e.componentDidMount&&e.componentDidMount()}function y(e,t,n,r,i,a){D++||(V=null!=i&&void 0!==i.ownerSVGElement,B=null!=e&&!("__preactattr_"in e));var o=b(e,t,n,r,a);return i&&o.parentNode!==i&&i.appendChild(o),--D||(B=!1,a||g()),o}function b(e,t,n,r,i){var a=e,o=V;if(null!=t&&"boolean"!==typeof t||(t=""),"string"===typeof t||"number"===typeof t)return e&&void 0!==e.splitText&&e.parentNode&&(!e._component||i)?e.nodeValue!=t&&(e.nodeValue=t):(a=document.createTextNode(t),e&&(e.parentNode&&e.parentNode.replaceChild(a,e),w(e,!0))),a.__preactattr_=!0,a;var s=t.nodeName;if("function"===typeof s)return E(e,t,n,r);if(V="svg"===s||"foreignObject"!==s&&V,s=String(s),(!e||!l(e,s))&&(a=p(s,V),e)){for(;e.firstChild;)a.appendChild(e.firstChild);e.parentNode&&e.parentNode.replaceChild(a,e),w(e,!0)}var u=a.firstChild,c=a.__preactattr_,f=t.children;if(null==c){c=a.__preactattr_={};for(var d=a.attributes,h=d.length;h--;)c[d[h].name]=d[h].value}return!B&&f&&1===f.length&&"string"===typeof f[0]&&null!=u&&void 0!==u.splitText&&null==u.nextSibling?u.nodeValue!=f[0]&&(u.nodeValue=f[0]):(f&&f.length||null!=u)&&_(a,f,n,r,B||null!=c.dangerouslySetInnerHTML),P(a,t.attributes,c),V=o,a}function _(e,t,n,r,i){var a,o,s,u,l,f=e.childNodes,p=[],h={},m=0,v=0,g=f.length,y=0,_=t?t.length:0;if(0!==g)for(var R=0;R<g;R++){var P=f[R],x=P.__preactattr_,j=_&&x?P._component?P._component.__key:x.key:null;null!=j?(m++,h[j]=P):(x||(void 0!==P.splitText?!i||P.nodeValue.trim():i))&&(p[y++]=P)}if(0!==_)for(var R=0;R<_;R++){u=t[R],l=null;var j=u.key;if(null!=j)m&&void 0!==h[j]&&(l=h[j],h[j]=void 0,m--);else if(!l&&v<y)for(a=v;a<y;a++)if(void 0!==p[a]&&c(o=p[a],u,i)){l=o,p[a]=void 0,a===y-1&&y--,a===v&&v++;break}l=b(l,u,n,r),s=f[R],l&&l!==e&&l!==s&&(null==s?e.appendChild(l):l===s.nextSibling?d(s):e.insertBefore(l,s))}if(m)for(var R in h)void 0!==h[R]&&w(h[R],!1);for(;v<=y;)void 0!==(l=p[y--])&&w(l,!1)}function w(e,t){var n=e._component;n?F(n):(null!=e.__preactattr_&&e.__preactattr_.ref&&e.__preactattr_.ref(null),!1!==t&&null!=e.__preactattr_||d(e),R(e))}function R(e){for(e=e.lastChild;e;){var t=e.previousSibling;w(e,!0),e=t}}function P(e,t,n){var r;for(r in n)t&&null!=t[r]||null==n[r]||h(e,r,n[r],n[r]=void 0,V);for(r in t)"children"===r||"innerHTML"===r||r in n&&t[r]===("value"===r||"checked"===r?e[r]:n[r])||h(e,r,n[r],n[r]=t[r],V)}function x(e){var t=e.constructor.name;(Q[t]||(Q[t]=[])).push(e)}function j(e,t,n){var r,i=Q[e.name];if(e.prototype&&e.prototype.render?(r=new e(t,n),N.call(r,t,n)):(r=new N(t,n),r.constructor=e,r.render=S),i)for(var a=i.length;a--;)if(i[a].constructor===e){r.nextBase=i[a].nextBase,i.splice(a,1);break}return r}function S(e,t,n){return this.constructor(e,n)}function C(e,t,n,r,i){e._disable||(e._disable=!0,(e.__ref=t.ref)&&delete t.ref,(e.__key=t.key)&&delete t.key,!e.base||i?e.componentWillMount&&e.componentWillMount():e.componentWillReceiveProps&&e.componentWillReceiveProps(t,r),r&&r!==e.context&&(e.prevContext||(e.prevContext=e.context),e.context=r),e.prevProps||(e.prevProps=e.props),e.props=t,e._disable=!1,0!==n&&(1!==n&&!1===T.syncComponentUpdates&&e.base?s(e):O(e,1,i)),e.__ref&&e.__ref(e))}function O(e,t,n,r){if(!e._disable){var i,o,s,u=e.props,c=e.state,l=e.context,p=e.prevProps||u,d=e.prevState||c,h=e.prevContext||l,m=e.base,v=e.nextBase,b=m||v,_=e._component,R=!1;if(m&&(e.props=p,e.state=d,e.context=h,2!==t&&e.shouldComponentUpdate&&!1===e.shouldComponentUpdate(u,c,l)?R=!0:e.componentWillUpdate&&e.componentWillUpdate(u,c,l),e.props=u,e.state=c,e.context=l),e.prevProps=e.prevState=e.prevContext=e.nextBase=null,e._dirty=!1,!R){i=e.render(u,c,l),e.getChildContext&&(l=a(a({},l),e.getChildContext()));var P,x,S=i&&i.nodeName;if("function"===typeof S){var E=f(i);o=_,o&&o.constructor===S&&E.key==o.__key?C(o,E,1,l,!1):(P=o,e._component=o=j(S,E,l),o.nextBase=o.nextBase||v,o._parentComponent=e,C(o,E,0,l,!1),O(o,1,n,!0)),x=o.base}else s=b,P=_,P&&(s=e._component=null),(b||1===t)&&(s&&(s._component=null),x=y(s,i,l,n||!m,b&&b.parentNode,!0));if(b&&x!==b&&o!==_){var N=b.parentNode;N&&x!==N&&(N.replaceChild(x,b),P||(b._component=null,w(b,!1)))}if(P&&F(P),e.base=x,x&&!r){for(var k=e,M=e;M=M._parentComponent;)(k=M).base=x;x._component=k,x._componentConstructor=k.constructor}}if(!m||n?U.unshift(e):R||(e.componentDidUpdate&&e.componentDidUpdate(p,d,h),T.afterUpdate&&T.afterUpdate(e)),null!=e._renderCallbacks)for(;e._renderCallbacks.length;)e._renderCallbacks.pop().call(e);D||r||g()}}function E(e,t,n,r){for(var i=e&&e._component,a=i,o=e,s=i&&e._componentConstructor===t.nodeName,u=s,c=f(t);i&&!u&&(i=i._parentComponent);)u=i.constructor===t.nodeName;return i&&u&&(!r||i._component)?(C(i,c,3,n,r),e=i.base):(a&&!s&&(F(a),e=o=null),i=j(t.nodeName,c,n),e&&!i.nextBase&&(i.nextBase=e,o=null),C(i,c,1,n,r),e=i.base,o&&e!==o&&(o._component=null,w(o,!1))),e}function F(e){T.beforeUnmount&&T.beforeUnmount(e);var t=e.base;e._disable=!0,e.componentWillUnmount&&e.componentWillUnmount(),e.base=null;var n=e._component;n?F(n):t&&(t.__preactattr_&&t.__preactattr_.ref&&t.__preactattr_.ref(null),e.nextBase=t,d(t),x(e),R(t)),e.__ref&&e.__ref(null)}function N(e,t){this._dirty=!0,this.context=t,this.props=e,this.state=this.state||{}}function k(e,t,n){return y(n,e,{},!1,t,!1)}n.d(t,"c",function(){return i}),n.d(t,"b",function(){return o}),n.d(t,"a",function(){return N}),n.d(t,"e",function(){return k}),n.d(t,"d",function(){return T});var T={},M=[],A=[],L="function"==typeof Promise?Promise.resolve().then.bind(Promise.resolve()):setTimeout,H=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,I=[],U=[],D=0,V=!1,B=!1,Q={};a(N.prototype,{setState:function(e,t){var n=this.state;this.prevState||(this.prevState=a({},n)),a(n,"function"===typeof e?e(n,this.props):e),t&&(this._renderCallbacks=this._renderCallbacks||[]).push(t),s(this)},forceUpdate:function(e){e&&(this._renderCallbacks=this._renderCallbacks||[]).push(e),O(this,2)},render:function(){}})},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.RawClearAll=void 0;var s=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},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=n(22),d=r(p),h=n(1),m=n(27),v=r(m),g=n(28),y=r(g),b=t.RawClearAll=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return this.props.url!==e.url||this.props.hasRefinements!==e.hasRefinements}},{key:"handleClick",value:function(e){(0,h.isSpecialClick)(e)||(e.preventDefault(),this.props.refine())}},{key:"render",value:function(){var e=this.props,t=e.hasRefinements,n=e.cssClasses,r={hasRefinements:t};return f.default.createElement("a",{className:t?n.link:n.link+" "+n.link+"-disabled",href:this.props.url,onClick:this.handleClick},f.default.createElement(d.default,s({data:r,templateKey:"link"},this.props.templateProps)))}}]),t}(f.default.Component);t.default=(0,v.default)((0,y.default)(b))},function(e,t,n){!function(e){function t(e){"}"===e.n.substr(e.n.length-1)&&(e.n=e.n.substring(0,e.n.length-1))}function n(e){return e.trim?e.trim():e.replace(/^\s*|\s*$/g,"")}function r(e,t,n){if(t.charAt(n)!=e.charAt(0))return!1;for(var r=1,i=e.length;r<i;r++)if(t.charAt(n+r)!=e.charAt(r))return!1;return!0}function i(t,n,r,s){var u=[],c=null,l=null,f=null;for(l=r[r.length-1];t.length>0;){if(f=t.shift(),l&&"<"==l.tag&&!(f.tag in w))throw new Error("Illegal content in < super tag.");if(e.tags[f.tag]<=e.tags.$||a(f,s))r.push(f),f.nodes=i(t,f.tag,r,s);else{if("/"==f.tag){if(0===r.length)throw new Error("Closing tag without opener: /"+f.n);if(c=r.pop(),f.n!=c.n&&!o(f.n,c.n,s))throw new Error("Nesting error: "+c.n+" vs. "+f.n);return c.end=f.i,u}"\n"==f.tag&&(f.last=0==t.length||"\n"==t[0].tag)}u.push(f)}if(r.length>0)throw new Error("missing closing tag: "+r.pop().n);return u}function a(e,t){for(var n=0,r=t.length;n<r;n++)if(t[n].o==e.n)return e.tag="#",!0}function o(e,t,n){for(var r=0,i=n.length;r<i;r++)if(n[r].c==e&&n[r].o==t)return!0}function s(e){var t=[];for(var n in e)t.push('"'+c(n)+'": function(c,p,t,i) {'+e[n]+"}");return"{ "+t.join(",")+" }"}function u(e){var t=[];for(var n in e.partials)t.push('"'+c(n)+'":{name:"'+c(e.partials[n].name)+'", '+u(e.partials[n])+"}");return"partials: {"+t.join(",")+"}, subs: "+s(e.subs)}function c(e){return e.replace(y,"\\\\").replace(m,'\\"').replace(v,"\\n").replace(g,"\\r").replace(b,"\\u2028").replace(_,"\\u2029")}function l(e){return~e.indexOf(".")?"d":"f"}function f(e,t){var n="<"+(t.prefix||""),r=n+e.n+R++;return t.partials[r]={name:e.n,partials:{}},t.code+='t.b(t.rp("'+c(r)+'",c,p,"'+(e.indent||"")+'"));',r}function p(e,t){t.code+="t.b(t.t(t."+l(e.n)+'("'+c(e.n)+'",c,p,0)));'}function d(e){return"t.b("+e+");"}var h=/\S/,m=/\"/g,v=/\n/g,g=/\r/g,y=/\\/g,b=/\u2028/,_=/\u2029/;e.tags={"#":1,"^":2,"<":3,$:4,"/":5,"!":6,">":7,"=":8,_v:9,"{":10,"&":11,_t:12},e.scan=function(i,a){function o(){d.length>0&&(m.push({tag:"_t",text:new String(d)}),d="")}function s(){for(var t=!0,n=y;n<m.length;n++)if(!(t=e.tags[m[n].tag]<e.tags._v||"_t"==m[n].tag&&null===m[n].text.match(h)))return!1;return t}function u(e,t){if(o(),e&&s())for(var n,r=y;r<m.length;r++)m[r].text&&((n=m[r+1])&&">"==n.tag&&(n.indent=m[r].text.toString()),m.splice(r,1));else t||m.push({tag:"\n"});v=!1,y=m.length}var c=i.length,l=0,f=null,p=null,d="",m=[],v=!1,g=0,y=0,b="{{",_="}}";for(a&&(a=a.split(" "),b=a[0],_=a[1]),g=0;g<c;g++)0==l?r(b,i,g)?(--g,o(),l=1):"\n"==i.charAt(g)?u(v):d+=i.charAt(g):1==l?(g+=b.length-1,p=e.tags[i.charAt(g+1)],f=p?i.charAt(g+1):"_v","="==f?(g=function(e,t){var r="="+_,i=e.indexOf(r,t),a=n(e.substring(e.indexOf("=",t)+1,i)).split(" ");return b=a[0],_=a[a.length-1],i+r.length-1}(i,g),l=0):(p&&g++,l=2),v=g):r(_,i,g)?(m.push({tag:f,n:n(d),otag:b,ctag:_,i:"/"==f?v-b.length:g+_.length}),d="",g+=_.length-1,l=0,"{"==f&&("}}"==_?g++:t(m[m.length-1]))):d+=i.charAt(g);return u(v,!0),m};var w={_t:!0,"\n":!0,$:!0,"/":!0};e.stringify=function(t,n,r){return"{code: function (c,p,i) { "+e.wrapMain(t.code)+" },"+u(t)+"}"};var R=0;e.generate=function(t,n,r){R=0;var i={code:"",subs:{},partials:{}};return e.walk(t,i),r.asString?this.stringify(i,n,r):this.makeTemplate(i,n,r)},e.wrapMain=function(e){return'var t=this;t.b(i=i||"");'+e+"return t.fl();"},e.template=e.Template,e.makeTemplate=function(e,t,n){var r=this.makePartials(e);return r.code=new Function("c","p","i",this.wrapMain(e.code)),new this.template(r,t,this,n)},e.makePartials=function(e){var t,n={subs:{},partials:e.partials,name:e.name};for(t in n.partials)n.partials[t]=this.makePartials(n.partials[t]);for(t in e.subs)n.subs[t]=new Function("c","p","t","i",e.subs[t]);return n},e.codegen={"#":function(t,n){n.code+="if(t.s(t."+l(t.n)+'("'+c(t.n)+'",c,p,1),c,p,0,'+t.i+","+t.end+',"'+t.otag+" "+t.ctag+'")){t.rs(c,p,function(c,p,t){',e.walk(t.nodes,n),n.code+="});c.pop();}"},"^":function(t,n){n.code+="if(!t.s(t."+l(t.n)+'("'+c(t.n)+'",c,p,1),c,p,1,0,0,"")){',e.walk(t.nodes,n),n.code+="};"},">":f,"<":function(t,n){var r={partials:{},code:"",subs:{},inPartial:!0};e.walk(t.nodes,r);var i=n.partials[f(t,n)];i.subs=r.subs,i.partials=r.partials},$:function(t,n){var r={subs:{},code:"",partials:n.partials,prefix:t.n};e.walk(t.nodes,r),n.subs[t.n]=r.code,n.inPartial||(n.code+='t.sub("'+c(t.n)+'",c,p,i);')},"\n":function(e,t){t.code+=d('"\\n"'+(e.last?"":" + i"))},_v:function(e,t){t.code+="t.b(t.v(t."+l(e.n)+'("'+c(e.n)+'",c,p,0)));'},_t:function(e,t){t.code+=d('"'+c(e.text)+'"')},"{":p,"&":p},e.walk=function(t,n){for(var r,i=0,a=t.length;i<a;i++)(r=e.codegen[t[i].tag])&&r(t[i],n);return n},e.parse=function(e,t,n){return n=n||{},i(e,"",[],n.sectionTags||[])},e.cache={},e.cacheKey=function(e,t){return[e,!!t.asString,!!t.disableLambda,t.delimiters,!!t.modelGet].join("||")},e.compile=function(t,n){n=n||{};var r=e.cacheKey(t,n),i=this.cache[r];if(i){var a=i.partials;for(var o in a)delete a[o].instance;return i}return i=this.generate(this.parse(this.scan(t,n.delimiters),t,n),t,n),this.cache[r]=i}}(t)},function(e,t,n){!function(e){function t(e,t,n){var r;return t&&"object"==typeof t&&(void 0!==t[e]?r=t[e]:n&&t.get&&"function"==typeof t.get&&(r=t.get(e))),r}function n(e,t,n,r,i,a){function o(){}function s(){}o.prototype=e,s.prototype=e.subs;var u,c=new o;c.subs=new s,c.subsText={},c.buf="",r=r||{},c.stackSubs=r,c.subsText=a;for(u in t)r[u]||(r[u]=t[u]);for(u in r)c.subs[u]=r[u];i=i||{},c.stackPartials=i;for(u in n)i[u]||(i[u]=n[u]);for(u in i)c.partials[u]=i[u];return c}function r(e){return String(null===e||void 0===e?"":e)}function i(e){return e=r(e),l.test(e)?e.replace(a,"&amp;").replace(o,"&lt;").replace(s,"&gt;").replace(u,"&#39;").replace(c,"&quot;"):e}e.Template=function(e,t,n,r){e=e||{},this.r=e.code||this.r,this.c=n,this.options=r||{},this.text=t||"",this.partials=e.partials||{},this.subs=e.subs||{},this.buf=""},e.Template.prototype={r:function(e,t,n){return""},v:i,t:r,render:function(e,t,n){return this.ri([e],t||{},n)},ri:function(e,t,n){return this.r(e,t,n)},ep:function(e,t){var r=this.partials[e],i=t[r.name];if(r.instance&&r.base==i)return r.instance;if("string"==typeof i){if(!this.c)throw new Error("No compiler available.");i=this.c.compile(i,this.options)}if(!i)return null;if(this.partials[e].base=i,r.subs){t.stackText||(t.stackText={});for(key in r.subs)t.stackText[key]||(t.stackText[key]=void 0!==this.activeSub&&t.stackText[this.activeSub]?t.stackText[this.activeSub]:this.text);i=n(i,r.subs,r.partials,this.stackSubs,this.stackPartials,t.stackText)}return this.partials[e].instance=i,i},rp:function(e,t,n,r){var i=this.ep(e,n);return i?i.ri(t,n,r):""},rs:function(e,t,n){var r=e[e.length-1];if(!f(r))return void n(e,t,this);for(var i=0;i<r.length;i++)e.push(r[i]),n(e,t,this),e.pop()},s:function(e,t,n,r,i,a,o){var s;return(!f(e)||0!==e.length)&&("function"==typeof e&&(e=this.ms(e,t,n,r,i,a,o)),s=!!e,!r&&s&&t&&t.push("object"==typeof e?e:t[t.length-1]),s)},d:function(e,n,r,i){var a,o=e.split("."),s=this.f(o[0],n,r,i),u=this.options.modelGet,c=null;if("."===e&&f(n[n.length-2]))s=n[n.length-1];else for(var l=1;l<o.length;l++)a=t(o[l],s,u),void 0!==a?(c=s,s=a):s="";return!(i&&!s)&&(i||"function"!=typeof s||(n.push(c),s=this.mv(s,n,r),n.pop()),s)},f:function(e,n,r,i){for(var a=!1,o=null,s=!1,u=this.options.modelGet,c=n.length-1;c>=0;c--)if(o=n[c],void 0!==(a=t(e,o,u))){s=!0;break}return s?(i||"function"!=typeof a||(a=this.mv(a,n,r)),a):!i&&""},ls:function(e,t,n,i,a){var o=this.options.delimiters;return this.options.delimiters=a,this.b(this.ct(r(e.call(t,i)),t,n)),this.options.delimiters=o,!1},ct:function(e,t,n){if(this.options.disableLambda)throw new Error("Lambda features disabled.");return this.c.compile(e,this.options).render(t,n)},b:function(e){this.buf+=e},fl:function(){var e=this.buf;return this.buf="",e},ms:function(e,t,n,r,i,a,o){var s,u=t[t.length-1],c=e.call(u);return"function"==typeof c?!!r||(s=this.activeSub&&this.subsText&&this.subsText[this.activeSub]?this.subsText[this.activeSub]:this.text,this.ls(c,u,n,s.substring(i,a),o)):c},mv:function(e,t,n){var i=t[t.length-1],a=e.call(i);return"function"==typeof a?this.ct(r(a.call(i)),i,n):a},sub:function(e,t,n,r){var i=this.subs[e];i&&(this.activeSub=e,i(t,n,this,r),this.activeSub=!1)}};var a=/&/g,o=/</g,s=/>/g,u=/\'/g,c=/\"/g,l=/[&<>\"\']/,f=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)}}(t)},function(e,t,n){function r(e,t,n){t=n?void 0:t;var o=i(e,a,void 0,void 0,void 0,void 0,void 0,t);return o.placeholder=r.placeholder,o}var i=n(69),a=8;r.placeholder={},e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",link:"Clear all",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.container,n=e.attributes,r=void 0===n?[]:n,i=e.onlyListedAttributes,a=void 0!==i&&i,o=e.clearAll,s=void 0===o?"before":o,u=e.templates,c=void 0===u?F.default:u,f=e.transformData,d=e.autoHideContainer,m=void 0===d||d,g=e.cssClasses,b=void 0===g?{}:g,w=e.collapsible,P=void 0!==w&&w,j=e.clearsQuery,S=void 0!==j&&j,C=(0,p.default)(f)||(0,R.default)(f)||(0,_.default)(f)&&(0,R.default)(f.item),E=["header","item","clearAll","footer"],A=(0,_.default)(c)&&(0,x.default)(c,function(e,t,n){return e&&-1!==E.indexOf(n)&&((0,v.default)(t)||(0,R.default)(t))},!0),L=["root","header","body","clearAll","list","item","link","count","footer"],H=(0,_.default)(b)&&(0,x.default)(b,function(e,t,n){return e&&-1!==L.indexOf(n)&&(0,v.default)(t)||(0,y.default)(t)},!0);if(!((0,v.default)(t)||(0,N.isDomElement)(t))||!(0,y.default)(r)||!(0,h.default)(a)||-1===[!1,"before","after"].indexOf(s)||!(0,_.default)(c)||!A||!C||!(0,h.default)(m)||!H)throw new Error(M);var I=(0,N.getContainerNode)(t),U={root:(0,l.default)(k(null),b.root),header:(0,l.default)(k("header"),b.header),body:(0,l.default)(k("body"),b.body),clearAll:(0,l.default)(k("clear-all"),b.clearAll),list:(0,l.default)(k("list"),b.list),item:(0,l.default)(k("item"),b.item),link:(0,l.default)(k("link"),b.link),count:(0,l.default)(k("count"),b.count),footer:(0,l.default)(k("footer"),b.footer)},D=T({containerNode:I,clearAllPosition:s,collapsible:P,cssClasses:U,autoHideContainer:m,renderState:{},templates:c,transformData:f});try{return(0,O.default)(D)({attributes:r,onlyListedAttributes:a,clearAll:s,clearsQuery:S})}catch(e){throw new Error(M)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(66),p=r(f),d=n(182),h=r(d),m=n(21),v=r(m),g=n(2),y=r(g),b=n(25),_=r(b),w=n(14),R=r(w),P=n(15),x=r(P),j=n(406),S=r(j),C=n(181),O=r(C),E=n(407),F=r(E),N=n(1),k=(0,N.bemHelper)("ais-current-refined-values"),T=function(e){var t=e.autoHideContainer,n=e.clearAllPosition,r=e.collapsible,i=e.containerNode,a=e.cssClasses,s=e.renderState,c=e.transformData,l=e.templates;return function(e,f){var p=e.attributes,d=e.clearAllClick,h=e.clearAllURL,m=e.refine,v=e.createURL,g=e.refinements,y=e.instantSearchInstance;if(f)return void(s.templateProps=(0,N.prepareTemplateProps)({transformData:c,defaultTemplates:F.default,templatesConfig:y.templatesConfig,templates:l}));var b=t&&g&&0===g.length,_=g.map(function(e){return m.bind(null,e)}),w=g.map(function(e){return v(e)});u.default.render(o.default.createElement(S.default,{attributes:p,clearAllClick:d,clearAllPosition:n,clearAllURL:h,clearRefinementClicks:_,clearRefinementURLs:w,collapsible:r,cssClasses:a,refinements:g,shouldAutoHideContainer:b,templateProps:s.templateProps}),i)}},M="Usage:\ncurrentRefinedValues({\n container,\n [ attributes: [{name[, label, template, transformData]}] ],\n [ onlyListedAttributes = false ],\n [ clearAll = 'before' ] // One of ['before', 'after', false]\n [ templates.{header,item,clearAll,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer = true ],\n [ cssClasses.{root, header, body, clearAll, list, item, link, count, footer} = {} ],\n [ collapsible = false ]\n [ clearsQuery = false ]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}function s(e){var t={};return void 0!==e.template&&(t.templates={item:e.template}),void 0!==e.transformData&&(t.transformData=e.transformData),t}function u(e,t,n){var r=(0,j.default)(t);return r.cssClasses=n,void 0!==e.label&&(r.label=e.label),void 0!==r.operator&&(r.displayOperator=r.operator,">="===r.operator&&(r.displayOperator="&ge;"),"<="===r.operator&&(r.displayOperator="&le;")),r}function c(e){return function(t){(0,w.isSpecialClick)(t)||(t.preventDefault(),e())}}Object.defineProperty(t,"__esModule",{value:!0}),t.RawCurrentRefinedValues=void 0;var l=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},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),p=n(4),d=(r(p),n(0)),h=r(d),m=n(22),v=r(m),g=n(28),y=r(g),b=n(27),_=r(b),w=n(1),R=n(10),P=r(R),x=n(201),j=r(x),S=n(20),C=r(S),O=t.RawCurrentRefinedValues=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),f(t,[{key:"shouldComponentUpdate",value:function(e){return!(0,C.default)(this.props.refinements,e.refinements)}},{key:"_clearAllElement",value:function(e,t){if(t===e){var n=this.props,r=n.refinements,i=n.cssClasses;return h.default.createElement("a",{className:r&&r.length>0?i.clearAll:i.clearAll+" "+i.clearAll+"-disabled",href:this.props.clearAllURL,onClick:c(this.props.clearAllClick)},h.default.createElement(v.default,l({templateKey:"clearAll"},this.props.templateProps)))}}},{key:"_refinementElement",value:function(e,t){var n=this.props.attributes[e.attributeName]||{},r=u(n,e,this.props.cssClasses),i=s(n),a=e.attributeName+(e.operator?e.operator:":")+(e.exclude?e.exclude:"")+e.name;return h.default.createElement("div",{className:this.props.cssClasses.item,key:a},h.default.createElement("a",{className:this.props.cssClasses.link,href:this.props.clearRefinementURLs[t],onClick:c(this.props.clearRefinementClicks[t])},h.default.createElement(v.default,l({data:r,templateKey:"item"},this.props.templateProps,i))))}},{key:"render",value:function(){return h.default.createElement("div",null,this._clearAllElement("before",this.props.clearAllPosition),h.default.createElement("div",{className:this.props.cssClasses.list},(0,P.default)(this.props.refinements,this._refinementElement.bind(this))),this._clearAllElement("after",this.props.clearAllPosition))}}]),t}(h.default.Component);t.default=(0,_.default)((0,y.default)(O))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'{{#label}}{{label}}{{^operator}}:{{/operator}} {{/label}}{{#operator}}{{{displayOperator}}} {{/operator}}{{#exclude}}-{{/exclude}}{{name}} <span class="{{cssClasses.count}}">{{count}}</span>',clearAll:"Clear all",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributes,r=e.separator,i=void 0===r?" > ":r,a=e.rootPath,o=void 0===a?null:a,s=e.showParentLevel,u=void 0===s||s,c=e.limit,f=void 0===c?10:c,d=e.sortBy,h=void 0===d?["name:asc"]:d,m=e.cssClasses,w=void 0===m?{}:m,R=e.autoHideContainer,P=void 0===R||R,x=e.templates,j=void 0===x?v.default:x,S=e.collapsible,C=void 0!==S&&S,O=e.transformData;if(!t||!n||!n.length)throw new Error(_);var E=(0,g.getContainerNode)(t),F={root:(0,l.default)(y(null),w.root),header:(0,l.default)(y("header"),w.header),body:(0,l.default)(y("body"),w.body),footer:(0,l.default)(y("footer"),w.footer),list:(0,l.default)(y("list"),w.list),depth:y("list","lvl"),item:(0,l.default)(y("item"),w.item),active:(0,l.default)(y("item","active"),w.active),link:(0,l.default)(y("link"),w.link),count:(0,l.default)(y("count"),w.count)},N=b({autoHideContainer:P,collapsible:C,cssClasses:F,containerNode:E,transformData:O,templates:j,renderState:{}});try{return(0,p.default)(N)({attributes:n,separator:i,rootPath:o,showParentLevel:u,limit:f,sortBy:h})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(183),p=r(f),d=n(36),h=r(d),m=n(411),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-hierarchical-menu"),b=function(e){var t=e.autoHideContainer,n=e.collapsible,r=e.cssClasses,i=e.containerNode,a=e.transformData,s=e.templates,c=e.renderState;return function(e,l){var f=e.createURL,p=e.items,d=e.refine,m=e.instantSearchInstance;if(l)return void(c.templateProps=(0,g.prepareTemplateProps)({transformData:a,defaultTemplates:v.default,templatesConfig:m.templatesConfig,templates:s}));var y=t&&0===p.length;u.default.render(o.default.createElement(h.default,{collapsible:n,createURL:f,cssClasses:r,facetValues:p,shouldAutoHideContainer:y,templateProps:c.templateProps,toggleRefinement:d}),i)}},_="Usage:\nhierarchicalMenu({\n container,\n attributes,\n [ separator=' > ' ],\n [ rootPath ],\n [ showParentLevel=true ],\n [ limit=10 ],\n [ sortBy=['name:asc'] ],\n [ cssClasses.{root , header, body, footer, list, depth, item, active, link}={} ],\n [ templates.{header, item, footer} ],\n [ transformData.{item} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=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},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=n(22),d=r(p),h=n(20),m=r(h),v=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,m.default)(this.props,e)}},{key:"handleClick",value:function(e){this.props.handleClick({facetValueToRefine:this.props.facetValueToRefine,isRefined:this.props.isRefined,originalEvent:e})}},{key:"render",value:function(){return f.default.createElement("div",{className:this.props.itemClassName,onClick:this.handleClick},f.default.createElement(d.default,s({data:this.props.templateData,templateKey:this.props.templateKey},this.props.templateProps)),this.props.subItems)}}]),t}(f.default.Component);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(4),c=(r(u),n(0)),l=r(c),f=l.default.createElement("symbol",{xmlns:"http://www.w3.org/2000/svg",id:"sbx-icon-search-12",viewBox:"0 0 40 41"},l.default.createElement("path",{d:"M30.967 27.727l-.03-.03c-.778-.777-2.038-.777-2.815 0l-1.21 1.21c-.78.78-.778 2.04 0 2.817l.03.03 4.025-4.027zm1.083 1.084L39.24 36c.778.778.78 2.037 0 2.816l-1.21 1.21c-.777.778-2.038.78-2.816 0l-7.19-7.19 4.026-4.025zM15.724 31.45c8.684 0 15.724-7.04 15.724-15.724C31.448 7.04 24.408 0 15.724 0 7.04 0 0 7.04 0 15.724c0 8.684 7.04 15.724 15.724 15.724zm0-3.93c6.513 0 11.793-5.28 11.793-11.794 0-6.513-5.28-11.793-11.793-11.793C9.21 3.93 3.93 9.21 3.93 15.725c0 6.513 5.28 11.793 11.794 11.793z",fillRule:"evenodd"})),p=l.default.createElement("symbol",{xmlns:"http://www.w3.org/2000/svg",id:"sbx-icon-clear-2",viewBox:"0 0 20 20"},l.default.createElement("path",{d:"M8.96 10L.52 1.562 0 1.042 1.04 0l.522.52L10 8.96 18.438.52l.52-.52L20 1.04l-.52.522L11.04 10l8.44 8.438.52.52L18.96 20l-.522-.52L10 11.04l-8.438 8.44-.52.52L0 18.96l.52-.522L8.96 10z",fillRule:"evenodd"})),d=l.default.createElement("button",{type:"submit",title:"Submit your search query.",className:"sbx-sffv__submit"},l.default.createElement("svg",{role:"img","aria-label":"Search"},l.default.createElement("use",{xlinkHref:"#sbx-icon-search-12"}))),h=l.default.createElement("button",{type:"reset",title:"Clear the search query.",className:"sbx-sffv__reset"},l.default.createElement("svg",{role:"img","aria-label":"Reset"},l.default.createElement("use",{xlinkHref:"#sbx-icon-clear-2"}))),m=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),s(t,[{key:"clearInput",value:function(){this.input&&(this.input.value="")}},{key:"validateSearch",value:function(e){if(e.preventDefault(),this.input){this.input.value&&this.props.onValidate()}}},{key:"render",value:function(){var e=this,t=this.props,n=t.placeholder,r=t.onChange,i=this.props.disabled?"sbx-sffv__input sbx-sffv__input-disabled":"sbx-sffv__input",a=this.props.disabled?"searchbox sbx-sffv sbx-sffv-disabled":"searchbox sbx-sffv";return l.default.createElement("form",{noValidate:"novalidate",className:a,onReset:function(){r("")},onSubmit:function(t){return e.validateSearch(t)}},l.default.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",style:{display:"none"}},f,p),l.default.createElement("div",{role:"search",className:"sbx-sffv__wrapper"},l.default.createElement("input",{type:"search",name:"search",placeholder:n,autoComplete:"off",required:"required",className:i,onChange:function(e){return r(e.target.value)},ref:function(t){e.input=t},disabled:this.props.disabled}),d,h))}}]),t}(l.default.Component);t.default=m},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<a class="{{cssClasses.link}}" href="{{url}}">{{label}} <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.templates,a=void 0===i?v.default:i,o=e.transformData,s=e.escapeHits,u=void 0!==s&&s;if(!t)throw new Error("Must provide a container."+_);if(a.item&&a.allItems)throw new Error("Must contain only allItems OR item template."+_);var c=(0,g.getContainerNode)(t),f={root:(0,l.default)(y(null),r.root),item:(0,l.default)(y("item"),r.item),empty:(0,l.default)(y(null,"empty"),r.empty)},p=b({containerNode:c,cssClasses:f,renderState:{},transformData:o,templates:a});try{return(0,h.default)(p)({escapeHits:u})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(202),p=r(f),d=n(184),h=r(d),m=n(414),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-hits"),b=function(e){var t=e.renderState,n=e.cssClasses,r=e.containerNode,i=e.transformData,a=e.templates;return function(e,s){var c=e.hits,l=e.results,f=e.instantSearchInstance;if(s)return void(t.templateProps=(0,g.prepareTemplateProps)({transformData:i,defaultTemplates:v.default,templatesConfig:f.templatesConfig,templates:a}));u.default.render(o.default.createElement(p.default,{cssClasses:n,hits:c,results:l,templateProps:t.templateProps}),r)}},_="Usage:\nhits({\n container,\n [ cssClasses.{root,empty,item}={} ],\n [ templates.{empty,item} | templates.{empty, allItems} ],\n [ transformData.{empty,item} | transformData.{empty, allItems} ],\n})"},function(e,t){function n(e,t){return null!=e&&i.call(e,t)}var r=Object.prototype,i=r.hasOwnProperty;e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={empty:"No results",item:function(e){return JSON.stringify(e,null,2)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.items,r=e.cssClasses,i=void 0===r?{}:r,a=e.autoHideContainer,o=void 0!==a&&a;if(!t)throw new Error(_);var s=(0,g.getContainerNode)(t),u={root:(0,l.default)(y(null),i.root),item:(0,l.default)(y("item"),i.item)},c=b({containerNode:s,cssClasses:u,autoHideContainer:o});try{return(0,v.default)(c)({items:n})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(16),p=r(f),d=n(110),h=r(d),m=n(186),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-hits-per-page-selector"),b=function(e){var t=e.containerNode,n=e.cssClasses,r=e.autoHideContainer;return function(e,i){var a=e.items,s=e.refine,c=e.hasNoResults;if(!i){var l=(0,p.default)(a,function(e){return e.isRefined})||{},f=l.value;u.default.render(o.default.createElement(h.default,{cssClasses:n,currentValue:f,options:a,setValue:s,shouldAutoHideContainer:r&&c}),t)}}},_="Usage:\nhitsPerPageSelector({\n container,\n items,\n [ cssClasses.{root,item}={} ],\n [ autoHideContainer=false ]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.showMoreLabel,a=void 0===i?"Show more results":i,o=e.templates,s=void 0===o?h.default:o,u=e.transformData,c=e.escapeHits,f=void 0!==c&&c;if(!t)throw new Error("Must provide a container."+_);var p=(0,g.getContainerNode)(t),d={root:(0,l.default)(y(null),r.root),item:(0,l.default)(y("item"),r.item),empty:(0,l.default)(y(null,"empty"),r.empty),showmore:(0,l.default)(y("showmore"),r.showmore)},m=b({containerNode:p,cssClasses:d,transformData:u,templates:s,showMoreLabel:a,renderState:{}});try{return(0,v.default)(m)({escapeHits:f})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(417),p=r(f),d=n(418),h=r(d),m=n(187),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-infinite-hits"),b=function(e){var t=e.cssClasses,n=e.containerNode,r=e.renderState,i=e.templates,a=e.transformData,s=e.showMoreLabel;return function(e,c){var l=e.hits,f=e.results,d=e.showMore,m=e.isLastPage,v=e.instantSearchInstance;if(c)return void(r.templateProps=(0,g.prepareTemplateProps)({transformData:a,defaultTemplates:h.default,templatesConfig:v.templatesConfig,templates:i}));u.default.render(o.default.createElement(p.default,{cssClasses:t,hits:l,results:f,showMore:d,showMoreLabel:s,templateProps:r.templateProps,isLastPage:m}),n)}},_="\nUsage:\ninfiniteHits({\n container,\n [ escapeHits = false ],\n [ showMoreLabel ],\n [ cssClasses.{root,empty,item}={} ],\n [ templates.{empty,item} | templates.{empty} ],\n [ transformData.{empty,item} | transformData.{empty} ],\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.cssClasses,n=e.hits,r=e.results,i=e.showMore,a=e.showMoreLabel,o=e.templateProps,u=e.isLastPage?s.default.createElement("button",{disabled:!0},a):s.default.createElement("button",{onClick:i},a);return s.default.createElement("div",null,s.default.createElement(c.default,{cssClasses:t,hits:n,results:r,templateProps:o}),s.default.createElement("div",{className:t.showmore},u))}Object.defineProperty(t,"__esModule",{value:!0});var a=n(4),o=(r(a),n(0)),s=r(o),u=n(202),c=r(u);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={empty:"No results",item:function(e){return JSON.stringify(e,null,2)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.container,n=e.attributeName,r=e.sortBy,i=void 0===r?["name:asc"]:r,o=e.limit,s=void 0===o?10:o,u=e.cssClasses,c=void 0===u?{}:u,l=e.templates,p=void 0===l?d.default:l,h=e.collapsible,v=void 0!==h&&h,y=e.transformData,b=e.autoHideContainer,x=void 0===b||b,j=e.showMore,S=void 0!==j&&j;if(!t)throw new Error(P);var C=(0,m.default)(S);if(C&&C.limit<s)throw new Error("showMore.limit configuration should be > than the limit in the main configuration");var O=(0,_.getContainerNode)(t),E=C&&C.limit||void 0,F=C&&(0,_.prefixKeys)("show-more-",C.templates),N=F?a({},p,F):p,k={root:(0,f.default)(w(null),c.root),header:(0,f.default)(w("header"),c.header),body:(0,f.default)(w("body"),c.body),footer:(0,f.default)(w("footer"),c.footer),list:(0,f.default)(w("list"),c.list),item:(0,f.default)(w("item"),c.item),active:(0,f.default)(w("item","active"),c.active),link:(0,f.default)(w("link"),c.link),count:(0,f.default)(w("count"),c.count)},T=R({containerNode:O,cssClasses:k,collapsible:v,autoHideContainer:x,renderState:{},templates:N,transformData:y,showMoreConfig:C});try{return(0,g.default)(T)({attributeName:n,limit:s,sortBy:i,showMoreLimit:E})}catch(e){throw new Error(P)}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(0),s=r(o),u=n(0),c=r(u),l=n(3),f=r(l),p=n(420),d=r(p),h=n(204),m=r(h),v=n(188),g=r(v),y=n(36),b=r(y),_=n(1),w=(0,_.bemHelper)("ais-menu"),R=function(e){var t=e.containerNode,n=e.cssClasses,r=e.collapsible,i=e.autoHideContainer,o=e.renderState,u=e.templates,l=e.transformData,f=e.showMoreConfig;return function(e,p){var h=e.refine,m=e.items,v=e.createURL,g=e.canRefine,y=e.instantSearchInstance,w=e.isShowingMore,R=e.toggleShowMore,P=e.canToggleShowMore;if(p)return void(o.templateProps=(0,_.prepareTemplateProps)({transformData:l,defaultTemplates:d.default,templatesConfig:y.templatesConfig,templates:u}));var x=m.map(function(e){return a({},e,{url:v(e.name)})}),j=i&&!g;c.default.render(s.default.createElement(b.default,{collapsible:r,createURL:v,cssClasses:n,facetValues:x,shouldAutoHideContainer:j,showMore:null!==f,templateProps:o.templateProps,toggleRefinement:h,toggleShowMore:R,isShowingMore:w,canToggleShowMore:P}),t)}},P="Usage:\nmenu({\n container,\n attributeName,\n [ sortBy=['name:asc'] ],\n [ limit=10 ],\n [ cssClasses.{root,list,item} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer ],\n [ showMore.{templates: {active, inactive}, limit} ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<a class="{{cssClasses.link}}" href="{{url}}">{{label}} <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span></a>',footer:""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={active:'<a class="ais-show-more ais-show-more__active">Show less</a>',inactive:'<a class="ais-show-more ais-show-more__inactive">Show more</a>'}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.operator,i=void 0===r?"or":r,o=e.sortBy,s=void 0===o?["isRefined","count:desc","name:asc"]:o,u=e.limit,c=void 0===u?10:u,l=e.cssClasses,p=void 0===l?{}:l,d=e.templates,h=void 0===d?b.default:d,m=e.collapsible,v=void 0!==m&&m,y=e.transformData,_=e.autoHideContainer,S=void 0===_||_,C=e.showMore,O=void 0!==C&&C,E=e.searchForFacetValues,F=void 0!==E&&E;if(!t)throw new Error(j);var N=(0,w.default)(O);if(N&&N.limit<c)throw new Error("showMore.limit configuration should be > than the limit in the main configuration");var k=N&&N.limit||c,T=(0,R.getContainerNode)(t),M=N?(0,R.prefixKeys)("show-more-",N.templates):{},A=F?F.templates:{},L=a({},h,M,A),H={root:(0,f.default)(P(null),p.root),header:(0,f.default)(P("header"),p.header),body:(0,f.default)(P("body"),p.body),footer:(0,f.default)(P("footer"),p.footer),list:(0,f.default)(P("list"),p.list),item:(0,f.default)(P("item"),p.item),active:(0,f.default)(P("item","active"),p.active),label:(0,f.default)(P("label"),p.label),checkbox:(0,f.default)(P("checkbox"),p.checkbox),count:(0,f.default)(P("count"),p.count)},I=x({containerNode:T,cssClasses:H,transformData:y,templates:L,renderState:{},collapsible:v,autoHideContainer:S,showMoreConfig:N,searchForFacetValues:F});try{return(0,g.default)(I)({attributeName:n,operator:i,limit:c,showMoreLimit:k,sortBy:s})}catch(e){throw new Error(e)}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(0),s=r(o),u=n(0),c=r(u),l=n(3),f=r(l),p=n(46),d=r(p),h=n(36),m=r(h),v=n(194),g=r(v),y=n(423),b=r(y),_=n(204),w=r(_),R=n(1),P=(0,R.bemHelper)("ais-refinement-list"),x=function(e){var t=e.containerNode,n=e.cssClasses,r=e.transformData,i=e.templates,a=e.renderState,o=e.collapsible,u=e.autoHideContainer,l=e.showMoreConfig,f=e.searchForFacetValues;return function(e,p){var h=e.refine,v=e.items,g=e.createURL,y=e.searchForItems,_=e.isFromSearch,w=e.instantSearchInstance,P=e.canRefine,x=e.toggleShowMore,j=e.isShowingMore,S=e.hasExhaustiveItems,C=e.canToggleShowMore;if(p)return void(a.templateProps=(0,R.prepareTemplateProps)({transformData:r,defaultTemplates:b.default,templatesConfig:w.templatesConfig,templates:i}));var O={header:{refinedFacetsCount:(0,d.default)(v,{isRefined:!0}).length}};c.default.render(s.default.createElement(m.default,{collapsible:o,createURL:g,cssClasses:n,facetValues:v,headerFooterData:O,shouldAutoHideContainer:u&&!1===P,templateProps:a.templateProps,toggleRefinement:h,searchFacetValues:f?y:void 0,searchPlaceholder:f.placeholder||"Search for other...",isFromSearch:_,showMore:null!==l,toggleShowMore:x,isShowingMore:j,hasExhaustiveItems:S,searchIsAlwaysActive:f.isAlwaysActive||!1,canToggleShowMore:C}),t)}},j="Usage:\nrefinementList({\n container,\n attributeName,\n [ operator='or' ],\n [ sortBy=['isRefined', 'count:desc', 'name:asc'] ],\n [ limit=10 ],\n [ cssClasses.{root, header, body, footer, list, item, active, label, checkbox, count}],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer=true ],\n [ collapsible=false ],\n [ showMore.{templates: {active, inactive}, limit} ],\n [ collapsible=false ],\n [ searchForFacetValues.{placeholder, templates: {noResults}, isAlwaysActive}],\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="checkbox"\n class="{{cssClasses.checkbox}}"\n value="{{value}}"\n {{#isRefined}}checked{{/isRefined}} />\n {{{highlighted}}}\n <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>\n</label>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.options,i=e.cssClasses,a=void 0===i?{}:i,o=e.templates,s=void 0===o?v.default:o,u=e.collapsible,c=void 0!==u&&u,f=e.transformData,p=e.autoHideContainer,d=void 0===p||p;if(!t||!n||!r)throw new Error(_);var m=(0,g.getContainerNode)(t),w={root:(0,l.default)(y(null),a.root),header:(0,l.default)(y("header"),a.header),body:(0,l.default)(y("body"),a.body),footer:(0,l.default)(y("footer"),a.footer),list:(0,l.default)(y("list"),a.list),item:(0,l.default)(y("item"),a.item),label:(0,l.default)(y("label"),a.label),radio:(0,l.default)(y("radio"),a.radio),active:(0,l.default)(y("item","active"),a.active)},R=b({containerNode:m,collapsible:c,autoHideContainer:d,cssClasses:w,renderState:{},transformData:f,templates:s});try{return(0,h.default)(R)({attributeName:n,options:r})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(36),p=r(f),d=n(189),h=r(d),m=n(425),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-refinement-list"),b=function(e){var t=e.containerNode,n=e.collapsible,r=e.autoHideContainer,i=e.cssClasses,a=e.renderState,s=e.transformData,c=e.templates;return function(e,l){var f=e.createURL,d=e.instantSearchInstance,h=e.refine,m=e.items,y=e.hasNoResults;if(l)return void(a.templateProps=(0,g.prepareTemplateProps)({transformData:s,defaultTemplates:v.default,templatesConfig:d.templatesConfig,templates:c}));u.default.render(o.default.createElement(p.default,{collapsible:n,createURL:f,cssClasses:i,facetValues:m,shouldAutoHideContainer:r&&y,templateProps:a.templateProps,toggleRefinement:h}),t)}},_="Usage:\nnumericRefinementList({\n container,\n attributeName,\n options,\n [ cssClasses.{root,header,body,footer,list,item,active,label,radio,count} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="radio" class="{{cssClasses.radio}}" name="{{attributeName}}" {{#isRefined}}checked{{/isRefined}} />{{label}}\n</label>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){var t=e.container,n=e.operator,r=void 0===n?"=":n,i=e.attributeName,a=e.options,o=e.cssClasses,s=void 0===o?{}:o,u=e.autoHideContainer,c=void 0!==u&&u,f=(0,m.getContainerNode)(t);if(!t||!a||0===a.length||!i)throw new Error(y);var p={root:(0,l.default)(v(null),s.root),item:(0,l.default)(v("item"),s.item)},d=g({autoHideContainer:c,containerNode:f,cssClasses:p});try{return(0,h.default)(d)({operator:r,attributeName:i,options:a})}catch(e){throw new Error(y)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(110),p=r(f),d=n(190),h=r(d),m=n(1),v=(0,m.bemHelper)("ais-numeric-selector"),g=function(e){var t=e.containerNode,n=e.autoHideContainer,r=e.cssClasses;return function(e,i){var a=e.currentRefinement,s=e.refine,c=e.hasNoResults,l=e.options;i||u.default.render(o.default.createElement(p.default,{cssClasses:r,currentValue:a,options:l,setValue:s,shouldAutoHideContainer:n&&c}),t)}},y="Usage: numericSelector({\n container,\n attributeName,\n options,\n cssClasses.{root,item},\n autoHideContainer\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.labels,r=void 0===n?y:n,i=e.cssClasses,a=void 0===i?{}:i,s=e.maxPages,u=e.padding,c=void 0===u?3:u,l=e.showFirstLast,f=void 0===l||l,d=e.autoHideContainer,h=void 0===d||d,m=e.scrollTo,R=void 0===m?"body":m;if(!t)throw new Error(w);var P=(0,g.getContainerNode)(t),x=!0===R?"body":R,j=!1!==x&&(0,g.getContainerNode)(x),S={root:(0,p.default)(b(null),a.root),item:(0,p.default)(b("item"),a.item),link:(0,p.default)(b("link"),a.link),page:(0,p.default)(b("item","page"),a.page),previous:(0,p.default)(b("item","previous"),a.previous),next:(0,p.default)(b("item","next"),a.next),first:(0,p.default)(b("item","first"),a.first),last:(0,p.default)(b("item","last"),a.last),active:(0,p.default)(b("item","active"),a.active),disabled:(0,p.default)(b("item","disabled"),a.disabled)},C=(0,o.default)(r,y),O=_({containerNode:P,cssClasses:S,labels:C,showFirstLast:f,padding:c,autoHideContainer:h,scrollToNode:j});try{return(0,v.default)(O)({maxPages:s})}catch(e){throw new Error(w)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(67),o=r(a),s=n(0),u=r(s),c=n(0),l=r(c),f=n(3),p=r(f),d=n(428),h=r(d),m=n(191),v=r(m),g=n(1),y={previous:"\u2039",next:"\u203a",first:"\xab",last:"\xbb"},b=(0,g.bemHelper)("ais-pagination"),_=function(e){var t=e.containerNode,n=e.cssClasses,r=e.labels,i=e.showFirstLast,a=e.padding,o=e.autoHideContainer,s=e.scrollToNode;return function(e,c){var f=e.createURL,p=e.currentRefinement,d=e.nbHits,m=e.nbPages,v=e.refine;if(!c){var g=function(e){v(e),!1!==s&&s.scrollIntoView()},y=o&&0===d;l.default.render(u.default.createElement(h.default,{createURL:f,cssClasses:n,currentPage:p,labels:r,nbHits:d,nbPages:m,padding:a,setCurrentPage:g,shouldAutoHideContainer:y,showFirstLast:i}),t)}}},w="Usage:\npagination({\n container,\n [ cssClasses.{root,item,page,previous,next,first,last,active,disabled}={} ],\n [ labels.{previous,next,first,last} ],\n [ maxPages ],\n [ padding=3 ],\n [ showFirstLast=true ],\n [ autoHideContainer=true ],\n [ scrollTo='body' ]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),u=n(4),c=(r(u),n(0)),l=r(c),f=n(12),p=r(f),d=n(429),h=r(d),m=n(1),v=n(431),g=r(v),y=n(434),b=r(y),_=n(3),w=r(_),R=function(e){function t(e){i(this,t);var n=a(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,(0,h.default)(e,t.defaultProps)));return n.handleClick=n.handleClick.bind(n),n}return o(t,e),s(t,[{key:"pageLink",value:function(e){var t=e.label,n=e.ariaLabel,r=e.pageNumber,i=e.additionalClassName,a=void 0===i?null:i,o=e.isDisabled,s=void 0!==o&&o,u=e.isActive,c=void 0!==u&&u,f=e.createURL,p={item:(0,w.default)(this.props.cssClasses.item,a),link:(0,w.default)(this.props.cssClasses.link)};s?p.item=(0,w.default)(p.item,this.props.cssClasses.disabled):c&&(p.item=(0,w.default)(p.item,this.props.cssClasses.active));var d=f&&!s?f(r):"#";return l.default.createElement(b.default,{ariaLabel:n,cssClasses:p,handleClick:this.handleClick,isDisabled:s,key:t+r,label:t,pageNumber:r,url:d})}},{key:"previousPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Previous",additionalClassName:this.props.cssClasses.previous,isDisabled:e.isFirstPage(),label:this.props.labels.previous,pageNumber:e.currentPage-1,createURL:t})}},{key:"nextPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Next",additionalClassName:this.props.cssClasses.next,isDisabled:e.isLastPage(),label:this.props.labels.next,pageNumber:e.currentPage+1,createURL:t})}},{key:"firstPageLink",value:function(e,t){return this.pageLink({ariaLabel:"First",additionalClassName:this.props.cssClasses.first,isDisabled:e.isFirstPage(),label:this.props.labels.first,pageNumber:0,createURL:t})}},{key:"lastPageLink",value:function(e,t){return this.pageLink({ariaLabel:"Last",additionalClassName:this.props.cssClasses.last,isDisabled:e.isLastPage(),label:this.props.labels.last,pageNumber:e.total-1,createURL:t})}},{key:"pages",value:function(e,t){var n=this,r=[];return(0,p.default)(e.pages(),function(i){var a=i===e.currentPage;r.push(n.pageLink({ariaLabel:i+1,additionalClassName:n.props.cssClasses.page,isActive:a,label:i+1,pageNumber:i,createURL:t}))}),r}},{key:"handleClick",value:function(e,t){(0,m.isSpecialClick)(t)||(t.preventDefault(),this.props.setCurrentPage(e))}},{key:"render",value:function(){var e=new g.default({currentPage:this.props.currentPage,total:this.props.nbPages,padding:this.props.padding}),t=this.props.createURL;return l.default.createElement("ul",{className:this.props.cssClasses.root},this.props.showFirstLast?this.firstPageLink(e,t):null,this.previousPageLink(e,t),this.pages(e,t),this.nextPageLink(e,t),this.props.showFirstLast?this.lastPageLink(e,t):null)}}]),t}(l.default.Component);R.defaultProps={nbHits:0,currentPage:0,nbPages:0},t.default=R},function(e,t,n){var r=n(43),i=n(18),a=n(430),o=n(177),s=i(function(e){return e.push(void 0,a),r(o,void 0,e)});e.exports=s},function(e,t,n){function r(e,t,n,o,s,u){return a(e)&&a(t)&&(u.set(t,e),i(e,t,void 0,r,u),u.delete(t)),e}var i=n(100),a=n(6);e.exports=r},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),a=n(205),o=function(e){return e&&e.__esModule?e:{default:e}}(a),s=function(){function e(t){r(this,e),this.currentPage=t.currentPage,this.total=t.total,this.padding=t.padding}return i(e,[{key:"pages",value:function(){var e=this.total,t=this.currentPage,n=this.padding,r=this.nbPagesDisplayed(n,e);if(r===e)return(0,o.default)(0,e);var i=this.calculatePaddingLeft(t,n,e,r),a=r-i,s=t-i,u=t+a;return(0,o.default)(s,u)}},{key:"nbPagesDisplayed",value:function(e,t){return Math.min(2*e+1,t)}},{key:"calculatePaddingLeft",value:function(e,t,n,r){return e<=t?e:e>=n-t?r-(n-e):t}},{key:"isLastPage",value:function(){return this.currentPage===this.total-1}},{key:"isFirstPage",value:function(){return 0===this.currentPage}}]),e}();t.default=s},function(e,t,n){function r(e){return function(t,n,r){return r&&"number"!=typeof r&&a(t,n,r)&&(n=r=void 0),t=o(t),void 0===n?(n=t,t=0):n=o(n),r=void 0===r?t<n?1:-1:o(r),i(t,n,r,e)}}var i=n(433),a=n(98),o=n(150);e.exports=r},function(e,t){function n(e,t,n,a){for(var o=-1,s=i(r((t-e)/(n||1)),0),u=Array(s);s--;)u[a?s:++o]=e,e+=n;return u}var r=Math.ceil,i=Math.max;e.exports=n},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0});var s=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},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=n(20),d=r(p),h=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"componentWillMount",value:function(){this.handleClick=this.handleClick.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,d.default)(this.props,e)}},{key:"handleClick",value:function(e){this.props.handleClick(this.props.pageNumber,e)}},{key:"render",value:function(){var e=this.props,t=e.cssClasses,n=e.label,r=e.ariaLabel,i=e.url,a=e.isDisabled,o="span",u={className:t.link,dangerouslySetInnerHTML:{__html:n}};a||(o="a",u=s({},u,{"aria-label":r,href:i,onClick:this.handleClick}));var c=f.default.createElement(o,u);return f.default.createElement("li",{className:t.item},c)}}]),t}(f.default.Component);t.default=h},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.cssClasses,i=void 0===r?{}:r,o=e.templates,s=void 0===o?g.default:o,u=e.collapsible,c=void 0!==u&&u,l=e.labels,p=void 0===l?{}:l,d=e.currency,h=void 0===d?"$":d,v=e.autoHideContainer,R=void 0===v||v;if(!t)throw new Error(w);var P=(0,y.getContainerNode)(t),x=a({button:"Go",separator:"to"},p),j={root:(0,f.default)(b(null),i.root),header:(0,f.default)(b("header"),i.header),body:(0,f.default)(b("body"),i.body),list:(0,f.default)(b("list"),i.list),link:(0,f.default)(b("link"),i.link),item:(0,f.default)(b("item"),i.item),active:(0,f.default)(b("item","active"),i.active),form:(0,f.default)(b("form"),i.form),label:(0,f.default)(b("label"),i.label),input:(0,f.default)(b("input"),i.input),currency:(0,f.default)(b("currency"),i.currency),button:(0,f.default)(b("button"),i.button),separator:(0,f.default)(b("separator"),i.separator),footer:(0,f.default)(b("footer"),i.footer)},S=void 0!==p.currency?p.currency:h,C=_({containerNode:P,templates:s,renderState:{},collapsible:c,cssClasses:j,labels:x,currency:S,autoHideContainer:R});try{return(0,m.default)(C)({attributeName:n})}catch(e){throw new Error(w)}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(0),s=r(o),u=n(0),c=r(u),l=n(3),f=r(l),p=n(436),d=r(p),h=n(192),m=r(h),v=n(438),g=r(v),y=n(1),b=(0,y.bemHelper)("ais-price-ranges"),_=function(e){var t=e.containerNode,n=e.templates,r=e.renderState,i=e.collapsible,a=e.cssClasses,o=e.labels,u=e.currency,l=e.autoHideContainer;return function(e,f){var p=e.refine,h=e.items,m=e.instantSearchInstance;if(f)return void(r.templateProps=(0,y.prepareTemplateProps)({defaultTemplates:g.default,templatesConfig:m.templatesConfig,templates:n}));var v=l&&0===h.length;c.default.render(s.default.createElement(d.default,{collapsible:i,cssClasses:a,currency:u,facetValues:h,labels:o,refine:p,shouldAutoHideContainer:v,templateProps:r.templateProps}),t)}},w="Usage:\npriceRanges({\n container,\n attributeName,\n [ currency=$ ],\n [ cssClasses.{root,header,body,list,item,active,link,form,label,input,currency,separator,button,footer} ],\n [ templates.{header,item,footer} ],\n [ labels.{currency,separator,button} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.RawPriceRanges=void 0;var u=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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(4),f=(r(l),n(0)),p=r(f),d=n(22),h=r(d),m=n(437),v=r(m),g=n(3),y=r(g),b=n(20),_=r(b),w=n(27),R=r(w),P=n(28),x=r(P),j=t.RawPriceRanges=function(e){function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),c(t,[{key:"componentWillMount",value:function(){this.refine=this.refine.bind(this)}},{key:"shouldComponentUpdate",value:function(e){return!(0,_.default)(this.props.facetValues,e.facetValues)}},{key:"getForm",value:function(){var e=u({currency:this.props.currency},this.props.labels),t=void 0;return t=1===this.props.facetValues.length?{from:void 0!==this.props.facetValues[0].from?this.props.facetValues[0].from:"",to:void 0!==this.props.facetValues[0].to?this.props.facetValues[0].to:""}:{from:"",to:""},p.default.createElement(v.default,{cssClasses:this.props.cssClasses,currentRefinement:t,labels:e,refine:this.refine})}},{key:"getItemFromFacetValue",value:function(e){var t=(0,y.default)(this.props.cssClasses.item,i({},this.props.cssClasses.active,e.isRefined)),n=e.from+"_"+e.to,r=this.refine.bind(this,e),a=u({currency:this.props.currency},e);return p.default.createElement("div",{className:t,key:n},p.default.createElement("a",{className:this.props.cssClasses.link,href:e.url,onClick:r},p.default.createElement(h.default,u({data:a,templateKey:"item"},this.props.templateProps))))}},{key:"refine",value:function(e,t){t.preventDefault(),this.props.refine(e)}},{key:"render",value:function(){var e=this;return p.default.createElement("div",null,p.default.createElement("div",{className:this.props.cssClasses.list},this.props.facetValues.map(function(t){return e.getItemFromFacetValue(t)})),this.getForm())}}]),t}(p.default.Component);j.defaultProps={cssClasses:{}},t.default=(0,R.default)((0,x.default)(j))},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=function(e){function t(e){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={from:e.currentRefinement.from,to:e.currentRefinement.to},n}return s(t,e),u(t,[{key:"componentWillMount",value:function(){this.handleSubmit=this.handleSubmit.bind(this)}},{key:"componentWillReceiveProps",value:function(e){this.setState({from:e.currentRefinement.from,to:e.currentRefinement.to})}},{key:"getInput",value:function(e){var t=this;return f.default.createElement("label",{className:this.props.cssClasses.label},f.default.createElement("span",{className:this.props.cssClasses.currency},this.props.labels.currency," "),f.default.createElement("input",{className:this.props.cssClasses.input,onChange:function(n){return t.setState(i({},e,n.target.value))},ref:e,type:"number",value:this.state[e]}))}},{key:"handleSubmit",value:function(e){var t=""!==this.refs.from.value?parseInt(this.refs.from.value,10):void 0,n=""!==this.refs.to.value?parseInt(this.refs.to.value,10):void 0;this.props.refine(t,n,e)}},{key:"render",value:function(){var e=this.getInput("from"),t=this.getInput("to"),n=this.handleSubmit;return f.default.createElement("form",{className:this.props.cssClasses.form,onSubmit:n,ref:"form"},e,f.default.createElement("span",{className:this.props.cssClasses.separator}," ",this.props.labels.separator," "),t,f.default.createElement("button",{className:this.props.cssClasses.button,type:"submit"},this.props.labels.button))}}]),t}(f.default.Component);p.defaultProps={cssClasses:{},labels:{}},t.default=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:"\n {{#from}}\n {{^to}}\n &ge;\n {{/to}}\n {{currency}}{{#helpers.formatNumber}}{{from}}{{/helpers.formatNumber}}\n {{/from}}\n {{#to}}\n {{#from}}\n -\n {{/from}}\n {{^from}}\n &le;\n {{/from}}\n {{#helpers.formatNumber}}{{to}}{{/helpers.formatNumber}}\n {{/to}}\n ",footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.placeholder,r=void 0===n?"":n,i=e.cssClasses,a=void 0===i?{}:i,o=e.poweredBy,s=void 0!==o&&o,u=e.wrapInput,c=void 0===u||u,l=e.autofocus,f=void 0===l?"auto":l,p=e.searchOnEnterKeyPressOnly,d=void 0!==p&&p,h=e.reset,m=void 0===h||h,v=e.magnifier,g=void 0===v||v,y=e.queryHook;if(!t)throw new Error(L);var b=(0,T.getContainerNode)(t);"boolean"!==typeof f&&(f="auto"),!0===s&&(s={});var _=A({containerNode:b,cssClasses:a,placeholder:r,poweredBy:s,templates:k.default,autofocus:f,searchOnEnterKeyPressOnly:d,wrapInput:c,reset:m,magnifier:g});try{return(0,F.default)(_)({queryHook:y})}catch(e){throw new Error(L)}}function a(e){return"INPUT"===e.tagName?e:document.createElement("input")}function o(e){return"INPUT"===e.tagName?e:e.querySelector("input")}function s(e,t){var n=document.createElement("div");return(0,S.default)(M(null),t.root).split(" ").forEach(function(e){return n.classList.add(e)}),n.appendChild(e),n}function u(e,t,n){e.addEventListener?e.addEventListener(t,n):e.attachEvent("on"+t,n)}function c(e){return(e.currentTarget?e.currentTarget:e.srcElement).value}function l(e,t){return function(n){return n.keyCode===e&&t(n)}}function f(e){return function(t){return e(c(t))}}function p(e,t,n,r){var i={autocapitalize:"off",autocomplete:"off",autocorrect:"off",placeholder:e,role:"textbox",spellcheck:"false",type:"text",value:n};(0,_.default)(i,function(e,n){t.hasAttribute(n)||t.setAttribute(n,e)}),(0,S.default)(M("input"),r.input).split(" ").forEach(function(e){return t.classList.add(e)})}function d(e,t,n,r){var i=n.reset;t=y({cssClasses:{},template:i},t);var a={root:(0,S.default)(M("reset"),t.cssClasses.root)},o=g(t.template,{cssClasses:a}),s=v(o);e.parentNode.appendChild(s),s.addEventListener("click",function(e){e.preventDefault(),r()})}function h(e,t,n){var r=n.magnifier;t=y({cssClasses:{},template:r},t);var i={root:(0,S.default)(M("magnifier"),t.cssClasses.root)},a=g(t.template,{cssClasses:i}),o=v(a);e.parentNode.appendChild(o)}function m(e,t,n){t=y({cssClasses:{},template:n.poweredBy},t);var r={root:(0,S.default)(M("powered-by"),t.cssClasses.root),link:(0,S.default)(M("powered-by-link"),t.cssClasses.link)},i="https://www.algolia.com/?utm_source=instantsearch.js&utm_medium=website&utm_content="+location.hostname+"&utm_campaign=poweredby",a={cssClasses:r,url:i},o=t.template,s=g(o,a),u=v(s);e.parentNode.insertBefore(u,e.nextSibling)}function v(e){var t=document.createElement("div");return t.innerHTML="<span>"+e.trim()+"</span>",t.firstChild}function g(e,t){var n=void 0;if((0,R.default)(e)?n=O.default.compile(e).render(t):(0,x.default)(e)&&(n=e(t)),!(0,R.default)(n))throw new Error("Wrong template options for the SearchBox widget");return n}Object.defineProperty(t,"__esModule",{value:!0});var y=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};t.default=i;var b=n(12),_=r(b),w=n(21),R=r(w),P=n(14),x=r(P),j=n(3),S=r(j),C=n(200),O=r(C),E=n(195),F=r(E),N=n(440),k=r(N),T=n(1),M=(0,T.bemHelper)("ais-search-box"),A=function(e){var t=e.containerNode,n=e.cssClasses,r=e.placeholder,i=e.poweredBy,v=e.templates,g=e.autofocus,y=e.searchOnEnterKeyPressOnly,b=e.wrapInput,_=e.reset,w=e.magnifier;return function(e,R){var P=e.refine,x=e.clear,j=e.query,S=e.onHistoryChange;if(R){var C=window.addEventListener?"input":"propertychange",O=a(t);if(O===t){var E=document.createElement("div");O.parentNode.insertBefore(E,O);var F=O.parentNode,N=b?s(O,n):O;F.replaceChild(N,E)}else{var k=b?s(O,n):O;t.appendChild(k)}w&&h(O,w,v),_&&d(O,_,v,x),p(r,O,j,n),i&&m(O,i,v),window.addEventListener("pageshow",function(){O.value=j}),S(function(e){O.value=e.query||""}),(!0===g||"auto"===g&&""===j)&&(O.focus(),O.setSelectionRange(j.length,j.length)),y?(u(O,C,function(e){P(c(e),!1)}),u(O,"keyup",function(e){13===e.keyCode&&P(c(e))})):(u(O,C,f(P)),("propertychange"===C||window.attachEvent)&&u(O,"keyup",l(8,f(P))))}else{var T=o(t);document.activeElement===T||j===T.value||(T.value=j)}if(_){("INPUT"===t.tagName?t.parentNode:t).querySelector('button[type="reset"]').style.display=j&&j.trim()?"block":"none"}}},L="Usage:\nsearchBox({\n container,\n [ placeholder ],\n [ cssClasses.{input,poweredBy} ],\n [ poweredBy=false || poweredBy.{template, cssClasses.{root,link}} ],\n [ wrapInput ],\n [ autofocus ],\n [ searchOnEnterKeyPressOnly ],\n [ queryHook ]\n [ reset=true || reset.{template, cssClasses.{root}} ]\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={poweredBy:'\n<div class="{{cssClasses.root}}">\n Search by\n <a class="{{cssClasses.link}}" href="{{url}}" target="_blank">Algolia</a>\n</div>',reset:'\n<button type="reset" title="Clear the search query." class="{{cssClasses.root}}">\n <svg\n xmlns="http://www.w3.org/2000/svg"\n viewBox="0 0 20 20" width="100%"\n height="100%"\n >\n <path\n d="M8.114 10L.944 2.83 0 1.885 1.886 0l.943.943L10 8.113l7.17-7.17.944-.943L20 1.886l-.943.943-7.17 7.17 7.17 7.17.943.944L18.114 20l-.943-.943-7.17-7.17-7.17 7.17-.944.943L0 18.114l.943-.943L8.113 10z"\n fill-rule="evenodd">\n </path>\n </svg>\n</button>\n ',magnifier:'\n<div class="{{cssClasses.root}}">\n <svg\n xmlns="http://www.w3.org/2000/svg" id="sbx-icon-search-13"\n viewBox="0 0 40 40"\n width="100%"\n height="100%"\n >\n <path\n d="M26.804 29.01c-2.832 2.34-6.465 3.746-10.426 3.746C7.333 32.756 0 25.424 0 16.378 0 7.333 7.333 0 16.378 0c9.046 0 16.378 7.333 16.378 16.378 0 3.96-1.406 7.594-3.746 10.426l10.534 10.534c.607.607.61 1.59-.004 2.202-.61.61-1.597.61-2.202.004L26.804 29.01zm-10.426.627c7.323 0 13.26-5.936 13.26-13.26 0-7.32-5.937-13.257-13.26-13.257C9.056 3.12 3.12 9.056 3.12 16.378c0 7.323 5.936 13.26 13.258 13.26z"\n fill-rule="evenodd">\n </path>\n </svg>\n</div>\n '}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.min,i=e.max,a=e.templates,o=void 0===a?v:a,s=e.cssClasses,u=void 0===s?{}:s,c=e.step,f=void 0===c?1:c,p=e.pips,d=void 0===p||p,_=e.precision,w=void 0===_?2:_,R=e.tooltips,P=void 0===R||R,x=e.autoHideContainer,j=void 0===x||x;if(!t)throw new Error(b);var S=(0,m.getContainerNode)(t),C={root:(0,l.default)(g(null),u.root),header:(0,l.default)(g("header"),u.header),body:(0,l.default)(g("body"),u.body),footer:(0,l.default)(g("footer"),u.footer)},O=y({containerNode:S,step:f,pips:d,tooltips:P,renderState:{},templates:o,autoHideContainer:j,cssClasses:C});try{return(0,h.default)(O)({attributeName:n,min:r,max:i,precision:w})}catch(e){throw new Error(b)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(442),p=r(f),d=n(193),h=r(d),m=n(1),v={header:"",footer:""},g=(0,m.bemHelper)("ais-range-slider"),y=function(e){var t=e.containerNode,n=e.cssClasses,r=e.pips,i=e.step,a=e.tooltips,s=e.autoHideContainer,c=e.collapsible,l=e.renderState,f=e.templates;return function(e,d){var h=e.refine,g=e.range,y=g.min,b=g.max,_=e.start,w=e.instantSearchInstance;if(d)return void(l.templateProps=(0,m.prepareTemplateProps)({defaultTemplates:v,templatesConfig:w.templatesConfig,templates:f}));var R=s&&y===b,P=_[0]===-1/0?y:_[0],x=_[1]===1/0?b:_[1];u.default.render(o.default.createElement(p.default,{cssClasses:n,refine:h,min:y,max:b,values:[P,x],tooltips:a,step:i,pips:r,shouldAutoHideContainer:R,collapsible:c,templateProps:l.templateProps}),t)}},b="Usage:\nrangeSlider({\n container,\n attributeName,\n [ min ],\n [ max ],\n [ pips = true ],\n [ step = 1 ],\n [ precision = 2 ],\n [ tooltips=true ],\n [ templates.{header, footer} ],\n [ cssClasses.{root, header, body, footer} ],\n [ autoHideContainer=true ],\n [ collapsible=false ],\n});\n"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}Object.defineProperty(t,"__esModule",{value:!0});var u=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},c=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=n(443),f=r(l),p=n(205),d=r(p),h=n(203),m=r(h),v=n(4),g=(r(v),n(0)),y=r(g),b=n(444),_=r(b),w=n(3),R=r(w),P=n(447),x=r(P),j=n(27),S=r(j),C=n(28),O=r(C),E=function(e){function t(){var e,n,r,i;a(this,t);for(var s=arguments.length,c=Array(s),l=0;l<s;l++)c[l]=arguments[l];return n=r=o(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),r.handleChange=function(e){var t=e.min,n=e.max,i=e.values;if(!r.isDisabled){(0,r.props.refine)([t===i[0]?void 0:i[0],n===i[1]?void 0:i[1]])}},r.createHandleComponent=function(e){return function(t){var n=Math.round(100*parseFloat(t["aria-valuenow"]))/100,r=(0,m.default)(e,"format")?e.format(n):n,i=(0,R.default)("ais-range-slider--handle",t.className,{"ais-range-slider--handle-lower":0===t["data-handle-key"],"ais-range-slider--handle-upper":1===t["data-handle-key"]});return y.default.createElement("div",u({},t,{className:i}),e?y.default.createElement("div",{className:"ais-range-slider--tooltip"},r):null)}},i=n,o(r,i)}return s(t,e),c(t,[{key:"computeDefaultPitPoints",value:function(e){var t=e.min,n=e.max,r=n-t,a=r/34;return[t].concat(i((0,f.default)(33,function(e){return t+a*(e+1)})),[n]).map(function(e){return 0===e?1e-6:e})}},{key:"computeSnapPoints",value:function(e){var t=e.min,n=e.max,r=e.step;return[].concat(i((0,d.default)(t,n,r)),[n])}},{key:"render",value:function(){var e=this.props,t=e.tooltips,n=e.step,r=e.pips,i=e.values,a=this.isDisabled?{min:this.props.min,max:this.props.max+.001}:this.props,o=a.min,s=a.max,u=this.computeSnapPoints({min:o,max:s,step:n}),c=!0===r||void 0===r||!1===r?this.computeDefaultPitPoints({min:o,max:s}):r;return y.default.createElement("div",{className:this.isDisabled?"ais-range-slider--disabled":""},y.default.createElement(_.default,{handle:this.createHandleComponent(t),onChange:this.handleChange,min:o,max:s,pitComponent:x.default,pitPoints:c,snap:!0,snapPoints:u,values:this.isDisabled?[o,s]:i,disabled:this.isDisabled}))}},{key:"isDisabled",get:function(){return this.props.min===this.props.max}}]),t}(g.Component);t.default=(0,S.default)((0,O.default)(E))},function(e,t,n){function r(e,t){if((e=o(e))<1||e>s)return[];var n=u,r=c(e,u);t=a(t),e-=u;for(var l=i(r,t);++n<e;)t(n);return l}var i=n(112),a=n(86),o=n(33),s=9007199254740991,u=4294967295,c=Math.min;e.exports=r},function(e,t,n){function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 s(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)}function u(e){return["rheostat","vertical"===e.orientation?"rheostat-vertical":"rheostat-horizontal"].concat(e.className.split(" ")).join(" ")}function c(e){return Number(e.currentTarget.getAttribute("data-handle-key"))}function l(e){e.stopPropagation(),e.preventDefault()}Object.defineProperty(t,"__esModule",{value:!0});var f=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},p=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),d=n(0),h=r(d),m=n(4),v=r(m),g=n(445),y=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}(g),b=n(446),_=r(b),w=Object.prototype.hasOwnProperty,R=v.default.arrayOf(v.default.number),P=v.default.oneOfType([v.default.func,v.default.string]),x=function(e){function t(){return a(this,t),o(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return s(t,e),p(t,[{key:"render",value:function(){function e(){return h.default.createElement("button",f({},this.props,{type:"button"}))}return e}()}]),t}(h.default.Component),j={algorithm:v.default.shape({getValue:v.default.func,getPosition:v.default.func}),children:v.default.any,className:v.default.string,disabled:v.default.bool,handle:P,max:v.default.number,min:v.default.number,onClick:v.default.func,onChange:v.default.func,onKeyPress:v.default.func,onSliderDragEnd:v.default.func,onSliderDragMove:v.default.func,onSliderDragStart:v.default.func,onValuesUpdated:v.default.func,orientation:v.default.oneOf(["horizontal","vertical"]),pitComponent:P,pitPoints:R,progressBar:P,snap:v.default.bool,snapPoints:R,values:R},S={algorithm:_.default,className:"",disabled:!1,handle:x,max:y.PERCENT_FULL,min:y.PERCENT_EMPTY,orientation:"horizontal",pitPoints:[],progressBar:"div",snap:!1,snapPoints:[],values:[y.PERCENT_EMPTY]},C=function(e){function t(e){a(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e)),r=n.props,i=r.max,s=r.min,c=r.values;return n.state={className:u(n.props),handlePos:c.map(function(e){return n.props.algorithm.getPosition(e,s,i)}),handleDimensions:0,mousePos:null,sliderBox:{},slidingIndex:null,values:c},n.getPublicState=n.getPublicState.bind(n),n.getSliderBoundingBox=n.getSliderBoundingBox.bind(n),n.getProgressStyle=n.getProgressStyle.bind(n),n.getMinValue=n.getMinValue.bind(n),n.getMaxValue=n.getMaxValue.bind(n),n.getHandleDimensions=n.getHandleDimensions.bind(n),n.getClosestSnapPoint=n.getClosestSnapPoint.bind(n),n.getSnapPosition=n.getSnapPosition.bind(n),n.getNextPositionForKey=n.getNextPositionForKey.bind(n),n.getNextState=n.getNextState.bind(n),n.handleClick=n.handleClick.bind(n),n.getClosestHandle=n.getClosestHandle.bind(n),n.setStartSlide=n.setStartSlide.bind(n),n.startMouseSlide=n.startMouseSlide.bind(n),n.startTouchSlide=n.startTouchSlide.bind(n),n.handleMouseSlide=n.handleMouseSlide.bind(n),n.handleTouchSlide=n.handleTouchSlide.bind(n),n.handleSlide=n.handleSlide.bind(n),n.endSlide=n.endSlide.bind(n),n.handleKeydown=n.handleKeydown.bind(n),n.validatePosition=n.validatePosition.bind(n),n.validateValues=n.validateValues.bind(n),n.canMove=n.canMove.bind(n),n.fireChangeEvent=n.fireChangeEvent.bind(n),n.slideTo=n.slideTo.bind(n),n.updateNewValues=n.updateNewValues.bind(n),n}return s(t,e),p(t,[{key:"componentWillReceiveProps",value:function(){function e(e){var t=e.min!==this.props.min||e.max!==this.props.max,n=this.state.values.length!==e.values.length||this.state.values.some(function(t,n){return e.values[n]!==t}),r=e.className!==this.props.className||e.orientation!==this.props.orientation,i=e.disabled&&!this.props.disabled;r&&this.setState({className:u(e)}),(t||n)&&this.updateNewValues(e),i&&null!==this.state.slidingIndex&&this.endSlide()}return e}()},{key:"getPublicState",value:function(){function e(){return{max:this.props.max,min:this.props.min,values:this.state.values}}return e}()},{key:"getSliderBoundingBox",value:function(){function e(){var e=this.refs.rheostat,t=e.getDOMNode?e.getDOMNode():e,n=t.getBoundingClientRect();return{height:n.height||t.clientHeight,left:n.left,top:n.top,width:n.width||t.clientWidth}}return e}()},{key:"getProgressStyle",value:function(){function e(e){var t=this.state.handlePos,n=t[e];if(0===e)return"vertical"===this.props.orientation?{height:String(n)+"%",top:0}:{left:0,width:String(n)+"%"};var r=t[e-1],i=n-r;return"vertical"===this.props.orientation?{height:i+"%",top:String(r)+"%"}:{left:String(r)+"%",width:i+"%"}}return e}()},{key:"getMinValue",value:function(){function e(e){return this.state.values[e-1]?Math.max(this.props.min,this.state.values[e-1]):this.props.min}return e}()},{key:"getMaxValue",value:function(){function e(e){return this.state.values[e+1]?Math.min(this.props.max,this.state.values[e+1]):this.props.max}return e}()},{key:"getHandleDimensions",value:function(){function e(e,t){var n=e.currentTarget||null;return n?"vertical"===this.props.orientation?n.clientHeight/t.height*y.PERCENT_FULL/2:n.clientWidth/t.width*y.PERCENT_FULL/2:0}return e}()},{key:"getClosestSnapPoint",value:function(){function e(e){return this.props.snapPoints.length?this.props.snapPoints.reduce(function(t,n){return Math.abs(t-e)<Math.abs(n-e)?t:n}):e}return e}()},{key:"getSnapPosition",value:function(){function e(e){if(!this.props.snap)return e;var t=this.props,n=t.algorithm,r=t.max,i=t.min,a=n.getValue(e,i,r),o=this.getClosestSnapPoint(a);return n.getPosition(o,i,r)}return e}()},{key:"getNextPositionForKey",value:function(){function e(e,t){var n,r=this.state,a=r.handlePos,o=r.values,s=this.props,u=s.algorithm,c=s.max,l=s.min,f=s.snapPoints,p=this.props.snap,d=o[e],h=a[e],m=h,v=1;c>=100?h=Math.round(h):v=100/(c-l);var g=null;p&&(g=f.indexOf(this.getClosestSnapPoint(o[e])));var b=(n={},i(n,y.KEYS.LEFT,function(e){return-1*e}),i(n,y.KEYS.RIGHT,function(e){return 1*e}),i(n,y.KEYS.UP,function(e){return 1*e}),i(n,y.KEYS.DOWN,function(e){return-1*e}),i(n,y.KEYS.PAGE_DOWN,function(e){return e>1?-e:-10*e}),i(n,y.KEYS.PAGE_UP,function(e){return e>1?e:10*e}),n);if(w.call(b,t))h+=b[t](v),p&&(h>m?g<f.length-1&&(d=f[g+1]):g>0&&(d=f[g-1]));else if(t===y.KEYS.HOME)h=y.PERCENT_EMPTY,p&&(d=f[0]);else{if(t!==y.KEYS.END)return null;h=y.PERCENT_FULL,p&&(d=f[f.length-1])}return p?u.getPosition(d,l,c):h}return e}()},{key:"getNextState",value:function(){function e(e,t){var n=this,r=this.state.handlePos,i=this.props,a=i.max,o=i.min,s=this.validatePosition(e,t),u=r.map(function(t,n){return n===e?s:t});return{handlePos:u,values:u.map(function(e){return n.props.algorithm.getValue(e,o,a)})}}return e}()},{key:"getClosestHandle",value:function(){function e(e){var t=this.state.handlePos;return t.reduce(function(n,r,i){return Math.abs(t[i]-e)<Math.abs(t[n]-e)?i:n},0)}return e}()},{key:"setStartSlide",value:function(){function e(e,t,n){var r=this.getSliderBoundingBox();this.setState({handleDimensions:this.getHandleDimensions(e,r),mousePos:{x:t,y:n},sliderBox:r,slidingIndex:c(e)})}return e}()},{key:"startMouseSlide",value:function(){function e(e){this.setStartSlide(e,e.clientX,e.clientY),"function"===typeof document.addEventListener?(document.addEventListener("mousemove",this.handleMouseSlide,!1),document.addEventListener("mouseup",this.endSlide,!1)):(document.attachEvent("onmousemove",this.handleMouseSlide),document.attachEvent("onmouseup",this.endSlide)),l(e)}return e}()},{key:"startTouchSlide",value:function(){function e(e){if(!(e.changedTouches.length>1)){var t=e.changedTouches[0];this.setStartSlide(e,t.clientX,t.clientY),document.addEventListener("touchmove",this.handleTouchSlide,!1),document.addEventListener("touchend",this.endSlide,!1),this.props.onSliderDragStart&&this.props.onSliderDragStart(),l(e)}}return e}()},{key:"handleMouseSlide",value:function(){function e(e){null!==this.state.slidingIndex&&(this.handleSlide(e.clientX,e.clientY),l(e))}return e}()},{key:"handleTouchSlide",value:function(){function e(e){if(null!==this.state.slidingIndex){if(e.changedTouches.length>1)return void this.endSlide();var t=e.changedTouches[0];this.handleSlide(t.clientX,t.clientY),l(e)}}return e}()},{key:"handleSlide",value:function(){function e(e,t){var n=this.state,r=n.slidingIndex,i=n.sliderBox,a="vertical"===this.props.orientation?(t-i.top)/i.height*y.PERCENT_FULL:(e-i.left)/i.width*y.PERCENT_FULL;this.slideTo(r,a),this.canMove(r,a)&&(this.setState({x:e,y:t}),this.props.onSliderDragMove&&this.props.onSliderDragMove())}return e}()},{key:"endSlide",value:function(){function e(){var e=this,t=this.state.slidingIndex;if(this.setState({slidingIndex:null}),"function"===typeof document.removeEventListener?(document.removeEventListener("mouseup",this.endSlide,!1),document.removeEventListener("touchend",this.endSlide,!1),document.removeEventListener("touchmove",this.handleTouchSlide,!1),document.removeEventListener("mousemove",this.handleMouseSlide,!1)):(document.detachEvent("onmousemove",this.handleMouseSlide),document.detachEvent("onmouseup",this.endSlide)),this.props.onSliderDragEnd&&this.props.onSliderDragEnd(),this.props.snap){var n=this.getSnapPosition(this.state.handlePos[t]);this.slideTo(t,n,function(){return e.fireChangeEvent()})}else this.fireChangeEvent()}return e}()},{key:"handleClick",value:function(){function e(e){var t=this;if(!e.target.getAttribute("data-handle-key")){var n=this.getSliderBoundingBox(),r="vertical"===this.props.orientation?(e.clientY-n.top)/n.height:(e.clientX-n.left)/n.width,i=r*y.PERCENT_FULL,a=this.getClosestHandle(i),o=this.getSnapPosition(i);this.slideTo(a,o,function(){return t.fireChangeEvent()}),this.props.onClick&&this.props.onClick()}}return e}()},{key:"handleKeydown",value:function(){function e(e){var t=this,n=c(e);if(e.keyCode===y.KEYS.ESC)return void e.currentTarget.blur();var r=this.getNextPositionForKey(n,e.keyCode);null!==r&&(this.canMove(n,r)&&(this.slideTo(n,r,function(){return t.fireChangeEvent()}),this.props.onKeyPress&&this.props.onKeyPress()),l(e))}return e}()},{key:"validatePosition",value:function(){function e(e,t){var n=this.state,r=n.handlePos,i=n.handleDimensions;return Math.max(Math.min(t,void 0!==r[e+1]?r[e+1]-i:y.PERCENT_FULL),void 0!==r[e-1]?r[e-1]+i:y.PERCENT_EMPTY)}return e}()},{key:"validateValues",value:function(){function e(e,t){var n=t||this.props,r=n.max,i=n.min;return e.map(function(e,t,n){var a=Math.max(Math.min(e,r),i);return n.length&&a<n[t-1]?n[t-1]:a})}return e}()},{key:"canMove",value:function(){function e(e,t){var n=this.state,r=n.handlePos,i=n.handleDimensions;return!(t<y.PERCENT_EMPTY)&&(!(t>y.PERCENT_FULL)&&(!(t>(void 0!==r[e+1]?r[e+1]-i:1/0))&&!(t<(void 0!==r[e-1]?r[e-1]+i:-1/0))))}return e}()},{key:"fireChangeEvent",value:function(){function e(){this.props.onChange&&this.props.onChange(this.getPublicState())}return e}()},{key:"slideTo",value:function(){function e(e,t,n){var r=this,i=this.getNextState(e,t);this.setState(i,function(){r.props.onValuesUpdated&&r.props.onValuesUpdated(r.getPublicState()),n&&n()})}return e}()},{key:"updateNewValues",value:function(){function e(e){var t=this;if(null===this.state.slidingIndex){var n=e.max,r=e.min,i=e.values,a=this.validateValues(i,e);this.setState({handlePos:a.map(function(e){return t.props.algorithm.getPosition(e,r,n)}),values:a},function(){return t.fireChangeEvent()})}}return e}()},{key:"render",value:function(){function e(){var e=this,t=this.props,n=t.algorithm,r=t.children,i=t.disabled,a=t.handle,o=t.max,s=t.min,u=t.orientation,c=t.pitComponent,l=t.pitPoints,f=t.progressBar;return h.default.createElement("div",{className:this.state.className,ref:"rheostat",onClick:!i&&this.handleClick,style:{position:"relative"}},h.default.createElement("div",{className:"rheostat-background"}),this.state.handlePos.map(function(t,n){var r="vertical"===u?{top:String(t)+"%",position:"absolute"}:{left:String(t)+"%",position:"absolute"};return h.default.createElement(a,{"aria-valuemax":e.getMaxValue(n),"aria-valuemin":e.getMinValue(n),"aria-valuenow":e.state.values[n],"aria-disabled":i,"data-handle-key":n,className:"rheostat-handle",key:n,onClick:e.killEvent,onKeyDown:!i&&e.handleKeydown,onMouseDown:!i&&e.startMouseSlide,onTouchStart:!i&&e.startTouchSlide,role:"slider",style:r,tabIndex:0})}),this.state.handlePos.map(function(t,n,r){return 0===n&&r.length>1?null:h.default.createElement(f,{className:"rheostat-progress",key:n,style:e.getProgressStyle(n)})}),c&&l.map(function(e){var t=n.getPosition(e,s,o),r="vertical"===u?{top:String(t)+"%",position:"absolute"}:{left:String(t)+"%",position:"absolute"};return h.default.createElement(c,{key:e,style:r},e)}),r)}return e}()}]),t}(h.default.Component);C.propTypes=j,C.defaultProps=S,t.default=C},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});t.KEYS={DOWN:40,END:35,ESC:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,UP:38},t.PERCENT_EMPTY=0,t.PERCENT_FULL=100},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default={getPosition:function(){function e(e,t,n){return(e-t)/(n-t)*100}return e}(),getValue:function(){function e(e,t,n){var r=e/100;return 0===e?t:100===e?n:Math.round((n-t)*r+t)}return e}()}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var i=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},a=n(4),o=(r(a),n(0)),s=r(o),u=n(3),c=r(u),l=n(101),f=r(l),p=function(e){var t=e.style,n=e.children,r=Math.round(parseFloat(t.left)),a=(0,f.default)([0,50,100],r);return s.default.createElement("div",{style:i({},t,{marginLeft:100===r?"-2px":0}),className:(0,c.default)("ais-range-slider--marker ais-range-slider--marker-horizontal",{"ais-range-slider--marker-large":a})},a?s.default.createElement("div",{className:"ais-range-slider--value"},Math.round(100*n)/100):null)};t.default=p},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.indices,r=e.cssClasses,i=void 0===r?{}:r,a=e.autoHideContainer,o=void 0!==a&&a;if(!t)throw new Error(y);var s=(0,m.getContainerNode)(t),u={root:(0,l.default)(v(null),i.root),item:(0,l.default)(v("item"),i.item)},c=g({containerNode:s,cssClasses:u,autoHideContainer:o});try{return(0,h.default)(c)({indices:n})}catch(e){throw new Error(y)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(110),p=r(f),d=n(196),h=r(d),m=n(1),v=(0,m.bemHelper)("ais-sort-by-selector"),g=function(e){var t=e.containerNode,n=e.cssClasses,r=e.autoHideContainer;return function(e,i){var a=e.currentRefinement,s=e.options,c=e.refine,l=e.hasNoResults;if(!i){var f=r&&l;u.default.render(o.default.createElement(p.default,{cssClasses:n,currentValue:a,options:s,setValue:c,shouldAutoHideContainer:f}),t)}}},y="Usage:\nsortBySelector({\n container,\n indices,\n [cssClasses.{root,item}={}],\n [autoHideContainer=false]\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.max,i=void 0===r?5:r,a=e.cssClasses,o=void 0===a?{}:a,s=e.labels,u=void 0===s?b.default:s,c=e.templates,l=void 0===c?g.default:c,p=e.collapsible,d=void 0!==p&&p,h=e.transformData,v=e.autoHideContainer,y=void 0===v||v;if(!t)throw new Error(P);var x=(0,_.getContainerNode)(t),j={root:(0,f.default)(w(null),o.root),header:(0,f.default)(w("header"),o.header),body:(0,f.default)(w("body"),o.body),footer:(0,f.default)(w("footer"),o.footer),list:(0,f.default)(w("list"),o.list),item:(0,f.default)(w("item"),o.item),link:(0,f.default)(w("link"),o.link),disabledLink:(0,f.default)(w("link","disabled"),o.disabledLink),count:(0,f.default)(w("count"),o.count),star:(0,f.default)(w("star"),o.star),emptyStar:(0,f.default)(w("star","empty"),o.emptyStar),active:(0,f.default)(w("item","active"),o.active)},S=R({containerNode:x,cssClasses:j,collapsible:d,autoHideContainer:y,renderState:{},templates:l,transformData:h,labels:u});try{return(0,m.default)(S)({attributeName:n,max:i})}catch(e){throw new Error(P)}}Object.defineProperty(t,"__esModule",{value:!0});var a=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};t.default=i;var o=n(0),s=r(o),u=n(0),c=r(u),l=n(3),f=r(l),p=n(36),d=r(p),h=n(197),m=r(h),v=n(450),g=r(v),y=n(451),b=r(y),_=n(1),w=(0,_.bemHelper)("ais-star-rating"),R=function(e){var t=e.containerNode,n=e.cssClasses,r=e.templates,i=e.collapsible,o=e.transformData,u=e.autoHideContainer,l=e.renderState,f=e.labels;return function(e,p){var h=e.refine,m=e.items,v=e.createURL,y=e.instantSearchInstance,b=e.hasNoResults;if(p)return void(l.templateProps=(0,_.prepareTemplateProps)({transformData:o,defaultTemplates:g.default,templatesConfig:y.templatesConfig,templates:r}));var w=u&&b;c.default.render(s.default.createElement(d.default,{collapsible:i,createURL:v,cssClasses:n,facetValues:m.map(function(e){return a({},e,{labels:f})}),shouldAutoHideContainer:w,templateProps:l.templateProps,toggleRefinement:h}),t)}},P="Usage:\nstarRating({\n container,\n attributeName,\n [ max=5 ],\n [ cssClasses.{root,header,body,footer,list,item,active,link,disabledLink,star,emptyStar,count} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ labels.{andUp} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<a class="{{cssClasses.link}}{{^count}} {{cssClasses.disabledLink}}{{/count}}" {{#count}}href="{{href}}"{{/count}}>\n {{#stars}}<span class="{{#.}}{{cssClasses.star}}{{/.}}{{^.}}{{cssClasses.emptyStar}}{{/.}}"></span>{{/stars}}\n {{labels.andUp}}\n {{#count}}<span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>{{/count}}\n</a>',footer:""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={andUp:"& Up"}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.cssClasses,r=void 0===n?{}:n,i=e.autoHideContainer,a=void 0===i||i,o=e.collapsible,s=void 0!==o&&o,u=e.transformData,c=e.templates,f=void 0===c?v.default:c;if(!t)throw new Error(_);var p=(0,g.getContainerNode)(t),d={body:(0,l.default)(y("body"),r.body),footer:(0,l.default)(y("footer"),r.footer),header:(0,l.default)(y("header"),r.header),root:(0,l.default)(y(null),r.root),time:(0,l.default)(y("time"),r.time)},m=b({containerNode:p,cssClasses:d,collapsible:s,autoHideContainer:a,renderState:{},templates:f,transformData:u});try{return(0,h.default)(m)()}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(453),p=r(f),d=n(198),h=r(d),m=n(454),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-stats"),b=function(e){var t=e.containerNode,n=e.cssClasses,r=e.collapsible,i=e.autoHideContainer,a=e.renderState,s=e.templates,c=e.transformData;return function(e,l){var f=e.hitsPerPage,d=e.nbHits,h=e.nbPages,m=e.page,y=e.processingTimeMS,b=e.query,_=e.instantSearchInstance;if(l)return void(a.templateProps=(0,g.prepareTemplateProps)({transformData:c,defaultTemplates:v.default,templatesConfig:_.templatesConfig,templates:s}));var w=i&&0===d;u.default.render(o.default.createElement(p.default,{collapsible:r,cssClasses:n,hitsPerPage:f,nbHits:d,nbPages:h,page:m,processingTimeMS:y,query:b,shouldAutoHideContainer:w,templateProps:a.templateProps}),t)}},_="Usage:\nstats({\n container,\n [ templates.{header, body, footer} ],\n [ transformData.{body} ],\n [ autoHideContainer=true ],\n [ cssClasses.{root, header, body, footer, time} ],\n})"},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 o(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)}Object.defineProperty(t,"__esModule",{value:!0}),t.RawStats=void 0;var s=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},u=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(4),l=(r(c),n(0)),f=r(l),p=n(22),d=r(p),h=n(27),m=r(h),v=n(28),g=r(v),y=t.RawStats=function(e){function t(){return i(this,t),a(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return o(t,e),u(t,[{key:"shouldComponentUpdate",value:function(e){return this.props.nbHits!==e.hits||this.props.processingTimeMS!==e.processingTimeMS}},{key:"render",value:function(){var e={hasManyResults:this.props.nbHits>1,hasNoResults:0===this.props.nbHits,hasOneResult:1===this.props.nbHits,hitsPerPage:this.props.hitsPerPage,nbHits:this.props.nbHits,nbPages:this.props.nbPages,page:this.props.page,processingTimeMS:this.props.processingTimeMS,query:this.props.query,cssClasses:this.props.cssClasses};return f.default.createElement(d.default,s({data:e,templateKey:"body"},this.props.templateProps))}}]),t}(f.default.Component);t.default=(0,m.default)((0,g.default)(y))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",body:'{{#hasNoResults}}No results{{/hasNoResults}}\n {{#hasOneResult}}1 result{{/hasOneResult}}\n {{#hasManyResults}}{{#helpers.formatNumber}}{{nbHits}}{{/helpers.formatNumber}} results{{/hasManyResults}}\n <span class="{{cssClasses.time}}">found in {{processingTimeMS}}ms</span>',footer:""}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container,n=e.attributeName,r=e.label,i=e.cssClasses,a=void 0===i?{}:i,o=e.templates,s=void 0===o?p.default:o,u=e.transformData,c=e.autoHideContainer,f=void 0===c||c,d=e.collapsible,h=void 0!==d&&d,m=e.values,w=void 0===m?{on:!0,off:void 0}:m;if(!t)throw new Error(_);var R=(0,g.getContainerNode)(t),P={root:(0,l.default)(y(null),a.root),header:(0,l.default)(y("header"),a.header),body:(0,l.default)(y("body"),a.body),footer:(0,l.default)(y("footer"),a.footer),list:(0,l.default)(y("list"),a.list),item:(0,l.default)(y("item"),a.item),active:(0,l.default)(y("item","active"),a.active),label:(0,l.default)(y("label"),a.label),checkbox:(0,l.default)(y("checkbox"),a.checkbox),count:(0,l.default)(y("count"),a.count)},x=b({containerNode:R,cssClasses:P,collapsible:h,autoHideContainer:f,renderState:{},templates:s,transformData:u});try{return(0,v.default)(x)({attributeName:n,label:r,values:w})}catch(e){throw new Error(_)}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var a=n(0),o=r(a),s=n(0),u=r(s),c=n(3),l=r(c),f=n(456),p=r(f),d=n(36),h=r(d),m=n(199),v=r(m),g=n(1),y=(0,g.bemHelper)("ais-toggle"),b=function(e){var t=e.containerNode,n=e.cssClasses,r=e.collapsible,i=e.autoHideContainer,a=e.renderState,s=e.templates,c=e.transformData;return function(e,l){var f=e.value,d=e.createURL,m=e.refine,v=e.instantSearchInstance;if(l)return void(a.templateProps=(0,g.prepareTemplateProps)({transformData:c,defaultTemplates:p.default,templatesConfig:v.templatesConfig,templates:s}));var y=i&&(0===f.count||null===f.count);u.default.render(o.default.createElement(h.default,{collapsible:r,createURL:d,cssClasses:n,facetValues:[f],shouldAutoHideContainer:y,templateProps:a.templateProps,toggleRefinement:function(e,t){return m({isRefined:t})}}),t)}},_="Usage:\ntoggle({\n container,\n attributeName,\n label,\n [ values={on: true, off: undefined} ],\n [ cssClasses.{root,header,body,footer,list,item,active,label,checkbox,count} ],\n [ templates.{header,item,footer} ],\n [ transformData.{item} ],\n [ autoHideContainer=true ],\n [ collapsible=false ]\n})"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default={header:"",item:'<label class="{{cssClasses.label}}">\n <input type="checkbox" class="{{cssClasses.checkbox}}" value="{{name}}" {{#isRefined}}checked{{/isRefined}} />{{name}}\n <span class="{{cssClasses.count}}">{{#helpers.formatNumber}}{{count}}{{/helpers.formatNumber}}</span>\n</label>',footer:""}},function(e,t,n){"use strict";function r(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.pushFunction,n=e.delay,r=void 0===n?3e3:n,a=e.triggerOnUIInteraction,o=void 0!==a&&a,s=e.pushInitialSearch,u=void 0===s||s;if(!t)throw new Error(i);var c=null,l=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n].join("+");t.push(encodeURIComponent(n)+"="+encodeURIComponent(n)+"_"+encodeURIComponent(r))}return t.join("&")},f=function(e){var t=[];for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(r.hasOwnProperty(">=")&&r.hasOwnProperty("<="))r[">="][0]===r["<="][0]?t.push(n+"="+n+"_"+r[">="]):t.push(n+"="+n+"_"+r[">="]+"to"+r["<="]);else if(r.hasOwnProperty(">="))t.push(n+"="+n+"_from"+r[">="]);else if(r.hasOwnProperty("<="))t.push(n+"="+n+"_to"+r["<="]);else if(r.hasOwnProperty("=")){var i=[];for(var a in r["="])r["="].hasOwnProperty(a)&&i.push(r["="][a]);t.push(n+"="+n+"_"+i.join("-"))}}return t.join("&")},p="",d=function(e){if(null!==e){var n=[],r=l(Object.assign({},e.state.disjunctiveFacetsRefinements,e.state.facetsRefinements,e.state.hierarchicalFacetsRefinements)),i=f(e.state.numericRefinements);""!==r&&n.push(r),""!==i&&n.push(i),n=n.join("&");var a="Query: "+e.state.query+", "+n;p!==a&&(t(n,e.state,e.results),p=a)}},h=void 0,m=!0;return!0===u&&(m=!1),{init:function(){!0===o&&(document.addEventListener("click",function(){d(c)}),window.addEventListener("beforeunload",function(){d(c)}))},render:function(e){var t=e.results,n=e.state;if(!0===m)return void(m=!1);c={results:t,state:n},h&&clearTimeout(h),h=setTimeout(function(){return d(c)},r)}}}Object.defineProperty(t,"__esModule",{value:!0});var i="Usage:\nanalytics({\n pushFunction,\n [ delay=3000 ],\n [ triggerOnUIInteraction=false ],\n [ pushInitialSearch=true ]\n})";t.default=r}])}); //# sourceMappingURL=instantsearch.min.js.map
jonobr1/cdnjs
ajax/libs/instantsearch.js/2.1.0/instantsearch.min.js
JavaScript
mit
347,100
<?php /* * This file is part of the Sylius package. * * (c) Paweł Jędrzejewski * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Sylius\Behat\Page\Admin\Zone; use Behat\Mink\Element\NodeElement; use Behat\Mink\Exception\ElementNotFoundException; use Sylius\Behat\Behaviour\ChecksCodeImmutability; use Sylius\Behat\Behaviour\NamesIt; use Sylius\Behat\Page\Admin\Crud\UpdatePage as BaseUpdatePage; use Sylius\Component\Addressing\Model\ZoneMemberInterface; /** * @author Arkadiusz Krakowiak <arkadiusz.krakowiak@lakion.com> */ class UpdatePage extends BaseUpdatePage implements UpdatePageInterface { use NamesIt; use ChecksCodeImmutability; /** * {@inheritdoc} */ public function countMembers() { $selectedZoneMembers = $this->getSelectedZoneMembers(); return count($selectedZoneMembers); } /** * {@inheritdoc} */ public function getScope() { return $this->getElement('scope')->getValue(); } /** * {@inheritdoc} */ public function hasMember(ZoneMemberInterface $zoneMember) { $selectedZoneMembers = $this->getSelectedZoneMembers(); foreach ($selectedZoneMembers as $selectedZoneMember) { if ($selectedZoneMember->getValue() === $zoneMember->getCode()) { return true; } } return false; } /** * {@inheritdoc} */ public function removeMember(ZoneMemberInterface $zoneMember) { $zoneMembers = $this->getElement('zone_members'); $items = $zoneMembers->findAll('css', 'div[data-form-collection="item"]'); /** @var NodeElement $item */ foreach ($items as $item) { $selectedItem = $item->find('css', 'option[selected="selected"]'); if (null === $selectedItem) { throw new ElementNotFoundException($this->getDriver(), 'selected option', 'css', 'option[selected="selected"]'); } if ($selectedItem->getValue() === $zoneMember->getCode()) { $this->getDeleteButtonForCollectionItem($item)->click(); break; } } } /** * @return NodeElement * * @throws ElementNotFoundException */ protected function getCodeElement() { return $this->getElement('code'); } /** * {@inheritdoc} */ protected function getDefinedElements() { return array_merge(parent::getDefinedElements(), [ 'code' => '#sylius_zone_code', 'member' => '.one.field', 'name' => '#sylius_zone_name', 'scope' => '#sylius_zone_scope', 'type' => '#sylius_zone_type', 'zone_members' => '#sylius_zone_members', ]); } /** * @param NodeElement $item * * @return NodeElement * * @throws ElementNotFoundException */ private function getDeleteButtonForCollectionItem(NodeElement $item) { $deleteButton = $item->find('css', 'a[data-form-collection="delete"]'); if (null === $deleteButton) { throw new ElementNotFoundException($this->getDriver(), 'link', 'css', 'a[data-form-collection="delete"]'); } return $deleteButton; } /** * @return \Behat\Mink\Element\NodeElement[] * * @throws ElementNotFoundException */ private function getSelectedZoneMembers() { $zoneMembers = $this->getElement('zone_members'); $selectedZoneMembers = $zoneMembers->findAll('css', 'option[selected="selected"]'); return $selectedZoneMembers; } }
michalmarcinkowski/Sylius
src/Sylius/Behat/Page/Admin/Zone/UpdatePage.php
PHP
mit
3,739
//------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //------------------------------------------------------------ using System.Collections.Generic; using System.Collections.ObjectModel; using System.Globalization; using System.IdentityModel; using System.IdentityModel.Protocols.WSTrust; using System.IdentityModel.Selectors; using System.IdentityModel.Tokens; using System.ServiceModel.Description; using System.ServiceModel.Security.Tokens; using SR = System.ServiceModel.SR; namespace System.ServiceModel.Security { /// <summary> /// SecurityTokenManager that enables plugging custom tokens easily. /// The SecurityTokenManager provides methods to register custom token providers, /// serializers and authenticators. It can wrap another Token Managers and /// delegate token operation calls to it if required. /// </summary> /// <remarks> /// Framework use only - this is an implementation adapter class that is used to expose /// the Framework SecurityTokenHandlers to WCF. /// </remarks> sealed class FederatedSecurityTokenManager : ServiceCredentialsSecurityTokenManager { static string ListenUriProperty = "http://schemas.microsoft.com/ws/2006/05/servicemodel/securitytokenrequirement/ListenUri"; ExceptionMapper _exceptionMapper; SecurityTokenResolver _defaultTokenResolver; SecurityTokenHandlerCollection _securityTokenHandlerCollection; object _syncObject = new object(); ReadOnlyCollection<CookieTransform> _cookieTransforms; SessionSecurityTokenCache _tokenCache; /// <summary> /// Initializes an instance of <see cref="FederatedSecurityTokenManager"/>. /// </summary> /// <param name="parentCredentials">ServiceCredentials that created this instance of TokenManager.</param> /// <exception cref="ArgumentNullException">The argument 'parentCredentials' is null.</exception> public FederatedSecurityTokenManager( ServiceCredentials parentCredentials ) : base( parentCredentials ) { if ( parentCredentials == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "parentCredentials" ); } if ( parentCredentials.IdentityConfiguration == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "parentCredentials.IdentityConfiguration" ); } _exceptionMapper = parentCredentials.ExceptionMapper; _securityTokenHandlerCollection = parentCredentials.IdentityConfiguration.SecurityTokenHandlers; _tokenCache = _securityTokenHandlerCollection.Configuration.Caches.SessionSecurityTokenCache; _cookieTransforms = SessionSecurityTokenHandler.DefaultCookieTransforms; } /// <summary> /// Returns the list of SecurityTokenHandlers. /// </summary> public SecurityTokenHandlerCollection SecurityTokenHandlers { // // get { return _securityTokenHandlerCollection; } } /// <summary> /// Gets or sets the ExceptionMapper to be used when throwing exceptions. /// </summary> public ExceptionMapper ExceptionMapper { get { return _exceptionMapper; } set { if ( value == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "value" ); } _exceptionMapper = value; } } #region SecurityTokenManager Implementation /// <summary> /// Overriden from the base class. Creates the requested Token Authenticator. /// Looks up the list of Token Handlers registered with the token Manager /// based on the TokenType Uri in the SecurityTokenRequirement. If none is found, /// then the call is delegated to the inner Token Manager. /// </summary> /// <param name="tokenRequirement">Security Token Requirement for which the Authenticator should be created.</param> /// <param name="outOfBandTokenResolver">Token resolver that resolves any out-of-band tokens.</param> /// <returns>Instance of Security Token Authenticator.</returns> /// <exception cref="ArgumentNullException">'tokenRequirement' parameter is null.</exception> /// <exception cref="NotSupportedException">No Authenticator is registered for the given token type.</exception> public override SecurityTokenAuthenticator CreateSecurityTokenAuthenticator( SecurityTokenRequirement tokenRequirement, out SecurityTokenResolver outOfBandTokenResolver ) { if ( tokenRequirement == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "tokenRequirement" ); } outOfBandTokenResolver = null; // Check for a registered authenticator SecurityTokenAuthenticator securityTokenAuthenticator = null; string tokenType = tokenRequirement.TokenType; // // When the TokenRequirement.TokenType is null, we treat this as a SAML issued token case. It may be SAML 1.1 or SAML 2.0. // if ( String.IsNullOrEmpty( tokenType ) ) { return CreateSamlSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); } // // When the TokenType is set, build a token authenticator for the specified token type. // SecurityTokenHandler securityTokenHandler = _securityTokenHandlerCollection[tokenType]; if ( ( securityTokenHandler != null ) && ( securityTokenHandler.CanValidateToken ) ) { outOfBandTokenResolver = GetDefaultOutOfBandTokenResolver(); if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.UserName ) ) { UserNameSecurityTokenHandler upSecurityTokenHandler = securityTokenHandler as UserNameSecurityTokenHandler; if ( upSecurityTokenHandler == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new InvalidOperationException( SR.GetString( SR.ID4072, securityTokenHandler.GetType(), tokenType, typeof( UserNameSecurityTokenHandler ) ) ) ); } securityTokenAuthenticator = new WrappedUserNameSecurityTokenAuthenticator( upSecurityTokenHandler, _exceptionMapper ); } else if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.Kerberos ) ) { securityTokenAuthenticator = CreateInnerSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); } else if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.Rsa ) ) { RsaSecurityTokenHandler rsaSecurityTokenHandler = securityTokenHandler as RsaSecurityTokenHandler; if ( rsaSecurityTokenHandler == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new InvalidOperationException( SR.GetString( SR.ID4072, securityTokenHandler.GetType(), tokenType, typeof( RsaSecurityTokenHandler ) ) ) ); } securityTokenAuthenticator = new WrappedRsaSecurityTokenAuthenticator( rsaSecurityTokenHandler, _exceptionMapper ); } else if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.X509Certificate ) ) { X509SecurityTokenHandler x509SecurityTokenHandler = securityTokenHandler as X509SecurityTokenHandler; if ( x509SecurityTokenHandler == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new InvalidOperationException( SR.GetString( SR.ID4072, securityTokenHandler.GetType(), tokenType, typeof( X509SecurityTokenHandler ) ) ) ); } securityTokenAuthenticator = new WrappedX509SecurityTokenAuthenticator( x509SecurityTokenHandler, _exceptionMapper ); } else if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.SamlTokenProfile11 ) || StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.OasisWssSamlTokenProfile11 ) ) { SamlSecurityTokenHandler saml11SecurityTokenHandler = securityTokenHandler as SamlSecurityTokenHandler; if ( saml11SecurityTokenHandler == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new InvalidOperationException( SR.GetString( SR.ID4072, securityTokenHandler.GetType(), tokenType, typeof( SamlSecurityTokenHandler ) ) ) ); } if ( saml11SecurityTokenHandler.Configuration == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4274 ) ); } securityTokenAuthenticator = new WrappedSaml11SecurityTokenAuthenticator( saml11SecurityTokenHandler, _exceptionMapper ); // The out-of-band token resolver will be used by WCF to decrypt any encrypted SAML tokens. outOfBandTokenResolver = saml11SecurityTokenHandler.Configuration.ServiceTokenResolver; } else if ( StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.Saml2TokenProfile11 ) || StringComparer.Ordinal.Equals( tokenType, SecurityTokenTypes.OasisWssSaml2TokenProfile11 ) ) { Saml2SecurityTokenHandler saml2SecurityTokenHandler = securityTokenHandler as Saml2SecurityTokenHandler; if ( saml2SecurityTokenHandler == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperError( new InvalidOperationException( SR.GetString( SR.ID4072, securityTokenHandler.GetType(), tokenType, typeof( Saml2SecurityTokenHandler ) ) ) ); } if ( saml2SecurityTokenHandler.Configuration == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4274 ) ); } securityTokenAuthenticator = new WrappedSaml2SecurityTokenAuthenticator( saml2SecurityTokenHandler, _exceptionMapper ); // The out-of-band token resolver will be used by WCF to decrypt any encrypted SAML tokens. outOfBandTokenResolver = saml2SecurityTokenHandler.Configuration.ServiceTokenResolver; } else if ( StringComparer.Ordinal.Equals( tokenType, ServiceModelSecurityTokenTypes.SecureConversation ) ) { RecipientServiceModelSecurityTokenRequirement tr = tokenRequirement as RecipientServiceModelSecurityTokenRequirement; if ( tr == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4240, tokenRequirement.GetType().ToString() ) ); } securityTokenAuthenticator = SetupSecureConversationWrapper( tr, securityTokenHandler as SessionSecurityTokenHandler, out outOfBandTokenResolver ); } else { securityTokenAuthenticator = new SecurityTokenAuthenticatorAdapter( securityTokenHandler, _exceptionMapper ); } } else { if ( tokenType == ServiceModelSecurityTokenTypes.SecureConversation || tokenType == ServiceModelSecurityTokenTypes.MutualSslnego || tokenType == ServiceModelSecurityTokenTypes.AnonymousSslnego || tokenType == ServiceModelSecurityTokenTypes.SecurityContext || tokenType == ServiceModelSecurityTokenTypes.Spnego ) { RecipientServiceModelSecurityTokenRequirement tr = tokenRequirement as RecipientServiceModelSecurityTokenRequirement; if ( tr == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4240, tokenRequirement.GetType().ToString() ) ); } securityTokenAuthenticator = SetupSecureConversationWrapper( tr, null, out outOfBandTokenResolver ); } else { securityTokenAuthenticator = CreateInnerSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); } } return securityTokenAuthenticator; } /// <summary> /// Helper method to setup the WrappedSecureConversttion /// </summary> SecurityTokenAuthenticator SetupSecureConversationWrapper( RecipientServiceModelSecurityTokenRequirement tokenRequirement, SessionSecurityTokenHandler tokenHandler, out SecurityTokenResolver outOfBandTokenResolver ) { // This code requires Orcas SP1 to compile. // WCF expects this securityTokenAuthenticator to support: // 1. IIssuanceSecurityTokenAuthenticator // 2. ICommunicationObject is needed for this to work right. // WCF opens a listener in this STA that handles the nego and uses an internal class for negotiating the // the bootstrap tokens. We want to handle ValidateToken to return our authorization policies and surface the bootstrap tokens. // when sp1 is installed, use this one. //SecurityTokenAuthenticator sta = base.CreateSecureConversationTokenAuthenticator( tokenRequirement as RecipientServiceModelSecurityTokenRequirement, _saveBootstrapTokensInSession, out outOfBandTokenResolver ); // use this code if SP1 is not installed SecurityTokenAuthenticator sta = base.CreateSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); SessionSecurityTokenHandler sessionTokenHandler = tokenHandler; // // If there is no SCT handler here, create one. // if ( tokenHandler == null ) { sessionTokenHandler = new SessionSecurityTokenHandler( _cookieTransforms, SessionSecurityTokenHandler.DefaultTokenLifetime ); sessionTokenHandler.ContainingCollection = _securityTokenHandlerCollection; sessionTokenHandler.Configuration = _securityTokenHandlerCollection.Configuration; } if ( ServiceCredentials != null ) { sessionTokenHandler.Configuration.MaxClockSkew = ServiceCredentials.IdentityConfiguration.MaxClockSkew; } SctClaimsHandler claimsHandler = new SctClaimsHandler( _securityTokenHandlerCollection, GetNormalizedEndpointId( tokenRequirement ) ); WrappedSessionSecurityTokenAuthenticator wssta = new WrappedSessionSecurityTokenAuthenticator( sessionTokenHandler, sta, claimsHandler, _exceptionMapper ); WrappedTokenCache wrappedTokenCache = new WrappedTokenCache( _tokenCache, claimsHandler); SetWrappedTokenCache( wrappedTokenCache, sta, wssta, claimsHandler ); outOfBandTokenResolver = wrappedTokenCache; return wssta; } /// <summary> /// The purpose of this method is to set our WrappedTokenCache as the token cache for SCT's. /// And to set our OnIssuedToken callback when in cookie mode. /// We have to use reflection here as this is a private method. /// </summary> static void SetWrappedTokenCache( WrappedTokenCache wrappedTokenCache, SecurityTokenAuthenticator sta, WrappedSessionSecurityTokenAuthenticator wssta, SctClaimsHandler claimsHandler ) { if ( sta is SecuritySessionSecurityTokenAuthenticator ) { ( sta as SecuritySessionSecurityTokenAuthenticator ).IssuedTokenCache = wrappedTokenCache; } else if ( sta is AcceleratedTokenAuthenticator ) { ( sta as AcceleratedTokenAuthenticator ).IssuedTokenCache = wrappedTokenCache; } else if ( sta is SpnegoTokenAuthenticator ) { ( sta as SpnegoTokenAuthenticator ).IssuedTokenCache = wrappedTokenCache; } else if ( sta is TlsnegoTokenAuthenticator ) { ( sta as TlsnegoTokenAuthenticator ).IssuedTokenCache = wrappedTokenCache; } // we need to special case this as the OnTokenIssued callback is not hooked up in the cookie mode case. IIssuanceSecurityTokenAuthenticator issuanceTokenAuthenticator = sta as IIssuanceSecurityTokenAuthenticator; if ( issuanceTokenAuthenticator != null ) { issuanceTokenAuthenticator.IssuedSecurityTokenHandler = claimsHandler.OnTokenIssued; issuanceTokenAuthenticator.RenewedSecurityTokenHandler = claimsHandler.OnTokenRenewed; } } /// <summary> /// Overriden from the base class. Creates the requested Token Serializer. /// Returns a Security Token Serializer that is wraps the list of token /// hanlders registerd and also the serializers from the inner token manager. /// </summary> /// <param name="version">SecurityTokenVersion of the serializer to be created.</param> /// <returns>Instance of SecurityTokenSerializer.</returns> /// <exception cref="ArgumentNullException">Input parameter is null.</exception> public override SecurityTokenSerializer CreateSecurityTokenSerializer( SecurityTokenVersion version ) { if ( version == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "version" ); } TrustVersion trustVersion = null; SecureConversationVersion scVersion = null; foreach ( string securitySpecification in version.GetSecuritySpecifications() ) { if ( StringComparer.Ordinal.Equals( securitySpecification, WSTrustFeb2005Constants.NamespaceURI ) ) { trustVersion = TrustVersion.WSTrustFeb2005; } else if ( StringComparer.Ordinal.Equals( securitySpecification, WSTrust13Constants.NamespaceURI ) ) { trustVersion = TrustVersion.WSTrust13; } else if ( StringComparer.Ordinal.Equals( securitySpecification, WSSecureConversationFeb2005Constants.Namespace ) ) { scVersion = SecureConversationVersion.WSSecureConversationFeb2005; } else if ( StringComparer.Ordinal.Equals( securitySpecification, WSSecureConversation13Constants.Namespace ) ) { scVersion = SecureConversationVersion.WSSecureConversation13; } if ( trustVersion != null && scVersion != null ) { break; } } if ( trustVersion == null ) { trustVersion = TrustVersion.WSTrust13; } if ( scVersion == null ) { scVersion = SecureConversationVersion.WSSecureConversation13; } WsSecurityTokenSerializerAdapter adapter = new WsSecurityTokenSerializerAdapter( _securityTokenHandlerCollection, GetSecurityVersion( version ), trustVersion, scVersion, false, this.ServiceCredentials.IssuedTokenAuthentication.SamlSerializer, this.ServiceCredentials.SecureConversationAuthentication.SecurityStateEncoder, this.ServiceCredentials.SecureConversationAuthentication.SecurityContextClaimTypes ); adapter.MapExceptionsToSoapFaults = true; adapter.ExceptionMapper = _exceptionMapper; return adapter; } /// <summary> /// The out-of-band token resolver to be used if the authenticator does /// not provide another. /// </summary> /// <remarks>By default this will create the resolver with the service certificate and /// know certificates collections specified in the service credentials when the STS is /// hosted inside WCF.</remarks> SecurityTokenResolver GetDefaultOutOfBandTokenResolver() { if ( _defaultTokenResolver == null ) { lock ( _syncObject ) { if ( _defaultTokenResolver == null ) { // // Create default Out-Of-Band SecurityResolver. // List<SecurityToken> outOfBandTokens = new List<SecurityToken>(); if ( base.ServiceCredentials.ServiceCertificate.Certificate != null ) { outOfBandTokens.Add( new X509SecurityToken( base.ServiceCredentials.ServiceCertificate.Certificate ) ); } if ( ( base.ServiceCredentials.IssuedTokenAuthentication.KnownCertificates != null ) && ( base.ServiceCredentials.IssuedTokenAuthentication.KnownCertificates.Count > 0 ) ) { for ( int i = 0; i < base.ServiceCredentials.IssuedTokenAuthentication.KnownCertificates.Count; ++i ) { outOfBandTokens.Add( new X509SecurityToken( base.ServiceCredentials.IssuedTokenAuthentication.KnownCertificates[i])); } } _defaultTokenResolver = SecurityTokenResolver.CreateDefaultSecurityTokenResolver( outOfBandTokens.AsReadOnly(), false ); } } } return _defaultTokenResolver; } /// <summary> /// There is a bug in WCF where the version obtained from the public SecurityTokenVersion strings is wrong. /// The internal MessageSecurityTokenVersion has the right version. /// </summary> internal static SecurityVersion GetSecurityVersion( SecurityTokenVersion tokenVersion ) { if ( tokenVersion == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "tokenVersion" ); } // // Workaround for WCF bug. // In .NET 3.5 WCF returns the wrong Token Specification. We need to reflect on the // internal code so we can access the SecurityVersion directly instead of depending // on the security specification. // if ( tokenVersion is MessageSecurityTokenVersion ) { SecurityVersion sv = ( tokenVersion as MessageSecurityTokenVersion ).SecurityVersion; if ( sv != null ) { return sv; } } else { if ( tokenVersion.GetSecuritySpecifications().Contains( WSSecurity11Constants.Namespace ) ) { return SecurityVersion.WSSecurity11; } else if ( tokenVersion.GetSecuritySpecifications().Contains( WSSecurity10Constants.Namespace ) ) { return SecurityVersion.WSSecurity10; } } return SecurityVersion.WSSecurity11; } #endregion // SecurityTokenManager Implementation /// <summary> /// This method creates the inner security token authenticator from the base class. /// The wrapped token cache is initialized with this authenticator. /// </summary> SecurityTokenAuthenticator CreateInnerSecurityTokenAuthenticator( SecurityTokenRequirement tokenRequirement, out SecurityTokenResolver outOfBandTokenResolver ) { SecurityTokenAuthenticator securityTokenAuthenticator = base.CreateSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); SctClaimsHandler claimsHandler = new SctClaimsHandler( _securityTokenHandlerCollection, GetNormalizedEndpointId( tokenRequirement ) ); SetWrappedTokenCache( new WrappedTokenCache( _tokenCache, claimsHandler ), securityTokenAuthenticator, null, claimsHandler ); return securityTokenAuthenticator; } /// <summary> /// This method creates a SAML security token authenticator when token type is null. /// It wraps the SAML 1.1 and the SAML 2.0 token handlers that are configured. /// If no token handler was found, then the inner token manager is created. /// </summary> SecurityTokenAuthenticator CreateSamlSecurityTokenAuthenticator( SecurityTokenRequirement tokenRequirement, out SecurityTokenResolver outOfBandTokenResolver ) { outOfBandTokenResolver = null; SecurityTokenAuthenticator securityTokenAuthenticator = null; SamlSecurityTokenHandler saml11SecurityTokenHandler = _securityTokenHandlerCollection[SecurityTokenTypes.SamlTokenProfile11] as SamlSecurityTokenHandler; Saml2SecurityTokenHandler saml2SecurityTokenHandler = _securityTokenHandlerCollection[SecurityTokenTypes.Saml2TokenProfile11] as Saml2SecurityTokenHandler; if ( saml11SecurityTokenHandler != null && saml11SecurityTokenHandler.Configuration == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4274 ) ); } if ( saml2SecurityTokenHandler != null && saml2SecurityTokenHandler.Configuration == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4274 ) ); } if ( saml11SecurityTokenHandler != null && saml2SecurityTokenHandler != null ) { // // Both SAML 1.1 and SAML 2.0 token handlers have been configured. // WrappedSaml11SecurityTokenAuthenticator wrappedSaml11SecurityTokenAuthenticator = new WrappedSaml11SecurityTokenAuthenticator( saml11SecurityTokenHandler, _exceptionMapper ); WrappedSaml2SecurityTokenAuthenticator wrappedSaml2SecurityTokenAuthenticator = new WrappedSaml2SecurityTokenAuthenticator( saml2SecurityTokenHandler, _exceptionMapper ); securityTokenAuthenticator = new WrappedSamlSecurityTokenAuthenticator( wrappedSaml11SecurityTokenAuthenticator, wrappedSaml2SecurityTokenAuthenticator ); // The out-of-band token resolver will be used by WCF to decrypt any encrypted SAML tokens. List<SecurityTokenResolver> resolvers = new List<SecurityTokenResolver>(); resolvers.Add( saml11SecurityTokenHandler.Configuration.ServiceTokenResolver ); resolvers.Add( saml2SecurityTokenHandler.Configuration.ServiceTokenResolver ); outOfBandTokenResolver = new AggregateTokenResolver( resolvers ); } else if ( saml11SecurityTokenHandler == null && saml2SecurityTokenHandler != null ) { // // SAML 1.1 token handler is not present but SAML 2.0 is. Set the token type to SAML 2.0 // securityTokenAuthenticator = new WrappedSaml2SecurityTokenAuthenticator( saml2SecurityTokenHandler, _exceptionMapper ); // The out-of-band token resolver will be used by WCF to decrypt any encrypted SAML tokens. outOfBandTokenResolver = saml2SecurityTokenHandler.Configuration.ServiceTokenResolver; } else if ( saml11SecurityTokenHandler != null && saml2SecurityTokenHandler == null ) { // // SAML 1.1 token handler is present but SAML 2.0 is not. Set the token type to SAML 1.1 // securityTokenAuthenticator = new WrappedSaml11SecurityTokenAuthenticator( saml11SecurityTokenHandler, _exceptionMapper ); // The out-of-band token resolver will be used by WCF to decrypt any encrypted SAML tokens. outOfBandTokenResolver = saml11SecurityTokenHandler.Configuration.ServiceTokenResolver; } else { securityTokenAuthenticator = CreateInnerSecurityTokenAuthenticator( tokenRequirement, out outOfBandTokenResolver ); } return securityTokenAuthenticator; } /// <summary> /// Converts the ListenUri in the <see cref="SecurityTokenRequirement"/> to a normalized string. /// The method preserves the Uri scheme, port and absolute path and replaces the host name /// with the string 'NormalizedHostName'. /// </summary> /// <param name="tokenRequirement">The <see cref="SecurityTokenRequirement"/> which contains the 'ListenUri' property.</param> /// <returns>A string representing the Normalized URI string.</returns> public static string GetNormalizedEndpointId( SecurityTokenRequirement tokenRequirement ) { if ( tokenRequirement == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull( "tokenRequirement" ); } Uri listenUri = null; if ( tokenRequirement.Properties.ContainsKey( ListenUriProperty ) ) { listenUri = tokenRequirement.Properties[ListenUriProperty] as Uri; } if ( listenUri == null ) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperInvalidOperation( SR.GetString( SR.ID4287, tokenRequirement ) ); } if ( listenUri.IsDefaultPort ) { return String.Format( CultureInfo.InvariantCulture, "{0}://NormalizedHostName{1}", listenUri.Scheme, listenUri.AbsolutePath ); } else { return String.Format( CultureInfo.InvariantCulture, "{0}://NormalizedHostName:{1}{2}", listenUri.Scheme, listenUri.Port, listenUri.AbsolutePath ); } } } }
eric-stanley/referencesource
System.ServiceModel/System/ServiceModel/Security/FederatedSecurityTokenManager.cs
C#
mit
31,706
/** * Copyright 2010-present Facebook. * * 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. */ package com.facebook.widget; import android.annotation.SuppressLint; import android.app.Dialog; import android.app.ProgressDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.Color; import android.graphics.drawable.Drawable; import android.net.Uri; import android.net.http.SslError; import android.os.Bundle; import android.util.DisplayMetrics; import android.view.*; import android.webkit.SslErrorHandler; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.LinearLayout; import com.facebook.*; import com.facebook.android.R; import com.facebook.android.Util; import com.facebook.internal.Logger; import com.facebook.internal.ServerProtocol; import com.facebook.internal.Utility; import com.facebook.internal.Validate; /** * This class provides a mechanism for displaying Facebook Web dialogs inside a Dialog. Helper * methods are provided to construct commonly-used dialogs, or a caller can specify arbitrary * parameters to call other dialogs. */ public class WebDialog extends Dialog { private static final String LOG_TAG = Logger.LOG_TAG_BASE + "WebDialog"; private static final String DISPLAY_TOUCH = "touch"; static final String REDIRECT_URI = "fbconnect://success"; static final String CANCEL_URI = "fbconnect://cancel"; static final boolean DISABLE_SSL_CHECK_FOR_TESTING = false; // width below which there are no extra margins private static final int NO_PADDING_SCREEN_WIDTH = 480; // width beyond which we're always using the MIN_SCALE_FACTOR private static final int MAX_PADDING_SCREEN_WIDTH = 800; // height below which there are no extra margins private static final int NO_PADDING_SCREEN_HEIGHT = 800; // height beyond which we're always using the MIN_SCALE_FACTOR private static final int MAX_PADDING_SCREEN_HEIGHT = 1280; // the minimum scaling factor for the web dialog (50% of screen size) private static final double MIN_SCALE_FACTOR = 0.5; // translucent border around the webview private static final int BACKGROUND_GRAY = 0xCC000000; public static final int DEFAULT_THEME = android.R.style.Theme_Translucent_NoTitleBar; private String url; private OnCompleteListener onCompleteListener; private WebView webView; private ProgressDialog spinner; private ImageView crossImageView; private FrameLayout contentFrameLayout; private boolean listenerCalled = false; private boolean isDetached = false; /** * Interface that implements a listener to be called when the user's interaction with the * dialog completes, whether because the dialog finished successfully, or it was cancelled, * or an error was encountered. */ public interface OnCompleteListener { /** * Called when the dialog completes. * * @param values on success, contains the values returned by the dialog * @param error on an error, contains an exception describing the error */ void onComplete(Bundle values, FacebookException error); } /** * Constructor which can be used to display a dialog with an already-constructed URL. * * @param context the context to use to display the dialog * @param url the URL of the Web Dialog to display; no validation is done on this URL, but it should * be a valid URL pointing to a Facebook Web Dialog */ public WebDialog(Context context, String url) { this(context, url, DEFAULT_THEME); } /** * Constructor which can be used to display a dialog with an already-constructed URL and a custom theme. * * @param context the context to use to display the dialog * @param url the URL of the Web Dialog to display; no validation is done on this URL, but it should * be a valid URL pointing to a Facebook Web Dialog * @param theme identifier of a theme to pass to the Dialog class */ public WebDialog(Context context, String url, int theme) { super(context, theme); this.url = url; } /** * Constructor which will construct the URL of the Web dialog based on the specified parameters. * * @param context the context to use to display the dialog * @param action the portion of the dialog URL following "dialog/" * @param parameters parameters which will be included as part of the URL * @param theme identifier of a theme to pass to the Dialog class * @param listener the listener to notify, or null if no notification is desired */ public WebDialog(Context context, String action, Bundle parameters, int theme, OnCompleteListener listener) { super(context, theme); if (parameters == null) { parameters = new Bundle(); } // our webview client only handles the redirect uri we specify, so just hard code it here parameters.putString(ServerProtocol.DIALOG_PARAM_REDIRECT_URI, REDIRECT_URI); parameters.putString(ServerProtocol.DIALOG_PARAM_DISPLAY, DISPLAY_TOUCH); Uri uri = Utility.buildUri( ServerProtocol.getDialogAuthority(), ServerProtocol.getAPIVersion() + "/" + ServerProtocol.DIALOG_PATH + action, parameters); this.url = uri.toString(); onCompleteListener = listener; } /** * Sets the listener which will be notified when the dialog finishes. * * @param listener the listener to notify, or null if no notification is desired */ public void setOnCompleteListener(OnCompleteListener listener) { onCompleteListener = listener; } /** * Gets the listener which will be notified when the dialog finishes. * * @return the listener, or null if none has been specified */ public OnCompleteListener getOnCompleteListener() { return onCompleteListener; } @Override public void dismiss() { if (webView != null) { webView.stopLoading(); } if (!isDetached) { if (spinner.isShowing()) { spinner.dismiss(); } super.dismiss(); } } @Override public void onDetachedFromWindow() { isDetached = true; super.onDetachedFromWindow(); } @Override public void onAttachedToWindow() { isDetached = false; super.onAttachedToWindow(); } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { sendCancelToListener(); } }); spinner = new ProgressDialog(getContext()); spinner.requestWindowFeature(Window.FEATURE_NO_TITLE); spinner.setMessage(getContext().getString(R.string.com_facebook_loading)); spinner.setOnCancelListener(new OnCancelListener() { @Override public void onCancel(DialogInterface dialogInterface) { sendCancelToListener(); WebDialog.this.dismiss(); } }); requestWindowFeature(Window.FEATURE_NO_TITLE); contentFrameLayout = new FrameLayout(getContext()); // First calculate how big the frame layout should be calculateSize(); getWindow().setGravity(Gravity.CENTER); // resize the dialog if the soft keyboard comes up getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE); /* Create the 'x' image, but don't add to the contentFrameLayout layout yet * at this point, we only need to know its drawable width and height * to place the webview */ createCrossImage(); /* Now we know 'x' drawable width and height, * layout the webview and add it the contentFrameLayout layout */ int crossWidth = crossImageView.getDrawable().getIntrinsicWidth(); setUpWebView(crossWidth / 2 + 1); /* Finally add the 'x' image to the contentFrameLayout layout and * add contentFrameLayout to the Dialog view */ contentFrameLayout.addView(crossImageView, new ViewGroup.LayoutParams( ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT)); setContentView(contentFrameLayout); } private void calculateSize() { WindowManager wm = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE); Display display = wm.getDefaultDisplay(); DisplayMetrics metrics = new DisplayMetrics(); display.getMetrics(metrics); // always use the portrait dimensions to do the scaling calculations so we always get a portrait shaped // web dialog int width = metrics.widthPixels < metrics.heightPixels ? metrics.widthPixels : metrics.heightPixels; int height = metrics.widthPixels < metrics.heightPixels ? metrics.heightPixels : metrics.widthPixels; int dialogWidth = Math.min( getScaledSize(width, metrics.density, NO_PADDING_SCREEN_WIDTH, MAX_PADDING_SCREEN_WIDTH), metrics.widthPixels); int dialogHeight = Math.min( getScaledSize(height, metrics.density, NO_PADDING_SCREEN_HEIGHT, MAX_PADDING_SCREEN_HEIGHT), metrics.heightPixels); getWindow().setLayout(dialogWidth, dialogHeight); } /** * Returns a scaled size (either width or height) based on the parameters passed. * @param screenSize a pixel dimension of the screen (either width or height) * @param density density of the screen * @param noPaddingSize the size at which there's no padding for the dialog * @param maxPaddingSize the size at which to apply maximum padding for the dialog * @return a scaled size. */ private int getScaledSize(int screenSize, float density, int noPaddingSize, int maxPaddingSize) { int scaledSize = (int) ((float) screenSize / density); double scaleFactor; if (scaledSize <= noPaddingSize) { scaleFactor = 1.0; } else if (scaledSize >= maxPaddingSize) { scaleFactor = MIN_SCALE_FACTOR; } else { // between the noPadding and maxPadding widths, we take a linear reduction to go from 100% // of screen size down to MIN_SCALE_FACTOR scaleFactor = MIN_SCALE_FACTOR + ((double) (maxPaddingSize - scaledSize)) / ((double) (maxPaddingSize - noPaddingSize)) * (1.0 - MIN_SCALE_FACTOR); } return (int) (screenSize * scaleFactor); } private void sendSuccessToListener(Bundle values) { if (onCompleteListener != null && !listenerCalled) { listenerCalled = true; onCompleteListener.onComplete(values, null); } } private void sendErrorToListener(Throwable error) { if (onCompleteListener != null && !listenerCalled) { listenerCalled = true; FacebookException facebookException = null; if (error instanceof FacebookException) { facebookException = (FacebookException) error; } else { facebookException = new FacebookException(error); } onCompleteListener.onComplete(null, facebookException); } } private void sendCancelToListener() { sendErrorToListener(new FacebookOperationCanceledException()); } private void createCrossImage() { crossImageView = new ImageView(getContext()); // Dismiss the dialog when user click on the 'x' crossImageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { sendCancelToListener(); WebDialog.this.dismiss(); } }); Drawable crossDrawable = getContext().getResources().getDrawable(R.drawable.com_facebook_close); crossImageView.setImageDrawable(crossDrawable); /* 'x' should not be visible while webview is loading * make it visible only after webview has fully loaded */ crossImageView.setVisibility(View.INVISIBLE); } @SuppressLint("SetJavaScriptEnabled") private void setUpWebView(int margin) { LinearLayout webViewContainer = new LinearLayout(getContext()); webView = new WebView(getContext()); webView.setVerticalScrollBarEnabled(false); webView.setHorizontalScrollBarEnabled(false); webView.setWebViewClient(new DialogWebViewClient()); webView.getSettings().setJavaScriptEnabled(true); webView.loadUrl(url); webView.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); webView.setVisibility(View.INVISIBLE); webView.getSettings().setSavePassword(false); webView.getSettings().setSaveFormData(false); webViewContainer.setPadding(margin, margin, margin, margin); webViewContainer.addView(webView); webViewContainer.setBackgroundColor(BACKGROUND_GRAY); contentFrameLayout.addView(webViewContainer); } private class DialogWebViewClient extends WebViewClient { @Override @SuppressWarnings("deprecation") public boolean shouldOverrideUrlLoading(WebView view, String url) { Utility.logd(LOG_TAG, "Redirect URL: " + url); if (url.startsWith(WebDialog.REDIRECT_URI)) { Bundle values = Util.parseUrl(url); String error = values.getString("error"); if (error == null) { error = values.getString("error_type"); } String errorMessage = values.getString("error_msg"); if (errorMessage == null) { errorMessage = values.getString("error_description"); } String errorCodeString = values.getString("error_code"); int errorCode = FacebookRequestError.INVALID_ERROR_CODE; if (!Utility.isNullOrEmpty(errorCodeString)) { try { errorCode = Integer.parseInt(errorCodeString); } catch (NumberFormatException ex) { errorCode = FacebookRequestError.INVALID_ERROR_CODE; } } if (Utility.isNullOrEmpty(error) && Utility .isNullOrEmpty(errorMessage) && errorCode == FacebookRequestError.INVALID_ERROR_CODE) { sendSuccessToListener(values); } else if (error != null && (error.equals("access_denied") || error.equals("OAuthAccessDeniedException"))) { sendCancelToListener(); } else { FacebookRequestError requestError = new FacebookRequestError(errorCode, error, errorMessage); sendErrorToListener(new FacebookServiceException(requestError, errorMessage)); } WebDialog.this.dismiss(); return true; } else if (url.startsWith(WebDialog.CANCEL_URI)) { sendCancelToListener(); WebDialog.this.dismiss(); return true; } else if (url.contains(DISPLAY_TOUCH)) { return false; } // launch non-dialog URLs in a full browser getContext().startActivity( new Intent(Intent.ACTION_VIEW, Uri.parse(url))); return true; } @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { super.onReceivedError(view, errorCode, description, failingUrl); sendErrorToListener(new FacebookDialogException(description, errorCode, failingUrl)); WebDialog.this.dismiss(); } @Override public void onReceivedSslError(WebView view, SslErrorHandler handler, SslError error) { if (DISABLE_SSL_CHECK_FOR_TESTING) { handler.proceed(); } else { super.onReceivedSslError(view, handler, error); sendErrorToListener(new FacebookDialogException(null, ERROR_FAILED_SSL_HANDSHAKE, null)); handler.cancel(); WebDialog.this.dismiss(); } } @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { Utility.logd(LOG_TAG, "Webview loading URL: " + url); super.onPageStarted(view, url, favicon); if (!isDetached) { spinner.show(); } } @Override public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); if (!isDetached) { spinner.dismiss(); } /* * Once web view is fully loaded, set the contentFrameLayout background to be transparent * and make visible the 'x' image. */ contentFrameLayout.setBackgroundColor(Color.TRANSPARENT); webView.setVisibility(View.VISIBLE); crossImageView.setVisibility(View.VISIBLE); } } private static class BuilderBase<CONCRETE extends BuilderBase<?>> { private Context context; private Session session; private String applicationId; private String action; private int theme = DEFAULT_THEME; private OnCompleteListener listener; private Bundle parameters; protected BuilderBase(Context context, String action) { Session activeSession = Session.getActiveSession(); if (activeSession != null && activeSession.isOpened()) { this.session = activeSession; } else { String applicationId = Utility.getMetadataApplicationId(context); if (applicationId != null) { this.applicationId = applicationId; } else { throw new FacebookException("Attempted to create a builder without an open" + " Active Session or a valid default Application ID."); } } finishInit(context, action, null); } protected BuilderBase(Context context, Session session, String action, Bundle parameters) { Validate.notNull(session, "session"); if (!session.isOpened()) { throw new FacebookException("Attempted to use a Session that was not open."); } this.session = session; finishInit(context, action, parameters); } protected BuilderBase(Context context, String applicationId, String action, Bundle parameters) { if (applicationId == null) { applicationId = Utility.getMetadataApplicationId(context); } Validate.notNullOrEmpty(applicationId, "applicationId"); this.applicationId = applicationId; finishInit(context, action, parameters); } /** * Sets a theme identifier which will be passed to the underlying Dialog. * * @param theme a theme identifier which will be passed to the Dialog class * @return the builder */ public CONCRETE setTheme(int theme) { this.theme = theme; @SuppressWarnings("unchecked") CONCRETE result = (CONCRETE) this; return result; } /** * Sets the listener which will be notified when the dialog finishes. * * @param listener the listener to notify, or null if no notification is desired * @return the builder */ public CONCRETE setOnCompleteListener(OnCompleteListener listener) { this.listener = listener; @SuppressWarnings("unchecked") CONCRETE result = (CONCRETE) this; return result; } /** * Constructs a WebDialog using the parameters provided. The dialog is not shown, * but is ready to be shown by calling Dialog.show(). * * @return the WebDialog */ public WebDialog build() { if (session != null && session.isOpened()) { parameters.putString(ServerProtocol.DIALOG_PARAM_APP_ID, session.getApplicationId()); parameters.putString(ServerProtocol.DIALOG_PARAM_ACCESS_TOKEN, session.getAccessToken()); } else { parameters.putString(ServerProtocol.DIALOG_PARAM_APP_ID, applicationId); } return new WebDialog(context, action, parameters, theme, listener); } protected String getApplicationId() { return applicationId; } protected Context getContext() { return context; } protected int getTheme() { return theme; } protected Bundle getParameters() { return parameters; } protected WebDialog.OnCompleteListener getListener() { return listener; } private void finishInit(Context context, String action, Bundle parameters) { this.context = context; this.action = action; if (parameters != null) { this.parameters = parameters; } else { this.parameters = new Bundle(); } } } /** * Provides a builder that allows construction of an arbitary Facebook web dialog. */ public static class Builder extends BuilderBase<Builder> { /** * Constructor that builds a dialog using either the active session, or the application * id specified in the application/meta-data. * * @param context the Context within which the dialog will be shown. * @param action the portion of the dialog URL following www.facebook.com/dialog/. * See https://developers.facebook.com/docs/reference/dialogs/ for details. */ public Builder(Context context, String action) { super(context, action); } /** * Constructor that builds a dialog for an authenticated user. * * @param context the Context within which the dialog will be shown. * @param session the Session representing an authenticating user to use for * showing the dialog; must not be null, and must be opened. * @param action the portion of the dialog URL following www.facebook.com/dialog/. * See https://developers.facebook.com/docs/reference/dialogs/ for details. * @param parameters a Bundle containing parameters to pass as part of the URL. */ public Builder(Context context, Session session, String action, Bundle parameters) { super(context, session, action, parameters); } /** * Constructor that builds a dialog without an authenticated user. * * @param context the Context within which the dialog will be shown. * @param applicationId the application ID to be included in the dialog URL. * @param action the portion of the dialog URL following www.facebook.com/dialog/. * See https://developers.facebook.com/docs/reference/dialogs/ for details. * @param parameters a Bundle containing parameters to pass as part of the URL. */ public Builder(Context context, String applicationId, String action, Bundle parameters) { super(context, applicationId, action, parameters); } } /** * Provides a builder that allows construction of the parameters for showing * the <a href="https://developers.facebook.com/docs/reference/dialogs/feed">Feed Dialog</a>. */ public static class FeedDialogBuilder extends BuilderBase<FeedDialogBuilder> { private static final String FEED_DIALOG = "feed"; private static final String FROM_PARAM = "from"; private static final String TO_PARAM = "to"; private static final String LINK_PARAM = "link"; private static final String PICTURE_PARAM = "picture"; private static final String SOURCE_PARAM = "source"; private static final String NAME_PARAM = "name"; private static final String CAPTION_PARAM = "caption"; private static final String DESCRIPTION_PARAM = "description"; /** * Constructor that builds a Feed Dialog using either the active session, or the application * ID specified in the application/meta-data. * * @param context the Context within which the dialog will be shown. */ public FeedDialogBuilder(Context context) { super(context, FEED_DIALOG); } /** * Constructor that builds a Feed Dialog using the provided session. * * @param context the Context within which the dialog will be shown. * @param session the Session representing an authenticating user to use for * showing the dialog; must not be null, and must be opened. */ public FeedDialogBuilder(Context context, Session session) { super(context, session, FEED_DIALOG, null); } /** * Constructor that builds a Feed Dialog using the provided session and parameters. * * @param context the Context within which the dialog will be shown. * @param session the Session representing an authenticating user to use for * showing the dialog; must not be null, and must be opened. * @param parameters a Bundle containing parameters to pass as part of the * dialog URL. No validation is done on these parameters; it is * the caller's responsibility to ensure they are valid. For more information, * see <a href="https://developers.facebook.com/docs/reference/dialogs/feed/"> * https://developers.facebook.com/docs/reference/dialogs/feed/</a>. */ public FeedDialogBuilder(Context context, Session session, Bundle parameters) { super(context, session, FEED_DIALOG, parameters); } /** * Constructor that builds a Feed Dialog using the provided application ID and parameters. * * @param context the Context within which the dialog will be shown. * @param applicationId the application ID to use. If null, the application ID specified in the * application/meta-data will be used instead. * @param parameters a Bundle containing parameters to pass as part of the * dialog URL. No validation is done on these parameters; it is * the caller's responsibility to ensure they are valid. For more information, * see <a href="https://developers.facebook.com/docs/reference/dialogs/feed/"> * https://developers.facebook.com/docs/reference/dialogs/feed/</a>. */ public FeedDialogBuilder(Context context, String applicationId, Bundle parameters) { super(context, applicationId, FEED_DIALOG, parameters); } /** * Sets the ID of the profile that is posting to Facebook. If none is specified, * the default is "me". This profile must be either the authenticated user or a * Page that the user is an administrator of. * * @param id Facebook ID of the profile to post from * @return the builder */ public FeedDialogBuilder setFrom(String id) { getParameters().putString(FROM_PARAM, id); return this; } /** * Sets the ID of the profile that the story will be published to. If not specified, it * will default to the same profile that the story is being published from. The ID must be a friend who also * uses your app. * * @param id Facebook ID of the profile to post to * @return the builder */ public FeedDialogBuilder setTo(String id) { getParameters().putString(TO_PARAM, id); return this; } /** * Sets the URL of a link to be shared. * * @param link the URL * @return the builder */ public FeedDialogBuilder setLink(String link) { getParameters().putString(LINK_PARAM, link); return this; } /** * Sets the URL of a picture to be shared. * * @param picture the URL of the picture * @return the builder */ public FeedDialogBuilder setPicture(String picture) { getParameters().putString(PICTURE_PARAM, picture); return this; } /** * Sets the URL of a media file attached to this post. If this is set, any picture * set via setPicture will be ignored. * * @param source the URL of the media file * @return the builder */ public FeedDialogBuilder setSource(String source) { getParameters().putString(SOURCE_PARAM, source); return this; } /** * Sets the name of the item being shared. * * @param name the name * @return the builder */ public FeedDialogBuilder setName(String name) { getParameters().putString(NAME_PARAM, name); return this; } /** * Sets the caption to be displayed. * * @param caption the caption * @return the builder */ public FeedDialogBuilder setCaption(String caption) { getParameters().putString(CAPTION_PARAM, caption); return this; } /** * Sets the description to be displayed. * * @param description the description * @return the builder */ public FeedDialogBuilder setDescription(String description) { getParameters().putString(DESCRIPTION_PARAM, description); return this; } } /** * Provides a builder that allows construction of the parameters for showing * the <a href="https://developers.facebook.com/docs/reference/dialogs/requests">Requests Dialog</a>. */ public static class RequestsDialogBuilder extends BuilderBase<RequestsDialogBuilder> { private static final String APPREQUESTS_DIALOG = "apprequests"; private static final String MESSAGE_PARAM = "message"; private static final String TO_PARAM = "to"; private static final String DATA_PARAM = "data"; private static final String TITLE_PARAM = "title"; /** * Constructor that builds a Requests Dialog using either the active session, or the application * ID specified in the application/meta-data. * * @param context the Context within which the dialog will be shown. */ public RequestsDialogBuilder(Context context) { super(context, APPREQUESTS_DIALOG); } /** * Constructor that builds a Requests Dialog using the provided session. * * @param context the Context within which the dialog will be shown. * @param session the Session representing an authenticating user to use for * showing the dialog; must not be null, and must be opened. */ public RequestsDialogBuilder(Context context, Session session) { super(context, session, APPREQUESTS_DIALOG, null); } /** * Constructor that builds a Requests Dialog using the provided session and parameters. * * @param context the Context within which the dialog will be shown. * @param session the Session representing an authenticating user to use for * showing the dialog; must not be null, and must be opened. * @param parameters a Bundle containing parameters to pass as part of the * dialog URL. No validation is done on these parameters; it is * the caller's responsibility to ensure they are valid. For more information, * see <a href="https://developers.facebook.com/docs/reference/dialogs/requests/"> * https://developers.facebook.com/docs/reference/dialogs/requests/</a>. */ public RequestsDialogBuilder(Context context, Session session, Bundle parameters) { super(context, session, APPREQUESTS_DIALOG, parameters); } /** * Constructor that builds a Requests Dialog using the provided application ID and parameters. * * @param context the Context within which the dialog will be shown. * @param applicationId the application ID to use. If null, the application ID specified in the * application/meta-data will be used instead. * @param parameters a Bundle containing parameters to pass as part of the * dialog URL. No validation is done on these parameters; it is * the caller's responsibility to ensure they are valid. For more information, * see <a href="https://developers.facebook.com/docs/reference/dialogs/requests/"> * https://developers.facebook.com/docs/reference/dialogs/requests/</a>. */ public RequestsDialogBuilder(Context context, String applicationId, Bundle parameters) { super(context, applicationId, APPREQUESTS_DIALOG, parameters); } /** * Sets the string users receiving the request will see. The maximum length * is 60 characters. * * @param message the message * @return the builder */ public RequestsDialogBuilder setMessage(String message) { getParameters().putString(MESSAGE_PARAM, message); return this; } /** * Sets the user ID or user name the request will be sent to. If this is not * specified, a friend selector will be displayed and the user can select up * to 50 friends. * * @param id the id or user name to send the request to * @return the builder */ public RequestsDialogBuilder setTo(String id) { getParameters().putString(TO_PARAM, id); return this; } /** * Sets optional data which can be used for tracking; maximum length is 255 * characters. * * @param data the data * @return the builder */ public RequestsDialogBuilder setData(String data) { getParameters().putString(DATA_PARAM, data); return this; } /** * Sets an optional title for the dialog; maximum length is 50 characters. * * @param title the title * @return the builder */ public RequestsDialogBuilder setTitle(String title) { getParameters().putString(TITLE_PARAM, title); return this; } } }
gscreativelab/BTE_Android
facebook/src/com/facebook/widget/WebDialog.java
Java
mit
36,900
<a href='https://github.com/angular/angular.js/edit/v1.5.x/src/ng/window.js?message=docs($window)%3A%20describe%20your%20change...#L3' class='improve-docs btn btn-primary'><i class="glyphicon glyphicon-edit">&nbsp;</i>Improve this Doc</a> <a href='https://github.com/angular/angular.js/tree/v1.5.5/src/ng/window.js#L3' class='view-source pull-right btn btn-primary'> <i class="glyphicon glyphicon-zoom-in">&nbsp;</i>View Source </a> <header class="api-profile-header"> <h1 class="api-profile-header-heading">$window</h1> <ol class="api-profile-header-structure naked-list step-list"> <li> - service in module <a href="api/ng">ng</a> </li> </ol> </header> <div class="api-profile-description"> <p>A reference to the browser&#39;s <code>window</code> object. While <code>window</code> is globally available in JavaScript, it causes testability problems, because it is a global variable. In angular we always refer to it through the <code>$window</code> service, so it may be overridden, removed or mocked for testing.</p> <p>Expressions, like the one defined for the <code>ngClick</code> directive in the example below, are evaluated with respect to the current scope. Therefore, there is no risk of inadvertently coding in a dependency on a global value in such an expression.</p> </div> <div> <h2 id="example">Example</h2><p> <div> <plnkr-opener example-path="examples/example-example112"></plnkr-opener> <div class="runnable-example" path="examples/example-example112" module="windowExample"> <div class="runnable-example-file" name="index.html" language="html" type="html"> <pre><code>&lt;script&gt;&#10; angular.module(&#39;windowExample&#39;, [])&#10; .controller(&#39;ExampleController&#39;, [&#39;$scope&#39;, &#39;$window&#39;, function($scope, $window) {&#10; $scope.greeting = &#39;Hello, World!&#39;;&#10; $scope.doGreeting = function(greeting) {&#10; $window.alert(greeting);&#10; };&#10; }]);&#10;&lt;/script&gt;&#10;&lt;div ng-controller=&quot;ExampleController&quot;&gt;&#10; &lt;input type=&quot;text&quot; ng-model=&quot;greeting&quot; aria-label=&quot;greeting&quot; /&gt;&#10; &lt;button ng-click=&quot;doGreeting(greeting)&quot;&gt;ALERT&lt;/button&gt;&#10;&lt;/div&gt;</code></pre> </div> <div class="runnable-example-file" name="protractor.js" type="protractor" language="js"> <pre><code>it(&#39;should display the greeting in the input box&#39;, function() {&#10; element(by.model(&#39;greeting&#39;)).sendKeys(&#39;Hello, E2E Tests&#39;);&#10; // If we click the button it will block the test runner&#10; // element(&#39;:button&#39;).click();&#10;});</code></pre> </div> <iframe class="runnable-example-frame" src="examples/example-example112/index.html" name="example-example112"></iframe> </div> </div> </p> </div>
8bitreid/8bitreid.github.io
angular-1.5.5/docs/partials/api/ng/service/$window.html
HTML
mit
2,958
/**************************************************************************** Copyright (c) 2008-2010 Ricardo Quesada Copyright (c) 2011-2012 cocos2d-x.org Copyright (c) 2013-2014 Chukong Technologies Inc. http://www.cocos2d-x.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ var TAG_ANIMATION_DANCE = 1; var schedulerTestSceneIdx = -1; /* Base Layer */ var SchedulerTestLayer = BaseTestLayer.extend({ title:function () { return "No title"; }, subtitle:function () { return ""; }, onBackCallback:function (sender) { var scene = new SchedulerTestScene(); var layer = previousSchedulerTest(); scene.addChild(layer); director.runScene(scene); }, onNextCallback:function (sender) { var scene = new SchedulerTestScene(); var layer = nextSchedulerTest(); scene.addChild(layer); director.runScene(scene); }, onRestartCallback:function (sender) { var scene = new SchedulerTestScene(); var layer = restartSchedulerTest(); scene.addChild(layer); director.runScene(scene); }, // automation numberOfPendingTests:function() { return ( (arrayOfSchedulerTest.length-1) - schedulerTestSceneIdx ); }, getTestNumber:function() { return schedulerTestSceneIdx; } }); /* SchedulerAutoremove */ var SchedulerAutoremove = SchedulerTestLayer.extend({ _accum:0, onEnter:function () { //----start0----onEnter this._super(); this.schedule(this.onAutoremove, 0.5); this.schedule(this.onTick, 0.5); this._accum = 0; //----end0---- }, title:function () { return "Self-remove an scheduler"; }, subtitle:function () { return "1 scheduler will be autoremoved in 3 seconds. See console"; }, onAutoremove:function (dt) { //----start0----onAutoremove this._accum += dt; cc.log("Time: " + this._accum); if (this._accum > 3) { this.unschedule(this.onAutoremove); cc.log("scheduler removed"); } //----end0---- }, onTick:function (dt) { cc.log("This scheduler should not be removed"); } }); /* SchedulerPauseResume */ var SchedulerPauseResume = SchedulerTestLayer.extend({ onEnter:function () { //----start1----onEnter this._super(); this.schedule(this.onTick1, 0.5); this.schedule(this.onTick2, 0.5); this.schedule(this.onPause, 3); //----end1---- }, title:function () { return "Pause / Resume"; }, subtitle:function () { return "Scheduler should be paused after 3 seconds. See console"; }, onTick1:function (dt) { //----start1----onTick1 cc.log("tick1"); //----end1---- }, onTick2:function (dt) { //----start1----onTick2 cc.log("tick2"); //----end1---- }, onPause:function (dt) { //----start1----onPause director.getScheduler().pauseTarget(this); //----end1---- } }); /* SchedulerUnscheduleAll */ var SchedulerUnscheduleAll = SchedulerTestLayer.extend({ onEnter:function () { //----start2----onEnter this._super(); this.schedule(this.onTick1, 0.5); this.schedule(this.onTick2, 1.0); this.schedule(this.onTick3, 1.5); this.schedule(this.onTick4, 1.5); this.schedule(this.onUnscheduleAll, 4); //----end2---- }, title:function () { return "Unschedule All callbacks"; }, subtitle:function () { return "All scheduled callbacks will be unscheduled in 4 seconds. See console"; }, onTick1:function (dt) { //----start2----onTick1 cc.log("tick1"); //----end2---- }, onTick2:function (dt) { //----start2----onTick2 cc.log("tick2"); //----end2---- }, onTick3:function (dt) { //----start2----onTick3 cc.log("tick3"); //----end2---- }, onTick4:function (dt) { //----start2----onTick4 cc.log("tick4"); //----end2---- }, onUnscheduleAll:function (dt) { //----start2----onUnscheduleAll this.unscheduleAllCallbacks(); //----end2---- } }); /* SchedulerUnscheduleAllHard */ var SchedulerUnscheduleAllHard = SchedulerTestLayer.extend({ onEnter:function () { //----start3----onEnter this._super(); this.schedule(this.onTick1, 0.5); this.schedule(this.onTick2, 1.0); this.schedule(this.onTick3, 1.5); this.schedule(this.onTick4, 1.5); this.schedule(this.onUnscheduleAll, 4); //----end3---- }, title:function () { return "Unschedule All callbacks #2"; }, subtitle:function () { return "Unschedules all callbacks after 4s. Uses CCScheduler. See console"; }, onTick1:function (dt) { //----start3----onTick1 cc.log("tick1"); //----end3---- }, onTick2:function (dt) { //----start3----onTick2 cc.log("tick2"); //----end3---- }, onTick3:function (dt) { //----start3----onTick3 cc.log("tick3"); //----end3---- }, onTick4:function (dt) { //----start3----onTick4 cc.log("tick4"); //----end3---- }, onUnscheduleAll:function (dt) { //----start3----onUnscheduleAll director.getScheduler().unscheduleAllCallbacks(); //----end3---- } }); /* SchedulerSchedulesAndRemove */ var SchedulerSchedulesAndRemove = SchedulerTestLayer.extend({ onEnter:function () { //----start4----onEnter this._super(); this.schedule(this.onTick1, 0.5); this.schedule(this.onTick2, 1.0); this.schedule(this.onScheduleAndUnschedule, 4.0); //----end4---- }, title:function () { return "Schedule from Schedule"; }, subtitle:function () { return "Will unschedule and schedule callbacks in 4s. See console"; }, onTick1:function (dt) { //----start4----onTick1 cc.log("tick1"); //----end4---- }, onTick2:function (dt) { //----start4----onTick2 cc.log("tick2"); //----end4---- }, onTick3:function (dt) { //----start4----onTick3 cc.log("tick3"); //----end4---- }, onTick4:function (dt) { //----start4----onTick4 cc.log("tick4"); //----end4---- }, onScheduleAndUnschedule:function (dt) { //----start4----onScheduleAndUnschedule this.unschedule(this.onTick1); this.unschedule(this.onTick2); this.unschedule(this.onScheduleAndUnschedule); this.schedule(this.onTick3, 1.0); this.schedule(this.onTick4, 1.0) //----end4---- } }); /* SchedulerUpdate */ var TestNode = cc.Node.extend({ _pString:"", ctor:function (str, priority) { this._super(); this.init(); this._pString = str; this.scheduleUpdateWithPriority(priority); }, update:function(dt) { cc.log( this._pString ); } }); var SchedulerUpdate = SchedulerTestLayer.extend({ onEnter:function () { //----start5----onEnter this._super(); var str = "---"; var d = new TestNode(str,50); this.addChild(d); str = "3rd"; var b = new TestNode(str,0); this.addChild(b); str = "1st"; var a = new TestNode(str, -10); this.addChild(a); str = "4th"; var c = new TestNode(str,10); this.addChild(c); str = "5th"; var e = new TestNode(str,20); this.addChild(e); str = "2nd"; var f = new TestNode(str,-5); this.addChild(f); this.schedule(this.onRemoveUpdates, 4.0); //----end5---- }, title:function () { return "Schedule update with priority"; }, subtitle:function () { return "3 scheduled updates. Priority should work. Stops in 4s. See console"; }, onRemoveUpdates:function (dt) { //----start5----onRemoveUpdates var children = this.children; for (var i = 0; i < children.length; i++) { var node = children[i]; if (node) { node.unscheduleAllCallbacks(); } } //----end5---- } }); /* SchedulerUpdateAndCustom */ var SchedulerUpdateAndCustom = SchedulerTestLayer.extend({ onEnter:function () { //----start6----onEnter this._super(); this.scheduleUpdate(); this.schedule(this.onTick); this.schedule(this.onStopCallbacks, 4); //----end6---- }, title:function () { return "Schedule Update + custom callback"; }, subtitle:function () { return "Update + custom callback at the same time. Stops in 4s. See console"; }, update:function (dt) { //----start6----update cc.log("update called:" + dt); //----end6---- }, onTick:function (dt) { //----start6----onTick cc.log("custom callback called:" + dt); //----end6---- }, onStopCallbacks:function (dt) { //----start6----onStopCallbacks this.unscheduleAllCallbacks(); //----end6---- } }); /* SchedulerUpdateFromCustom */ var SchedulerUpdateFromCustom = SchedulerTestLayer.extend({ onEnter:function () { //----start7----onEnter this._super(); this.schedule(this.onSchedUpdate, 2.0); //----end7---- }, title:function () { return "Schedule Update in 2 sec"; }, subtitle:function () { return "Update schedules in 2 secs. Stops 2 sec later. See console"; }, update:function (dt) { //----start7----update cc.log("update called:" + dt); //----end7---- }, onSchedUpdate:function (dt) { //----start7----onSchedUpdate this.unschedule(this.onSchedUpdate); this.scheduleUpdate(); this.schedule(this.onStopUpdate, 2.0); //----end7---- }, onStopUpdate:function (dt) { //----start7----onStopUpdate this.unscheduleUpdate(); this.unschedule(this.onStopUpdate); //----end7---- } }); /* RescheduleCallback */ var RescheduleCallback = SchedulerTestLayer.extend({ _interval:1.0, _ticks:0, onEnter:function () { //----start8----onEnter this._super(); this._interval = 1.0; this._ticks = 0; this.schedule(this.onSchedUpdate, this._interval); //----end8---- }, title:function () { return "Reschedule Callback"; }, subtitle:function () { return "Interval is 1 second, then 2, then 3..."; }, onSchedUpdate:function (dt) { //----start8----onSchedUpdate this._ticks++; cc.log("schedUpdate: " + dt.toFixed(2)); if (this._ticks > 3) { this._interval += 1.0; this.schedule(this.onSchedUpdate, this._interval); this._ticks = 0; } //----end8---- } }); /* ScheduleUsingSchedulerTest */ var ScheduleUsingSchedulerTest = SchedulerTestLayer.extend({ _accum:0, onEnter:function () { //----start9----onEnter this._super(); this._accum = 0; var scheduler = director.getScheduler(); var priority = 0; // priority 0. default. var paused = false; // not paused, queue it now. scheduler.scheduleUpdateForTarget(this, priority, paused); var interval = 0.25; // every 1/4 of second var repeat = cc.REPEAT_FOREVER; // how many repeats. cc.REPEAT_FOREVER means forever var delay = 2; // start after 2 seconds; paused = false; // not paused. queue it now. scheduler.scheduleCallbackForTarget(this, this.onSchedUpdate, interval, repeat, delay, paused); //----end9---- }, title:function () { return "Schedule / Unschedule using Scheduler"; }, subtitle:function () { return "After 5 seconds all callbacks should be removed"; }, // callbacks update:function(dt) { //----start9----update cc.log("update: " + dt); //----end9---- }, onSchedUpdate:function (dt) { //----start9----onSchedUpdate cc.log("onSchedUpdate delta: " + dt); this._accum += dt; if( this._accum > 3 ) { var scheduler = director.getScheduler(); scheduler.unscheduleAllCallbacksForTarget(this); } cc.log("onSchedUpdate accum: " + this._accum); //----end9---- } }); // SchedulerTimeScale var SchedulerTimeScale = SchedulerTestLayer.extend({ _newScheduler: null, _newActionManager: null, onEnter: function() { this._super(); this._newScheduler = new cc.Scheduler(); this._newActionManager = new cc.ActionManager(); var s = cc.winSize; // rotate and jump var jump1 = new cc.JumpBy(4, cc.p(-s.width+80,0), 100, 4); var jump2 = jump1.reverse(); var rot1 = new cc.RotateBy(4, 360*2); var rot2 = rot1.reverse(); var seq3_1 = new cc.Sequence(jump2, jump1); var seq3_2 = new cc.Sequence(rot1, rot2); var spawn = new cc.Spawn(seq3_1, seq3_2); var action = new cc.Repeat(spawn, 50); var action2 = action.clone(); var action3 = action.clone(); var grossini = new cc.Sprite("res/Images/grossini.png"); var tamara = new cc.Sprite("res/Images/grossinis_sister1.png"); var kathia = new cc.Sprite("res/Images/grossinis_sister2.png"); grossini.setActionManager(this._newActionManager); grossini.setScheduler(this._newScheduler); grossini.setPosition(cc.p(40,80)); tamara.setPosition(cc.p(40,80)); kathia.setPosition(cc.p(40,80)); this.addChild(grossini); this.addChild(tamara); this.addChild(kathia); grossini.runAction(new cc.Speed(action, 0.5)); tamara.runAction(new cc.Speed(action2, 1.5)); kathia.runAction(new cc.Speed(action3, 1.0)); cc.director.getScheduler().scheduleUpdateForTarget(this._newScheduler, 0, false); this._newScheduler.scheduleUpdateForTarget(this._newActionManager, 0, false); var emitter = new cc.ParticleFireworks(); emitter.setTexture( cc.textureCache.addImage(s_stars1) ); this.addChild(emitter); var slider = null; var l = null; slider = new ccui.Slider(); slider.setTouchEnabled(true); slider.loadBarTexture("res/cocosui/sliderTrack.png"); slider.loadSlidBallTextures("res/cocosui/sliderThumb.png", "res/cocosui/sliderThumb.png", ""); slider.loadProgressBarTexture("res/cocosui/sliderProgress.png"); slider.x = cc.winSize.width / 2.0; slider.y = cc.winSize.height / 3.0 * 2; slider.addEventListener(this.sliderEventForGrossini, this); this.addChild(slider); slider.setPercent(20); l = new cc.LabelTTF("Control time scale only for Grossini", "Thonburi", 16); this.addChild(l); l.x = slider.x; l.y = slider.y + 30; slider = new ccui.Slider(); slider.setTouchEnabled(true); slider.loadBarTexture("res/cocosui/sliderTrack.png"); slider.loadSlidBallTextures("res/cocosui/sliderThumb.png", "res/cocosui/sliderThumb.png", ""); slider.loadProgressBarTexture("res/cocosui/sliderProgress.png"); slider.x = cc.winSize.width / 2.0; slider.y = cc.winSize.height / 3.0; slider.addEventListener(this.sliderEventForGlobal, this); this.addChild(slider); slider.setPercent(20); l = new cc.LabelTTF("Control time scale for all", "Thonburi", 16); this.addChild(l); l.x = slider.x; l.y = slider.y + 30; }, sliderEventForGrossini: function (sender, type) { switch (type) { case ccui.Slider.EVENT_PERCENT_CHANGED: var slider = sender; var percent = slider.getPercent() / 100.0 * 5; this._newScheduler.setTimeScale(percent); break; default: break; } }, sliderEventForGlobal: function (sender, type) { switch (type) { case ccui.Slider.EVENT_PERCENT_CHANGED: var slider = sender; var percent = slider.getPercent() / 100.0 * 5; cc.director.getScheduler().setTimeScale(percent); break; default: break; } }, onExit: function() { // restore scale cc.director.getScheduler().unscheduleUpdateForTarget(this._newScheduler); this._super(); }, title:function () { return "Scheduler timeScale Test"; }, subtitle:function () { return "Fast-forward and rewind using scheduler.timeScale"; } }); var unScheduleAndRepeatTest = SchedulerTestLayer.extend({ onEnter: function(){ this._super(); cc.log("start schedule 'repeat': run once and repeat 4 times"); this.schedule(this.repeat, 0.5, 4); cc.log("start schedule 'forever': repeat forever (stop in 8s)"); this.schedule(this.forever, 0.5); this.schedule(function(){ cc.log("stop the 'forever'"); this.unschedule(this.forever); }, 8); }, _times: 5, repeat: function(){ cc.log("Repeat - the remaining number: " + this._times--); }, forever: function(){ cc.log("Repeat Forever..."); }, title: function(){ return "Repeat And unschedule Test"; }, subtitle: function(){ return "Repeat will print 5 times\nForever will stop in 8 seconds."; } }); /* main entry */ var SchedulerTestScene = TestScene.extend({ runThisTest:function (num) { schedulerTestSceneIdx = (num || num == 0) ? (num - 1) : -1; var layer = nextSchedulerTest(); this.addChild(layer); director.runScene(this); } }); // // Flow control // var arrayOfSchedulerTest = [ SchedulerTimeScale, SchedulerAutoremove, SchedulerPauseResume, SchedulerUnscheduleAll, SchedulerUnscheduleAllHard, SchedulerSchedulesAndRemove, SchedulerUpdate, SchedulerUpdateAndCustom, SchedulerUpdateFromCustom, RescheduleCallback, ScheduleUsingSchedulerTest, unScheduleAndRepeatTest ]; var nextSchedulerTest = function () { schedulerTestSceneIdx++; schedulerTestSceneIdx = schedulerTestSceneIdx % arrayOfSchedulerTest.length; if(window.sideIndexBar){ schedulerTestSceneIdx = window.sideIndexBar.changeTest(schedulerTestSceneIdx, 34); } return new arrayOfSchedulerTest[schedulerTestSceneIdx](); }; var previousSchedulerTest = function () { schedulerTestSceneIdx--; if (schedulerTestSceneIdx < 0) schedulerTestSceneIdx += arrayOfSchedulerTest.length; if(window.sideIndexBar){ schedulerTestSceneIdx = window.sideIndexBar.changeTest(schedulerTestSceneIdx, 34); } return new arrayOfSchedulerTest[schedulerTestSceneIdx](); }; var restartSchedulerTest = function () { return new arrayOfSchedulerTest[schedulerTestSceneIdx](); };
synaptek/cocos2d-js
samples/js-tests/src/SchedulerTest/SchedulerTest.js
JavaScript
mit
20,638
//------------------------------------------------------------------------------ // <copyright file="MobileTemplatedControlDesigner.cs" company="Microsoft"> // Copyright (c) Microsoft Corporation. All rights reserved. // </copyright> //------------------------------------------------------------------------------ namespace System.Web.UI.Design.MobileControls { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Diagnostics; using System.Drawing; using System.Drawing.Design; using System.Globalization; using System.Reflection; using System.Text; using System.Web.UI; using System.Web.UI.Design; using System.Web.UI.Design.MobileControls.Adapters; using System.Web.UI.Design.MobileControls.Converters; using System.Web.UI.Design.MobileControls.Util; using System.Web.UI.MobileControls; using System.Web.UI.MobileControls.Adapters; using WebCtrlStyle = System.Web.UI.WebControls.Style; using DialogResult = System.Windows.Forms.DialogResult; [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] internal abstract class MobileTemplatedControlDesigner : TemplatedControlDesigner, IMobileDesigner, IDeviceSpecificDesigner { #if TRACE internal static BooleanSwitch TemplateableControlDesignerSwitch = new BooleanSwitch("MobileTemplatedControlDesigner", "Enable TemplateableControl designer general purpose traces."); #endif private System.Windows.Forms.Control _header; private MobileControl _mobileControl; private System.Web.UI.Control _control; private DesignerVerbCollection _designerVerbs = null; private DeviceSpecificChoice _currentChoice = null; private bool _containmentStatusDirty = true; private ContainmentStatus _containmentStatus; private IDesignerHost _host; private IWebFormsDocumentService _iWebFormsDocumentService; private IMobileWebFormServices _iMobileWebFormServices; private const String _htmlString = "html"; private TemplateEditingVerb[] _templateVerbs; private bool _templateVerbsDirty = true; private const int _templateWidth = 275; private static readonly String _noChoiceText = SR.GetString(SR.DeviceFilter_NoChoice); private static readonly String _defaultChoiceText = SR.GetString(SR.DeviceFilter_DefaultChoice); private static readonly String _nonHtmlSchemaErrorMessage = SR.GetString(SR.MobileControl_NonHtmlSchemaErrorMessage); private static readonly String _illFormedWarning = SR.GetString(SR.TemplateFrame_IllFormedWarning); private const String _illFormedHtml = "<DIV style=\"font-family:tahoma;font-size:8pt; COLOR: infotext; BACKGROUND-COLOR: infobackground\">{0}</DIV>"; internal const String DefaultTemplateDeviceFilter = "__TemplateDeviceFilter__"; private const String _templateDeviceFilterPropertyName = "TemplateDeviceFilter"; private const String _appliedDeviceFiltersPropertyName = "AppliedDeviceFilters"; private const String _propertyOverridesPropertyName = "PropertyOverrides"; private const String _expressionsPropertyName = "Expressions"; private const String _defaultDeviceSpecificIdentifier = "unique"; // used by DesignerAdapterUtil.GetMaxWidthToFit // and needs to be exposed in object model because // custom controls may need to access the value just like // DesignerAdapterUtil.GetMaxWidthToFit does. public virtual int TemplateWidth { get { return _templateWidth; } } public override bool AllowResize { get { // Non mobilecontrols (ie. DeviceSpecific) does not render templates, no need to resize. // When templates are not defined, we render a read-only fixed // size block. Once templates are defined or are being edited // the control should allow resizing. return InTemplateMode || (_mobileControl != null && _mobileControl.IsTemplated); } } private bool AllowTemplateEditing { get { return (CurrentChoice != null && IsHTMLSchema(CurrentChoice) && !ErrorMode); } } [ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Editor(typeof(AppliedDeviceFiltersTypeEditor), typeof(UITypeEditor)), MergableProperty(false), MobileCategory("Category_DeviceSpecific"), MobileSysDescription(SR.MobileControl_AppliedDeviceFiltersDescription), ParenthesizePropertyName(true), ] protected String AppliedDeviceFilters { get { return String.Empty; } } protected ContainmentStatus ContainmentStatus { get { if (!_containmentStatusDirty) { return _containmentStatus; } _containmentStatus = DesignerAdapterUtil.GetContainmentStatus(_control); _containmentStatusDirty = false; return _containmentStatus; } } public DeviceSpecificChoice CurrentChoice { get { return _currentChoice; } set { if (_currentChoice != value) { SetTemplateVerbsDirty(); _currentChoice = value; OnCurrentChoiceChange(); } } } public virtual DeviceSpecific CurrentDeviceSpecific { get { if (null == _mobileControl) { return null; } return _mobileControl.DeviceSpecific; } } internal Object DesignTimeElementInternal { get { return typeof(HtmlControlDesigner).InvokeMember("DesignTimeElement", BindingFlags.Instance | BindingFlags.GetProperty | BindingFlags.NonPublic, null, this, null, CultureInfo.InvariantCulture); } } public override bool DesignTimeHtmlRequiresLoadComplete { get { return true; } } // // Return true only when GetErrorMessage returns non-null string and // it is not info mode (warning only). protected virtual bool ErrorMode { get { bool infoMode; return (GetErrorMessage(out infoMode) != null && !infoMode); } } protected IDesignerHost Host { get { if (_host != null) { return _host; } _host = (IDesignerHost)GetService(typeof(IDesignerHost)); Debug.Assert(_host != null); return _host; } } protected IMobileWebFormServices IMobileWebFormServices { get { if (_iMobileWebFormServices == null) { _iMobileWebFormServices = (IMobileWebFormServices)GetService(typeof(IMobileWebFormServices)); } return _iMobileWebFormServices; } } private IWebFormsDocumentService IWebFormsDocumentService { get { if (_iWebFormsDocumentService == null) { _iWebFormsDocumentService = (IWebFormsDocumentService)GetService(typeof(IWebFormsDocumentService)); Debug.Assert(_iWebFormsDocumentService != null); } return _iWebFormsDocumentService; } } /// <summary> /// Indicates whether the initial page load is completed /// </summary> protected bool LoadComplete { get { return !IWebFormsDocumentService.IsLoading; } } [ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Editor(typeof(PropertyOverridesTypeEditor), typeof(UITypeEditor)), MergableProperty(false), MobileCategory("Category_DeviceSpecific"), MobileSysDescription(SR.MobileControl_DeviceSpecificPropsDescription), ParenthesizePropertyName(true), ] protected String PropertyOverrides { get { return String.Empty; } } [ DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), MobileSysDescription(SR.TemplateableDesigner_TemplateChoiceDescription), TypeConverter(typeof(ChoiceConverter)), ] public String TemplateDeviceFilter { get { if (null == CurrentChoice) { return _noChoiceText; } if (CurrentChoice.Filter.Length == 0) { return _defaultChoiceText; } else { return DesignerUtility.ChoiceToUniqueIdentifier(CurrentChoice); } } set { if (String.IsNullOrEmpty(value) || value.Equals(SR.GetString(SR.DeviceFilter_NoChoice))) { CurrentChoice = null; return; } if (null == CurrentDeviceSpecific) { return; } Debug.Assert(CurrentDeviceSpecific.Choices != null); foreach (DeviceSpecificChoice choice in CurrentDeviceSpecific.Choices) { if (DesignerUtility.ChoiceToUniqueIdentifier(choice).Equals(value) || (choice.Filter.Length == 0 && value.Equals(SR.GetString(SR.DeviceFilter_DefaultChoice)))) { CurrentChoice = choice; return; } } CurrentChoice = null; } } private bool ValidContainment { get { return (ContainmentStatus == ContainmentStatus.InForm || ContainmentStatus == ContainmentStatus.InPanel || ContainmentStatus == ContainmentStatus.InTemplateFrame); } } public override DesignerVerbCollection Verbs { get { if (_designerVerbs == null) { _designerVerbs = new DesignerVerbCollection(); _designerVerbs.Add(new DesignerVerb( SR.GetString(SR.TemplateableDesigner_SetTemplatesFilterVerb), new EventHandler(this.OnSetTemplatesFilterVerb))); } _designerVerbs[0].Enabled = !this.InTemplateMode; return _designerVerbs; } } protected WebCtrlStyle WebCtrlStyle { get { WebCtrlStyle style = new WebCtrlStyle(); if (_mobileControl != null) { _mobileControl.Style.ApplyTo(style); } else { Debug.Assert(_control is DeviceSpecific); if (_control.Parent is Panel) { ((Panel)_control.Parent).Style.ApplyTo(style); } } return style; } } [ Conditional("DEBUG") ] private void CheckTemplateName(String templateName) { Debug.Assert ( templateName == Constants.HeaderTemplateTag || templateName == Constants.FooterTemplateTag || templateName == Constants.ItemTemplateTag || templateName == Constants.AlternatingItemTemplateTag || templateName == Constants.SeparatorTemplateTag || templateName == Constants.ItemDetailsTemplateTag || templateName == Constants.ContentTemplateTag); } protected override ITemplateEditingFrame CreateTemplateEditingFrame(TemplateEditingVerb verb) { ITemplateEditingService teService = (ITemplateEditingService)GetService(typeof(ITemplateEditingService)); Debug.Assert(teService != null, "How did we get this far without an ITemplateEditingService"); String[] templateNames = GetTemplateFrameNames(verb.Index); ITemplateEditingFrame editingFrame = teService.CreateFrame( this, TemplateDeviceFilter, templateNames, WebCtrlStyle, null /* we don't have template styles */); editingFrame.InitialWidth = _templateWidth; return editingFrame; } protected override void Dispose(bool disposing) { if (disposing) { DisposeTemplateVerbs(); if (IMobileWebFormServices != null) { // If the page is in loading mode, it means the remove is trigged by webformdesigner. if (IWebFormsDocumentService.IsLoading) { IMobileWebFormServices.SetCache(_control.ID, (Object) DefaultTemplateDeviceFilter, (Object) this.TemplateDeviceFilter); } else { // setting to null will remove the entry. IMobileWebFormServices.SetCache(_control.ID, (Object) DefaultTemplateDeviceFilter, null); } } } base.Dispose(disposing); } public override void OnComponentChanged(Object sender, ComponentChangedEventArgs ce) { base.OnComponentChanged(sender, ce); MemberDescriptor member = ce.Member; if (member != null && member.GetType().FullName.Equals(Constants.ReflectPropertyDescriptorTypeFullName)) { PropertyDescriptor propDesc = (PropertyDescriptor)member; switch (propDesc.Name) { case "ID": { // Update the dictionary of device filters stored in the page designer // setting to null will remove the entry. IMobileWebFormServices.SetCache(ce.OldValue.ToString(), (Object) DefaultTemplateDeviceFilter, null); break; } case "BackColor": case "ForeColor": case "Font": case "StyleReference": { SetTemplateVerbsDirty(); break; } } } } private void DisposeTemplateVerbs() { if (_templateVerbs != null) { for (int i = 0; i < _templateVerbs.Length; i++) { _templateVerbs[i].Dispose(); } _templateVerbs = null; _templateVerbsDirty = true; } } protected override TemplateEditingVerb[] GetCachedTemplateEditingVerbs() { if (ErrorMode) { return null; } // dispose template verbs during template editing would cause exiting from editing mode // without saving. if (_templateVerbsDirty == true && !InTemplateMode) { DisposeTemplateVerbs(); _templateVerbs = GetTemplateVerbs(); _templateVerbsDirty = false; } foreach(TemplateEditingVerb verb in _templateVerbs) { verb.Enabled = AllowTemplateEditing; } return _templateVerbs; } // Gets the HTML to be used for the design time representation of the control runtime. public sealed override String GetDesignTimeHtml() { if (!LoadComplete) { return null; } bool infoMode; String errorMessage = GetErrorMessage(out infoMode); SetStyleAttributes(); if (null != errorMessage) { return GetDesignTimeErrorHtml(errorMessage, infoMode); } String designTimeHTML = null; // This is to avoiding cascading error rendering. try { designTimeHTML = GetDesignTimeNormalHtml(); } catch (Exception ex) { Debug.Fail(ex.ToString()); designTimeHTML = GetDesignTimeErrorHtml(ex.Message, false); } return designTimeHTML; } protected virtual String GetDesignTimeErrorHtml(String errorMessage, bool infoMode) { return DesignerAdapterUtil.GetDesignTimeErrorHtml( errorMessage, infoMode, _control, Behavior, ContainmentStatus); } protected virtual String GetDesignTimeNormalHtml() { return GetEmptyDesignTimeHtml(); } // We sealed this method because it will never be called // by our designers under current structure. protected override sealed String GetErrorDesignTimeHtml(Exception e) { return base.GetErrorDesignTimeHtml(e); } protected virtual String GetErrorMessage(out bool infoMode) { infoMode = false; if (!DesignerAdapterUtil.InMobileUserControl(_control)) { if (DesignerAdapterUtil.InUserControl(_control)) { infoMode = true; return MobileControlDesigner._userControlWarningMessage; } if (!DesignerAdapterUtil.InMobilePage(_control)) { return MobileControlDesigner._mobilePageErrorMessage; } if (!ValidContainment) { return MobileControlDesigner._formPanelContainmentErrorMessage; } } if (CurrentChoice != null && !IsHTMLSchema(CurrentChoice)) { infoMode = true; return _nonHtmlSchemaErrorMessage; } // Containment is valid, return null; return null; } /// <summary> /// <para> /// Gets the HTML to be persisted for the content present within the associated server control runtime. /// </para> /// </summary> /// <returns> /// <para> /// Persistable Inner HTML. /// </para> /// </returns> public override String GetPersistInnerHtml() { String persist = null; if (InTemplateMode) { SaveActiveTemplateEditingFrame(); } if (IsDirty) { persist = MobileControlPersister.PersistInnerProperties(Component, Host); } if (InTemplateMode) { IsDirty = true; } return persist; } public override String GetTemplateContent( ITemplateEditingFrame editingFrame, String templateName, out bool allowEditing) { Debug.Assert(AllowTemplateEditing); #if DEBUG CheckTemplateName(templateName); #endif allowEditing = true; ITemplate template = null; String templateContent = String.Empty; // Here we trust the TemplateVerbs to give valid template names template = (ITemplate)CurrentChoice.Templates[templateName]; if (template != null) { templateContent = GetTextFromTemplate(template); if (!IsCompleteHtml(templateContent)) { allowEditing = false; templateContent = String.Format(CultureInfo.CurrentCulture, _illFormedHtml, _illFormedWarning); } } return templateContent; } protected abstract String[] GetTemplateFrameNames(int index); protected abstract TemplateEditingVerb[] GetTemplateVerbs(); /// <summary> /// <para> /// Initializes the designer. /// </para> /// </summary> /// <param name='component'> /// The control element being designed. /// </param> /// <remarks> /// <para> /// This is called by the designer host to establish the component being /// designed. /// </para> /// </remarks> /// <seealso cref='System.ComponentModel.Design.IDesigner'/> public override void Initialize(IComponent component) { Debug.Assert(component is System.Web.UI.MobileControls.MobileControl || component is System.Web.UI.MobileControls.DeviceSpecific, "MobileTemplatedControlDesigner.Initialize - Invalid (Mobile) Control"); base.Initialize(component); if (component is System.Web.UI.MobileControls.MobileControl) { _mobileControl = (System.Web.UI.MobileControls.MobileControl) component; } // else the component is a DeviceSpecific control _control = (System.Web.UI.Control) component; if (IMobileWebFormServices != null) { this.TemplateDeviceFilter = (String) IMobileWebFormServices.GetCache(_control.ID, (Object)DefaultTemplateDeviceFilter); } } private bool IsCompleteHtml(String templateContent) { if (!String.IsNullOrEmpty(templateContent)) { return SimpleParser.IsWellFormed(templateContent); } // if template is empty, it's always editable. return true; } protected bool IsHTMLSchema(DeviceSpecificChoice choice) { Debug.Assert(choice != null); return choice.Xmlns != null && choice.Xmlns.ToLower(CultureInfo.InvariantCulture).IndexOf(_htmlString, StringComparison.Ordinal) != -1; } // Notification that is called when current choice is changed, it is currently // used to notify StyleSheet that template device filter is changed. protected virtual void OnCurrentChoiceChange() { } /// <summary> /// <para> /// Notification that is called when internal changes have been made. /// </para> /// </summary> protected virtual void OnInternalChange() { ISite site = _control.Site; if (site != null) { IComponentChangeService changeService = (IComponentChangeService)site.GetService(typeof(IComponentChangeService)); if (changeService != null) { try { changeService.OnComponentChanging(_control, null); } catch (CheckoutException ex) { if (ex == CheckoutException.Canceled) { return; } throw; } changeService.OnComponentChanged(_control, null, null, null); } } } /// <summary> /// <para> /// Notification that is called when the associated control is parented. /// </para> /// </summary> public override void OnSetParent() { base.OnSetParent(); // Template verbs may need to be refreshed SetTemplateVerbsDirty(); // this needs to be set before OnLoadComplete; _containmentStatusDirty = true; if (LoadComplete) { UpdateRendering(); } } private void OnSetTemplatesFilterVerb(Object sender, EventArgs e) { ShowTemplatingOptionsDialog(); } protected override void OnTemplateModeChanged() { base.OnTemplateModeChanged(); if (InTemplateMode) { // Set xmlns in view linked document to show HTML intrinsic // controls in property grid with same schema used by // Intellisense for current choice tag in HTML view. // This code won't work in Venus now since there are no viewlinks and // they don't support this kind of schema. /* NativeMethods.IHTMLElement htmlElement = (NativeMethods.IHTMLElement) ((IHtmlControlDesignerBehavior) Behavior).DesignTimeElementView; Debug.Assert(htmlElement != null, "Invalid HTML element in MobileTemplateControlDesigner.OnTemplateModeChanged"); NativeMethods.IHTMLDocument2 htmlDocument2 = (NativeMethods.IHTMLDocument2) htmlElement.GetDocument(); Debug.Assert(htmlDocument2 != null, "Invalid HTML Document2 in MobileTemplateControlDesigner.OnTemplateModeChanged"); NativeMethods.IHTMLElement htmlBody = (NativeMethods.IHTMLElement) htmlDocument2.GetBody(); Debug.Assert(htmlBody != null, "Invalid HTML Body in MobileTemplateControlDesigner.OnTemplateModeChanged"); htmlBody.SetAttribute("xmlns", (Object) CurrentChoice.Xmlns, 0); */ } } protected override void PreFilterProperties(IDictionary properties) { base.PreFilterProperties(properties); // DesignTime Property only, we will use this to select choices. properties[_templateDeviceFilterPropertyName] = TypeDescriptor.CreateProperty(this.GetType(), _templateDeviceFilterPropertyName, typeof(String), new DefaultValueAttribute(SR.GetString(SR.DeviceFilter_NoChoice)), MobileCategoryAttribute.Design, InTemplateMode ? BrowsableAttribute.No : BrowsableAttribute.Yes ); // design time only entry used to display dialog box used to create choices. properties[_appliedDeviceFiltersPropertyName] = TypeDescriptor.CreateProperty(this.GetType(), _appliedDeviceFiltersPropertyName, typeof(String), InTemplateMode? BrowsableAttribute.No : BrowsableAttribute.Yes ); // design time only entry used to display dialog box to create choices. properties[_propertyOverridesPropertyName] = TypeDescriptor.CreateProperty(this.GetType(), _propertyOverridesPropertyName, typeof(String), InTemplateMode? BrowsableAttribute.No : BrowsableAttribute.Yes ); PropertyDescriptor property = (PropertyDescriptor) properties[_expressionsPropertyName]; if (property != null) { properties[_expressionsPropertyName] = TypeDescriptor.CreateProperty(this.GetType(), property, BrowsableAttribute.No); } } protected virtual void SetStyleAttributes() { Debug.Assert(Behavior != null); DesignerAdapterUtil.SetStandardStyleAttributes(Behavior, ContainmentStatus); } public override void SetTemplateContent( ITemplateEditingFrame editingFrame, String templateName, String templateContent) { Debug.Assert(AllowTemplateEditing); // Debug build only checking CheckTemplateName(templateName); ITemplate template = null; if ((templateContent != null) && (templateContent.Length != 0)) { template = GetTemplateFromText(templateContent); } else { CurrentChoice.Templates.Remove(templateName); return; } // Here we trust the TemplateVerbs to give valid template names CurrentChoice.Templates[templateName] = template; } protected internal void SetTemplateVerbsDirty() { _templateVerbsDirty = true; } protected virtual void ShowTemplatingOptionsDialog() { IComponentChangeService changeService = (IComponentChangeService)GetService(typeof(IComponentChangeService)); if (changeService != null) { try { changeService.OnComponentChanging(_control, null); } catch (CheckoutException ex) { if (ex == CheckoutException.Canceled) { return; } throw; } } try { TemplatingOptionsDialog dialog = new TemplatingOptionsDialog( this, _control.Site, MobileControlDesigner.MergingContextTemplates); dialog.ShowDialog(); } finally { if (changeService != null) { changeService.OnComponentChanged(_control, null, null, null); if (IMobileWebFormServices != null) { IMobileWebFormServices.ClearUndoStack(); } } } } public void UpdateRendering() { if (!(null == _mobileControl || _mobileControl is StyleSheet)) { _mobileControl.RefreshStyle(); } // template editing frame need to be recreated because the style // (WebCtrlStyle) to use may have to change SetTemplateVerbsDirty(); if (!InTemplateMode) { UpdateDesignTimeHtml(); } } //////////////////////////////////////////////////////////////////////// // Begin IDeviceSpecificDesigner Implementation //////////////////////////////////////////////////////////////////////// void IDeviceSpecificDesigner.SetDeviceSpecificEditor (IRefreshableDeviceSpecificEditor editor) { } String IDeviceSpecificDesigner.CurrentDeviceSpecificID { get { return _defaultDeviceSpecificIdentifier; } } System.Windows.Forms.Control IDeviceSpecificDesigner.Header { get { return _header; } } System.Web.UI.Control IDeviceSpecificDesigner.UnderlyingControl { get { return _control; } } Object IDeviceSpecificDesigner.UnderlyingObject { get { return _control; } } void IDeviceSpecificDesigner.InitHeader(int mergingContext) { HeaderPanel panel = new HeaderPanel(); HeaderLabel lblDescription = new HeaderLabel(); lblDescription.TabIndex = 0; lblDescription.Height = 24; lblDescription.Width = 204; panel.Height = 28; panel.Width = 204; panel.Controls.Add(lblDescription); switch (mergingContext) { case MobileControlDesigner.MergingContextTemplates: { lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingTemplatingChoiceDescription); break; } default: { lblDescription.Text = SR.GetString(SR.TemplateableDesigner_SettingGenericChoiceDescription); break; } } _header = panel; } void IDeviceSpecificDesigner.RefreshHeader(int mergingContext) { } bool IDeviceSpecificDesigner.GetDeviceSpecific(String deviceSpecificParentID, out DeviceSpecific ds) { Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID); ds = CurrentDeviceSpecific; return true; } void IDeviceSpecificDesigner.SetDeviceSpecific(String deviceSpecificParentID, DeviceSpecific ds) { Debug.Assert(_defaultDeviceSpecificIdentifier == deviceSpecificParentID); if (_mobileControl != null) { if (null != ds) { ds.SetOwner(_mobileControl); } _mobileControl.DeviceSpecific = ds; } else if (_control != null && ds == null) { Debug.Assert(_control is DeviceSpecific); // Clear the choices if it is a DeviceSpecific control. ((DeviceSpecific)_control).Choices.Clear(); } if (null != CurrentChoice) { if (null == ds) { CurrentChoice = null; } else { // This makes sure that the CurrentChoice value is set to null if // it was deleted during the deviceSpecific object editing if (CurrentChoice.Filter.Length == 0) { TemplateDeviceFilter = SR.GetString(SR.DeviceFilter_DefaultChoice); } else { TemplateDeviceFilter = DesignerUtility.ChoiceToUniqueIdentifier(CurrentChoice); } } } } void IDeviceSpecificDesigner.UseCurrentDeviceSpecificID() { } //////////////////////////////////////////////////////////////////////// // End IDeviceSpecificDesigner Implementation //////////////////////////////////////////////////////////////////////// // Hack : Internal class used to provide TemplateContainerAttribute for Templates. [ System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags=System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode) ] [Obsolete("The System.Web.Mobile.dll assembly has been deprecated and should no longer be used. For information about how to develop ASP.NET mobile applications, see http://go.microsoft.com/fwlink/?LinkId=157231.")] internal class TemplateContainer { [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate HeaderTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate FooterTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate ItemTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate AlternatingItemTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate SeparatorTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate ContentTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate LabelTemplate { get {return null;} } [ TemplateContainer(typeof(MobileListItem)) ] internal ITemplate ItemDetailsTemplate { get {return null;} } } } }
eric-stanley/referencesource
System.Web.Mobile/UI/MobileControls/Design/MobileTemplatedControlDesigner.cs
C#
mit
38,744
/*************************************************************************** * _ _ ____ _ * Project ___| | | | _ \| | * / __| | | | |_) | | * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms * are also available at https://curl.haxx.se/docs/copyright.html. * * You may opt to use, copy, modify, merge, publish, distribute and/or sell * copies of the Software, and permit persons to whom the Software is * furnished to do so, under the terms of the COPYING file. * * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * KIND, either express or implied. * ***************************************************************************/ #include "curlcheck.h" #include "urldata.h" #include "curl_ntlm_core.h" CURL *easy; static CURLcode unit_setup(void) { easy = curl_easy_init(); return CURLE_OK; } static void unit_stop(void) { curl_easy_cleanup(easy); } UNITTEST_START #if defined(USE_NTLM) && (!defined(USE_WINDOWS_SSPI) || \ defined(USE_WIN32_CRYPTO)) unsigned char output[21]; unsigned char *testp = output; Curl_ntlm_core_mk_nt_hash(easy, "1", output); verify_memory(testp, "\x69\x94\x3c\x5e\x63\xb4\xd2\xc1\x04\xdb" "\xbc\xc1\x51\x38\xb7\x2b\x00\x00\x00\x00\x00", 21); Curl_ntlm_core_mk_nt_hash(easy, "hello-you-fool", output); verify_memory(testp, "\x39\xaf\x87\xa6\x75\x0a\x7a\x00\xba\xa0" "\xd3\x4f\x04\x9e\xc1\xd0\x00\x00\x00\x00\x00", 21); /* !checksrc! disable LONGLINE 2 */ Curl_ntlm_core_mk_nt_hash(easy, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", output); verify_memory(testp, "\x36\x9d\xae\x06\x84\x7e\xe1\xc1\x4a\x94\x39\xea\x6f\x44\x8c\x65\x00\x00\x00\x00\x00", 21); #endif UNITTEST_STOP
K-Constantine/Amaraki
core/deps/curl/tests/unit/unit1600.c
C
mit
2,390
/** * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components * @version v12.0.2 * @link http://www.ag-grid.com/ * @license MIT */ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var constants_1 = require("../constants"); var utils_1 = require("../utils"); var gridCell_1 = require("./gridCell"); var GridRow = (function () { function GridRow(rowIndex, floating) { this.rowIndex = rowIndex; this.floating = utils_1.Utils.makeNull(floating); } GridRow.prototype.isFloatingTop = function () { return this.floating === constants_1.Constants.PINNED_TOP; }; GridRow.prototype.isFloatingBottom = function () { return this.floating === constants_1.Constants.PINNED_BOTTOM; }; GridRow.prototype.isNotFloating = function () { return !this.isFloatingBottom() && !this.isFloatingTop(); }; GridRow.prototype.equals = function (otherSelection) { return this.rowIndex === otherSelection.rowIndex && this.floating === otherSelection.floating; }; GridRow.prototype.toString = function () { return "rowIndex = " + this.rowIndex + ", floating = " + this.floating; }; GridRow.prototype.getGridCell = function (column) { var gridCellDef = { rowIndex: this.rowIndex, floating: this.floating, column: column }; return new gridCell_1.GridCell(gridCellDef); }; // tests if this row selection is before the other row selection GridRow.prototype.before = function (otherSelection) { var otherFloating = otherSelection.floating; switch (this.floating) { case constants_1.Constants.PINNED_TOP: // we we are floating top, and other isn't, then we are always before if (otherFloating !== constants_1.Constants.PINNED_TOP) { return true; } break; case constants_1.Constants.PINNED_BOTTOM: // if we are floating bottom, and the other isn't, then we are never before if (otherFloating !== constants_1.Constants.PINNED_BOTTOM) { return false; } break; default: // if we are not floating, but the other one is floating... if (utils_1.Utils.exists(otherFloating)) { if (otherFloating === constants_1.Constants.PINNED_TOP) { // we are not floating, other is floating top, we are first return false; } else { // we are not floating, other is floating bottom, we are always first return true; } } break; } return this.rowIndex <= otherSelection.rowIndex; }; return GridRow; }()); exports.GridRow = GridRow;
froala/cdnjs
ajax/libs/ag-grid/12.0.2/lib/entities/gridRow.js
JavaScript
mit
2,979
/** * @license Copyright (c) 2003-2015, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md or http://ckeditor.com/license */ /** * @fileOverview */ /**#@+ @type String @example */ /** * Contains the dictionary of language entries. * @namespace */ CKEDITOR.lang[ 'tr' ] = { // ARIA description. editor: 'Zengin Metin Editörü', editorPanel: 'Zengin Metin Editör Paneli', // Common messages and labels. common: { // Screenreader titles. Please note that screenreaders are not always capable // of reading non-English words. So be careful while translating it. editorHelp: 'Yardım için ALT 0 tuşlarına basın', browseServer: 'Sunucuya Gözat', url: 'URL', protocol: 'Protokol', upload: 'Karşıya Yükle', uploadSubmit: 'Sunucuya Gönder', image: 'Resim', flash: 'Flash', form: 'Form', checkbox: 'Onay Kutusu', radio: 'Seçenek Düğmesi', textField: 'Metin Kutusu', textarea: 'Metin Alanı', hiddenField: 'Gizli Alan', button: 'Düğme', select: 'Seçme Alanı', imageButton: 'Resim Düğmesi', notSet: '<tanımlanmamış>', id: 'Kimlik', name: 'İsim', langDir: 'Dil Yönü', langDirLtr: 'Soldan Sağa (LTR)', langDirRtl: 'Sağdan Sola (RTL)', langCode: 'Dil Kodlaması', longDescr: 'Uzun Tanımlı URL', cssClass: 'Biçem Sayfası Sınıfları', advisoryTitle: 'Öneri Başlığı', cssStyle: 'Biçem', ok: 'Tamam', cancel: 'İptal', close: 'Kapat', preview: 'Önizleme', resize: 'Yeniden Boyutlandır', generalTab: 'Genel', advancedTab: 'Gelişmiş', validateNumberFailed: 'Bu değer bir sayı değildir.', confirmNewPage: 'Bu içerikle ilgili kaydedilmemiş tüm bilgiler kaybolacaktır. Yeni bir sayfa yüklemek istediğinizden emin misiniz?', confirmCancel: 'Bazı seçenekleri değiştirdiniz. İletişim penceresini kapatmak istediğinizden emin misiniz?', options: 'Seçenekler', target: 'Hedef', targetNew: 'Yeni Pencere (_blank)', targetTop: 'En Üstteki Pencere (_top)', targetSelf: 'Aynı Pencere (_self)', targetParent: 'Üst Pencere (_parent)', langDirLTR: 'Soldan Sağa (LTR)', langDirRTL: 'Sağdan Sola (RTL)', styles: 'Biçem', cssClasses: 'Biçem Sayfası Sınıfları', width: 'Genişlik', height: 'Yükseklik', align: 'Hizalama', alignLeft: 'Sol', alignRight: 'Sağ', alignCenter: 'Ortala', alignJustify: 'İki Kenara Yaslanmış', alignTop: 'Üst', alignMiddle: 'Orta', alignBottom: 'Alt', alignNone: 'Hiçbiri', invalidValue : 'Geçersiz değer.', invalidHeight: 'Yükseklik değeri bir sayı olmalıdır.', invalidWidth: 'Genişlik değeri bir sayı olmalıdır.', invalidCssLength: '"%1" alanı için verilen değer, geçerli bir CSS ölçü birimi (px, %, in, cm, mm, em, ex, pt, veya pc) içeren veya içermeyen pozitif bir sayı olmalıdır.', invalidHtmlLength: 'Belirttiğiniz sayı "%1" alanı için pozitif bir sayı HTML birim değeri olmalıdır (px veya %).', invalidInlineStyle: 'Satıriçi biçem için verilen değer, "isim : değer" biçiminde birbirinden noktalı virgüllerle ayrılan bir veya daha fazla değişkenler grubundan oluşmalıdır.', cssLengthTooltip: 'Piksel türünde bir sayı veya geçerli bir CSS ölçü birimi (px, %, in, cm, mm, em, ex, pt veya pc) içeren bir sayı girin.', // Put the voice-only part of the label in the span. unavailable: '%1<span class="cke_accessibility">, kullanılamaz</span>' } };
nickofbh/kort2
app/static/js/ckeditor/lang/tr.js
JavaScript
mit
3,471
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _TemplateTag = require('../TemplateTag'); var _TemplateTag2 = _interopRequireDefault(_TemplateTag); var _inlineArrayTransformer = require('../inlineArrayTransformer'); var _inlineArrayTransformer2 = _interopRequireDefault(_inlineArrayTransformer); var _trimResultTransformer = require('../trimResultTransformer'); var _trimResultTransformer2 = _interopRequireDefault(_trimResultTransformer); var _replaceResultTransformer = require('../replaceResultTransformer'); var _replaceResultTransformer2 = _interopRequireDefault(_replaceResultTransformer); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var oneLineCommaListsAnd = new _TemplateTag2.default((0, _inlineArrayTransformer2.default)({ separator: ',', conjunction: 'and' }), (0, _replaceResultTransformer2.default)(/(?:\s+)/g, ' '), _trimResultTransformer2.default); exports.default = oneLineCommaListsAnd; module.exports = exports['default']; //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9vbmVMaW5lQ29tbWFMaXN0c0FuZC9vbmVMaW5lQ29tbWFMaXN0c0FuZC5qcyJdLCJuYW1lcyI6WyJvbmVMaW5lQ29tbWFMaXN0c0FuZCIsInNlcGFyYXRvciIsImNvbmp1bmN0aW9uIl0sIm1hcHBpbmdzIjoiOzs7Ozs7QUFBQTs7OztBQUNBOzs7O0FBQ0E7Ozs7QUFDQTs7Ozs7O0FBRUEsSUFBTUEsdUJBQXVCLDBCQUMzQixzQ0FBdUIsRUFBRUMsV0FBVyxHQUFiLEVBQWtCQyxhQUFhLEtBQS9CLEVBQXZCLENBRDJCLEVBRTNCLHdDQUF5QixVQUF6QixFQUFxQyxHQUFyQyxDQUYyQixrQ0FBN0I7O2tCQU1lRixvQiIsImZpbGUiOiJvbmVMaW5lQ29tbWFMaXN0c0FuZC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCBUZW1wbGF0ZVRhZyBmcm9tICcuLi9UZW1wbGF0ZVRhZyc7XG5pbXBvcnQgaW5saW5lQXJyYXlUcmFuc2Zvcm1lciBmcm9tICcuLi9pbmxpbmVBcnJheVRyYW5zZm9ybWVyJztcbmltcG9ydCB0cmltUmVzdWx0VHJhbnNmb3JtZXIgZnJvbSAnLi4vdHJpbVJlc3VsdFRyYW5zZm9ybWVyJztcbmltcG9ydCByZXBsYWNlUmVzdWx0VHJhbnNmb3JtZXIgZnJvbSAnLi4vcmVwbGFjZVJlc3VsdFRyYW5zZm9ybWVyJztcblxuY29uc3Qgb25lTGluZUNvbW1hTGlzdHNBbmQgPSBuZXcgVGVtcGxhdGVUYWcoXG4gIGlubGluZUFycmF5VHJhbnNmb3JtZXIoeyBzZXBhcmF0b3I6ICcsJywgY29uanVuY3Rpb246ICdhbmQnIH0pLFxuICByZXBsYWNlUmVzdWx0VHJhbnNmb3JtZXIoLyg/OlxccyspL2csICcgJyksXG4gIHRyaW1SZXN1bHRUcmFuc2Zvcm1lcixcbik7XG5cbmV4cG9ydCBkZWZhdWx0IG9uZUxpbmVDb21tYUxpc3RzQW5kO1xuIl19
brett-harvey/Smart-Contracts
Ethereum-based-Roll4Win/node_modules/common-tags/lib/oneLineCommaListsAnd/oneLineCommaListsAnd.js
JavaScript
mit
2,244
<div> Fornisce una funzionalità simile a <a href="http://en.wikipedia.org/wiki/cron">cron</a> per eseguire questo progetto periodicamente. <p> Questa funzionalità è stata sviluppata principalmente per utilizzare Jenkins come sostituto di cron, e <b>non è ideale per compilare progetti software in modo regolare</b>. Quando si inizia ad utilizzare la continuous integration, gli sviluppatori sono spesso abituati all'idea di utilizzare compilazioni pianificate con regolarità (ad es. nightly/weekly builds) e utilizzano questa funzionalità. Tuttavia, la chiave della continuous integration è avviare una compilazione non appena è stata apportata una modifica, per fornire un feedback rapido ad essa. Per fare ciò è necessario <a href="https://jenkins.io/redirect/scm-change-trigger">collegare le notifiche delle modifiche nel sistema di controllo del codice sorgente a Jenkins</a>. <p> Quindi, prima di utilizzare questa funzionalità, ci si fermi e ci si chieda se questo è veramente ciò che si vuole. </div>
andresrc/jenkins
core/src/main/resources/hudson/triggers/TimerTrigger/help_it.html
HTML
mit
1,057
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved. See License.txt in the project root for license information. ;(function (undefined) { var objectTypes = { 'boolean': false, 'function': true, 'object': true, 'number': false, 'string': false, 'undefined': false }; var root = (objectTypes[typeof window] && window) || this, freeExports = objectTypes[typeof exports] && exports && !exports.nodeType && exports, freeModule = objectTypes[typeof module] && module && !module.nodeType && module, moduleExports = freeModule && freeModule.exports === freeExports && freeExports, freeGlobal = objectTypes[typeof global] && global; if (freeGlobal && (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal)) { root = freeGlobal; } var Rx = { internals: {}, config: { Promise: root.Promise }, helpers: { } }; // Defaults var noop = Rx.helpers.noop = function () { }, notDefined = Rx.helpers.notDefined = function (x) { return typeof x === 'undefined'; }, isScheduler = Rx.helpers.isScheduler = function (x) { return x instanceof Rx.Scheduler; }, identity = Rx.helpers.identity = function (x) { return x; }, pluck = Rx.helpers.pluck = function (property) { return function (x) { return x[property]; }; }, just = Rx.helpers.just = function (value) { return function () { return value; }; }, defaultNow = Rx.helpers.defaultNow = Date.now, defaultComparer = Rx.helpers.defaultComparer = function (x, y) { return isEqual(x, y); }, defaultSubComparer = Rx.helpers.defaultSubComparer = function (x, y) { return x > y ? 1 : (x < y ? -1 : 0); }, defaultKeySerializer = Rx.helpers.defaultKeySerializer = function (x) { return x.toString(); }, defaultError = Rx.helpers.defaultError = function (err) { throw err; }, isPromise = Rx.helpers.isPromise = function (p) { return !!p && typeof p.then === 'function'; }, asArray = Rx.helpers.asArray = function () { return Array.prototype.slice.call(arguments); }, not = Rx.helpers.not = function (a) { return !a; }, isFunction = Rx.helpers.isFunction = (function () { var isFn = function (value) { return typeof value == 'function' || false; } // fallback for older versions of Chrome and Safari if (isFn(/x/)) { isFn = function(value) { return typeof value == 'function' && toString.call(value) == '[object Function]'; }; } return isFn; }()); function cloneArray(arr) { var len = arr.length, a = new Array(len); for(var i = 0; i < len; i++) { a[i] = arr[i]; } return a; } Rx.config.longStackSupport = false; var hasStacks = false; try { throw new Error(); } catch (e) { hasStacks = !!e.stack; } // All code after this point will be filtered from stack traces reported by RxJS var rStartingLine = captureLine(), rFileName; var STACK_JUMP_SEPARATOR = "From previous event:"; function makeStackTraceLong(error, observable) { // If possible, transform the error stack trace by removing Node and RxJS // cruft, then concatenating with the stack trace of `observable`. if (hasStacks && observable.stack && typeof error === "object" && error !== null && error.stack && error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 ) { var stacks = []; for (var o = observable; !!o; o = o.source) { if (o.stack) { stacks.unshift(o.stack); } } stacks.unshift(error.stack); var concatedStacks = stacks.join("\n" + STACK_JUMP_SEPARATOR + "\n"); error.stack = filterStackString(concatedStacks); } } function filterStackString(stackString) { var lines = stackString.split("\n"), desiredLines = []; for (var i = 0, len = lines.length; i < len; i++) { var line = lines[i]; if (!isInternalFrame(line) && !isNodeFrame(line) && line) { desiredLines.push(line); } } return desiredLines.join("\n"); } function isInternalFrame(stackLine) { var fileNameAndLineNumber = getFileNameAndLineNumber(stackLine); if (!fileNameAndLineNumber) { return false; } var fileName = fileNameAndLineNumber[0], lineNumber = fileNameAndLineNumber[1]; return fileName === rFileName && lineNumber >= rStartingLine && lineNumber <= rEndingLine; } function isNodeFrame(stackLine) { return stackLine.indexOf("(module.js:") !== -1 || stackLine.indexOf("(node.js:") !== -1; } function captureLine() { if (!hasStacks) { return; } try { throw new Error(); } catch (e) { var lines = e.stack.split("\n"); var firstLine = lines[0].indexOf("@") > 0 ? lines[1] : lines[2]; var fileNameAndLineNumber = getFileNameAndLineNumber(firstLine); if (!fileNameAndLineNumber) { return; } rFileName = fileNameAndLineNumber[0]; return fileNameAndLineNumber[1]; } } function getFileNameAndLineNumber(stackLine) { // Named functions: "at functionName (filename:lineNumber:columnNumber)" var attempt1 = /at .+ \((.+):(\d+):(?:\d+)\)$/.exec(stackLine); if (attempt1) { return [attempt1[1], Number(attempt1[2])]; } // Anonymous functions: "at filename:lineNumber:columnNumber" var attempt2 = /at ([^ ]+):(\d+):(?:\d+)$/.exec(stackLine); if (attempt2) { return [attempt2[1], Number(attempt2[2])]; } // Firefox style: "function@filename:lineNumber or @filename:lineNumber" var attempt3 = /.*@(.+):(\d+)$/.exec(stackLine); if (attempt3) { return [attempt3[1], Number(attempt3[2])]; } } var EmptyError = Rx.EmptyError = function() { this.message = 'Sequence contains no elements.'; Error.call(this); }; EmptyError.prototype = Error.prototype; var ObjectDisposedError = Rx.ObjectDisposedError = function() { this.message = 'Object has been disposed'; Error.call(this); }; ObjectDisposedError.prototype = Error.prototype; var ArgumentOutOfRangeError = Rx.ArgumentOutOfRangeError = function () { this.message = 'Argument out of range'; Error.call(this); }; ArgumentOutOfRangeError.prototype = Error.prototype; var NotSupportedError = Rx.NotSupportedError = function (message) { this.message = message || 'This operation is not supported'; Error.call(this); }; NotSupportedError.prototype = Error.prototype; var NotImplementedError = Rx.NotImplementedError = function (message) { this.message = message || 'This operation is not implemented'; Error.call(this); }; NotImplementedError.prototype = Error.prototype; var notImplemented = Rx.helpers.notImplemented = function () { throw new NotImplementedError(); }; var notSupported = Rx.helpers.notSupported = function () { throw new NotSupportedError(); }; // Shim in iterator support var $iterator$ = (typeof Symbol === 'function' && Symbol.iterator) || '_es6shim_iterator_'; // Bug for mozilla version if (root.Set && typeof new root.Set()['@@iterator'] === 'function') { $iterator$ = '@@iterator'; } var doneEnumerator = Rx.doneEnumerator = { done: true, value: undefined }; var isIterable = Rx.helpers.isIterable = function (o) { return o[$iterator$] !== undefined; } var isArrayLike = Rx.helpers.isArrayLike = function (o) { return o && o.length !== undefined; } Rx.helpers.iterator = $iterator$; var bindCallback = Rx.internals.bindCallback = function (func, thisArg, argCount) { if (typeof thisArg === 'undefined') { return func; } switch(argCount) { case 0: return function() { return func.call(thisArg) }; case 1: return function(arg) { return func.call(thisArg, arg); } case 2: return function(value, index) { return func.call(thisArg, value, index); }; case 3: return function(value, index, collection) { return func.call(thisArg, value, index, collection); }; } return function() { return func.apply(thisArg, arguments); }; }; /** Used to determine if values are of the language type Object */ var dontEnums = ['toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor'], dontEnumsLength = dontEnums.length; /** `Object#toString` result shortcuts */ var argsClass = '[object Arguments]', arrayClass = '[object Array]', boolClass = '[object Boolean]', dateClass = '[object Date]', errorClass = '[object Error]', funcClass = '[object Function]', numberClass = '[object Number]', objectClass = '[object Object]', regexpClass = '[object RegExp]', stringClass = '[object String]'; var toString = Object.prototype.toString, hasOwnProperty = Object.prototype.hasOwnProperty, supportsArgsClass = toString.call(arguments) == argsClass, // For less <IE9 && FF<4 supportNodeClass, errorProto = Error.prototype, objectProto = Object.prototype, stringProto = String.prototype, propertyIsEnumerable = objectProto.propertyIsEnumerable; try { supportNodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); } catch (e) { supportNodeClass = true; } var nonEnumProps = {}; nonEnumProps[arrayClass] = nonEnumProps[dateClass] = nonEnumProps[numberClass] = { 'constructor': true, 'toLocaleString': true, 'toString': true, 'valueOf': true }; nonEnumProps[boolClass] = nonEnumProps[stringClass] = { 'constructor': true, 'toString': true, 'valueOf': true }; nonEnumProps[errorClass] = nonEnumProps[funcClass] = nonEnumProps[regexpClass] = { 'constructor': true, 'toString': true }; nonEnumProps[objectClass] = { 'constructor': true }; var support = {}; (function () { var ctor = function() { this.x = 1; }, props = []; ctor.prototype = { 'valueOf': 1, 'y': 1 }; for (var key in new ctor) { props.push(key); } for (key in arguments) { } // Detect if `name` or `message` properties of `Error.prototype` are enumerable by default. support.enumErrorProps = propertyIsEnumerable.call(errorProto, 'message') || propertyIsEnumerable.call(errorProto, 'name'); // Detect if `prototype` properties are enumerable by default. support.enumPrototypes = propertyIsEnumerable.call(ctor, 'prototype'); // Detect if `arguments` object indexes are non-enumerable support.nonEnumArgs = key != 0; // Detect if properties shadowing those on `Object.prototype` are non-enumerable. support.nonEnumShadows = !/valueOf/.test(props); }(1)); var isObject = Rx.internals.isObject = function(value) { var type = typeof value; return value && (type == 'function' || type == 'object') || false; }; function keysIn(object) { var result = []; if (!isObject(object)) { return result; } if (support.nonEnumArgs && object.length && isArguments(object)) { object = slice.call(object); } var skipProto = support.enumPrototypes && typeof object == 'function', skipErrorProps = support.enumErrorProps && (object === errorProto || object instanceof Error); for (var key in object) { if (!(skipProto && key == 'prototype') && !(skipErrorProps && (key == 'message' || key == 'name'))) { result.push(key); } } if (support.nonEnumShadows && object !== objectProto) { var ctor = object.constructor, index = -1, length = dontEnumsLength; if (object === (ctor && ctor.prototype)) { var className = object === stringProto ? stringClass : object === errorProto ? errorClass : toString.call(object), nonEnum = nonEnumProps[className]; } while (++index < length) { key = dontEnums[index]; if (!(nonEnum && nonEnum[key]) && hasOwnProperty.call(object, key)) { result.push(key); } } } return result; } function internalFor(object, callback, keysFunc) { var index = -1, props = keysFunc(object), length = props.length; while (++index < length) { var key = props[index]; if (callback(object[key], key, object) === false) { break; } } return object; } function internalForIn(object, callback) { return internalFor(object, callback, keysIn); } function isNode(value) { // IE < 9 presents DOM nodes as `Object` objects except they have `toString` // methods that are `typeof` "string" and still can coerce nodes to strings return typeof value.toString != 'function' && typeof (value + '') == 'string'; } var isArguments = function(value) { return (value && typeof value == 'object') ? toString.call(value) == argsClass : false; } // fallback for browsers that can't detect `arguments` objects by [[Class]] if (!supportsArgsClass) { isArguments = function(value) { return (value && typeof value == 'object') ? hasOwnProperty.call(value, 'callee') : false; }; } var isEqual = Rx.internals.isEqual = function (x, y) { return deepEquals(x, y, [], []); }; /** @private * Used for deep comparison **/ function deepEquals(a, b, stackA, stackB) { // exit early for identical values if (a === b) { // treat `+0` vs. `-0` as not equal return a !== 0 || (1 / a == 1 / b); } var type = typeof a, otherType = typeof b; // exit early for unlike primitive values if (a === a && (a == null || b == null || (type != 'function' && type != 'object' && otherType != 'function' && otherType != 'object'))) { return false; } // compare [[Class]] names var className = toString.call(a), otherClass = toString.call(b); if (className == argsClass) { className = objectClass; } if (otherClass == argsClass) { otherClass = objectClass; } if (className != otherClass) { return false; } switch (className) { case boolClass: case dateClass: // coerce dates and booleans to numbers, dates to milliseconds and booleans // to `1` or `0` treating invalid dates coerced to `NaN` as not equal return +a == +b; case numberClass: // treat `NaN` vs. `NaN` as equal return (a != +a) ? b != +b : // but treat `-0` vs. `+0` as not equal (a == 0 ? (1 / a == 1 / b) : a == +b); case regexpClass: case stringClass: // coerce regexes to strings (http://es5.github.io/#x15.10.6.4) // treat string primitives and their corresponding object instances as equal return a == String(b); } var isArr = className == arrayClass; if (!isArr) { // exit for functions and DOM nodes if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { return false; } // in older versions of Opera, `arguments` objects have `Array` constructors var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; // non `Object` object instances with different constructors are not equal if (ctorA != ctorB && !(hasOwnProperty.call(a, 'constructor') && hasOwnProperty.call(b, 'constructor')) && !(isFunction(ctorA) && ctorA instanceof ctorA && isFunction(ctorB) && ctorB instanceof ctorB) && ('constructor' in a && 'constructor' in b) ) { return false; } } // assume cyclic structures are equal // the algorithm for detecting cyclic structures is adapted from ES 5.1 // section 15.12.3, abstract operation `JO` (http://es5.github.io/#x15.12.3) var initedStack = !stackA; stackA || (stackA = []); stackB || (stackB = []); var length = stackA.length; while (length--) { if (stackA[length] == a) { return stackB[length] == b; } } var size = 0; var result = true; // add `a` and `b` to the stack of traversed objects stackA.push(a); stackB.push(b); // recursively compare objects and arrays (susceptible to call stack limits) if (isArr) { // compare lengths to determine if a deep comparison is necessary length = a.length; size = b.length; result = size == length; if (result) { // deep compare the contents, ignoring non-numeric properties while (size--) { var index = length, value = b[size]; if (!(result = deepEquals(a[size], value, stackA, stackB))) { break; } } } } else { // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` // which, in this case, is more costly internalForIn(b, function(value, key, b) { if (hasOwnProperty.call(b, key)) { // count the number of properties. size++; // deep compare each property value. return (result = hasOwnProperty.call(a, key) && deepEquals(a[key], value, stackA, stackB)); } }); if (result) { // ensure both objects have the same number of properties internalForIn(a, function(value, key, a) { if (hasOwnProperty.call(a, key)) { // `size` will be `-1` if `a` has more properties than `b` return (result = --size > -1); } }); } } stackA.pop(); stackB.pop(); return result; } var errorObj = {e: {}}; var tryCatchTarget; function tryCatcher() { try { return tryCatchTarget.apply(this, arguments); } catch (e) { errorObj.e = e; return errorObj; } } function tryCatch(fn) { if (!isFunction(fn)) { throw new TypeError('fn must be a function'); } tryCatchTarget = fn; return tryCatcher; } function thrower(e) { throw e; } var hasProp = {}.hasOwnProperty, slice = Array.prototype.slice; var inherits = this.inherits = Rx.internals.inherits = function (child, parent) { function __() { this.constructor = child; } __.prototype = parent.prototype; child.prototype = new __(); }; var addProperties = Rx.internals.addProperties = function (obj) { for(var sources = [], i = 1, len = arguments.length; i < len; i++) { sources.push(arguments[i]); } for (var idx = 0, ln = sources.length; idx < ln; idx++) { var source = sources[idx]; for (var prop in source) { obj[prop] = source[prop]; } } }; // Rx Utils var addRef = Rx.internals.addRef = function (xs, r) { return new AnonymousObservable(function (observer) { return new CompositeDisposable(r.getDisposable(), xs.subscribe(observer)); }); }; function arrayInitialize(count, factory) { var a = new Array(count); for (var i = 0; i < count; i++) { a[i] = factory(); } return a; } // Collections function IndexedItem(id, value) { this.id = id; this.value = value; } IndexedItem.prototype.compareTo = function (other) { var c = this.value.compareTo(other.value); c === 0 && (c = this.id - other.id); return c; }; // Priority Queue for Scheduling var PriorityQueue = Rx.internals.PriorityQueue = function (capacity) { this.items = new Array(capacity); this.length = 0; }; var priorityProto = PriorityQueue.prototype; priorityProto.isHigherPriority = function (left, right) { return this.items[left].compareTo(this.items[right]) < 0; }; priorityProto.percolate = function (index) { if (index >= this.length || index < 0) { return; } var parent = index - 1 >> 1; if (parent < 0 || parent === index) { return; } if (this.isHigherPriority(index, parent)) { var temp = this.items[index]; this.items[index] = this.items[parent]; this.items[parent] = temp; this.percolate(parent); } }; priorityProto.heapify = function (index) { +index || (index = 0); if (index >= this.length || index < 0) { return; } var left = 2 * index + 1, right = 2 * index + 2, first = index; if (left < this.length && this.isHigherPriority(left, first)) { first = left; } if (right < this.length && this.isHigherPriority(right, first)) { first = right; } if (first !== index) { var temp = this.items[index]; this.items[index] = this.items[first]; this.items[first] = temp; this.heapify(first); } }; priorityProto.peek = function () { return this.items[0].value; }; priorityProto.removeAt = function (index) { this.items[index] = this.items[--this.length]; this.items[this.length] = undefined; this.heapify(); }; priorityProto.dequeue = function () { var result = this.peek(); this.removeAt(0); return result; }; priorityProto.enqueue = function (item) { var index = this.length++; this.items[index] = new IndexedItem(PriorityQueue.count++, item); this.percolate(index); }; priorityProto.remove = function (item) { for (var i = 0; i < this.length; i++) { if (this.items[i].value === item) { this.removeAt(i); return true; } } return false; }; PriorityQueue.count = 0; /** * Represents a group of disposable resources that are disposed together. * @constructor */ var CompositeDisposable = Rx.CompositeDisposable = function () { var args = [], i, len; if (Array.isArray(arguments[0])) { args = arguments[0]; len = args.length; } else { len = arguments.length; args = new Array(len); for(i = 0; i < len; i++) { args[i] = arguments[i]; } } for(i = 0; i < len; i++) { if (!isDisposable(args[i])) { throw new TypeError('Not a disposable'); } } this.disposables = args; this.isDisposed = false; this.length = args.length; }; var CompositeDisposablePrototype = CompositeDisposable.prototype; /** * Adds a disposable to the CompositeDisposable or disposes the disposable if the CompositeDisposable is disposed. * @param {Mixed} item Disposable to add. */ CompositeDisposablePrototype.add = function (item) { if (this.isDisposed) { item.dispose(); } else { this.disposables.push(item); this.length++; } }; /** * Removes and disposes the first occurrence of a disposable from the CompositeDisposable. * @param {Mixed} item Disposable to remove. * @returns {Boolean} true if found; false otherwise. */ CompositeDisposablePrototype.remove = function (item) { var shouldDispose = false; if (!this.isDisposed) { var idx = this.disposables.indexOf(item); if (idx !== -1) { shouldDispose = true; this.disposables.splice(idx, 1); this.length--; item.dispose(); } } return shouldDispose; }; /** * Disposes all disposables in the group and removes them from the group. */ CompositeDisposablePrototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; var len = this.disposables.length, currentDisposables = new Array(len); for(var i = 0; i < len; i++) { currentDisposables[i] = this.disposables[i]; } this.disposables = []; this.length = 0; for (i = 0; i < len; i++) { currentDisposables[i].dispose(); } } }; /** * Provides a set of static methods for creating Disposables. * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. */ var Disposable = Rx.Disposable = function (action) { this.isDisposed = false; this.action = action || noop; }; /** Performs the task of cleaning up resources. */ Disposable.prototype.dispose = function () { if (!this.isDisposed) { this.action(); this.isDisposed = true; } }; /** * Creates a disposable object that invokes the specified action when disposed. * @param {Function} dispose Action to run during the first call to dispose. The action is guaranteed to be run at most once. * @return {Disposable} The disposable object that runs the given action upon disposal. */ var disposableCreate = Disposable.create = function (action) { return new Disposable(action); }; /** * Gets the disposable that does nothing when disposed. */ var disposableEmpty = Disposable.empty = { dispose: noop }; /** * Validates whether the given object is a disposable * @param {Object} Object to test whether it has a dispose method * @returns {Boolean} true if a disposable object, else false. */ var isDisposable = Disposable.isDisposable = function (d) { return d && isFunction(d.dispose); }; var checkDisposed = Disposable.checkDisposed = function (disposable) { if (disposable.isDisposed) { throw new ObjectDisposedError(); } }; var SingleAssignmentDisposable = Rx.SingleAssignmentDisposable = (function () { function BooleanDisposable () { this.isDisposed = false; this.current = null; } var booleanDisposablePrototype = BooleanDisposable.prototype; /** * Gets the underlying disposable. * @return The underlying disposable. */ booleanDisposablePrototype.getDisposable = function () { return this.current; }; /** * Sets the underlying disposable. * @param {Disposable} value The new underlying disposable. */ booleanDisposablePrototype.setDisposable = function (value) { var shouldDispose = this.isDisposed; if (!shouldDispose) { var old = this.current; this.current = value; } old && old.dispose(); shouldDispose && value && value.dispose(); }; /** * Disposes the underlying disposable as well as all future replacements. */ booleanDisposablePrototype.dispose = function () { if (!this.isDisposed) { this.isDisposed = true; var old = this.current; this.current = null; } old && old.dispose(); }; return BooleanDisposable; }()); var SerialDisposable = Rx.SerialDisposable = SingleAssignmentDisposable; /** * Represents a disposable resource that only disposes its underlying disposable resource when all dependent disposable objects have been disposed. */ var RefCountDisposable = Rx.RefCountDisposable = (function () { function InnerDisposable(disposable) { this.disposable = disposable; this.disposable.count++; this.isInnerDisposed = false; } InnerDisposable.prototype.dispose = function () { if (!this.disposable.isDisposed && !this.isInnerDisposed) { this.isInnerDisposed = true; this.disposable.count--; if (this.disposable.count === 0 && this.disposable.isPrimaryDisposed) { this.disposable.isDisposed = true; this.disposable.underlyingDisposable.dispose(); } } }; /** * Initializes a new instance of the RefCountDisposable with the specified disposable. * @constructor * @param {Disposable} disposable Underlying disposable. */ function RefCountDisposable(disposable) { this.underlyingDisposable = disposable; this.isDisposed = false; this.isPrimaryDisposed = false; this.count = 0; } /** * Disposes the underlying disposable only when all dependent disposables have been disposed */ RefCountDisposable.prototype.dispose = function () { if (!this.isDisposed && !this.isPrimaryDisposed) { this.isPrimaryDisposed = true; if (this.count === 0) { this.isDisposed = true; this.underlyingDisposable.dispose(); } } }; /** * Returns a dependent disposable that when disposed decreases the refcount on the underlying disposable. * @returns {Disposable} A dependent disposable contributing to the reference count that manages the underlying disposable's lifetime. */ RefCountDisposable.prototype.getDisposable = function () { return this.isDisposed ? disposableEmpty : new InnerDisposable(this); }; return RefCountDisposable; })(); var ScheduledItem = Rx.internals.ScheduledItem = function (scheduler, state, action, dueTime, comparer) { this.scheduler = scheduler; this.state = state; this.action = action; this.dueTime = dueTime; this.comparer = comparer || defaultSubComparer; this.disposable = new SingleAssignmentDisposable(); } ScheduledItem.prototype.invoke = function () { this.disposable.setDisposable(this.invokeCore()); }; ScheduledItem.prototype.compareTo = function (other) { return this.comparer(this.dueTime, other.dueTime); }; ScheduledItem.prototype.isCancelled = function () { return this.disposable.isDisposed; }; ScheduledItem.prototype.invokeCore = function () { return this.action(this.scheduler, this.state); }; /** Provides a set of static properties to access commonly used schedulers. */ var Scheduler = Rx.Scheduler = (function () { function Scheduler(now, schedule, scheduleRelative, scheduleAbsolute) { this.now = now; this._schedule = schedule; this._scheduleRelative = scheduleRelative; this._scheduleAbsolute = scheduleAbsolute; } function invokeAction(scheduler, action) { action(); return disposableEmpty; } var schedulerProto = Scheduler.prototype; /** * Schedules an action to be executed. * @param {Function} action Action to execute. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.schedule = function (action) { return this._schedule(action, invokeAction); }; /** * Schedules an action to be executed. * @param state State passed to the action to be executed. * @param {Function} action Action to be executed. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithState = function (state, action) { return this._schedule(state, action); }; /** * Schedules an action to be executed after the specified relative due time. * @param {Function} action Action to execute. * @param {Number} dueTime Relative time after which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithRelative = function (dueTime, action) { return this._scheduleRelative(action, dueTime, invokeAction); }; /** * Schedules an action to be executed after dueTime. * @param state State passed to the action to be executed. * @param {Function} action Action to be executed. * @param {Number} dueTime Relative time after which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithRelativeAndState = function (state, dueTime, action) { return this._scheduleRelative(state, dueTime, action); }; /** * Schedules an action to be executed at the specified absolute due time. * @param {Function} action Action to execute. * @param {Number} dueTime Absolute time at which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithAbsolute = function (dueTime, action) { return this._scheduleAbsolute(action, dueTime, invokeAction); }; /** * Schedules an action to be executed at dueTime. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to be executed. * @param {Number}dueTime Absolute time at which to execute the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleWithAbsoluteAndState = function (state, dueTime, action) { return this._scheduleAbsolute(state, dueTime, action); }; /** Gets the current time according to the local machine's system clock. */ Scheduler.now = defaultNow; /** * Normalizes the specified TimeSpan value to a positive value. * @param {Number} timeSpan The time span value to normalize. * @returns {Number} The specified TimeSpan value if it is zero or positive; otherwise, 0 */ Scheduler.normalize = function (timeSpan) { timeSpan < 0 && (timeSpan = 0); return timeSpan; }; return Scheduler; }()); var normalizeTime = Scheduler.normalize; (function (schedulerProto) { function invokeRecImmediate(scheduler, pair) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); function recursiveAction(state1) { action(state1, function (state2) { var isAdded = false, isDone = false, d = scheduler.scheduleWithState(state2, function (scheduler1, state3) { if (isAdded) { group.remove(d); } else { isDone = true; } recursiveAction(state3); return disposableEmpty; }); if (!isDone) { group.add(d); isAdded = true; } }); } recursiveAction(state); return group; } function invokeRecDate(scheduler, pair, method) { var state = pair[0], action = pair[1], group = new CompositeDisposable(); function recursiveAction(state1) { action(state1, function (state2, dueTime1) { var isAdded = false, isDone = false, d = scheduler[method](state2, dueTime1, function (scheduler1, state3) { if (isAdded) { group.remove(d); } else { isDone = true; } recursiveAction(state3); return disposableEmpty; }); if (!isDone) { group.add(d); isAdded = true; } }); }; recursiveAction(state); return group; } function scheduleInnerRecursive(action, self) { action(function(dt) { self(action, dt); }); } /** * Schedules an action to be executed recursively. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursive = function (action) { return this.scheduleRecursiveWithState(action, function (_action, self) { _action(function () { self(_action); }); }); }; /** * Schedules an action to be executed recursively. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in recursive invocation state. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithState = function (state, action) { return this.scheduleWithState([state, action], invokeRecImmediate); }; /** * Schedules an action to be executed recursively after a specified relative due time. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified relative time. * @param {Number}dueTime Relative time after which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithRelative = function (dueTime, action) { return this.scheduleRecursiveWithRelativeAndState(action, dueTime, scheduleInnerRecursive); }; /** * Schedules an action to be executed recursively after a specified relative due time. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. * @param {Number}dueTime Relative time after which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithRelativeAndState = function (state, dueTime, action) { return this._scheduleRelative([state, action], dueTime, function (s, p) { return invokeRecDate(s, p, 'scheduleWithRelativeAndState'); }); }; /** * Schedules an action to be executed recursively at a specified absolute due time. * @param {Function} action Action to execute recursively. The parameter passed to the action is used to trigger recursive scheduling of the action at the specified absolute time. * @param {Number}dueTime Absolute time at which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithAbsolute = function (dueTime, action) { return this.scheduleRecursiveWithAbsoluteAndState(action, dueTime, scheduleInnerRecursive); }; /** * Schedules an action to be executed recursively at a specified absolute due time. * @param {Mixed} state State passed to the action to be executed. * @param {Function} action Action to execute recursively. The last parameter passed to the action is used to trigger recursive scheduling of the action, passing in the recursive due time and invocation state. * @param {Number}dueTime Absolute time at which to execute the action for the first time. * @returns {Disposable} The disposable object used to cancel the scheduled action (best effort). */ schedulerProto.scheduleRecursiveWithAbsoluteAndState = function (state, dueTime, action) { return this._scheduleAbsolute([state, action], dueTime, function (s, p) { return invokeRecDate(s, p, 'scheduleWithAbsoluteAndState'); }); }; }(Scheduler.prototype)); (function (schedulerProto) { /** * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. * @param {Number} period Period for running the work periodically. * @param {Function} action Action to be executed. * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). */ Scheduler.prototype.schedulePeriodic = function (period, action) { return this.schedulePeriodicWithState(null, period, action); }; /** * Schedules a periodic piece of work by dynamically discovering the scheduler's capabilities. The periodic task will be scheduled using window.setInterval for the base implementation. * @param {Mixed} state Initial state passed to the action upon the first iteration. * @param {Number} period Period for running the work periodically. * @param {Function} action Action to be executed, potentially updating the state. * @returns {Disposable} The disposable object used to cancel the scheduled recurring action (best effort). */ Scheduler.prototype.schedulePeriodicWithState = function(state, period, action) { if (typeof root.setInterval === 'undefined') { throw new NotSupportedError(); } period = normalizeTime(period); var s = state, id = root.setInterval(function () { s = action(s); }, period); return disposableCreate(function () { root.clearInterval(id); }); }; }(Scheduler.prototype)); /** Gets a scheduler that schedules work immediately on the current thread. */ var immediateScheduler = Scheduler.immediate = (function () { function scheduleNow(state, action) { return action(this, state); } return new Scheduler(defaultNow, scheduleNow, notSupported, notSupported); }()); /** * Gets a scheduler that schedules work as soon as possible on the current thread. */ var currentThreadScheduler = Scheduler.currentThread = (function () { var queue; function runTrampoline () { while (queue.length > 0) { var item = queue.dequeue(); !item.isCancelled() && item.invoke(); } } function scheduleNow(state, action) { var si = new ScheduledItem(this, state, action, this.now()); if (!queue) { queue = new PriorityQueue(4); queue.enqueue(si); var result = tryCatch(runTrampoline)(); queue = null; if (result === errorObj) { return thrower(result.e); } } else { queue.enqueue(si); } return si.disposable; } var currentScheduler = new Scheduler(defaultNow, scheduleNow, notSupported, notSupported); currentScheduler.scheduleRequired = function () { return !queue; }; return currentScheduler; }()); var SchedulePeriodicRecursive = Rx.internals.SchedulePeriodicRecursive = (function () { function tick(command, recurse) { recurse(0, this._period); try { this._state = this._action(this._state); } catch (e) { this._cancel.dispose(); throw e; } } function SchedulePeriodicRecursive(scheduler, state, period, action) { this._scheduler = scheduler; this._state = state; this._period = period; this._action = action; } SchedulePeriodicRecursive.prototype.start = function () { var d = new SingleAssignmentDisposable(); this._cancel = d; d.setDisposable(this._scheduler.scheduleRecursiveWithRelativeAndState(0, this._period, tick.bind(this))); return d; }; return SchedulePeriodicRecursive; }()); var scheduleMethod, clearMethod = noop; var localTimer = (function () { var localSetTimeout, localClearTimeout = noop; if ('WScript' in this) { localSetTimeout = function (fn, time) { WScript.Sleep(time); fn(); }; } else if (!!root.setTimeout) { localSetTimeout = root.setTimeout; localClearTimeout = root.clearTimeout; } else { throw new NotSupportedError(); } return { setTimeout: localSetTimeout, clearTimeout: localClearTimeout }; }()); var localSetTimeout = localTimer.setTimeout, localClearTimeout = localTimer.clearTimeout; (function () { var taskId = 0, tasks = new Array(1000); var reNative = RegExp('^' + String(toString) .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') .replace(/toString| for [^\]]+/g, '.*?') + '$' ); var setImmediate = typeof (setImmediate = freeGlobal && moduleExports && freeGlobal.setImmediate) == 'function' && !reNative.test(setImmediate) && setImmediate, clearImmediate = typeof (clearImmediate = freeGlobal && moduleExports && freeGlobal.clearImmediate) == 'function' && !reNative.test(clearImmediate) && clearImmediate; function postMessageSupported () { // Ensure not in a worker if (!root.postMessage || root.importScripts) { return false; } var isAsync = false, oldHandler = root.onmessage; // Test for async root.onmessage = function () { isAsync = true; }; root.postMessage('', '*'); root.onmessage = oldHandler; return isAsync; } // Use in order, setImmediate, nextTick, postMessage, MessageChannel, script readystatechanged, setTimeout if (typeof setImmediate === 'function') { scheduleMethod = setImmediate; clearMethod = clearImmediate; } else if (typeof process !== 'undefined' && {}.toString.call(process) === '[object process]') { scheduleMethod = process.nextTick; } else if (postMessageSupported()) { var MSG_PREFIX = 'ms.rx.schedule' + Math.random(); var onGlobalPostMessage = function (event) { // Only if we're a match to avoid any other global events if (typeof event.data === 'string' && event.data.substring(0, MSG_PREFIX.length) === MSG_PREFIX) { var handleId = event.data.substring(MSG_PREFIX.length), action = tasks[handleId]; action(); tasks[handleId] = undefined; } } if (root.addEventListener) { root.addEventListener('message', onGlobalPostMessage, false); } else { root.attachEvent('onmessage', onGlobalPostMessage, false); } scheduleMethod = function (action) { var currentId = taskId++; tasks[currentId] = action; root.postMessage(MSG_PREFIX + currentId, '*'); }; } else if (!!root.MessageChannel) { var channel = new root.MessageChannel(); channel.port1.onmessage = function (event) { var id = event.data, action = tasks[id]; action(); tasks[id] = undefined; }; scheduleMethod = function (action) { var id = taskId++; tasks[id] = action; channel.port2.postMessage(id); }; } else if ('document' in root && 'onreadystatechange' in root.document.createElement('script')) { scheduleMethod = function (action) { var scriptElement = root.document.createElement('script'); scriptElement.onreadystatechange = function () { action(); scriptElement.onreadystatechange = null; scriptElement.parentNode.removeChild(scriptElement); scriptElement = null; }; root.document.documentElement.appendChild(scriptElement); }; } else { scheduleMethod = function (action) { return localSetTimeout(action, 0); }; clearMethod = localClearTimeout; } }()); /** * Gets a scheduler that schedules work via a timed callback based upon platform. */ var timeoutScheduler = Scheduler.timeout = Scheduler.default = (function () { function scheduleNow(state, action) { var scheduler = this, disposable = new SingleAssignmentDisposable(); var id = scheduleMethod(function () { if (!disposable.isDisposed) { disposable.setDisposable(action(scheduler, state)); } }); return new CompositeDisposable(disposable, disposableCreate(function () { clearMethod(id); })); } function scheduleRelative(state, dueTime, action) { var scheduler = this, dt = Scheduler.normalize(dueTime); if (dt === 0) { return scheduler.scheduleWithState(state, action); } var disposable = new SingleAssignmentDisposable(); var id = localSetTimeout(function () { if (!disposable.isDisposed) { disposable.setDisposable(action(scheduler, state)); } }, dt); return new CompositeDisposable(disposable, disposableCreate(function () { localClearTimeout(id); })); } function scheduleAbsolute(state, dueTime, action) { return this.scheduleWithRelativeAndState(state, dueTime - this.now(), action); } return new Scheduler(defaultNow, scheduleNow, scheduleRelative, scheduleAbsolute); })(); /** * Represents a notification to an observer. */ var Notification = Rx.Notification = (function () { function Notification(kind, value, exception, accept, acceptObservable, toString) { this.kind = kind; this.value = value; this.exception = exception; this._accept = accept; this._acceptObservable = acceptObservable; this.toString = toString; } /** * Invokes the delegate corresponding to the notification or the observer's method corresponding to the notification and returns the produced result. * * @memberOf Notification * @param {Any} observerOrOnNext Delegate to invoke for an OnNext notification or Observer to invoke the notification on.. * @param {Function} onError Delegate to invoke for an OnError notification. * @param {Function} onCompleted Delegate to invoke for an OnCompleted notification. * @returns {Any} Result produced by the observation. */ Notification.prototype.accept = function (observerOrOnNext, onError, onCompleted) { return observerOrOnNext && typeof observerOrOnNext === 'object' ? this._acceptObservable(observerOrOnNext) : this._accept(observerOrOnNext, onError, onCompleted); }; /** * Returns an observable sequence with a single notification. * * @memberOf Notifications * @param {Scheduler} [scheduler] Scheduler to send out the notification calls on. * @returns {Observable} The observable sequence that surfaces the behavior of the notification upon subscription. */ Notification.prototype.toObservable = function (scheduler) { var self = this; isScheduler(scheduler) || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.scheduleWithState(self, function (_, notification) { notification._acceptObservable(observer); notification.kind === 'N' && observer.onCompleted(); }); }); }; return Notification; })(); /** * Creates an object that represents an OnNext notification to an observer. * @param {Any} value The value contained in the notification. * @returns {Notification} The OnNext notification containing the value. */ var notificationCreateOnNext = Notification.createOnNext = (function () { function _accept(onNext) { return onNext(this.value); } function _acceptObservable(observer) { return observer.onNext(this.value); } function toString() { return 'OnNext(' + this.value + ')'; } return function (value) { return new Notification('N', value, null, _accept, _acceptObservable, toString); }; }()); /** * Creates an object that represents an OnError notification to an observer. * @param {Any} error The exception contained in the notification. * @returns {Notification} The OnError notification containing the exception. */ var notificationCreateOnError = Notification.createOnError = (function () { function _accept (onNext, onError) { return onError(this.exception); } function _acceptObservable(observer) { return observer.onError(this.exception); } function toString () { return 'OnError(' + this.exception + ')'; } return function (e) { return new Notification('E', null, e, _accept, _acceptObservable, toString); }; }()); /** * Creates an object that represents an OnCompleted notification to an observer. * @returns {Notification} The OnCompleted notification. */ var notificationCreateOnCompleted = Notification.createOnCompleted = (function () { function _accept (onNext, onError, onCompleted) { return onCompleted(); } function _acceptObservable(observer) { return observer.onCompleted(); } function toString () { return 'OnCompleted()'; } return function () { return new Notification('C', null, null, _accept, _acceptObservable, toString); }; }()); var Enumerator = Rx.internals.Enumerator = function (next) { this._next = next; }; Enumerator.prototype.next = function () { return this._next(); }; Enumerator.prototype[$iterator$] = function () { return this; } var Enumerable = Rx.internals.Enumerable = function (iterator) { this._iterator = iterator; }; Enumerable.prototype[$iterator$] = function () { return this._iterator(); }; Enumerable.prototype.concat = function () { var sources = this; return new AnonymousObservable(function (o) { var e = sources[$iterator$](); var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return o.onError(ex); } if (currentItem.done) { return o.onCompleted(); } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, function(err) { o.onError(err); }, self) ); }); return new CompositeDisposable(subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; Enumerable.prototype.catchError = function () { var sources = this; return new AnonymousObservable(function (o) { var e = sources[$iterator$](); var isDisposed, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursiveWithState(null, function (lastException, self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return observer.onError(ex); } if (currentItem.done) { if (lastException !== null) { o.onError(lastException); } else { o.onCompleted(); } return; } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, self, function() { o.onCompleted(); })); }); return new CompositeDisposable(subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; Enumerable.prototype.catchErrorWhen = function (notificationHandler) { var sources = this; return new AnonymousObservable(function (o) { var exceptions = new Subject(), notifier = new Subject(), handled = notificationHandler(exceptions), notificationDisposable = handled.subscribe(notifier); var e = sources[$iterator$](); var isDisposed, lastException, subscription = new SerialDisposable(); var cancelable = immediateScheduler.scheduleRecursive(function (self) { if (isDisposed) { return; } try { var currentItem = e.next(); } catch (ex) { return o.onError(ex); } if (currentItem.done) { if (lastException) { o.onError(lastException); } else { o.onCompleted(); } return; } // Check if promise var currentValue = currentItem.value; isPromise(currentValue) && (currentValue = observableFromPromise(currentValue)); var outer = new SingleAssignmentDisposable(); var inner = new SingleAssignmentDisposable(); subscription.setDisposable(new CompositeDisposable(inner, outer)); outer.setDisposable(currentValue.subscribe( function(x) { o.onNext(x); }, function (exn) { inner.setDisposable(notifier.subscribe(self, function(ex) { o.onError(ex); }, function() { o.onCompleted(); })); exceptions.onNext(exn); }, function() { o.onCompleted(); })); }); return new CompositeDisposable(notificationDisposable, subscription, cancelable, disposableCreate(function () { isDisposed = true; })); }); }; var enumerableRepeat = Enumerable.repeat = function (value, repeatCount) { if (repeatCount == null) { repeatCount = -1; } return new Enumerable(function () { var left = repeatCount; return new Enumerator(function () { if (left === 0) { return doneEnumerator; } if (left > 0) { left--; } return { done: false, value: value }; }); }); }; var enumerableOf = Enumerable.of = function (source, selector, thisArg) { if (selector) { var selectorFn = bindCallback(selector, thisArg, 3); } return new Enumerable(function () { var index = -1; return new Enumerator( function () { return ++index < source.length ? { done: false, value: !selector ? source[index] : selectorFn(source[index], index, source) } : doneEnumerator; }); }); }; /** * Supports push-style iteration over an observable sequence. */ var Observer = Rx.Observer = function () { }; /** * Creates an observer from the specified OnNext, along with optional OnError, and OnCompleted actions. * @param {Function} [onNext] Observer's OnNext action implementation. * @param {Function} [onError] Observer's OnError action implementation. * @param {Function} [onCompleted] Observer's OnCompleted action implementation. * @returns {Observer} The observer object implemented using the given actions. */ var observerCreate = Observer.create = function (onNext, onError, onCompleted) { onNext || (onNext = noop); onError || (onError = defaultError); onCompleted || (onCompleted = noop); return new AnonymousObserver(onNext, onError, onCompleted); }; /** * Abstract base class for implementations of the Observer class. * This base class enforces the grammar of observers where OnError and OnCompleted are terminal messages. */ var AbstractObserver = Rx.internals.AbstractObserver = (function (__super__) { inherits(AbstractObserver, __super__); /** * Creates a new observer in a non-stopped state. */ function AbstractObserver() { this.isStopped = false; __super__.call(this); } // Must be implemented by other observers AbstractObserver.prototype.next = notImplemented; AbstractObserver.prototype.error = notImplemented; AbstractObserver.prototype.completed = notImplemented; /** * Notifies the observer of a new element in the sequence. * @param {Any} value Next element in the sequence. */ AbstractObserver.prototype.onNext = function (value) { if (!this.isStopped) { this.next(value); } }; /** * Notifies the observer that an exception has occurred. * @param {Any} error The error that has occurred. */ AbstractObserver.prototype.onError = function (error) { if (!this.isStopped) { this.isStopped = true; this.error(error); } }; /** * Notifies the observer of the end of the sequence. */ AbstractObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.completed(); } }; /** * Disposes the observer, causing it to transition to the stopped state. */ AbstractObserver.prototype.dispose = function () { this.isStopped = true; }; AbstractObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.error(e); return true; } return false; }; return AbstractObserver; }(Observer)); /** * Class to create an Observer instance from delegate-based implementations of the on* methods. */ var AnonymousObserver = Rx.AnonymousObserver = (function (__super__) { inherits(AnonymousObserver, __super__); /** * Creates an observer from the specified OnNext, OnError, and OnCompleted actions. * @param {Any} onNext Observer's OnNext action implementation. * @param {Any} onError Observer's OnError action implementation. * @param {Any} onCompleted Observer's OnCompleted action implementation. */ function AnonymousObserver(onNext, onError, onCompleted) { __super__.call(this); this._onNext = onNext; this._onError = onError; this._onCompleted = onCompleted; } /** * Calls the onNext action. * @param {Any} value Next element in the sequence. */ AnonymousObserver.prototype.next = function (value) { this._onNext(value); }; /** * Calls the onError action. * @param {Any} error The error that has occurred. */ AnonymousObserver.prototype.error = function (error) { this._onError(error); }; /** * Calls the onCompleted action. */ AnonymousObserver.prototype.completed = function () { this._onCompleted(); }; return AnonymousObserver; }(AbstractObserver)); var observableProto; /** * Represents a push-style collection. */ var Observable = Rx.Observable = (function () { function Observable(subscribe) { if (Rx.config.longStackSupport && hasStacks) { try { throw new Error(); } catch (e) { this.stack = e.stack.substring(e.stack.indexOf("\n") + 1); } var self = this; this._subscribe = function (observer) { var oldOnError = observer.onError.bind(observer); observer.onError = function (err) { makeStackTraceLong(err, self); oldOnError(err); }; return subscribe.call(self, observer); }; } else { this._subscribe = subscribe; } } observableProto = Observable.prototype; /** * Subscribes an observer to the observable sequence. * @param {Mixed} [observerOrOnNext] The object that is to receive notifications or an action to invoke for each element in the observable sequence. * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. * @returns {Diposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribe = observableProto.forEach = function (observerOrOnNext, onError, onCompleted) { return this._subscribe(typeof observerOrOnNext === 'object' ? observerOrOnNext : observerCreate(observerOrOnNext, onError, onCompleted)); }; /** * Subscribes to the next value in the sequence with an optional "this" argument. * @param {Function} onNext The function to invoke on each element in the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnNext = function (onNext, thisArg) { return this._subscribe(observerCreate(typeof thisArg !== 'undefined' ? function(x) { onNext.call(thisArg, x); } : onNext)); }; /** * Subscribes to an exceptional condition in the sequence with an optional "this" argument. * @param {Function} onError The function to invoke upon exceptional termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnError = function (onError, thisArg) { return this._subscribe(observerCreate(null, typeof thisArg !== 'undefined' ? function(e) { onError.call(thisArg, e); } : onError)); }; /** * Subscribes to the next value in the sequence with an optional "this" argument. * @param {Function} onCompleted The function to invoke upon graceful termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Disposable} A disposable handling the subscriptions and unsubscriptions. */ observableProto.subscribeOnCompleted = function (onCompleted, thisArg) { return this._subscribe(observerCreate(null, null, typeof thisArg !== 'undefined' ? function() { onCompleted.call(thisArg); } : onCompleted)); }; return Observable; })(); var ScheduledObserver = Rx.internals.ScheduledObserver = (function (__super__) { inherits(ScheduledObserver, __super__); function ScheduledObserver(scheduler, observer) { __super__.call(this); this.scheduler = scheduler; this.observer = observer; this.isAcquired = false; this.hasFaulted = false; this.queue = []; this.disposable = new SerialDisposable(); } ScheduledObserver.prototype.next = function (value) { var self = this; this.queue.push(function () { self.observer.onNext(value); }); }; ScheduledObserver.prototype.error = function (e) { var self = this; this.queue.push(function () { self.observer.onError(e); }); }; ScheduledObserver.prototype.completed = function () { var self = this; this.queue.push(function () { self.observer.onCompleted(); }); }; ScheduledObserver.prototype.ensureActive = function () { var isOwner = false, parent = this; if (!this.hasFaulted && this.queue.length > 0) { isOwner = !this.isAcquired; this.isAcquired = true; } if (isOwner) { this.disposable.setDisposable(this.scheduler.scheduleRecursive(function (self) { var work; if (parent.queue.length > 0) { work = parent.queue.shift(); } else { parent.isAcquired = false; return; } try { work(); } catch (ex) { parent.queue = []; parent.hasFaulted = true; throw ex; } self(); })); } }; ScheduledObserver.prototype.dispose = function () { __super__.prototype.dispose.call(this); this.disposable.dispose(); }; return ScheduledObserver; }(AbstractObserver)); var ObservableBase = Rx.ObservableBase = (function (__super__) { inherits(ObservableBase, __super__); function fixSubscriber(subscriber) { return subscriber && isFunction(subscriber.dispose) ? subscriber : isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; } function setDisposable(s, state) { var ado = state[0], self = state[1]; var sub = tryCatch(self.subscribeCore).call(self, ado); if (sub === errorObj) { if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); } } ado.setDisposable(fixSubscriber(sub)); } function subscribe(observer) { var ado = new AutoDetachObserver(observer), state = [ado, this]; if (currentThreadScheduler.scheduleRequired()) { currentThreadScheduler.scheduleWithState(state, setDisposable); } else { setDisposable(null, state); } return ado; } function ObservableBase() { __super__.call(this, subscribe); } ObservableBase.prototype.subscribeCore = notImplemented; return ObservableBase; }(Observable)); var ToArrayObservable = (function(__super__) { inherits(ToArrayObservable, __super__); function ToArrayObservable(source) { this.source = source; __super__.call(this); } ToArrayObservable.prototype.subscribeCore = function(observer) { return this.source.subscribe(new ToArrayObserver(observer)); }; return ToArrayObservable; }(ObservableBase)); function ToArrayObserver(observer) { this.observer = observer; this.a = []; this.isStopped = false; } ToArrayObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.a.push(x); } }; ToArrayObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; ToArrayObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.observer.onNext(this.a); this.observer.onCompleted(); } }; ToArrayObserver.prototype.dispose = function () { this.isStopped = true; } ToArrayObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Creates an array from an observable sequence. * @returns {Observable} An observable sequence containing a single element with a list containing all the elements of the source sequence. */ observableProto.toArray = function () { return new ToArrayObservable(this); }; /** * Creates an observable sequence from a specified subscribe method implementation. * @example * var res = Rx.Observable.create(function (observer) { return function () { } ); * var res = Rx.Observable.create(function (observer) { return Rx.Disposable.empty; } ); * var res = Rx.Observable.create(function (observer) { } ); * @param {Function} subscribe Implementation of the resulting observable sequence's subscribe method, returning a function that will be wrapped in a Disposable. * @returns {Observable} The observable sequence with the specified implementation for the Subscribe method. */ Observable.create = Observable.createWithDisposable = function (subscribe, parent) { return new AnonymousObservable(subscribe, parent); }; /** * Returns an observable sequence that invokes the specified factory function whenever a new observer subscribes. * * @example * var res = Rx.Observable.defer(function () { return Rx.Observable.fromArray([1,2,3]); }); * @param {Function} observableFactory Observable factory function to invoke for each observer that subscribes to the resulting sequence or Promise. * @returns {Observable} An observable sequence whose observers trigger an invocation of the given observable factory function. */ var observableDefer = Observable.defer = function (observableFactory) { return new AnonymousObservable(function (observer) { var result; try { result = observableFactory(); } catch (e) { return observableThrow(e).subscribe(observer); } isPromise(result) && (result = observableFromPromise(result)); return result.subscribe(observer); }); }; /** * Returns an empty observable sequence, using the specified scheduler to send out the single OnCompleted message. * * @example * var res = Rx.Observable.empty(); * var res = Rx.Observable.empty(Rx.Scheduler.timeout); * @param {Scheduler} [scheduler] Scheduler to send the termination call on. * @returns {Observable} An observable sequence with no elements. */ var observableEmpty = Observable.empty = function (scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onCompleted(); }); }); }; var FromObservable = (function(__super__) { inherits(FromObservable, __super__); function FromObservable(iterable, mapper, scheduler) { this.iterable = iterable; this.mapper = mapper; this.scheduler = scheduler; __super__.call(this); } FromObservable.prototype.subscribeCore = function (observer) { var sink = new FromSink(observer, this); return sink.run(); }; return FromObservable; }(ObservableBase)); var FromSink = (function () { function FromSink(observer, parent) { this.observer = observer; this.parent = parent; } FromSink.prototype.run = function () { var list = Object(this.parent.iterable), it = getIterable(list), observer = this.observer, mapper = this.parent.mapper; function loopRecursive(i, recurse) { try { var next = it.next(); } catch (e) { return observer.onError(e); } if (next.done) { return observer.onCompleted(); } var result = next.value; if (mapper) { try { result = mapper(result, i); } catch (e) { return observer.onError(e); } } observer.onNext(result); recurse(i + 1); } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; return FromSink; }()); var maxSafeInteger = Math.pow(2, 53) - 1; function StringIterable(str) { this._s = s; } StringIterable.prototype[$iterator$] = function () { return new StringIterator(this._s); }; function StringIterator(str) { this._s = s; this._l = s.length; this._i = 0; } StringIterator.prototype[$iterator$] = function () { return this; }; StringIterator.prototype.next = function () { return this._i < this._l ? { done: false, value: this._s.charAt(this._i++) } : doneEnumerator; }; function ArrayIterable(a) { this._a = a; } ArrayIterable.prototype[$iterator$] = function () { return new ArrayIterator(this._a); }; function ArrayIterator(a) { this._a = a; this._l = toLength(a); this._i = 0; } ArrayIterator.prototype[$iterator$] = function () { return this; }; ArrayIterator.prototype.next = function () { return this._i < this._l ? { done: false, value: this._a[this._i++] } : doneEnumerator; }; function numberIsFinite(value) { return typeof value === 'number' && root.isFinite(value); } function isNan(n) { return n !== n; } function getIterable(o) { var i = o[$iterator$], it; if (!i && typeof o === 'string') { it = new StringIterable(o); return it[$iterator$](); } if (!i && o.length !== undefined) { it = new ArrayIterable(o); return it[$iterator$](); } if (!i) { throw new TypeError('Object is not iterable'); } return o[$iterator$](); } function sign(value) { var number = +value; if (number === 0) { return number; } if (isNaN(number)) { return number; } return number < 0 ? -1 : 1; } function toLength(o) { var len = +o.length; if (isNaN(len)) { return 0; } if (len === 0 || !numberIsFinite(len)) { return len; } len = sign(len) * Math.floor(Math.abs(len)); if (len <= 0) { return 0; } if (len > maxSafeInteger) { return maxSafeInteger; } return len; } /** * This method creates a new Observable sequence from an array-like or iterable object. * @param {Any} arrayLike An array-like or iterable object to convert to an Observable sequence. * @param {Function} [mapFn] Map function to call on every element of the array. * @param {Any} [thisArg] The context to use calling the mapFn if provided. * @param {Scheduler} [scheduler] Optional scheduler to use for scheduling. If not provided, defaults to Scheduler.currentThread. */ var observableFrom = Observable.from = function (iterable, mapFn, thisArg, scheduler) { if (iterable == null) { throw new Error('iterable cannot be null.') } if (mapFn && !isFunction(mapFn)) { throw new Error('mapFn when provided must be a function'); } if (mapFn) { var mapper = bindCallback(mapFn, thisArg, 2); } isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromObservable(iterable, mapper, scheduler); } var FromArrayObservable = (function(__super__) { inherits(FromArrayObservable, __super__); function FromArrayObservable(args, scheduler) { this.args = args; this.scheduler = scheduler; __super__.call(this); } FromArrayObservable.prototype.subscribeCore = function (observer) { var sink = new FromArraySink(observer, this); return sink.run(); }; return FromArrayObservable; }(ObservableBase)); function FromArraySink(observer, parent) { this.observer = observer; this.parent = parent; } FromArraySink.prototype.run = function () { var observer = this.observer, args = this.parent.args, len = args.length; function loopRecursive(i, recurse) { if (i < len) { observer.onNext(args[i]); recurse(i + 1); } else { observer.onCompleted(); } } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; /** * Converts an array to an observable sequence, using an optional scheduler to enumerate the array. * @deprecated use Observable.from or Observable.of * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. * @returns {Observable} The observable sequence whose elements are pulled from the given enumerable sequence. */ var observableFromArray = Observable.fromArray = function (array, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromArrayObservable(array, scheduler) }; /** * Returns a non-terminating observable sequence, which can be used to denote an infinite duration (e.g. when using reactive joins). * @returns {Observable} An observable sequence whose observers will never get called. */ var observableNever = Observable.never = function () { return new AnonymousObservable(function () { return disposableEmpty; }); }; function observableOf (scheduler, array) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new FromArrayObservable(array, scheduler); } /** * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. */ Observable.of = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } return new FromArrayObservable(args, currentThreadScheduler); }; /** * This method creates a new Observable instance with a variable number of arguments, regardless of number or type of the arguments. * @param {Scheduler} scheduler A scheduler to use for scheduling the arguments. * @returns {Observable} The observable sequence whose elements are pulled from the given arguments. */ Observable.ofWithScheduler = function (scheduler) { var len = arguments.length, args = new Array(len - 1); for(var i = 1; i < len; i++) { args[i - 1] = arguments[i]; } return new FromArrayObservable(args, scheduler); }; /** * Convert an object into an observable sequence of [key, value] pairs. * @param {Object} obj The object to inspect. * @param {Scheduler} [scheduler] Scheduler to run the enumeration of the input sequence on. * @returns {Observable} An observable sequence of [key, value] pairs from the object. */ Observable.pairs = function (obj, scheduler) { scheduler || (scheduler = Rx.Scheduler.currentThread); return new AnonymousObservable(function (observer) { var keys = Object.keys(obj), len = keys.length; return scheduler.scheduleRecursiveWithState(0, function (idx, self) { if (idx < len) { var key = keys[idx]; observer.onNext([key, obj[key]]); self(idx + 1); } else { observer.onCompleted(); } }); }); }; var RangeObservable = (function(__super__) { inherits(RangeObservable, __super__); function RangeObservable(start, count, scheduler) { this.start = start; this.count = count; this.scheduler = scheduler; __super__.call(this); } RangeObservable.prototype.subscribeCore = function (observer) { var sink = new RangeSink(observer, this); return sink.run(); }; return RangeObservable; }(ObservableBase)); var RangeSink = (function () { function RangeSink(observer, parent) { this.observer = observer; this.parent = parent; } RangeSink.prototype.run = function () { var start = this.parent.start, count = this.parent.count, observer = this.observer; function loopRecursive(i, recurse) { if (i < count) { observer.onNext(start + i); recurse(i + 1); } else { observer.onCompleted(); } } return this.parent.scheduler.scheduleRecursiveWithState(0, loopRecursive); }; return RangeSink; }()); /** * Generates an observable sequence of integral numbers within a specified range, using the specified scheduler to send out observer messages. * @param {Number} start The value of the first integer in the sequence. * @param {Number} count The number of sequential integers to generate. * @param {Scheduler} [scheduler] Scheduler to run the generator loop on. If not specified, defaults to Scheduler.currentThread. * @returns {Observable} An observable sequence that contains a range of sequential integral numbers. */ Observable.range = function (start, count, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return new RangeObservable(start, count, scheduler); }; /** * Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages. * * @example * var res = Rx.Observable.repeat(42); * var res = Rx.Observable.repeat(42, 4); * 3 - res = Rx.Observable.repeat(42, 4, Rx.Scheduler.timeout); * 4 - res = Rx.Observable.repeat(42, null, Rx.Scheduler.timeout); * @param {Mixed} value Element to repeat. * @param {Number} repeatCount [Optiona] Number of times to repeat the element. If not specified, repeats indefinitely. * @param {Scheduler} scheduler Scheduler to run the producer loop on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} An observable sequence that repeats the given element the specified number of times. */ Observable.repeat = function (value, repeatCount, scheduler) { isScheduler(scheduler) || (scheduler = currentThreadScheduler); return observableReturn(value, scheduler).repeat(repeatCount == null ? -1 : repeatCount); }; /** * Returns an observable sequence that contains a single element, using the specified scheduler to send out observer messages. * There is an alias called 'just', and 'returnValue' for browsers <IE9. * @param {Mixed} value Single element in the resulting observable sequence. * @param {Scheduler} scheduler Scheduler to send the single element on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} An observable sequence containing the single specified element. */ var observableReturn = Observable['return'] = Observable.just = function (value, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onNext(value); observer.onCompleted(); }); }); }; /** @deprecated use return or just */ Observable.returnValue = function () { //deprecate('returnValue', 'return or just'); return observableReturn.apply(null, arguments); }; /** * Returns an observable sequence that terminates with an exception, using the specified scheduler to send out the single onError message. * There is an alias to this method called 'throwError' for browsers <IE9. * @param {Mixed} error An object used for the sequence's termination. * @param {Scheduler} scheduler Scheduler to send the exceptional termination call on. If not specified, defaults to Scheduler.immediate. * @returns {Observable} The observable sequence that terminates exceptionally with the specified exception object. */ var observableThrow = Observable['throw'] = Observable.throwError = function (error, scheduler) { isScheduler(scheduler) || (scheduler = immediateScheduler); return new AnonymousObservable(function (observer) { return scheduler.schedule(function () { observer.onError(error); }); }); }; /** @deprecated use #some instead */ Observable.throwException = function () { //deprecate('throwException', 'throwError'); return Observable.throwError.apply(null, arguments); }; function observableCatchHandler(source, handler) { return new AnonymousObservable(function (o) { var d1 = new SingleAssignmentDisposable(), subscription = new SerialDisposable(); subscription.setDisposable(d1); d1.setDisposable(source.subscribe(function (x) { o.onNext(x); }, function (e) { try { var result = handler(e); } catch (ex) { return o.onError(ex); } isPromise(result) && (result = observableFromPromise(result)); var d = new SingleAssignmentDisposable(); subscription.setDisposable(d); d.setDisposable(result.subscribe(o)); }, function (x) { o.onCompleted(x); })); return subscription; }, source); } /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. * @example * 1 - xs.catchException(ys) * 2 - xs.catchException(function (ex) { return ys(ex); }) * @param {Mixed} handlerOrSecond Exception handler function that returns an observable sequence given the error that occurred in the first sequence, or a second observable sequence used to produce results when an error occurred in the first sequence. * @returns {Observable} An observable sequence containing the first sequence's elements, followed by the elements of the handler sequence in case an exception occurred. */ observableProto['catch'] = observableProto.catchError = observableProto.catchException = function (handlerOrSecond) { return typeof handlerOrSecond === 'function' ? observableCatchHandler(this, handlerOrSecond) : observableCatch([this, handlerOrSecond]); }; /** * Continues an observable sequence that is terminated by an exception with the next observable sequence. * @param {Array | Arguments} args Arguments or an array to use as the next sequence if an error occurs. * @returns {Observable} An observable sequence containing elements from consecutive source sequences until a source sequence terminates successfully. */ var observableCatch = Observable.catchError = Observable['catch'] = Observable.catchException = function () { var items = []; if (Array.isArray(arguments[0])) { items = arguments[0]; } else { for(var i = 0, len = arguments.length; i < len; i++) { items.push(arguments[i]); } } return enumerableOf(items).catchError(); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. * This can be in the form of an argument list of observables or an array. * * @example * 1 - obs = observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ observableProto.combineLatest = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } if (Array.isArray(args[0])) { args[0].unshift(this); } else { args.unshift(this); } return combineLatest.apply(this, args); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences or Promises produces an element. * * @example * 1 - obs = Rx.Observable.combineLatest(obs1, obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = Rx.Observable.combineLatest([obs1, obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ var combineLatest = Observable.combineLatest = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var resultSelector = args.pop(); Array.isArray(args[0]) && (args = args[0]); return new AnonymousObservable(function (o) { var n = args.length, falseFactory = function () { return false; }, hasValue = arrayInitialize(n, falseFactory), hasValueAll = false, isDone = arrayInitialize(n, falseFactory), values = new Array(n); function next(i) { hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { try { var res = resultSelector.apply(null, values); } catch (e) { return o.onError(e); } o.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { o.onCompleted(); } } function done (i) { isDone[i] = true; isDone.every(identity) && o.onCompleted(); } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { var source = args[i], sad = new SingleAssignmentDisposable(); isPromise(source) && (source = observableFromPromise(source)); sad.setDisposable(source.subscribe(function (x) { values[i] = x; next(i); }, function(e) { o.onError(e); }, function () { done(i); } )); subscriptions[i] = sad; }(idx)); } return new CompositeDisposable(subscriptions); }, this); }; /** * Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate. * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ observableProto.concat = function () { for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); } args.unshift(this); return observableConcat.apply(null, args); }; /** * Concatenates all the observable sequences. * @param {Array | Arguments} args Arguments or an array to concat to the observable sequence. * @returns {Observable} An observable sequence that contains the elements of each given sequence, in sequential order. */ var observableConcat = Observable.concat = function () { var args; if (Array.isArray(arguments[0])) { args = arguments[0]; } else { args = new Array(arguments.length); for(var i = 0, len = arguments.length; i < len; i++) { args[i] = arguments[i]; } } return enumerableOf(args).concat(); }; /** * Concatenates an observable sequence of observable sequences. * @returns {Observable} An observable sequence that contains the elements of each observed inner sequence, in sequential order. */ observableProto.concatAll = observableProto.concatObservable = function () { return this.merge(1); }; var MergeObservable = (function (__super__) { inherits(MergeObservable, __super__); function MergeObservable(source, maxConcurrent) { this.source = source; this.maxConcurrent = maxConcurrent; __super__.call(this); } MergeObservable.prototype.subscribeCore = function(observer) { var g = new CompositeDisposable(); g.add(this.source.subscribe(new MergeObserver(observer, this.maxConcurrent, g))); return g; }; return MergeObservable; }(ObservableBase)); var MergeObserver = (function () { function MergeObserver(o, max, g) { this.o = o; this.max = max; this.g = g; this.done = false; this.q = []; this.activeCount = 0; this.isStopped = false; } MergeObserver.prototype.handleSubscribe = function (xs) { var sad = new SingleAssignmentDisposable(); this.g.add(sad); isPromise(xs) && (xs = observableFromPromise(xs)); sad.setDisposable(xs.subscribe(new InnerObserver(this, sad))); }; MergeObserver.prototype.onNext = function (innerSource) { if (this.isStopped) { return; } if(this.activeCount < this.max) { this.activeCount++; this.handleSubscribe(innerSource); } else { this.q.push(innerSource); } }; MergeObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); } }; MergeObserver.prototype.onCompleted = function () { if (!this.isStopped) { this.isStopped = true; this.done = true; this.activeCount === 0 && this.o.onCompleted(); } }; MergeObserver.prototype.dispose = function() { this.isStopped = true; }; MergeObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); return true; } return false; }; function InnerObserver(parent, sad) { this.parent = parent; this.sad = sad; this.isStopped = false; } InnerObserver.prototype.onNext = function (x) { if(!this.isStopped) { this.parent.o.onNext(x); } }; InnerObserver.prototype.onError = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); } }; InnerObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; var parent = this.parent; parent.g.remove(this.sad); if (parent.q.length > 0) { parent.handleSubscribe(parent.q.shift()); } else { parent.activeCount--; parent.done && parent.activeCount === 0 && parent.o.onCompleted(); } } }; InnerObserver.prototype.dispose = function() { this.isStopped = true; }; InnerObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); return true; } return false; }; return MergeObserver; }()); /** * Merges an observable sequence of observable sequences into an observable sequence, limiting the number of concurrent subscriptions to inner sequences. * Or merges two observable sequences into a single observable sequence. * * @example * 1 - merged = sources.merge(1); * 2 - merged = source.merge(otherSource); * @param {Mixed} [maxConcurrentOrOther] Maximum number of inner observable sequences being subscribed to concurrently or the second observable sequence. * @returns {Observable} The observable sequence that merges the elements of the inner sequences. */ observableProto.merge = function (maxConcurrentOrOther) { return typeof maxConcurrentOrOther !== 'number' ? observableMerge(this, maxConcurrentOrOther) : new MergeObservable(this, maxConcurrentOrOther); }; /** * Merges all the observable sequences into a single observable sequence. * The scheduler is optional and if not specified, the immediate scheduler is used. * @returns {Observable} The observable sequence that merges the elements of the observable sequences. */ var observableMerge = Observable.merge = function () { var scheduler, sources = [], i, len = arguments.length; if (!arguments[0]) { scheduler = immediateScheduler; for(i = 1; i < len; i++) { sources.push(arguments[i]); } } else if (isScheduler(arguments[0])) { scheduler = arguments[0]; for(i = 1; i < len; i++) { sources.push(arguments[i]); } } else { scheduler = immediateScheduler; for(i = 0; i < len; i++) { sources.push(arguments[i]); } } if (Array.isArray(sources[0])) { sources = sources[0]; } return observableOf(scheduler, sources).mergeAll(); }; var CompositeError = Rx.CompositeError = function(errors) { this.name = "NotImplementedError"; this.innerErrors = errors; this.message = 'This contains multiple errors. Check the innerErrors'; Error.call(this); } CompositeError.prototype = Error.prototype; /** * Flattens an Observable that emits Observables into one Observable, in a way that allows an Observer to * receive all successfully emitted items from all of the source Observables without being interrupted by * an error notification from one of them. * * This behaves like Observable.prototype.mergeAll except that if any of the merged Observables notify of an * error via the Observer's onError, mergeDelayError will refrain from propagating that * error notification until all of the merged Observables have finished emitting items. * @param {Array | Arguments} args Arguments or an array to merge. * @returns {Observable} an Observable that emits all of the items emitted by the Observables emitted by the Observable */ Observable.mergeDelayError = function() { var args; if (Array.isArray(arguments[0])) { args = arguments[0]; } else { var len = arguments.length; args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } } var source = observableOf(null, args); return new AnonymousObservable(function (o) { var group = new CompositeDisposable(), m = new SingleAssignmentDisposable(), isStopped = false, errors = []; function setCompletion() { if (errors.length === 0) { o.onCompleted(); } else if (errors.length === 1) { o.onError(errors[0]); } else { o.onError(new CompositeError(errors)); } } group.add(m); m.setDisposable(source.subscribe( function (innerSource) { var innerSubscription = new SingleAssignmentDisposable(); group.add(innerSubscription); // Check for promises support isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); innerSubscription.setDisposable(innerSource.subscribe( function (x) { o.onNext(x); }, function (e) { errors.push(e); group.remove(innerSubscription); isStopped && group.length === 1 && setCompletion(); }, function () { group.remove(innerSubscription); isStopped && group.length === 1 && setCompletion(); })); }, function (e) { errors.push(e); isStopped = true; group.length === 1 && setCompletion(); }, function () { isStopped = true; group.length === 1 && setCompletion(); })); return group; }); }; var MergeAllObservable = (function (__super__) { inherits(MergeAllObservable, __super__); function MergeAllObservable(source) { this.source = source; __super__.call(this); } MergeAllObservable.prototype.subscribeCore = function (observer) { var g = new CompositeDisposable(), m = new SingleAssignmentDisposable(); g.add(m); m.setDisposable(this.source.subscribe(new MergeAllObserver(observer, g))); return g; }; return MergeAllObservable; }(ObservableBase)); var MergeAllObserver = (function() { function MergeAllObserver(o, g) { this.o = o; this.g = g; this.isStopped = false; this.done = false; } MergeAllObserver.prototype.onNext = function(innerSource) { if(this.isStopped) { return; } var sad = new SingleAssignmentDisposable(); this.g.add(sad); isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); sad.setDisposable(innerSource.subscribe(new InnerObserver(this, this.g, sad))); }; MergeAllObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.o.onError(e); } }; MergeAllObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.done = true; this.g.length === 1 && this.o.onCompleted(); } }; MergeAllObserver.prototype.dispose = function() { this.isStopped = true; }; MergeAllObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.o.onError(e); return true; } return false; }; function InnerObserver(parent, g, sad) { this.parent = parent; this.g = g; this.sad = sad; this.isStopped = false; } InnerObserver.prototype.onNext = function (x) { if (!this.isStopped) { this.parent.o.onNext(x); } }; InnerObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); } }; InnerObserver.prototype.onCompleted = function () { if(!this.isStopped) { var parent = this.parent; this.isStopped = true; parent.g.remove(this.sad); parent.done && parent.g.length === 1 && parent.o.onCompleted(); } }; InnerObserver.prototype.dispose = function() { this.isStopped = true; }; InnerObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.parent.o.onError(e); return true; } return false; }; return MergeAllObserver; }()); /** * Merges an observable sequence of observable sequences into an observable sequence. * @returns {Observable} The observable sequence that merges the elements of the inner sequences. */ observableProto.mergeAll = observableProto.mergeObservable = function () { return new MergeAllObservable(this); }; /** * Returns the values from the source observable sequence only after the other observable sequence produces a value. * @param {Observable | Promise} other The observable sequence or Promise that triggers propagation of elements of the source sequence. * @returns {Observable} An observable sequence containing the elements of the source sequence starting from the point the other sequence triggered propagation. */ observableProto.skipUntil = function (other) { var source = this; return new AnonymousObservable(function (o) { var isOpen = false; var disposables = new CompositeDisposable(source.subscribe(function (left) { isOpen && o.onNext(left); }, function (e) { o.onError(e); }, function () { isOpen && o.onCompleted(); })); isPromise(other) && (other = observableFromPromise(other)); var rightSubscription = new SingleAssignmentDisposable(); disposables.add(rightSubscription); rightSubscription.setDisposable(other.subscribe(function () { isOpen = true; rightSubscription.dispose(); }, function (e) { o.onError(e); }, function () { rightSubscription.dispose(); })); return disposables; }, source); }; /** * Transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @returns {Observable} The observable sequence that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ observableProto['switch'] = observableProto.switchLatest = function () { var sources = this; return new AnonymousObservable(function (observer) { var hasLatest = false, innerSubscription = new SerialDisposable(), isStopped = false, latest = 0, subscription = sources.subscribe( function (innerSource) { var d = new SingleAssignmentDisposable(), id = ++latest; hasLatest = true; innerSubscription.setDisposable(d); // Check if Promise or Observable isPromise(innerSource) && (innerSource = observableFromPromise(innerSource)); d.setDisposable(innerSource.subscribe( function (x) { latest === id && observer.onNext(x); }, function (e) { latest === id && observer.onError(e); }, function () { if (latest === id) { hasLatest = false; isStopped && observer.onCompleted(); } })); }, function (e) { observer.onError(e); }, function () { isStopped = true; !hasLatest && observer.onCompleted(); }); return new CompositeDisposable(subscription, innerSubscription); }, sources); }; /** * Returns the values from the source observable sequence until the other observable sequence produces a value. * @param {Observable | Promise} other Observable sequence or Promise that terminates propagation of elements of the source sequence. * @returns {Observable} An observable sequence containing the elements of the source sequence up to the point the other sequence interrupted further propagation. */ observableProto.takeUntil = function (other) { var source = this; return new AnonymousObservable(function (o) { isPromise(other) && (other = observableFromPromise(other)); return new CompositeDisposable( source.subscribe(o), other.subscribe(function () { o.onCompleted(); }, function (e) { o.onError(e); }, noop) ); }, source); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function only when the (first) source observable sequence produces an element. * * @example * 1 - obs = obs1.withLatestFrom(obs2, obs3, function (o1, o2, o3) { return o1 + o2 + o3; }); * 2 - obs = obs1.withLatestFrom([obs2, obs3], function (o1, o2, o3) { return o1 + o2 + o3; }); * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ observableProto.withLatestFrom = function () { var len = arguments.length, args = new Array(len) for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var resultSelector = args.pop(), source = this; if (typeof source === 'undefined') { throw new Error('Source observable not found for withLatestFrom().'); } if (typeof resultSelector !== 'function') { throw new Error('withLatestFrom() expects a resultSelector function.'); } if (Array.isArray(args[0])) { args = args[0]; } return new AnonymousObservable(function (observer) { var falseFactory = function () { return false; }, n = args.length, hasValue = arrayInitialize(n, falseFactory), hasValueAll = false, values = new Array(n); var subscriptions = new Array(n + 1); for (var idx = 0; idx < n; idx++) { (function (i) { var other = args[i], sad = new SingleAssignmentDisposable(); isPromise(other) && (other = observableFromPromise(other)); sad.setDisposable(other.subscribe(function (x) { values[i] = x; hasValue[i] = true; hasValueAll = hasValue.every(identity); }, observer.onError.bind(observer), function () {})); subscriptions[i] = sad; }(idx)); } var sad = new SingleAssignmentDisposable(); sad.setDisposable(source.subscribe(function (x) { var res; var allValues = [x].concat(values); if (!hasValueAll) return; try { res = resultSelector.apply(null, allValues); } catch (ex) { observer.onError(ex); return; } observer.onNext(res); }, observer.onError.bind(observer), function () { observer.onCompleted(); })); subscriptions[n] = sad; return new CompositeDisposable(subscriptions); }, this); }; function zipArray(second, resultSelector) { var first = this; return new AnonymousObservable(function (observer) { var index = 0, len = second.length; return first.subscribe(function (left) { if (index < len) { var right = second[index++], result; try { result = resultSelector(left, right); } catch (e) { return observer.onError(e); } observer.onNext(result); } else { observer.onCompleted(); } }, function (e) { observer.onError(e); }, function () { observer.onCompleted(); }); }, first); } function falseFactory() { return false; } function emptyArrayFactory() { return []; } /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences or an array have produced an element at a corresponding index. * The last element in the arguments must be a function to invoke for each series of elements at corresponding indexes in the args. * * @example * 1 - res = obs1.zip(obs2, fn); * 1 - res = x1.zip([1,2,3], fn); * @returns {Observable} An observable sequence containing the result of combining elements of the args using the specified result selector function. */ observableProto.zip = function () { if (Array.isArray(arguments[0])) { return zipArray.apply(this, arguments); } var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var parent = this, resultSelector = args.pop(); args.unshift(parent); return new AnonymousObservable(function (observer) { var n = args.length, queues = arrayInitialize(n, emptyArrayFactory), isDone = arrayInitialize(n, falseFactory); function next(i) { var res, queuedValues; if (queues.every(function (x) { return x.length > 0; })) { try { queuedValues = queues.map(function (x) { return x.shift(); }); res = resultSelector.apply(parent, queuedValues); } catch (ex) { observer.onError(ex); return; } observer.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { observer.onCompleted(); } }; function done(i) { isDone[i] = true; if (isDone.every(function (x) { return x; })) { observer.onCompleted(); } } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { var source = args[i], sad = new SingleAssignmentDisposable(); isPromise(source) && (source = observableFromPromise(source)); sad.setDisposable(source.subscribe(function (x) { queues[i].push(x); next(i); }, function (e) { observer.onError(e); }, function () { done(i); })); subscriptions[i] = sad; })(idx); } return new CompositeDisposable(subscriptions); }, parent); }; /** * Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index. * @param arguments Observable sources. * @param {Function} resultSelector Function to invoke for each series of elements at corresponding indexes in the sources. * @returns {Observable} An observable sequence containing the result of combining elements of the sources using the specified result selector function. */ Observable.zip = function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } var first = args.shift(); return first.zip.apply(first, args); }; /** * Merges the specified observable sequences into one observable sequence by emitting a list with the elements of the observable sequences at corresponding indexes. * @param arguments Observable sources. * @returns {Observable} An observable sequence containing lists of elements at corresponding indexes. */ Observable.zipArray = function () { var sources; if (Array.isArray(arguments[0])) { sources = arguments[0]; } else { var len = arguments.length; sources = new Array(len); for(var i = 0; i < len; i++) { sources[i] = arguments[i]; } } return new AnonymousObservable(function (observer) { var n = sources.length, queues = arrayInitialize(n, function () { return []; }), isDone = arrayInitialize(n, function () { return false; }); function next(i) { if (queues.every(function (x) { return x.length > 0; })) { var res = queues.map(function (x) { return x.shift(); }); observer.onNext(res); } else if (isDone.filter(function (x, j) { return j !== i; }).every(identity)) { observer.onCompleted(); return; } }; function done(i) { isDone[i] = true; if (isDone.every(identity)) { observer.onCompleted(); return; } } var subscriptions = new Array(n); for (var idx = 0; idx < n; idx++) { (function (i) { subscriptions[i] = new SingleAssignmentDisposable(); subscriptions[i].setDisposable(sources[i].subscribe(function (x) { queues[i].push(x); next(i); }, function (e) { observer.onError(e); }, function () { done(i); })); })(idx); } return new CompositeDisposable(subscriptions); }); }; /** * Hides the identity of an observable sequence. * @returns {Observable} An observable sequence that hides the identity of the source sequence. */ observableProto.asObservable = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(o); }, this); }; /** * Dematerializes the explicit notification values of an observable sequence as implicit notifications. * @returns {Observable} An observable sequence exhibiting the behavior corresponding to the source sequence's notification values. */ observableProto.dematerialize = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(function (x) { return x.accept(o); }, function(e) { o.onError(e); }, function () { o.onCompleted(); }); }, this); }; /** * Returns an observable sequence that contains only distinct contiguous elements according to the keySelector and the comparer. * * var obs = observable.distinctUntilChanged(); * var obs = observable.distinctUntilChanged(function (x) { return x.id; }); * var obs = observable.distinctUntilChanged(function (x) { return x.id; }, function (x, y) { return x === y; }); * * @param {Function} [keySelector] A function to compute the comparison key for each element. If not provided, it projects the value. * @param {Function} [comparer] Equality comparer for computed key values. If not provided, defaults to an equality comparer function. * @returns {Observable} An observable sequence only containing the distinct contiguous elements, based on a computed key value, from the source sequence. */ observableProto.distinctUntilChanged = function (keySelector, comparer) { var source = this; comparer || (comparer = defaultComparer); return new AnonymousObservable(function (o) { var hasCurrentKey = false, currentKey; return source.subscribe(function (value) { var key = value; if (keySelector) { try { key = keySelector(value); } catch (e) { o.onError(e); return; } } if (hasCurrentKey) { try { var comparerEquals = comparer(currentKey, key); } catch (e) { o.onError(e); return; } } if (!hasCurrentKey || !comparerEquals) { hasCurrentKey = true; currentKey = key; o.onNext(value); } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, this); }; /** * Invokes an action for each element in the observable sequence and invokes an action upon graceful or exceptional termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function | Observer} observerOrOnNext Action to invoke for each element in the observable sequence or an observer. * @param {Function} [onError] Action to invoke upon exceptional termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. * @param {Function} [onCompleted] Action to invoke upon graceful termination of the observable sequence. Used if only the observerOrOnNext parameter is also a function. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto['do'] = observableProto.tap = observableProto.doAction = function (observerOrOnNext, onError, onCompleted) { var source = this, tapObserver = typeof observerOrOnNext === 'function' || typeof observerOrOnNext === 'undefined'? observerCreate(observerOrOnNext || noop, onError || noop, onCompleted || noop) : observerOrOnNext; return new AnonymousObservable(function (observer) { return source.subscribe(function (x) { try { tapObserver.onNext(x); } catch (e) { observer.onError(e); } observer.onNext(x); }, function (err) { try { tapObserver.onError(err); } catch (e) { observer.onError(e); } observer.onError(err); }, function () { try { tapObserver.onCompleted(); } catch (e) { observer.onError(e); } observer.onCompleted(); }); }, this); }; /** * Invokes an action for each element in the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onNext Action to invoke for each element in the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnNext = observableProto.tapOnNext = function (onNext, thisArg) { return this.tap(typeof thisArg !== 'undefined' ? function (x) { onNext.call(thisArg, x); } : onNext); }; /** * Invokes an action upon exceptional termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onError Action to invoke upon exceptional termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnError = observableProto.tapOnError = function (onError, thisArg) { return this.tap(noop, typeof thisArg !== 'undefined' ? function (e) { onError.call(thisArg, e); } : onError); }; /** * Invokes an action upon graceful termination of the observable sequence. * This method can be used for debugging, logging, etc. of query behavior by intercepting the message stream to run arbitrary actions for messages on the pipeline. * @param {Function} onCompleted Action to invoke upon graceful termination of the observable sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} The source sequence with the side-effecting behavior applied. */ observableProto.doOnCompleted = observableProto.tapOnCompleted = function (onCompleted, thisArg) { return this.tap(noop, null, typeof thisArg !== 'undefined' ? function () { onCompleted.call(thisArg); } : onCompleted); }; /** * Invokes a specified action after the source observable sequence terminates gracefully or exceptionally. * @param {Function} finallyAction Action to invoke after the source observable sequence terminates. * @returns {Observable} Source sequence with the action-invoking termination behavior applied. */ observableProto['finally'] = observableProto.ensure = function (action) { var source = this; return new AnonymousObservable(function (observer) { var subscription; try { subscription = source.subscribe(observer); } catch (e) { action(); throw e; } return disposableCreate(function () { try { subscription.dispose(); } catch (e) { throw e; } finally { action(); } }); }, this); }; /** * @deprecated use #finally or #ensure instead. */ observableProto.finallyAction = function (action) { //deprecate('finallyAction', 'finally or ensure'); return this.ensure(action); }; /** * Ignores all elements in an observable sequence leaving only the termination messages. * @returns {Observable} An empty observable sequence that signals termination, successful or exceptional, of the source sequence. */ observableProto.ignoreElements = function () { var source = this; return new AnonymousObservable(function (o) { return source.subscribe(noop, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Materializes the implicit notifications of an observable sequence as explicit notification values. * @returns {Observable} An observable sequence containing the materialized notification values from the source sequence. */ observableProto.materialize = function () { var source = this; return new AnonymousObservable(function (observer) { return source.subscribe(function (value) { observer.onNext(notificationCreateOnNext(value)); }, function (e) { observer.onNext(notificationCreateOnError(e)); observer.onCompleted(); }, function () { observer.onNext(notificationCreateOnCompleted()); observer.onCompleted(); }); }, source); }; /** * Repeats the observable sequence a specified number of times. If the repeat count is not specified, the sequence repeats indefinitely. * @param {Number} [repeatCount] Number of times to repeat the sequence. If not provided, repeats the sequence indefinitely. * @returns {Observable} The observable sequence producing the elements of the given sequence repeatedly. */ observableProto.repeat = function (repeatCount) { return enumerableRepeat(this, repeatCount).concat(); }; /** * Repeats the source observable sequence the specified number of times or until it successfully terminates. If the retry count is not specified, it retries indefinitely. * Note if you encounter an error and want it to retry once, then you must use .retry(2); * * @example * var res = retried = retry.repeat(); * var res = retried = retry.repeat(2); * @param {Number} [retryCount] Number of times to retry the sequence. If not provided, retry the sequence indefinitely. * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. */ observableProto.retry = function (retryCount) { return enumerableRepeat(this, retryCount).catchError(); }; /** * Repeats the source observable sequence upon error each time the notifier emits or until it successfully terminates. * if the notifier completes, the observable sequence completes. * * @example * var timer = Observable.timer(500); * var source = observable.retryWhen(timer); * @param {Observable} [notifier] An observable that triggers the retries or completes the observable with onNext or onCompleted respectively. * @returns {Observable} An observable sequence producing the elements of the given sequence repeatedly until it terminates successfully. */ observableProto.retryWhen = function (notifier) { return enumerableRepeat(this).catchErrorWhen(notifier); }; /** * Applies an accumulator function over an observable sequence and returns each intermediate result. The optional seed value is used as the initial accumulator value. * For aggregation behavior with no intermediate results, see Observable.aggregate. * @example * var res = source.scan(function (acc, x) { return acc + x; }); * var res = source.scan(0, function (acc, x) { return acc + x; }); * @param {Mixed} [seed] The initial accumulator value. * @param {Function} accumulator An accumulator function to be invoked on each element. * @returns {Observable} An observable sequence containing the accumulated values. */ observableProto.scan = function () { var hasSeed = false, seed, accumulator, source = this; if (arguments.length === 2) { hasSeed = true; seed = arguments[0]; accumulator = arguments[1]; } else { accumulator = arguments[0]; } return new AnonymousObservable(function (o) { var hasAccumulation, accumulation, hasValue; return source.subscribe ( function (x) { !hasValue && (hasValue = true); try { if (hasAccumulation) { accumulation = accumulator(accumulation, x); } else { accumulation = hasSeed ? accumulator(seed, x) : x; hasAccumulation = true; } } catch (e) { o.onError(e); return; } o.onNext(accumulation); }, function (e) { o.onError(e); }, function () { !hasValue && hasSeed && o.onNext(seed); o.onCompleted(); } ); }, source); }; /** * Bypasses a specified number of elements at the end of an observable sequence. * @description * This operator accumulates a queue with a length enough to store the first `count` elements. As more elements are * received, elements are taken from the front of the queue and produced on the result sequence. This causes elements to be delayed. * @param count Number of elements to bypass at the end of the source sequence. * @returns {Observable} An observable sequence containing the source sequence elements except for the bypassed ones at the end. */ observableProto.skipLast = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var q = []; return source.subscribe(function (x) { q.push(x); q.length > count && o.onNext(q.shift()); }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend. * @example * var res = source.startWith(1, 2, 3); * var res = source.startWith(Rx.Scheduler.timeout, 1, 2, 3); * @param {Arguments} args The specified values to prepend to the observable sequence * @returns {Observable} The source sequence prepended with the specified values. */ observableProto.startWith = function () { var values, scheduler, start = 0; if (!!arguments.length && isScheduler(arguments[0])) { scheduler = arguments[0]; start = 1; } else { scheduler = immediateScheduler; } for(var args = [], i = start, len = arguments.length; i < len; i++) { args.push(arguments[i]); } return enumerableOf([observableFromArray(args, scheduler), this]).concat(); }; /** * Returns a specified number of contiguous elements from the end of an observable sequence. * @description * This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of * the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. * @param {Number} count Number of elements to take from the end of the source sequence. * @returns {Observable} An observable sequence containing the specified number of elements from the end of the source sequence. */ observableProto.takeLast = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var q = []; return source.subscribe(function (x) { q.push(x); q.length > count && q.shift(); }, function (e) { o.onError(e); }, function () { while (q.length > 0) { o.onNext(q.shift()); } o.onCompleted(); }); }, source); }; function concatMap(source, selector, thisArg) { var selectorFunc = bindCallback(selector, thisArg, 3); return source.map(function (x, i) { var result = selectorFunc(x, i, source); isPromise(result) && (result = observableFromPromise(result)); (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); return result; }).concatAll(); } /** * One of the Following: * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. * * @example * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }); * Or: * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. * * var res = source.concatMap(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); * Or: * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. * * var res = source.concatMap(Rx.Observable.fromArray([1,2,3])); * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the * source sequence onto which could be either an observable or Promise. * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. */ observableProto.selectConcat = observableProto.concatMap = function (selector, resultSelector, thisArg) { if (isFunction(selector) && isFunction(resultSelector)) { return this.concatMap(function (x, i) { var selectorResult = selector(x, i); isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); return selectorResult.map(function (y, i2) { return resultSelector(x, y, i, i2); }); }); } return isFunction(selector) ? concatMap(this, selector, thisArg) : concatMap(this, function () { return selector; }); }; var MapObservable = (function (__super__) { inherits(MapObservable, __super__); function MapObservable(source, selector, thisArg) { this.source = source; this.selector = bindCallback(selector, thisArg, 3); __super__.call(this); } MapObservable.prototype.internalMap = function (selector, thisArg) { var self = this; return new MapObservable(this.source, function (x, i, o) { return selector(self.selector(x, i, o), i, o); }, thisArg) }; MapObservable.prototype.subscribeCore = function (observer) { return this.source.subscribe(new MapObserver(observer, this.selector, this)); }; return MapObservable; }(ObservableBase)); function MapObserver(observer, selector, source) { this.observer = observer; this.selector = selector; this.source = source; this.i = 0; this.isStopped = false; } MapObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var result = tryCatch(this.selector).call(this, x, this.i++, this.source); if (result === errorObj) { return this.observer.onError(result.e); } this.observer.onNext(result); /*try { var result = this.selector(x, this.i++, this.source); } catch (e) { return this.observer.onError(e); } this.observer.onNext(result);*/ }; MapObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; MapObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } }; MapObserver.prototype.dispose = function() { this.isStopped = true; }; MapObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Projects each element of an observable sequence into a new form by incorporating the element's index. * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source. */ observableProto.map = observableProto.select = function (selector, thisArg) { var selectorFn = typeof selector === 'function' ? selector : function () { return selector; }; return this instanceof MapObservable ? this.internalMap(selectorFn, thisArg) : new MapObservable(this, selectorFn, thisArg); }; /** * Retrieves the value of a specified nested property from all elements in * the Observable sequence. * @param {Arguments} arguments The nested properties to pluck. * @returns {Observable} Returns a new Observable sequence of property values. */ observableProto.pluck = function () { var args = arguments, len = arguments.length; if (len === 0) { throw new Error('List of properties cannot be empty.'); } return this.map(function (x) { var currentProp = x; for (var i = 0; i < len; i++) { var p = currentProp[args[i]]; if (typeof p !== 'undefined') { currentProp = p; } else { return undefined; } } return currentProp; }); }; function flatMap(source, selector, thisArg) { var selectorFunc = bindCallback(selector, thisArg, 3); return source.map(function (x, i) { var result = selectorFunc(x, i, source); isPromise(result) && (result = observableFromPromise(result)); (isArrayLike(result) || isIterable(result)) && (result = observableFrom(result)); return result; }).mergeAll(); } /** * One of the Following: * Projects each element of an observable sequence to an observable sequence and merges the resulting observable sequences into one observable sequence. * * @example * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }); * Or: * Projects each element of an observable sequence to an observable sequence, invokes the result selector for the source element and each of the corresponding inner sequence's elements, and merges the results into one observable sequence. * * var res = source.selectMany(function (x) { return Rx.Observable.range(0, x); }, function (x, y) { return x + y; }); * Or: * Projects each element of the source observable sequence to the other observable sequence and merges the resulting observable sequences into one observable sequence. * * var res = source.selectMany(Rx.Observable.fromArray([1,2,3])); * @param {Function} selector A transform function to apply to each element or an observable sequence to project each element from the source sequence onto which could be either an observable or Promise. * @param {Function} [resultSelector] A transform function to apply to each element of the intermediate sequence. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the one-to-many transform function collectionSelector on each element of the input sequence and then mapping each of those sequence elements and their corresponding source element to a result element. */ observableProto.selectMany = observableProto.flatMap = function (selector, resultSelector, thisArg) { if (isFunction(selector) && isFunction(resultSelector)) { return this.flatMap(function (x, i) { var selectorResult = selector(x, i); isPromise(selectorResult) && (selectorResult = observableFromPromise(selectorResult)); (isArrayLike(selectorResult) || isIterable(selectorResult)) && (selectorResult = observableFrom(selectorResult)); return selectorResult.map(function (y, i2) { return resultSelector(x, y, i, i2); }); }, thisArg); } return isFunction(selector) ? flatMap(this, selector, thisArg) : flatMap(this, function () { return selector; }); }; /** * Projects each element of an observable sequence into a new sequence of observable sequences by incorporating the element's index and then * transforms an observable sequence of observable sequences into an observable sequence producing values only from the most recent observable sequence. * @param {Function} selector A transform function to apply to each source element; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence whose elements are the result of invoking the transform function on each element of source producing an Observable of Observable sequences * and that at any point in time produces the elements of the most recent inner observable sequence that has been received. */ observableProto.selectSwitch = observableProto.flatMapLatest = observableProto.switchMap = function (selector, thisArg) { return this.select(selector, thisArg).switchLatest(); }; /** * Bypasses a specified number of elements in an observable sequence and then returns the remaining elements. * @param {Number} count The number of elements to skip before returning the remaining elements. * @returns {Observable} An observable sequence that contains the elements that occur after the specified index in the input sequence. */ observableProto.skip = function (count) { if (count < 0) { throw new ArgumentOutOfRangeError(); } var source = this; return new AnonymousObservable(function (o) { var remaining = count; return source.subscribe(function (x) { if (remaining <= 0) { o.onNext(x); } else { remaining--; } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Bypasses elements in an observable sequence as long as a specified condition is true and then returns the remaining elements. * The element's index is used in the logic of the predicate function. * * var res = source.skipWhile(function (value) { return value < 10; }); * var res = source.skipWhile(function (value, index) { return value < 10 || index < 10; }); * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains the elements from the input sequence starting at the first element in the linear series that does not pass the test specified by predicate. */ observableProto.skipWhile = function (predicate, thisArg) { var source = this, callback = bindCallback(predicate, thisArg, 3); return new AnonymousObservable(function (o) { var i = 0, running = false; return source.subscribe(function (x) { if (!running) { try { running = !callback(x, i++, source); } catch (e) { o.onError(e); return; } } running && o.onNext(x); }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Returns a specified number of contiguous elements from the start of an observable sequence, using the specified scheduler for the edge case of take(0). * * var res = source.take(5); * var res = source.take(0, Rx.Scheduler.timeout); * @param {Number} count The number of elements to return. * @param {Scheduler} [scheduler] Scheduler used to produce an OnCompleted message in case <paramref name="count count</paramref> is set to 0. * @returns {Observable} An observable sequence that contains the specified number of elements from the start of the input sequence. */ observableProto.take = function (count, scheduler) { if (count < 0) { throw new ArgumentOutOfRangeError(); } if (count === 0) { return observableEmpty(scheduler); } var source = this; return new AnonymousObservable(function (o) { var remaining = count; return source.subscribe(function (x) { if (remaining-- > 0) { o.onNext(x); remaining === 0 && o.onCompleted(); } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; /** * Returns elements from an observable sequence as long as a specified condition is true. * The element's index is used in the logic of the predicate function. * @param {Function} predicate A function to test each element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains the elements from the input sequence that occur before the element at which the test no longer passes. */ observableProto.takeWhile = function (predicate, thisArg) { var source = this, callback = bindCallback(predicate, thisArg, 3); return new AnonymousObservable(function (o) { var i = 0, running = true; return source.subscribe(function (x) { if (running) { try { running = callback(x, i++, source); } catch (e) { o.onError(e); return; } if (running) { o.onNext(x); } else { o.onCompleted(); } } }, function (e) { o.onError(e); }, function () { o.onCompleted(); }); }, source); }; var FilterObservable = (function (__super__) { inherits(FilterObservable, __super__); function FilterObservable(source, predicate, thisArg) { this.source = source; this.predicate = bindCallback(predicate, thisArg, 3); __super__.call(this); } FilterObservable.prototype.subscribeCore = function (observer) { return this.source.subscribe(new FilterObserver(observer, this.predicate, this)); }; FilterObservable.prototype.internalFilter = function(predicate, thisArg) { var self = this; return new FilterObservable(this.source, function(x, i, o) { return self.predicate(x, i, o) && predicate(x, i, o); }, thisArg); }; return FilterObservable; }(ObservableBase)); function FilterObserver(observer, predicate, source) { this.observer = observer; this.predicate = predicate; this.source = source; this.i = 0; this.isStopped = false; } FilterObserver.prototype.onNext = function(x) { if (this.isStopped) { return; } var shouldYield = tryCatch(this.predicate).call(this, x, this.i++, this.source); if (shouldYield === errorObj) { return this.observer.onError(shouldYield.e); } shouldYield && this.observer.onNext(x); }; FilterObserver.prototype.onError = function (e) { if(!this.isStopped) { this.isStopped = true; this.observer.onError(e); } }; FilterObserver.prototype.onCompleted = function () { if(!this.isStopped) { this.isStopped = true; this.observer.onCompleted(); } }; FilterObserver.prototype.dispose = function() { this.isStopped = true; }; FilterObserver.prototype.fail = function (e) { if (!this.isStopped) { this.isStopped = true; this.observer.onError(e); return true; } return false; }; /** * Filters the elements of an observable sequence based on a predicate by incorporating the element's index. * @param {Function} predicate A function to test each source element for a condition; the second parameter of the function represents the index of the source element. * @param {Any} [thisArg] Object to use as this when executing callback. * @returns {Observable} An observable sequence that contains elements from the input sequence that satisfy the condition. */ observableProto.filter = observableProto.where = function (predicate, thisArg) { return this instanceof FilterObservable ? this.internalFilter(predicate, thisArg) : new FilterObservable(this, predicate, thisArg); }; /** * Converts a callback function to an observable sequence. * * @param {Function} function Function with a callback as the last parameter to convert to an Observable sequence. * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. * @param {Function} [selector] A selector which takes the arguments from the callback to produce a single item to yield on next. * @returns {Function} A function, when executed with the required parameters minus the callback, produces an Observable sequence with a single value of the arguments to the callback as an array. */ Observable.fromCallback = function (func, context, selector) { return function () { for(var args = [], i = 0, len = arguments.length; i < len; i++) { args.push(arguments[i]); } return new AnonymousObservable(function (observer) { function handler() { var results = arguments; if (selector) { try { results = selector(results); } catch (e) { return observer.onError(e); } observer.onNext(results); } else { if (results.length <= 1) { observer.onNext.apply(observer, results); } else { observer.onNext(results); } } observer.onCompleted(); } args.push(handler); func.apply(context, args); }).publishLast().refCount(); }; }; /** * Converts a Node.js callback style function to an observable sequence. This must be in function (err, ...) format. * @param {Function} func The function to call * @param {Mixed} [context] The context for the func parameter to be executed. If not specified, defaults to undefined. * @param {Function} [selector] A selector which takes the arguments from the callback minus the error to produce a single item to yield on next. * @returns {Function} An async function which when applied, returns an observable sequence with the callback arguments as an array. */ Observable.fromNodeCallback = function (func, context, selector) { return function () { var len = arguments.length, args = new Array(len); for(var i = 0; i < len; i++) { args[i] = arguments[i]; } return new AnonymousObservable(function (observer) { function handler(err) { if (err) { observer.onError(err); return; } var len = arguments.length, results = []; for(var i = 1; i < len; i++) { results[i - 1] = arguments[i]; } if (selector) { try { results = selector(results); } catch (e) { return observer.onError(e); } observer.onNext(results); } else { if (results.length <= 1) { observer.onNext.apply(observer, results); } else { observer.onNext(results); } } observer.onCompleted(); } args.push(handler); func.apply(context, args); }).publishLast().refCount(); }; }; function createListener (element, name, handler) { if (element.addEventListener) { element.addEventListener(name, handler, false); return disposableCreate(function () { element.removeEventListener(name, handler, false); }); } throw new Error('No listener found'); } function createEventListener (el, eventName, handler) { var disposables = new CompositeDisposable(); // Asume NodeList if (Object.prototype.toString.call(el) === '[object NodeList]') { for (var i = 0, len = el.length; i < len; i++) { disposables.add(createEventListener(el.item(i), eventName, handler)); } } else if (el) { disposables.add(createListener(el, eventName, handler)); } return disposables; } /** * Configuration option to determine whether to use native events only */ Rx.config.useNativeEvents = false; /** * Creates an observable sequence by adding an event listener to the matching DOMElement or each item in the NodeList. * * @example * var source = Rx.Observable.fromEvent(element, 'mouseup'); * * @param {Object} element The DOMElement or NodeList to attach a listener. * @param {String} eventName The event name to attach the observable sequence. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. * @returns {Observable} An observable sequence of events from the specified element and the specified event. */ Observable.fromEvent = function (element, eventName, selector) { // Node.js specific if (element.addListener) { return fromEventPattern( function (h) { element.addListener(eventName, h); }, function (h) { element.removeListener(eventName, h); }, selector); } // Use only if non-native events are allowed if (!Rx.config.useNativeEvents) { // Handles jq, Angular.js, Zepto, Marionette, Ember.js if (typeof element.on === 'function' && typeof element.off === 'function') { return fromEventPattern( function (h) { element.on(eventName, h); }, function (h) { element.off(eventName, h); }, selector); } } return new AnonymousObservable(function (observer) { return createEventListener( element, eventName, function handler (e) { var results = e; if (selector) { try { results = selector(arguments); } catch (err) { return observer.onError(err); } } observer.onNext(results); }); }).publish().refCount(); }; /** * Creates an observable sequence from an event emitter via an addHandler/removeHandler pair. * @param {Function} addHandler The function to add a handler to the emitter. * @param {Function} [removeHandler] The optional function to remove a handler from an emitter. * @param {Function} [selector] A selector which takes the arguments from the event handler to produce a single item to yield on next. * @returns {Observable} An observable sequence which wraps an event from an event emitter */ var fromEventPattern = Observable.fromEventPattern = function (addHandler, removeHandler, selector) { return new AnonymousObservable(function (observer) { function innerHandler (e) { var result = e; if (selector) { try { result = selector(arguments); } catch (err) { return observer.onError(err); } } observer.onNext(result); } var returnValue = addHandler(innerHandler); return disposableCreate(function () { if (removeHandler) { removeHandler(innerHandler, returnValue); } }); }).publish().refCount(); }; /** * Converts a Promise to an Observable sequence * @param {Promise} An ES6 Compliant promise. * @returns {Observable} An Observable sequence which wraps the existing promise success and failure. */ var observableFromPromise = Observable.fromPromise = function (promise) { return observableDefer(function () { var subject = new Rx.AsyncSubject(); promise.then( function (value) { subject.onNext(value); subject.onCompleted(); }, subject.onError.bind(subject)); return subject; }); }; /* * Converts an existing observable sequence to an ES6 Compatible Promise * @example * var promise = Rx.Observable.return(42).toPromise(RSVP.Promise); * * // With config * Rx.config.Promise = RSVP.Promise; * var promise = Rx.Observable.return(42).toPromise(); * @param {Function} [promiseCtor] The constructor of the promise. If not provided, it looks for it in Rx.config.Promise. * @returns {Promise} An ES6 compatible promise with the last value from the observable sequence. */ observableProto.toPromise = function (promiseCtor) { promiseCtor || (promiseCtor = Rx.config.Promise); if (!promiseCtor) { throw new NotSupportedError('Promise type not provided nor in Rx.config.Promise'); } var source = this; return new promiseCtor(function (resolve, reject) { // No cancellation can be done var value, hasValue = false; source.subscribe(function (v) { value = v; hasValue = true; }, reject, function () { hasValue && resolve(value); }); }); }; /** * Invokes the asynchronous function, surfacing the result through an observable sequence. * @param {Function} functionAsync Asynchronous function which returns a Promise to run. * @returns {Observable} An observable sequence exposing the function's result value, or an exception. */ Observable.startAsync = function (functionAsync) { var promise; try { promise = functionAsync(); } catch (e) { return observableThrow(e); } return observableFromPromise(promise); } /** * Multicasts the source sequence notifications through an instantiated subject into all uses of the sequence within a selector function. Each * subscription to the resulting sequence causes a separate multicast invocation, exposing the sequence resulting from the selector function's * invocation. For specializations with fixed subject types, see Publish, PublishLast, and Replay. * * @example * 1 - res = source.multicast(observable); * 2 - res = source.multicast(function () { return new Subject(); }, function (x) { return x; }); * * @param {Function|Subject} subjectOrSubjectSelector * Factory function to create an intermediate subject through which the source sequence's elements will be multicast to the selector function. * Or: * Subject to push source elements into. * * @param {Function} [selector] Optional selector function which can use the multicasted source sequence subject to the policies enforced by the created subject. Specified only if <paramref name="subjectOrSubjectSelector" is a factory function. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.multicast = function (subjectOrSubjectSelector, selector) { var source = this; return typeof subjectOrSubjectSelector === 'function' ? new AnonymousObservable(function (observer) { var connectable = source.multicast(subjectOrSubjectSelector()); return new CompositeDisposable(selector(connectable).subscribe(observer), connectable.connect()); }, source) : new ConnectableObservable(source, subjectOrSubjectSelector); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence. * This operator is a specialization of Multicast using a regular Subject. * * @example * var resres = source.publish(); * var res = source.publish(function (x) { return x; }); * * @param {Function} [selector] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all notifications of the source from the time of the subscription on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publish = function (selector) { return selector && isFunction(selector) ? this.multicast(function () { return new Subject(); }, selector) : this.multicast(new Subject()); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence. * This operator is a specialization of publish which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.share = function () { return this.publish().refCount(); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence containing only the last notification. * This operator is a specialization of Multicast using a AsyncSubject. * * @example * var res = source.publishLast(); * var res = source.publishLast(function (x) { return x; }); * * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will only receive the last notification of the source. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publishLast = function (selector) { return selector && isFunction(selector) ? this.multicast(function () { return new AsyncSubject(); }, selector) : this.multicast(new AsyncSubject()); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence and starts with initialValue. * This operator is a specialization of Multicast using a BehaviorSubject. * * @example * var res = source.publishValue(42); * var res = source.publishValue(function (x) { return x.select(function (y) { return y * y; }) }, 42); * * @param {Function} [selector] Optional selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive immediately receive the initial value, followed by all notifications of the source from the time of the subscription on. * @param {Mixed} initialValue Initial value received by observers upon subscription. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.publishValue = function (initialValueOrSelector, initialValue) { return arguments.length === 2 ? this.multicast(function () { return new BehaviorSubject(initialValue); }, initialValueOrSelector) : this.multicast(new BehaviorSubject(initialValueOrSelector)); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence and starts with an initialValue. * This operator is a specialization of publishValue which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * @param {Mixed} initialValue Initial value received by observers upon subscription. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.shareValue = function (initialValue) { return this.publishValue(initialValue).refCount(); }; /** * Returns an observable sequence that is the result of invoking the selector on a connectable observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. * This operator is a specialization of Multicast using a ReplaySubject. * * @example * var res = source.replay(null, 3); * var res = source.replay(null, 3, 500); * var res = source.replay(null, 3, 500, scheduler); * var res = source.replay(function (x) { return x.take(6).repeat(); }, 3, 500, scheduler); * * @param selector [Optional] Selector function which can use the multicasted source sequence as many times as needed, without causing multiple subscriptions to the source sequence. Subscribers to the given source will receive all the notifications of the source subject to the specified replay buffer trimming policy. * @param bufferSize [Optional] Maximum element count of the replay buffer. * @param windowSize [Optional] Maximum time length of the replay buffer. * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence within a selector function. */ observableProto.replay = function (selector, bufferSize, windowSize, scheduler) { return selector && isFunction(selector) ? this.multicast(function () { return new ReplaySubject(bufferSize, windowSize, scheduler); }, selector) : this.multicast(new ReplaySubject(bufferSize, windowSize, scheduler)); }; /** * Returns an observable sequence that shares a single subscription to the underlying sequence replaying notifications subject to a maximum time length for the replay buffer. * This operator is a specialization of replay which creates a subscription when the number of observers goes from zero to one, then shares that subscription with all subsequent observers until the number of observers returns to zero, at which point the subscription is disposed. * * @example * var res = source.shareReplay(3); * var res = source.shareReplay(3, 500); * var res = source.shareReplay(3, 500, scheduler); * * @param bufferSize [Optional] Maximum element count of the replay buffer. * @param window [Optional] Maximum time length of the replay buffer. * @param scheduler [Optional] Scheduler where connected observers within the selector function will be invoked on. * @returns {Observable} An observable sequence that contains the elements of a sequence produced by multicasting the source sequence. */ observableProto.shareReplay = function (bufferSize, windowSize, scheduler) { return this.replay(null, bufferSize, windowSize, scheduler).refCount(); }; var ConnectableObservable = Rx.ConnectableObservable = (function (__super__) { inherits(ConnectableObservable, __super__); function ConnectableObservable(source, subject) { var hasSubscription = false, subscription, sourceObservable = source.asObservable(); this.connect = function () { if (!hasSubscription) { hasSubscription = true; subscription = new CompositeDisposable(sourceObservable.subscribe(subject), disposableCreate(function () { hasSubscription = false; })); } return subscription; }; __super__.call(this, function (o) { return subject.subscribe(o); }); } ConnectableObservable.prototype.refCount = function () { var connectableSubscription, count = 0, source = this; return new AnonymousObservable(function (observer) { var shouldConnect = ++count === 1, subscription = source.subscribe(observer); shouldConnect && (connectableSubscription = source.connect()); return function () { subscription.dispose(); --count === 0 && connectableSubscription.dispose(); }; }); }; return ConnectableObservable; }(Observable)); function observableTimerDate(dueTime, scheduler) { return new AnonymousObservable(function (observer) { return scheduler.scheduleWithAbsolute(dueTime, function () { observer.onNext(0); observer.onCompleted(); }); }); } function observableTimerDateAndPeriod(dueTime, period, scheduler) { return new AnonymousObservable(function (observer) { var d = dueTime, p = normalizeTime(period); return scheduler.scheduleRecursiveWithAbsoluteAndState(0, d, function (count, self) { if (p > 0) { var now = scheduler.now(); d = d + p; d <= now && (d = now + p); } observer.onNext(count); self(count + 1, d); }); }); } function observableTimerTimeSpan(dueTime, scheduler) { return new AnonymousObservable(function (observer) { return scheduler.scheduleWithRelative(normalizeTime(dueTime), function () { observer.onNext(0); observer.onCompleted(); }); }); } function observableTimerTimeSpanAndPeriod(dueTime, period, scheduler) { return dueTime === period ? new AnonymousObservable(function (observer) { return scheduler.schedulePeriodicWithState(0, period, function (count) { observer.onNext(count); return count + 1; }); }) : observableDefer(function () { return observableTimerDateAndPeriod(scheduler.now() + dueTime, period, scheduler); }); } /** * Returns an observable sequence that produces a value after each period. * * @example * 1 - res = Rx.Observable.interval(1000); * 2 - res = Rx.Observable.interval(1000, Rx.Scheduler.timeout); * * @param {Number} period Period for producing the values in the resulting sequence (specified as an integer denoting milliseconds). * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, Rx.Scheduler.timeout is used. * @returns {Observable} An observable sequence that produces a value after each period. */ var observableinterval = Observable.interval = function (period, scheduler) { return observableTimerTimeSpanAndPeriod(period, period, isScheduler(scheduler) ? scheduler : timeoutScheduler); }; /** * Returns an observable sequence that produces a value after dueTime has elapsed and then after each period. * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) at which to produce the first value. * @param {Mixed} [periodOrScheduler] Period to produce subsequent values (specified as an integer denoting milliseconds), or the scheduler to run the timer on. If not specified, the resulting timer is not recurring. * @param {Scheduler} [scheduler] Scheduler to run the timer on. If not specified, the timeout scheduler is used. * @returns {Observable} An observable sequence that produces a value after due time has elapsed and then each period. */ var observableTimer = Observable.timer = function (dueTime, periodOrScheduler, scheduler) { var period; isScheduler(scheduler) || (scheduler = timeoutScheduler); if (periodOrScheduler !== undefined && typeof periodOrScheduler === 'number') { period = periodOrScheduler; } else if (isScheduler(periodOrScheduler)) { scheduler = periodOrScheduler; } if (dueTime instanceof Date && period === undefined) { return observableTimerDate(dueTime.getTime(), scheduler); } if (dueTime instanceof Date && period !== undefined) { period = periodOrScheduler; return observableTimerDateAndPeriod(dueTime.getTime(), period, scheduler); } return period === undefined ? observableTimerTimeSpan(dueTime, scheduler) : observableTimerTimeSpanAndPeriod(dueTime, period, scheduler); }; function observableDelayTimeSpan(source, dueTime, scheduler) { return new AnonymousObservable(function (observer) { var active = false, cancelable = new SerialDisposable(), exception = null, q = [], running = false, subscription; subscription = source.materialize().timestamp(scheduler).subscribe(function (notification) { var d, shouldRun; if (notification.value.kind === 'E') { q = []; q.push(notification); exception = notification.value.exception; shouldRun = !running; } else { q.push({ value: notification.value, timestamp: notification.timestamp + dueTime }); shouldRun = !active; active = true; } if (shouldRun) { if (exception !== null) { observer.onError(exception); } else { d = new SingleAssignmentDisposable(); cancelable.setDisposable(d); d.setDisposable(scheduler.scheduleRecursiveWithRelative(dueTime, function (self) { var e, recurseDueTime, result, shouldRecurse; if (exception !== null) { return; } running = true; do { result = null; if (q.length > 0 && q[0].timestamp - scheduler.now() <= 0) { result = q.shift().value; } if (result !== null) { result.accept(observer); } } while (result !== null); shouldRecurse = false; recurseDueTime = 0; if (q.length > 0) { shouldRecurse = true; recurseDueTime = Math.max(0, q[0].timestamp - scheduler.now()); } else { active = false; } e = exception; running = false; if (e !== null) { observer.onError(e); } else if (shouldRecurse) { self(recurseDueTime); } })); } } }); return new CompositeDisposable(subscription, cancelable); }, source); } function observableDelayDate(source, dueTime, scheduler) { return observableDefer(function () { return observableDelayTimeSpan(source, dueTime - scheduler.now(), scheduler); }); } /** * Time shifts the observable sequence by dueTime. The relative time intervals between the values are preserved. * * @example * 1 - res = Rx.Observable.delay(new Date()); * 2 - res = Rx.Observable.delay(new Date(), Rx.Scheduler.timeout); * * 3 - res = Rx.Observable.delay(5000); * 4 - res = Rx.Observable.delay(5000, 1000, Rx.Scheduler.timeout); * @memberOf Observable# * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) by which to shift the observable sequence. * @param {Scheduler} [scheduler] Scheduler to run the delay timers on. If not specified, the timeout scheduler is used. * @returns {Observable} Time-shifted sequence. */ observableProto.delay = function (dueTime, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return dueTime instanceof Date ? observableDelayDate(this, dueTime.getTime(), scheduler) : observableDelayTimeSpan(this, dueTime, scheduler); }; /** * Ignores values from an observable sequence which are followed by another value before dueTime. * @param {Number} dueTime Duration of the debounce period for each value (specified as an integer denoting milliseconds). * @param {Scheduler} [scheduler] Scheduler to run the debounce timers on. If not specified, the timeout scheduler is used. * @returns {Observable} The debounced sequence. */ observableProto.debounce = observableProto.throttleWithTimeout = function (dueTime, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); var source = this; return new AnonymousObservable(function (observer) { var cancelable = new SerialDisposable(), hasvalue = false, value, id = 0; var subscription = source.subscribe( function (x) { hasvalue = true; value = x; id++; var currentId = id, d = new SingleAssignmentDisposable(); cancelable.setDisposable(d); d.setDisposable(scheduler.scheduleWithRelative(dueTime, function () { hasvalue && id === currentId && observer.onNext(value); hasvalue = false; })); }, function (e) { cancelable.dispose(); observer.onError(e); hasvalue = false; id++; }, function () { cancelable.dispose(); hasvalue && observer.onNext(value); observer.onCompleted(); hasvalue = false; id++; }); return new CompositeDisposable(subscription, cancelable); }, this); }; /** * @deprecated use #debounce or #throttleWithTimeout instead. */ observableProto.throttle = function(dueTime, scheduler) { //deprecate('throttle', 'debounce or throttleWithTimeout'); return this.debounce(dueTime, scheduler); }; /** * Records the timestamp for each value in an observable sequence. * * @example * 1 - res = source.timestamp(); // produces { value: x, timestamp: ts } * 2 - res = source.timestamp(Rx.Scheduler.timeout); * * @param {Scheduler} [scheduler] Scheduler used to compute timestamps. If not specified, the timeout scheduler is used. * @returns {Observable} An observable sequence with timestamp information on values. */ observableProto.timestamp = function (scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return this.map(function (x) { return { value: x, timestamp: scheduler.now() }; }); }; function sampleObservable(source, sampler) { return new AnonymousObservable(function (observer) { var atEnd, value, hasValue; function sampleSubscribe() { if (hasValue) { hasValue = false; observer.onNext(value); } atEnd && observer.onCompleted(); } return new CompositeDisposable( source.subscribe(function (newValue) { hasValue = true; value = newValue; }, observer.onError.bind(observer), function () { atEnd = true; }), sampler.subscribe(sampleSubscribe, observer.onError.bind(observer), sampleSubscribe) ); }, source); } /** * Samples the observable sequence at each interval. * * @example * 1 - res = source.sample(sampleObservable); // Sampler tick sequence * 2 - res = source.sample(5000); // 5 seconds * 2 - res = source.sample(5000, Rx.Scheduler.timeout); // 5 seconds * * @param {Mixed} intervalOrSampler Interval at which to sample (specified as an integer denoting milliseconds) or Sampler Observable. * @param {Scheduler} [scheduler] Scheduler to run the sampling timer on. If not specified, the timeout scheduler is used. * @returns {Observable} Sampled observable sequence. */ observableProto.sample = observableProto.throttleLatest = function (intervalOrSampler, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); return typeof intervalOrSampler === 'number' ? sampleObservable(this, observableinterval(intervalOrSampler, scheduler)) : sampleObservable(this, intervalOrSampler); }; /** * Returns the source observable sequence or the other observable sequence if dueTime elapses. * @param {Number} dueTime Absolute (specified as a Date object) or relative time (specified as an integer denoting milliseconds) when a timeout occurs. * @param {Observable} [other] Sequence to return in case of a timeout. If not specified, a timeout error throwing sequence will be used. * @param {Scheduler} [scheduler] Scheduler to run the timeout timers on. If not specified, the timeout scheduler is used. * @returns {Observable} The source sequence switching to the other sequence in case of a timeout. */ observableProto.timeout = function (dueTime, other, scheduler) { (other == null || typeof other === 'string') && (other = observableThrow(new Error(other || 'Timeout'))); isScheduler(scheduler) || (scheduler = timeoutScheduler); var source = this, schedulerMethod = dueTime instanceof Date ? 'scheduleWithAbsolute' : 'scheduleWithRelative'; return new AnonymousObservable(function (observer) { var id = 0, original = new SingleAssignmentDisposable(), subscription = new SerialDisposable(), switched = false, timer = new SerialDisposable(); subscription.setDisposable(original); function createTimer() { var myId = id; timer.setDisposable(scheduler[schedulerMethod](dueTime, function () { if (id === myId) { isPromise(other) && (other = observableFromPromise(other)); subscription.setDisposable(other.subscribe(observer)); } })); } createTimer(); original.setDisposable(source.subscribe(function (x) { if (!switched) { id++; observer.onNext(x); createTimer(); } }, function (e) { if (!switched) { id++; observer.onError(e); } }, function () { if (!switched) { id++; observer.onCompleted(); } })); return new CompositeDisposable(subscription, timer); }, source); }; /** * Returns an Observable that emits only the first item emitted by the source Observable during sequential time windows of a specified duration. * @param {Number} windowDuration time to wait before emitting another item after emitting the last item * @param {Scheduler} [scheduler] the Scheduler to use internally to manage the timers that handle timeout for each item. If not provided, defaults to Scheduler.timeout. * @returns {Observable} An Observable that performs the throttle operation. */ observableProto.throttleFirst = function (windowDuration, scheduler) { isScheduler(scheduler) || (scheduler = timeoutScheduler); var duration = +windowDuration || 0; if (duration <= 0) { throw new RangeError('windowDuration cannot be less or equal zero.'); } var source = this; return new AnonymousObservable(function (o) { var lastOnNext = 0; return source.subscribe( function (x) { var now = scheduler.now(); if (lastOnNext === 0 || now - lastOnNext >= duration) { lastOnNext = now; o.onNext(x); } },function (e) { o.onError(e); }, function () { o.onCompleted(); } ); }, source); }; var PausableObservable = (function (__super__) { inherits(PausableObservable, __super__); function subscribe(observer) { var conn = this.source.publish(), subscription = conn.subscribe(observer), connection = disposableEmpty; var pausable = this.pauser.distinctUntilChanged().subscribe(function (b) { if (b) { connection = conn.connect(); } else { connection.dispose(); connection = disposableEmpty; } }); return new CompositeDisposable(subscription, connection, pausable); } function PausableObservable(source, pauser) { this.source = source; this.controller = new Subject(); if (pauser && pauser.subscribe) { this.pauser = this.controller.merge(pauser); } else { this.pauser = this.controller; } __super__.call(this, subscribe, source); } PausableObservable.prototype.pause = function () { this.controller.onNext(false); }; PausableObservable.prototype.resume = function () { this.controller.onNext(true); }; return PausableObservable; }(Observable)); /** * Pauses the underlying observable sequence based upon the observable sequence which yields true/false. * @example * var pauser = new Rx.Subject(); * var source = Rx.Observable.interval(100).pausable(pauser); * @param {Observable} pauser The observable sequence used to pause the underlying sequence. * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.pausable = function (pauser) { return new PausableObservable(this, pauser); }; function combineLatestSource(source, subject, resultSelector) { return new AnonymousObservable(function (o) { var hasValue = [false, false], hasValueAll = false, isDone = false, values = new Array(2), err; function next(x, i) { values[i] = x var res; hasValue[i] = true; if (hasValueAll || (hasValueAll = hasValue.every(identity))) { if (err) { o.onError(err); return; } try { res = resultSelector.apply(null, values); } catch (ex) { o.onError(ex); return; } o.onNext(res); } if (isDone && values[1]) { o.onCompleted(); } } return new CompositeDisposable( source.subscribe( function (x) { next(x, 0); }, function (e) { if (values[1]) { o.onError(e); } else { err = e; } }, function () { isDone = true; values[1] && o.onCompleted(); }), subject.subscribe( function (x) { next(x, 1); }, function (e) { o.onError(e); }, function () { isDone = true; next(true, 1); }) ); }, source); } var PausableBufferedObservable = (function (__super__) { inherits(PausableBufferedObservable, __super__); function subscribe(o) { var q = [], previousShouldFire; var subscription = combineLatestSource( this.source, this.pauser.distinctUntilChanged().startWith(false), function (data, shouldFire) { return { data: data, shouldFire: shouldFire }; }) .subscribe( function (results) { if (previousShouldFire !== undefined && results.shouldFire != previousShouldFire) { previousShouldFire = results.shouldFire; // change in shouldFire if (results.shouldFire) { while (q.length > 0) { o.onNext(q.shift()); } } } else { previousShouldFire = results.shouldFire; // new data if (results.shouldFire) { o.onNext(results.data); } else { q.push(results.data); } } }, function (err) { // Empty buffer before sending error while (q.length > 0) { o.onNext(q.shift()); } o.onError(err); }, function () { // Empty buffer before sending completion while (q.length > 0) { o.onNext(q.shift()); } o.onCompleted(); } ); return subscription; } function PausableBufferedObservable(source, pauser) { this.source = source; this.controller = new Subject(); if (pauser && pauser.subscribe) { this.pauser = this.controller.merge(pauser); } else { this.pauser = this.controller; } __super__.call(this, subscribe, source); } PausableBufferedObservable.prototype.pause = function () { this.controller.onNext(false); }; PausableBufferedObservable.prototype.resume = function () { this.controller.onNext(true); }; return PausableBufferedObservable; }(Observable)); /** * Pauses the underlying observable sequence based upon the observable sequence which yields true/false, * and yields the values that were buffered while paused. * @example * var pauser = new Rx.Subject(); * var source = Rx.Observable.interval(100).pausableBuffered(pauser); * @param {Observable} pauser The observable sequence used to pause the underlying sequence. * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.pausableBuffered = function (subject) { return new PausableBufferedObservable(this, subject); }; var ControlledObservable = (function (__super__) { inherits(ControlledObservable, __super__); function subscribe (observer) { return this.source.subscribe(observer); } function ControlledObservable (source, enableQueue) { __super__.call(this, subscribe, source); this.subject = new ControlledSubject(enableQueue); this.source = source.multicast(this.subject).refCount(); } ControlledObservable.prototype.request = function (numberOfItems) { if (numberOfItems == null) { numberOfItems = -1; } return this.subject.request(numberOfItems); }; return ControlledObservable; }(Observable)); var ControlledSubject = (function (__super__) { function subscribe (observer) { return this.subject.subscribe(observer); } inherits(ControlledSubject, __super__); function ControlledSubject(enableQueue) { enableQueue == null && (enableQueue = true); __super__.call(this, subscribe); this.subject = new Subject(); this.enableQueue = enableQueue; this.queue = enableQueue ? [] : null; this.requestedCount = 0; this.requestedDisposable = disposableEmpty; this.error = null; this.hasFailed = false; this.hasCompleted = false; } addProperties(ControlledSubject.prototype, Observer, { onCompleted: function () { this.hasCompleted = true; if (!this.enableQueue || this.queue.length === 0) this.subject.onCompleted(); else this.queue.push(Rx.Notification.createOnCompleted()); }, onError: function (error) { this.hasFailed = true; this.error = error; if (!this.enableQueue || this.queue.length === 0) this.subject.onError(error); else this.queue.push(Rx.Notification.createOnError(error)); }, onNext: function (value) { var hasRequested = false; if (this.requestedCount === 0) { this.enableQueue && this.queue.push(Rx.Notification.createOnNext(value)); } else { (this.requestedCount !== -1 && this.requestedCount-- === 0) && this.disposeCurrentRequest(); hasRequested = true; } hasRequested && this.subject.onNext(value); }, _processRequest: function (numberOfItems) { if (this.enableQueue) { while ((this.queue.length >= numberOfItems && numberOfItems > 0) || (this.queue.length > 0 && this.queue[0].kind !== 'N')) { var first = this.queue.shift(); first.accept(this.subject); if (first.kind === 'N') numberOfItems--; else { this.disposeCurrentRequest(); this.queue = []; } } return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0}; } //TODO I don't think this is ever necessary, since termination of a sequence without a queue occurs in the onCompletion or onError function //if (this.hasFailed) { // this.subject.onError(this.error); //} else if (this.hasCompleted) { // this.subject.onCompleted(); //} return { numberOfItems: numberOfItems, returnValue: false }; }, request: function (number) { this.disposeCurrentRequest(); var self = this, r = this._processRequest(number); var number = r.numberOfItems; if (!r.returnValue) { this.requestedCount = number; this.requestedDisposable = disposableCreate(function () { self.requestedCount = 0; }); return this.requestedDisposable; } else { return disposableEmpty; } }, disposeCurrentRequest: function () { this.requestedDisposable.dispose(); this.requestedDisposable = disposableEmpty; } }); return ControlledSubject; }(Observable)); /** * Attaches a controller to the observable sequence with the ability to queue. * @example * var source = Rx.Observable.interval(100).controlled(); * source.request(3); // Reads 3 values * @param {Observable} pauser The observable sequence used to pause the underlying sequence. * @returns {Observable} The observable sequence which is paused based upon the pauser. */ observableProto.controlled = function (enableQueue) { if (enableQueue == null) { enableQueue = true; } return new ControlledObservable(this, enableQueue); }; /** * Executes a transducer to transform the observable sequence * @param {Transducer} transducer A transducer to execute * @returns {Observable} An Observable sequence containing the results from the transducer. */ observableProto.transduce = function(transducer) { var source = this; function transformForObserver(observer) { return { init: function() { return observer; }, step: function(obs, input) { return obs.onNext(input); }, result: function(obs) { return obs.onCompleted(); } }; } return new AnonymousObservable(function(observer) { var xform = transducer(transformForObserver(observer)); return source.subscribe( function(v) { try { xform.step(observer, v); } catch (e) { observer.onError(e); } }, observer.onError.bind(observer), function() { xform.result(observer); } ); }, source); }; var AnonymousObservable = Rx.AnonymousObservable = (function (__super__) { inherits(AnonymousObservable, __super__); // Fix subscriber to check for undefined or function returned to decorate as Disposable function fixSubscriber(subscriber) { return subscriber && isFunction(subscriber.dispose) ? subscriber : isFunction(subscriber) ? disposableCreate(subscriber) : disposableEmpty; } function setDisposable(s, state) { var ado = state[0], subscribe = state[1]; var sub = tryCatch(subscribe)(ado); if (sub === errorObj) { if(!ado.fail(errorObj.e)) { return thrower(errorObj.e); } } ado.setDisposable(fixSubscriber(sub)); } function AnonymousObservable(subscribe, parent) { this.source = parent; function s(observer) { var ado = new AutoDetachObserver(observer), state = [ado, subscribe]; if (currentThreadScheduler.scheduleRequired()) { currentThreadScheduler.scheduleWithState(state, setDisposable); } else { setDisposable(null, state); } return ado; } __super__.call(this, s); } return AnonymousObservable; }(Observable)); var AutoDetachObserver = (function (__super__) { inherits(AutoDetachObserver, __super__); function AutoDetachObserver(observer) { __super__.call(this); this.observer = observer; this.m = new SingleAssignmentDisposable(); } var AutoDetachObserverPrototype = AutoDetachObserver.prototype; AutoDetachObserverPrototype.next = function (value) { var result = tryCatch(this.observer.onNext).call(this.observer, value); if (result === errorObj) { this.dispose(); thrower(result.e); } }; AutoDetachObserverPrototype.error = function (err) { var result = tryCatch(this.observer.onError).call(this.observer, err); this.dispose(); result === errorObj && thrower(result.e); }; AutoDetachObserverPrototype.completed = function () { var result = tryCatch(this.observer.onCompleted).call(this.observer); this.dispose(); result === errorObj && thrower(result.e); }; AutoDetachObserverPrototype.setDisposable = function (value) { this.m.setDisposable(value); }; AutoDetachObserverPrototype.getDisposable = function () { return this.m.getDisposable(); }; AutoDetachObserverPrototype.dispose = function () { __super__.prototype.dispose.call(this); this.m.dispose(); }; return AutoDetachObserver; }(AbstractObserver)); var InnerSubscription = function (subject, observer) { this.subject = subject; this.observer = observer; }; InnerSubscription.prototype.dispose = function () { if (!this.subject.isDisposed && this.observer !== null) { var idx = this.subject.observers.indexOf(this.observer); this.subject.observers.splice(idx, 1); this.observer = null; } }; /** * Represents an object that is both an observable sequence as well as an observer. * Each notification is broadcasted to all subscribed observers. */ var Subject = Rx.Subject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); return disposableEmpty; } observer.onCompleted(); return disposableEmpty; } inherits(Subject, __super__); /** * Creates a subject. */ function Subject() { __super__.call(this, subscribe); this.isDisposed = false, this.isStopped = false, this.observers = []; this.hasError = false; } addProperties(Subject.prototype, Observer.prototype, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onCompleted(); } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; this.error = error; this.hasError = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (!this.isStopped) { for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onNext(value); } } }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; } }); /** * Creates a subject from the specified observer and observable. * @param {Observer} observer The observer used to send messages to the subject. * @param {Observable} observable The observable used to subscribe to messages sent from the subject. * @returns {Subject} Subject implemented using the given observer and observable. */ Subject.create = function (observer, observable) { return new AnonymousSubject(observer, observable); }; return Subject; }(Observable)); /** * Represents the result of an asynchronous operation. * The last value before the OnCompleted notification, or the error received through OnError, is sent to all subscribed observers. */ var AsyncSubject = Rx.AsyncSubject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); } else if (this.hasValue) { observer.onNext(this.value); observer.onCompleted(); } else { observer.onCompleted(); } return disposableEmpty; } inherits(AsyncSubject, __super__); /** * Creates a subject that can only receive one value and that value is cached for all future observations. * @constructor */ function AsyncSubject() { __super__.call(this, subscribe); this.isDisposed = false; this.isStopped = false; this.hasValue = false; this.observers = []; this.hasError = false; } addProperties(AsyncSubject.prototype, Observer, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { checkDisposed(this); return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any). */ onCompleted: function () { var i, len; checkDisposed(this); if (!this.isStopped) { this.isStopped = true; var os = cloneArray(this.observers), len = os.length; if (this.hasValue) { for (i = 0; i < len; i++) { var o = os[i]; o.onNext(this.value); o.onCompleted(); } } else { for (i = 0; i < len; i++) { os[i].onCompleted(); } } this.observers.length = 0; } }, /** * Notifies all subscribed observers about the error. * @param {Mixed} error The Error to send to all observers. */ onError: function (error) { checkDisposed(this); if (!this.isStopped) { this.isStopped = true; this.hasError = true; this.error = error; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; } }, /** * Sends a value to the subject. The last value received before successful termination will be sent to all subscribed and future observers. * @param {Mixed} value The value to store in the subject. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } this.value = value; this.hasValue = true; }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; this.exception = null; this.value = null; } }); return AsyncSubject; }(Observable)); var AnonymousSubject = Rx.AnonymousSubject = (function (__super__) { inherits(AnonymousSubject, __super__); function subscribe(observer) { return this.observable.subscribe(observer); } function AnonymousSubject(observer, observable) { this.observer = observer; this.observable = observable; __super__.call(this, subscribe); } addProperties(AnonymousSubject.prototype, Observer.prototype, { onCompleted: function () { this.observer.onCompleted(); }, onError: function (error) { this.observer.onError(error); }, onNext: function (value) { this.observer.onNext(value); } }); return AnonymousSubject; }(Observable)); /** * Represents a value that changes over time. * Observers can subscribe to the subject to receive the last (or initial) value and all subsequent notifications. */ var BehaviorSubject = Rx.BehaviorSubject = (function (__super__) { function subscribe(observer) { checkDisposed(this); if (!this.isStopped) { this.observers.push(observer); observer.onNext(this.value); return new InnerSubscription(this, observer); } if (this.hasError) { observer.onError(this.error); } else { observer.onCompleted(); } return disposableEmpty; } inherits(BehaviorSubject, __super__); /** * Initializes a new instance of the BehaviorSubject class which creates a subject that caches its last value and starts with the specified value. * @param {Mixed} value Initial value sent to observers when no other value has been received by the subject yet. */ function BehaviorSubject(value) { __super__.call(this, subscribe); this.value = value, this.observers = [], this.isDisposed = false, this.isStopped = false, this.hasError = false; } addProperties(BehaviorSubject.prototype, Observer, { /** * Gets the current value or throws an exception. * Value is frozen after onCompleted is called. * After onError is called always throws the specified exception. * An exception is always thrown after dispose is called. * @returns {Mixed} The initial value passed to the constructor until onNext is called; after which, the last value passed to onNext. */ getValue: function () { checkDisposed(this); if (this.hasError) { throw this.error; } return this.value; }, /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onCompleted(); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; this.hasError = true; this.error = error; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onError(error); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } this.value = value; for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { os[i].onNext(value); } }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; this.value = null; this.exception = null; } }); return BehaviorSubject; }(Observable)); /** * Represents an object that is both an observable sequence as well as an observer. * Each notification is broadcasted to all subscribed and future observers, subject to buffer trimming policies. */ var ReplaySubject = Rx.ReplaySubject = (function (__super__) { var maxSafeInteger = Math.pow(2, 53) - 1; function createRemovableDisposable(subject, observer) { return disposableCreate(function () { observer.dispose(); !subject.isDisposed && subject.observers.splice(subject.observers.indexOf(observer), 1); }); } function subscribe(observer) { var so = new ScheduledObserver(this.scheduler, observer), subscription = createRemovableDisposable(this, so); checkDisposed(this); this._trim(this.scheduler.now()); this.observers.push(so); for (var i = 0, len = this.q.length; i < len; i++) { so.onNext(this.q[i].value); } if (this.hasError) { so.onError(this.error); } else if (this.isStopped) { so.onCompleted(); } so.ensureActive(); return subscription; } inherits(ReplaySubject, __super__); /** * Initializes a new instance of the ReplaySubject class with the specified buffer size, window size and scheduler. * @param {Number} [bufferSize] Maximum element count of the replay buffer. * @param {Number} [windowSize] Maximum time length of the replay buffer. * @param {Scheduler} [scheduler] Scheduler the observers are invoked on. */ function ReplaySubject(bufferSize, windowSize, scheduler) { this.bufferSize = bufferSize == null ? maxSafeInteger : bufferSize; this.windowSize = windowSize == null ? maxSafeInteger : windowSize; this.scheduler = scheduler || currentThreadScheduler; this.q = []; this.observers = []; this.isStopped = false; this.isDisposed = false; this.hasError = false; this.error = null; __super__.call(this, subscribe); } addProperties(ReplaySubject.prototype, Observer.prototype, { /** * Indicates whether the subject has observers subscribed to it. * @returns {Boolean} Indicates whether the subject has observers subscribed to it. */ hasObservers: function () { return this.observers.length > 0; }, _trim: function (now) { while (this.q.length > this.bufferSize) { this.q.shift(); } while (this.q.length > 0 && (now - this.q[0].interval) > this.windowSize) { this.q.shift(); } }, /** * Notifies all subscribed observers about the arrival of the specified element in the sequence. * @param {Mixed} value The value to send to all observers. */ onNext: function (value) { checkDisposed(this); if (this.isStopped) { return; } var now = this.scheduler.now(); this.q.push({ interval: now, value: value }); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onNext(value); observer.ensureActive(); } }, /** * Notifies all subscribed observers about the exception. * @param {Mixed} error The exception to send to all observers. */ onError: function (error) { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; this.error = error; this.hasError = true; var now = this.scheduler.now(); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onError(error); observer.ensureActive(); } this.observers.length = 0; }, /** * Notifies all subscribed observers about the end of the sequence. */ onCompleted: function () { checkDisposed(this); if (this.isStopped) { return; } this.isStopped = true; var now = this.scheduler.now(); this._trim(now); for (var i = 0, os = cloneArray(this.observers), len = os.length; i < len; i++) { var observer = os[i]; observer.onCompleted(); observer.ensureActive(); } this.observers.length = 0; }, /** * Unsubscribe all observers and release resources. */ dispose: function () { this.isDisposed = true; this.observers = null; } }); return ReplaySubject; }(Observable)); /** * Used to pause and resume streams. */ Rx.Pauser = (function (__super__) { inherits(Pauser, __super__); function Pauser() { __super__.call(this); } /** * Pauses the underlying sequence. */ Pauser.prototype.pause = function () { this.onNext(false); }; /** * Resumes the underlying sequence. */ Pauser.prototype.resume = function () { this.onNext(true); }; return Pauser; }(Subject)); if (typeof define == 'function' && typeof define.amd == 'object' && define.amd) { root.Rx = Rx; define(function() { return Rx; }); } else if (freeExports && freeModule) { // in Node.js or RingoJS if (moduleExports) { (freeModule.exports = Rx).Rx = Rx; } else { freeExports.Rx = Rx; } } else { // in a browser or Rhino root.Rx = Rx; } // All code before this point will be filtered from stack traces. var rEndingLine = captureLine(); }.call(this));
him2him2/cdnjs
ajax/libs/rxjs/2.4.6/rx.lite.js
JavaScript
mit
213,420
// Type definitions for adm-zip v0.4.4 // Project: https://github.com/cthackers/adm-zip // Definitions by: John Vilk <https://github.com/jvilk> // Definitions: https://github.com/borisyankov/DefinitelyTyped /// <reference path="../node/node.d.ts" /> declare module AdmZip { class ZipFile { /** * Create a new, empty archive. */ constructor(); /** * Read an existing archive. */ constructor(fileName: string); /** * Extracts the given entry from the archive and returns the content as a * Buffer object. * @param entry String with the full path of the entry * @return Buffer or Null in case of error */ readFile(entry: string): Buffer; /** * Extracts the given entry from the archive and returns the content as a * Buffer object. * @param entry ZipEntry object * @return Buffer or Null in case of error */ readFile(entry: IZipEntry): Buffer; /** * Asynchronous readFile * @param entry String with the full path of the entry * @param callback Called with a Buffer or Null in case of error */ readFileAsync(entry: string, callback: (data: Buffer, err: string) => any): void; /** * Asynchronous readFile * @param entry ZipEntry object * @param callback Called with a Buffer or Null in case of error * @return Buffer or Null in case of error */ readFileAsync(entry: IZipEntry, callback: (data: Buffer, err: string) => any): void; /** * Extracts the given entry from the archive and returns the content as * plain text in the given encoding * @param entry String with the full path of the entry * @param encoding Optional. If no encoding is specified utf8 is used * @return String */ readAsText(fileName: string, encoding?: string): string; /** * Extracts the given entry from the archive and returns the content as * plain text in the given encoding * @param entry ZipEntry object * @param encoding Optional. If no encoding is specified utf8 is used * @return String */ readAsText(fileName: IZipEntry, encoding?: string): string; /** * Asynchronous readAsText * @param entry String with the full path of the entry * @param callback Called with the resulting string. * @param encoding Optional. If no encoding is specified utf8 is used */ readAsTextAsync(fileName: string, callback: (data: string) => any, encoding?: string): void; /** * Asynchronous readAsText * @param entry ZipEntry object * @param callback Called with the resulting string. * @param encoding Optional. If no encoding is specified utf8 is used */ readAsTextAsync(fileName: IZipEntry, callback: (data: string) => any, encoding?: string): void; /** * Remove the entry from the file or the entry and all its nested directories * and files if the given entry is a directory * @param entry String with the full path of the entry */ deleteFile(entry: string): void; /** * Remove the entry from the file or the entry and all its nested directories * and files if the given entry is a directory * @param entry A ZipEntry object. */ deleteFile(entry: IZipEntry): void; /** * Adds a comment to the zip. The zip must be rewritten after * adding the comment. * @param comment Content of the comment. */ addZipComment(comment: string): void; /** * Returns the zip comment * @return The zip comment. */ getZipComment(): string; /** * Adds a comment to a specified zipEntry. The zip must be rewritten after * adding the comment. * The comment cannot exceed 65535 characters in length. * @param entry String with the full path of the entry * @param comment The comment to add to the entry. */ addZipEntryComment(entry: string, comment: string): void; /** * Adds a comment to a specified zipEntry. The zip must be rewritten after * adding the comment. * The comment cannot exceed 65535 characters in length. * @param entry ZipEntry object. * @param comment The comment to add to the entry. */ addZipEntryComment(entry: IZipEntry, comment: string): void; /** * Returns the comment of the specified entry. * @param entry String with the full path of the entry. * @return String The comment of the specified entry. */ getZipEntryComment(entry: string): string; /** * Returns the comment of the specified entry * @param entry ZipEntry object. * @return String The comment of the specified entry. */ getZipEntryComment(entry: IZipEntry): string; /** * Updates the content of an existing entry inside the archive. The zip * must be rewritten after updating the content * @param entry String with the full path of the entry. * @param content The entry's new contents. */ updateFile(entry: string, content: Buffer): void; /** * Updates the content of an existing entry inside the archive. The zip * must be rewritten after updating the content * @param entry ZipEntry object. * @param content The entry's new contents. */ updateFile(entry: IZipEntry, content: Buffer): void; /** * Adds a file from the disk to the archive. * @param localPath Path to a file on disk. * @param zipPath Path to a directory in the archive. Defaults to the empty * string. */ addLocalFile(localPath: string, zipPath?: string): void; /** * Adds a local directory and all its nested files and directories to the * archive. * @param localPath Path to a folder on disk. * @param zipPath Path to a folder in the archive. Defaults to an empty * string. */ addLocalFolder(localPath: string, zipPath?: string): void; /** * Allows you to create a entry (file or directory) in the zip file. * If you want to create a directory the entryName must end in / and a null * buffer should be provided. * @param entryName Entry path * @param content Content to add to the entry; must be a 0-length buffer * for a directory. * @param comment Comment to add to the entry. * @param attr Attribute to add to the entry. */ addFile(entryName: string, data: Buffer, comment?: string, attr?: number): void; /** * Returns an array of ZipEntry objects representing the files and folders * inside the archive */ getEntries(): IZipEntry[]; /** * Returns a ZipEntry object representing the file or folder specified by * ``name``. * @param name Name of the file or folder to retrieve. * @return ZipEntry The entry corresponding to the name. */ getEntry(name: string): IZipEntry; /** * Extracts the given entry to the given targetPath. * If the entry is a directory inside the archive, the entire directory and * its subdirectories will be extracted. * @param entry String with the full path of the entry * @param targetPath Target folder where to write the file * @param maintainEntryPath If maintainEntryPath is true and the entry is * inside a folder, the entry folder will be created in targetPath as * well. Default is TRUE * @param overwrite If the file already exists at the target path, the file * will be overwriten if this is true. Default is FALSE * * @return Boolean */ extractEntryTo(entryPath: string, targetPath: string, maintainEntryPath?: boolean, overwrite?: boolean): boolean; /** * Extracts the given entry to the given targetPath. * If the entry is a directory inside the archive, the entire directory and * its subdirectories will be extracted. * @param entry ZipEntry object * @param targetPath Target folder where to write the file * @param maintainEntryPath If maintainEntryPath is true and the entry is * inside a folder, the entry folder will be created in targetPath as * well. Default is TRUE * @param overwrite If the file already exists at the target path, the file * will be overwriten if this is true. Default is FALSE * @return Boolean */ extractEntryTo(entryPath: IZipEntry, targetPath: string, maintainEntryPath?: boolean, overwrite?: boolean): boolean; /** * Extracts the entire archive to the given location * @param targetPath Target location * @param overwrite If the file already exists at the target path, the file * will be overwriten if this is true. Default is FALSE */ extractAllTo(targetPath: string, overwrite?: boolean): void; /** * Writes the newly created zip file to disk at the specified location or * if a zip was opened and no ``targetFileName`` is provided, it will * overwrite the opened zip * @param targetFileName */ writeZip(targetPath?: string): void; /** * Returns the content of the entire zip file as a Buffer object * @return Buffer */ toBuffer(): Buffer; } /** * The ZipEntry is more than a structure representing the entry inside the * zip file. Beside the normal attributes and headers a entry can have, the * class contains a reference to the part of the file where the compressed * data resides and decompresses it when requested. It also compresses the * data and creates the headers required to write in the zip file. */ interface IZipEntry { /** * Represents the full name and path of the file */ entryName: string; rawEntryName: Buffer; /** * Extra data associated with this entry. */ extra: Buffer; /** * Entry comment. */ comment: string; name: string; /** * Read-Only property that indicates the type of the entry. */ isDirectory: boolean; /** * Get the header associated with this ZipEntry. */ header: Buffer; /** * Retrieve the compressed data for this entry. Note that this may trigger * compression if any properties were modified. */ getCompressedData(): Buffer; /** * Asynchronously retrieve the compressed data for this entry. Note that * this may trigger compression if any properties were modified. */ getCompressedDataAsync(callback: (data: Buffer) => void): void; /** * Set the (uncompressed) data to be associated with this entry. */ setData(value: string): void; /** * Set the (uncompressed) data to be associated with this entry. */ setData(value: Buffer): void; /** * Get the decompressed data associated with this entry. */ getData(): Buffer; /** * Asynchronously get the decompressed data associated with this entry. */ getDataAsync(callback: (data: Buffer) => void): void; /** * Returns the CEN Entry Header to be written to the output zip file, plus * the extra data and the entry comment. */ packHeader(): Buffer; /** * Returns a nicely formatted string with the most important properties of * the ZipEntry. */ toString(): string; } } declare module "adm-zip" { import zipFile = AdmZip.ZipFile; export = zipFile; }
mendix/DefinitelyTyped
adm-zip/adm-zip.d.ts
TypeScript
mit
12,459
<?php // TCPDF FONT FILE DESCRIPTION $type='TrueTypeUnicode'; $name='DejaVuSansMono-Oblique'; $up=-63; $ut=44; $dw=602; $diff=''; $originalsize=245948; $enc=''; $file='dejavusansmonoi.z'; $ctg='dejavusansmonoi.ctg.z'; $desc=array('Flags'=>97,'FontBBox'=>'[-403 -375 746 1028]','ItalicAngle'=>-11,'Ascent'=>928,'Descent'=>-236,'Leading'=>0,'CapHeight'=>729,'XHeight'=>547,'StemV'=>34,'StemH'=>15,'AvgWidth'=>602,'MaxWidth'=>602,'MissingWidth'=>602); $cbbox=array(0=>array(51,-177,551,705),33=>array(181,0,422,729),34=>array(165,458,437,729),35=>array(-3,0,602,718),36=>array(15,-147,529,760),37=>array(16,0,586,699),38=>array(-10,-14,581,742),39=>array(258,458,343,729),40=>array(182,-132,509,759),41=>array(73,-132,400,759),42=>array(81,286,521,742),43=>array(43,55,559,572),44=>array(99,-140,326,148),45=>array(148,234,419,314),46=>array(173,0,325,148),47=>array(8,-93,517,729),48=>array(48,-14,554,742),49=>array(60,0,478,729),50=>array(3,0,550,742),51=>array(-9,-14,538,742),52=>array(12,0,531,729),53=>array(2,-14,541,729),54=>array(45,-14,551,742),55=>array(85,0,592,729),56=>array(20,-14,550,742),57=>array(31,-14,537,742),58=>array(168,0,392,518),59=>array(99,-140,392,519),60=>array(43,69,559,558),61=>array(43,172,559,454),62=>array(43,69,559,558),63=>array(159,0,547,742),64=>array(-14,-155,593,682),65=>array(-52,0,513,729),66=>array(11,0,570,729),67=>array(56,-14,592,742),68=>array(-4,0,552,729),69=>array(26,0,600,729),70=>array(45,0,616,729),71=>array(38,-14,574,742),72=>array(-4,0,606,729),73=>array(28,0,574,729),74=>array(-12,-14,538,729),75=>array(-4,0,661,729),76=>array(38,0,505,729),77=>array(-29,0,631,729),78=>array(-3,0,605,729),79=>array(40,-14,562,742),80=>array(25,0,588,729),81=>array(40,-132,562,742),82=>array(6,0,562,729),83=>array(12,-14,560,742),84=>array(78,0,651,729),85=>array(39,-14,601,729),86=>array(97,0,646,729),87=>array(40,0,672,729),88=>array(-62,0,653,729),89=>array(95,0,658,729),90=>array(-3,0,622,729),91=>array(129,-132,510,760),92=>array(174,-93,354,729),93=>array(72,-132,453,760),94=>array(35,457,567,729),95=>array(0,-236,602,-197),96=>array(221,616,414,800),97=>array(35,-14,531,560),98=>array(29,-14,541,760),99=>array(76,-14,555,560),100=>array(58,-14,612,760),101=>array(48,-14,550,561),102=>array(129,0,608,760),103=>array(29,-215,559,560),104=>array(41,0,535,760),105=>array(30,0,490,760),106=>array(2,-208,482,760),107=>array(44,0,588,760),108=>array(152,0,477,765),109=>array(-7,0,575,560),110=>array(41,0,535,560),111=>array(57,-14,544,560),112=>array(-1,-208,551,560),113=>array(48,-208,560,560),114=>array(106,0,595,560),115=>array(56,-14,526,560),116=>array(95,0,549,702),117=>array(61,-13,553,547),118=>array(89,0,593,547),119=>array(45,0,642,547),120=>array(-34,0,590,547),121=>array(-19,-208,598,547),122=>array(38,0,553,547),123=>array(90,-163,574,760),124=>array(259,-236,343,764),125=>array(-7,-163,477,760),126=>array(43,240,559,381),161=>array(190,0,431,729),162=>array(60,-153,531,699),163=>array(-4,0,600,742),164=>array(100,95,537,532),165=>array(23,0,621,729),166=>array(259,-171,343,699),167=>array(49,-98,522,738),168=>array(213,659,522,758),169=>array(0,61,602,663),170=>array(109,229,506,742),171=>array(36,69,540,517),172=>array(43,181,559,421),173=>array(148,234,419,314),174=>array(0,61,602,663),175=>array(215,673,521,745),176=>array(146,432,456,742),177=>array(43,0,559,572),178=>array(150,326,484,742),179=>array(140,319,480,742),180=>array(281,616,550,800),181=>array(-19,-208,566,547),182=>array(61,-96,557,729),183=>array(222,273,374,422),184=>array(89,-193,306,0),185=>array(170,326,450,734),186=>array(109,229,520,742),187=>array(40,69,544,517),188=>array(23,-132,553,810),189=>array(23,-132,559,810),190=>array(23,-132,553,818),191=>array(70,-13,458,729),192=>array(-52,0,513,927),193=>array(-52,0,534,927),194=>array(-52,0,525,928),195=>array(-52,0,565,921),196=>array(-52,0,537,913),197=>array(-52,0,513,928),198=>array(-71,0,638,729),199=>array(56,-193,592,742),200=>array(26,0,600,927),201=>array(26,0,600,927),202=>array(26,0,600,928),203=>array(26,0,600,913),204=>array(28,0,574,927),205=>array(28,0,574,927),206=>array(28,0,574,928),207=>array(28,0,574,913),208=>array(-4,0,552,729),209=>array(-3,0,605,921),210=>array(40,-14,562,927),211=>array(40,-14,562,927),212=>array(40,-14,562,928),213=>array(40,-14,562,921),214=>array(40,-14,562,913),215=>array(73,85,529,541),216=>array(7,-34,586,761),217=>array(39,-14,601,927),218=>array(39,-14,601,927),219=>array(39,-14,601,928),220=>array(39,-14,601,913),221=>array(95,0,658,927),222=>array(25,0,566,729),223=>array(27,-14,550,760),224=>array(35,-14,531,800),225=>array(35,-14,552,800),226=>array(35,-14,531,800),227=>array(35,-14,544,777),228=>array(35,-14,531,758),229=>array(35,-14,531,913),230=>array(-23,-14,593,560),231=>array(76,-193,555,560),232=>array(48,-14,550,800),233=>array(48,-14,550,800),234=>array(48,-14,550,800),235=>array(48,-14,550,758),236=>array(30,0,490,800),237=>array(30,0,536,800),238=>array(30,0,490,800),239=>array(30,0,508,758),240=>array(58,-14,552,760),241=>array(41,0,542,777),242=>array(57,-14,544,800),243=>array(57,-14,550,800),244=>array(57,-14,544,800),245=>array(57,-14,544,777),246=>array(57,-14,544,758),247=>array(43,73,559,554),248=>array(23,-47,573,592),249=>array(61,-13,553,800),250=>array(61,-13,553,800),251=>array(61,-13,553,800),252=>array(61,-13,553,758),253=>array(-19,-208,598,800),254=>array(-1,-208,551,765),255=>array(-19,-208,598,758),256=>array(-52,0,551,898),257=>array(35,-14,531,745),258=>array(-52,0,564,928),259=>array(35,-14,536,785),260=>array(-52,-193,522,729),261=>array(35,-193,531,560),262=>array(56,-14,594,927),263=>array(76,-14,594,800),264=>array(56,-14,605,928),265=>array(76,-14,555,800),266=>array(56,-14,592,914),267=>array(76,-14,555,758),268=>array(56,-14,611,928),269=>array(76,-14,582,800),270=>array(-4,0,552,928),271=>array(58,-14,738,760),272=>array(-4,0,552,729),273=>array(58,-14,691,760),274=>array(26,0,600,898),275=>array(48,-14,550,745),276=>array(26,0,600,928),277=>array(48,-14,550,785),278=>array(26,0,600,914),279=>array(48,-14,550,758),280=>array(26,-193,600,729),281=>array(48,-193,550,561),282=>array(26,0,600,928),283=>array(48,-14,565,800),284=>array(38,-14,574,928),285=>array(29,-215,559,800),286=>array(38,-14,589,928),287=>array(29,-215,559,785),288=>array(38,-14,574,914),289=>array(29,-215,559,758),290=>array(38,-280,574,742),291=>array(29,-215,559,788),292=>array(-4,0,606,928),293=>array(41,0,535,928),294=>array(-4,0,650,729),295=>array(21,0,514,760),296=>array(28,0,574,921),297=>array(30,0,528,777),298=>array(28,0,574,898),299=>array(30,0,521,745),300=>array(28,0,574,928),301=>array(30,0,536,785),302=>array(45,-193,592,729),303=>array(32,-193,493,760),304=>array(28,0,574,914),305=>array(30,0,490,547),306=>array(1,-14,705,729),307=>array(2,-209,737,760),308=>array(-12,-14,566,928),309=>array(2,-208,488,800),310=>array(-4,-266,661,729),311=>array(44,-266,588,760),312=>array(62,0,606,547),313=>array(38,0,536,928),314=>array(152,0,536,928),315=>array(38,-266,505,729),316=>array(152,-266,477,765),317=>array(38,0,540,729),318=>array(152,0,604,766),319=>array(38,0,548,729),320=>array(152,0,653,765),321=>array(-14,0,507,728),322=>array(43,0,544,765),323=>array(-3,0,605,931),324=>array(41,0,546,803),325=>array(-3,-266,605,729),326=>array(41,-266,535,560),327=>array(-3,0,605,928),328=>array(41,0,562,800),329=>array(-17,0,595,760),330=>array(20,-208,573,743),331=>array(61,-208,554,560),332=>array(40,-14,562,898),333=>array(57,-14,544,745),334=>array(40,-14,564,928),335=>array(57,-14,544,785),336=>array(40,-14,621,927),337=>array(57,-14,598,800),338=>array(17,0,660,729),339=>array(-3,-14,621,560),340=>array(6,0,562,928),341=>array(106,0,651,803),342=>array(6,-266,562,729),343=>array(25,-266,595,560),344=>array(6,0,562,928),345=>array(106,0,595,800),346=>array(12,-14,560,931),347=>array(56,-14,546,803),348=>array(12,-14,560,928),349=>array(56,-14,536,813),350=>array(12,-193,560,742),351=>array(56,-193,526,560),352=>array(12,-14,560,928),353=>array(56,-14,538,800),354=>array(78,-193,651,729),355=>array(95,-193,549,702),356=>array(78,0,651,928),357=>array(95,0,626,820),358=>array(78,0,650,729),359=>array(87,0,542,702),360=>array(39,-14,601,921),361=>array(61,-13,553,777),362=>array(39,-14,601,898),363=>array(61,-13,553,745),364=>array(39,-14,601,928),365=>array(61,-13,553,785),366=>array(39,-14,601,1028),367=>array(61,-13,553,847),368=>array(39,-14,621,927),369=>array(61,-13,598,800),370=>array(39,-201,601,729),371=>array(61,-194,553,547),372=>array(40,0,672,932),373=>array(45,0,642,803),374=>array(95,0,658,932),375=>array(-19,-208,598,803),376=>array(95,0,658,913),377=>array(-3,0,622,931),378=>array(38,0,553,803),379=>array(-3,0,622,914),380=>array(38,0,553,758),381=>array(-3,0,622,928),382=>array(38,0,553,800),383=>array(129,0,608,760),384=>array(29,-14,541,760),385=>array(41,0,598,729),386=>array(10,0,593,729),387=>array(21,-14,537,760),388=>array(33,0,547,729),389=>array(51,-14,554,760),390=>array(2,-14,524,742),391=>array(23,-14,652,800),392=>array(33,-14,625,694),393=>array(-4,0,552,729),394=>array(35,0,598,729),395=>array(49,0,626,729),396=>array(32,0,609,729),397=>array(58,-14,601,760),398=>array(25,0,609,729),399=>array(57,-14,545,742),400=>array(35,-14,573,742),401=>array(-61,-208,663,729),402=>array(35,-208,613,760),403=>array(19,-14,656,800),404=>array(35,-210,673,661),405=>array(-42,0,579,760),406=>array(153,0,574,729),407=>array(27,0,574,729),408=>array(-17,0,640,729),409=>array(41,0,586,760),410=>array(93,0,446,765),411=>array(-22,0,549,729),412=>array(18,-13,626,729),413=>array(-77,-208,604,729),414=>array(61,-210,545,560),415=>array(57,-14,545,742),416=>array(-20,-14,634,760),417=>array(5,-14,595,560),418=>array(21,-14,651,742),419=>array(61,-210,650,560),420=>array(59,0,609,729),421=>array(4,-208,546,699),422=>array(11,-129,544,729),423=>array(36,-14,568,742),424=>array(82,-14,525,560),425=>array(-13,0,625,729),426=>array(131,-208,530,760),427=>array(108,-208,563,702),428=>array(54,0,650,729),429=>array(83,0,552,760),430=>array(78,-208,651,729),431=>array(-29,-14,652,760),432=>array(-15,-13,592,555),433=>array(38,0,635,713),434=>array(43,0,520,729),435=>array(79,0,658,730),436=>array(-13,-208,669,547),437=>array(5,0,631,729),438=>array(43,0,559,548),439=>array(-16,-14,602,729),440=>array(-16,-14,619,729),441=>array(1,-213,679,547),442=>array(-9,-208,533,547),443=>array(2,0,544,742),444=>array(-16,-14,628,729),445=>array(-6,-213,567,547),446=>array(32,-14,482,702),447=>array(-15,-208,593,560),448=>array(181,0,421,729),449=>array(82,0,520,729),450=>array(58,0,555,729),451=>array(181,0,422,729),461=>array(-52,0,554,928),462=>array(35,-14,553,800),463=>array(28,0,574,928),464=>array(30,0,538,800),465=>array(40,-14,571,928),466=>array(57,-14,563,800),467=>array(39,-14,601,928),468=>array(61,-13,553,800),469=>array(39,-14,601,953),470=>array(61,-13,553,899),471=>array(39,-14,601,997),472=>array(61,-13,585,954),473=>array(39,-14,601,998),474=>array(61,-13,579,954),475=>array(39,-14,601,997),476=>array(61,-13,553,954),477=>array(55,-14,542,560),479=>array(35,-14,559,899),480=>array(-52,0,556,953),481=>array(35,-14,559,899),482=>array(-71,0,638,898),483=>array(-23,-14,593,745),486=>array(38,-14,574,928),487=>array(29,-215,559,800),488=>array(-4,0,661,928),489=>array(44,0,588,928),490=>array(40,-201,562,742),491=>array(57,-201,544,560),492=>array(40,-201,562,898),493=>array(57,-201,544,745),494=>array(-16,-14,602,928),495=>array(-6,-213,572,800),500=>array(38,-14,574,927),501=>array(29,-215,559,800),502=>array(-40,-14,586,729),504=>array(-3,0,605,927),505=>array(41,0,535,800),508=>array(-71,0,654,927),509=>array(-23,-14,593,800),510=>array(7,-34,586,927),511=>array(23,-47,573,800),512=>array(-52,0,519,927),513=>array(35,-14,531,800),514=>array(-52,0,542,928),515=>array(35,-14,531,785),516=>array(26,0,600,927),517=>array(48,-14,550,800),518=>array(26,0,600,928),519=>array(48,-14,550,785),520=>array(28,0,574,927),521=>array(30,0,495,800),522=>array(28,0,574,928),523=>array(30,0,511,785),524=>array(40,-14,562,927),525=>array(57,-14,544,800),526=>array(40,-14,562,928),527=>array(57,-14,544,785),528=>array(6,0,562,927),529=>array(106,0,595,800),530=>array(6,0,562,928),531=>array(106,0,595,785),532=>array(39,-14,601,927),533=>array(61,-13,553,800),534=>array(39,-14,601,928),535=>array(61,-13,553,785),536=>array(12,-265,560,742),537=>array(56,-265,526,560),538=>array(78,-265,651,729),539=>array(95,-265,549,702),540=>array(17,-210,646,742),541=>array(40,-211,591,560),542=>array(-4,0,606,928),543=>array(41,0,535,928),545=>array(-5,-72,538,760),548=>array(25,-208,651,729),549=>array(66,-208,582,548),550=>array(-52,0,513,914),551=>array(35,-14,531,758),552=>array(26,-193,600,729),553=>array(48,-193,550,561),554=>array(40,-14,562,953),555=>array(57,-14,544,899),556=>array(40,-14,562,953),557=>array(57,-14,544,899),558=>array(40,-14,562,914),559=>array(57,-14,544,758),560=>array(40,-14,562,953),561=>array(57,-14,544,899),562=>array(95,0,658,898),563=>array(-19,-208,598,745),564=>array(146,-72,465,765),565=>array(4,-72,531,560),566=>array(95,-72,549,702),567=>array(2,-208,441,547),568=>array(32,-14,531,760),569=>array(71,-214,570,560),570=>array(-67,-34,656,761),571=>array(-67,-34,656,761),572=>array(-32,-47,628,592),573=>array(-6,0,537,729),574=>array(-55,-34,668,761),575=>array(77,-242,547,560),576=>array(69,-242,585,548),577=>array(59,0,604,729),579=>array(-32,0,570,729),580=>array(-4,-14,601,729),581=>array(-44,0,505,729),588=>array(-0,0,562,729),589=>array(58,0,595,560),592=>array(54,-14,549,560),593=>array(77,-14,579,560),594=>array(23,-14,525,560),595=>array(4,-14,507,760),596=>array(42,-14,513,560),597=>array(90,-72,572,558),598=>array(67,-208,556,760),599=>array(40,-14,601,760),600=>array(33,-14,542,560),601=>array(55,-14,542,560),602=>array(-3,-14,595,560),603=>array(60,-11,551,560),604=>array(32,-11,532,560),605=>array(-23,-11,582,560),606=>array(86,-21,542,559),607=>array(-5,-208,559,547),608=>array(36,-215,620,760),609=>array(69,-215,600,545),610=>array(59,0,574,574),611=>array(52,-210,626,547),612=>array(103,0,605,547),613=>array(100,-210,583,546),614=>array(18,0,502,760),615=>array(38,-208,522,760),616=>array(4,0,503,760),617=>array(136,0,466,547),618=>array(24,0,578,547),619=>array(15,0,559,765),620=>array(79,0,466,765),621=>array(168,-208,435,765),622=>array(101,-213,601,765),623=>array(33,0,606,560),624=>array(53,-210,626,560),625=>array(16,-208,589,560),626=>array(12,-208,568,560),627=>array(32,-208,484,560),628=>array(16,0,586,560),629=>array(67,-14,535,560),630=>array(34,0,616,547),631=>array(72,-15,523,560),632=>array(48,-208,561,759),633=>array(87,-13,516,547),634=>array(67,-13,536,755),635=>array(50,-208,479,547),636=>array(66,-208,535,560),637=>array(104,-208,535,560),638=>array(23,0,579,560),639=>array(23,0,483,560),640=>array(6,0,490,547),641=>array(6,0,596,547),642=>array(56,-208,550,560),643=>array(20,-208,582,760),644=>array(-33,-208,635,760),645=>array(173,-208,429,549),646=>array(-16,-208,639,760),647=>array(81,-155,535,547),648=>array(156,-208,610,702),649=>array(-25,-14,625,547),650=>array(47,-15,610,547),651=>array(71,0,555,547),652=>array(-19,0,514,547),653=>array(-46,0,542,547),654=>array(-39,0,591,755),655=>array(104,0,607,561),656=>array(62,-208,509,547),657=>array(33,-54,579,547),658=>array(-6,-213,572,547),659=>array(17,-213,552,547),660=>array(144,0,537,759),661=>array(124,0,575,759),662=>array(27,0,478,759),663=>array(44,-214,595,759),664=>array(46,22,556,532),665=>array(47,0,504,561),666=>array(60,-21,517,559),667=>array(8,0,627,759),668=>array(16,0,586,560),669=>array(25,-208,509,760),670=>array(38,-213,618,547),671=>array(65,0,444,560),672=>array(17,-208,654,759),673=>array(59,0,537,759),674=>array(124,0,575,759),675=>array(-7,-14,609,760),676=>array(10,-213,615,760),677=>array(8,-54,612,760),678=>array(79,-14,546,702),679=>array(105,-208,620,760),680=>array(98,-70,550,702),681=>array(64,-208,550,760),682=>array(40,-14,499,760),683=>array(33,0,527,760),684=>array(65,-15,596,641),685=>array(16,84,586,640),686=>array(160,-214,568,760),687=>array(147,-208,491,760),688=>array(115,318,440,744),689=>array(115,317,440,743),690=>array(185,202,417,744),691=>array(169,318,432,632),692=>array(170,311,433,625),693=>array(146,202,408,625),694=>array(119,318,483,625),695=>array(100,318,562,625),696=>array(123,202,510,625),697=>array(216,557,389,800),699=>array(226,472,453,760),700=>array(198,472,425,760),701=>array(242,595,384,844),702=>array(300,492,460,760),703=>array(292,492,452,760),704=>array(199,437,448,862),705=>array(187,437,469,862),710=>array(194,616,502,800),711=>array(230,616,538,800),712=>array(241,488,361,759),713=>array(215,673,521,745),716=>array(241,-148,361,123),717=>array(51,-174,357,-102),718=>array(269,-285,462,-102),719=>array(233,-285,502,-102),720=>array(164,0,438,517),721=>array(229,355,404,517),722=>array(252,249,413,517),723=>array(245,249,405,517),726=>array(148,125,455,417),727=>array(184,234,418,307),728=>array(229,645,536,785),729=>array(308,658,428,758),730=>array(246,645,514,913),731=>array(113,-193,293,0),732=>array(196,638,542,777),733=>array(215,616,598,800),734=>array(-176,233,420,504),736=>array(148,208,500,632),737=>array(201,326,402,755),738=>array(142,326,442,648),739=>array(104,326,491,632),740=>array(188,326,469,751),741=>array(199,0,521,668),742=>array(169,0,521,668),743=>array(140,0,521,668),744=>array(111,0,521,668),745=>array(82,0,521,668),750=>array(108,472,559,760),755=>array(94,-245,313,-31),768=>array(221,616,414,800),769=>array(281,616,550,800),770=>array(194,616,502,800),771=>array(196,638,542,777),772=>array(215,673,521,745),773=>array(0,716,602,755),774=>array(229,645,536,785),775=>array(308,658,428,758),776=>array(213,659,522,758),777=>array(207,618,408,847),778=>array(246,645,514,913),779=>array(215,616,598,800),780=>array(230,616,538,800),781=>array(245,616,354,833),782=>array(146,616,454,833),783=>array(188,616,495,800),784=>array(229,645,536,857),785=>array(203,645,511,785),786=>array(229,472,424,641),787=>array(218,595,384,844),788=>array(242,595,384,844),789=>array(281,616,458,800),790=>array(269,-285,462,-102),791=>array(233,-285,502,-102),792=>array(188,-375,370,-135),793=>array(229,-375,412,-135),794=>array(191,690,444,930),795=>array(197,373,406,555),796=>array(147,-245,278,-31),797=>array(178,-288,430,-135),798=>array(204,-288,456,-135),799=>array(183,-375,435,-135),800=>array(175,-202,427,-135),801=>array(151,-208,472,63),802=>array(39,-208,284,63),803=>array(141,-202,261,-102),804=>array(46,-201,356,-103),805=>array(94,-245,313,-31),806=>array(85,-265,280,-96),807=>array(89,-193,306,0),808=>array(118,-193,298,0),809=>array(247,-319,355,-102),810=>array(150,-263,452,-102),811=>array(114,-222,515,-82),812=>array(64,-237,376,-53),813=>array(28,-237,341,-53),814=>array(57,-238,365,-98),815=>array(31,-237,340,-97),816=>array(23,-238,370,-99),817=>array(51,-174,357,-102),818=>array(0,-236,602,-197),819=>array(0,-236,602,-80),820=>array(29,240,573,381),821=>array(69,221,519,301),822=>array(0,221,602,301),823=>array(-32,-47,628,592),824=>array(-67,-34,656,761),825=>array(129,-245,260,-31),826=>array(150,-188,452,-26),827=>array(140,-371,462,-102),828=>array(87,-222,488,-82),829=>array(181,599,421,816),830=>array(207,595,395,853),831=>array(0,599,602,755),835=>array(218,595,384,844),856=>array(626,658,746,758),865=>array(-131,742,702,902),884=>array(216,557,389,800),885=>array(213,-208,386,35),890=>array(197,-208,293,-45),894=>array(99,-140,392,519),900=>array(281,616,550,800),901=>array(213,659,601,980),902=>array(-52,0,513,800),903=>array(222,273,374,422),904=>array(-61,0,600,800),905=>array(-85,0,606,800),906=>array(-61,0,574,800),908=>array(12,-14,562,800),910=>array(-146,0,658,800),911=>array(-33,0,564,800),912=>array(191,0,601,980),913=>array(-52,0,513,729),914=>array(11,0,570,729),915=>array(34,0,627,729),916=>array(-53,0,513,729),917=>array(26,0,600,729),918=>array(-3,0,622,729),919=>array(-4,0,606,729),920=>array(57,-14,545,742),921=>array(28,0,574,729),922=>array(-4,0,661,729),923=>array(-53,0,513,729),924=>array(-29,0,631,729),925=>array(-3,0,605,729),926=>array(-4,0,606,729),927=>array(40,-14,562,742),928=>array(-4,0,606,729),929=>array(25,0,588,729),931=>array(-13,0,625,729),932=>array(78,0,651,729),933=>array(95,0,658,729),934=>array(57,0,544,729),935=>array(-62,0,653,729),936=>array(95,0,615,729),937=>array(-33,0,564,713),938=>array(28,0,574,913),939=>array(95,0,658,913),940=>array(34,-12,606,800),941=>array(64,-15,550,800),942=>array(61,-208,550,800),943=>array(191,0,550,800),944=>array(64,0,601,980),945=>array(34,-12,606,559),946=>array(-21,-208,553,766),947=>array(32,-208,584,547),948=>array(46,-14,535,767),949=>array(64,-15,536,553),950=>array(72,-210,613,760),951=>array(61,-208,545,560),952=>array(67,-14,535,732),953=>array(191,0,438,547),954=>array(62,0,606,547),955=>array(27,0,560,760),956=>array(-19,-208,566,547),957=>array(109,0,547,547),958=>array(68,-210,591,760),959=>array(57,-14,544,560),960=>array(35,-19,596,547),961=>array(18,-208,560,560),962=>array(114,-210,585,560),963=>array(60,-14,599,547),964=>array(113,0,578,547),965=>array(64,0,564,547),966=>array(57,-208,585,551),967=>array(0,-208,602,547),968=>array(76,-208,612,547),969=>array(24,-14,574,547),970=>array(191,0,522,758),971=>array(64,0,564,758),972=>array(57,-14,550,800),973=>array(64,0,564,800),974=>array(24,-14,574,800),976=>array(72,-11,526,768),977=>array(66,-11,540,768),978=>array(28,0,583,729),979=>array(-186,0,583,800),980=>array(28,0,583,913),981=>array(55,-208,551,729),982=>array(12,0,607,547),983=>array(-1,-188,636,547),984=>array(76,-208,564,742),985=>array(85,-208,554,560),986=>array(63,-210,604,729),987=>array(96,-210,594,547),988=>array(45,0,616,729),989=>array(-90,-208,594,760),990=>array(24,-2,599,729),991=>array(58,0,547,759),992=>array(80,-208,558,742),993=>array(6,-180,494,559),1008=>array(-21,-3,617,547),1009=>array(87,-208,560,560),1010=>array(76,-14,555,560),1011=>array(2,-208,482,760),1012=>array(57,-14,545,742),1013=>array(79,-14,557,560),1014=>array(27,-14,504,560),1015=>array(25,0,566,729),1016=>array(-1,-208,551,765),1017=>array(56,-14,592,742),1018=>array(-29,0,630,729),1019=>array(-12,-208,612,547),1020=>array(-23,-208,560,560),1021=>array(2,-14,524,742),1022=>array(56,-14,592,742),1023=>array(2,-14,524,742),1024=>array(26,0,600,985),1025=>array(26,0,600,900),1026=>array(39,-229,552,730),1027=>array(34,0,627,985),1028=>array(55,-14,590,742),1029=>array(12,-14,560,742),1030=>array(28,0,574,729),1031=>array(28,0,574,900),1032=>array(-12,-14,538,729),1033=>array(-80,0,575,729),1034=>array(-54,0,577,729),1035=>array(17,0,530,730),1036=>array(37,0,702,985),1037=>array(-3,0,605,985),1038=>array(19,0,634,928),1039=>array(11,-157,621,729),1040=>array(-52,0,513,729),1041=>array(10,0,593,729),1042=>array(11,0,570,729),1043=>array(34,0,627,729),1044=>array(-70,-157,613,729),1045=>array(26,0,600,729),1046=>array(-63,0,657,729),1047=>array(-9,-14,538,742),1048=>array(-3,0,605,729),1049=>array(-3,0,605,928),1050=>array(-4,0,661,729),1051=>array(-69,0,605,729),1052=>array(-29,0,631,729),1053=>array(-4,0,606,729),1054=>array(40,-14,562,742),1055=>array(-4,0,606,729),1056=>array(25,0,588,729),1057=>array(56,-14,592,742),1058=>array(78,0,651,729),1059=>array(19,0,634,729),1060=>array(23,0,583,729),1061=>array(-62,0,653,729),1062=>array(-17,-157,593,729),1063=>array(82,0,604,729),1064=>array(-15,0,618,729),1065=>array(-26,-157,606,729),1066=>array(70,0,529,729),1067=>array(-40,0,625,729),1068=>array(25,0,529,729),1069=>array(2,-14,537,742),1070=>array(-0,-14,621,742),1071=>array(-34,0,624,729),1072=>array(35,-14,531,560),1073=>array(35,-14,556,777),1074=>array(49,0,507,547),1075=>array(72,0,546,547),1076=>array(-16,-140,559,547),1077=>array(48,-14,550,561),1078=>array(-24,0,617,547),1079=>array(32,-11,532,560),1080=>array(42,0,566,547),1081=>array(42,0,566,785),1082=>array(62,0,606,547),1083=>array(-39,0,566,547),1084=>array(-23,0,629,547),1085=>array(42,0,566,547),1086=>array(57,-14,544,560),1087=>array(42,0,566,547),1088=>array(-1,-208,551,560),1089=>array(76,-14,555,560),1090=>array(149,0,557,547),1091=>array(-19,-208,598,547),1092=>array(36,-208,562,760),1093=>array(-34,0,590,547),1094=>array(21,-140,544,547),1095=>array(108,0,566,548),1096=>array(8,0,595,547),1097=>array(-0,-140,586,547),1098=>array(54,0,550,547),1099=>array(-2,0,604,547),1100=>array(43,0,507,547),1101=>array(47,-14,526,560),1102=>array(-15,-14,582,560),1103=>array(29,0,534,547),1104=>array(48,-14,550,803),1105=>array(48,-14,550,718),1106=>array(56,-208,526,760),1107=>array(72,0,589,803),1108=>array(95,-14,566,560),1109=>array(56,-14,526,560),1110=>array(30,0,490,760),1111=>array(30,0,500,718),1112=>array(2,-208,482,760),1113=>array(-48,0,582,547),1114=>array(-21,0,559,547),1115=>array(36,0,494,760),1116=>array(62,0,606,803),1117=>array(42,0,566,803),1118=>array(-19,-208,598,785),1119=>array(56,-140,580,547),1122=>array(50,0,529,729),1123=>array(54,0,547,760),1138=>array(57,-14,545,742),1139=>array(67,-14,535,560),1168=>array(34,0,656,878),1169=>array(72,0,576,700),1170=>array(34,0,627,729),1171=>array(56,0,546,547),1172=>array(34,-200,627,729),1173=>array(72,-208,546,547),1174=>array(-63,-157,657,729),1175=>array(-24,-140,617,547),1176=>array(-9,-193,538,742),1177=>array(32,-193,532,560),1178=>array(-4,-152,661,729),1179=>array(62,-135,606,547),1186=>array(-4,-152,606,729),1187=>array(42,-135,566,547),1188=>array(-15,0,662,729),1189=>array(8,0,639,547),1194=>array(56,-193,592,742),1195=>array(76,-193,555,560),1196=>array(78,-152,651,729),1197=>array(146,-135,557,547),1198=>array(95,0,658,729),1199=>array(86,-208,598,547),1200=>array(95,0,661,729),1201=>array(74,-208,598,547),1202=>array(-63,-152,648,729),1203=>array(-16,-135,599,547),1210=>array(-3,0,511,730),1211=>array(41,0,535,760),1216=>array(28,0,574,729),1217=>array(-63,0,657,928),1218=>array(-24,0,617,785),1219=>array(-4,-200,661,729),1220=>array(62,-208,606,547),1223=>array(-4,-200,606,729),1224=>array(42,-208,566,547),1227=>array(34,-152,627,729),1228=>array(72,-135,546,547),1231=>array(171,0,410,765),1232=>array(-52,0,564,928),1233=>array(35,-14,536,785),1234=>array(-52,0,537,913),1235=>array(35,-14,531,758),1236=>array(-71,0,638,729),1237=>array(-23,-14,593,560),1238=>array(26,0,600,928),1239=>array(48,-14,550,785),1240=>array(57,-14,545,742),1241=>array(55,-14,542,560),1242=>array(57,-14,545,913),1243=>array(55,-14,542,758),1244=>array(-63,0,657,913),1245=>array(-24,0,617,758),1246=>array(-9,-14,538,913),1247=>array(32,-11,532,758),1248=>array(-16,-14,602,729),1249=>array(-6,-213,572,547),1250=>array(-3,0,605,898),1251=>array(42,0,566,745),1252=>array(-3,0,605,913),1253=>array(42,0,566,758),1254=>array(40,-14,562,913),1255=>array(57,-14,544,758),1256=>array(57,-14,545,742),1257=>array(67,-14,535,560),1258=>array(57,-14,545,913),1259=>array(67,-14,535,758),1260=>array(2,-14,537,913),1261=>array(47,-14,526,758),1262=>array(19,0,634,898),1263=>array(-19,-208,598,745),1264=>array(19,0,634,913),1265=>array(-19,-208,598,758),1266=>array(19,0,634,927),1267=>array(-19,-208,598,800),1268=>array(82,0,604,913),1269=>array(108,0,566,758),1270=>array(95,-152,606,730),1271=>array(123,-135,567,548),1272=>array(-40,0,625,913),1273=>array(-2,0,604,758),1296=>array(35,-14,573,742),1297=>array(64,-15,536,553),1306=>array(40,-132,562,742),1307=>array(48,-208,560,560),1308=>array(40,0,672,729),1309=>array(45,0,642,547),1329=>array(28,-29,589,729),1330=>array(-9,0,551,742),1331=>array(56,0,547,742),1332=>array(37,0,562,742),1333=>array(31,-14,576,729),1334=>array(-3,0,575,742),1335=>array(-12,0,579,729),1336=>array(-9,0,551,743),1337=>array(-49,-14,593,742),1338=>array(15,-14,597,729),1339=>array(0,0,526,729),1340=>array(4,0,471,729),1341=>array(-24,-14,593,729),1342=>array(24,-14,640,742),1343=>array(75,0,565,729),1344=>array(23,-26,594,729),1345=>array(8,-23,577,742),1346=>array(37,0,520,742),1347=>array(-8,0,631,742),1348=>array(-5,-14,647,729),1349=>array(27,-14,578,742),1350=>array(82,-14,564,729),1351=>array(27,-14,551,729),1352=>array(0,0,561,743),1353=>array(53,-28,578,742),1354=>array(42,0,596,742),1355=>array(-4,0,577,742),1356=>array(-45,0,562,742),1357=>array(41,-14,602,729),1358=>array(20,0,545,729),1359=>array(22,-14,558,742),1360=>array(0,0,561,743),1361=>array(27,-14,578,742),1362=>array(-5,0,571,729),1363=>array(21,0,583,729),1364=>array(-24,0,610,742),1365=>array(40,-14,562,742),1366=>array(4,-14,563,729),1369=>array(292,492,452,760),1370=>array(207,499,395,729),1371=>array(233,620,502,803),1372=>array(83,618,518,893),1373=>array(269,616,462,800),1374=>array(61,613,511,885),1375=>array(78,618,507,760),1377=>array(26,-13,605,547),1378=>array(15,-208,539,560),1379=>array(45,-208,556,558),1380=>array(21,-208,525,560),1381=>array(48,-14,556,760),1382=>array(45,-208,556,558),1383=>array(27,0,533,760),1384=>array(15,-208,539,560),1385=>array(-42,-208,588,560),1386=>array(7,-14,600,760),1387=>array(-2,-208,522,760),1388=>array(86,-208,382,547),1389=>array(-43,-208,603,760),1390=>array(36,-14,566,771),1391=>array(78,-208,562,760),1392=>array(38,0,532,760),1393=>array(45,-15,503,760),1394=>array(21,-208,505,560),1395=>array(54,-14,586,760),1396=>array(19,-14,626,760),1397=>array(81,-208,520,547),1398=>array(101,-14,584,760),1399=>array(26,-208,553,561),1400=>array(38,0,532,560),1401=>array(58,-208,487,571),1402=>array(45,-208,625,547),1403=>array(28,-208,557,561),1404=>array(10,0,516,560),1405=>array(58,-13,550,547),1406=>array(36,-208,562,760),1407=>array(22,-13,579,560),1408=>array(17,-208,541,560),1409=>array(45,-215,576,560),1410=>array(68,0,440,547),1411=>array(21,-208,579,760),1412=>array(-22,-208,577,560),1413=>array(57,-14,544,560),1414=>array(-14,-208,591,760),1415=>array(3,-14,507,760),1417=>array(209,0,393,415),1418=>array(170,205,439,314),3713=>array(-6,-10,574,560),3714=>array(24,-17,572,568),3716=>array(38,-10,540,568),3719=>array(94,-238,510,568),3720=>array(66,-0,546,575),3722=>array(51,-238,588,563),3725=>array(30,-8,599,573),3732=>array(23,-14,567,560),3733=>array(35,-15,579,579),3734=>array(74,-240,578,560),3735=>array(30,-14,583,560),3737=>array(-20,-14,593,568),3738=>array(38,-8,594,561),3739=>array(19,-8,616,760),3740=>array(16,-8,664,638),3741=>array(4,-8,622,760),3742=>array(24,-8,604,561),3743=>array(5,-8,627,760),3745=>array(-32,-14,602,547),3746=>array(12,-8,620,760),3747=>array(22,-8,586,568),3749=>array(14,-8,575,568),3751=>array(27,-13,575,560),3754=>array(1,-8,679,701),3755=>array(-12,-12,619,575),3757=>array(33,-8,579,568),3758=>array(14,-8,662,605),3759=>array(52,-106,615,579),3760=>array(73,-13,640,563),3761=>array(199,639,702,880),3762=>array(145,0,586,560),3763=>array(-403,0,586,806),3764=>array(41,615,562,926),3765=>array(41,612,616,926),3766=>array(41,615,562,926),3767=>array(41,612,616,926),3768=>array(201,-350,404,-38),3769=>array(144,-306,440,-40),3771=>array(31,639,567,880),3772=>array(-15,-278,612,-39),3784=>array(240,618,362,792),3785=>array(34,609,582,891),3786=>array(46,598,664,869),3787=>array(154,609,448,890),3788=>array(-15,636,612,875),3789=>array(199,620,404,806),4304=>array(60,0,522,560),4305=>array(46,0,510,761),4306=>array(21,-208,528,510),4307=>array(42,-208,609,505),4308=>array(41,-208,562,510),4309=>array(41,-208,559,510),4310=>array(43,0,507,760),4311=>array(17,0,591,505),4312=>array(72,0,535,510),4313=>array(42,-207,553,501),4314=>array(62,-208,557,510),4315=>array(44,0,568,760),4316=>array(43,0,538,748),4317=>array(17,0,588,505),4318=>array(40,0,541,757),4319=>array(37,-207,596,524),4320=>array(-7,0,567,760),4321=>array(46,0,506,743),4322=>array(-3,-207,580,614),4323=>array(53,-207,579,506),4324=>array(38,-208,614,505),4325=>array(20,-208,616,743),4326=>array(37,-208,611,506),4327=>array(42,-207,592,496),4328=>array(45,0,573,760),4329=>array(3,0,509,760),4330=>array(25,-207,578,518),4331=>array(44,0,597,743),4332=>array(45,0,624,760),4333=>array(19,-207,532,743),4334=>array(46,0,512,743),4335=>array(35,-207,533,605),4336=>array(37,0,558,760),4337=>array(2,-207,590,760),4338=>array(36,-131,547,511),4339=>array(41,-208,595,510),4340=>array(17,-208,578,760),4341=>array(22,0,582,760),4342=>array(30,-207,615,511),4343=>array(17,-207,525,511),4344=>array(40,-207,554,520),4345=>array(78,-208,583,518),4346=>array(56,-66,551,511),4347=>array(97,24,470,486),4348=>array(181,370,441,760),7426=>array(13,-14,629,560),7432=>array(51,-11,542,560),7433=>array(130,-211,590,549),7444=>array(-23,-14,601,560),7446=>array(120,273,588,560),7447=>array(119,-14,588,273),7453=>array(21,1,648,419),7454=>array(42,-1,643,417),7455=>array(21,0,666,501),7468=>array(83,326,440,734),7469=>array(80,326,516,734),7470=>array(112,326,457,734),7472=>array(112,326,457,734),7473=>array(123,326,474,734),7474=>array(123,326,480,734),7475=>array(140,318,475,742),7476=>array(114,326,488,734),7477=>array(134,326,468,734),7478=>array(135,318,472,734),7479=>array(94,326,502,734),7480=>array(119,326,413,734),7481=>array(99,326,503,734),7482=>array(115,326,487,734),7483=>array(115,326,487,734),7484=>array(139,318,463,742),7486=>array(116,326,465,734),7487=>array(94,326,437,734),7488=>array(157,326,516,734),7489=>array(139,318,486,734),7490=>array(140,326,530,734),7491=>array(145,318,457,640),7492=>array(144,318,458,640),7493=>array(140,318,462,640),7494=>array(107,318,495,640),7495=>array(140,318,462,751),7496=>array(126,318,476,751),7497=>array(143,318,459,640),7498=>array(143,318,459,640),7499=>array(146,320,457,640),7500=>array(146,320,457,640),7501=>array(134,206,468,640),7502=>array(156,208,446,633),7503=>array(130,326,472,751),7504=>array(118,326,484,640),7505=>array(146,209,456,640),7506=>array(147,318,455,640),7507=>array(150,318,452,640),7508=>array(150,479,452,640),7509=>array(150,318,452,479),7510=>array(127,209,475,640),7511=>array(158,326,444,719),7512=>array(146,319,456,632),7513=>array(104,327,499,561),7514=>array(119,326,483,640),7515=>array(142,326,460,632),7522=>array(156,0,446,425),7523=>array(169,-8,432,306),7524=>array(146,-7,456,306),7525=>array(142,0,460,306),7543=>array(36,-215,566,560),7544=>array(114,326,488,734),7547=>array(78,0,630,547),7557=>array(196,-208,520,765),7579=>array(140,318,462,640),7580=>array(150,318,452,640),7581=>array(147,286,455,639),7582=>array(146,318,457,751),7583=>array(143,320,459,640),7584=>array(150,326,452,751),7585=>array(155,209,447,632),7586=>array(134,206,468,631),7587=>array(146,208,456,632),7588=>array(144,326,458,751),7589=>array(197,326,405,632),7590=>array(127,326,475,632),7591=>array(127,326,475,632),7592=>array(148,209,454,751),7593=>array(217,209,385,755),7594=>array(199,209,403,755),7595=>array(182,326,420,640),7596=>array(119,209,483,640),7597=>array(119,208,483,640),7598=>array(130,209,472,640),7599=>array(169,209,433,640),7600=>array(122,326,480,640),7601=>array(147,318,455,640),7602=>array(140,210,462,751),7603=>array(143,209,459,640),7604=>array(124,209,478,751),7605=>array(188,209,472,719),7606=>array(97,318,505,632),7607=>array(122,318,480,632),7609=>array(151,326,451,632),7610=>array(133,326,469,632),7611=>array(139,326,463,632),7612=>array(164,209,438,632),7613=>array(129,296,473,632),7614=>array(119,207,483,632),7615=>array(143,318,459,736),7680=>array(-52,-245,513,729),7681=>array(35,-245,531,560),7682=>array(11,0,570,914),7683=>array(29,-14,541,760),7684=>array(11,-202,570,729),7685=>array(29,-202,541,760),7686=>array(11,-174,570,729),7687=>array(29,-174,541,760),7688=>array(56,-193,594,927),7689=>array(76,-193,594,800),7690=>array(-4,0,552,914),7691=>array(58,-14,612,760),7692=>array(-4,-202,552,729),7693=>array(58,-202,612,760),7694=>array(-4,-174,552,729),7695=>array(51,-174,612,760),7696=>array(-43,-193,552,729),7697=>array(58,-193,612,760),7698=>array(-4,-237,552,729),7699=>array(28,-237,612,760),7704=>array(26,-237,600,729),7705=>array(35,-237,550,561),7706=>array(26,-238,600,729),7707=>array(30,-238,550,561),7708=>array(26,-193,600,928),7709=>array(48,-193,550,785),7710=>array(45,0,616,914),7711=>array(129,0,608,914),7712=>array(38,-14,576,898),7713=>array(29,-215,559,745),7714=>array(-4,0,606,914),7715=>array(41,0,535,914),7716=>array(-4,-202,606,729),7717=>array(41,-202,535,760),7718=>array(-4,0,606,913),7719=>array(41,0,535,918),7720=>array(-94,-193,606,729),7721=>array(-77,-193,535,760),7722=>array(-4,-238,606,729),7723=>array(41,-238,535,760),7724=>array(23,-238,574,729),7725=>array(23,-238,490,760),7728=>array(-4,0,661,927),7729=>array(44,0,588,927),7730=>array(-4,-202,661,729),7731=>array(44,-202,588,760),7732=>array(-4,-174,661,729),7733=>array(44,-174,588,760),7734=>array(38,-202,505,729),7735=>array(141,-202,477,765),7736=>array(38,-202,551,898),7737=>array(141,-202,551,898),7738=>array(38,-174,505,729),7739=>array(51,-174,477,765),7740=>array(38,-237,505,729),7741=>array(28,-237,477,765),7742=>array(-29,0,631,927),7743=>array(-7,0,575,800),7744=>array(-29,0,631,914),7745=>array(-7,0,575,758),7746=>array(-29,-202,631,729),7747=>array(-7,-202,575,560),7748=>array(-3,0,605,914),7749=>array(41,0,535,758),7750=>array(-3,-202,605,729),7751=>array(41,-202,535,560),7752=>array(-3,-174,605,729),7753=>array(41,-174,535,560),7754=>array(-3,-237,605,729),7755=>array(28,-237,535,560),7756=>array(40,-14,562,997),7757=>array(57,-14,585,997),7764=>array(25,0,588,931),7765=>array(-1,-208,551,800),7766=>array(25,0,588,914),7767=>array(-1,-208,551,758),7768=>array(6,0,562,914),7769=>array(106,0,595,758),7770=>array(6,-202,562,729),7771=>array(106,-202,595,560),7772=>array(6,-202,562,898),7773=>array(106,-202,595,745),7774=>array(6,-174,562,729),7775=>array(51,-174,595,560),7776=>array(12,-14,560,914),7777=>array(56,-14,526,758),7778=>array(12,-202,560,742),7779=>array(56,-202,526,560),7784=>array(12,-202,560,914),7785=>array(56,-202,526,758),7786=>array(78,0,651,914),7787=>array(95,0,549,914),7788=>array(78,-202,651,729),7789=>array(95,-202,549,702),7790=>array(51,-174,651,729),7791=>array(51,-174,549,702),7792=>array(28,-237,651,729),7793=>array(28,-237,549,702),7794=>array(39,-201,601,729),7795=>array(46,-201,553,547),7796=>array(23,-238,601,729),7797=>array(23,-238,553,547),7798=>array(28,-237,601,729),7799=>array(28,-237,553,547),7800=>array(39,-14,601,997),7801=>array(61,-13,585,997),7804=>array(97,0,646,909),7805=>array(89,0,593,757),7806=>array(97,-202,646,729),7807=>array(89,-202,593,547),7808=>array(40,0,672,931),7809=>array(45,0,642,803),7810=>array(40,0,672,931),7811=>array(45,0,642,803),7812=>array(40,0,672,900),7813=>array(45,0,642,718),7814=>array(40,0,672,914),7815=>array(45,0,642,758),7816=>array(40,-202,672,729),7817=>array(45,-202,642,547),7818=>array(-62,0,653,914),7819=>array(-34,0,590,758),7820=>array(-62,0,653,913),7821=>array(-34,0,590,718),7822=>array(95,0,658,914),7823=>array(-19,-208,598,758),7824=>array(-3,0,622,932),7825=>array(38,0,553,803),7826=>array(-3,-202,622,729),7827=>array(38,-202,553,547),7828=>array(-3,-174,622,729),7829=>array(38,-174,553,547),7830=>array(41,-174,535,760),7831=>array(95,0,549,860),7832=>array(45,0,642,923),7833=>array(-19,-208,598,923),7835=>array(129,0,608,914),7839=>array(46,-14,535,767),7840=>array(-52,-202,513,729),7841=>array(35,-202,531,560),7852=>array(-52,-202,513,932),7853=>array(35,-202,531,803),7856=>array(-52,0,564,997),7857=>array(35,-14,536,954),7862=>array(-52,-202,564,928),7863=>array(35,-202,531,760),7864=>array(26,-202,600,729),7865=>array(48,-202,550,561),7868=>array(26,0,600,921),7869=>array(48,-14,550,777),7878=>array(26,-202,600,932),7879=>array(48,-202,550,803),7882=>array(28,-202,574,729),7883=>array(30,-202,490,760),7884=>array(40,-202,562,742),7885=>array(57,-202,544,560),7896=>array(40,-202,562,932),7897=>array(57,-202,544,803),7898=>array(-20,-14,634,927),7899=>array(5,-14,595,800),7900=>array(-20,-14,634,927),7901=>array(5,-14,595,800),7904=>array(-20,-14,634,921),7905=>array(5,-14,595,777),7906=>array(-20,-202,634,760),7907=>array(5,-202,595,560),7908=>array(39,-202,601,729),7909=>array(61,-202,553,547),7912=>array(-29,-14,652,927),7913=>array(-15,-13,592,800),7914=>array(-29,-14,652,927),7915=>array(-15,-13,592,800),7918=>array(-29,-14,652,921),7919=>array(-15,-13,592,777),7920=>array(-29,-202,652,760),7921=>array(-15,-202,592,555),7922=>array(95,0,658,931),7923=>array(-19,-208,598,803),7924=>array(95,-202,658,729),7925=>array(-19,-208,598,547),7928=>array(95,0,658,921),7929=>array(-19,-208,598,777),7936=>array(34,-12,606,806),7937=>array(34,-12,606,806),7938=>array(34,-12,606,806),7939=>array(34,-12,606,806),7940=>array(34,-12,606,806),7941=>array(34,-12,606,806),7942=>array(34,-12,606,977),7943=>array(34,-12,606,977),7944=>array(-52,0,513,806),7945=>array(-52,0,513,806),7946=>array(-165,0,513,806),7947=>array(-141,0,513,806),7948=>array(-80,0,513,806),7949=>array(-65,0,513,806),7950=>array(-52,0,513,977),7951=>array(-52,0,513,977),7952=>array(64,-15,536,806),7953=>array(64,-15,536,806),7954=>array(64,-15,536,806),7955=>array(64,-15,536,806),7956=>array(64,-15,599,806),7957=>array(64,-15,599,806),7960=>array(-31,0,600,806),7961=>array(-6,0,600,806),7962=>array(-275,0,600,806),7963=>array(-250,0,600,806),7964=>array(-214,0,600,806),7965=>array(-199,0,600,806),7968=>array(61,-208,545,806),7969=>array(61,-208,545,806),7970=>array(61,-208,545,806),7971=>array(61,-208,545,806),7972=>array(61,-208,599,806),7973=>array(61,-208,599,806),7974=>array(61,-208,576,977),7975=>array(61,-208,572,977),7976=>array(-55,0,606,806),7977=>array(-31,0,606,806),7978=>array(-312,0,606,806),7979=>array(-287,0,606,806),7980=>array(-263,0,606,806),7981=>array(-248,0,606,806),7982=>array(-112,0,606,977),7983=>array(-116,0,606,977),7984=>array(191,0,438,806),7985=>array(191,0,438,806),7986=>array(152,0,536,806),7987=>array(177,0,536,806),7988=>array(177,0,599,806),7989=>array(191,0,599,806),7990=>array(191,0,576,977),7991=>array(191,0,572,977),7992=>array(-31,0,574,806),7993=>array(-6,0,574,806),7994=>array(-263,0,574,806),7995=>array(-238,0,574,806),7996=>array(-214,0,574,806),7997=>array(-199,0,574,806),7998=>array(-75,0,574,977),7999=>array(-79,0,574,977),8000=>array(57,-14,544,806),8001=>array(57,-14,544,806),8002=>array(57,-14,544,806),8003=>array(57,-14,544,806),8004=>array(57,-14,599,806),8005=>array(57,-14,599,806),8008=>array(6,-14,562,806),8009=>array(-6,-14,562,806),8010=>array(-275,-14,562,806),8011=>array(-250,-14,562,806),8012=>array(-141,-14,562,806),8013=>array(-126,-14,562,806),8016=>array(64,0,564,806),8017=>array(64,0,564,806),8018=>array(64,0,564,806),8019=>array(64,0,564,806),8020=>array(64,0,599,806),8021=>array(64,0,599,806),8022=>array(64,0,576,977),8023=>array(64,0,572,977),8025=>array(-80,0,658,806),8027=>array(-287,0,658,806),8029=>array(-285,0,658,806),8031=>array(-152,0,658,977),8032=>array(24,-14,574,806),8033=>array(24,-14,574,806),8034=>array(24,-14,574,806),8035=>array(24,-14,574,806),8036=>array(24,-14,599,806),8037=>array(24,-14,599,806),8038=>array(24,-14,576,977),8039=>array(24,-14,574,977),8040=>array(-33,0,564,806),8041=>array(-33,0,564,806),8042=>array(-275,0,564,806),8043=>array(-250,0,564,806),8044=>array(-128,0,564,806),8045=>array(-114,0,564,806),8046=>array(-39,0,564,977),8047=>array(-79,0,564,977),8048=>array(34,-12,606,800),8049=>array(34,-12,606,800),8050=>array(64,-15,536,800),8051=>array(64,-15,550,800),8052=>array(61,-208,545,800),8053=>array(61,-208,550,800),8054=>array(191,0,438,800),8055=>array(191,0,550,800),8056=>array(57,-14,544,800),8057=>array(57,-14,550,800),8058=>array(64,0,564,800),8059=>array(64,0,564,800),8060=>array(24,-14,574,800),8061=>array(24,-14,574,800),8064=>array(34,-208,606,806),8065=>array(34,-208,606,806),8066=>array(34,-208,606,806),8067=>array(34,-208,606,806),8068=>array(34,-208,606,806),8069=>array(34,-208,606,806),8070=>array(34,-208,606,977),8071=>array(34,-208,606,977),8072=>array(-52,-208,513,806),8073=>array(-52,-208,513,806),8074=>array(-165,-208,513,806),8075=>array(-141,-208,513,806),8076=>array(-80,-208,513,806),8077=>array(-65,-208,513,806),8078=>array(-52,-208,513,977),8079=>array(-52,-208,513,977),8080=>array(44,-208,545,806),8081=>array(44,-208,545,806),8082=>array(44,-208,545,806),8083=>array(44,-208,545,806),8084=>array(44,-208,599,806),8085=>array(44,-208,599,806),8086=>array(44,-208,576,977),8087=>array(44,-208,572,977),8088=>array(-55,-208,606,806),8089=>array(-31,-208,606,806),8090=>array(-312,-208,606,806),8091=>array(-287,-208,606,806),8092=>array(-263,-208,606,806),8093=>array(-248,-208,606,806),8094=>array(-112,-208,606,977),8095=>array(-116,-208,606,977),8096=>array(24,-208,574,806),8097=>array(24,-208,574,806),8098=>array(24,-208,574,806),8099=>array(24,-208,574,806),8100=>array(24,-208,599,806),8101=>array(24,-208,599,806),8102=>array(24,-208,576,977),8103=>array(24,-208,574,977),8104=>array(-33,-208,564,806),8105=>array(-33,-208,564,806),8106=>array(-275,-208,564,806),8107=>array(-250,-208,564,806),8108=>array(-128,-208,564,806),8109=>array(-114,-208,564,806),8110=>array(-39,-208,564,977),8111=>array(-79,-208,564,977),8112=>array(34,-12,606,785),8113=>array(34,-12,606,745),8114=>array(34,-208,606,800),8115=>array(34,-208,606,559),8116=>array(34,-208,606,800),8118=>array(34,-12,606,777),8119=>array(34,-208,606,777),8120=>array(-52,0,564,928),8121=>array(-52,0,551,898),8122=>array(-52,0,513,800),8123=>array(-52,0,513,800),8124=>array(-52,-208,513,729),8125=>array(274,595,434,806),8126=>array(197,-208,293,-45),8127=>array(274,595,434,806),8128=>array(196,638,542,777),8129=>array(213,659,580,943),8130=>array(44,-208,545,800),8131=>array(44,-208,545,560),8132=>array(44,-208,550,800),8134=>array(61,-208,545,777),8135=>array(44,-208,545,777),8136=>array(-96,0,600,800),8137=>array(-61,0,600,800),8138=>array(-121,0,606,800),8139=>array(-85,0,606,800),8140=>array(-4,-208,606,729),8141=>array(152,595,536,806),8142=>array(177,595,599,806),8143=>array(230,595,576,977),8144=>array(191,0,536,785),8145=>array(191,0,521,745),8146=>array(191,0,522,980),8147=>array(191,0,601,980),8150=>array(191,0,542,777),8151=>array(191,0,580,943),8152=>array(28,0,574,928),8153=>array(28,0,574,898),8154=>array(-72,0,574,800),8155=>array(-61,0,574,800),8157=>array(177,595,536,806),8158=>array(191,595,599,806),8159=>array(226,595,572,977),8160=>array(64,0,564,785),8161=>array(64,0,564,745),8162=>array(64,0,564,980),8163=>array(64,0,601,980),8164=>array(18,-208,560,806),8165=>array(18,-208,560,806),8166=>array(64,0,564,777),8167=>array(64,0,580,943),8168=>array(95,0,658,928),8169=>array(95,0,658,898),8170=>array(-121,0,658,800),8171=>array(-146,0,658,800),8172=>array(-6,0,588,806),8173=>array(213,659,522,980),8174=>array(213,659,601,980),8175=>array(221,616,414,800),8178=>array(24,-208,574,800),8179=>array(24,-208,574,547),8180=>array(24,-208,574,800),8182=>array(24,-14,574,777),8183=>array(24,-208,574,777),8184=>array(-84,-14,562,800),8185=>array(12,-14,562,800),8186=>array(-84,0,564,800),8187=>array(-33,0,564,800),8188=>array(-33,-208,564,713),8189=>array(281,616,550,800),8190=>array(299,595,434,806),8208=>array(148,234,419,314),8209=>array(148,234,419,314),8210=>array(-25,240,591,309),8211=>array(-25,240,591,309),8212=>array(-25,240,591,309),8213=>array(-25,240,591,309),8214=>array(139,-236,462,764),8215=>array(0,-236,602,-80),8216=>array(226,472,453,760),8217=>array(226,472,453,760),8218=>array(99,-140,326,148),8219=>array(263,472,407,760),8220=>array(120,472,571,760),8221=>array(108,472,559,760),8222=>array(-8,-140,443,148),8223=>array(145,472,513,760),8224=>array(95,-96,554,729),8225=>array(29,-96,554,729),8226=>array(156,227,446,516),8227=>array(156,188,485,555),8230=>array(-32,0,520,148),8240=>array(0,0,602,699),8241=>array(0,0,602,699),8242=>array(315,547,534,729),8243=>array(242,547,607,729),8244=>array(169,547,681,729),8245=>array(351,547,499,729),8246=>array(277,547,572,729),8247=>array(204,547,646,729),8249=>array(151,69,428,517),8250=>array(155,69,431,517),8252=>array(31,0,572,729),8253=>array(163,0,546,742),8254=>array(0,716,602,755),8261=>array(129,-132,510,760),8262=>array(72,-132,453,760),8263=>array(-13,0,615,743),8264=>array(59,0,587,743),8265=>array(31,0,603,743),8267=>array(19,-96,590,729),8304=>array(172,319,513,742),8305=>array(156,326,446,751),8308=>array(135,326,458,734),8309=>array(150,319,513,734),8310=>array(173,319,513,742),8311=>array(172,326,513,734),8312=>array(157,319,513,742),8313=>array(172,319,513,742),8314=>array(139,357,464,646),8315=>array(139,479,464,525),8316=>array(139,422,464,581),8317=>array(198,252,404,751),8318=>array(198,252,404,751),8319=>array(126,326,456,640),8320=>array(172,-7,513,416),8321=>array(170,0,450,408),8322=>array(150,0,484,416),8323=>array(140,-7,480,416),8324=>array(135,0,458,408),8325=>array(150,-7,513,408),8326=>array(173,-7,513,416),8327=>array(172,0,513,408),8328=>array(157,-7,513,416),8329=>array(172,-7,513,416),8330=>array(139,31,464,320),8331=>array(139,152,464,199),8332=>array(139,96,464,254),8333=>array(198,-74,404,425),8334=>array(198,-74,404,425),8336=>array(145,-8,457,313),8337=>array(143,-8,459,314),8338=>array(147,-8,455,313),8339=>array(104,0,491,306),8340=>array(143,-8,459,313),8341=>array(115,-8,440,418),8342=>array(130,0,472,425),8343=>array(201,0,402,429),8344=>array(118,0,484,313),8345=>array(126,0,456,313),8346=>array(127,-117,475,313),8347=>array(142,0,442,322),8348=>array(158,0,444,393),8352=>array(40,0,594,729),8353=>array(38,-44,579,778),8354=>array(38,-14,579,742),8355=>array(28,0,574,729),8356=>array(22,0,587,742),8357=>array(22,-93,536,640),8358=>array(-19,0,621,729),8359=>array(2,-14,595,729),8360=>array(4,-14,579,729),8361=>array(2,0,646,729),8362=>array(-19,-14,659,729),8363=>array(58,-175,691,760),8364=>array(-5,-14,582,742),8365=>array(16,0,650,729),8366=>array(78,0,648,729),8367=>array(5,-231,593,753),8368=>array(8,-14,526,742),8369=>array(25,0,641,729),8370=>array(29,-81,573,809),8371=>array(-28,0,604,729),8372=>array(-19,-14,621,742),8373=>array(65,-147,592,760),8376=>array(50,0,650,729),8377=>array(55,0,626,729),8450=>array(57,-14,590,742),8453=>array(0,-24,598,752),8461=>array(28,0,577,729),8462=>array(41,0,535,760),8463=>array(41,0,535,760),8469=>array(36,0,565,729),8470=>array(-66,0,581,729),8471=>array(0,61,602,663),8473=>array(32,0,575,729),8474=>array(8,-129,592,742),8477=>array(18,0,592,729),8482=>array(0,447,550,729),8484=>array(23,0,575,729),8486=>array(-33,0,564,713),8490=>array(-4,0,661,729),8491=>array(-52,0,513,928),8494=>array(5,-12,597,647),8520=>array(13,0,469,760),8531=>array(23,-139,553,810),8532=>array(23,-139,553,818),8533=>array(23,-139,580,810),8534=>array(23,-139,580,818),8535=>array(23,-139,580,818),8536=>array(23,-139,580,810),8537=>array(23,-139,580,810),8538=>array(23,-139,580,810),8539=>array(23,-139,580,810),8540=>array(23,-139,580,818),8541=>array(23,-139,580,810),8542=>array(23,-139,580,810),8543=>array(23,246,553,810),8592=>array(32,112,570,436),8593=>array(139,0,463,538),8594=>array(32,112,570,436),8595=>array(139,0,463,538),8596=>array(32,112,570,436),8597=>array(139,0,463,538),8598=>array(90,0,512,422),8599=>array(90,0,512,422),8600=>array(90,0,512,422),8601=>array(90,0,512,422),8602=>array(32,112,570,436),8603=>array(32,112,570,436),8604=>array(43,193,559,422),8605=>array(43,193,559,422),8606=>array(32,112,570,436),8607=>array(139,0,463,538),8608=>array(32,112,570,436),8609=>array(139,0,463,538),8610=>array(32,112,570,436),8611=>array(32,112,570,436),8612=>array(32,112,570,436),8613=>array(139,0,463,538),8614=>array(32,112,570,436),8615=>array(139,0,463,538),8616=>array(139,0,463,538),8617=>array(32,112,570,517),8618=>array(32,112,570,517),8619=>array(32,112,570,517),8620=>array(32,112,570,517),8621=>array(32,112,570,436),8622=>array(32,102,570,446),8623=>array(55,0,547,698),8624=>array(89,0,513,674),8625=>array(89,0,513,674),8626=>array(89,0,513,674),8627=>array(89,0,513,674),8628=>array(91,0,511,540),8629=>array(31,0,571,420),8630=>array(40,168,563,487),8631=>array(40,168,563,487),8632=>array(24,0,578,513),8633=>array(32,0,570,604),8634=>array(43,0,559,497),8635=>array(43,0,559,497),8636=>array(32,234,570,436),8637=>array(32,112,570,314),8638=>array(261,0,463,538),8639=>array(139,0,341,538),8640=>array(32,234,570,436),8641=>array(32,112,570,314),8642=>array(261,0,463,538),8643=>array(160,0,362,538),8644=>array(32,0,570,561),8645=>array(21,0,582,538),8646=>array(32,0,570,561),8647=>array(32,0,570,561),8648=>array(21,0,582,538),8649=>array(32,0,570,561),8650=>array(21,0,582,538),8651=>array(32,32,570,516),8652=>array(32,32,570,516),8653=>array(32,112,570,436),8654=>array(32,112,570,460),8655=>array(32,112,570,436),8656=>array(32,112,570,436),8657=>array(139,0,463,538),8658=>array(32,112,570,436),8659=>array(139,0,463,538),8660=>array(32,112,570,436),8661=>array(139,0,463,538),8662=>array(76,-28,526,422),8663=>array(76,-28,526,422),8664=>array(76,0,526,451),8665=>array(76,0,526,451),8666=>array(32,112,570,436),8667=>array(32,112,570,436),8668=>array(32,112,570,436),8669=>array(32,112,570,436),8670=>array(139,0,463,538),8671=>array(139,0,463,538),8672=>array(32,112,570,436),8673=>array(139,0,463,538),8674=>array(32,112,570,436),8675=>array(139,0,463,538),8676=>array(32,112,570,436),8677=>array(32,112,570,436),8678=>array(12,92,570,456),8679=>array(119,0,483,558),8680=>array(32,92,590,456),8681=>array(119,0,483,558),8682=>array(119,0,483,558),8683=>array(119,0,483,558),8684=>array(119,0,483,558),8685=>array(119,0,483,558),8686=>array(119,0,483,558),8687=>array(119,0,483,558),8688=>array(32,92,590,456),8689=>array(34,0,568,534),8690=>array(34,0,568,534),8691=>array(119,0,483,558),8692=>array(32,112,570,436),8693=>array(21,0,582,538),8694=>array(32,-125,570,672),8695=>array(32,112,570,436),8696=>array(32,112,570,436),8697=>array(32,112,570,436),8698=>array(32,112,570,436),8699=>array(32,112,570,436),8700=>array(32,112,570,436),8701=>array(12,92,570,456),8702=>array(32,92,590,456),8703=>array(12,92,590,456),8704=>array(18,0,584,729),8705=>array(57,-14,545,742),8706=>array(89,-14,513,662),8707=>array(87,0,514,729),8708=>array(87,-46,514,776),8709=>array(36,48,567,580),8710=>array(-3,0,606,695),8711=>array(-3,0,606,695),8712=>array(63,0,539,715),8713=>array(63,-86,539,801),8714=>array(63,81,539,545),8715=>array(63,0,539,715),8716=>array(63,-86,539,801),8717=>array(63,81,539,545),8719=>array(74,-213,528,741),8721=>array(70,-213,530,741),8722=>array(43,272,559,355),8723=>array(43,0,559,572),8725=>array(8,-93,517,729),8727=>array(81,85,521,542),8728=>array(146,160,456,470),8729=>array(156,200,446,489),8730=>array(29,-19,578,828),8731=>array(29,-19,578,933),8732=>array(29,-19,578,924),8733=>array(91,122,511,492),8734=>array(20,122,582,492),8735=>array(61,140,541,620),8736=>array(61,140,541,620),8743=>array(80,0,521,579),8744=>array(80,0,521,579),8745=>array(80,0,521,579),8746=>array(80,0,521,579),8747=>array(63,-183,539,871),8748=>array(31,-189,571,877),8749=>array(26,-176,577,864),8756=>array(91,65,512,564),8757=>array(92,65,510,564),8758=>array(238,65,363,564),8759=>array(91,65,512,564),8760=>array(43,272,559,564),8761=>array(36,65,566,564),8762=>array(42,65,561,564),8763=>array(43,65,559,564),8764=>array(43,243,559,384),8765=>array(43,243,559,384),8769=>array(43,85,559,535),8770=>array(43,149,559,454),8771=>array(43,172,559,470),8772=>array(43,48,560,604),8773=>array(43,94,559,570),8774=>array(43,24,559,570),8775=>array(43,0,559,647),8776=>array(43,149,559,470),8777=>array(43,23,559,595),8778=>array(43,94,559,572),8779=>array(43,73,559,572),8780=>array(43,94,559,570),8781=>array(42,108,559,519),8782=>array(43,33,560,593),8783=>array(43,172,560,593),8784=>array(43,172,559,637),8785=>array(43,-11,559,637),8786=>array(43,-10,559,637),8787=>array(42,-10,560,637),8788=>array(36,147,566,479),8789=>array(36,147,566,479),8790=>array(43,172,559,454),8791=>array(43,172,559,760),8792=>array(43,172,559,662),8793=>array(43,172,559,783),8794=>array(43,172,559,783),8795=>array(43,172,559,831),8796=>array(43,172,559,836),8797=>array(34,172,568,764),8798=>array(43,172,559,760),8799=>array(43,172,559,856),8800=>array(43,18,559,608),8801=>array(43,94,559,532),8802=>array(43,5,559,622),8803=>array(43,0,559,616),8804=>array(42,0,558,531),8805=>array(43,0,559,531),8806=>array(42,-84,558,578),8807=>array(42,-84,558,578),8808=>array(42,-162,558,578),8809=>array(42,-162,558,578),8813=>array(42,0,559,627),8814=>array(43,-14,559,641),8815=>array(43,-14,559,641),8816=>array(43,-119,559,629),8817=>array(43,-119,559,629),8818=>array(42,-21,558,531),8819=>array(42,-21,558,531),8820=>array(42,-119,558,629),8821=>array(42,-119,558,629),8822=>array(42,-89,558,603),8823=>array(42,-89,558,603),8824=>array(42,-195,558,711),8825=>array(42,-195,558,711),8826=>array(42,-22,558,648),8827=>array(43,-22,559,648),8828=>array(42,-123,558,711),8829=>array(42,-123,558,711),8830=>array(42,-56,558,711),8831=>array(42,-56,558,711),8832=>array(42,-81,558,707),8833=>array(42,-81,558,707),8834=>array(43,80,559,546),8835=>array(43,80,559,546),8836=>array(43,-29,559,655),8837=>array(43,-29,559,655),8838=>array(43,0,559,625),8839=>array(43,0,559,625),8840=>array(43,-104,559,729),8841=>array(43,-104,559,729),8842=>array(43,-102,559,625),8843=>array(43,-102,559,625),8847=>array(43,58,559,568),8848=>array(43,58,559,568),8849=>array(43,7,559,619),8850=>array(43,7,559,619),8853=>array(39,51,563,577),8854=>array(39,51,563,577),8855=>array(39,51,563,577),8856=>array(39,51,563,577),8857=>array(39,51,563,577),8858=>array(39,51,563,577),8859=>array(39,51,563,577),8860=>array(39,51,563,577),8861=>array(39,52,563,577),8862=>array(39,51,564,576),8863=>array(39,51,564,576),8864=>array(39,51,564,576),8865=>array(39,51,564,576),8866=>array(43,0,559,627),8867=>array(43,0,559,627),8868=>array(43,0,559,627),8869=>array(43,0,559,627),8901=>array(239,273,362,422),8902=>array(129,201,473,527),8909=>array(43,172,559,470),8922=>array(43,-218,559,760),8923=>array(43,-218,559,760),8924=>array(42,0,558,531),8925=>array(43,0,559,531),8926=>array(42,-123,558,711),8927=>array(42,-123,558,711),8928=>array(42,-182,558,770),8929=>array(42,-182,558,770),8930=>array(43,-81,559,707),8931=>array(43,-81,559,707),8932=>array(43,-95,559,619),8933=>array(43,-95,559,619),8934=>array(42,-134,558,531),8935=>array(42,-134,558,531),8936=>array(42,-213,558,711),8937=>array(42,-213,558,711),8943=>array(39,239,562,388),8960=>array(36,48,567,580),8961=>array(56,162,540,443),8962=>array(71,0,531,596),8963=>array(71,406,530,746),8964=>array(71,-132,530,209),8965=>array(71,0,530,444),8966=>array(71,0,530,566),8968=>array(139,-132,520,760),8969=>array(199,-132,463,760),8970=>array(139,-132,403,760),8971=>array(82,-132,463,760),8972=>array(268,73,585,408),8973=>array(6,73,324,408),8974=>array(268,352,585,687),8975=>array(6,352,324,687),8976=>array(43,181,559,421),8977=>array(47,126,555,634),8978=>array(3,211,599,512),8979=>array(3,211,599,512),8980=>array(90,168,512,512),8981=>array(81,112,510,539),8984=>array(35,114,567,646),8985=>array(43,181,559,421),8988=>array(146,352,463,687),8989=>array(139,352,456,687),8990=>array(146,-56,463,279),8991=>array(139,-56,456,279),8992=>array(250,-250,537,928),8993=>array(61,-237,347,942),8997=>array(51,114,551,598),8998=>array(3,145,599,536),8999=>array(61,145,541,536),9000=>array(24,212,578,517),9003=>array(3,145,599,536),9013=>array(35,-22,566,286),9015=>array(125,-100,477,829),9016=>array(3,-100,599,829),9017=>array(3,-100,599,829),9018=>array(3,-100,599,829),9019=>array(3,-100,599,829),9020=>array(3,-100,599,829),9021=>array(3,-171,599,900),9022=>array(3,57,599,658),9025=>array(3,-100,599,829),9026=>array(3,-100,599,829),9027=>array(3,-100,599,829),9028=>array(3,-100,599,829),9031=>array(3,-100,599,829),9032=>array(3,-100,599,829),9033=>array(3,-29,599,729),9035=>array(18,-171,584,900),9036=>array(3,-100,599,829),9037=>array(3,-100,599,829),9040=>array(3,-100,599,829),9042=>array(18,-171,584,900),9043=>array(3,-100,599,829),9044=>array(3,-100,599,829),9047=>array(3,-100,599,829),9048=>array(125,-100,477,729),9049=>array(3,-100,599,729),9050=>array(3,-100,599,656),9051=>array(125,-100,477,489),9052=>array(3,-100,599,658),9054=>array(3,-100,599,829),9055=>array(-10,44,612,671),9056=>array(3,-100,599,829),9059=>array(129,201,473,636),9060=>array(156,229,446,660),9061=>array(3,57,599,831),9064=>array(43,240,559,660),9065=>array(43,69,559,660),9067=>array(18,0,584,729),9068=>array(43,-14,559,742),9069=>array(43,-171,559,900),9070=>array(125,-140,477,519),9071=>array(3,-100,599,829),9072=>array(3,-100,599,829),9075=>array(151,0,476,547),9076=>array(93,-208,541,560),9077=>array(34,-14,568,547),9078=>array(3,-100,599,559),9079=>array(76,-100,526,560),9080=>array(125,-100,477,547),9081=>array(3,-100,599,547),9082=>array(34,-12,573,559),9085=>array(13,-228,589,88),9088=>array(35,-22,566,528),9089=>array(3,106,599,528),9090=>array(3,106,599,528),9091=>array(3,177,599,567),9096=>array(40,27,562,601),9097=>array(34,46,567,579),9098=>array(34,46,567,579),9099=>array(34,46,567,579),9109=>array(3,-100,599,829),9115=>array(137,-258,465,940),9116=>array(137,-252,232,942),9117=>array(137,-240,465,942),9118=>array(137,-258,465,940),9119=>array(370,-252,465,942),9120=>array(137,-240,465,942),9121=>array(137,-252,465,928),9122=>array(137,-252,232,942),9123=>array(137,-240,465,942),9124=>array(137,-252,465,928),9125=>array(370,-252,465,935),9126=>array(137,-240,465,935),9127=>array(256,-261,594,928),9128=>array(8,-252,347,940),9129=>array(256,-240,594,940),9130=>array(256,-256,347,943),9131=>array(8,-261,346,928),9132=>array(255,-252,594,940),9133=>array(8,-240,346,940),9134=>array(250,-250,347,942),9166=>array(12,92,570,558),9167=>array(3,0,599,596),9251=>array(28,-228,545,88),9472=>array(-10,242,612,326),9473=>array(-10,200,612,368),9474=>array(262,-302,340,973),9475=>array(223,-302,379,973),9476=>array(-10,242,612,326),9477=>array(-10,200,612,368),9478=>array(262,-302,340,973),9479=>array(223,-302,379,973),9480=>array(-10,242,612,326),9481=>array(-10,200,612,368),9482=>array(262,-302,340,973),9483=>array(223,-302,379,973),9484=>array(262,-302,612,326),9485=>array(262,-302,612,368),9486=>array(223,-302,612,326),9487=>array(223,-302,612,368),9488=>array(-10,-302,340,326),9489=>array(-10,-302,340,368),9490=>array(-10,-302,379,326),9491=>array(-10,-302,379,368),9492=>array(262,242,612,973),9493=>array(262,200,612,973),9494=>array(223,242,612,973),9495=>array(223,200,612,973),9496=>array(-10,242,340,973),9497=>array(-10,200,340,973),9498=>array(-10,242,379,973),9499=>array(-10,200,379,973),9500=>array(262,-302,612,973),9501=>array(262,-302,612,973),9502=>array(223,-302,612,973),9503=>array(223,-302,612,973),9504=>array(223,-302,612,973),9505=>array(223,-302,612,973),9506=>array(223,-302,612,973),9507=>array(223,-302,612,973),9508=>array(-10,-302,340,973),9509=>array(-10,-302,340,973),9510=>array(-10,-302,379,973),9511=>array(-10,-302,379,973),9512=>array(-10,-302,379,973),9513=>array(-10,-302,379,973),9514=>array(-10,-302,379,973),9515=>array(-10,-302,379,973),9516=>array(-10,-302,612,326),9517=>array(-10,-302,612,368),9518=>array(-10,-302,612,368),9519=>array(-10,-302,612,368),9520=>array(-10,-302,612,326),9521=>array(-10,-302,612,368),9522=>array(-10,-302,612,368),9523=>array(-10,-302,612,368),9524=>array(-10,242,612,973),9525=>array(-10,200,612,973),9526=>array(-10,200,612,973),9527=>array(-10,200,612,973),9528=>array(-10,242,612,973),9529=>array(-10,200,612,973),9530=>array(-10,200,612,973),9531=>array(-10,200,612,973),9532=>array(-10,-302,612,973),9533=>array(-10,-302,612,973),9534=>array(-10,-302,612,973),9535=>array(-10,-302,612,973),9536=>array(-10,-302,612,973),9537=>array(-10,-302,612,973),9538=>array(-10,-302,612,973),9539=>array(-10,-302,612,973),9540=>array(-10,-302,612,973),9541=>array(-10,-302,612,973),9542=>array(-10,-302,612,973),9543=>array(-10,-302,612,973),9544=>array(-10,-302,612,973),9545=>array(-10,-302,612,973),9546=>array(-10,-302,612,973),9547=>array(-10,-302,612,973),9548=>array(-10,242,612,326),9549=>array(-10,200,612,368),9550=>array(262,-302,340,973),9551=>array(223,-302,379,973),9552=>array(-10,158,612,410),9553=>array(184,-302,418,973),9554=>array(262,-302,612,410),9555=>array(184,-302,612,326),9556=>array(184,-302,612,410),9557=>array(-10,-302,340,410),9558=>array(-10,-302,418,326),9559=>array(-10,-302,418,410),9560=>array(262,158,612,973),9561=>array(184,242,612,973),9562=>array(184,158,612,973),9563=>array(-10,158,340,973),9564=>array(-10,242,418,973),9565=>array(-10,158,418,973),9566=>array(262,-302,612,973),9567=>array(184,-302,612,973),9568=>array(184,-302,612,973),9569=>array(-10,-302,340,973),9570=>array(-10,-302,418,973),9571=>array(-10,-302,418,973),9572=>array(-10,-302,612,410),9573=>array(-10,-302,612,326),9574=>array(-10,-302,612,410),9575=>array(-10,158,612,973),9576=>array(-10,242,612,973),9577=>array(-10,158,612,973),9578=>array(-10,-302,612,973),9579=>array(-10,-302,612,973),9580=>array(-10,-302,612,973),9581=>array(262,-302,612,326),9582=>array(-10,-302,340,326),9583=>array(-10,242,340,973),9584=>array(262,242,612,973),9585=>array(-53,-302,655,973),9586=>array(-53,-302,655,973),9587=>array(-53,-302,655,973),9588=>array(-10,242,311,326),9589=>array(262,284,340,973),9590=>array(311,242,612,326),9591=>array(262,-302,340,284),9592=>array(-10,200,311,368),9593=>array(223,284,379,973),9594=>array(311,200,612,368),9595=>array(223,-302,379,284),9596=>array(-10,200,612,368),9597=>array(223,-302,379,973),9598=>array(-10,200,612,368),9599=>array(223,-302,379,973),9600=>array(-10,260,612,770),9601=>array(-10,-250,612,-123),9602=>array(-10,-250,612,5),9603=>array(-10,-250,612,132),9604=>array(-10,-250,612,260),9605=>array(-10,-250,612,387),9606=>array(-10,-250,612,515),9607=>array(-10,-250,612,642),9608=>array(-10,-250,612,770),9609=>array(-10,-250,534,770),9610=>array(-10,-250,457,770),9611=>array(-10,-250,379,770),9612=>array(-10,-250,301,770),9613=>array(-10,-250,223,770),9614=>array(-10,-250,146,770),9615=>array(-10,-250,68,770),9616=>array(301,-250,612,770),9617=>array(-10,-250,534,770),9618=>array(-10,-250,612,770),9619=>array(-10,-250,612,770),9620=>array(-10,642,612,770),9621=>array(534,-250,611,770),9622=>array(-10,-250,301,260),9623=>array(301,-250,612,260),9624=>array(-10,260,301,770),9625=>array(-10,-250,612,770),9626=>array(-10,-250,612,770),9627=>array(-10,-250,612,770),9628=>array(-10,-250,612,770),9629=>array(301,260,612,770),9630=>array(-10,-250,612,770),9631=>array(-10,-250,612,770),9632=>array(3,-39,599,558),9633=>array(3,-39,599,558),9634=>array(3,-39,599,558),9635=>array(3,-39,599,558),9636=>array(3,-39,599,558),9637=>array(3,-39,599,558),9638=>array(3,-39,599,558),9639=>array(3,-39,599,558),9640=>array(3,-39,599,558),9641=>array(3,-39,599,558),9642=>array(107,66,495,454),9643=>array(107,66,495,454),9644=>array(3,117,599,402),9645=>array(3,117,599,402),9646=>array(158,-39,444,558),9647=>array(158,-39,444,558),9648=>array(3,117,599,402),9649=>array(3,117,599,402),9650=>array(3,-39,599,558),9651=>array(3,-39,599,558),9652=>array(107,66,495,454),9653=>array(107,66,495,454),9654=>array(3,-39,599,558),9655=>array(3,-39,599,558),9656=>array(107,66,495,454),9657=>array(107,66,495,454),9658=>array(3,66,599,454),9659=>array(3,66,599,454),9660=>array(3,-39,599,558),9661=>array(3,-39,599,558),9662=>array(107,66,495,454),9663=>array(107,66,495,454),9664=>array(3,-39,599,558),9665=>array(3,-39,599,558),9666=>array(107,66,495,454),9667=>array(107,66,495,454),9668=>array(3,66,599,454),9669=>array(3,66,599,454),9670=>array(3,-39,599,558),9671=>array(3,-39,599,558),9672=>array(3,-38,599,558),9673=>array(3,-41,599,561),9674=>array(57,-233,545,807),9675=>array(3,-41,599,561),9676=>array(3,-41,599,561),9677=>array(3,-41,599,561),9678=>array(3,-41,599,561),9679=>array(3,-41,599,561),9680=>array(3,-41,599,561),9681=>array(3,-41,599,561),9682=>array(3,-41,599,561),9683=>array(3,-41,599,561),9684=>array(3,-41,599,561),9685=>array(3,-41,599,561),9686=>array(152,-41,450,561),9687=>array(152,-41,450,561),9688=>array(-10,-10,612,770),9689=>array(-10,-250,612,770),9690=>array(-10,260,612,770),9691=>array(-10,-250,612,260),9692=>array(152,260,450,561),9693=>array(152,260,450,561),9694=>array(152,-41,450,260),9695=>array(152,-41,450,260),9696=>array(3,260,599,561),9697=>array(3,-41,599,260),9698=>array(3,-39,599,558),9699=>array(3,-39,599,558),9700=>array(3,-39,599,558),9701=>array(3,-39,599,558),9702=>array(156,227,446,516),9703=>array(3,-39,599,558),9704=>array(3,-39,599,558),9705=>array(3,-39,599,558),9706=>array(3,-39,599,558),9707=>array(3,-39,599,558),9708=>array(3,-39,599,558),9709=>array(3,-39,599,558),9710=>array(3,-39,599,558),9711=>array(-10,-54,612,573),9712=>array(3,-39,599,558),9713=>array(3,-39,599,558),9714=>array(3,-39,599,558),9715=>array(3,-39,599,558),9716=>array(3,-41,599,561),9717=>array(3,-41,599,561),9718=>array(3,-41,599,561),9719=>array(3,-41,599,561),9720=>array(3,-39,599,558),9721=>array(3,-39,599,558),9722=>array(3,-39,599,558),9723=>array(47,6,554,513),9724=>array(47,6,554,513),9725=>array(85,44,516,475),9726=>array(85,44,516,475),9727=>array(3,-39,599,558),9728=>array(17,80,585,649),9784=>array(13,82,589,642),9785=>array(16,80,586,650),9786=>array(16,80,586,650),9787=>array(16,80,586,650),9788=>array(16,80,586,650),9791=>array(92,-78,510,708),9792=>array(71,-49,531,655),9793=>array(71,-49,531,655),9794=>array(10,75,592,648),9795=>array(35,21,567,710),9796=>array(85,21,517,710),9797=>array(33,65,569,666),9798=>array(37,65,565,666),9799=>array(105,21,497,710),9824=>array(63,65,540,664),9825=>array(7,65,595,663),9826=>array(71,65,531,664),9827=>array(24,65,578,664),9828=>array(62,65,540,664),9829=>array(5,65,597,664),9830=>array(71,65,531,664),9831=>array(24,65,578,667),9833=>array(181,16,421,708),9834=>array(79,16,523,708),9835=>array(52,-79,550,706),9836=>array(8,61,594,664),9837=>array(158,18,444,710),9838=>array(211,21,391,710),9839=>array(152,21,450,710),10178=>array(43,0,559,627),10181=>array(103,-163,472,769),10182=>array(62,-163,508,769),10208=>array(57,-233,545,807),10214=>array(59,-132,544,760),10215=>array(58,-132,543,760),10216=>array(190,-132,498,759),10217=>array(104,-132,412,759),10731=>array(57,-233,545,807),10746=>array(43,55,559,572),10747=>array(43,55,559,572),10799=>array(73,85,529,541),10858=>array(43,243,559,564),10859=>array(43,65,559,564),11013=>array(41,190,561,494),11014=>array(149,82,453,602),11015=>array(149,82,453,602),11016=>array(68,109,485,526),11017=>array(117,109,534,526),11018=>array(117,109,534,526),11019=>array(68,109,485,526),11020=>array(41,190,561,494),11021=>array(149,82,453,602),11026=>array(3,-39,599,558),11027=>array(3,-39,599,558),11028=>array(3,-39,599,558),11029=>array(3,-39,599,558),11030=>array(3,-39,599,558),11031=>array(3,-39,599,558),11032=>array(3,-39,599,558),11033=>array(3,-39,599,558),11034=>array(3,-39,599,558),11364=>array(-4,-213,563,729),11373=>array(37,-14,611,742),11374=>array(-29,-208,630,729),11375=>array(89,0,655,729),11376=>array(-19,-14,555,742),11381=>array(-4,0,548,729),11382=>array(42,0,522,547),11383=>array(38,-12,566,551),11385=>array(6,-13,502,760),11386=>array(67,-14,535,560),11388=>array(185,-125,417,418),11389=>array(168,326,513,734),11390=>array(12,-242,560,742),11391=>array(-3,-242,622,729),11800=>array(73,-13,457,729),11807=>array(43,65,559,384),11810=>array(216,314,510,760),11811=>array(232,314,453,760),11812=>array(129,-132,350,314),11813=>array(72,-132,366,314),11822=>array(145,0,557,742),42760=>array(199,0,521,668),42761=>array(169,0,521,668),42762=>array(140,0,521,668),42763=>array(111,0,521,668),42764=>array(82,0,521,668),42765=>array(82,0,521,668),42766=>array(82,0,491,668),42767=>array(82,0,462,668),42768=>array(82,0,433,668),42769=>array(82,0,403,668),42770=>array(82,0,521,668),42771=>array(82,0,491,668),42772=>array(82,0,462,668),42773=>array(82,0,433,668),42774=>array(82,0,403,668),42779=>array(185,326,455,736),42780=>array(147,324,417,734),42781=>array(230,326,372,734),42782=>array(230,326,372,734),42783=>array(167,0,308,408),42786=>array(120,0,488,729),42787=>array(150,0,466,547),42788=>array(113,224,544,742),42789=>array(113,42,544,560),42790=>array(-4,-208,606,729),42791=>array(41,-208,535,760),42889=>array(168,0,392,518),42890=>array(169,161,433,380),42891=>array(237,235,422,729),42892=>array(231,458,369,729),42893=>array(82,0,604,729),42894=>array(80,-208,455,765),42896=>array(-5,-157,603,729),42897=>array(20,-140,521,560),42922=>array(41,0,704,729),63173=>array(47,-14,576,760),64257=>array(48,0,613,760),64258=>array(48,0,613,760),65533=>array(-16,-84,601,887),65535=>array(51,-177,551,705)); $cw=array(0=>602,32=>602,33=>602,34=>602,35=>602,36=>602,37=>602,38=>602,39=>602,40=>602,41=>602,42=>602,43=>602,44=>602,45=>602,46=>602,47=>602,48=>602,49=>602,50=>602,51=>602,52=>602,53=>602,54=>602,55=>602,56=>602,57=>602,58=>602,59=>602,60=>602,61=>602,62=>602,63=>602,64=>602,65=>602,66=>602,67=>602,68=>602,69=>602,70=>602,71=>602,72=>602,73=>602,74=>602,75=>602,76=>602,77=>602,78=>602,79=>602,80=>602,81=>602,82=>602,83=>602,84=>602,85=>602,86=>602,87=>602,88=>602,89=>602,90=>602,91=>602,92=>602,93=>602,94=>602,95=>602,96=>602,97=>602,98=>602,99=>602,100=>602,101=>602,102=>602,103=>602,104=>602,105=>602,106=>602,107=>602,108=>602,109=>602,110=>602,111=>602,112=>602,113=>602,114=>602,115=>602,116=>602,117=>602,118=>602,119=>602,120=>602,121=>602,122=>602,123=>602,124=>602,125=>602,126=>602,160=>602,161=>602,162=>602,163=>602,164=>602,165=>602,166=>602,167=>602,168=>602,169=>602,170=>602,171=>602,172=>602,173=>602,174=>602,175=>602,176=>602,177=>602,178=>602,179=>602,180=>602,181=>602,182=>602,183=>602,184=>602,185=>602,186=>602,187=>602,188=>602,189=>602,190=>602,191=>602,192=>602,193=>602,194=>602,195=>602,196=>602,197=>602,198=>602,199=>602,200=>602,201=>602,202=>602,203=>602,204=>602,205=>602,206=>602,207=>602,208=>602,209=>602,210=>602,211=>602,212=>602,213=>602,214=>602,215=>602,216=>602,217=>602,218=>602,219=>602,220=>602,221=>602,222=>602,223=>602,224=>602,225=>602,226=>602,227=>602,228=>602,229=>602,230=>602,231=>602,232=>602,233=>602,234=>602,235=>602,236=>602,237=>602,238=>602,239=>602,240=>602,241=>602,242=>602,243=>602,244=>602,245=>602,246=>602,247=>602,248=>602,249=>602,250=>602,251=>602,252=>602,253=>602,254=>602,255=>602,256=>602,257=>602,258=>602,259=>602,260=>602,261=>602,262=>602,263=>602,264=>602,265=>602,266=>602,267=>602,268=>602,269=>602,270=>602,271=>602,272=>602,273=>602,274=>602,275=>602,276=>602,277=>602,278=>602,279=>602,280=>602,281=>602,282=>602,283=>602,284=>602,285=>602,286=>602,287=>602,288=>602,289=>602,290=>602,291=>602,292=>602,293=>602,294=>602,295=>602,296=>602,297=>602,298=>602,299=>602,300=>602,301=>602,302=>602,303=>602,304=>602,305=>602,306=>602,307=>602,308=>602,309=>602,310=>602,311=>602,312=>602,313=>602,314=>602,315=>602,316=>602,317=>602,318=>602,319=>602,320=>602,321=>602,322=>602,323=>602,324=>602,325=>602,326=>602,327=>602,328=>602,329=>602,330=>602,331=>602,332=>602,333=>602,334=>602,335=>602,336=>602,337=>602,338=>602,339=>602,340=>602,341=>602,342=>602,343=>602,344=>602,345=>602,346=>602,347=>602,348=>602,349=>602,350=>602,351=>602,352=>602,353=>602,354=>602,355=>602,356=>602,357=>602,358=>602,359=>602,360=>602,361=>602,362=>602,363=>602,364=>602,365=>602,366=>602,367=>602,368=>602,369=>602,370=>602,371=>602,372=>602,373=>602,374=>602,375=>602,376=>602,377=>602,378=>602,379=>602,380=>602,381=>602,382=>602,383=>602,384=>602,385=>602,386=>602,387=>602,388=>602,389=>602,390=>602,391=>602,392=>602,393=>602,394=>602,395=>602,396=>602,397=>602,398=>602,399=>602,400=>602,401=>602,402=>602,403=>602,404=>602,405=>602,406=>602,407=>602,408=>602,409=>602,410=>602,411=>602,412=>602,413=>602,414=>602,415=>602,416=>602,417=>602,418=>602,419=>602,420=>602,421=>602,422=>602,423=>602,424=>602,425=>602,426=>602,427=>602,428=>602,429=>602,430=>602,431=>602,432=>602,433=>602,434=>602,435=>602,436=>602,437=>602,438=>602,439=>602,440=>602,441=>602,442=>602,443=>602,444=>602,445=>602,446=>602,447=>602,448=>602,449=>602,450=>602,451=>602,461=>602,462=>602,463=>602,464=>602,465=>602,466=>602,467=>602,468=>602,469=>602,470=>602,471=>602,472=>602,473=>602,474=>602,475=>602,476=>602,477=>602,479=>602,480=>602,481=>602,482=>602,483=>602,486=>602,487=>602,488=>602,489=>602,490=>602,491=>602,492=>602,493=>602,494=>602,495=>602,500=>602,501=>602,502=>602,504=>602,505=>602,508=>602,509=>602,510=>602,511=>602,512=>602,513=>602,514=>602,515=>602,516=>602,517=>602,518=>602,519=>602,520=>602,521=>602,522=>602,523=>602,524=>602,525=>602,526=>602,527=>602,528=>602,529=>602,530=>602,531=>602,532=>602,533=>602,534=>602,535=>602,536=>602,537=>602,538=>602,539=>602,540=>602,541=>602,542=>602,543=>602,545=>602,548=>602,549=>602,550=>602,551=>602,552=>602,553=>602,554=>602,555=>602,556=>602,557=>602,558=>602,559=>602,560=>602,561=>602,562=>602,563=>602,564=>602,565=>602,566=>602,567=>602,568=>602,569=>602,570=>602,571=>602,572=>602,573=>602,574=>602,575=>602,576=>602,577=>602,579=>602,580=>602,581=>602,588=>602,589=>602,592=>602,593=>602,594=>602,595=>602,596=>602,597=>602,598=>602,599=>602,600=>602,601=>602,602=>602,603=>602,604=>602,605=>602,606=>602,607=>602,608=>602,609=>602,610=>602,611=>602,612=>602,613=>602,614=>602,615=>602,616=>602,617=>602,618=>602,619=>602,620=>602,621=>602,622=>602,623=>602,624=>602,625=>602,626=>602,627=>602,628=>602,629=>602,630=>602,631=>602,632=>602,633=>602,634=>602,635=>602,636=>602,637=>602,638=>602,639=>602,640=>602,641=>602,642=>602,643=>602,644=>602,645=>602,646=>602,647=>602,648=>602,649=>602,650=>602,651=>602,652=>602,653=>602,654=>602,655=>602,656=>602,657=>602,658=>602,659=>602,660=>602,661=>602,662=>602,663=>602,664=>602,665=>602,666=>602,667=>602,668=>602,669=>602,670=>602,671=>602,672=>602,673=>602,674=>602,675=>602,676=>602,677=>602,678=>602,679=>602,680=>602,681=>602,682=>602,683=>602,684=>602,685=>602,686=>602,687=>602,688=>602,689=>602,690=>602,691=>602,692=>602,693=>602,694=>602,695=>602,696=>602,697=>602,699=>602,700=>602,701=>602,702=>602,703=>602,704=>602,705=>602,710=>602,711=>602,712=>602,713=>602,716=>602,717=>602,718=>602,719=>602,720=>602,721=>602,722=>602,723=>602,726=>602,727=>602,728=>602,729=>602,730=>602,731=>602,732=>602,733=>602,734=>602,736=>602,737=>602,738=>602,739=>602,740=>602,741=>602,742=>602,743=>602,744=>602,745=>602,750=>602,755=>602,768=>602,769=>602,770=>602,771=>602,772=>602,773=>602,774=>602,775=>602,776=>602,777=>602,778=>602,779=>602,780=>602,781=>602,782=>602,783=>602,784=>602,785=>602,786=>602,787=>602,788=>602,789=>602,790=>602,791=>602,792=>602,793=>602,794=>602,795=>602,796=>602,797=>602,798=>602,799=>602,800=>602,801=>602,802=>602,803=>602,804=>602,805=>602,806=>602,807=>602,808=>602,809=>602,810=>602,811=>602,812=>602,813=>602,814=>602,815=>602,816=>602,817=>602,818=>602,819=>602,820=>602,821=>602,822=>602,823=>602,824=>602,825=>602,826=>602,827=>602,828=>602,829=>602,830=>602,831=>602,835=>602,856=>602,865=>602,884=>602,885=>602,890=>602,894=>602,900=>602,901=>602,902=>602,903=>602,904=>602,905=>602,906=>602,908=>602,910=>602,911=>602,912=>602,913=>602,914=>602,915=>602,916=>602,917=>602,918=>602,919=>602,920=>602,921=>602,922=>602,923=>602,924=>602,925=>602,926=>602,927=>602,928=>602,929=>602,931=>602,932=>602,933=>602,934=>602,935=>602,936=>602,937=>602,938=>602,939=>602,940=>602,941=>602,942=>602,943=>602,944=>602,945=>602,946=>602,947=>602,948=>602,949=>602,950=>602,951=>602,952=>602,953=>602,954=>602,955=>602,956=>602,957=>602,958=>602,959=>602,960=>602,961=>602,962=>602,963=>602,964=>602,965=>602,966=>602,967=>602,968=>602,969=>602,970=>602,971=>602,972=>602,973=>602,974=>602,976=>602,977=>602,978=>602,979=>602,980=>602,981=>602,982=>602,983=>602,984=>602,985=>602,986=>602,987=>602,988=>602,989=>602,990=>602,991=>602,992=>602,993=>602,1008=>602,1009=>602,1010=>602,1011=>602,1012=>602,1013=>602,1014=>602,1015=>602,1016=>602,1017=>602,1018=>602,1019=>602,1020=>602,1021=>602,1022=>602,1023=>602,1024=>602,1025=>602,1026=>602,1027=>602,1028=>602,1029=>602,1030=>602,1031=>602,1032=>602,1033=>602,1034=>602,1035=>602,1036=>602,1037=>602,1038=>602,1039=>602,1040=>602,1041=>602,1042=>602,1043=>602,1044=>602,1045=>602,1046=>602,1047=>602,1048=>602,1049=>602,1050=>602,1051=>602,1052=>602,1053=>602,1054=>602,1055=>602,1056=>602,1057=>602,1058=>602,1059=>602,1060=>602,1061=>602,1062=>602,1063=>602,1064=>602,1065=>602,1066=>602,1067=>602,1068=>602,1069=>602,1070=>602,1071=>602,1072=>602,1073=>602,1074=>602,1075=>602,1076=>602,1077=>602,1078=>602,1079=>602,1080=>602,1081=>602,1082=>602,1083=>602,1084=>602,1085=>602,1086=>602,1087=>602,1088=>602,1089=>602,1090=>602,1091=>602,1092=>602,1093=>602,1094=>602,1095=>602,1096=>602,1097=>602,1098=>602,1099=>602,1100=>602,1101=>602,1102=>602,1103=>602,1104=>602,1105=>602,1106=>602,1107=>602,1108=>602,1109=>602,1110=>602,1111=>602,1112=>602,1113=>602,1114=>602,1115=>602,1116=>602,1117=>602,1118=>602,1119=>602,1122=>602,1123=>602,1138=>602,1139=>602,1168=>602,1169=>602,1170=>602,1171=>602,1172=>602,1173=>602,1174=>602,1175=>602,1176=>602,1177=>602,1178=>602,1179=>602,1186=>602,1187=>602,1188=>602,1189=>602,1194=>602,1195=>602,1196=>602,1197=>602,1198=>602,1199=>602,1200=>602,1201=>602,1202=>602,1203=>602,1210=>602,1211=>602,1216=>602,1217=>602,1218=>602,1219=>602,1220=>602,1223=>602,1224=>602,1227=>602,1228=>602,1231=>602,1232=>602,1233=>602,1234=>602,1235=>602,1236=>602,1237=>602,1238=>602,1239=>602,1240=>602,1241=>602,1242=>602,1243=>602,1244=>602,1245=>602,1246=>602,1247=>602,1248=>602,1249=>602,1250=>602,1251=>602,1252=>602,1253=>602,1254=>602,1255=>602,1256=>602,1257=>602,1258=>602,1259=>602,1260=>602,1261=>602,1262=>602,1263=>602,1264=>602,1265=>602,1266=>602,1267=>602,1268=>602,1269=>602,1270=>602,1271=>602,1272=>602,1273=>602,1296=>602,1297=>602,1306=>602,1307=>602,1308=>602,1309=>602,1329=>602,1330=>602,1331=>602,1332=>602,1333=>602,1334=>602,1335=>602,1336=>602,1337=>602,1338=>602,1339=>602,1340=>602,1341=>602,1342=>602,1343=>602,1344=>602,1345=>602,1346=>602,1347=>602,1348=>602,1349=>602,1350=>602,1351=>602,1352=>602,1353=>602,1354=>602,1355=>602,1356=>602,1357=>602,1358=>602,1359=>602,1360=>602,1361=>602,1362=>602,1363=>602,1364=>602,1365=>602,1366=>602,1369=>602,1370=>602,1371=>602,1372=>602,1373=>602,1374=>602,1375=>602,1377=>602,1378=>602,1379=>602,1380=>602,1381=>602,1382=>602,1383=>602,1384=>602,1385=>602,1386=>602,1387=>602,1388=>602,1389=>602,1390=>602,1391=>602,1392=>602,1393=>602,1394=>602,1395=>602,1396=>602,1397=>602,1398=>602,1399=>602,1400=>602,1401=>602,1402=>602,1403=>602,1404=>602,1405=>602,1406=>602,1407=>602,1408=>602,1409=>602,1410=>602,1411=>602,1412=>602,1413=>602,1414=>602,1415=>602,1417=>602,1418=>602,3713=>602,3714=>602,3716=>602,3719=>602,3720=>602,3722=>602,3725=>602,3732=>602,3733=>602,3734=>602,3735=>602,3737=>602,3738=>602,3739=>602,3740=>602,3741=>602,3742=>602,3743=>602,3745=>602,3746=>602,3747=>602,3749=>602,3751=>602,3754=>602,3755=>602,3757=>602,3758=>602,3759=>602,3760=>602,3761=>602,3762=>602,3763=>602,3764=>602,3765=>602,3766=>602,3767=>602,3768=>602,3769=>602,3771=>602,3772=>602,3784=>602,3785=>602,3786=>602,3787=>602,3788=>602,3789=>602,4304=>602,4305=>602,4306=>602,4307=>602,4308=>602,4309=>602,4310=>602,4311=>602,4312=>602,4313=>602,4314=>602,4315=>602,4316=>602,4317=>602,4318=>602,4319=>602,4320=>602,4321=>602,4322=>602,4323=>602,4324=>602,4325=>602,4326=>602,4327=>602,4328=>602,4329=>602,4330=>602,4331=>602,4332=>602,4333=>602,4334=>602,4335=>602,4336=>602,4337=>602,4338=>602,4339=>602,4340=>602,4341=>602,4342=>602,4343=>602,4344=>602,4345=>602,4346=>602,4347=>602,4348=>602,7426=>602,7432=>602,7433=>602,7444=>602,7446=>602,7447=>602,7453=>602,7454=>602,7455=>602,7468=>602,7469=>602,7470=>602,7472=>602,7473=>602,7474=>602,7475=>602,7476=>602,7477=>602,7478=>602,7479=>602,7480=>602,7481=>602,7482=>602,7483=>602,7484=>602,7485=>602,7486=>602,7487=>602,7488=>602,7489=>602,7490=>602,7491=>602,7492=>602,7493=>602,7494=>602,7495=>602,7496=>602,7497=>602,7498=>602,7499=>602,7500=>602,7501=>602,7502=>602,7503=>602,7504=>602,7505=>602,7506=>602,7507=>602,7508=>602,7509=>602,7510=>602,7511=>602,7512=>602,7513=>602,7514=>602,7515=>602,7522=>602,7523=>602,7524=>602,7525=>602,7543=>602,7544=>602,7547=>602,7557=>602,7579=>602,7580=>602,7581=>602,7582=>602,7583=>602,7584=>602,7585=>602,7586=>602,7587=>602,7588=>602,7589=>602,7590=>602,7591=>602,7592=>602,7593=>602,7594=>602,7595=>602,7596=>602,7597=>602,7598=>602,7599=>602,7600=>602,7601=>602,7602=>602,7603=>602,7604=>602,7605=>602,7606=>602,7607=>602,7609=>602,7610=>602,7611=>602,7612=>602,7613=>602,7614=>602,7615=>602,7680=>602,7681=>602,7682=>602,7683=>602,7684=>602,7685=>602,7686=>602,7687=>602,7688=>602,7689=>602,7690=>602,7691=>602,7692=>602,7693=>602,7694=>602,7695=>602,7696=>602,7697=>602,7698=>602,7699=>602,7704=>602,7705=>602,7706=>602,7707=>602,7708=>602,7709=>602,7710=>602,7711=>602,7712=>602,7713=>602,7714=>602,7715=>602,7716=>602,7717=>602,7718=>602,7719=>602,7720=>602,7721=>602,7722=>602,7723=>602,7724=>602,7725=>602,7728=>602,7729=>602,7730=>602,7731=>602,7732=>602,7733=>602,7734=>602,7735=>602,7736=>602,7737=>602,7738=>602,7739=>602,7740=>602,7741=>602,7742=>602,7743=>602,7744=>602,7745=>602,7746=>602,7747=>602,7748=>602,7749=>602,7750=>602,7751=>602,7752=>602,7753=>602,7754=>602,7755=>602,7756=>602,7757=>602,7764=>602,7765=>602,7766=>602,7767=>602,7768=>602,7769=>602,7770=>602,7771=>602,7772=>602,7773=>602,7774=>602,7775=>602,7776=>602,7777=>602,7778=>602,7779=>602,7784=>602,7785=>602,7786=>602,7787=>602,7788=>602,7789=>602,7790=>602,7791=>602,7792=>602,7793=>602,7794=>602,7795=>602,7796=>602,7797=>602,7798=>602,7799=>602,7800=>602,7801=>602,7804=>602,7805=>602,7806=>602,7807=>602,7808=>602,7809=>602,7810=>602,7811=>602,7812=>602,7813=>602,7814=>602,7815=>602,7816=>602,7817=>602,7818=>602,7819=>602,7820=>602,7821=>602,7822=>602,7823=>602,7824=>602,7825=>602,7826=>602,7827=>602,7828=>602,7829=>602,7830=>602,7831=>602,7832=>602,7833=>602,7835=>602,7839=>602,7840=>602,7841=>602,7852=>602,7853=>602,7856=>602,7857=>602,7862=>602,7863=>602,7864=>602,7865=>602,7868=>602,7869=>602,7878=>602,7879=>602,7882=>602,7883=>602,7884=>602,7885=>602,7896=>602,7897=>602,7898=>602,7899=>602,7900=>602,7901=>602,7904=>602,7905=>602,7906=>602,7907=>602,7908=>602,7909=>602,7912=>602,7913=>602,7914=>602,7915=>602,7918=>602,7919=>602,7920=>602,7921=>602,7922=>602,7923=>602,7924=>602,7925=>602,7928=>602,7929=>602,7936=>602,7937=>602,7938=>602,7939=>602,7940=>602,7941=>602,7942=>602,7943=>602,7944=>602,7945=>602,7946=>602,7947=>602,7948=>602,7949=>602,7950=>602,7951=>602,7952=>602,7953=>602,7954=>602,7955=>602,7956=>602,7957=>602,7960=>602,7961=>602,7962=>602,7963=>602,7964=>602,7965=>602,7968=>602,7969=>602,7970=>602,7971=>602,7972=>602,7973=>602,7974=>602,7975=>602,7976=>602,7977=>602,7978=>602,7979=>602,7980=>602,7981=>602,7982=>602,7983=>602,7984=>602,7985=>602,7986=>602,7987=>602,7988=>602,7989=>602,7990=>602,7991=>602,7992=>602,7993=>602,7994=>602,7995=>602,7996=>602,7997=>602,7998=>602,7999=>602,8000=>602,8001=>602,8002=>602,8003=>602,8004=>602,8005=>602,8008=>602,8009=>602,8010=>602,8011=>602,8012=>602,8013=>602,8016=>602,8017=>602,8018=>602,8019=>602,8020=>602,8021=>602,8022=>602,8023=>602,8025=>602,8027=>602,8029=>602,8031=>602,8032=>602,8033=>602,8034=>602,8035=>602,8036=>602,8037=>602,8038=>602,8039=>602,8040=>602,8041=>602,8042=>602,8043=>602,8044=>602,8045=>602,8046=>602,8047=>602,8048=>602,8049=>602,8050=>602,8051=>602,8052=>602,8053=>602,8054=>602,8055=>602,8056=>602,8057=>602,8058=>602,8059=>602,8060=>602,8061=>602,8064=>602,8065=>602,8066=>602,8067=>602,8068=>602,8069=>602,8070=>602,8071=>602,8072=>602,8073=>602,8074=>602,8075=>602,8076=>602,8077=>602,8078=>602,8079=>602,8080=>602,8081=>602,8082=>602,8083=>602,8084=>602,8085=>602,8086=>602,8087=>602,8088=>602,8089=>602,8090=>602,8091=>602,8092=>602,8093=>602,8094=>602,8095=>602,8096=>602,8097=>602,8098=>602,8099=>602,8100=>602,8101=>602,8102=>602,8103=>602,8104=>602,8105=>602,8106=>602,8107=>602,8108=>602,8109=>602,8110=>602,8111=>602,8112=>602,8113=>602,8114=>602,8115=>602,8116=>602,8118=>602,8119=>602,8120=>602,8121=>602,8122=>602,8123=>602,8124=>602,8125=>602,8126=>602,8127=>602,8128=>602,8129=>602,8130=>602,8131=>602,8132=>602,8134=>602,8135=>602,8136=>602,8137=>602,8138=>602,8139=>602,8140=>602,8141=>602,8142=>602,8143=>602,8144=>602,8145=>602,8146=>602,8147=>602,8150=>602,8151=>602,8152=>602,8153=>602,8154=>602,8155=>602,8157=>602,8158=>602,8159=>602,8160=>602,8161=>602,8162=>602,8163=>602,8164=>602,8165=>602,8166=>602,8167=>602,8168=>602,8169=>602,8170=>602,8171=>602,8172=>602,8173=>602,8174=>602,8175=>602,8178=>602,8179=>602,8180=>602,8182=>602,8183=>602,8184=>602,8185=>602,8186=>602,8187=>602,8188=>602,8189=>602,8190=>602,8192=>602,8193=>602,8194=>602,8195=>602,8196=>602,8197=>602,8198=>602,8199=>602,8200=>602,8201=>602,8202=>602,8208=>602,8209=>602,8210=>602,8211=>602,8212=>602,8213=>602,8214=>602,8215=>602,8216=>602,8217=>602,8218=>602,8219=>602,8220=>602,8221=>602,8222=>602,8223=>602,8224=>602,8225=>602,8226=>602,8227=>602,8230=>602,8239=>602,8240=>602,8241=>602,8242=>602,8243=>602,8244=>602,8245=>602,8246=>602,8247=>602,8249=>602,8250=>602,8252=>602,8253=>602,8254=>602,8261=>602,8262=>602,8263=>602,8264=>602,8265=>602,8267=>602,8287=>602,8304=>602,8305=>602,8308=>602,8309=>602,8310=>602,8311=>602,8312=>602,8313=>602,8314=>602,8315=>602,8316=>602,8317=>602,8318=>602,8319=>602,8320=>602,8321=>602,8322=>602,8323=>602,8324=>602,8325=>602,8326=>602,8327=>602,8328=>602,8329=>602,8330=>602,8331=>602,8332=>602,8333=>602,8334=>602,8336=>602,8337=>602,8338=>602,8339=>602,8340=>602,8341=>602,8342=>602,8343=>602,8344=>602,8345=>602,8346=>602,8347=>602,8348=>602,8352=>602,8353=>602,8354=>602,8355=>602,8356=>602,8357=>602,8358=>602,8359=>602,8360=>602,8361=>602,8362=>602,8363=>602,8364=>602,8365=>602,8366=>602,8367=>602,8368=>602,8369=>602,8370=>602,8371=>602,8372=>602,8373=>602,8376=>602,8377=>602,8450=>602,8453=>602,8461=>602,8462=>602,8463=>602,8469=>602,8470=>602,8471=>602,8473=>602,8474=>602,8477=>602,8482=>602,8484=>602,8486=>602,8490=>602,8491=>602,8494=>602,8520=>602,8531=>602,8532=>602,8533=>602,8534=>602,8535=>602,8536=>602,8537=>602,8538=>602,8539=>602,8540=>602,8541=>602,8542=>602,8543=>602,8592=>602,8593=>602,8594=>602,8595=>602,8596=>602,8597=>602,8598=>602,8599=>602,8600=>602,8601=>602,8602=>602,8603=>602,8604=>602,8605=>602,8606=>602,8607=>602,8608=>602,8609=>602,8610=>602,8611=>602,8612=>602,8613=>602,8614=>602,8615=>602,8616=>602,8617=>602,8618=>602,8619=>602,8620=>602,8621=>602,8622=>602,8623=>602,8624=>602,8625=>602,8626=>602,8627=>602,8628=>602,8629=>602,8630=>602,8631=>602,8632=>602,8633=>602,8634=>602,8635=>602,8636=>602,8637=>602,8638=>602,8639=>602,8640=>602,8641=>602,8642=>602,8643=>602,8644=>602,8645=>602,8646=>602,8647=>602,8648=>602,8649=>602,8650=>602,8651=>602,8652=>602,8653=>602,8654=>602,8655=>602,8656=>602,8657=>602,8658=>602,8659=>602,8660=>602,8661=>602,8662=>602,8663=>602,8664=>602,8665=>602,8666=>602,8667=>602,8668=>602,8669=>602,8670=>602,8671=>602,8672=>602,8673=>602,8674=>602,8675=>602,8676=>602,8677=>602,8678=>602,8679=>602,8680=>602,8681=>602,8682=>602,8683=>602,8684=>602,8685=>602,8686=>602,8687=>602,8688=>602,8689=>602,8690=>602,8691=>602,8692=>602,8693=>602,8694=>602,8695=>602,8696=>602,8697=>602,8698=>602,8699=>602,8700=>602,8701=>602,8702=>602,8703=>602,8704=>602,8705=>602,8706=>602,8707=>602,8708=>602,8709=>602,8710=>602,8711=>602,8712=>602,8713=>602,8714=>602,8715=>602,8716=>602,8717=>602,8719=>602,8721=>602,8722=>602,8723=>602,8725=>602,8727=>602,8728=>602,8729=>602,8730=>602,8731=>602,8732=>602,8733=>602,8734=>602,8735=>602,8736=>602,8743=>602,8744=>602,8745=>602,8746=>602,8747=>602,8748=>602,8749=>602,8756=>602,8757=>602,8758=>602,8759=>602,8760=>602,8761=>602,8762=>602,8763=>602,8764=>602,8765=>602,8769=>602,8770=>602,8771=>602,8772=>602,8773=>602,8774=>602,8775=>602,8776=>602,8777=>602,8778=>602,8779=>602,8780=>602,8781=>602,8782=>602,8783=>602,8784=>602,8785=>602,8786=>602,8787=>602,8788=>602,8789=>602,8790=>602,8791=>602,8792=>602,8793=>602,8794=>602,8795=>602,8796=>602,8797=>602,8798=>602,8799=>602,8800=>602,8801=>602,8802=>602,8803=>602,8804=>602,8805=>602,8806=>602,8807=>602,8808=>602,8809=>602,8813=>602,8814=>602,8815=>602,8816=>602,8817=>602,8818=>602,8819=>602,8820=>602,8821=>602,8822=>602,8823=>602,8824=>602,8825=>602,8826=>602,8827=>602,8828=>602,8829=>602,8830=>602,8831=>602,8832=>602,8833=>602,8834=>602,8835=>602,8836=>602,8837=>602,8838=>602,8839=>602,8840=>602,8841=>602,8842=>602,8843=>602,8847=>602,8848=>602,8849=>602,8850=>602,8853=>602,8854=>602,8855=>602,8856=>602,8857=>602,8858=>602,8859=>602,8860=>602,8861=>602,8862=>602,8863=>602,8864=>602,8865=>602,8866=>602,8867=>602,8868=>602,8869=>602,8901=>602,8902=>602,8909=>602,8922=>602,8923=>602,8924=>602,8925=>602,8926=>602,8927=>602,8928=>602,8929=>602,8930=>602,8931=>602,8932=>602,8933=>602,8934=>602,8935=>602,8936=>602,8937=>602,8943=>602,8960=>602,8961=>602,8962=>602,8963=>602,8964=>602,8965=>602,8966=>602,8968=>602,8969=>602,8970=>602,8971=>602,8972=>602,8973=>602,8974=>602,8975=>602,8976=>602,8977=>602,8978=>602,8979=>602,8980=>602,8981=>602,8984=>602,8985=>602,8988=>602,8989=>602,8990=>602,8991=>602,8992=>602,8993=>602,8997=>602,8998=>602,8999=>602,9000=>602,9003=>602,9013=>602,9015=>602,9016=>602,9017=>602,9018=>602,9019=>602,9020=>602,9021=>602,9022=>602,9025=>602,9026=>602,9027=>602,9028=>602,9031=>602,9032=>602,9033=>602,9035=>602,9036=>602,9037=>602,9040=>602,9042=>602,9043=>602,9044=>602,9047=>602,9048=>602,9049=>602,9050=>602,9051=>602,9052=>602,9054=>602,9055=>602,9056=>602,9059=>602,9060=>602,9061=>602,9064=>602,9065=>602,9067=>602,9068=>602,9069=>602,9070=>602,9071=>602,9072=>602,9075=>602,9076=>602,9077=>602,9078=>602,9079=>602,9080=>602,9081=>602,9082=>602,9085=>602,9088=>602,9089=>602,9090=>602,9091=>602,9096=>602,9097=>602,9098=>602,9099=>602,9109=>602,9115=>602,9116=>602,9117=>602,9118=>602,9119=>602,9120=>602,9121=>602,9122=>602,9123=>602,9124=>602,9125=>602,9126=>602,9127=>602,9128=>602,9129=>602,9130=>602,9131=>602,9132=>602,9133=>602,9134=>602,9166=>602,9167=>602,9251=>602,9472=>602,9473=>602,9474=>602,9475=>602,9476=>602,9477=>602,9478=>602,9479=>602,9480=>602,9481=>602,9482=>602,9483=>602,9484=>602,9485=>602,9486=>602,9487=>602,9488=>602,9489=>602,9490=>602,9491=>602,9492=>602,9493=>602,9494=>602,9495=>602,9496=>602,9497=>602,9498=>602,9499=>602,9500=>602,9501=>602,9502=>602,9503=>602,9504=>602,9505=>602,9506=>602,9507=>602,9508=>602,9509=>602,9510=>602,9511=>602,9512=>602,9513=>602,9514=>602,9515=>602,9516=>602,9517=>602,9518=>602,9519=>602,9520=>602,9521=>602,9522=>602,9523=>602,9524=>602,9525=>602,9526=>602,9527=>602,9528=>602,9529=>602,9530=>602,9531=>602,9532=>602,9533=>602,9534=>602,9535=>602,9536=>602,9537=>602,9538=>602,9539=>602,9540=>602,9541=>602,9542=>602,9543=>602,9544=>602,9545=>602,9546=>602,9547=>602,9548=>602,9549=>602,9550=>602,9551=>602,9552=>602,9553=>602,9554=>602,9555=>602,9556=>602,9557=>602,9558=>602,9559=>602,9560=>602,9561=>602,9562=>602,9563=>602,9564=>602,9565=>602,9566=>602,9567=>602,9568=>602,9569=>602,9570=>602,9571=>602,9572=>602,9573=>602,9574=>602,9575=>602,9576=>602,9577=>602,9578=>602,9579=>602,9580=>602,9581=>602,9582=>602,9583=>602,9584=>602,9585=>602,9586=>602,9587=>602,9588=>602,9589=>602,9590=>602,9591=>602,9592=>602,9593=>602,9594=>602,9595=>602,9596=>602,9597=>602,9598=>602,9599=>602,9600=>602,9601=>602,9602=>602,9603=>602,9604=>602,9605=>602,9606=>602,9607=>602,9608=>602,9609=>602,9610=>602,9611=>602,9612=>602,9613=>602,9614=>602,9615=>602,9616=>602,9617=>602,9618=>602,9619=>602,9620=>602,9621=>602,9622=>602,9623=>602,9624=>602,9625=>602,9626=>602,9627=>602,9628=>602,9629=>602,9630=>602,9631=>602,9632=>602,9633=>602,9634=>602,9635=>602,9636=>602,9637=>602,9638=>602,9639=>602,9640=>602,9641=>602,9642=>602,9643=>602,9644=>602,9645=>602,9646=>602,9647=>602,9648=>602,9649=>602,9650=>602,9651=>602,9652=>602,9653=>602,9654=>602,9655=>602,9656=>602,9657=>602,9658=>602,9659=>602,9660=>602,9661=>602,9662=>602,9663=>602,9664=>602,9665=>602,9666=>602,9667=>602,9668=>602,9669=>602,9670=>602,9671=>602,9672=>602,9673=>602,9674=>602,9675=>602,9676=>602,9677=>602,9678=>602,9679=>602,9680=>602,9681=>602,9682=>602,9683=>602,9684=>602,9685=>602,9686=>602,9687=>602,9688=>602,9689=>602,9690=>602,9691=>602,9692=>602,9693=>602,9694=>602,9695=>602,9696=>602,9697=>602,9698=>602,9699=>602,9700=>602,9701=>602,9702=>602,9703=>602,9704=>602,9705=>602,9706=>602,9707=>602,9708=>602,9709=>602,9710=>602,9711=>602,9712=>602,9713=>602,9714=>602,9715=>602,9716=>602,9717=>602,9718=>602,9719=>602,9720=>602,9721=>602,9722=>602,9723=>602,9724=>602,9725=>602,9726=>602,9727=>602,9728=>602,9784=>602,9785=>602,9786=>602,9787=>602,9788=>602,9791=>602,9792=>602,9793=>602,9794=>602,9795=>602,9796=>602,9797=>602,9798=>602,9799=>602,9824=>602,9825=>602,9826=>602,9827=>602,9828=>602,9829=>602,9830=>602,9831=>602,9833=>602,9834=>602,9835=>602,9836=>602,9837=>602,9838=>602,9839=>602,10178=>602,10181=>602,10182=>602,10208=>602,10214=>602,10215=>602,10216=>602,10217=>602,10731=>602,10746=>602,10747=>602,10799=>602,10858=>602,10859=>602,11013=>602,11014=>602,11015=>602,11016=>602,11017=>602,11018=>602,11019=>602,11020=>602,11021=>602,11026=>602,11027=>602,11028=>602,11029=>602,11030=>602,11031=>602,11032=>602,11033=>602,11034=>602,11364=>602,11373=>602,11374=>602,11375=>602,11376=>602,11381=>602,11382=>602,11383=>602,11385=>602,11386=>602,11388=>602,11389=>602,11390=>602,11391=>602,11800=>602,11807=>602,11810=>602,11811=>602,11812=>602,11813=>602,11822=>602,42760=>602,42761=>602,42762=>602,42763=>602,42764=>602,42765=>602,42766=>602,42767=>602,42768=>602,42769=>602,42770=>602,42771=>602,42772=>602,42773=>602,42774=>602,42779=>602,42780=>602,42781=>602,42782=>602,42783=>602,42786=>602,42787=>602,42788=>602,42789=>602,42790=>602,42791=>602,42889=>602,42890=>602,42891=>602,42892=>602,42893=>602,42894=>602,42896=>602,42897=>602,42922=>602,63173=>602,64257=>602,64258=>602,65529=>602,65530=>602,65531=>602,65532=>602,65533=>602,65535=>602); // --- EOF ---
JuanEstebanP/ProComite2
TCPDF/fonts/dejavusansmonoi.php
PHP
mit
97,879
(function(){function t(t,n){var e=t.split("."),r=H;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case q:case J:case L:case O:case k:case Y:case K:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function p(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=c(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=c(n,a),l?(l=c(t,a))?p(l,i):b(t,a,i.clone()):b(t,a,i)}}}function c(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=c(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function m(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function b(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/* Protocol Buffer 2 Copyright 2008 Google Inc. All other code copyright its respective owners. Copyright (C) 2010 The Libphonenumber Authors 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. */ function v(){f.call(this)}function d(){f.call(this)}function _(){f.call(this)}function S(){}function w(){}function A(){}/* Copyright (C) 2010 The Libphonenumber Authors. 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. */ function x(){this.a={}}function N(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new A).a(_.i(),e),t.a[n]=e}return e}function B(t){return t=W[t],null==t?"ZZ":t[0]}function j(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=x.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=C(this,this.C)}function C(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=N(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=N(t.F,B(e)),null!=e?e:at}function M(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function E(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==m(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,m(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function R(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(T(t)){if($(t))return D(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=P(t))return t.b.a(" "),D(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!T(t))return t.l=P(t),G(t);t.w=!0;default:return t.w?($(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=U(t,n),i=I(t),0<i.length?i:(E(t,t.a.toString()),M(t)?V(t):t.j?F(t,e):t.h.toString())):G(t)}}function D(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",G(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),F(t,n)}return""}function F(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function G(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<m(t.g,20)?c(t.g,20)||[]:c(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return E(t,n),n=I(t),0<n.length?n:M(t)?V(t):t.h.toString()}return F(t,n)}function V(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=U(t,n.charAt(i));return t.j?F(t,r):t.h.toString()}return t.b.toString()}function P(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function T(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function $(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in W){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=B(n),"001"==i?t.g=N(t.F,""+n):i!=t.C&&(t.g=C(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function U(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var H=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var K=1,Y=2,q=3,J=4,L=6,O=16,k=18;f.prototype.set=function(t,n){b(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),p(t,this)),t};var Z;n(v,f);var z;n(d,f);var X;n(_,f),v.prototype.i=function(){return Z||(Z=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),Z},v.ctor=v,v.ctor.i=v.prototype.i,d.prototype.i=function(){return z||(z=y(d,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},d.ctor=d,d.ctor.i=d.prototype.i,_.prototype.i=function(){return X||(X=y(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:d},2:{name:"fixed_line",c:11,type:d},3:{name:"mobile",c:11,type:d},4:{name:"toll_free",c:11,type:d},5:{name:"premium_rate",c:11,type:d},6:{name:"shared_cost",c:11,type:d},7:{name:"personal_number",c:11,type:d},8:{name:"voip",c:11,type:d},21:{name:"pager",c:11,type:d},25:{name:"uan",c:11,type:d},27:{name:"emergency",c:11,type:d},28:{name:"voicemail",c:11,type:d},24:{name:"no_international_dialling",c:11,type:d},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),X},_.ctor=_,_.ctor.i=_.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&Q.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||Q.test(n)))return Number(n);return n};var Q=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(A,w),A.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},A.prototype.a=function(t,n){return A.M.a.call(this,t,n)};/* Copyright (C) 2010 The Libphonenumber Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var W={1:"US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" ")},tt={BM:[null,[null,null,"[4589]\\d{9}","\\d{7}(?:\\d{3})?"],[null,null,"441(?:2(?:02|23|61|[3479]\\d)|[46]\\d{2}|5(?:4\\d|60|89)|824)\\d{4}","\\d{7}(?:\\d{3})?",null,null,"4412345678"],[null,null,"441(?:[37]\\d|5[0-39])\\d{5}","\\d{10}",null,null,"4413701234"],[null,null,"8(?:00|44|55|66|77|88)[2-9]\\d{6}","\\d{10}",null,null,"8002123456"],[null,null,"900[2-9]\\d{6}","\\d{10}",null,null,"9002123456"],[null,null,"NA","NA"],[null,null,"5(?:00|33|44|66|77|88)[2-9]\\d{6}","\\d{10}",null,null,"5002345678"],[null,null,"NA","NA"],"BM",1,"011","1",null,null,"1",null,null,null,null,null,[null,null,"NA","NA"],null,"441",[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};x.b=function(){return x.a?x.a:x.a=new x};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new _;b(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;j.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=C(this,this.C))},j.prototype.L=function(t){return this.B=R(this,t)},t("Cleave.AsYouTypeFormatter",j),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",j.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",j.prototype.K)}).call(window);
ahocevar/cdnjs
ajax/libs/cleave.js/0.6.3/addons/cleave-phone.bm.js
JavaScript
mit
13,317
/** * Copyright (c) 2011, salesforce.com, inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, are permitted provided * that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list of conditions and the * following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and * the following disclaimer in the documentation and/or other materials provided with the distribution. * * Neither the name of salesforce.com, inc. nor the names of its contributors may be used to endorse or * promote products derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ (function (global) { "use strict"; if (global.Sfdc && global.Sfdc.canvas) { return; } // cached references //------------------ var oproto = Object.prototype, aproto = Array.prototype, doc = global.document, /** * @class Canvas * @exports $ as Sfdc.canvas */ // $ functions // The canvas global object is made available in the global scope. The reveal to the global scope is done later. $ = { // type utilities //--------------- /** * @description Checks whether an object contains an uninherited property. * @param {Object} obj The object to check * @param {String} prop The property name to check * @returns {Boolean} <code>true</code> if the property exists for the object itself and is not inherited, otherwise <code>false</code> */ hasOwn: function (obj, prop) { return oproto.hasOwnProperty.call(obj, prop); }, /** * @description Checks whether an object is currently undefined. * @param {Object} value The object to check * @returns {Boolean} <code>true</code> if the object or value is of type undefined, otherwise <code>false</code> */ isUndefined: function (value) { var undef; return value === undef; }, /** * @description Checks whether object is undefined, null, or an empty string. * @param {Object} value The object to check * @returns {Boolean} <code>true</code> if the object or value is of type undefined, otherwise <code>false</code> */ isNil: function (value) { return $.isUndefined(value) || value === null || value === ""; }, /** * @description Checks whether a value is a number. This function doesn't resolve strings to numbers. * @param {Object} value Object to check * @returns {Boolean} <code>true</code> if the object or value is a number, otherwise <code>false</code> */ isNumber: function (value) { return !!(value === 0 || (value && value.toExponential && value.toFixed)); }, /** * @description Checks whether an object is a function. * @param {Object} value Object to check * @returns {Boolean} <code>true</code> if the object or value is a function, otherwise <code>false</code> */ isFunction: function (value) { //return typeof value === "function"; return !!(value && value.constructor && value.call && value.apply); }, /** * @description Checks whether an object is an array. * @param {Object} value The object to check * @function * @returns {Boolean} <code>true</code> if the object or value is of type array, otherwise <code>false</code> */ isArray: Array.isArray || function (value) { return oproto.toString.call(value) === '[object Array]'; }, /** * @description Checks whether an object is the argument set for a function * @param {Object} value The object to check * @returns {Boolean} <code>true</code> if the object or value is the argument set for a function, otherwise <code>false</code> */ isArguments: function (value) { return !!(value && $.hasOwn(value, 'callee')); }, /** * @description Checks whether the value is of type 'object' and is not null. * @param {Object} value The object to check * @returns {Boolean} <code>true</code> if the object or value is of type Object, otherwise <code>false</code> */ isObject: function (value) { return value !== null && typeof value === 'object'; }, // common functions //----------------- /** * @description An empty or blank function. */ nop: function () { /* no-op */ }, /** * @description This function runs the function that is passed to it. * @param {Function} fn The function to run */ invoker: function (fn) { if ($.isFunction(fn)) { fn(); } }, /** * @description This function always returns the argument. * @param {Object} obj The object to return, untouched. * @returns {Object} The argument used for this function call. */ identity: function (obj) { return obj; }, // @todo consider additional tests for: null, boolean, string, nan, element, regexp... as needed /** * @description Calls a defined function for each element in an object * @param {Object} obj The object to loop through. It can be an array, an array like object or a map of properties * @param {Function} it The callback function to run for each element. * @param {Object} [ctx] The context object to be used for the callback function. Defaults to the original object if not provided. */ each: function (obj, it, ctx) { if ($.isNil(obj)) { return; } var nativ = aproto.forEach, i = 0, l, key; l = obj.length; ctx = ctx || obj; // @todo: looks like native method will not break on return false; maybe throw breaker {} if (nativ && nativ === obj.forEach) { obj.forEach(it, ctx); } else if ($.isNumber(l)) { // obj is an array-like object while (i < l) { if (it.call(ctx, obj[i], i, obj) === false) { return; } i += 1; } } else { for (key in obj) { if ($.hasOwn(obj, key) && it.call(ctx, obj[key], key, obj) === false) { return; } } } }, /** * @description Creates a new array with the results of calling the function on each element in the object. * @param {Object} obj The object to use. * @param {Function} it The callback function to run for each element. * @param {Object} [ctx] The context object to be used for the callback function. Defaults to the original object if not provided. * @returns {Array} The array that results when calling the function on each element in the object. */ map: function (obj, it, ctx) { var results = [], nativ = aproto.map; if ($.isNil(obj)) { return results; } if (nativ && obj.map === nativ) { return obj.map(it, ctx); } ctx = ctx || obj; $.each(obj, function (value, i, list) { results.push(it.call(ctx, value, i, list)); }); return results; }, /** * @description Creates an array containing all the elements of the given object * @param {Object} obj The object the use in creating the array * @returns {Array} An array containing all the elements in the object. */ values: function (obj) { return $.map(obj, $.identity); }, /** * @description Creates a new array containing the selected elements of the given array. * @param {Array} array The array to subset. * @param {Integer} [begin=0] The index that specifies where to start the selection. * @param {Integer} [end = array.length] The index that specifies where to end the selection. * @returns {Array} A new array that contains the selected elements. */ slice: function (array, begin, end) { /* FF doesn't like undefined args for slice so ensure we call with args */ return aproto.slice.call(array, $.isUndefined(begin) ? 0 : begin, $.isUndefined(end) ? array.length : end); }, /** * @description Creates an array from an object. * @param {Object} iterable The object to use in creating the array. * @returns {Array} The new array created from the object. */ toArray: function (iterable) { if (!iterable) { return []; } if (iterable.toArray) { return iterable.toArray; } if ($.isArray(iterable)) { return iterable; } if ($.isArguments(iterable)) { return $.slice(iterable); } return $.values(iterable); }, /** * @description Calculates the number of elements in an object * @param {Object} obj The object to size. * @returns {Integer} The number of elements in the object. */ size: function (obj) { return $.toArray(obj).length; }, /** * @description Calculates the location of an element in an array. * @param {Array} array The array to check. * @param {Object} item The item to search for within the array. * @returns {Integer} The index of the element within the array. Returns -1 if the element is not found. */ indexOf: function (array, item) { var nativ = aproto.indexOf, i, l; if (!array) { return -1; } if (nativ && array.indexOf === nativ) { return array.indexOf(item); } for (i = 0, l = array.length; i < l; i += 1) { if (array[i] === item) { return i; } } return -1; }, /** * @description Removes an element from an array. * @param {Array} array The array to modify. * @param {Object} item The element to remove from the array. */ remove: function (array, item) { var i = $.indexOf(array, item); if (i >= 0) { array.splice(i, 1); } }, /** * @description Serializes an object into a string that can be used as a URL query string. * @param {Object|Array} a The array or object to serialize. * @param {Boolean} [encode=false] Indicates that the string should be encoded. * @returns {String} A string representing the object as a URL query string. */ param: function (a, encode) { var s = []; encode = encode || false; function add( key, value ) { if ($.isNil(value)) {return;} value = $.isFunction(value) ? value() : value; if ($.isArray(value)) { $.each( value, function(v, n) { add( key, v ); }); } else { if (encode) { s[ s.length ] = encodeURIComponent(key) + "=" + encodeURIComponent(value); } else { s[ s.length ] = key + "=" + value; } } } if ( $.isArray(a)) { $.each( a, function(v, n) { add( n, v ); }); } else { for ( var p in a ) { if ($.hasOwn(a, p)) { add( p, a[p]); } } } return s.join("&").replace(/%20/g, "+"); }, /** * @description Strip out the URL to just the {scheme}://{host}:{port} - remove any path and query string information. * @param {String} url The url to be stripped * @returns {String} just the {scheme}://{host}:{port} portion of the url. */ stripUrl : function(url) { return ($.isNil(url)) ? null : url.replace( /([^:]+:\/\/[^\/\?#]+).*/, '$1'); }, /** * @description append the query string to the end of the URL, and strip off any existing Hash tag * @param {String} url The url to be appended to * @returns uel with query string appended.. */ query : function(url, q) { if ($.isNil(q)) { return url; } // Strip any old hash tags url = url.replace(/#.*$/, ''); url += (/^\#/.test(q)) ? q : (/\?/.test( url ) ? "&" : "?") + q; return url; }, // strings //-------- /** * @description Adds the contents of 2 or more objets to a destination object. * @param {Object} dest The destination object to modify. * @param {Object} mixin1-n An unlimited number of objects to add to the destination. * @returns {Object} The modified destination object. */ extend: function (dest /*, mixin1, mixin2, ... */) { $.each($.slice(arguments, 1), function (mixin, i) { $.each(mixin, function (value, key) { dest[key] = value; }); }); return dest; }, /** * @name Sfdc.canvas.prototypeOf * @function * @description Returns the prototype of the specified object * @param {Object} obj The object for which to find the prototype. * @returns {Object} The object that is the prototype of the given object. */ prototypeOf: function (obj) { var nativ = Object.getPrototypeOf, proto = '__proto__'; if ($.isFunction(nativ)) { return nativ.call(Object, obj); } else { if (typeof {}[proto] === 'object') { return obj[proto]; } else { return obj.constructor.prototype; } } }, /** * @description Adds a module to the global.Sfdc.canvas object * @param {String} ns The namespace for the new module. * @decl {Object} The module to add. * @returns {Object} The global.Sfdc.canvas object with a new module added. */ module: function(ns, decl) { var parts = ns.split('.'), parent = global.Sfdc.canvas, i, length; // strip redundant leading global if (parts[1] === 'canvas') { parts = parts.slice(2); } length = parts.length; for (i = 0; i < length; i += 1) { // create a property if it doesn't exist if ($.isUndefined(parent[parts[i]])) { parent[parts[i]] = {}; } parent = parent[parts[i]]; } if ($.isFunction(decl)) { decl = decl(); } return $.extend(parent, decl); }, // dom //---- /** * @description Returns the DOM element in the current document with the given ID * @param {String} id The id to find in the DOM * @returns {DOMElement} The DOM element with the given ID, null if the element does not exist. */ byId: function (id) { return doc.getElementById(id); }, /** * @description Returns a set of DOM elements in the current document with the given class names * @param {String} clazz The class names to find in the DOM. Multiple classnames can be given, separated by whitespace * @returns {Array} Set of DOM elements that all have the given class name */ byClass: function (clazz) { return doc.getElementsByClassName(clazz); }, /** * @description Returns the value for the given attribute name on the given DOM element. * @param {DOMElement} el The element on which to check the attribute. * @param {String} name The name of the attribute for which to find a value * @returns {String} The given attribute's value. */ attr : function(el, name) { var a = el.attributes, i; for (i = 0; i < a.length; i += 1) { if (name === a[i].name) { return a[i].value; } } }, /** * @description register a callback to be called after the DOM is ready. * onReady. * @param {Function} The callback function to be called. */ onReady : function(cb) { if ($.isFunction(cb)) { readyHandlers.push(cb); } } }, readyHandlers = [], ready = function () { ready = $.nop; $.each(readyHandlers, $.invoker); readyHandlers = null; }, /** * @description * @param {Function} cb The function to run when ready. */ canvas = function (cb) { if ($.isFunction(cb)) { readyHandlers.push(cb); } }; (function () { var ael = 'addEventListener', tryReady = function () { if (doc && /loaded|complete/.test(doc.readyState)) { ready(); } else if (readyHandlers) { if ($.isFunction(global.setTimeout)) { global.setTimeout(tryReady, 30); } } }; if (doc && doc[ael]) { doc[ael]('DOMContentLoaded', ready, false); } tryReady(); if (global[ael]) { global[ael]('load', ready, false); } else if (global.attachEvent) { global.attachEvent('onload', ready); } }()); $.each($, function (fn, name) { canvas[name] = fn; }); if (!global.Sfdc) { global.Sfdc = {}; } global.Sfdc.canvas = canvas; if (!global.Sfdc.JSON) { global.Sfdc.JSON = JSON; } }(this));/** *@namespace Sfdc.canvas.cookies *@name Sfdc.canvas.cookies */ (function ($$) { "use strict"; var module = (function() { function isSecure() { return window.location.protocol === 'https:'; } /** * @name Sfdc.canvas.cookies#set * @function * @description Create a cookie * @param {String} name Cookie name * @param {String} value Cookie value * @param {Integer} [days] Number of days for the cookie to remain active. If not provided, the cookie never expires */ function set(name, value, days) { var expires = "", date; if (days) { date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); expires = "; expires=" + date.toGMTString(); } else { expires = ""; } document.cookie = name + "=" + value + expires + "; path=/" + ((isSecure() === true) ? "; secure" : ""); } /** * @name Sfdc.canvas.cookies#get * @function * @description Get the cookie with the specified name * @param {String} name The name of the cookie to retrieve * @returns The value of the cookie if the name is found, otherwise null */ function get(name) { var nameEQ, ca, c, i; if ($$.isUndefined(name)) { return document.cookie.split(';'); } nameEQ = name + "="; ca = document.cookie.split(';'); for (i = 0; i < ca.length; i += 1) { 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; } /** * @name Sfdc.canvas.cookies#remove * @function * @description Remove the specified cookie by setting the expiry date to one day ago * @param {String} name The name of the cookie to remove. */ function remove(name) { set(name, "", -1); } return { set : set, get : get, remove : remove }; }()); $$.module('Sfdc.canvas.cookies', module); }(Sfdc.canvas)); /** *@namespace Sfdc.canvas.oauth *@name Sfdc.canvas.oauth */ (function ($$) { "use strict"; var module = (function() { var accessToken, instUrl, instId, tOrigin, childWindow; function init() { // Get the access token from the cookie (needed to survive refresh), // and then remove the cookie per security's request. accessToken = $$.cookies.get("access_token"); $$.cookies.remove("access_token"); } function query(params) { var r = [], n; if (!$$.isUndefined(params)) { for (n in params) { if (params.hasOwnProperty(n)) { // probably should encode these r.push(n + "=" + params[n]); } } return "?" + r.join('&'); } return ''; } /** *@private */ function refresh() { // Temporarily set the oauth token in a cookie and then remove it // after the refresh. $$.cookies.set("access_token", accessToken); self.location.reload(); } /** * @name Sfdc.canvas.oauth#login * @function * @description Opens the OAuth popup window to retrieve an OAuth token * @param {Object} ctx Context object that contains the url, the response type, the client id and callback url * @docneedsimprovement * @example * function clickHandler(e) * { * var uri; * if (! connect.oauth.loggedin()) * { * uri = connect.oauth.loginUrl(); * connect.oauth.login( * {uri : uri, * params: { * response_type : "token", * client_id : "<%=consumerKey%>", * redirect_uri : encodeURIComponent("/sdk/callback.html") * }}); * } else { * connect.oauth.logout(); * } * return false; * } */ function login(ctx) { var uri; ctx = ctx || {}; uri = ctx.uri || "/rest/oauth2"; ctx.params = ctx.params || {state : ""}; ctx.params.state = ctx.params.state || ctx.callback || window.location.pathname; // @TODO REVIEW THIS ctx.params.display= ctx.params.display || 'popup'; uri = uri + query(ctx.params); childWindow = window.open(uri, 'OAuth', 'status=0,toolbar=0,menubar=0,resizable=0,scrollbars=1,top=50,left=50,height=500,width=680'); } /** * @name Sfdc.canvas.oauth#token * @function * @description Sets, gets or removes the <code>access_token</code> from this JS object <br> <p>This function does one of three things <br> If the 't' parameter is not passed in, the current value for the <code>access_token</code> value is returned. <br> If the the 't' parameter is null, the <code>access_token</code> value is removed. <br> Note: for longer term storage of the OAuth token store it server side in the session, access tokens should never be stored in cookies. Otherwise the <code>access_token</code> value is set to the 't' parameter and then returned. * @param {String} [t] The oauth token to set as the <code>access_token</code> value * @returns {String} The resulting <code>access_token</code> value if set, otherwise null */ function token(t) { if (arguments.length === 0) { if (!$$.isNil(accessToken)) {return accessToken;} } else { accessToken = t; } return accessToken; } /** * @name Sfdc.canvas.oauth#instance * @function * @description Sets, gets or removes the <code>instance_url</code> cookie <br> <p> This function does one of three things <br> If the 'i' parameter is not passed in, the current value for the <code>instance_url</code> cookie is returned. <br> If the 'i' parameter is null, the <code>instance_url</code> cookie is removed. <br> Otherwise the <code>instance_url</code> cookie value is set to the 'i' parameter and then returned. * @param {String} [i] The value to set as the <code>instance_url</code> cookie * @returns {String} The resulting <code>instance_url</code> cookie value if set, otherwise null */ function instanceUrl(i) { if (arguments.length === 0) { if (!$$.isNil(instUrl)) {return instUrl;} instUrl = $$.cookies.get("instance_url"); } else if (i === null) { $$.cookies.remove("instance_url"); instUrl = null; } else { $$.cookies.set("instance_url", i); instUrl = i; } return instUrl; } /** *@private */ // Example Results of tha hash.... // Name [access_token] Value [00DU0000000Xthw!ARUAQMdYg9ScuUXB5zPLpVyfYQr9qXFO7RPbKf5HyU6kAmbeKlO3jJ93gETlJxvpUDsz3mqMRL51N1E.eYFykHpoda8dPg_z] // Name [instance_url] Value [https://na12.salesforce.com] // Name [id] Value [https://login.salesforce.com/id/00DU0000000XthwMAC/005U0000000e6PoIAI] // Name [issued_at] Value [1331000888967] // Name [signature] Value [LOSzVZIF9dpKvPU07icIDOf8glCFeyd4vNGdj1dhW50] // Name [state] Value [/crazyrefresh.html] function parseHash(hash) { var i, nv, nvp, n, v; if (! $$.isNil(hash)) { if (hash.indexOf('#') === 0) { hash = hash.substr(1); } nvp = hash.split("&"); for (i = 0; i < nvp.length; i += 1) { nv = nvp[i].split("="); n = nv[0]; v = decodeURIComponent(nv[1]); if ("access_token" === n) { token(v); } else if ("instance_url" === n) { instanceUrl(v); } else if ("target_origin" === n) { tOrigin = decodeURIComponent(v); } else if ("instance_id" === n) { instId = v; } } } } /** * @name Sfdc.canvas.oauth#checkChildWindowStatus * @function * @description Refreshes the parent window only if the child window is closed. */ function checkChildWindowStatus() { if (!childWindow || childWindow.closed) { refresh(); } } /** * @name Sfdc.canvas.oauth#childWindowUnloadNotification * @function * @description Parses the hash value that is passed in and sets the <code>access_token</code> and <code>instance_url</code> cookies if they exist. Use during User-Agent OAuth Authentication Flow to pass the OAuth token * @param {String} hash Typically a string of key-value pairs delimited by the ampersand character. * @example * Sfdc.canvas.oauth.childWindowUnloadNotification(self.location.hash); */ function childWindowUnloadNotification(hash) { // Here we get notification from child window. Here we can decide if such notification is // raised because user closed child window, or because user is playing with F5 key. // NOTE: We can not trust on "onUnload" event of child window, because if user reload or refresh // such window in fact he is not closing child. (However "onUnload" event is raised!) //checkChildWindowStatus(); parseHash(hash); setTimeout(window.Sfdc.canvas.oauth.checkChildWindowStatus, 50); } /** * @name Sfdc.canvas.oauth#logout * @function * @description Removes the <code>access_token</code> oauth token from this object. */ function logout() { // Remove the oauth token and refresh the browser token(null); // @todo: do we want to do this? //var home = $$.cookies.get("home"); //window.location = home || window.location; } /** * @name Sfdc.canvas.oauth#loggedin * @function * @description Returns the login state * @returns {Boolean} <code>true</code> if the <code>access_token</code> is available in this JS object. * Note: <code>access tokens</code> (i.e. OAuth tokens) should be stored server side for more durability. * Never store OAuth tokens in cookies as this can lead to a security risk. */ function loggedin() { return !$$.isNil(token()); } /** * @name Sfdc.canvas.oauth#loginUrl * @function * @description Returns the url for the OAuth authorization service * @returns {String} The url for the OAuth authorization service or default if there is * not a value for loginUrl in the current url's query string. */ function loginUrl() { var i, nvs, nv, q = self.location.search; if (q) { q = q.substring(1); nvs = q.split("&"); for (i = 0; i < nvs.length; i += 1) { nv = nvs[i].split("="); if ("loginUrl" === nv[0]) { return decodeURIComponent(nv[1]) + "/services/oauth2/authorize"; } } } return "https://login.salesforce.com/services/oauth2/authorize"; } function targetOrigin(to) { if (!$$.isNil(to)) { tOrigin = to; return to; } if (!$$.isNil(tOrigin)) {return tOrigin;} // This relies on the parent passing it in. This may not be there as the client can do a // redirect or link to another page parseHash(document.location.hash); return tOrigin; } function instanceId(id) { if (!$$.isNil(id)) { instId = id; return id; } if (!$$.isNil(instId)) {return instId;} // This relies on the parent passing it in. This may not be there as the client can do a // redirect or link to another page parseHash(document.location.hash); return instId; } function client() { return {oauthToken : token(), instanceId : instanceId(), targetOrigin : targetOrigin()}; } return { init : init, login : login, logout : logout, loggedin : loggedin, loginUrl : loginUrl, token : token, instance : instanceUrl, client : client, checkChildWindowStatus : checkChildWindowStatus, childWindowUnloadNotification: childWindowUnloadNotification }; }()); $$.module('Sfdc.canvas.oauth', module); $$.oauth.init(); }(Sfdc.canvas));/** *@namespace Sfdc.canvas.xd *@name Sfdc.canvas.xd */ (function ($$, window) { "use strict"; var module = (function() { var internalCallback; /** * @lends Sfdc.canvas.xd */ /** * @name Sfdc.canvas.xd#post * @function * @description Pass a message to the target url * @param {String} message The message to send * @param {String} target_url Specifies what the origin of the target must be for the event to be dispatched. * @param {String} [target] The window that is the message's target. Defaults to the parent of the current window. */ function postMessage(message, target_url, target) { // If target url was not supplied (client may have lost it), we could default to '*', // However there are security implications here as other canvas apps could receive this // canvas apps oauth token. if ($$.isNil(target_url)) { throw "ERROR: target_url was not supplied on postMessage"; } var otherWindow = $$.stripUrl(target_url); target = target || parent; // default to parent if (window.postMessage) { // the browser supports window.postMessage, so call it with a targetOrigin // set appropriately, based on the target_url parameter. message = Sfdc.JSON.stringify(message); target.postMessage(message, otherWindow); } } /** * @name Sfdc.canvas.xd#receive * @function Runs the callback function when the message event is received. * @param {Function} callback Function to run when the message event is received if the event origin is acceptable. * @param {String} source_origin The origin of the desired events */ function receiveMessage(callback, source_origin) { // browser supports window.postMessage (if not not supported for pilot - removed per securities request) if (window.postMessage) { // bind the callback to the actual event associated with window.postMessage if (callback) { internalCallback = function(e) { var data, r; if (typeof source_origin === 'string' && e.origin !== source_origin) { return false; } if ($$.isFunction(source_origin)) { r = source_origin(e.origin, e.data); if (r === false) { return false; } } data = Sfdc.JSON.parse(e.data); callback(data, r); }; } if (window.addEventListener) { window.addEventListener('message', internalCallback, false); } else { window.attachEvent('onmessage', internalCallback); } } } /** * @name Sfdc.canvas.xd#remove * @function * @description Removes the message event listener * @public */ function removeListener() { // browser supports window.postMessage if (window.postMessage) { if (window.removeEventListener) { window.removeEventListener('message', internalCallback, false); } else { window.detachEvent('onmessage', internalCallback); } } } return { post : postMessage, receive : receiveMessage, remove : removeListener }; }()); $$.module('Sfdc.canvas.xd', module); }(Sfdc.canvas, this));/** *@namespace Sfdc.canvas.client *@name Sfdc.canvas.client */ (function ($$) { "use strict"; var pversion, cversion = "27.0"; var module = (function() /**@lends module */ { var purl, cbs = [], seq = 0; function startsWithHttp(u, d) { return $$.isNil(u) ? u : (u.substring(0, 4) === "http") ? u : d; } /** * @description * @function * @returns The url of the Parent Window */ function getTargetOrigin(to) { var h; if (to === "*") {return to;} if (!$$.isNil(to)) { h = $$.stripUrl(to); purl = startsWithHttp(h, purl); if (purl) {return purl;} } // This relies on the parent passing it in. This may not be there as the client can do a redirect. h = document.location.hash; if (h) { h = decodeURIComponent(h.replace(/^#/, '')); purl = startsWithHttp(h, purl); } return purl; } function callbacker(data) { if (data) { // If the server is telling us the access_token is invalid, wipe it clean. if (data.status === 401 && $$.isArray(data.payload) && data.payload[0].errorCode && data.payload[0].errorCode === "INVALID_SESSION_ID") { // Session has expired logout. $$.oauth.logout(); } if ($$.isFunction(cbs[data.seq])) { cbs[data.seq](data); } else { // This can happen when the user switches out canvas apps real quick, // before the request from the last canvas app have finish processing. // We will ignore any of these results as the canvas app is no longer active to // respond to the results. } } } function postit(clientscb, message) { var wrapped, to, c; // need to keep a mapping from request to callback, otherwise // wrong callbacks get called. Unfortunately, this is the only // way to handle this as postMessage acts more like topic/queue. // limit the sequencers to 100 avoid out of memory errors seq = (seq > 100) ? 0 : seq + 1; cbs[seq] = clientscb; wrapped = {seq : seq, src : "client", clientVersion : cversion, parentVersion: pversion, body : message}; c = message && message.config && message.config.client; to = getTargetOrigin($$.isNil(c) ? null : c.targetOrigin); if ($$.isNil(to)) { throw "ERROR: targetOrigin was not supplied and was not found on the hash tag, this can result from a redirect or link to another page. " + "Try setting the targetOrgin (example: targetOrigin : sr.context.environment.targetOrigin) " + "when making an ajax request."; } $$.xd.post(wrapped, to, parent); } function validateClient(client, cb) { var msg; if ($$.isNil(client) || $$.isNil(client.oauthToken)) { msg = {status : 401, statusText : "Unauthorized" , parentVersion : pversion, payload : "client or client.oauthToken not supplied"}; } if ($$.isNil(client.instanceId) || $$.isNil(client.targetOrigin)) { msg = {status : 400, statusText : "Bad Request" , parentVersion : pversion, payload : "client.instanceId or client.targetOrigin not supplied"}; } if (!$$.isNil(msg)) { if ($$.isFunction(cb)) { cb(msg); return false; } else { throw msg; } } return true; } /** * @description Get the context for the current user and organization * @public * @name Sfdc.canvas.client#ctx * @function * @param {Function} clientscb Callback function to run when the call to ctx is complete * @param {String} token OAuth token to send. * @example * // Gets context in the canvas app. * * function callback(msg) { * if (msg.status !== 200) { * alert("Error: " + msg.status); * return; * } * alert("Payload: ", msg.payload); * } * var ctxlink = connect.byId("ctxlink"); * var oauthtoken = connect.oauth.token(); * ctxlink.onclick=function() { * connect.client.ctx(callback, oauthtoken)}; * } */ function ctx(clientscb, client) { client = client || $$.oauth.client(); if (validateClient(client, clientscb)) { var token = client.oauthToken; postit(clientscb, {type : "ctx", accessToken : token, config : {client : client}}); } } /** * @description Perform a cross-domain, asynchronous HTTP request. <br>Note: this should not be used for same domain requests. * @param {String} url The URL to which the request is sent * @param {Object} settings A set of key/value pairs to configure the request. <br>The success setting is required at minimum and should be a callback function * @config {String} [client] required client context {oauthToken: "", targetOrigin : "", instanceId : ""} * @config {String} [contentType] "application/json" * @config {String} [data] request body * @config {String} [headers] request headers * @config {String} [method="GET"] The type of Ajax Request to make * @config {Function} [success] Callback for all responses from server (failure and success) . Signature: success(response); intersting fields: [response.data, response.responseHeaders, response.status, response.statusText} * @config {Boolean} [async=true] Asyncronous: true is only supported at this time. * @name Sfdc.canvas.client#ajax * @function * @throws illegalArgumentException if the URL is missing or the settings object does not contain a success callback function. * @example * //Posting To a Chatter Feed: * var sr = JSON.parse('<%=signedRequestJson%>'); * var url = sr.context.links.chatterFeedsUrl+"/news/" * +sr.context.user.userId+"/feed-items"; * var body = {body : {messageSegments : [{type: "Text", text: "Some Chatter Post"}]}}; * connect.client.ajax(url, * {client : sr.client, * method: 'POST', * contentType: "application/json", * data: JSON.stringify(body), * success : function(data) { * if (201 === data.status) { * alert("Success" * } * } * }); * @example * // Gets a List of Chatter Users: * // Paste the signed request string into a JavaScript object for easy access. * var sr = JSON.parse('<%=signedRequestJson%>'); * // Reference the Chatter user's URL from Context.Links object. * var chatterUsersUrl = sr.context.links.chatterUsersUrl; * * // Make an XHR call back to salesforce through the supplied browser proxy. * connect.client.ajax(chatterUsersUrl, * {client : sr.client, * success : function(data){ * // Make sure the status code is OK. * if (data.status === 200) { * // Alert with how many Chatter users were returned. * alert("Got back " + data.payload.users.length + * " users"); // Returned 2 users * } * })}; */ function ajax(url, settings) { var ccb, config, defaults; if (!url) { throw "PRECONDITION ERROR: url required with AJAX call"; } if (!settings || !$$.isFunction(settings.success)) { throw "PRECONDITION ERROR: function: 'settings.success' missing."; } if (! validateClient(settings.client, settings.success)) { return; } ccb = settings.success; defaults = { method: 'GET', async: true, contentType: "application/json", headers: {"Authorization" : "OAuth " + settings.client.oauthToken, "Accept" : "application/json"}, data: null }; config = $$.extend(defaults, settings || {}); // Remove any listeners as functions cannot get marshaled. config.success = undefined; config.failure = undefined; // Don't allow the client to set "*" as the target origin. if (config.client.targetOrigin === "*") { config.client.targetOrigin = null; } else { // We need to set this here so we can validate the origin when we receive the call back purl = startsWithHttp(config.targetOrigin, purl); } postit(ccb, {type : "ajax", accessToken : token, url : url, config : config}); } /** * @description Stores or gets the oauth token in a local javascript variable. Note, if longer term * (survive page refresh) storage is needed store the oauth token on the server side. * @param {String} t oauth token, if supplied it will be stored in a volatile local JS variable. * @returns {Object} the oauth token. */ function token(t) { return $$.oauth.token(t); } function version() { return {clientVersion: cversion}; } $$.xd.receive(callbacker, getTargetOrigin); return { ctx : ctx, ajax : ajax, token : token, version : version }; }()); $$.module('Sfdc.canvas.client', module); }(Sfdc.canvas));
tomdionysus/cdnjs
ajax/libs/salesforce-canvas/27.0/canvas-all.js
JavaScript
mit
50,083
(function(){function t(t,n){var e=t.split("."),r=V;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function u(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function o(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case Y:case k:case J:case K:case O:case T:case q:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=o(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],u=0;u<i.length;u++){var s=t,f=a,h=l?i[u].clone():i[u];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):m(t,a,i.clone()):m(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function d(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function m(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function b(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new u(t,r)}/* Protocol Buffer 2 Copyright 2008 Google Inc. All other code copyright its respective owners. Copyright (C) 2010 The Libphonenumber Authors 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. */ function y(){f.call(this)}function v(){f.call(this)}function _(){f.call(this)}function $(){}function S(){}function w(){}/* Copyright (C) 2010 The Libphonenumber Authors. 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. */ function x(){this.a={}}function C(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new w).a(_.i(),e),t.a[n]=e}return e}function A(t){return t=X[t],null==t?"ZZ":t[0]}function N(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=x.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=j(this,this.C)}function j(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=C(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=C(t.F,A(e)),null!=e?e:at}function E(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var u=i,o=g(u,1);if(-1!=o.indexOf("|"))l=!1;else{o=o.replace(lt,"\\d"),o=o.replace(ut,"\\d"),r(l.m);var s;s=l;var u=g(u,2),f="999999999999999".match(o)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(o,"g"),u),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function R(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==d(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,d(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(G(t)){if(H(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=M(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!G(t))return t.l=M(t),U(t);t.w=!0;default:return t.w?(H(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=P(t,n),i=I(t),0<i.length?i:(R(t,t.a.toString()),E(t)?L(t):t.j?D(t,e):t.h.toString())):U(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",U(t)}function I(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function U(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<d(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ot.test(g(l,2))&&t.f.push(l)}return R(t,n),n=I(t),0<n.length?n:E(t)?L(t):t.h.toString()}return D(t,n)}function L(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=P(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function M(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function G(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function H(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,u=1;3>=u&&l>=u;++u)if(a=parseInt(n.substring(0,u),10),a in X){i.a(n.substring(u)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=A(n),"001"==i?t.g=C(t.F,""+n):i!=t.C&&(t.g=j(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function P(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var V=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var q=1,T=2,Y=3,k=4,J=6,K=16,O=18;f.prototype.set=function(t,n){m(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var Z;n(y,f);var z;n(v,f);var Q;n(_,f),y.prototype.i=function(){return Z||(Z=b(y,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),Z},y.ctor=y,y.ctor.i=y.prototype.i,v.prototype.i=function(){return z||(z=b(v,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return Q||(Q=b(_,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:v},2:{name:"fixed_line",c:11,type:v},3:{name:"mobile",c:11,type:v},4:{name:"toll_free",c:11,type:v},5:{name:"premium_rate",c:11,type:v},6:{name:"shared_cost",c:11,type:v},7:{name:"personal_number",c:11,type:v},8:{name:"voip",c:11,type:v},21:{name:"pager",c:11,type:v},25:{name:"uan",c:11,type:v},27:{name:"emergency",c:11,type:v},28:{name:"voicemail",c:11,type:v},24:{name:"no_international_dialling",c:11,type:v},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:y},20:{name:"intl_number_format",G:!0,c:11,type:y},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},_.ctor=_,_.ctor.i=_.prototype.i,$.prototype.a=function(t){throw new t.b,Error("Unimplemented")},$.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(S,$),S.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(w,S),w.prototype.b=function(t,n){return 8==t.a?!!n:$.prototype.b.apply(this,arguments)},w.prototype.a=function(t,n){return w.M.a.call(this,t,n)};/* Copyright (C) 2010 The Libphonenumber Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var X={352:["LU"]},tt={LU:[null,[null,null,"[24-9]\\d{3,10}|3(?:[0-46-9]\\d{2,9}|5[013-9]\\d{1,8})","\\d{4,11}"],[null,null,"(?:2[2-9]\\d{2,9}|(?:[3457]\\d{2}|8(?:0[2-9]|[13-9]\\d)|9(?:0[89]|[2-579]\\d))\\d{1,8})","\\d{4,11}",null,null,"27123456"],[null,null,"6[2679][18]\\d{6}","\\d{9}",null,null,"628123456"],[null,null,"800\\d{5}","\\d{8}",null,null,"80012345"],[null,null,"90[015]\\d{5}","\\d{8}",null,null,"90012345"],[null,null,"801\\d{5}","\\d{8}",null,null,"80112345"],[null,null,"70\\d{6}","\\d{8}",null,null,"70123456"],[null,null,"20(?:1\\d{5}|[2-689]\\d{1,7})","\\d{4,10}",null,null,"20201234"],"LU",352,"00",null,null,null,"(15(?:0[06]|1[12]|35|4[04]|55|6[26]|77|88|99)\\d)",null,null,null,[[null,"(\\d{2})(\\d{3})","$1 $2",["[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{2})","$1 $2 $3",["[2-5]|7[1-9]|[89](?:[1-9]|0[2-9])"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3",["20"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4",["2(?:[0367]|4[3-8])"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{2})(\\d{3})","$1 $2 $3 $4",["20"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{1,2})","$1 $2 $3 $4 $5",["2(?:[0367]|4[3-8])"],null,"$CC $1"],[null,"(\\d{2})(\\d{2})(\\d{2})(\\d{1,4})","$1 $2 $3 $4",["2(?:[12589]|4[12])|[3-5]|7[1-9]|8(?:[1-9]|0[2-9])|9(?:[1-9]|0[2-46-9])"],null,"$CC $1"],[null,"(\\d{3})(\\d{2})(\\d{3})","$1 $2 $3",["70|80[01]|90[015]"],null,"$CC $1"],[null,"(\\d{3})(\\d{3})(\\d{3})","$1 $2 $3",["6"],null,"$CC $1"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};x.b=function(){return x.a?x.a:x.a=new x};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new _;m(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ut=/\d(?=[^,}][^,}])/g,ot=RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;N.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=j(this,this.C))},N.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",N),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",N.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",N.prototype.K)}).call(window);
pvnr0082t/cdnjs
ajax/libs/cleave.js/0.4.3/addons/cleave-phone.lu.js
JavaScript
mit
14,163
(function(){function t(t,n){var e=t.split("."),r=T;e[0]in r||!r.execScript||r.execScript("var "+e[0]);for(var i;e.length&&(i=e.shift());)e.length||void 0===n?r=r[i]?r[i]:r[i]={}:r[i]=n}function n(t,n){function e(){}e.prototype=n.prototype,t.M=n.prototype,t.prototype=new e,t.prototype.constructor=t,t.N=function(t,e,r){for(var i=Array(arguments.length-2),a=2;a<arguments.length;a++)i[a-2]=arguments[a];return n.prototype[e].apply(t,i)}}function e(t,n){null!=t&&this.a.apply(this,arguments)}function r(t){t.b=""}function i(t,n){t.sort(n||a)}function a(t,n){return t>n?1:n>t?-1:0}function l(t){var n,e=[],r=0;for(n in t)e[r++]=t[n];return e}function o(t,n){this.b=t,this.a={};for(var e=0;e<n.length;e++){var r=n[e];this.a[r.b]=r}}function u(t){return t=l(t.a),i(t,function(t,n){return t.b-n.b}),t}function s(t,n){switch(this.b=t,this.g=!!n.G,this.a=n.c,this.j=n.type,this.h=!1,this.a){case k:case J:case K:case L:case O:case Y:case U:this.h=!0}this.f=n.defaultValue}function f(){this.a={},this.f=this.i().a,this.b=this.g=null}function c(t,n){for(var e=u(t.i()),r=0;r<e.length;r++){var i=e[r],a=i.b;if(null!=n.a[a]){t.b&&delete t.b[i.b];var l=11==i.a||10==i.a;if(i.g)for(var i=p(n,a)||[],o=0;o<i.length;o++){var s=t,f=a,h=l?i[o].clone():i[o];s.a[f]||(s.a[f]=[]),s.a[f].push(h),s.b&&delete s.b[f]}else i=p(n,a),l?(l=p(t,a))?c(l,i):b(t,a,i.clone()):b(t,a,i)}}}function p(t,n){var e=t.a[n];if(null==e)return null;if(t.g){if(!(n in t.b)){var r=t.g,i=t.f[n];if(null!=e)if(i.g){for(var a=[],l=0;l<e.length;l++)a[l]=r.b(i,e[l]);e=a}else e=r.b(i,e);return t.b[n]=e}return t.b[n]}return e}function h(t,n,e){var r=p(t,n);return t.f[n].g?r[e||0]:r}function g(t,n){var e;if(null!=t.a[n])e=h(t,n,void 0);else t:{if(e=t.f[n],void 0===e.f){var r=e.j;if(r===Boolean)e.f=!1;else if(r===Number)e.f=0;else{if(r!==String){e=new r;break t}e.f=e.h?"0":""}}e=e.f}return e}function m(t,n){return t.f[n].g?null!=t.a[n]?t.a[n].length:0:null!=t.a[n]?1:0}function b(t,n,e){t.a[n]=e,t.b&&(t.b[n]=e)}function y(t,n){var e,r=[];for(e in n)0!=e&&r.push(new s(e,n[e]));return new o(t,r)}/* Protocol Buffer 2 Copyright 2008 Google Inc. All other code copyright its respective owners. Copyright (C) 2010 The Libphonenumber Authors 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. */ function v(){f.call(this)}function _(){f.call(this)}function d(){f.call(this)}function S(){}function w(){}function N(){}/* Copyright (C) 2010 The Libphonenumber Authors. 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. */ function A(){this.a={}}function x(t,n){if(null==n)return null;n=n.toUpperCase();var e=t.a[n];if(null==e){if(e=tt[n],null==e)return null;e=(new N).a(d.i(),e),t.a[n]=e}return e}function j(t){return t=X[t],null==t?"ZZ":t[0]}function E(t){this.H=RegExp(" "),this.B="",this.m=new e,this.v="",this.h=new e,this.u=new e,this.j=!0,this.w=this.o=this.D=!1,this.F=A.b(),this.s=0,this.b=new e,this.A=!1,this.l="",this.a=new e,this.f=[],this.C=t,this.J=this.g=I(this,this.C)}function I(t,n){var e;if(null!=n&&isNaN(n)&&n.toUpperCase()in tt){if(e=x(t.F,n),null==e)throw"Invalid region code: "+n;e=g(e,10)}else e=0;return e=x(t.F,j(e)),null!=e?e:at}function R(t){for(var n=t.f.length,e=0;n>e;++e){var i=t.f[e],a=g(i,1);if(t.v==a)return!1;var l;l=t;var o=i,u=g(o,1);if(-1!=u.indexOf("|"))l=!1;else{u=u.replace(lt,"\\d"),u=u.replace(ot,"\\d"),r(l.m);var s;s=l;var o=g(o,2),f="999999999999999".match(u)[0];f.length<s.a.b.length?s="":(s=f.replace(new RegExp(u,"g"),o),s=s.replace(RegExp("9","g")," ")),0<s.length?(l.m.a(s),l=!0):l=!1}if(l)return t.v=a,t.A=st.test(h(i,4)),t.s=0,!0}return t.j=!1}function C(t,n){for(var e=[],r=n.length-3,i=t.f.length,a=0;i>a;++a){var l=t.f[a];0==m(l,3)?e.push(t.f[a]):(l=h(l,3,Math.min(r,m(l,3)-1)),0==n.search(l)&&e.push(t.f[a]))}t.f=e}function F(t,n){t.h.a(n);var e=n;if(rt.test(e)||1==t.h.b.length&&et.test(e)){var i,e=n;"+"==e?(i=e,t.u.a(e)):(i=nt[e],t.u.a(i),t.a.a(i)),n=i}else t.j=!1,t.D=!0;if(!t.j){if(!t.D)if(P(t)){if(V(t))return B(t)}else if(0<t.l.length&&(e=t.a.toString(),r(t.a),t.a.a(t.l),t.a.a(e),e=t.b.toString(),i=e.lastIndexOf(t.l),r(t.b),t.b.a(e.substring(0,i))),t.l!=H(t))return t.b.a(" "),B(t);return t.h.toString()}switch(t.u.b.length){case 0:case 1:case 2:return t.h.toString();case 3:if(!P(t))return t.l=H(t),M(t);t.w=!0;default:return t.w?(V(t)&&(t.w=!1),t.b.toString()+t.a.toString()):0<t.f.length?(e=q(t,n),i=$(t),0<i.length?i:(C(t,t.a.toString()),R(t)?G(t):t.j?D(t,e):t.h.toString())):M(t)}}function B(t){return t.j=!0,t.w=!1,t.f=[],t.s=0,r(t.m),t.v="",M(t)}function $(t){for(var n=t.a.toString(),e=t.f.length,r=0;e>r;++r){var i=t.f[r],a=g(i,1);if(new RegExp("^(?:"+a+")$").test(n))return t.A=st.test(h(i,4)),n=n.replace(new RegExp(a,"g"),h(i,2)),D(t,n)}return""}function D(t,n){var e=t.b.b.length;return t.A&&e>0&&" "!=t.b.toString().charAt(e-1)?t.b+" "+n:t.b+n}function M(t){var n=t.a.toString();if(3<=n.length){for(var e=t.o&&0<m(t.g,20)?p(t.g,20)||[]:p(t.g,19)||[],r=e.length,i=0;r>i;++i){var a,l=e[i];(a=null==t.g.a[12]||t.o||h(l,6))||(a=g(l,4),a=0==a.length||it.test(a)),a&&ut.test(g(l,2))&&t.f.push(l)}return C(t,n),n=$(t),0<n.length?n:R(t)?G(t):t.h.toString()}return D(t,n)}function G(t){var n=t.a.toString(),e=n.length;if(e>0){for(var r="",i=0;e>i;i++)r=q(t,n.charAt(i));return t.j?D(t,r):t.h.toString()}return t.b.toString()}function H(t){var n,e=t.a.toString(),i=0;return 1!=h(t.g,10)?n=!1:(n=t.a.toString(),n="1"==n.charAt(0)&&"0"!=n.charAt(1)&&"1"!=n.charAt(1)),n?(i=1,t.b.a("1").a(" "),t.o=!0):null!=t.g.a[15]&&(n=new RegExp("^(?:"+h(t.g,15)+")"),n=e.match(n),null!=n&&null!=n[0]&&0<n[0].length&&(t.o=!0,i=n[0].length,t.b.a(e.substring(0,i)))),r(t.a),t.a.a(e.substring(i)),e.substring(0,i)}function P(t){var n=t.u.toString(),e=new RegExp("^(?:\\+|"+h(t.g,11)+")"),e=n.match(e);return null!=e&&null!=e[0]&&0<e[0].length?(t.o=!0,e=e[0].length,r(t.a),t.a.a(n.substring(e)),r(t.b),t.b.a(n.substring(0,e)),"+"!=n.charAt(0)&&t.b.a(" "),!0):!1}function V(t){if(0==t.a.b.length)return!1;var n,i=new e;t:{if(n=t.a.toString(),0!=n.length&&"0"!=n.charAt(0))for(var a,l=n.length,o=1;3>=o&&l>=o;++o)if(a=parseInt(n.substring(0,o),10),a in X){i.a(n.substring(o)),n=a;break t}n=0}return 0==n?!1:(r(t.a),t.a.a(i.toString()),i=j(n),"001"==i?t.g=x(t.F,""+n):i!=t.C&&(t.g=I(t,i)),t.b.a(""+n).a(" "),t.l="",!0)}function q(t,n){var e=t.m.toString();if(0<=e.substring(t.s).search(t.H)){var i=e.search(t.H),e=e.replace(t.H,n);return r(t.m),t.m.a(e),t.s=i,e.substring(0,t.s+1)}return 1==t.f.length&&(t.j=!1),t.v="",t.h.toString()}var T=this;e.prototype.b="",e.prototype.set=function(t){this.b=""+t},e.prototype.a=function(t,n,e){if(this.b+=String(t),null!=n)for(var r=1;r<arguments.length;r++)this.b+=arguments[r];return this},e.prototype.toString=function(){return this.b};var U=1,Y=2,k=3,J=4,K=6,L=16,O=18;f.prototype.set=function(t,n){b(this,t.b,n)},f.prototype.clone=function(){var t=new this.constructor;return t!=this&&(t.a={},t.b&&(t.b={}),c(t,this)),t};var Z;n(v,f);var z;n(_,f);var Q;n(d,f),v.prototype.i=function(){return Z||(Z=y(v,{0:{name:"NumberFormat",I:"i18n.phonenumbers.NumberFormat"},1:{name:"pattern",required:!0,c:9,type:String},2:{name:"format",required:!0,c:9,type:String},3:{name:"leading_digits_pattern",G:!0,c:9,type:String},4:{name:"national_prefix_formatting_rule",c:9,type:String},6:{name:"national_prefix_optional_when_formatting",c:8,type:Boolean},5:{name:"domestic_carrier_code_formatting_rule",c:9,type:String}})),Z},v.ctor=v,v.ctor.i=v.prototype.i,_.prototype.i=function(){return z||(z=y(_,{0:{name:"PhoneNumberDesc",I:"i18n.phonenumbers.PhoneNumberDesc"},2:{name:"national_number_pattern",c:9,type:String},3:{name:"possible_number_pattern",c:9,type:String},6:{name:"example_number",c:9,type:String},7:{name:"national_number_matcher_data",c:12,type:String},8:{name:"possible_number_matcher_data",c:12,type:String}})),z},_.ctor=_,_.ctor.i=_.prototype.i,d.prototype.i=function(){return Q||(Q=y(d,{0:{name:"PhoneMetadata",I:"i18n.phonenumbers.PhoneMetadata"},1:{name:"general_desc",c:11,type:_},2:{name:"fixed_line",c:11,type:_},3:{name:"mobile",c:11,type:_},4:{name:"toll_free",c:11,type:_},5:{name:"premium_rate",c:11,type:_},6:{name:"shared_cost",c:11,type:_},7:{name:"personal_number",c:11,type:_},8:{name:"voip",c:11,type:_},21:{name:"pager",c:11,type:_},25:{name:"uan",c:11,type:_},27:{name:"emergency",c:11,type:_},28:{name:"voicemail",c:11,type:_},24:{name:"no_international_dialling",c:11,type:_},9:{name:"id",required:!0,c:9,type:String},10:{name:"country_code",c:5,type:Number},11:{name:"international_prefix",c:9,type:String},17:{name:"preferred_international_prefix",c:9,type:String},12:{name:"national_prefix",c:9,type:String},13:{name:"preferred_extn_prefix",c:9,type:String},15:{name:"national_prefix_for_parsing",c:9,type:String},16:{name:"national_prefix_transform_rule",c:9,type:String},18:{name:"same_mobile_and_fixed_line_pattern",c:8,defaultValue:!1,type:Boolean},19:{name:"number_format",G:!0,c:11,type:v},20:{name:"intl_number_format",G:!0,c:11,type:v},22:{name:"main_country_for_code",c:8,defaultValue:!1,type:Boolean},23:{name:"leading_digits",c:9,type:String},26:{name:"leading_zero_possible",c:8,defaultValue:!1,type:Boolean}})),Q},d.ctor=d,d.ctor.i=d.prototype.i,S.prototype.a=function(t){throw new t.b,Error("Unimplemented")},S.prototype.b=function(t,n){if(11==t.a||10==t.a)return n instanceof f?n:this.a(t.j.prototype.i(),n);if(14==t.a){if("string"==typeof n&&W.test(n)){var e=Number(n);if(e>0)return e}return n}if(!t.h)return n;if(e=t.j,e===String){if("number"==typeof n)return String(n)}else if(e===Number&&"string"==typeof n&&("Infinity"===n||"-Infinity"===n||"NaN"===n||W.test(n)))return Number(n);return n};var W=/^-?[0-9]+$/;n(w,S),w.prototype.a=function(t,n){var e=new t.b;return e.g=this,e.a=n,e.b={},e},n(N,w),N.prototype.b=function(t,n){return 8==t.a?!!n:S.prototype.b.apply(this,arguments)},N.prototype.a=function(t,n){return N.M.a.call(this,t,n)};/* Copyright (C) 2010 The Libphonenumber Authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var X={505:["NI"]},tt={NI:[null,[null,null,"[12578]\\d{7}","\\d{8}"],[null,null,"2\\d{7}","\\d{8}",null,null,"21234567"],[null,null,"5(?:5[0-7]\\d{5}|[78]\\d{6})|7[5-8]\\d{6}|8\\d{7}","\\d{8}",null,null,"81234567"],[null,null,"1800\\d{4}","\\d{8}",null,null,"18001234"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],[null,null,"NA","NA"],"NI",505,"00",null,null,null,null,null,null,null,[[null,"(\\d{4})(\\d{4})","$1 $2"]],null,[null,null,"NA","NA"],null,null,[null,null,"NA","NA"],[null,null,"NA","NA"],null,null,[null,null,"NA","NA"]]};A.b=function(){return A.a?A.a:A.a=new A};var nt={0:"0",1:"1",2:"2",3:"3",4:"4",5:"5",6:"6",7:"7",8:"8",9:"9","0":"0","1":"1","2":"2","3":"3","4":"4","5":"5","6":"6","7":"7","8":"8","9":"9","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9"},et=RegExp("[++]+"),rt=RegExp("([0-90-9٠-٩۰-۹])"),it=/^\(?\$1\)?$/,at=new d;b(at,11,"NA");var lt=/\[([^\[\]])*\]/g,ot=/\d(?=[^,}][^,}])/g,ut=RegExp("^[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/  ­​⁠ ()()[].\\[\\]/~⁓∼~]*)+$"),st=/[- ]/;E.prototype.K=function(){this.B="",r(this.h),r(this.u),r(this.m),this.s=0,this.v="",r(this.b),this.l="",r(this.a),this.j=!0,this.w=this.o=this.D=!1,this.f=[],this.A=!1,this.g!=this.J&&(this.g=I(this,this.C))},E.prototype.L=function(t){return this.B=F(this,t)},t("Cleave.AsYouTypeFormatter",E),t("Cleave.AsYouTypeFormatter.prototype.inputDigit",E.prototype.L),t("Cleave.AsYouTypeFormatter.prototype.clear",E.prototype.K)}).call(window);
hare1039/cdnjs
ajax/libs/cleave.js/0.4.8/addons/cleave-phone.ni.js
JavaScript
mit
13,081
webshim.register('mediacapture-picker', function($, webshim, window, document, undefined, featureOptions){ "use strict"; function PhotoShooter($dom){ this.$dom = $dom; this._createDom(); this.requestMedia(); } PhotoShooter.prototype = { _createDom: function(){ this.$dom.html('<div class="ws-videocapture-view">' + '<video class="ws-usermedia ws-inlineusermedia" autoplay=""></video>' + '<div class="ws-video-overlay"></div>' + '</div>' + '<div class="button-row"><button type="button" class="ws-capture-button">take</button>' + '</div>') ; }, requestMedia: function(){ var that = this; navigator.getUserMedia( {video: {minWidth: 200, audio: false}}, function(stream){ that.stream = stream; $('video', that.$dom).prop('src', URL.createObjectURL(stream)); }, function(){ } ); $('video', that.$dom).removeClass('ws-usermedia'); } }; webshim.mediacapture.showContent = function($fileinput, $button, popover){ var stream = new PhotoShooter(popover.contentElement); }; });
billybonz1/cdnjs
ajax/libs/webshim/1.15.7/dev/shims/mediacapture-picker.js
JavaScript
mit
1,066
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; z-index: 2000; position: fixed; height: 90px; width: 90px; margin: auto; top: 0; left: 0; right: 0; bottom: 0; } .pace.pace-inactive .pace-activity { display: none; } .pace .pace-activity { position: fixed; z-index: 2000; display: block; position: absolute; left: -30px; top: -30px; height: 90px; width: 90px; display: block; border-width: 30px; border-style: double; border-color: #fcd25a transparent transparent; border-radius: 50%; -webkit-animation: spin 1s linear infinite; -moz-animation: spin 1s linear infinite; -o-animation: spin 1s linear infinite; animation: spin 1s linear infinite; } .pace .pace-activity:before { content: ' '; position: absolute; top: 10px; left: 10px; height: 50px; width: 50px; display: block; border-width: 10px; border-style: solid; border-color: #fcd25a transparent transparent; border-radius: 50%; } @-webkit-keyframes spin { 100% { -webkit-transform: rotate(359deg); } } @-moz-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @-o-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @keyframes spin { 100% { transform: rotate(359deg); } }
Blueprint-Marketing/cdnjs
ajax/libs/pace/0.5.3/themes/yellow/pace-theme-center-radar.css
CSS
mit
1,359
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; z-index: 2000; position: fixed; height: 90px; width: 90px; margin: auto; top: 0; left: 0; right: 0; bottom: 0; } .pace.pace-inactive .pace-activity { display: none; } .pace .pace-activity { position: fixed; z-index: 2000; display: block; position: absolute; left: -30px; top: -30px; height: 90px; width: 90px; display: block; border-width: 30px; border-style: double; border-color: #eb7a55 transparent transparent; border-radius: 50%; -webkit-animation: spin 1s linear infinite; -moz-animation: spin 1s linear infinite; -o-animation: spin 1s linear infinite; animation: spin 1s linear infinite; } .pace .pace-activity:before { content: ' '; position: absolute; top: 10px; left: 10px; height: 50px; width: 50px; display: block; border-width: 10px; border-style: solid; border-color: #eb7a55 transparent transparent; border-radius: 50%; } @-webkit-keyframes spin { 100% { -webkit-transform: rotate(359deg); } } @-moz-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @-o-keyframes spin { 100% { -moz-transform: rotate(359deg); } } @keyframes spin { 100% { transform: rotate(359deg); } }
jonobr1/cdnjs
ajax/libs/pace/0.5.5/themes/orange/pace-theme-center-radar.css
CSS
mit
1,359
/* This is a compiled file, you should be editing the file in the templates directory */ .pace { -webkit-pointer-events: none; pointer-events: none; -webkit-user-select: none; -moz-user-select: none; user-select: none; } .pace .pace-activity { display: block; position: fixed; z-index: 2000; top: 0; right: 0; width: 300px; height: 300px; background: #22df80; -webkit-transition: -webkit-transform 0.3s; transition: transform 0.3s; -webkit-transform: translateX(100%) translateY(-100%) rotate(45deg); transform: translateX(100%) translateY(-100%) rotate(45deg); pointer-events: none; } .pace.pace-active .pace-activity { -webkit-transform: translateX(50%) translateY(-50%) rotate(45deg); transform: translateX(50%) translateY(-50%) rotate(45deg); } .pace .pace-activity::before, .pace .pace-activity::after { position: absolute; bottom: 30px; left: 50%; display: block; border: 5px solid #fff; border-radius: 50%; content: ''; } .pace .pace-activity::before { margin-left: -40px; width: 80px; height: 80px; border-right-color: rgba(0, 0, 0, .2); border-left-color: rgba(0, 0, 0, .2); -webkit-animation: pace-rotation 3s linear infinite; animation: pace-rotation 3s linear infinite; } .pace .pace-activity::after { bottom: 50px; margin-left: -20px; width: 40px; height: 40px; border-top-color: rgba(0, 0, 0, .2); border-bottom-color: rgba(0, 0, 0, .2); -webkit-animation: pace-rotation 1s linear infinite; animation: pace-rotation 1s linear infinite; } @-webkit-keyframes pace-rotation { 0% { -webkit-transform: rotate(0deg); } 100% { -webkit-transform: rotate(359deg); } } @keyframes pace-rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(359deg); } }
ahocevar/cdnjs
ajax/libs/pace/0.7.1/themes/green/pace-theme-corner-indicator.css
CSS
mit
1,812
<?php /** * ScaffoldTest file * * PHP 5 * * CakePHP(tm) Tests <http://book.cakephp.org/2.0/en/development/testing.html> * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice * * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) * @link http://book.cakephp.org/2.0/en/development/testing.html CakePHP(tm) Tests * @package Cake.Test.Case.Controller * @since CakePHP(tm) v 1.2.0.5436 * @license MIT License (http://www.opensource.org/licenses/mit-license.php) */ App::uses('Router', 'Routing'); App::uses('Controller', 'Controller'); App::uses('Scaffold', 'Controller'); App::uses('ScaffoldView', 'View'); App::uses('AppModel', 'Model'); require_once dirname(dirname(__FILE__)) . DS . 'Model' . DS . 'models.php'; /** * ScaffoldMockController class * * @package Cake.Test.Case.Controller */ class ScaffoldMockController extends Controller { /** * name property * * @var string 'ScaffoldMock' */ public $name = 'ScaffoldMock'; /** * scaffold property * * @var mixed */ public $scaffold; } /** * ScaffoldMockControllerWithFields class * * @package Cake.Test.Case.Controller */ class ScaffoldMockControllerWithFields extends Controller { /** * name property * * @var string 'ScaffoldMock' */ public $name = 'ScaffoldMock'; /** * scaffold property * * @var mixed */ public $scaffold; /** * function beforeScaffold * * @param string method */ public function beforeScaffold($method) { $this->set('scaffoldFields', array('title')); return true; } } /** * TestScaffoldMock class * * @package Cake.Test.Case.Controller */ class TestScaffoldMock extends Scaffold { /** * Overload _scaffold * * @param unknown_type $params */ protected function _scaffold(CakeRequest $request) { $this->_params = $request; } /** * Get Params from the Controller. * * @return unknown */ public function getParams() { return $this->_params; } } /** * Scaffold Test class * * @package Cake.Test.Case.Controller */ class ScaffoldTest extends CakeTestCase { /** * Controller property * * @var SecurityTestController */ public $Controller; /** * fixtures property * * @var array */ public $fixtures = array('core.article', 'core.user', 'core.comment', 'core.join_thing', 'core.tag'); /** * setUp method * * @return void */ public function setUp() { parent::setUp(); $request = new CakeRequest(null, false); $this->Controller = new ScaffoldMockController($request); $this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); } /** * tearDown method * * @return void */ public function tearDown() { parent::tearDown(); unset($this->Controller); } /** * Test the correct Generation of Scaffold Params. * This ensures that the correct action and view will be generated * * @return void */ public function testScaffoldParams() { $params = array( 'plugin' => null, 'pass' => array(), 'form' => array(), 'named' => array(), 'url' => array('url' => 'admin/scaffold_mock/edit'), 'controller' => 'scaffold_mock', 'action' => 'admin_edit', 'admin' => true, ); $this->Controller->request->base = ''; $this->Controller->request->webroot = '/'; $this->Controller->request->here = '/admin/scaffold_mock/edit'; $this->Controller->request->addParams($params); //set router. Router::setRequestInfo($this->Controller->request); $this->Controller->constructClasses(); $Scaffold = new TestScaffoldMock($this->Controller, $this->Controller->request); $result = $Scaffold->getParams(); $this->assertEquals('admin_edit', $result['action']); } /** * test that the proper names and variable values are set by Scaffold * * @return void */ public function testScaffoldVariableSetting() { $params = array( 'plugin' => null, 'pass' => array(), 'form' => array(), 'named' => array(), 'url' => array('url' => 'admin/scaffold_mock/edit'), 'controller' => 'scaffold_mock', 'action' => 'admin_edit', 'admin' => true, ); $this->Controller->request->base = ''; $this->Controller->request->webroot = '/'; $this->Controller->request->here = '/admin/scaffold_mock/edit'; $this->Controller->request->addParams($params); //set router. Router::setRequestInfo($this->Controller->request); $this->Controller->constructClasses(); $Scaffold = new TestScaffoldMock($this->Controller, $this->Controller->request); $result = $Scaffold->controller->viewVars; $this->assertEquals('Scaffold :: Admin Edit :: Scaffold Mock', $result['title_for_layout']); $this->assertEquals('Scaffold Mock', $result['singularHumanName']); $this->assertEquals('Scaffold Mock', $result['pluralHumanName']); $this->assertEquals('ScaffoldMock', $result['modelClass']); $this->assertEquals('id', $result['primaryKey']); $this->assertEquals('title', $result['displayField']); $this->assertEquals('scaffoldMock', $result['singularVar']); $this->assertEquals('scaffoldMock', $result['pluralVar']); $this->assertEquals(array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated'), $result['scaffoldFields']); $this->assertArrayHasKey('plugin', $result['associations']['belongsTo']['User']); } /** * test that Scaffold overrides the view property even if its set to 'Theme' * * @return void */ public function testScaffoldChangingViewProperty() { $this->Controller->action = 'edit'; $this->Controller->theme = 'TestTheme'; $this->Controller->viewClass = 'Theme'; $this->Controller->constructClasses(); new TestScaffoldMock($this->Controller, $this->Controller->request); $this->assertEquals('Scaffold', $this->Controller->viewClass); } /** * test that scaffold outputs flash messages when sessions are unset. * * @return void */ public function testScaffoldFlashMessages() { $params = array( 'plugin' => null, 'pass' => array(1), 'form' => array(), 'named' => array(), 'url' => array('url' => 'scaffold_mock'), 'controller' => 'scaffold_mock', 'action' => 'edit', ); $this->Controller->request->base = ''; $this->Controller->request->webroot = '/'; $this->Controller->request->here = '/scaffold_mock/edit'; $this->Controller->request->addParams($params); //set router. Router::reload(); Router::setRequestInfo($this->Controller->request); $this->Controller->request->data = array( 'ScaffoldMock' => array( 'id' => 1, 'title' => 'New title', 'body' => 'new body' ) ); $this->Controller->constructClasses(); unset($this->Controller->Session); ob_start(); new Scaffold($this->Controller, $this->Controller->request); $this->Controller->response->send(); $result = ob_get_clean(); $this->assertRegExp('/Scaffold Mock has been updated/', $result); } /** * test that habtm relationship keys get added to scaffoldFields. * * @return void */ public function testHabtmFieldAdditionWithScaffoldForm() { CakePlugin::unload(); $params = array( 'plugin' => null, 'pass' => array(1), 'form' => array(), 'named' => array(), 'url' => array('url' => 'scaffold_mock'), 'controller' => 'scaffold_mock', 'action' => 'edit', ); $this->Controller->request->base = ''; $this->Controller->request->webroot = '/'; $this->Controller->request->here = '/scaffold_mock/edit'; $this->Controller->request->addParams($params); //set router. Router::reload(); Router::setRequestInfo($this->Controller->request); $this->Controller->constructClasses(); ob_start(); $Scaffold = new Scaffold($this->Controller, $this->Controller->request); $this->Controller->response->send(); $result = ob_get_clean(); $this->assertRegExp('/name="data\[ScaffoldTag\]\[ScaffoldTag\]"/', $result); $result = $Scaffold->controller->viewVars; $this->assertEquals(array('id', 'user_id', 'title', 'body', 'published', 'created', 'updated', 'ScaffoldTag'), $result['scaffoldFields']); } /** * test that the proper names and variable values are set by Scaffold * * @return void */ public function testEditScaffoldWithScaffoldFields() { $request = new CakeRequest(null, false); $this->Controller = new ScaffoldMockControllerWithFields($request); $this->Controller->response = $this->getMock('CakeResponse', array('_sendHeader')); $params = array( 'plugin' => null, 'pass' => array(1), 'form' => array(), 'named' => array(), 'url' => array('url' => 'scaffold_mock/edit'), 'controller' => 'scaffold_mock', 'action' => 'edit', ); $this->Controller->request->base = ''; $this->Controller->request->webroot = '/'; $this->Controller->request->here = '/scaffold_mock/edit'; $this->Controller->request->addParams($params); //set router. Router::reload(); Router::setRequestInfo($this->Controller->request); $this->Controller->constructClasses(); ob_start(); new Scaffold($this->Controller, $this->Controller->request); $this->Controller->response->send(); $result = ob_get_clean(); $this->assertNotRegExp('/textarea name="data\[ScaffoldMock\]\[body\]" cols="30" rows="6" id="ScaffoldMockBody"/', $result); } }
demorfi/calibrephp
lib/Cake/Test/Case/Controller/ScaffoldTest.php
PHP
mit
9,354
/* * /MathJax/localization/en/FontWarnings.js * * Copyright (c) 2009-2017 The MathJax Consortium * * 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. */ MathJax.Localization.addTranslation("en","FontWarnings",{version:"2.7.2-beta.1",isLoaded:true,strings:{webFont:"MathJax is using web-based fonts to display the mathematics on this page. These take time to download, so the page would render faster if you installed math fonts directly in your system's font folder.",imageFonts:"MathJax is using its image fonts rather than local or web-based fonts. This will render slower than usual, and the mathematics may not print at the full resolution of your printer.",noFonts:"MathJax is unable to locate a font to use to display its mathematics, and image fonts are not available, so it is falling back on generic Unicode characters in hopes that your browser will be able to display them. Some characters may not show up properly, or possibly not at all.",webFonts:"Most modern browsers allow for fonts to be downloaded over the web. Updating to a more recent version of your browser (or changing browsers) could improve the quality of the mathematics on this page.",fonts:"MathJax can use either the [STIX fonts](%1) or the [MathJax TeX fonts](%2). Download and install one of those fonts to improve your MathJax experience.",STIXPage:"This page is designed to use the [STIX fonts](%1). Download and install those fonts to improve your MathJax experience.",TeXPage:"This page is designed to use the [MathJax TeX fonts](%1). Download and install those fonts to improve your MathJax experience."}});MathJax.Ajax.loadComplete("[MathJax]/localization/en/FontWarnings.js");
ahocevar/cdnjs
ajax/libs/mathjax/2.7.2-beta.1/localization/en/FontWarnings.js
JavaScript
mit
2,191
// TODO: Fix these unit tests! describe("Env", function() { var env; beforeEach(function() { env = new j$.Env(); }); it('removes all spies when env is executed', function(done) { originalFoo = function() {}, testObj = { foo: originalFoo }, firstSpec = jasmine.createSpy('firstSpec').and.callFake(function() { env.spyOn(testObj, 'foo'); }), secondSpec = jasmine.createSpy('secondSpec').and.callFake(function() { expect(testObj.foo).toBe(originalFoo); }); env.describe('test suite', function() { env.it('spec 0', firstSpec); env.it('spec 1', secondSpec); }); var assertions = function() { expect(firstSpec).toHaveBeenCalled(); expect(secondSpec).toHaveBeenCalled(); done(); }; env.addReporter({ jasmineDone: assertions }); env.execute(); }); describe("#spyOn", function() { it("checks for the existence of the object", function() { expect(function() { env.spyOn(void 0, 'pants'); }).toThrowError(/could not find an object/); }); it("checks for the existence of the method", function() { var subject = {}; expect(function() { env.spyOn(subject, 'pants'); }).toThrowError(/method does not exist/); }); it("checks if it has already been spied upon", function() { var subject = { spiedFunc: function() {} }; env.spyOn(subject, 'spiedFunc'); expect(function() { env.spyOn(subject, 'spiedFunc'); }).toThrowError(/has already been spied upon/); }); it("overrides the method on the object and returns the spy", function() { var originalFunctionWasCalled = false; var subject = { spiedFunc: function() { originalFunctionWasCalled = true; } }; var spy = env.spyOn(subject, 'spiedFunc'); expect(subject.spiedFunc).toEqual(spy); }); }); describe("#pending", function() { it("throws the Pending Spec exception", function() { expect(function() { env.pending(); }).toThrow(j$.Spec.pendingSpecExceptionMessage); }); }); describe("#topSuite", function() { it("returns the Jasmine top suite for users to traverse the spec tree", function() { var suite = env.topSuite(); expect(suite.description).toEqual('Jasmine__TopLevel__Suite'); }); }); });
pastorenue/model
lib/jasmine/spec/core/EnvSpec.js
JavaScript
mit
2,349
<?php /** * PHP Token Reflection * * Version 1.4.0 * * LICENSE * * This source file is subject to the new BSD license that is bundled * with this library in the file LICENSE.md. * * @author Ondřej Nešpor * @author Jaroslav Hanslík */ namespace TokenReflection; /** * TokenReflection Resolver class. */ class Resolver { /** * Placeholder for non-existen constants. * * @var null */ const CONSTANT_NOT_FOUND = '~~NOT RESOLVED~~'; /** * Returns a fully qualified name of a class using imported/aliased namespaces. * * @param string $className Input class name * @param array $aliases Namespace import aliases * @param string $namespaceName Context namespace name * @return string */ final public static function resolveClassFQN($className, array $aliases, $namespaceName = null) { if ($className{0} == '\\') { // FQN return ltrim($className, '\\'); } if (false === ($position = strpos($className, '\\'))) { // Plain class name if (isset($aliases[$className])) { return $aliases[$className]; } } else { // Namespaced class name $alias = substr($className, 0, $position); if (isset($aliases[$alias])) { return $aliases[$alias] . '\\' . substr($className, $position + 1); } } return null === $namespaceName || '' === $namespaceName || $namespaceName === ReflectionNamespace::NO_NAMESPACE_NAME ? $className : $namespaceName . '\\' . $className; } /** * Returns a property/parameter/constant/static variable value definition. * * @param array $tokens Tokenized definition * @param \TokenReflection\ReflectionElement $reflection Caller reflection * @return string * @throws \TokenReflection\Exception\RuntimeException If an invalid reflection object was provided. * @throws \TokenReflection\Exception\RuntimeException If an invalid source code was provided. */ final public static function getValueDefinition(array $tokens, ReflectionElement $reflection) { if ($reflection instanceof ReflectionConstant || $reflection instanceof ReflectionFunction) { $namespace = $reflection->getNamespaceName(); } elseif ($reflection instanceof ReflectionParameter) { $namespace = $reflection->getDeclaringFunction()->getNamespaceName(); } elseif ($reflection instanceof ReflectionProperty || $reflection instanceof ReflectionMethod) { $namespace = $reflection->getDeclaringClass()->getNamespaceName(); } else { throw new Exception\RuntimeException('Invalid reflection object given.', Exception\RuntimeException::INVALID_ARGUMENT, $reflection); } // Process __LINE__ constants; replace with the line number of the corresponding token foreach ($tokens as $index => $token) { if (T_LINE === $token[0]) { $tokens[$index] = array( T_LNUMBER, $token[2], $token[2] ); } } $source = self::getSourceCode($tokens); $constants = self::findConstants($tokens, $reflection); if (!empty($constants)) { foreach (array_reverse($constants, true) as $offset => $constant) { $value = ''; try { switch ($constant) { case '__FILE__': $value = $reflection->getFileName(); break; case '__DIR__': $value = dirname($reflection->getFileName()); break; case '__FUNCTION__': if ($reflection instanceof IReflectionParameter) { $value = $reflection->getDeclaringFunctionName(); } elseif ($reflection instanceof IReflectionFunctionBase) { $value = $reflection->getName(); } break; case '__CLASS__': if ($reflection instanceof IReflectionConstant || $reflection instanceof IReflectionParameter || $reflection instanceof IReflectionProperty || $reflection instanceof IReflectionMethod) { $value = $reflection->getDeclaringClassName() ?: ''; } break; case '__TRAIT__': if ($reflection instanceof IReflectionMethod || $reflection instanceof IReflectionProperty) { $value = $reflection->getDeclaringTraitName() ?: ''; } elseif ($reflection instanceof IReflectionParameter) { $method = $reflection->getDeclaringFunction(); if ($method instanceof IReflectionMethod) { $value = $method->getDeclaringTraitName() ?: ''; } } break; case '__METHOD__': if ($reflection instanceof IReflectionParameter) { if (null !== $reflection->getDeclaringClassName()) { $value = $reflection->getDeclaringClassName() . '::' . $reflection->getDeclaringFunctionName(); } else { $value = $reflection->getDeclaringFunctionName(); } } elseif ($reflection instanceof IReflectionConstant || $reflection instanceof IReflectionProperty) { $value = $reflection->getDeclaringClassName() ?: ''; } elseif ($reflection instanceof IReflectionMethod) { $value = $reflection->getDeclaringClassName() . '::' . $reflection->getName(); } elseif ($reflection instanceof IReflectionFunction) { $value = $reflection->getName(); } break; case '__NAMESPACE__': if (($reflection instanceof IReflectionConstant && null !== $reflection->getDeclaringClassName()) || $reflection instanceof IReflectionProperty) { $value = $reflection->getDeclaringClass()->getNamespaceName(); } elseif ($reflection instanceof IReflectionParameter) { if (null !== $reflection->getDeclaringClassName()) { $value = $reflection->getDeclaringClass()->getNamespaceName(); } else { $value = $reflection->getDeclaringFunction()->getNamespaceName(); } } elseif ($reflection instanceof IReflectionMethod) { $value = $reflection->getDeclaringClass()->getNamespaceName(); } else { $value = $reflection->getNamespaceName(); } break; default: if (0 === stripos($constant, 'self::') || 0 === stripos($constant, 'parent::')) { // Handle self:: and parent:: definitions if ($reflection instanceof ReflectionConstant && null === $reflection->getDeclaringClassName()) { throw new Exception\RuntimeException('Top level constants cannot use self:: and parent:: references.', Exception\RuntimeException::UNSUPPORTED, $reflection); } elseif ($reflection instanceof ReflectionParameter && null === $reflection->getDeclaringClassName()) { throw new Exception\RuntimeException('Function parameters cannot use self:: and parent:: references.', Exception\RuntimeException::UNSUPPORTED, $reflection); } if (0 === stripos($constant, 'self::')) { $className = $reflection->getDeclaringClassName(); } else { $declaringClass = $reflection->getDeclaringClass(); $className = $declaringClass->getParentClassName() ?: self::CONSTANT_NOT_FOUND; } $constantName = $className . substr($constant, strpos($constant, '::')); } else { $constantName = self::resolveClassFQN($constant, $reflection->getNamespaceAliases(), $namespace); if ($cnt = strspn($constant, '\\')) { $constantName = str_repeat('\\', $cnt) . $constantName; } } $constantReflection = $reflection->getBroker()->getConstant($constantName); $value = $constantReflection->getValue(); } } catch (Exception\RuntimeException $e) { $value = self::CONSTANT_NOT_FOUND; } $source = substr_replace($source, var_export($value, true), $offset, strlen($constant)); } } return self::evaluate(sprintf("return %s;\n", $source)); } /** * Returns a part of the source code defined by given tokens. * * @param array $tokens Tokens array * @return array */ final public static function getSourceCode(array $tokens) { if (empty($tokens)) { return null; } $source = ''; foreach ($tokens as $token) { $source .= $token[1]; } return $source; } /** * Finds constant names in the token definition. * * @param array $tokens Tokenized source code * @param \TokenReflection\ReflectionElement $reflection Caller reflection * @return array */ final public static function findConstants(array $tokens, ReflectionElement $reflection) { static $accepted = array( T_DOUBLE_COLON => true, T_STRING => true, T_NS_SEPARATOR => true, T_CLASS_C => true, T_DIR => true, T_FILE => true, T_LINE => true, T_FUNC_C => true, T_METHOD_C => true, T_NS_C => true, T_TRAIT_C => true ); static $dontResolve = array('true' => true, 'false' => true, 'null' => true); // Adding a dummy token to the end $tokens[] = array(null); $constants = array(); $constant = ''; $offset = 0; foreach ($tokens as $token) { if (isset($accepted[$token[0]])) { $constant .= $token[1]; } elseif ('' !== $constant) { if (!isset($dontResolve[strtolower($constant)])) { $constants[$offset - strlen($constant)] = $constant; } $constant = ''; } if (null !== $token[0]) { $offset += strlen($token[1]); } } return $constants; } /** * Evaluates a source code. * * @param string $source Source code * @return mixed */ final private static function evaluate($source) { return eval($source); } }
genextwebs/dropbox-sample
vendor/andrewsville/php-token-reflection/TokenReflection/Resolver.php
PHP
mit
9,220
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\WebConfiguratorBundle\Step; use Symfony\Bundle\WebConfiguratorBundle\Exception\StepRequirementException; use Symfony\Bundle\WebConfiguratorBundle\Form\SecretStepType; use Symfony\Component\Validator\Constraints as Assert; /** * Secret Step. * * @author Fabien Potencier <fabien@symfony.com> */ class SecretStep implements StepInterface { /** * @Assert\NotBlank */ public $secret; public function __construct(array $parameters) { $this->secret = $parameters['secret']; if ('ThisTokenIsNotSoSecretChangeIt' == $this->secret) { $this->secret = hash('sha1', uniqid(mt_rand())); } } /** * @see StepInterface */ public function getFormType() { return new SecretStepType(); } /** * @see StepInterface */ public function checkRequirements() { return array(); } /** * checkOptionalSettings */ public function checkOptionalSettings() { return array(); } /** * @see StepInterface */ public function update(StepInterface $data) { return array('secret' => $data->secret); } /** * @see StepInterface */ public function getTemplate() { return 'SymfonyWebConfiguratorBundle:Step:secret.html.twig'; } }
cutesquirrel/TestMe
vendor/bundles/Symfony/Bundle/WebConfiguratorBundle/Step/SecretStep.php
PHP
mit
1,598
# frozen_string_literal: true require_relative "abstract_unit" class AssertionsTest < ActiveSupport::TestCase def setup @object = Class.new do attr_accessor :num def increment self.num += 1 end def decrement self.num -= 1 end end.new @object.num = 0 end def test_assert_not assert_equal true, assert_not(nil) assert_equal true, assert_not(false) e = assert_raises(Minitest::Assertion) { assert_not true } assert_equal "Expected true to be nil or false", e.message e = assert_raises(Minitest::Assertion) { assert_not true, "custom" } assert_equal "custom", e.message end def test_assert_no_difference_pass assert_no_difference "@object.num" do # ... end end def test_assert_no_difference_fail error = assert_raises(Minitest::Assertion) do assert_no_difference "@object.num" do @object.increment end end assert_equal "\"@object.num\" didn't change by 0.\nExpected: 0\n Actual: 1", error.message end def test_assert_no_difference_with_message_fail error = assert_raises(Minitest::Assertion) do assert_no_difference "@object.num", "Object Changed" do @object.increment end end assert_equal "Object Changed.\n\"@object.num\" didn't change by 0.\nExpected: 0\n Actual: 1", error.message end def test_assert_no_difference_with_multiple_expressions_pass another_object = @object.dup assert_no_difference ["@object.num", -> { another_object.num }] do # ... end end def test_assert_no_difference_with_multiple_expressions_fail another_object = @object.dup assert_raises(Minitest::Assertion) do assert_no_difference ["@object.num", -> { another_object.num }], "Another Object Changed" do another_object.increment end end end def test_assert_difference assert_difference "@object.num", +1 do @object.increment end end def test_assert_difference_retval incremented = assert_difference "@object.num", +1 do @object.increment end assert_equal incremented, 1 end def test_assert_difference_with_implicit_difference assert_difference "@object.num" do @object.increment end end def test_arbitrary_expression assert_difference "@object.num + 1", +2 do @object.increment @object.increment end end def test_negative_differences assert_difference "@object.num", -1 do @object.decrement end end def test_expression_is_evaluated_in_the_appropriate_scope silence_warnings do local_scope = "foo" _ = local_scope # to suppress unused variable warning assert_difference("local_scope; @object.num") { @object.increment } end end def test_array_of_expressions assert_difference [ "@object.num", "@object.num + 1" ], +1 do @object.increment end end def test_array_of_expressions_identify_failure assert_raises(Minitest::Assertion) do assert_difference ["@object.num", "1 + 1"] do @object.increment end end end def test_array_of_expressions_identify_failure_when_message_provided assert_raises(Minitest::Assertion) do assert_difference ["@object.num", "1 + 1"], 1, "something went wrong" do @object.increment end end end def test_hash_of_expressions assert_difference "@object.num" => 1, "@object.num + 1" => 1 do @object.increment end end def test_hash_of_expressions_with_message error = assert_raises Minitest::Assertion do assert_difference({ "@object.num" => 0 }, "Object Changed") do @object.increment end end assert_equal "Object Changed.\n\"@object.num\" didn't change by 0.\nExpected: 0\n Actual: 1", error.message end def test_hash_of_lambda_expressions assert_difference -> { @object.num } => 1, -> { @object.num + 1 } => 1 do @object.increment end end def test_hash_of_expressions_identify_failure assert_raises(Minitest::Assertion) do assert_difference "@object.num" => 1, "1 + 1" => 1 do @object.increment end end end def test_assert_changes_pass assert_changes "@object.num" do @object.increment end end def test_assert_changes_pass_with_lambda assert_changes -> { @object.num } do @object.increment end end def test_assert_changes_with_from_option assert_changes "@object.num", from: 0 do @object.increment end end def test_assert_changes_with_from_option_with_wrong_value assert_raises Minitest::Assertion do assert_changes "@object.num", from: -1 do @object.increment end end end def test_assert_changes_with_from_option_with_nil error = assert_raises Minitest::Assertion do assert_changes "@object.num", from: nil do @object.increment end end assert_equal "Expected change from nil", error.message end def test_assert_changes_with_to_option assert_changes "@object.num", to: 1 do @object.increment end end def test_assert_changes_with_to_option_but_no_change_has_special_message error = assert_raises Minitest::Assertion do assert_changes "@object.num", to: 0 do # no changes end end assert_equal "\"@object.num\" didn't change. It was already 0.\nExpected 0 to not be equal to 0.", error.message end def test_assert_changes_with_wrong_to_option assert_raises Minitest::Assertion do assert_changes "@object.num", to: 2 do @object.increment end end end def test_assert_changes_with_from_option_and_to_option assert_changes "@object.num", from: 0, to: 1 do @object.increment end end def test_assert_changes_with_from_and_to_options_and_wrong_to_value assert_raises Minitest::Assertion do assert_changes "@object.num", from: 0, to: 2 do @object.increment end end end def test_assert_changes_works_with_any_object # Silences: instance variable @new_object not initialized. retval = silence_warnings do assert_changes :@new_object, from: nil, to: 42 do @new_object = 42 end end assert_equal 42, retval end def test_assert_changes_works_with_nil oldval = @object retval = assert_changes :@object, from: oldval, to: nil do @object = nil end assert_nil retval end def test_assert_changes_with_to_and_case_operator token = nil assert_changes -> { token }, to: /\w{32}/ do token = SecureRandom.hex end end def test_assert_changes_with_to_and_from_and_case_operator token = SecureRandom.hex assert_changes -> { token }, from: /\w{32}/, to: /\w{32}/ do token = SecureRandom.hex end end def test_assert_changes_with_message error = assert_raises Minitest::Assertion do assert_changes "@object.num", "@object.num should be 1", to: 1 do @object.decrement end end assert_equal "@object.num should be 1.\nExpected change to 1\n", error.message end def test_assert_no_changes_pass assert_no_changes "@object.num" do # ... end end def test_assert_no_changes_with_message error = assert_raises Minitest::Assertion do assert_no_changes "@object.num", "@object.num should not change" do @object.increment end end assert_equal "@object.num should not change.\n\"@object.num\" changed.\nExpected: 0\n Actual: 1", error.message end def test_assert_no_changes_with_long_string_wont_output_everything lines = "HEY\n" * 12 error = assert_raises Minitest::Assertion do assert_no_changes "lines" do lines += "HEY ALSO\n" end end assert_match <<~output, error.message "lines" changed. --- expected +++ actual @@ -10,4 +10,5 @@ HEY HEY HEY +HEY ALSO " output end end # Setup and teardown callbacks. class SetupAndTeardownTest < ActiveSupport::TestCase setup :reset_callback_record, :foo teardown :foo, :sentinel def test_inherited_setup_callbacks assert_equal [:reset_callback_record, :foo], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo], @called_back assert_equal [:foo, :sentinel], self.class._teardown_callbacks.map(&:raw_filter) end def setup end def teardown end private def reset_callback_record @called_back = [] end def foo @called_back << :foo end def sentinel assert_equal [:foo], @called_back end end class SubclassSetupAndTeardownTest < SetupAndTeardownTest setup :bar teardown :bar def test_inherited_setup_callbacks assert_equal [:reset_callback_record, :foo, :bar], self.class._setup_callbacks.map(&:raw_filter) assert_equal [:foo, :bar], @called_back assert_equal [:foo, :sentinel, :bar], self.class._teardown_callbacks.map(&:raw_filter) end private def bar @called_back << :bar end def sentinel assert_equal [:foo, :bar, :bar], @called_back end end class TestCaseTaggedLoggingTest < ActiveSupport::TestCase def before_setup require "stringio" @out = StringIO.new self.tagged_logger = ActiveSupport::TaggedLogging.new(Logger.new(@out)) super end def test_logs_tagged_with_current_test_case assert_match "#{self.class}: #{name}\n", @out.string end end class TestOrderTest < ActiveSupport::TestCase def setup @original_test_order = ActiveSupport::TestCase.test_order end def teardown ActiveSupport::TestCase.test_order = @original_test_order end def test_defaults_to_random ActiveSupport::TestCase.test_order = nil assert_equal :random, ActiveSupport::TestCase.test_order assert_equal :random, ActiveSupport.test_order end def test_test_order_is_global ActiveSupport::TestCase.test_order = :sorted assert_equal :sorted, ActiveSupport.test_order assert_equal :sorted, ActiveSupport::TestCase.test_order assert_equal :sorted, self.class.test_order assert_equal :sorted, Class.new(ActiveSupport::TestCase).test_order ActiveSupport.test_order = :random assert_equal :random, ActiveSupport.test_order assert_equal :random, ActiveSupport::TestCase.test_order assert_equal :random, self.class.test_order assert_equal :random, Class.new(ActiveSupport::TestCase).test_order end end
eileencodes/rails
activesupport/test/test_case_test.rb
Ruby
mit
10,482
// Type definitions for sql.js // Project: https://github.com/kripken/sql.js // Definitions by: George Wu <https://github.com/Hozuki/> // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped /// <reference path="../node/node.d.ts" /> declare module "sql.js" { class Database { constructor(); constructor(data: Buffer); constructor(data: Uint8Array); constructor(data: number[]); run(sql: string): Database; run(sql: string, params: { [key: string]: number | string | Uint8Array }): Database; run(sql: string, params: (number | string | Uint8Array)[]): Database; exec(sql: string): QueryResults[]; each(sql: string, callback: (obj: { [columnName: string]: number | string | Uint8Array }) => void, done: () => void): void; each(sql: string, params: { [key: string]: number | string | Uint8Array }, callback: (obj: { [columnName: string]: number | string | Uint8Array }) => void, done: () => void): void; each(sql: string, params: (number | string | Uint8Array)[], callback: (obj: { [columnName: string]: number | string | Uint8Array }) => void, done: () => void): void; prepare(sql: string): Statement; prepare(sql: string, params: { [key: string]: number | string | Uint8Array }): Statement; prepare(sql: string, params: (number | string | Uint8Array)[]): Statement; export(): Uint8Array; close(): void; getRowsModified(): number; create_function(name: string, func: Function): void; } class Statement { bind(): boolean; bind(values: { [key: string]: number | string | Uint8Array }): boolean; bind(values: (number | string | Uint8Array)[]): boolean; step(): boolean; get(): (number | string | Uint8Array)[]; get(params: { [key: string]: number | string | Uint8Array }): (number | string | Uint8Array)[]; get(params: (number | string | Uint8Array)[]): (number | string | Uint8Array)[]; getColumnNames(): string[]; getAsObject(): { [columnName: string]: number | string | Uint8Array }; getAsObject(params: { [key: string]: number | string | Uint8Array }): { [columnName: string]: number | string | Uint8Array }; getAsObject(params: (number | string | Uint8Array)[]): { [columnName: string]: number | string | Uint8Array }; run(): void; run(values: { [key: string]: number | string | Uint8Array }): void; run(values: (number | string | Uint8Array)[]): void; reset(): void; freemem(): void; free(): boolean; } interface QueryResults { columns: string[]; values: (number | string | Uint8Array)[][]; } }
arma-gast/DefinitelyTyped
sql.js/sql.js.d.ts
TypeScript
mit
2,750
/* * Copyright (C) Narf Industries <info@narfindustries.com> * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included * in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #include <libcgc.h> #include <stdint.h> #include "list.h" #include "malloc.h" #include "memset.h" struct node *list_create_node(void *data) { struct node *np = malloc(sizeof(struct node)); if (NULL == np) { return np; } np->data = data; np->next = 0; np->prev = 0; return np; } void list_destroy_node(struct list *l, struct node **n) { // destroy node->data if (NULL != l->ndf) { l->ndf((*n)->data); } (*n)->data = NULL; (*n)->next = NULL; (*n)->prev = NULL; // destroy node free(*n); *n = NULL; } void list_init(struct list *l, nodeDataFreeFn ndf) { l->length = 0; l->dummy.data = NULL; l->dummy.next = &(l->dummy); l->dummy.prev = &(l->dummy); l->ndf = ndf; } void list_destroy(struct list *l) { while (NULL != list_head_node(l)) { struct node *h = list_pop(l); list_destroy_node(l, &h); } l->length = 0; l->dummy.next = NULL; l->dummy.prev = NULL; l->ndf = NULL; } void list_insert_before_node(struct node *existing, struct node *new) { new->next = existing; new->prev = existing->prev; new->prev->next = new; new->next->prev = new; } void list_insert_after_node(struct node *existing, struct node *new) { list_insert_before_node(existing->next, new); } void list_insert_node_at_end(struct list *l, struct node *new) { struct node *t = list_end_marker(l); list_insert_before_node(t, new); l->length++; } void list_insert_at_end(struct list *l, void *d) { struct node *new = list_create_node(d); list_insert_node_at_end(l, new); } void list_insert_node_at_start(struct list *l, struct node *new) { struct node *t = list_start_marker(l); list_insert_after_node(t, new); l->length++; } void list_insert_at_start(struct list *l, void *d) { struct node *new = list_create_node(d); list_insert_node_at_start(l, new); } void list_insert_node_sorted(struct list *l, struct node *new, unsigned char (*predFn)(const void *, void *), unsigned char desc) { struct node *cur = NULL; if (0 == l->length) { list_insert_node_at_start(l, new); } else { cur = list_head_node(l); while ((cur != list_end_marker(l)) && (desc != predFn(new->data, cur->data))) { cur = list_next_node(cur); } list_insert_before_node(cur, new); l->length++; } } void list_insert_sorted(struct list *l, void *d, unsigned char (*predFn)(const void *, void *), unsigned char desc) { struct node *new = list_create_node(d); list_insert_node_sorted(l, new, predFn, desc); } struct node *list_pop(struct list *l) { struct node *h = list_head_node(l); if (NULL == h) return h; list_remove_node(l, h); return h; } void list_remove_node(struct list *l, struct node *n) { struct node *prev = n->prev; struct node *next = n->next; prev->next = next; next->prev = prev; n->prev = NULL; n->next = NULL; l->length--; } struct node *list_head_node(struct list *l) { if (&(l->dummy) == l->dummy.next) { return NULL; } return l->dummy.next; } struct node *list_tail_node(struct list *l) { if (&(l->dummy) == l->dummy.prev) { return NULL; } return l->dummy.prev; } struct node *list_next_node(struct node *cur_node) { return cur_node->next; } struct node *list_start_marker(struct list *l) { return list_end_marker(l); } struct node *list_end_marker(struct list *l) { return &(l->dummy); } unsigned int list_length(struct list *l) { return l->length; } struct node *list_find_node_with_data(struct list *l, unsigned char (*predFn)(const void *, void *), void *data) { struct node *n = list_head_node(l); struct node *end = list_end_marker(l); while ((NULL != n) && (n != end)) { if (TRUE == predFn((const void *)n->data, data)) { return n; } else { n = n->next; } } return NULL; }
f0rki/cb-multios
original-challenges/Snail_Mail/lib/list.c
C
mit
4,810
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Bundle\TwigBundle\CacheWarmer; use Psr\Container\ContainerInterface; use Symfony\Component\DependencyInjection\ServiceSubscriberInterface; use Symfony\Component\Finder\Finder; use Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerInterface; use Symfony\Bundle\FrameworkBundle\CacheWarmer\TemplateFinderInterface; use Symfony\Component\Templating\TemplateReference; use Twig\Environment; use Twig\Error\Error; /** * Generates the Twig cache for all templates. * * This warmer must be registered after TemplatePathsCacheWarmer, * as the Twig loader will need the cache generated by it. * * @author Fabien Potencier <fabien@symfony.com> */ class TemplateCacheCacheWarmer implements CacheWarmerInterface, ServiceSubscriberInterface { protected $container; protected $finder; private $paths; /** * @param array $paths Additional twig paths to warm */ public function __construct(ContainerInterface $container, TemplateFinderInterface $finder = null, array $paths = array()) { // We don't inject the Twig environment directly as it depends on the // template locator (via the loader) which might be a cached one. // The cached template locator is available once the TemplatePathsCacheWarmer // has been warmed up. // But it can also be null if templating has been disabled. $this->container = $container; $this->finder = $finder; $this->paths = $paths; } /** * Warms up the cache. * * @param string $cacheDir The cache directory */ public function warmUp($cacheDir) { if (null === $this->finder) { return; } $twig = $this->container->get('twig'); $templates = $this->finder->findAllTemplates(); foreach ($this->paths as $path => $namespace) { $templates = array_merge($templates, $this->findTemplatesInFolder($namespace, $path)); } foreach ($templates as $template) { if ('twig' !== $template->get('engine')) { continue; } try { $twig->loadTemplate($template); } catch (Error $e) { // problem during compilation, give up } } } /** * Checks whether this warmer is optional or not. * * @return bool always true */ public function isOptional() { return true; } /** * {@inheritdoc} */ public static function getSubscribedServices() { return array( 'twig' => Environment::class, ); } /** * Find templates in the given directory. * * @param string $namespace The namespace for these templates * @param string $dir The folder where to look for templates * * @return array An array of templates of type TemplateReferenceInterface */ private function findTemplatesInFolder($namespace, $dir) { if (!is_dir($dir)) { return array(); } $templates = array(); $finder = new Finder(); foreach ($finder->files()->followLinks()->in($dir) as $file) { $name = $file->getRelativePathname(); $templates[] = new TemplateReference( $namespace ? sprintf('@%s/%s', $namespace, $name) : $name, 'twig' ); } return $templates; } }
WhiteEagle88/symfony
src/Symfony/Bundle/TwigBundle/CacheWarmer/TemplateCacheCacheWarmer.php
PHP
mit
3,701
var path = require('path') var e2c = require('electron-to-chromium/versions') var agents = require('caniuse-lite/dist/unpacker/agents').agents var BrowserslistError = require('./error') var env = require('./node') // Will load browser.js in webpack var FLOAT_RANGE = /^\d+(\.\d+)?(-\d+(\.\d+)?)*$/ function normalize (versions) { return versions.filter(function (version) { return typeof version === 'string' }) } function nameMapper (name) { return function mapName (version) { return name + ' ' + version } } function getMajor (version) { return parseInt(version.split('.')[0]) } function getMajorVersions (released, number) { if (released.length === 0) return [] var minimum = getMajor(released[released.length - 1]) - parseInt(number) + 1 var selected = [] for (var i = released.length - 1; i >= 0; i--) { if (minimum > getMajor(released[i])) break selected.unshift(released[i]) } return selected } function uniq (array) { var filtered = [] for (var i = 0; i < array.length; i++) { if (filtered.indexOf(array[i]) === -1) filtered.push(array[i]) } return filtered } // Helpers function fillUsage (result, name, data) { for (var i in data) { result[name + ' ' + i] = data[i] } } function generateFilter (sign, version) { version = parseFloat(version) if (sign === '>') { return function (v) { return parseFloat(v) > version } } else if (sign === '>=') { return function (v) { return parseFloat(v) >= version } } else if (sign === '<') { return function (v) { return parseFloat(v) < version } } else { return function (v) { return parseFloat(v) <= version } } } function compareStrings (a, b) { if (a < b) return -1 if (a > b) return +1 return 0 } function normalizeVersion (data, version) { if (data.versions.indexOf(version) !== -1) { return version } else if (browserslist.versionAliases[data.name][version]) { return browserslist.versionAliases[data.name][version] } else if (data.versions.length === 1) { return data.versions[0] } else { return false } } function filterByYear (since) { return Object.keys(agents).reduce(function (selected, name) { var data = byName(name) if (!data) return selected var versions = Object.keys(data.releaseDate).filter(function (v) { return data.releaseDate[v] >= since }) return selected.concat(versions.map(nameMapper(data.name))) }, []) } function byName (name) { name = name.toLowerCase() name = browserslist.aliases[name] || name return browserslist.data[name] } function checkName (name) { var data = byName(name) if (!data) throw new BrowserslistError('Unknown browser ' + name) return data } function unknownQuery (query) { return new BrowserslistError('Unknown browser query `' + query + '`') } function resolve (queries, context) { return queries.reduce(function (result, selection, index) { selection = selection.trim() if (selection === '') return result var isExclude = selection.indexOf('not ') === 0 if (isExclude) { if (index === 0) { throw new BrowserslistError( 'Write any browsers query (for instance, `defaults`) ' + 'before `' + selection + '`') } selection = selection.slice(4) } for (var i = 0; i < QUERIES.length; i++) { var type = QUERIES[i] var match = selection.match(type.regexp) if (match) { var args = [context].concat(match.slice(1)) var array = type.select.apply(browserslist, args) if (isExclude) { array = array.concat(array.map(function (j) { return j.replace(/\s\S+/, ' 0') })) return result.filter(function (j) { return array.indexOf(j) === -1 }) } return result.concat(array) } } throw unknownQuery(selection) }, []) } /** * Return array of browsers by selection queries. * * @param {(string|string[])} [queries=browserslist.defaults] Browser queries. * @param {object} [opts] Options. * @param {string} [opts.path="."] Path to processed file. * It will be used to find config files. * @param {string} [opts.env="production"] Processing environment. * It will be used to take right * queries from config file. * @param {string} [opts.config] Path to config file with queries. * @param {object} [opts.stats] Custom browser usage statistics * for "> 1% in my stats" query. * @param {boolean} [opts.ignoreUnknownVersions=false] Do not throw on unknown * version in direct query. * @param {boolean} [opts.dangerousExtend] Disable security checks * for extend query. * @return {string[]} Array with browser names in Can I Use. * * @example * browserslist('IE >= 10, IE 8') //=> ['ie 11', 'ie 10', 'ie 8'] */ function browserslist (queries, opts) { if (typeof opts === 'undefined') opts = { } if (typeof opts.path === 'undefined') { opts.path = path.resolve ? path.resolve('.') : '.' } if (typeof queries === 'undefined' || queries === null) { var config = browserslist.loadConfig(opts) if (config) { queries = config } else { queries = browserslist.defaults } } if (typeof queries === 'string') { queries = queries.split(/,\s*/) } if (!Array.isArray(queries)) { throw new BrowserslistError( 'Browser queries must be an array. Got ' + typeof queries + '.') } var context = { ignoreUnknownVersions: opts.ignoreUnknownVersions, dangerousExtend: opts.dangerousExtend } var stats = env.getStat(opts) if (stats) { context.customUsage = { } for (var browser in stats) { fillUsage(context.customUsage, browser, stats[browser]) } } var result = resolve(queries, context).map(function (i) { var parts = i.split(' ') var name = parts[0] var version = parts[1] if (version === '0') { return name + ' ' + byName(name).versions[0] } else { return i } }).sort(function (name1, name2) { name1 = name1.split(' ') name2 = name2.split(' ') if (name1[0] === name2[0]) { if (FLOAT_RANGE.test(name1[1]) && FLOAT_RANGE.test(name2[1])) { return parseFloat(name2[1]) - parseFloat(name1[1]) } else { return compareStrings(name2[1], name1[1]) } } else { return compareStrings(name1[0], name2[0]) } }) return uniq(result) } // Will be filled by Can I Use data below browserslist.data = { } browserslist.usage = { global: { }, custom: null } // Default browsers query browserslist.defaults = [ '> 0.5%', 'last 2 versions', 'Firefox ESR', 'not dead' ] // Browser names aliases browserslist.aliases = { fx: 'firefox', ff: 'firefox', ios: 'ios_saf', explorer: 'ie', blackberry: 'bb', explorermobile: 'ie_mob', operamini: 'op_mini', operamobile: 'op_mob', chromeandroid: 'and_chr', firefoxandroid: 'and_ff', ucandroid: 'and_uc', qqandroid: 'and_qq' } // Aliases to work with joined versions like `ios_saf 7.0-7.1` browserslist.versionAliases = { } browserslist.clearCaches = env.clearCaches browserslist.parseConfig = env.parseConfig browserslist.readConfig = env.readConfig browserslist.findConfig = env.findConfig browserslist.loadConfig = env.loadConfig /** * Return browsers market coverage. * * @param {string[]} browsers Browsers names in Can I Use. * @param {string|object} [stats="global"] Which statistics should be used. * Country code or custom statistics. * Pass `"my stats"` to load statistics * from Browserslist files. * * @return {number} Total market coverage for all selected browsers. * * @example * browserslist.coverage(browserslist('> 1% in US'), 'US') //=> 83.1 */ browserslist.coverage = function (browsers, stats) { var data if (typeof stats === 'undefined') { data = browserslist.usage.global } else if (stats === 'my stats') { var opts = {} opts.path = path.resolve ? path.resolve('.') : '.' var customStats = env.getStat(opts) if (!customStats) { throw new BrowserslistError('Custom usage statistics was not provided') } data = {} for (var browser in customStats) { fillUsage(data, browser, customStats[browser]) } } else if (typeof stats === 'string') { if (stats.length > 2) { stats = stats.toLowerCase() } else { stats = stats.toUpperCase() } env.loadCountry(browserslist.usage, stats) data = browserslist.usage[stats] } else { if ('dataByBrowser' in stats) { stats = stats.dataByBrowser } data = { } for (var name in stats) { for (var version in stats[name]) { data[name + ' ' + version] = stats[name][version] } } } return browsers.reduce(function (all, i) { var usage = data[i] if (usage === undefined) { usage = data[i.replace(/ \S+$/, ' 0')] } return all + (usage || 0) }, 0) } var QUERIES = [ { regexp: /^last\s+(\d+)\s+major versions?$/i, select: function (context, versions) { return Object.keys(agents).reduce(function (selected, name) { var data = byName(name) if (!data) return selected var array = getMajorVersions(data.released, versions) array = array.map(nameMapper(data.name)) return selected.concat(array) }, []) } }, { regexp: /^last\s+(\d+)\s+versions?$/i, select: function (context, versions) { return Object.keys(agents).reduce(function (selected, name) { var data = byName(name) if (!data) return selected var array = data.released.slice(-versions) array = array.map(nameMapper(data.name)) return selected.concat(array) }, []) } }, { regexp: /^last\s+(\d+)\s+electron\s+major versions?$/i, select: function (context, versions) { var validVersions = getMajorVersions(Object.keys(e2c).reverse(), versions) return validVersions.map(function (i) { return 'chrome ' + e2c[i] }) } }, { regexp: /^last\s+(\d+)\s+(\w+)\s+major versions?$/i, select: function (context, versions, name) { var data = checkName(name) var validVersions = getMajorVersions(data.released, versions) return validVersions.map(nameMapper(data.name)) } }, { regexp: /^last\s+(\d+)\s+electron\s+versions?$/i, select: function (context, versions) { return Object.keys(e2c).reverse().slice(-versions).map(function (i) { return 'chrome ' + e2c[i] }) } }, { regexp: /^last\s+(\d+)\s+(\w+)\s+versions?$/i, select: function (context, versions, name) { var data = checkName(name) return data.released.slice(-versions).map(nameMapper(data.name)) } }, { regexp: /^unreleased\s+versions$/i, select: function () { return Object.keys(agents).reduce(function (selected, name) { var data = byName(name) if (!data) return selected var array = data.versions.filter(function (v) { return data.released.indexOf(v) === -1 }) array = array.map(nameMapper(data.name)) return selected.concat(array) }, []) } }, { regexp: /^unreleased\s+electron\s+versions?$/i, select: function () { return [] } }, { regexp: /^unreleased\s+(\w+)\s+versions?$/i, select: function (context, name) { var data = checkName(name) return data.versions.filter(function (v) { return data.released.indexOf(v) === -1 }).map(nameMapper(data.name)) } }, { regexp: /^last\s+(\d+)\s+years?$/i, select: function (context, years) { var date = new Date() var since = date.setFullYear(date.getFullYear() - years) / 1000 return filterByYear(since) } }, { regexp: /^since (\d+)(?:-(\d+))?(?:-(\d+))?$/i, select: function (context, year, month, date) { year = parseInt(year) month = parseInt(month || '01') - 1 date = parseInt(date || '01') var since = Date.UTC(year, month, date, 0, 0, 0) / 1000 return filterByYear(since) } }, { regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%$/, select: function (context, sign, popularity) { popularity = parseFloat(popularity) var usage = browserslist.usage.global return Object.keys(usage).reduce(function (result, version) { if (sign === '>') { if (usage[version] > popularity) { result.push(version) } } else if (sign === '<') { if (usage[version] < popularity) { result.push(version) } } else if (sign === '<=') { if (usage[version] <= popularity) { result.push(version) } } else if (usage[version] >= popularity) { result.push(version) } return result }, []) } }, { regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%\s+in\s+my\s+stats$/, select: function (context, sign, popularity) { popularity = parseFloat(popularity) if (!context.customUsage) { throw new BrowserslistError('Custom usage statistics was not provided') } var usage = context.customUsage return Object.keys(usage).reduce(function (result, version) { if (sign === '>') { if (usage[version] > popularity) { result.push(version) } } else if (sign === '<') { if (usage[version] < popularity) { result.push(version) } } else if (sign === '<=') { if (usage[version] <= popularity) { result.push(version) } } else if (usage[version] >= popularity) { result.push(version) } return result }, []) } }, { regexp: /^(>=?|<=?)\s*(\d*\.?\d+)%\s+in\s+((alt-)?\w\w)$/, select: function (context, sign, popularity, place) { popularity = parseFloat(popularity) if (place.length === 2) { place = place.toUpperCase() } else { place = place.toLowerCase() } env.loadCountry(browserslist.usage, place) var usage = browserslist.usage[place] return Object.keys(usage).reduce(function (result, version) { if (sign === '>') { if (usage[version] > popularity) { result.push(version) } } else if (sign === '<') { if (usage[version] < popularity) { result.push(version) } } else if (sign === '<=') { if (usage[version] <= popularity) { result.push(version) } } else if (usage[version] >= popularity) { result.push(version) } return result }, []) } }, { regexp: /^cover\s+(\d*\.?\d+)%(\s+in\s+(my\s+stats|(alt-)?\w\w))?$/, select: function (context, coverage, statMode) { coverage = parseFloat(coverage) var usage = browserslist.usage.global if (statMode) { if (statMode.match(/^\s+in\s+my\s+stats$/)) { if (!context.customUsage) { throw new BrowserslistError( 'Custom usage statistics was not provided' ) } usage = context.customUsage } else { var match = statMode.match(/\s+in\s+((alt-)?\w\w)/) var place = match[1] if (place.length === 2) { place = place.toUpperCase() } else { place = place.toLowerCase() } env.loadCountry(browserslist.usage, place) usage = browserslist.usage[place] } } var versions = Object.keys(usage).sort(function (a, b) { return usage[b] - usage[a] }) var coveraged = 0 var result = [] var version for (var i = 0; i <= versions.length; i++) { version = versions[i] if (usage[version] === 0) break coveraged += usage[version] result.push(version) if (coveraged >= coverage) break } return result } }, { regexp: /^electron\s+([\d.]+)\s*-\s*([\d.]+)$/i, select: function (context, from, to) { if (!e2c[from]) { throw new BrowserslistError('Unknown version ' + from + ' of electron') } if (!e2c[to]) { throw new BrowserslistError('Unknown version ' + to + ' of electron') } from = parseFloat(from) to = parseFloat(to) return Object.keys(e2c).filter(function (i) { var parsed = parseFloat(i) return parsed >= from && parsed <= to }).map(function (i) { return 'chrome ' + e2c[i] }) } }, { regexp: /^(\w+)\s+([\d.]+)\s*-\s*([\d.]+)$/i, select: function (context, name, from, to) { var data = checkName(name) from = parseFloat(normalizeVersion(data, from) || from) to = parseFloat(normalizeVersion(data, to) || to) function filter (v) { var parsed = parseFloat(v) return parsed >= from && parsed <= to } return data.released.filter(filter).map(nameMapper(data.name)) } }, { regexp: /^electron\s*(>=?|<=?)\s*([\d.]+)$/i, select: function (context, sign, version) { return Object.keys(e2c) .filter(generateFilter(sign, version)) .map(function (i) { return 'chrome ' + e2c[i] }) } }, { regexp: /^(\w+)\s*(>=?|<=?)\s*([\d.]+)$/, select: function (context, name, sign, version) { var data = checkName(name) var alias = browserslist.versionAliases[data.name][version] if (alias) { version = alias } return data.released .filter(generateFilter(sign, version)) .map(function (v) { return data.name + ' ' + v }) } }, { regexp: /^(firefox|ff|fx)\s+esr$/i, select: function () { return ['firefox 52', 'firefox 60'] } }, { regexp: /(operamini|op_mini)\s+all/i, select: function () { return ['op_mini all'] } }, { regexp: /^electron\s+([\d.]+)$/i, select: function (context, version) { var chrome = e2c[version] if (!chrome) { throw new BrowserslistError( 'Unknown version ' + version + ' of electron') } return ['chrome ' + chrome] } }, { regexp: /^(\w+)\s+(tp|[\d.]+)$/i, select: function (context, name, version) { if (/^tp$/i.test(version)) version = 'TP' var data = checkName(name) var alias = normalizeVersion(data, version) if (alias) { version = alias } else { if (version.indexOf('.') === -1) { alias = version + '.0' } else { alias = version.replace(/\.0$/, '') } alias = normalizeVersion(data, alias) if (alias) { version = alias } else if (context.ignoreUnknownVersions) { return [] } else { throw new BrowserslistError( 'Unknown version ' + version + ' of ' + name) } } return [data.name + ' ' + version] } }, { regexp: /^extends (.+)$/i, select: function (context, name) { return resolve(env.loadQueries(context, name), context) } }, { regexp: /^defaults$/i, select: function () { return browserslist(browserslist.defaults) } }, { regexp: /^dead$/i, select: function (context) { var dead = ['ie <= 10', 'ie_mob <= 10', 'bb <= 10', 'op_mob <= 12.1'] return resolve(dead, context) } }, { regexp: /^(\w+)$/i, select: function (context, name) { if (byName(name)) { throw new BrowserslistError( 'Specify versions in Browserslist query for browser ' + name) } else { throw unknownQuery(name) } } } ]; // Get and convert Can I Use data (function () { for (var name in agents) { var browser = agents[name] browserslist.data[name] = { name: name, versions: normalize(agents[name].versions), released: normalize(agents[name].versions.slice(0, -3)), releaseDate: agents[name].release_date } fillUsage(browserslist.usage.global, name, browser.usage_global) browserslist.versionAliases[name] = { } for (var i = 0; i < browser.versions.length; i++) { var full = browser.versions[i] if (!full) continue if (full.indexOf('-') !== -1) { var interval = full.split('-') for (var j = 0; j < interval.length; j++) { browserslist.versionAliases[name][interval[j]] = full } } } } }()) module.exports = browserslist
brett-harvey/Smart-Contracts
Ethereum-based-Roll4Win/node_modules/browserslist/index.js
JavaScript
mit
20,955
using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle( "Microsoft.DeviceModels.ModelForLPC3180" )] [assembly: AssemblyDescription( "" )] [assembly: AssemblyConfiguration( "" )] [assembly: AssemblyCompany( "Microsoft" )] [assembly: AssemblyProduct( "Microsoft.DeviceModels.ModelForLPC3180" )] [assembly: AssemblyCopyright( "Copyright © Microsoft 2007" )] [assembly: AssemblyTrademark( "" )] [assembly: AssemblyCulture( "" )] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible( false )] //// The following GUID is for the ID of the typelib if this project is exposed to COM //[assembly: Guid( "975a7db2-22e5-41c6-9e32-d3f72152d387" )] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion( "1.0.0.0" )] [assembly: AssemblyFileVersion( "1.0.0.0" )]
ZachNL/llilum
Zelig/Zelig/RunTime/DeviceModels/ModelForCortexM4/Properties/AssemblyInfo.cs
C#
mit
1,493
<?php namespace Illuminate\Tests\Support; use Illuminate\Foundation\Application; use Illuminate\Support\ServiceProvider; use Mockery as m; use PHPUnit\Framework\TestCase; class SupportServiceProviderTest extends TestCase { protected function setUp(): void { ServiceProvider::$publishes = []; ServiceProvider::$publishGroups = []; $app = m::mock(Application::class)->makePartial(); $one = new ServiceProviderForTestingOne($app); $one->boot(); $two = new ServiceProviderForTestingTwo($app); $two->boot(); } protected function tearDown(): void { m::close(); } public function testPublishableServiceProviders() { $toPublish = ServiceProvider::publishableProviders(); $expected = [ ServiceProviderForTestingOne::class, ServiceProviderForTestingTwo::class, ]; $this->assertEquals($expected, $toPublish, 'Publishable service providers do not return expected set of providers.'); } public function testPublishableGroups() { $toPublish = ServiceProvider::publishableGroups(); $this->assertEquals(['some_tag', 'tag_one', 'tag_two'], $toPublish, 'Publishable groups do not return expected set of groups.'); } public function testSimpleAssetsArePublishedCorrectly() { $toPublish = ServiceProvider::pathsToPublish(ServiceProviderForTestingOne::class); $this->assertArrayHasKey('source/unmarked/one', $toPublish, 'Service provider does not return expected published path key.'); $this->assertArrayHasKey('source/tagged/one', $toPublish, 'Service provider does not return expected published path key.'); $this->assertEquals(['source/unmarked/one' => 'destination/unmarked/one', 'source/tagged/one' => 'destination/tagged/one', 'source/tagged/multiple' => 'destination/tagged/multiple'], $toPublish, 'Service provider does not return expected set of published paths.'); } public function testMultipleAssetsArePublishedCorrectly() { $toPublish = ServiceProvider::pathsToPublish(ServiceProviderForTestingTwo::class); $this->assertArrayHasKey('source/unmarked/two/a', $toPublish, 'Service provider does not return expected published path key.'); $this->assertArrayHasKey('source/unmarked/two/b', $toPublish, 'Service provider does not return expected published path key.'); $this->assertArrayHasKey('source/unmarked/two/c', $toPublish, 'Service provider does not return expected published path key.'); $this->assertArrayHasKey('source/tagged/two/a', $toPublish, 'Service provider does not return expected published path key.'); $this->assertArrayHasKey('source/tagged/two/b', $toPublish, 'Service provider does not return expected published path key.'); $expected = [ 'source/unmarked/two/a' => 'destination/unmarked/two/a', 'source/unmarked/two/b' => 'destination/unmarked/two/b', 'source/unmarked/two/c' => 'destination/tagged/two/a', 'source/tagged/two/a' => 'destination/tagged/two/a', 'source/tagged/two/b' => 'destination/tagged/two/b', ]; $this->assertEquals($expected, $toPublish, 'Service provider does not return expected set of published paths.'); } public function testSimpleTaggedAssetsArePublishedCorrectly() { $toPublish = ServiceProvider::pathsToPublish(ServiceProviderForTestingOne::class, 'some_tag'); $this->assertArrayNotHasKey('source/tagged/two/a', $toPublish, 'Service provider does return unexpected tagged path key.'); $this->assertArrayNotHasKey('source/tagged/two/b', $toPublish, 'Service provider does return unexpected tagged path key.'); $this->assertArrayHasKey('source/tagged/one', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertEquals(['source/tagged/one' => 'destination/tagged/one'], $toPublish, 'Service provider does not return expected set of published tagged paths.'); } public function testMultipleTaggedAssetsArePublishedCorrectly() { $toPublish = ServiceProvider::pathsToPublish(ServiceProviderForTestingTwo::class, 'some_tag'); $this->assertArrayHasKey('source/tagged/two/a', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertArrayHasKey('source/tagged/two/b', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertArrayNotHasKey('source/tagged/one', $toPublish, 'Service provider does return unexpected tagged path key.'); $this->assertArrayNotHasKey('source/unmarked/two/c', $toPublish, 'Service provider does return unexpected tagged path key.'); $expected = [ 'source/tagged/two/a' => 'destination/tagged/two/a', 'source/tagged/two/b' => 'destination/tagged/two/b', ]; $this->assertEquals($expected, $toPublish, 'Service provider does not return expected set of published tagged paths.'); } public function testMultipleTaggedAssetsAreMergedCorrectly() { $toPublish = ServiceProvider::pathsToPublish(null, 'some_tag'); $this->assertArrayHasKey('source/tagged/two/a', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertArrayHasKey('source/tagged/two/b', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertArrayHasKey('source/tagged/one', $toPublish, 'Service provider does not return expected tagged path key.'); $this->assertArrayNotHasKey('source/unmarked/two/c', $toPublish, 'Service provider does return unexpected tagged path key.'); $expected = [ 'source/tagged/one' => 'destination/tagged/one', 'source/tagged/two/a' => 'destination/tagged/two/a', 'source/tagged/two/b' => 'destination/tagged/two/b', ]; $this->assertEquals($expected, $toPublish, 'Service provider does not return expected set of published tagged paths.'); } } class ServiceProviderForTestingOne extends ServiceProvider { public function register() { // } public function boot() { $this->publishes(['source/unmarked/one' => 'destination/unmarked/one']); $this->publishes(['source/tagged/one' => 'destination/tagged/one'], 'some_tag'); $this->publishes(['source/tagged/multiple' => 'destination/tagged/multiple'], ['tag_one', 'tag_two']); } } class ServiceProviderForTestingTwo extends ServiceProvider { public function register() { // } public function boot() { $this->publishes(['source/unmarked/two/a' => 'destination/unmarked/two/a']); $this->publishes(['source/unmarked/two/b' => 'destination/unmarked/two/b']); $this->publishes(['source/unmarked/two/c' => 'destination/tagged/two/a']); $this->publishes(['source/tagged/two/a' => 'destination/tagged/two/a'], 'some_tag'); $this->publishes(['source/tagged/two/b' => 'destination/tagged/two/b'], 'some_tag'); } }
laravel/framework
tests/Support/SupportServiceProviderTest.php
PHP
mit
7,132
/** * @overview datejs * @version 1.0.0-rc3 * @author Gregory Wild-Smith <gregory@wild-smith.com> * @copyright 2014 Gregory Wild-Smith * @license MIT * @homepage https://github.com/abritinthebay/datejs */ /* 2014 Gregory Wild-Smith @license MIT @homepage https://github.com/abritinthebay/datejs 2014 Gregory Wild-Smith @license MIT @homepage https://github.com/abritinthebay/datejs */ Date.CultureStrings=Date.CultureStrings||{}; Date.CultureStrings["de-LU"]={name:"de-LU",englishName:"German (Luxembourg)",nativeName:"Deutsch (Luxemburg)",Sunday:"Sonntag",Monday:"Montag",Tuesday:"Dienstag",Wednesday:"Mittwoch",Thursday:"Donnerstag",Friday:"Freitag",Saturday:"Samstag",Sun:"Son",Mon:"Mon",Tue:"Die",Wed:"Mit",Thu:"Don",Fri:"Fre",Sat:"Sam",Su:"So",Mo:"Mo",Tu:"Di",We:"Mi",Th:"Do",Fr:"Fr",Sa:"Sa",S_Sun_Initial:"S",M_Mon_Initial:"M",T_Tue_Initial:"D",W_Wed_Initial:"M",T_Thu_Initial:"D",F_Fri_Initial:"F",S_Sat_Initial:"S",January:"Januar", February:"Februar",March:"M\u00e4rz",April:"April",May:"Mai",June:"Juni",July:"Juli",August:"August",September:"September",October:"Oktober",November:"November",December:"Dezember",Jan_Abbr:"Jan",Feb_Abbr:"Feb",Mar_Abbr:"Mrz",Apr_Abbr:"Apr",May_Abbr:"Mai",Jun_Abbr:"Jun",Jul_Abbr:"Jul",Aug_Abbr:"Aug",Sep_Abbr:"Sep",Oct_Abbr:"Okt",Nov_Abbr:"Nov",Dec_Abbr:"Dez",AM:"",PM:"",firstDayOfWeek:1,twoDigitYearMax:2029,mdy:"dmy","M/d/yyyy":"dd.MM.yyyy","dddd, MMMM dd, yyyy":"dddd, d. MMMM yyyy","h:mm tt":"HH:mm", "h:mm:ss tt":"HH:mm:ss","dddd, MMMM dd, yyyy h:mm:ss tt":"dddd, d. MMMM yyyy HH:mm:ss","yyyy-MM-ddTHH:mm:ss":"yyyy-MM-ddTHH:mm:ss","yyyy-MM-dd HH:mm:ssZ":"yyyy-MM-dd HH:mm:ssZ","ddd, dd MMM yyyy HH:mm:ss":"ddd, dd MMM yyyy HH:mm:ss","MMMM dd":"dd MMMM","MMMM, yyyy":"MMMM yyyy","/jan(uary)?/":"jan(uar)?","/feb(ruary)?/":"feb(ruar)?","/mar(ch)?/":"m\u00e4rz","/apr(il)?/":"apr(il)?","/may/":"mai","/jun(e)?/":"jun(i)?","/jul(y)?/":"jul(i)?","/aug(ust)?/":"aug(ust)?","/sep(t(ember)?)?/":"sep(t(ember)?)?", "/oct(ober)?/":"okt(ober)?","/nov(ember)?/":"nov(ember)?","/dec(ember)?/":"dez(ember)?","/^su(n(day)?)?/":"^sonntag","/^mo(n(day)?)?/":"^montag","/^tu(e(s(day)?)?)?/":"^dienstag","/^we(d(nesday)?)?/":"^mittwoch","/^th(u(r(s(day)?)?)?)?/":"^donnerstag","/^fr(i(day)?)?/":"^freitag","/^sa(t(urday)?)?/":"^samstag","/^next/":"^n\u00e4chste(r|s|n)?","/^last|past|prev(ious)?/":"^letzte(r|s|n)?|vergangene(r|s|n)?|vorherige(r|s|n)?","/^(\\+|aft(er)?|from|hence)/":"^(\\+|(da)?nach(er)?|von|daher|in)","/^(\\-|bef(ore)?|ago)/":"^(\\-|(be|zu)?vor|fr\u00fcher)", "/^yes(terday)?/":"^gestern","/^t(od(ay)?)?/":"^heute","/^tom(orrow)?/":"^morgen","/^n(ow)?/":"^jetzt|sofort|gleich","/^ms|milli(second)?s?/":"^ms|milli(sekunde(n)?)?","/^sec(ond)?s?/":"^sek(unde(n)?)?","/^mn|min(ute)?s?/":"^mn|min(ute(n)?)?","/^h(our)?s?/":"^h|st(d|unde(n)?)?","/^w(eek)?s?/":"^w(oche(n)?)?","/^m(onth)?s?/":"^m(onat(e)?)?","/^d(ay)?s?/":"^d|t(ag(en)?)?","/^y(ear)?s?/":"^y|j(ahr(en)?)?","/^(a|p)/":"^(a|p)","/^(a\\.?m?\\.?|p\\.?m?\\.?)/":"^(a\\.?m?\\.?|p\\.?m?\\.?)","/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/":"^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)", "/^\\s*(st|nd|rd|th)/":"^\\s*(st|nd|rd|th)","/^\\s*(\\:|a(?!u|p)|p)/":"^\\s*(\\:|a(?!u|p)|p)",LINT:"LINT",TOT:"TOT",CHAST:"CHAST",NZST:"NZST",NFT:"NFT",SBT:"SBT",AEST:"AEST",ACST:"ACST",JST:"JST",CWST:"CWST",CT:"CT",ICT:"ICT",MMT:"MMT",BIOT:"BST",NPT:"NPT",IST:"IST",PKT:"PKT",AFT:"AFT",MSK:"MSK",IRST:"IRST",FET:"FET",EET:"EET",CET:"CET",UTC:"UTC",GMT:"GMT",CVT:"CVT",GST:"GST",BRT:"BRT",NST:"NST",AST:"AST",EST:"EST",CST:"CST",MST:"MST",PST:"PST",AKST:"AKST",MIT:"MIT",HST:"HST",SST:"SST",BIT:"BIT", CHADT:"CHADT",NZDT:"NZDT",AEDT:"AEDT",ACDT:"ACDT",AZST:"AZST",IRDT:"IRDT",EEST:"EEST",CEST:"CEST",BST:"BST",PMDT:"PMDT",ADT:"ADT",NDT:"NDT",EDT:"EDT",CDT:"CDT",MDT:"MDT",PDT:"PDT",AKDT:"AKDT",HADT:"HADT"};Date.CultureStrings.lang="de-LU"; (function(){var h=Date,f=Date.CultureStrings?Date.CultureStrings.lang:null,d={},c={getFromKey:function(a,b){var e;e=Date.CultureStrings&&Date.CultureStrings[b]&&Date.CultureStrings[b][a]?Date.CultureStrings[b][a]:c.buildFromDefault(a);"/"===a.charAt(0)&&(e=c.buildFromRegex(a,b));return e},getFromObjectValues:function(a,b){var e,g={};for(e in a)a.hasOwnProperty(e)&&(g[e]=c.getFromKey(a[e],b));return g},getFromObjectKeys:function(a,b){var e,g={};for(e in a)a.hasOwnProperty(e)&&(g[c.getFromKey(e,b)]= a[e]);return g},getFromArray:function(a,b){for(var e=[],g=0;g<a.length;g++)g in a&&(e[g]=c.getFromKey(a[g],b));return e},buildFromDefault:function(a){var b,e,g;switch(a){case "name":b="en-US";break;case "englishName":b="English (United States)";break;case "nativeName":b="English (United States)";break;case "twoDigitYearMax":b=2049;break;case "firstDayOfWeek":b=0;break;default:if(b=a,g=a.split("_"),e=g.length,1<e&&"/"!==a.charAt(0)&&(a=g[e-1].toLowerCase(),"initial"===a||"abbr"===a))b=g[0]}return b}, buildFromRegex:function(a,b){return Date.CultureStrings&&Date.CultureStrings[b]&&Date.CultureStrings[b][a]?new RegExp(Date.CultureStrings[b][a],"i"):new RegExp(a.replace(RegExp("/","g"),""),"i")}},a=function(a,b){var e=b?b:f;d[a]=a;return"object"===typeof a?a instanceof Array?c.getFromArray(a,e):c.getFromObjectKeys(a,e):c.getFromKey(a,e)},b=function(a){a=Date.Config.i18n+a+".js";var b=document.getElementsByTagName("head")[0]||document.documentElement,e=document.createElement("script");e.src=a;var g= {done:function(){}};e.onload=e.onreadystatechange=function(){this.readyState&&"loaded"!==this.readyState&&"complete"!==this.readyState||(g.done(),b.removeChild(e))};setTimeout(function(){b.insertBefore(e,b.firstChild)},0);return{done:function(a){g.done=function(){a&&setTimeout(a,0)}}}},e={buildFromMethodHash:function(a){for(var b in a)a.hasOwnProperty(b)&&(a[b]=e[a[b]]());return a},timeZoneDST:function(){return a({CHADT:"+1345",NZDT:"+1300",AEDT:"+1100",ACDT:"+1030",AZST:"+0500",IRDT:"+0430",EEST:"+0300", CEST:"+0200",BST:"+0100",PMDT:"-0200",ADT:"-0300",NDT:"-0230",EDT:"-0400",CDT:"-0500",MDT:"-0600",PDT:"-0700",AKDT:"-0800",HADT:"-0900"})},timeZoneStandard:function(){return a({LINT:"+1400",TOT:"+1300",CHAST:"+1245",NZST:"+1200",NFT:"+1130",SBT:"+1100",AEST:"+1000",ACST:"+0930",JST:"+0900",CWST:"+0845",CT:"+0800",ICT:"+0700",MMT:"+0630",BST:"+0600",NPT:"+0545",IST:"+0530",PKT:"+0500",AFT:"+0430",MSK:"+0400",IRST:"+0330",FET:"+0300",EET:"+0200",CET:"+0100",GMT:"+0000",UTC:"+0000",CVT:"-0100",GST:"-0200", BRT:"-0300",NST:"-0330",AST:"-0400",EST:"-0500",CST:"-0600",MST:"-0700",PST:"-0800",AKST:"-0900",MIT:"-0930",HST:"-1000",SST:"-1100",BIT:"-1200"})},timeZones:function(a){var b;a.timezones=[];for(b in a.abbreviatedTimeZoneStandard)a.abbreviatedTimeZoneStandard.hasOwnProperty(b)&&a.timezones.push({name:b,offset:a.abbreviatedTimeZoneStandard[b]});for(b in a.abbreviatedTimeZoneDST)a.abbreviatedTimeZoneDST.hasOwnProperty(b)&&a.timezones.push({name:b,offset:a.abbreviatedTimeZoneDST[b],dst:!0});return a.timezones}, days:function(){return a("Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "))},dayAbbr:function(){return a("Sun Mon Tue Wed Thu Fri Sat".split(" "))},dayShortNames:function(){return a("Su Mo Tu We Th Fr Sa".split(" "))},dayFirstLetters:function(){return a("S_Sun_Initial M_Mon_Initial T_Tues_Initial W_Wed_Initial T_Thu_Initial F_Fri_Initial S_Sat_Initial".split(" "))},months:function(){return a("January February March April May June July August September October November December".split(" "))}, monthAbbr:function(){return a("Jan_Abbr Feb_Abbr Mar_Abbr Apr_Abbr May_Abbr Jun_Abbr Jul_Abbr Aug_Abbr Sep_Abbr Oct_Abbr Nov_Abbr Dec_Abbr".split(" "))},formatPatterns:function(){return c.getFromObjectValues({shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"}, Date.i18n.currentLanguage())},regex:function(){return c.getFromObjectValues({inTheMorning:"/( in the )(morn(ing)?)\\b/",thisMorning:"/(this )(morn(ing)?)\\b/",amThisMorning:"/(\b\\d(am)? )(this )(morn(ing)?)/",inTheEvening:"/( in the )(even(ing)?)\\b/",thisEvening:"/(this )(even(ing)?)\\b/",pmThisEvening:"/(\b\\d(pm)? )(this )(even(ing)?)/",jan:"/jan(uary)?/",feb:"/feb(ruary)?/",mar:"/mar(ch)?/",apr:"/apr(il)?/",may:"/may/",jun:"/jun(e)?/",jul:"/jul(y)?/",aug:"/aug(ust)?/",sep:"/sep(t(ember)?)?/", oct:"/oct(ober)?/",nov:"/nov(ember)?/",dec:"/dec(ember)?/",sun:"/^su(n(day)?)?/",mon:"/^mo(n(day)?)?/",tue:"/^tu(e(s(day)?)?)?/",wed:"/^we(d(nesday)?)?/",thu:"/^th(u(r(s(day)?)?)?)?/",fri:"/fr(i(day)?)?/",sat:"/^sa(t(urday)?)?/",future:"/^next/",past:"/^last|past|prev(ious)?/",add:"/^(\\+|aft(er)?|from|hence)/",subtract:"/^(\\-|bef(ore)?|ago)/",yesterday:"/^yes(terday)?/",today:"/^t(od(ay)?)?/",tomorrow:"/^tom(orrow)?/",now:"/^n(ow)?/",millisecond:"/^ms|milli(second)?s?/",second:"/^sec(ond)?s?/", minute:"/^mn|min(ute)?s?/",hour:"/^h(our)?s?/",week:"/^w(eek)?s?/",month:"/^m(onth)?s?/",day:"/^d(ay)?s?/",year:"/^y(ear)?s?/",shortMeridian:"/^(a|p)/",longMeridian:"/^(a\\.?m?\\.?|p\\.?m?\\.?)/",timezone:"/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\\s*(\\+|\\-)\\s*\\d\\d\\d\\d?)|gmt|utc)/",ordinalSuffix:"/^\\s*(st|nd|rd|th)/",timeContext:"/^\\s*(\\:|a(?!u|p)|p)/"},Date.i18n.currentLanguage())}},g=function(){var a=c.getFromObjectValues({name:"name",englishName:"englishName",nativeName:"nativeName", amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:"firstDayOfWeek",twoDigitYearMax:"twoDigitYearMax",dateElementOrder:"mdy"},Date.i18n.currentLanguage()),b=e.buildFromMethodHash({dayNames:"days",abbreviatedDayNames:"dayAbbr",shortestDayNames:"dayShortNames",firstLetterDayNames:"dayFirstLetters",monthNames:"months",abbreviatedMonthNames:"monthAbbr",formatPatterns:"formatPatterns",regexPatterns:"regex",abbreviatedTimeZoneDST:"timeZoneDST",abbreviatedTimeZoneStandard:"timeZoneStandard"}),g;for(g in b)b.hasOwnProperty(g)&& (a[g]=b[g]);e.timeZones(a);return a};h.i18n={__:function(m,b){return a(m,b)},currentLanguage:function(){return f||"en-US"},setLanguage:function(a,e,c){var d=!1;if(e||"en-US"===a||Date.CultureStrings&&Date.CultureStrings[a])f=a,Date.CultureStrings=Date.CultureStrings||{},Date.CultureStrings.lang=a,Date.CultureInfo=new g;else if(!Date.CultureStrings||!Date.CultureStrings[a])if("undefined"!==typeof exports&&this.exports!==exports)try{require("../i18n/"+a+".js"),f=a,Date.CultureStrings.lang=a,Date.CultureInfo= new g}catch(p){throw Error("The DateJS IETF language tag '"+a+"' could not be loaded by Node. It likely does not exist.");}else if(Date.Config&&Date.Config.i18n)d=!0,b(a).done(function(){f=a;Date.CultureStrings=Date.CultureStrings||{};Date.CultureStrings.lang=a;Date.CultureInfo=new g;h.Parsing.Normalizer.buildReplaceData();h.Grammar&&h.Grammar.buildGrammarFormats();c&&setTimeout(c,0)});else return Date.console.error("The DateJS IETF language tag '"+a+"' is not available and has not been loaded."), !1;h.Parsing.Normalizer.buildReplaceData();h.Grammar&&h.Grammar.buildGrammarFormats();!d&&c&&setTimeout(c,0)},getLoggedKeys:function(){return d},updateCultureInfo:function(){Date.CultureInfo=new g}};h.i18n.updateCultureInfo()})(); (function(){var h=Date,f=h.prototype,d=function(a,b){b||(b=2);return("000"+a).slice(-1*b)};h.console="undefined"!==typeof window&&"undefined"!==typeof window.console&&"undefined"!==typeof window.console.log?console:{log:function(){},error:function(){}};h.Config=h.Config||{};h.initOverloads=function(){h.now?h._now||(h._now=h.now):h._now=function(){return(new Date).getTime()};h.now=function(a){return a?h.present():h._now()};f.toISOString||(f.toISOString=function(){return this.getUTCFullYear()+"-"+d(this.getUTCMonth()+ 1)+"-"+d(this.getUTCDate())+"T"+d(this.getUTCHours())+":"+d(this.getUTCMinutes())+":"+d(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1E3).toFixed(3)).slice(2,5)+"Z"});void 0===f._toString&&(f._toString=f.toString)};h.initOverloads();h.today=function(){return(new Date).clearTime()};h.present=function(){return new Date};h.compare=function(a,b){if(isNaN(a)||isNaN(b))throw Error(a+" - "+b);if(a instanceof Date&&b instanceof Date)return a<b?-1:a>b?1:0;throw new TypeError(a+" - "+b);};h.equals= function(a,b){return 0===a.compareTo(b)};h.getDayName=function(a){return Date.CultureInfo.dayNames[a]};h.getDayNumberFromName=function(a){var b=Date.CultureInfo.dayNames,e=Date.CultureInfo.abbreviatedDayNames,g=Date.CultureInfo.shortestDayNames;a=a.toLowerCase();for(var m=0;m<b.length;m++)if(b[m].toLowerCase()===a||e[m].toLowerCase()===a||g[m].toLowerCase()===a)return m;return-1};h.getMonthNumberFromName=function(a){var b=Date.CultureInfo.monthNames,e=Date.CultureInfo.abbreviatedMonthNames;a=a.toLowerCase(); for(var g=0;g<b.length;g++)if(b[g].toLowerCase()===a||e[g].toLowerCase()===a)return g;return-1};h.getMonthName=function(a){return Date.CultureInfo.monthNames[a]};h.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};h.getDaysInMonth=function(a,b){!b&&h.validateMonth(a)&&(b=a,a=Date.today().getFullYear());return[31,h.isLeapYear(a)?29:28,31,30,31,30,31,31,30,31,30,31][b]};f.getDaysInMonth=function(){return h.getDaysInMonth(this.getFullYear(),this.getMonth())};h.getTimezoneAbbreviation=function(a, b){var e,g=b?Date.CultureInfo.abbreviatedTimeZoneDST:Date.CultureInfo.abbreviatedTimeZoneStandard;for(e in g)if(g.hasOwnProperty(e)&&g[e]===a)return e;return null};h.getTimezoneOffset=function(a,b){var e,g=[],m=Date.CultureInfo.timezones;a||(a=(new Date).getTimezone());for(e=0;e<m.length;e++)m[e].name===a.toUpperCase()&&g.push(e);if(!m[g[0]])return null;if(1!==g.length&&b)for(e=0;e<g.length;e++){if(m[g[e]].dst)return m[g[e]].offset}else return m[g[0]].offset};h.getQuarter=function(a){a=a||new Date; return[1,2,3,4][Math.floor(a.getMonth()/3)]};h.getDaysLeftInQuarter=function(a){a=a||new Date;var b=new Date(a);b.setMonth(b.getMonth()+3-b.getMonth()%3,0);return Math.floor((b-a)/864E5)};var c=function(a,b,e,g){if("undefined"===typeof a)return!1;if("number"!==typeof a)throw new TypeError(a+" is not a Number.");return a<b||a>e?!1:!0};h.validateMillisecond=function(a){return c(a,0,999,"millisecond")};h.validateSecond=function(a){return c(a,0,59,"second")};h.validateMinute=function(a){return c(a,0, 59,"minute")};h.validateHour=function(a){return c(a,0,23,"hour")};h.validateDay=function(a,b,e){return void 0===b||null===b||void 0===e||null===e?!1:c(a,1,h.getDaysInMonth(b,e),"day")};h.validateWeek=function(a){return c(a,0,53,"week")};h.validateMonth=function(a){return c(a,0,11,"month")};h.validateYear=function(a){return c(a,-271822,275760,"year")};h.validateTimezone=function(a){return 1==={ACDT:1,ACST:1,ACT:1,ADT:1,AEDT:1,AEST:1,AFT:1,AKDT:1,AKST:1,AMST:1,AMT:1,ART:1,AST:1,AWDT:1,AWST:1,AZOST:1, AZT:1,BDT:1,BIOT:1,BIT:1,BOT:1,BRT:1,BST:1,BTT:1,CAT:1,CCT:1,CDT:1,CEDT:1,CEST:1,CET:1,CHADT:1,CHAST:1,CHOT:1,ChST:1,CHUT:1,CIST:1,CIT:1,CKT:1,CLST:1,CLT:1,COST:1,COT:1,CST:1,CT:1,CVT:1,CWST:1,CXT:1,DAVT:1,DDUT:1,DFT:1,EASST:1,EAST:1,EAT:1,ECT:1,EDT:1,EEDT:1,EEST:1,EET:1,EGST:1,EGT:1,EIT:1,EST:1,FET:1,FJT:1,FKST:1,FKT:1,FNT:1,GALT:1,GAMT:1,GET:1,GFT:1,GILT:1,GIT:1,GMT:1,GST:1,GYT:1,HADT:1,HAEC:1,HAST:1,HKT:1,HMT:1,HOVT:1,HST:1,ICT:1,IDT:1,IOT:1,IRDT:1,IRKT:1,IRST:1,IST:1,JST:1,KGT:1,KOST:1,KRAT:1, KST:1,LHST:1,LINT:1,MAGT:1,MART:1,MAWT:1,MDT:1,MET:1,MEST:1,MHT:1,MIST:1,MIT:1,MMT:1,MSK:1,MST:1,MUT:1,MVT:1,MYT:1,NCT:1,NDT:1,NFT:1,NPT:1,NST:1,NT:1,NUT:1,NZDT:1,NZST:1,OMST:1,ORAT:1,PDT:1,PET:1,PETT:1,PGT:1,PHOT:1,PHT:1,PKT:1,PMDT:1,PMST:1,PONT:1,PST:1,PYST:1,PYT:1,RET:1,ROTT:1,SAKT:1,SAMT:1,SAST:1,SBT:1,SCT:1,SGT:1,SLST:1,SRT:1,SST:1,SYOT:1,TAHT:1,THA:1,TFT:1,TJT:1,TKT:1,TLT:1,TMT:1,TOT:1,TVT:1,UCT:1,ULAT:1,UTC:1,UYST:1,UYT:1,UZT:1,VET:1,VLAT:1,VOLT:1,VOST:1,VUT:1,WAKT:1,WAST:1,WAT:1,WEDT:1,WEST:1, WET:1,WST:1,YAKT:1,YEKT:1,Z:1}[a]};h.validateTimezoneOffset=function(a){return-841<a&&721>a}})(); (function(){var h=Date,f=h.prototype,d=function(a,b){b||(b=2);return("000"+a).slice(-1*b)},c=function(a){var b={},e=this,g,c;c=function(b,g,c){if("day"===b){b=void 0!==a.month?a.month:e.getMonth();var d=void 0!==a.year?a.year:e.getFullYear();return h[g](c,d,b)}return h[g](c)};for(g in a)if(hasOwnProperty.call(a,g)){var d="validate"+g.charAt(0).toUpperCase()+g.slice(1);h[d]&&null!==a[g]&&c(g,d,a[g])&&(b[g]=a[g])}return b};f.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0); this.setMilliseconds(0);return this};f.setTimeToNow=function(){var a=new Date;this.setHours(a.getHours());this.setMinutes(a.getMinutes());this.setSeconds(a.getSeconds());this.setMilliseconds(a.getMilliseconds());return this};f.clone=function(){return new Date(this.getTime())};f.compareTo=function(a){return Date.compare(this,a)};f.equals=function(a){return Date.equals(this,void 0!==a?a:new Date)};f.between=function(a,b){return this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()};f.isAfter=function(a){return 1=== this.compareTo(a||new Date)};f.isBefore=function(a){return-1===this.compareTo(a||new Date)};f.isToday=f.isSameDay=function(a){return this.clone().clearTime().equals((a||new Date).clone().clearTime())};f.addMilliseconds=function(a){if(!a)return this;this.setTime(this.getTime()+1*a);return this};f.addSeconds=function(a){return a?this.addMilliseconds(1E3*a):this};f.addMinutes=function(a){return a?this.addMilliseconds(6E4*a):this};f.addHours=function(a){return a?this.addMilliseconds(36E5*a):this};f.addDays= function(a){if(!a)return this;this.setDate(this.getDate()+1*a);return this};f.addWeekdays=function(a){if(!a)return this;var b=this.getDay(),e=Math.ceil(Math.abs(a)/7);(0===b||6===b)&&0<a&&(this.next().monday(),this.addDays(-1),b=this.getDay());if(0>a){for(;0>a;)this.addDays(-1),b=this.getDay(),0!==b&&6!==b&&a++;return this}if(5<a||6-b<=a)a+=2*e;return this.addDays(a)};f.addWeeks=function(a){return a?this.addDays(7*a):this};f.addMonths=function(a){if(!a)return this;var b=this.getDate();this.setDate(1); this.setMonth(this.getMonth()+1*a);this.setDate(Math.min(b,h.getDaysInMonth(this.getFullYear(),this.getMonth())));return this};f.addQuarters=function(a){return a?this.addMonths(3*a):this};f.addYears=function(a){return a?this.addMonths(12*a):this};f.add=function(a){if("number"===typeof a)return this._orient=a,this;a.day&&0!==a.day-this.getDate()&&this.setDate(a.day);a.milliseconds&&this.addMilliseconds(a.milliseconds);a.seconds&&this.addSeconds(a.seconds);a.minutes&&this.addMinutes(a.minutes);a.hours&& this.addHours(a.hours);a.weeks&&this.addWeeks(a.weeks);a.months&&this.addMonths(a.months);a.years&&this.addYears(a.years);a.days&&this.addDays(a.days);return this};f.getWeek=function(a){var b=new Date(this.valueOf());a?(b.addMinutes(b.getTimezoneOffset()),a=b.clone()):a=this;a=(a.getDay()+6)%7;b.setDate(b.getDate()-a+3);a=b.valueOf();b.setMonth(0,1);4!==b.getDay()&&b.setMonth(0,1+(4-b.getDay()+7)%7);return 1+Math.ceil((a-b)/6048E5)};f.getISOWeek=function(){return d(this.getWeek(!0))};f.setWeek=function(a){return 0=== a-this.getWeek()?1!==this.getDay()?this.moveToDayOfWeek(1,1<this.getDay()?-1:1):this:this.moveToDayOfWeek(1,1<this.getDay()?-1:1).addWeeks(a-this.getWeek())};f.setQuarter=function(a){a=Math.abs(3*(a-1)+1);return this.setMonth(a,1)};f.getQuarter=function(){return Date.getQuarter(this)};f.getDaysLeftInQuarter=function(){return Date.getDaysLeftInQuarter(this)};f.moveToNthOccurrence=function(a,b){if("Weekday"===a){if(0<b)this.moveToFirstDayOfMonth(),this.is().weekday()&&--b;else if(0>b)this.moveToLastDayOfMonth(), this.is().weekday()&&(b+=1);else return this;return this.addWeekdays(b)}var e=0;if(0<b)e=b-1;else if(-1===b)return this.moveToLastDayOfMonth(),this.getDay()!==a&&this.moveToDayOfWeek(a,-1),this;return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(a,1).addWeeks(e)};var a=function(a,b,e){return function(g,c){var d=(g-this[a]()+e*(c||1))%e;return this[b](0===d?d+e*(c||1):d)}};f.moveToDayOfWeek=a("getDay","addDays",7);f.moveToMonth=a("getMonth","addMonths",12);f.getOrdinate=function(){var a= this.getDate();return b(a)};f.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864E5)+1};f.getTimezone=function(){return h.getTimezoneAbbreviation(this.getUTCOffset(),this.isDaylightSavingTime())};f.setTimezoneOffset=function(a){var b=this.getTimezoneOffset();return(a=-6*Number(a)/10)||0===a?this.addMinutes(a-b):this};f.setTimezone=function(a){return this.setTimezoneOffset(h.getTimezoneOffset(a))};f.hasDaylightSavingTime=function(){return Date.today().set({month:0, day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()};f.isDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==this.getTimezoneOffset()};f.getUTCOffset=function(a){a=-10*(a||this.getTimezoneOffset())/6;if(0>a)return a=(a-1E4).toString(),a.charAt(0)+a.substr(2);a=(a+1E4).toString();return"+"+a.substr(1)};f.getElapsed=function(a){return(a||new Date)-this};f.set=function(a){a=c.call(this,a);for(var b in a)if(hasOwnProperty.call(a, b)){var e=b.charAt(0).toUpperCase()+b.slice(1),g,d;"week"!==b&&"month"!==b&&"timezone"!==b&&"timezoneOffset"!==b&&(e+="s");g="add"+e;d="get"+e;"month"===b?g+="s":"year"===b&&(d="getFullYear");if("day"!==b&&"timezone"!==b&&"timezoneOffset"!==b&&"week"!==b&&"hour"!==b)this[g](a[b]-this[d]());else if("timezone"===b||"timezoneOffset"===b||"week"===b||"hour"===b)this["set"+e](a[b])}a.day&&this.addDays(a.day-this.getDate());return this};f.moveToFirstDayOfMonth=function(){return this.set({day:1})};f.moveToLastDayOfMonth= function(){return this.set({day:h.getDaysInMonth(this.getFullYear(),this.getMonth())})};var b=function(a){switch(1*a){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}},e=function(a){var b=Date.CultureInfo.formatPatterns;switch(a){case "d":return this.toString(b.shortDate);case "D":return this.toString(b.longDate);case "F":return this.toString(b.fullDateTime);case "m":return this.toString(b.monthDay);case "r":case "R":return a=this.clone().addMinutes(this.getTimezoneOffset()), a.toString(b.rfc1123)+" GMT";case "s":return this.toString(b.sortableDateTime);case "t":return this.toString(b.shortTime);case "T":return this.toString(b.longTime);case "u":return a=this.clone().addMinutes(this.getTimezoneOffset()),a.toString(b.universalSortableDateTime);case "y":return this.toString(b.yearMonth);default:return!1}},g=function(a){return function(e){if("\\"===e.charAt(0))return e.replace("\\","");switch(e){case "hh":return d(13>a.getHours()?0===a.getHours()?12:a.getHours():a.getHours()- 12);case "h":return 13>a.getHours()?0===a.getHours()?12:a.getHours():a.getHours()-12;case "HH":return d(a.getHours());case "H":return a.getHours();case "mm":return d(a.getMinutes());case "m":return a.getMinutes();case "ss":return d(a.getSeconds());case "s":return a.getSeconds();case "yyyy":return d(a.getFullYear(),4);case "yy":return d(a.getFullYear());case "y":return a.getFullYear();case "E":case "dddd":return Date.CultureInfo.dayNames[a.getDay()];case "ddd":return Date.CultureInfo.abbreviatedDayNames[a.getDay()]; case "dd":return d(a.getDate());case "d":return a.getDate();case "MMMM":return Date.CultureInfo.monthNames[a.getMonth()];case "MMM":return Date.CultureInfo.abbreviatedMonthNames[a.getMonth()];case "MM":return d(a.getMonth()+1);case "M":return a.getMonth()+1;case "t":return 12>a.getHours()?Date.CultureInfo.amDesignator.substring(0,1):Date.CultureInfo.pmDesignator.substring(0,1);case "tt":return 12>a.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator;case "S":return b(a.getDate()); case "W":return a.getWeek();case "WW":return a.getISOWeek();case "Q":return"Q"+a.getQuarter();case "q":return String(a.getQuarter());case "z":return a.getTimezone();case "Z":case "X":return Date.getTimezoneOffset(a.getTimezone());case "ZZ":return-60*a.getTimezoneOffset();case "u":return a.getDay();case "L":return h.isLeapYear(a.getFullYear())?1:0;case "B":return"@"+(a.getUTCSeconds()+60*a.getUTCMinutes()+3600*(a.getUTCHours()+1))/86.4;default:return e}}};f.toString=function(a,b){if(!b&&a&&1===a.length&& (output=e.call(this,a)))return output;var c=g(this);return a?a.replace(/((\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S|q|Q|WW?W?W?)(?![^\[]*\]))/g,c).replace(/\[|\]/g,""):this._toString()}})(); (function(){var h=Date,f=h.prototype,d=Number.prototype;f._orient=1;f._nth=null;f._is=!1;f._same=!1;f._isSecond=!1;d._dateElement="days";f.next=function(){this._move=!0;this._orient=1;return this};h.next=function(){return h.today().next()};f.last=f.prev=f.previous=function(){this._move=!0;this._orient=-1;return this};h.last=h.prev=h.previous=function(){return h.today().last()};f.is=function(){this._is=!0;return this};f.same=function(){this._same=!0;this._isSecond=!1;return this};f.today=function(){return this.same().day()}; f.weekday=function(){return this._nth?m("Weekday").call(this):this._move?this.addWeekdays(this._orient):this._is?(this._is=!1,!this.is().sat()&&!this.is().sun()):!1};f.weekend=function(){return this._is?(this._is=!1,this.is().sat()||this.is().sun()):!1};f.at=function(a){return"string"===typeof a?h.parse(this.toString("d")+" "+a):this.set(a)};d.fromNow=d.after=function(a){var b={};b[this._dateElement]=this;return(a?a.clone():new Date).add(b)};d.ago=d.before=function(a){var b={};b["s"!==this._dateElement[this._dateElement.length- 1]?this._dateElement+"s":this._dateElement]=-1*this;return(a?a.clone():new Date).add(b)};var c="sunday monday tuesday wednesday thursday friday saturday".split(/\s/),a="january february march april may june july august september october november december".split(/\s/),b="Millisecond Second Minute Hour Day Week Month Year Quarter Weekday".split(/\s/),e="Milliseconds Seconds Minutes Hours Date Week Month FullYear Quarter".split(/\s/),g="final first second third fourth fifth".split(/\s/);f.toObject=function(){for(var a= {},g=0;g<b.length;g++)this["get"+e[g]]&&(a[b[g].toLowerCase()]=this["get"+e[g]]());return a};h.fromObject=function(a){a.week=null;return Date.today().set(a)};var m=function(a){return function(){if(this._is)return this._is=!1,this.getDay()===a;this._move&&(this._move=null);if(null!==this._nth){this._isSecond&&this.addSeconds(-1*this._orient);this._isSecond=!1;var b=this._nth;this._nth=null;var e=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(a,b);if(this>e)throw new RangeError(h.getDayName(a)+ " does not occur "+b+" times in the month of "+h.getMonthName(e.getMonth())+" "+e.getFullYear()+".");return this}return this.moveToDayOfWeek(a,this._orient)}},k=function(a,b,e){for(var g=0;g<a.length;g++)h[a[g].toUpperCase()]=h[a[g].toUpperCase().substring(0,3)]=g,h[a[g]]=h[a[g].substring(0,3)]=b(g),f[a[g]]=f[a[g].substring(0,3)]=e(g)};k(c,function(a){return function(){var b=h.today(),e=a-b.getDay();0===a&&1===Date.CultureInfo.firstDayOfWeek&&0!==b.getDay()&&(e+=7);return b.addDays(e)}},m);k(a,function(a){return function(){return h.today().set({month:a, day:1})}},function(a){return function(){return this._is?(this._is=!1,this.getMonth()===a):this.moveToMonth(a,this._orient)}});for(var a=function(a){return function(e){if(this._isSecond)return this._isSecond=!1,this;if(this._same){this._same=this._is=!1;var g=this.toObject();e=(e||new Date).toObject();for(var c="",d=a.toLowerCase(),d="s"===d[d.length-1]?d.substring(0,d.length-1):d,f=b.length-1;-1<f;f--){c=b[f].toLowerCase();if(g[c]!==e[c])return!1;if(d===c)break}return!0}"s"!==a.substring(a.length- 1)&&(a+="s");this._move&&(this._move=null);return this["add"+a](this._orient)}},k=function(a){return function(){this._dateElement=a;return this}},n=0;n<b.length;n++)c=b[n].toLowerCase(),"weekday"!==c&&(f[c]=f[c+"s"]=a(b[n]),d[c]=d[c+"s"]=k(c+"s"));f._ss=a("Second");d=function(a){return function(b){if(this._same)return this._ss(b);if(b||0===b)return this.moveToNthOccurrence(b,a);this._nth=a;return 2!==a||void 0!==b&&null!==b?this:(this._isSecond=!0,this.addSeconds(this._orient))}};for(c=0;c<g.length;c++)f[g[c]]= 0===c?d(-1):d(c)})(); (function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var h=Date.Parsing,f=[0,31,59,90,120,151,181,212,243,273,304,334],d=[0,31,60,91,121,152,182,213,244,274,305,335];h.isLeapYear=function(a){return 0===a%4&&0!==a%100||0===a%400};var c={multiReplace:function(a,b){for(var e in b)if(Object.prototype.hasOwnProperty.call(b,e)){var g;"function"!==typeof b[e]&&(g=b[e]instanceof RegExp?b[e]:new RegExp(b[e],"g"));a=a.replace(g,e)}return a},getDayOfYearFromWeek:function(a){var b; a.weekDay=a.weekDay||0===a.weekDay?a.weekDay:1;b=new Date(a.year,0,4);b=(0===b.getDay()?7:b.getDay())+3;a.dayOfYear=7*a.week+(0===a.weekDay?7:a.weekDay)-b;return a},getDayOfYear:function(a,b){a.dayOfYear||(a=c.getDayOfYearFromWeek(a));for(var e=0;e<=b.length;e++)if(a.dayOfYear<b[e]||e===b.length){a.day=a.day?a.day:a.dayOfYear-b[e-1];break}else a.month=e;return a},adjustForTimeZone:function(a,b){var e;"Z"===a.zone.toUpperCase()||0===a.zone_hours&&0===a.zone_minutes?e=-b.getTimezoneOffset():(e=60*a.zone_hours+ (a.zone_minutes||0),"+"===a.zone_sign&&(e*=-1),e-=b.getTimezoneOffset());b.setMinutes(b.getMinutes()+e);return b},setDefaults:function(a){a.year=a.year||Date.today().getFullYear();a.hours=a.hours||0;a.minutes=a.minutes||0;a.seconds=a.seconds||0;a.milliseconds=a.milliseconds||0;if(a.month||!a.week&&!a.dayOfYear)a.month=a.month||0,a.day=a.day||1;return a},dataNum:function(a,b,e,g){var c=1*a;return b?g?a?1*b(a):a:a?b(c):a:e?a&&"undefined"!==typeof a?c:a:a?c:a},timeDataProcess:function(a){var b={},e; for(e in a.data)a.data.hasOwnProperty(e)&&(b[e]=a.ignore[e]?a.data[e]:c.dataNum(a.data[e],a.mods[e],a.explict[e],a.postProcess[e]));a.data.secmins&&(a.data.secmins=60*a.data.secmins.replace(",","."),b.minutes?b.seconds||(b.seconds=a.data.secmins):b.minutes=a.data.secmins,delete a.secmins);return b},buildTimeObjectFromData:function(a){return c.timeDataProcess({data:{year:a[1],month:a[5],day:a[7],week:a[8],dayOfYear:a[10],hours:a[15],zone_hours:a[23],zone_minutes:a[24],zone:a[21],zone_sign:a[22],weekDay:a[9], minutes:a[16],seconds:a[19],milliseconds:a[20],secmins:a[18]},mods:{month:function(a){return a-1},weekDay:function(a){a=Math.abs(a);return 7===a?0:a},minutes:function(a){return a.replace(":","")},seconds:function(a){return Math.floor(1*a.replace(":","").replace(",","."))},milliseconds:function(a){return 1E3*a.replace(",",".")}},postProcess:{minutes:!0,seconds:!0,milliseconds:!0},explict:{zone_hours:!0,zone_minutes:!0},ignore:{zone:!0,zone_sign:!0,secmins:!0}})},addToHash:function(a,b,e){for(var g= b.length,c=0;c<g;c++)a[b[c]]=e[c];return a},combineRegex:function(a,b){return new RegExp("(("+a.source+")\\s("+b.source+"))")},getDateNthString:function(a,b,e){if(a)return Date.today().addDays(e).toString("d");if(b)return Date.today().last()[e]().toString("d")},buildRegexData:function(a){for(var b=[],e=a.length,g=0;g<e;g++)"[object Array]"===Object.prototype.toString.call(a[g])?b.push(this.combineRegex(a[g][0],a[g][1])):b.push(a[g]);return b}};h.processTimeObject=function(a){var b;c.setDefaults(a); b=h.isLeapYear(a.year)?d:f;a.month||!a.week&&!a.dayOfYear?a.dayOfYear=b[a.month]+a.day:c.getDayOfYear(a,b);b=new Date(a.year,a.month,a.day,a.hours,a.minutes,a.seconds,a.milliseconds);a.zone&&c.adjustForTimeZone(a,b);return b};h.ISO={regex:/^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-4])((:?)[0-5]\d)?|24\:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?\s?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/, parse:function(a){a=a.match(this.regex);if(!a||!a.length)return null;a=c.buildTimeObjectFromData(a);return a.year&&(a.year||a.month||a.day||a.week||a.dayOfYear)?h.processTimeObject(a):null}};h.Numeric={isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},regex:/\b([0-1]?[0-9])([0-3]?[0-9])([0-2]?[0-9]?[0-9][0-9])\b/i,parse:function(a){var b,e={},g=Date.CultureInfo.dateElementOrder.split("");if(!this.isNumeric(a)||"+"===a[0]&&"-"===a[0])return null;if(5>a.length&&0>a.indexOf(".")&&0>a.indexOf("/"))return e.year= a,h.processTimeObject(e);a=a.match(this.regex);if(!a||!a.length)return null;for(b=0;b<g.length;b++)switch(g[b]){case "d":e.day=a[b+1];break;case "m":e.month=a[b+1]-1;break;case "y":e.year=a[b+1]}return h.processTimeObject(e)}};h.Normalizer={regexData:function(){var a=Date.CultureInfo.regexPatterns;return c.buildRegexData([a.tomorrow,a.yesterday,[a.past,a.mon],[a.past,a.tue],[a.past,a.wed],[a.past,a.thu],[a.past,a.fri],[a.past,a.sat],[a.past,a.sun]])},basicReplaceHash:function(){var a=Date.CultureInfo.regexPatterns; return{January:a.jan.source,February:a.feb,March:a.mar,April:a.apr,May:a.may,June:a.jun,July:a.jul,August:a.aug,September:a.sep,October:a.oct,November:a.nov,December:a.dec,"":/\bat\b/gi," ":/\s{2,}/,am:a.inTheMorning,"9am":a.thisMorning,pm:a.inTheEvening,"7pm":a.thisEvening}},keys:function(){return[c.getDateNthString(!0,!1,1),c.getDateNthString(!0,!1,-1),c.getDateNthString(!1,!0,"monday"),c.getDateNthString(!1,!0,"tuesday"),c.getDateNthString(!1,!0,"wednesday"),c.getDateNthString(!1,!0,"thursday"), c.getDateNthString(!1,!0,"friday"),c.getDateNthString(!1,!0,"saturday"),c.getDateNthString(!1,!0,"sunday")]},buildRegexFunctions:function(){var a=Date.CultureInfo.regexPatterns,b=Date.i18n.__,b=new RegExp("(\\b\\d\\d?("+b("AM")+"|"+b("PM")+")? )("+a.tomorrow.source.slice(1)+")","i");this.replaceFuncs=[[new RegExp(a.today.source+"(?!\\s*([+-]))\\b"),function(a){return 1<a.length?Date.today().toString("d"):a}],[b,function(a,b){return Date.today().addDays(1).toString("d")+" "+b}],[a.amThisMorning,function(a, b){return b}],[a.pmThisEvening,function(a,b){return b}]]},buildReplaceData:function(){this.buildRegexFunctions();this.replaceHash=c.addToHash(this.basicReplaceHash(),this.keys(),this.regexData())},stringReplaceFuncs:function(a){for(var b=0;b<this.replaceFuncs.length;b++)a=a.replace(this.replaceFuncs[b][0],this.replaceFuncs[b][1]);return a},parse:function(a){a=this.stringReplaceFuncs(a);a=c.multiReplace(a,this.replaceHash);try{var b=a.split(/([\s\-\.\,\/\x27]+)/);3===b.length&&h.Numeric.isNumeric(b[0])&& h.Numeric.isNumeric(b[2])&&4<=b[2].length&&"d"===Date.CultureInfo.dateElementOrder[0]&&(a="1/"+b[0]+"/"+b[2])}catch(e){}return a}};h.Normalizer.buildReplaceData()})(); (function(){for(var h=Date.Parsing,f=h.Operators={rtoken:function(a){return function(e){var g=e.match(a);if(g)return[g[0],e.substring(g[0].length)];throw new h.Exception(e);}},token:function(){return function(a){return f.rtoken(new RegExp("^\\s*"+a+"\\s*"))(a)}},stoken:function(a){return f.rtoken(new RegExp("^"+a))},until:function(a){return function(e){for(var g=[],c=null;e.length;){try{c=a.call(this,e)}catch(d){g.push(c[0]);e=c[1];continue}break}return[g,e]}},many:function(a){return function(e){for(var g= [],c=null;e.length;){try{c=a.call(this,e)}catch(d){break}g.push(c[0]);e=c[1]}return[g,e]}},optional:function(a){return function(e){var g=null;try{g=a.call(this,e)}catch(c){return[null,e]}return[g[0],g[1]]}},not:function(a){return function(e){try{a.call(this,e)}catch(g){return[null,e]}throw new h.Exception(e);}},ignore:function(a){return a?function(e){var g=null,g=a.call(this,e);return[null,g[1]]}:null},product:function(){for(var a=arguments[0],e=Array.prototype.slice.call(arguments,1),g=[],c=0;c< a.length;c++)g.push(f.each(a[c],e));return g},cache:function(a){var e={},g=0,c=[],d=Date.Config.CACHE_MAX||1E5,f=null;return function(l){if(g===d)for(var p=0;10>p;p++){var q=c.shift();q&&(delete e[q],g--)}try{f=e[l]=e[l]||a.call(this,l)}catch(s){f=e[l]=s}g++;c.push(l);if(f instanceof h.Exception)throw f;return f}},any:function(){var a=arguments;return function(e){for(var g=null,c=0;c<a.length;c++)if(null!=a[c]){try{g=a[c].call(this,e)}catch(d){g=null}if(g)return g}throw new h.Exception(e);}},each:function(){var a= arguments;return function(e){for(var c=[],d=null,f=0;f<a.length;f++)if(null!=a[f]){try{d=a[f].call(this,e)}catch(n){throw new h.Exception(e);}c.push(d[0]);e=d[1]}return[c,e]}},all:function(){var a=a;return a.each(a.optional(arguments))},sequence:function(a,e,c){e=e||f.rtoken(/^\s*/);c=c||null;return 1===a.length?a[0]:function(d){for(var f=null,n=null,l=[],p=0;p<a.length;p++){try{f=a[p].call(this,d)}catch(q){break}l.push(f[0]);try{n=e.call(this,f[1])}catch(s){n=null;break}d=n[1]}if(!f)throw new h.Exception(d); if(n)throw new h.Exception(n[1]);if(c)try{f=c.call(this,f[1])}catch(u){throw new h.Exception(f[1]);}return[l,f?f[1]:d]}},between:function(a,e,c){c=c||a;var d=f.each(f.ignore(a),e,f.ignore(c));return function(a){a=d.call(this,a);return[[a[0][0],r[0][2]],a[1]]}},list:function(a,e,c){e=e||f.rtoken(/^\s*/);c=c||null;return a instanceof Array?f.each(f.product(a.slice(0,-1),f.ignore(e)),a.slice(-1),f.ignore(c)):f.each(f.many(f.each(a,f.ignore(e))),px,f.ignore(c))},set:function(a,e,c){e=e||f.rtoken(/^\s*/); c=c||null;return function(d){for(var k=null,n=k=null,l=null,p=[[],d],q=!1,s=0;s<a.length;s++){k=n=null;q=1===a.length;try{k=a[s].call(this,d)}catch(u){continue}l=[[k[0]],k[1]];if(0<k[1].length&&!q)try{n=e.call(this,k[1])}catch(v){q=!0}else q=!0;q||0!==n[1].length||(q=!0);if(!q){k=[];for(q=0;q<a.length;q++)s!==q&&k.push(a[q]);k=f.set(k,e).call(this,n[1]);0<k[0].length&&(l[0]=l[0].concat(k[0]),l[1]=k[1])}l[1].length<p[1].length&&(p=l);if(0===p[1].length)break}if(0===p[0].length)return p;if(c){try{n= c.call(this,p[1])}catch(w){throw new h.Exception(p[1]);}p[1]=n[1]}return p}},forward:function(a,e){return function(c){return a[e].call(this,c)}},replace:function(a,e){return function(c){c=a.call(this,c);return[e,c[1]]}},process:function(a,e){return function(c){c=a.call(this,c);return[e.call(this,c[0]),c[1]]}},min:function(a,e){return function(c){var d=e.call(this,c);if(d[0].length<a)throw new h.Exception(c);return d}}},d=function(a){return function(){var e=null,c=[],d;1<arguments.length?e=Array.prototype.slice.call(arguments): arguments[0]instanceof Array&&(e=arguments[0]);if(e){if(d=e.shift(),0<d.length)return e.unshift(d[void 0]),c.push(a.apply(null,e)),e.shift(),c}else return a.apply(null,arguments)}},c="optional not ignore cache".split(/\s/),a=0;a<c.length;a++)f[c[a]]=d(f[c[a]]);d=function(a){return function(){return arguments[0]instanceof Array?a.apply(null,arguments[0]):a.apply(null,arguments)}};c="each any all".split(/\s/);for(a=0;a<c.length;a++)f[c[a]]=d(f[c[a]])})(); (function(){var h=Date,f=function(c){for(var a=[],b=0;b<c.length;b++)c[b]instanceof Array?a=a.concat(f(c[b])):c[b]&&a.push(c[b]);return a},d=function(){if(this.meridian&&(this.hour||0===this.hour)){if("a"===this.meridian&&11<this.hour&&Date.Config.strict24hr)throw"Invalid hour and meridian combination";if("p"===this.meridian&&12>this.hour&&Date.Config.strict24hr)throw"Invalid hour and meridian combination";"p"===this.meridian&&12>this.hour?this.hour+=12:"a"===this.meridian&&12===this.hour&&(this.hour= 0)}};h.Translator={hour:function(c){return function(){this.hour=Number(c)}},minute:function(c){return function(){this.minute=Number(c)}},second:function(c){return function(){this.second=Number(c)}},secondAndMillisecond:function(c){return function(){var a=c.match(/^([0-5][0-9])\.([0-9]{1,3})/);this.second=Number(a[1]);this.millisecond=Number(a[2])}},meridian:function(c){return function(){this.meridian=c.slice(0,1).toLowerCase()}},timezone:function(c){return function(){var a=c.replace(/[^\d\+\-]/g, "");a.length?this.timezoneOffset=Number(a):this.timezone=c.toLowerCase()}},day:function(c){var a=c[0];return function(){this.day=Number(a.match(/\d+/)[0]);if(1>this.day)throw"invalid day";}},month:function(c){return function(){this.month=3===c.length?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(c)/4:Number(c)-1;if(0>this.month)throw"invalid month";}},year:function(c){return function(){var a=Number(c);this.year=2<c.length?a:a+(a+2E3<Date.CultureInfo.twoDigitYearMax?2E3:1900)}},rday:function(c){return function(){switch(c){case "yesterday":this.days= -1;break;case "tomorrow":this.days=1;break;case "today":this.days=0;break;case "now":this.days=0,this.now=!0}}},finishExact:function(c){c=c instanceof Array?c:[c];for(var a=0;a<c.length;a++)c[a]&&c[a].call(this);c=new Date;!this.hour&&!this.minute||this.month||this.year||this.day||(this.day=c.getDate());this.year||(this.year=c.getFullYear());this.month||0===this.month||(this.month=c.getMonth());this.day||(this.day=1);this.hour||(this.hour=0);this.minute||(this.minute=0);this.second||(this.second= 0);this.millisecond||(this.millisecond=0);d.call(this);if(this.day>h.getDaysInMonth(this.year,this.month))throw new RangeError(this.day+" is not a valid value for days.");c=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond);100>this.year&&c.setFullYear(this.year);this.timezone?c.set({timezone:this.timezone}):this.timezoneOffset&&c.set({timezoneOffset:this.timezoneOffset});return c},finish:function(c){var a,b,e;c=c instanceof Array?f(c):[c];if(0===c.length)return null; for(a=0;a<c.length;a++)"function"===typeof c[a]&&c[a].call(this);if(!this.now||this.unit||this.operator)c=this.now||-1!=="hour minute second".indexOf(this.unit)?new Date:h.today();else return new Date;a=!!(this.days&&null!==this.days||this.orient||this.operator);b="past"===this.orient||"subtract"===this.operator?-1:1;this.month&&"week"===this.unit&&(this.value=this.month+1,delete this.month,delete this.day);!this.month&&0!==this.month||-1==="year day hour minute second".indexOf(this.unit)||(this.value|| (this.value=this.month+1),this.month=null,a=!0);a||!this.weekday||this.day||this.days||(e=Date[this.weekday](),this.day=e.getDate(),this.month||(this.month=e.getMonth()),this.year=e.getFullYear());if(a&&this.weekday&&"month"!==this.unit&&"week"!==this.unit){var g=c;e=b||1;this.unit="day";this.days=(g=h.getDayNumberFromName(this.weekday)-g.getDay())?(g+7*e)%7:7*e}!this.weekday||"week"===this.unit||this.day||this.days||(e=Date[this.weekday](),this.day=e.getDate(),e.getMonth()!==c.getMonth()&&(this.month= e.getMonth()));this.month&&"day"===this.unit&&this.operator&&(this.value||(this.value=this.month+1),this.month=null);null!=this.value&&null!=this.month&&null!=this.year&&(this.day=1*this.value);this.month&&!this.day&&this.value&&(c.set({day:1*this.value}),a||(this.day=1*this.value));this.month||!this.value||"month"!==this.unit||this.now||(this.month=this.value,a=!0);a&&(this.month||0===this.month)&&"year"!==this.unit&&(e=b||1,this.unit="month",this.months=(g=this.month-c.getMonth())?(g+12*e)%12:12* e,this.month=null);this.unit||(this.unit="day");if(!this.value&&this.operator&&null!==this.operator&&this[this.unit+"s"]&&null!==this[this.unit+"s"])this[this.unit+"s"]=this[this.unit+"s"]+("add"===this.operator?1:-1)+(this.value||0)*b;else if(null==this[this.unit+"s"]||null!=this.operator)this.value||(this.value=1),this[this.unit+"s"]=this.value*b;d.call(this);!this.month&&0!==this.month||this.day||(this.day=1);if(!this.orient&&!this.operator&&"week"===this.unit&&this.value&&!this.day&&!this.month)return Date.today().setWeek(this.value); if("week"===this.unit&&this.weeks&&!this.day&&!this.month)return c=Date[void 0!==this.weekday?this.weekday:"today"]().addWeeks(this.weeks),this.now&&c.setTimeToNow(),c;a&&this.timezone&&this.day&&this.days&&(this.day=this.days);a?c.add(this):c.set(this);this.timezone&&(this.timezone=this.timezone.toUpperCase(),a=h.getTimezoneOffset(this.timezone),c.hasDaylightSavingTime()&&(b=h.getTimezoneAbbreviation(a,c.isDaylightSavingTime()),b!==this.timezone&&(c.isDaylightSavingTime()?c.addHours(-1):c.addHours(1))), c.setTimezoneOffset(a));return c}}})(); (function(){var h=Date;h.Grammar={};var f=h.Parsing.Operators,d=h.Grammar,c=h.Translator,a;a=function(){return f.each(f.any.apply(null,arguments),f.not(d.ctoken2("timeContext")))};d.datePartDelimiter=f.rtoken(/^([\s\-\.\,\/\x27]+)/);d.timePartDelimiter=f.stoken(":");d.whiteSpace=f.rtoken(/^\s*/);d.generalDelimiter=f.rtoken(/^(([\s\,]|at|@|on)+)/);var b={};d.ctoken=function(a){var c=b[a];if(!c){for(var c=Date.CultureInfo.regexPatterns,e=a.split(/\s+/),d=[],g=0;g<e.length;g++)d.push(f.replace(f.rtoken(c[e[g]]), e[g]));c=b[a]=f.any.apply(null,d)}return c};d.ctoken2=function(a){return f.rtoken(Date.CultureInfo.regexPatterns[a])};var e=function(a,b,c,e){d[a]=e?f.cache(f.process(f.each(f.rtoken(b),f.optional(d.ctoken2(e))),c)):f.cache(f.process(f.rtoken(b),c))},g=function(a,b){return f.cache(f.process(d.ctoken2(a),b))},m={},k=function(a){m[a]=m[a]||d.format(a)[0];return m[a]};d.allformats=function(a){var b=[];if(a instanceof Array)for(var c=0;c<a.length;c++)b.push(k(a[c]));else b.push(k(a));return b};d.formats= function(a){if(a instanceof Array){for(var b=[],c=0;c<a.length;c++)b.push(k(a[c]));return f.any.apply(null,b)}return k(a)};var n={timeFormats:function(){var a,b="h hh H HH m mm s ss ss.s z zz".split(" "),h=[/^(0[0-9]|1[0-2]|[1-9])/,/^(0[0-9]|1[0-2])/,/^([0-1][0-9]|2[0-3]|[0-9])/,/^([0-1][0-9]|2[0-3])/,/^([0-5][0-9]|[0-9])/,/^[0-5][0-9]/,/^([0-5][0-9]|[0-9])/,/^[0-5][0-9]/,/^[0-5][0-9]\.[0-9]{1,3}/,/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/,/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/],m=[c.hour, c.hour,c.hour,c.minute,c.minute,c.second,c.second,c.secondAndMillisecond,c.timezone,c.timezone,c.timezone];for(a=0;a<b.length;a++)e(b[a],h[a],m[a]);d.hms=f.cache(f.sequence([d.H,d.m,d.s],d.timePartDelimiter));d.t=g("shortMeridian",c.meridian);d.tt=g("longMeridian",c.meridian);d.zzz=g("timezone",c.timezone);d.timeSuffix=f.each(f.ignore(d.whiteSpace),f.set([d.tt,d.zzz]));d.time=f.each(f.optional(f.ignore(f.stoken("T"))),d.hms,d.timeSuffix)},dateFormats:function(){var b=function(){return f.set(arguments, d.datePartDelimiter)},g,h="d dd M MM y yy yyy yyyy".split(" "),m=[/^([0-2]\d|3[0-1]|\d)/,/^([0-2]\d|3[0-1])/,/^(1[0-2]|0\d|\d)/,/^(1[0-2]|0\d)/,/^(\d+)/,/^(\d\d)/,/^(\d\d?\d?\d?)/,/^(\d\d\d\d)/],n=[c.day,c.day,c.month,c.month,c.year,c.year,c.year,c.year],k=["ordinalSuffix","ordinalSuffix"];for(g=0;g<h.length;g++)e(h[g],m[g],n[g],k[g]);d.MMM=d.MMMM=f.cache(f.process(d.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),c.month));d.ddd=d.dddd=f.cache(f.process(d.ctoken("sun mon tue wed thu fri sat"), function(a){return function(){this.weekday=a}}));d.day=a(d.d,d.dd);d.month=a(d.M,d.MMM);d.year=a(d.yyyy,d.yy);d.mdy=b(d.ddd,d.month,d.day,d.year);d.ymd=b(d.ddd,d.year,d.month,d.day);d.dmy=b(d.ddd,d.day,d.month,d.year);d.date=function(a){return(d[Date.CultureInfo.dateElementOrder]||d.mdy).call(this,a)}},relative:function(){d.orientation=f.process(d.ctoken("past future"),function(a){return function(){this.orient=a}});d.operator=f.process(d.ctoken("add subtract"),function(a){return function(){this.operator= a}});d.rday=f.process(d.ctoken("yesterday tomorrow today now"),c.rday);d.unit=f.process(d.ctoken("second minute hour day week month year"),function(a){return function(){this.unit=a}})}};d.buildGrammarFormats=function(){b={};n.timeFormats();n.dateFormats();n.relative();d.value=f.process(f.rtoken(/^([-+]?\d+)?(st|nd|rd|th)?/),function(a){return function(){this.value=a.replace(/\D/g,"")}});d.expression=f.set([d.rday,d.operator,d.value,d.unit,d.orientation,d.ddd,d.MMM]);d.format=f.process(f.many(f.any(f.process(f.rtoken(/^(dd?d?d?(?!e)|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/), function(a){if(d[a])return d[a];throw h.Parsing.Exception(a);}),f.process(f.rtoken(/^[^dMyhHmstz]+/),function(a){return f.ignore(f.stoken(a))}))),function(a){return f.process(f.each.apply(null,a),c.finishExact)});d._start=f.process(f.set([d.date,d.time,d.expression],d.generalDelimiter,d.whiteSpace),c.finish)};d.buildGrammarFormats();d._formats=d.formats('"yyyy-MM-ddTHH:mm:ssZ";yyyy-MM-ddTHH:mm:ss.sz;yyyy-MM-ddTHH:mm:ssZ;yyyy-MM-ddTHH:mm:ssz;yyyy-MM-ddTHH:mm:ss;yyyy-MM-ddTHH:mmZ;yyyy-MM-ddTHH:mmz;yyyy-MM-ddTHH:mm;ddd, MMM dd, yyyy H:mm:ss tt;ddd MMM d yyyy HH:mm:ss zzz;MMddyyyy;ddMMyyyy;Mddyyyy;ddMyyyy;Mdyyyy;dMyyyy;yyyy;Mdyy;dMyy;d'.split(";")); d.start=function(a){try{var b=d._formats.call({},a);if(0===b[1].length)return b}catch(c){}return d._start.call({},a)}})(); (function(){var h=Date,f={removeOrds:function(d){return d=(ords=d.match(/\b(\d+)(?:st|nd|rd|th)\b/))&&2===ords.length?d.replace(ords[0],ords[1]):d},grammarParser:function(d){var c=null;try{c=h.Grammar.start.call({},d.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(a){return null}return 0===c[1].length?c[0]:null},nativeFallback:function(d){var c;try{return(c=Date._parse(d))||0===c?new Date(c):null}catch(a){return null}}};h._parse||(h._parse=h.parse);h.parse=function(d){var c;if(!d)return null;if(d instanceof Date)return d.clone();4<=d.length&&"0"!==d.charAt(0)&&"+"!==d.charAt(0)&&"-"!==d.charAt(0)&&(c=h.Parsing.ISO.parse(d)||h.Parsing.Numeric.parse(d));if(c instanceof Date&&!isNaN(c.getTime()))return c;d=h.Parsing.Normalizer.parse(f.removeOrds(d));c=f.grammarParser(d);return null!==c?c:f.nativeFallback(d)};Date.getParseFunction=function(d){var c=Date.Grammar.allformats(d);return function(a){for(var b=null,e=0;e<c.length;e++){try{b=c[e].call({},a)}catch(d){continue}if(0===b[1].length)return b[0]}return null}}; h.parseExact=function(d,c){return h.getParseFunction(c)(d)}})(); (function(){var h=Date,f=h.prototype,d=function(a,b){b||(b=2);return("000"+a).slice(-1*b)},c={d:"dd","%d":"dd",D:"ddd","%a":"ddd",j:"dddd",l:"dddd","%A":"dddd",S:"S",F:"MMMM","%B":"MMMM",m:"MM","%m":"MM",M:"MMM","%b":"MMM","%h":"MMM",n:"M",Y:"yyyy","%Y":"yyyy",y:"yy","%y":"yy",g:"h","%I":"h",G:"H",h:"hh",H:"HH","%H":"HH",i:"mm","%M":"mm",s:"ss","%S":"ss","%r":"hh:mm tt","%R":"H:mm","%T":"H:mm:ss","%X":"t","%x":"d","%e":"d","%D":"MM/dd/yy","%n":"\\n","%t":"\\t",e:"z",T:"z","%z":"z","%Z":"z",Z:"ZZ", N:"u",w:"u","%w":"u",W:"W","%V":"W"},a={substitutes:function(a){return c[a]},interpreted:function(a,b){var c;switch(a){case "%u":return b.getDay()+1;case "z":return b.getOrdinalNumber();case "%j":return d(b.getOrdinalNumber(),3);case "%U":c=b.clone().set({month:0,day:1}).addDays(-1).moveToDayOfWeek(0);var f=b.clone().addDays(1).moveToDayOfWeek(0,-1);return f<c?"00":d((f.getOrdinalNumber()-c.getOrdinalNumber())/7+1);case "%W":return d(b.getWeek());case "t":return h.getDaysInMonth(b.getFullYear(),b.getMonth()); case "o":case "%G":return b.setWeek(b.getISOWeek()).toString("yyyy");case "%g":return b._format("%G").slice(-2);case "a":case "%p":return t("tt").toLowerCase();case "A":return t("tt").toUpperCase();case "u":return d(b.getMilliseconds(),3);case "I":return b.isDaylightSavingTime()?1:0;case "O":return b.getUTCOffset();case "P":return c=b.getUTCOffset(),c.substring(0,c.length-2)+":"+c.substring(c.length-2);case "B":return c=new Date,Math.floor((3600*c.getHours()+60*c.getMinutes()+c.getSeconds()+60*(c.getTimezoneOffset()+ 60))/86.4);case "c":return b.toISOString().replace(/\"/g,"");case "U":return h.strtotime("now");case "%c":return t("d")+" "+t("t");case "%C":return Math.floor(b.getFullYear()/100+1)}},shouldOverrideDefaults:function(a){switch(a){case "%e":return!0;default:return!1}},parse:function(b,c){var d,f=c||new Date;return(d=a.substitutes(b))?d:(d=a.interpreted(b,f))?d:b}};h.normalizeFormat=function(b,c){return b.replace(/(%|\\)?.|%%/g,function(b){return a.parse(b,c)})};h.strftime=function(a,b){return Date.parse(b)._format(a)}; h.strtotime=function(a){a=h.parse(a);return Math.round(h.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds(),a.getUTCMilliseconds())/1E3)};var b=function(b){return function(c){var d=!1;if("\\"===c.charAt(0)||"%%"===c.substring(0,2))return c.replace("\\","").replace("%%","%");d=a.shouldOverrideDefaults(c);if(c=h.normalizeFormat(c,b))return b.toString(c,d)}};f._format=function(a){var c=b(this);return a?a.replace(/(%|\\)?.|%%/g,c):this._toString()}; f.format||(f.format=f._format)})(); (function(){var h=function(c){return function(){return this[c]}},f=function(c){return function(a){this[c]=a;return this}},d=function(c,a,b,e,f){if(1===arguments.length&&"number"===typeof c){var h=0>c?-1:1,k=Math.abs(c);this.setDays(Math.floor(k/864E5)*h);k%=864E5;this.setHours(Math.floor(k/36E5)*h);k%=36E5;this.setMinutes(Math.floor(k/6E4)*h);k%=6E4;this.setSeconds(Math.floor(k/1E3)*h);this.setMilliseconds(k%1E3*h)}else this.set(c,a,b,e,f);this.getTotalMilliseconds=function(){return 864E5*this.getDays()+ 36E5*this.getHours()+6E4*this.getMinutes()+1E3*this.getSeconds()};this.compareTo=function(a){var b=new Date(1970,1,1,this.getHours(),this.getMinutes(),this.getSeconds());a=null===a?new Date(1970,1,1,0,0,0):new Date(1970,1,1,a.getHours(),a.getMinutes(),a.getSeconds());return b<a?-1:b>a?1:0};this.equals=function(a){return 0===this.compareTo(a)};this.add=function(a){return null===a?this:this.addSeconds(a.getTotalMilliseconds()/1E3)};this.subtract=function(a){return null===a?this:this.addSeconds(-a.getTotalMilliseconds()/ 1E3)};this.addDays=function(a){return new d(this.getTotalMilliseconds()+864E5*a)};this.addHours=function(a){return new d(this.getTotalMilliseconds()+36E5*a)};this.addMinutes=function(a){return new d(this.getTotalMilliseconds()+6E4*a)};this.addSeconds=function(a){return new d(this.getTotalMilliseconds()+1E3*a)};this.addMilliseconds=function(a){return new d(this.getTotalMilliseconds()+a)};this.get12HourHour=function(){return 12<this.getHours()?this.getHours()-12:0===this.getHours()?12:this.getHours()}; this.getDesignator=function(){return 12>this.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator};this.toString=function(a){this._toString=function(){return null!==this.getDays()&&0<this.getDays()?this.getDays()+"."+this.getHours()+":"+this.p(this.getMinutes())+":"+this.p(this.getSeconds()):this.getHours()+":"+this.p(this.getMinutes())+":"+this.p(this.getSeconds())};this.p=function(a){return 2>a.toString().length?"0"+a:a};var b=this;return a?a.replace(/dd?|HH?|hh?|mm?|ss?|tt?/g, function(a){switch(a){case "d":return b.getDays();case "dd":return b.p(b.getDays());case "H":return b.getHours();case "HH":return b.p(b.getHours());case "h":return b.get12HourHour();case "hh":return b.p(b.get12HourHour());case "m":return b.getMinutes();case "mm":return b.p(b.getMinutes());case "s":return b.getSeconds();case "ss":return b.p(b.getSeconds());case "t":return(12>b.getHours()?Date.CultureInfo.amDesignator:Date.CultureInfo.pmDesignator).substring(0,1);case "tt":return 12>b.getHours()?Date.CultureInfo.amDesignator: Date.CultureInfo.pmDesignator}}):this._toString()};return this};(function(c,a){for(var b=0;b<a.length;b++){var e=a[b],d=e.slice(0,1).toUpperCase()+e.slice(1);c.prototype[e]=0;c.prototype["get"+d]=h(e);c.prototype["set"+d]=f(e)}})(d,"years months days hours minutes seconds milliseconds".split(" ").slice(2));d.prototype.set=function(c,a,b,e,d){this.setDays(c||this.getDays());this.setHours(a||this.getHours());this.setMinutes(b||this.getMinutes());this.setSeconds(e||this.getSeconds());this.setMilliseconds(d|| this.getMilliseconds())};Date.prototype.getTimeOfDay=function(){return new d(0,this.getHours(),this.getMinutes(),this.getSeconds(),this.getMilliseconds())};Date.TimeSpan=d;"undefined"!==typeof window&&(window.TimeSpan=d)})(); (function(){var h=function(a){return function(){return this[a]}},f=function(a){return function(b){this[a]=b;return this}},d=function(a,b,c,d){function f(){b.addMonths(-a);d.months++;12===d.months&&(d.years++,d.months=0)}if(1===a)for(;b>c;)f();else for(;b<c;)f();d.months--;d.months*=a;d.years*=a},c=function(a,b,c,f,h,k,n){if(7===arguments.length)this.set(a,b,c,f,h,k,n);else if(2===arguments.length&&arguments[0]instanceof Date&&arguments[1]instanceof Date){var l=arguments[0].clone(),p=arguments[1].clone(), q=l>p?1:-1;this.dates={start:arguments[0].clone(),end:arguments[1].clone()};d(q,l,p,this);var s=!1===(l.isDaylightSavingTime()===p.isDaylightSavingTime());s&&1===q?l.addHours(-1):s&&l.addHours(1);l=p-l;0!==l&&(l=new TimeSpan(l),this.set(this.years,this.months,l.getDays(),l.getHours(),l.getMinutes(),l.getSeconds(),l.getMilliseconds()))}return this};(function(a,b){for(var c=0;c<b.length;c++){var d=b[c],m=d.slice(0,1).toUpperCase()+d.slice(1);a.prototype[d]=0;a.prototype["get"+m]=h(d);a.prototype["set"+ m]=f(d)}})(c,"years months days hours minutes seconds milliseconds".split(" "));c.prototype.set=function(a,b,c,d,f,h,n){this.setYears(a||this.getYears());this.setMonths(b||this.getMonths());this.setDays(c||this.getDays());this.setHours(d||this.getHours());this.setMinutes(f||this.getMinutes());this.setSeconds(h||this.getSeconds());this.setMilliseconds(n||this.getMilliseconds())};Date.TimePeriod=c;"undefined"!==typeof window&&(window.TimePeriod=c)})();
Hasanxch/TugasAkhir
assets/vendors/DateJS/build/production/date-de-LU.min.js
JavaScript
mit
56,558
<?php /** * Locale data for 'es_ES'. * * This file is automatically generated by yiic cldr command. * * Copyright © 1991-2007 Unicode, Inc. All rights reserved. * Distributed under the Terms of Use in http://www.unicode.org/copyright.html. * * @copyright 2008-2013 Yii Software LLC (http://www.yiiframework.com/license/) */ return array ( 'version' => '4123', 'numberSymbols' => array ( 'alias' => '', 'decimal' => ',', 'group' => '.', 'list' => ';', 'percentSign' => '%', 'plusSign' => '+', 'minusSign' => '-', 'exponential' => 'E', 'perMille' => '‰', 'infinity' => '∞', 'nan' => 'NaN', ), 'decimalFormat' => '#,##0.###', 'scientificFormat' => '#E0', 'percentFormat' => '#,##0%', 'currencyFormat' => '#,##0.00 ¤', 'currencySymbols' => array ( 'AUD' => 'AU$', 'BRL' => 'R$', 'CAD' => 'CA$', 'CNY' => 'CN¥', 'EUR' => '€', 'GBP' => '£', 'HKD' => 'HK$', 'ILS' => '₪', 'INR' => '₹', 'JPY' => 'JP¥', 'KRW' => '₩', 'MXN' => 'MX$', 'NZD' => 'NZ$', 'THB' => '฿', 'TWD' => 'NT$', 'USD' => 'US$', 'VND' => '₫', 'XAF' => 'FCFA', 'XCD' => 'EC$', 'XOF' => 'CFA', 'XPF' => 'CFPF', 'AFN' => 'Af', 'ANG' => 'NAf.', 'AOA' => 'Kz', 'ARS' => 'AR$', 'AWG' => 'Afl.', 'AZN' => 'man.', 'ESP' => '₧', ), 'monthNames' => array ( 'wide' => array ( 1 => 'enero', 2 => 'febrero', 3 => 'marzo', 4 => 'abril', 5 => 'mayo', 6 => 'junio', 7 => 'julio', 8 => 'agosto', 9 => 'septiembre', 10 => 'octubre', 11 => 'noviembre', 12 => 'diciembre', ), 'abbreviated' => array ( 1 => 'ene', 2 => 'feb', 3 => 'mar', 4 => 'abr', 5 => 'may', 6 => 'jun', 7 => 'jul', 8 => 'ago', 9 => 'sep', 10 => 'oct', 11 => 'nov', 12 => 'dic', ), ), 'monthNamesSA' => array ( 'narrow' => array ( 1 => 'E', 2 => 'F', 3 => 'M', 4 => 'A', 5 => 'M', 6 => 'J', 7 => 'J', 8 => 'A', 9 => 'S', 10 => 'O', 11 => 'N', 12 => 'D', ), 'abbreviated' => array ( 5 => 'mayo', ), ), 'weekDayNames' => array ( 'wide' => array ( 0 => 'domingo', 1 => 'lunes', 2 => 'martes', 3 => 'miércoles', 4 => 'jueves', 5 => 'viernes', 6 => 'sábado', ), 'abbreviated' => array ( 0 => 'dom', 1 => 'lun', 2 => 'mar', 3 => 'mié', 4 => 'jue', 5 => 'vie', 6 => 'sáb', ), ), 'weekDayNamesSA' => array ( 'narrow' => array ( 0 => 'D', 1 => 'L', 2 => 'M', 3 => 'X', 4 => 'J', 5 => 'V', 6 => 'S', ), ), 'eraNames' => array ( 'abbreviated' => array ( 0 => 'a.C.', 1 => 'd.C.', ), 'wide' => array ( 0 => 'antes de Cristo', 1 => 'anno Dómini', ), 'narrow' => array ( 0 => 'a.C.', 1 => 'd.C.', ), ), 'dateFormats' => array ( 'full' => 'EEEE, d \'de\' MMMM \'de\' y', 'long' => 'd \'de\' MMMM \'de\' y', 'medium' => 'dd/MM/yyyy', 'short' => 'dd/MM/yy', ), 'timeFormats' => array ( 'full' => 'HH:mm:ss zzzz', 'long' => 'HH:mm:ss z', 'medium' => 'HH:mm:ss', 'short' => 'HH:mm', ), 'dateTimeFormat' => '{1} {0}', 'amName' => 'a.m.', 'pmName' => 'p.m.', 'orientation' => 'ltr', 'languages' => array ( 'aa' => 'afar', 'ab' => 'abjasio', 'ace' => 'acehnés', 'ach' => 'acoli', 'ada' => 'adangme', 'ady' => 'adigeo', 'ae' => 'avéstico', 'af' => 'afrikaans', 'afa' => 'lengua afroasiática', 'afh' => 'afrihili', 'ain' => 'ainu', 'ak' => 'akan', 'akk' => 'acadio', 'ale' => 'aleutiano', 'alg' => 'lenguas algonquinas', 'alt' => 'altái meridional', 'am' => 'amárico', 'an' => 'aragonés', 'ang' => 'inglés antiguo', 'anp' => 'angika', 'apa' => 'lenguas apache', 'ar' => 'árabe', 'arc' => 'arameo', 'arn' => 'araucano', 'arp' => 'arapaho', 'art' => 'lengua artificial', 'arw' => 'arahuaco', 'as' => 'asamés', 'ast' => 'asturiano', 'ath' => 'lenguas atabascas', 'aus' => 'lenguas australianas', 'av' => 'avar', 'awa' => 'avadhi', 'ay' => 'aimara', 'az' => 'azerí', 'ba' => 'bashkir', 'bad' => 'banda', 'bai' => 'lenguas bamileke', 'bal' => 'baluchi', 'ban' => 'balinés', 'bas' => 'basa', 'bat' => 'lengua báltica', 'be' => 'bielorruso', 'bej' => 'beja', 'bem' => 'bemba', 'ber' => 'bereber', 'bg' => 'búlgaro', 'bh' => 'bihari', 'bho' => 'bhojpuri', 'bi' => 'bislama', 'bik' => 'bicol', 'bin' => 'bini', 'bla' => 'siksika', 'bm' => 'bambara', 'bn' => 'bengalí', 'bnt' => 'bantú', 'bo' => 'tibetano', 'br' => 'bretón', 'bra' => 'braj', 'bs' => 'bosnio', 'btk' => 'batak', 'bua' => 'buriat', 'bug' => 'buginés', 'byn' => 'blin', 'ca' => 'catalán', 'cad' => 'caddo', 'cai' => 'lengua india centroamericana', 'car' => 'caribe', 'cau' => 'lengua caucásica', 'cch' => 'atsam', 'ce' => 'checheno', 'ceb' => 'cebuano', 'cel' => 'lengua celta', 'ch' => 'chamorro', 'chb' => 'chibcha', 'chg' => 'chagatái', 'chk' => 'trukés', 'chm' => 'marí', 'chn' => 'jerga chinuk', 'cho' => 'choctaw', 'chp' => 'chipewyan', 'chr' => 'cherokee', 'chy' => 'cheyene', 'cmc' => 'lenguas chámicas', 'co' => 'corso', 'cop' => 'copto', 'cpe' => 'lengua criolla o pidgin basada en el inglés', 'cpf' => 'lengua criolla o pidgin basada en el francés', 'cpp' => 'lengua criolla o pidgin basada en el portugués', 'cr' => 'cree', 'crh' => 'tártaro de Crimea', 'crp' => 'lengua criolla o pidgin', 'cs' => 'checo', 'csb' => 'casubio', 'cu' => 'eslavo eclesiástico', 'cus' => 'lengua cusita', 'cv' => 'chuvash', 'cy' => 'galés', 'da' => 'danés', 'dak' => 'dakota', 'dar' => 'dargva', 'day' => 'dayak', 'de' => 'alemán', 'de_at' => 'alemán austríaco', 'de_ch' => 'alto alemán de Suiza', 'del' => 'delaware', 'den' => 'slave', 'dgr' => 'dogrib', 'din' => 'dinka', 'doi' => 'dogri', 'dra' => 'lengua dravídica', 'dsb' => 'sorbio inferior', 'dua' => 'duala', 'dum' => 'neerlandés medieval', 'dv' => 'divehi', 'dyu' => 'diula', 'dz' => 'dzongkha', 'ee' => 'ewe', 'efi' => 'efik', 'egy' => 'egipcio antiguo', 'eka' => 'ekajuk', 'el' => 'griego', 'elx' => 'elamita', 'en' => 'inglés', 'en_au' => 'inglés australiano', 'en_ca' => 'inglés canadiense', 'en_gb' => 'inglés británico', 'en_us' => 'inglés estadounidense', 'enm' => 'inglés medieval', 'eo' => 'esperanto', 'es' => 'español', 'es_419' => 'español latinoamericano', 'es_es' => 'español de España', 'et' => 'estonio', 'eu' => 'vasco', 'ewo' => 'ewondo', 'fa' => 'persa', 'fan' => 'fang', 'fat' => 'fanti', 'ff' => 'fula', 'fi' => 'finés', 'fil' => 'filipino', 'fiu' => 'lengua finoúgria', 'fj' => 'fidjiano', 'fo' => 'feroés', 'fon' => 'fon', 'fr' => 'francés', 'fr_ca' => 'francés canadiense', 'fr_ch' => 'francés de Suiza', 'frm' => 'francés medieval', 'fro' => 'francés antiguo', 'frr' => 'frisón septentrional', 'frs' => 'frisón oriental', 'fur' => 'friulano', 'fy' => 'frisón occidental', 'ga' => 'irlandés', 'gaa' => 'ga', 'gay' => 'gayo', 'gba' => 'gbaya', 'gd' => 'gaélico escocés', 'gem' => 'lengua germánica', 'gez' => 'geez', 'gil' => 'gilbertés', 'gl' => 'gallego', 'gmh' => 'alemán de la alta edad media', 'gn' => 'guaraní', 'goh' => 'alemán de la alta edad antigua', 'gon' => 'gondi', 'gor' => 'gorontalo', 'got' => 'gótico', 'grb' => 'grebo', 'grc' => 'griego antiguo', 'gsw' => 'alemán suizo', 'gu' => 'gujarati', 'gv' => 'gaélico manés', 'gwi' => 'kutchin', 'ha' => 'hausa', 'hai' => 'haida', 'haw' => 'hawaiano', 'he' => 'hebreo', 'hi' => 'hindi', 'hil' => 'hiligaynon', 'him' => 'himachali', 'hit' => 'hitita', 'hmn' => 'hmong', 'ho' => 'hiri motu', 'hr' => 'croata', 'hsb' => 'sorbio superior', 'ht' => 'haitiano', 'hu' => 'húngaro', 'hup' => 'hupa', 'hy' => 'armenio', 'hz' => 'herero', 'ia' => 'interlingua', 'iba' => 'iban', 'id' => 'indonesio', 'ie' => 'interlingue', 'ig' => 'igbo', 'ii' => 'sichuan yi', 'ijo' => 'ijo', 'ik' => 'inupiaq', 'ilo' => 'ilocano', 'inc' => 'lengua índica', 'ine' => 'lengua indoeuropea', 'inh' => 'ingush', 'io' => 'ido', 'ira' => 'lengua irania', 'iro' => 'lenguas iroquesas', 'is' => 'islandés', 'it' => 'italiano', 'iu' => 'inuktitut', 'ja' => 'japonés', 'jbo' => 'lojban', 'jpr' => 'judeo-persa', 'jrb' => 'judeo-árabe', 'jv' => 'javanés', 'ka' => 'georgiano', 'kaa' => 'karakalpako', 'kab' => 'cabila', 'kac' => 'kachin', 'kaj' => 'jju', 'kam' => 'kamba', 'kar' => 'karen', 'kaw' => 'kawi', 'kbd' => 'kabardiano', 'kcg' => 'tyap', 'kfo' => 'koro', 'kg' => 'kongo', 'kha' => 'khasi', 'khi' => 'lengua joisana', 'kho' => 'kotanés', 'ki' => 'kikuyu', 'kj' => 'kuanyama', 'kk' => 'kazajo', 'kl' => 'groenlandés', 'km' => 'jemer', 'kmb' => 'kimbundu', 'kn' => 'canarés', 'ko' => 'coreano', 'kok' => 'konkani', 'kos' => 'kosraeano', 'kpe' => 'kpelle', 'kr' => 'kanuri', 'krc' => 'karachay-balkar', 'krl' => 'carelio', 'kro' => 'kru', 'kru' => 'kurukh', 'ks' => 'cachemiro', 'ku' => 'kurdo', 'kum' => 'kumyk', 'kut' => 'kutenai', 'kv' => 'komi', 'kw' => 'córnico', 'ky' => 'kirghiz', 'la' => 'latín', 'lad' => 'ladino', 'lah' => 'lahnda', 'lam' => 'lamba', 'lb' => 'luxemburgués', 'lez' => 'lezgiano', 'lg' => 'ganda', 'li' => 'limburgués', 'ln' => 'lingala', 'lo' => 'laosiano', 'lol' => 'mongo', 'loz' => 'lozi', 'lt' => 'lituano', 'lu' => 'luba-katanga', 'lua' => 'luba-lulua', 'lui' => 'luiseño', 'lun' => 'lunda', 'luo' => 'luo', 'lus' => 'lushai', 'lv' => 'letón', 'mad' => 'madurés', 'mag' => 'magahi', 'mai' => 'maithili', 'mak' => 'macasar', 'man' => 'mandingo', 'map' => 'lengua austronesia', 'mas' => 'masai', 'mdf' => 'moksha', 'mdr' => 'mandar', 'men' => 'mende', 'mg' => 'malgache', 'mga' => 'irlandés medieval', 'mh' => 'marshalés', 'mi' => 'maorí', 'mic' => 'micmac', 'min' => 'minangkabau', 'mis' => 'lenguas varias', 'mk' => 'macedonio', 'mkh' => 'lengua mon-jemer', 'ml' => 'malayalam', 'mn' => 'mongol', 'mnc' => 'manchú', 'mni' => 'manipuri', 'mno' => 'lenguas manobo', 'mo' => 'moldavo', 'moh' => 'mohawk', 'mos' => 'mossi', 'mr' => 'marathi', 'ms' => 'malayo', 'mt' => 'maltés', 'mul' => 'lenguas múltiples', 'mun' => 'lenguas munda', 'mus' => 'creek', 'mwl' => 'mirandés', 'mwr' => 'marwari', 'my' => 'birmano', 'myn' => 'maya', 'myv' => 'erzya', 'na' => 'nauruano', 'nah' => 'náhuatl', 'nai' => 'lengua india norteamericana', 'nap' => 'napolitano', 'nb' => 'bokmal noruego', 'nd' => 'ndebele septentrional', 'nds' => 'bajo alemán', 'ne' => 'nepalí', 'new' => 'newari', 'ng' => 'ndonga', 'nia' => 'nias', 'nic' => 'lengua níger-cordofana', 'niu' => 'niueano', 'nl' => 'neerlandés', 'nl_be' => 'flamenco', 'nn' => 'nynorsk noruego', 'no' => 'noruego', 'nog' => 'nogai', 'non' => 'nórdico antiguo', 'nqo' => 'n’ko', 'nr' => 'ndebele meridional', 'nso' => 'sotho septentrional', 'nub' => 'lenguas nubias', 'nv' => 'navajo', 'nwc' => 'newari clásico', 'ny' => 'nyanja', 'nym' => 'nyamwezi', 'nyn' => 'nyankole', 'nyo' => 'nyoro', 'nzi' => 'nzima', 'oc' => 'occitano', 'oj' => 'ojibwa', 'om' => 'oromo', 'or' => 'oriya', 'os' => 'osético', 'osa' => 'osage', 'ota' => 'turco otomano', 'oto' => 'lenguas otomanas', 'pa' => 'punjabí', 'paa' => 'lengua papú', 'pag' => 'pangasinán', 'pal' => 'pahlavi', 'pam' => 'pampanga', 'pap' => 'papiamento', 'pau' => 'palauano', 'peo' => 'persa antiguo', 'phi' => 'lengua filipina', 'phn' => 'fenicio', 'pi' => 'pali', 'pl' => 'polaco', 'pon' => 'pohnpeiano', 'pra' => 'lenguas prácritas', 'pro' => 'provenzal antiguo', 'ps' => 'pashto', 'pt' => 'portugués', 'pt_br' => 'portugués de Brasil', 'pt_pt' => 'portugués de Portugal', 'qu' => 'quechua', 'raj' => 'rajasthani', 'rap' => 'rapanui', 'rar' => 'rarotongano', 'rm' => 'retorrománico', 'rn' => 'kiroundi', 'ro' => 'rumano', 'roa' => 'lengua romance', 'rom' => 'romaní', 'root' => 'raíz', 'ru' => 'ruso', 'rup' => 'arrumano', 'rw' => 'kinyarwanda', 'sa' => 'sánscrito', 'sad' => 'sandawe', 'sah' => 'sakha', 'sai' => 'lengua india sudamericana', 'sal' => 'lenguas salish', 'sam' => 'arameo samaritano', 'sas' => 'sasak', 'sat' => 'santali', 'sc' => 'sardo', 'scn' => 'siciliano', 'sco' => 'escocés', 'sd' => 'sindhi', 'se' => 'sami septentrional', 'sel' => 'selkup', 'sem' => 'lengua semítica', 'sg' => 'sango', 'sga' => 'irlandés antiguo', 'sgn' => 'lenguajes de signos', 'sh' => 'serbocroata', 'shn' => 'shan', 'si' => 'cingalés', 'sid' => 'sidamo', 'sio' => 'lenguas sioux', 'sit' => 'lengua sino-tibetana', 'sk' => 'eslovaco', 'sl' => 'esloveno', 'sla' => 'lengua eslava', 'sm' => 'samoano', 'sma' => 'sami meridional', 'smi' => 'lengua sami', 'smj' => 'sami lule', 'smn' => 'sami inari', 'sms' => 'sami skolt', 'sn' => 'shona', 'snk' => 'soninké', 'so' => 'somalí', 'sog' => 'sogdiano', 'son' => 'songhai', 'sq' => 'albanés', 'sr' => 'serbio', 'srn' => 'sranan tongo', 'srr' => 'serer', 'ss' => 'siswati', 'ssa' => 'lengua nilo-sahariana', 'st' => 'sesotho meridional', 'su' => 'sundanés', 'suk' => 'sukuma', 'sus' => 'susu', 'sux' => 'sumerio', 'sv' => 'sueco', 'sw' => 'swahili', 'swb' => 'comorense', 'syc' => 'siríaco clásico', 'syr' => 'siriaco', 'ta' => 'tamil', 'tai' => 'lengua tai', 'te' => 'telugu', 'tem' => 'temne', 'ter' => 'tereno', 'tet' => 'tetún', 'tg' => 'tayiko', 'th' => 'tailandés', 'ti' => 'tigriña', 'tig' => 'tigré', 'tiv' => 'tiv', 'tk' => 'turcomano', 'tkl' => 'tokelauano', 'tl' => 'tagalo', 'tlh' => 'klingon', 'tli' => 'tlingit', 'tmh' => 'tamashek', 'tn' => 'setchwana', 'to' => 'tongano', 'tog' => 'tonga del Nyasa', 'tpi' => 'tok pisin', 'tr' => 'turco', 'ts' => 'tsonga', 'tsi' => 'tsimshiano', 'tt' => 'tártaro', 'tum' => 'tumbuka', 'tup' => 'lenguas tupí', 'tut' => 'lengua altaica', 'tvl' => 'tuvaluano', 'tw' => 'twi', 'ty' => 'tahitiano', 'tyv' => 'tuviniano', 'udm' => 'udmurt', 'ug' => 'uygur', 'uga' => 'ugarítico', 'uk' => 'ucraniano', 'umb' => 'umbundu', 'und' => 'lengua desconocida', 'ur' => 'urdu', 'uz' => 'uzbeko', 'vai' => 'vai', 've' => 'venda', 'vi' => 'vietnamita', 'vo' => 'volapük', 'vot' => 'vótico', 'wa' => 'valón', 'wak' => 'lenguas wakasha', 'wal' => 'walamo', 'war' => 'waray', 'was' => 'washo', 'wen' => 'lenguas sorbias', 'wo' => 'uolof', 'xal' => 'kalmyk', 'xh' => 'xhosa', 'yao' => 'yao', 'yap' => 'yapés', 'yi' => 'yídish', 'yo' => 'yoruba', 'ypk' => 'lenguas yupik', 'yue' => 'cantonés', 'za' => 'zhuang', 'zap' => 'zapoteco', 'zbl' => 'símbolos Bliss', 'zen' => 'zenaga', 'zh' => 'chino', 'zh_hans' => 'chino simplificado', 'zh_hant' => 'chino tradicional', 'znd' => 'zande', 'zu' => 'zulú', 'zun' => 'zuni', 'zxx' => 'sin contenido lingüístico', 'zza' => 'zazaki', ), 'scripts' => array ( 'arab' => 'perso-arábigo', 'armn' => 'armenio', 'avst' => 'avéstico', 'bali' => 'balinés', 'batk' => 'batak', 'beng' => 'bengalí', 'blis' => 'símbolos blis', 'bopo' => 'bopomofo', 'brah' => 'brahmi', 'brai' => 'braille', 'bugi' => 'buginés', 'buhd' => 'buhid', 'cans' => 'símbolos aborígenes canadienses unificados', 'cari' => 'cario', 'cham' => 'cham', 'cher' => 'cherokee', 'cirt' => 'cirth', 'copt' => 'copto', 'cprt' => 'chipriota', 'cyrl' => 'cirílico', 'cyrs' => 'cirílico del antiguo eslavo eclesiástico', 'deva' => 'devanagari', 'dsrt' => 'deseret', 'egyd' => 'egipcio demótico', 'egyh' => 'egipcio hierático', 'egyp' => 'jeroglíficos egipcios', 'ethi' => 'etiópico', 'geok' => 'georgiano eclesiástico', 'geor' => 'georgiano', 'glag' => 'glagolítico', 'goth' => 'gótico', 'grek' => 'griego', 'gujr' => 'gujarati', 'guru' => 'gurmuji', 'hang' => 'hangul', 'hani' => 'han', 'hano' => 'hanunoo', 'hans' => 'hanzi simplificado', 'hant' => 'hanzi tradicional', 'hebr' => 'hebreo', 'hira' => 'hiragana', 'hmng' => 'pahawh hmong', 'hrkt' => 'katakana o hiragana', 'hung' => 'húngaro antiguo', 'inds' => 'Indio (harappan)', 'ital' => 'antigua bastardilla', 'java' => 'javanés', 'jpan' => 'japonés', 'kali' => 'kayah li', 'kana' => 'katakana', 'khar' => 'kharosthi', 'khmr' => 'jemer', 'knda' => 'canarés', 'kore' => 'coreano', 'lana' => 'lanna', 'laoo' => 'lao', 'latf' => 'latino fraktur', 'latg' => 'latino gaélico', 'latn' => 'latín', 'lepc' => 'lepcha', 'limb' => 'limbu', 'lina' => 'lineal A', 'linb' => 'lineal B', 'lyci' => 'licio', 'lydi' => 'lidio', 'mand' => 'mandeo', 'maya' => 'jeroglíficos mayas', 'mero' => 'meroítico', 'mlym' => 'malayálam', 'mong' => 'mongol', 'moon' => 'moon', 'mtei' => 'manipuri', 'mymr' => 'birmano', 'nkoo' => 'n’ko', 'ogam' => 'ogham', 'olck' => 'ol ciki', 'orkh' => 'orkhon', 'orya' => 'oriya', 'osma' => 'osmaniya', 'perm' => 'permiano antiguo', 'phag' => 'phags-pa', 'phnx' => 'fenicio', 'plrd' => 'Pollard Miao', 'rjng' => 'rejang', 'roro' => 'rongo-rongo', 'runr' => 'rúnico', 'sara' => 'sarati', 'saur' => 'saurashtra', 'sgnw' => 'SignWriting', 'shaw' => 'shaviano', 'sinh' => 'binhala', 'sund' => 'sundanés', 'sylo' => 'syloti nagri', 'syrc' => 'siriaco', 'syre' => 'siriaco estrangelo', 'syrj' => 'siriaco occidental', 'syrn' => 'siriaco oriental', 'tagb' => 'tagbanúa', 'tale' => 'tai le', 'talu' => 'nuevo tai lue', 'taml' => 'tamil', 'telu' => 'telugu', 'teng' => 'tengwar', 'tfng' => 'tifinagh', 'tglg' => 'tagalo', 'thaa' => 'thaana', 'thai' => 'tailandés', 'tibt' => 'tibetano', 'ugar' => 'ugarítico', 'vaii' => 'vai', 'visp' => 'lenguaje visible', 'xpeo' => 'persa antiguo', 'xsux' => 'cuneiforme sumerio-acadio', 'yiii' => 'yi', 'zinh' => 'heredado', 'zsym' => 'símbolos', 'zxxx' => 'no escrito', 'zyyy' => 'común', 'zzzz' => 'alfabeto desconocido', ), 'territories' => array ( '001' => 'Mundo', '002' => 'África', '003' => 'América del Norte', '005' => 'Suramérica', '009' => 'Oceanía', '011' => 'África occidental', '013' => 'Centroamérica', '014' => 'África oriental', '015' => 'África septentrional', '017' => 'África central', '018' => 'África meridional', '019' => 'Américas', '021' => 'Norteamérica', '029' => 'Caribe', '030' => 'Asia oriental', '034' => 'Asia meridional', '035' => 'Sudeste asiático', '039' => 'Europa meridional', '053' => 'Australia y Nueva Zelanda', '054' => 'Melanesia', '057' => 'Micronesia [057]', '061' => 'Polinesia', 142 => 'Asia', 143 => 'Asia central', 145 => 'Asia occidental', 150 => 'Europa', 151 => 'Europa oriental', 154 => 'Europa septentrional', 155 => 'Europa occidental', 419 => 'Latinoamérica', 'ac' => 'Isla de la Ascensión', 'ad' => 'Andorra', 'ae' => 'Emiratos Árabes Unidos', 'af' => 'Afganistán', 'ag' => 'Antigua y Barbuda', 'ai' => 'Anguila', 'al' => 'Albania', 'am' => 'Armenia', 'an' => 'Antillas Neerlandesas', 'ao' => 'Angola', 'aq' => 'Antártida', 'ar' => 'Argentina', 'as' => 'Samoa Americana', 'at' => 'Austria', 'au' => 'Australia', 'aw' => 'Aruba', 'ax' => 'Islas Åland', 'az' => 'Azerbaiyán', 'ba' => 'Bosnia-Herzegovina', 'bb' => 'Barbados', 'bd' => 'Bangladesh', 'be' => 'Bélgica', 'bf' => 'Burkina Faso', 'bg' => 'Bulgaria', 'bh' => 'Bahréin', 'bi' => 'Burundi', 'bj' => 'Benín', 'bl' => 'San Bartolomé', 'bm' => 'Bermudas', 'bn' => 'Brunéi', 'bo' => 'Bolivia', 'br' => 'Brasil', 'bs' => 'Bahamas', 'bt' => 'Bután', 'bv' => 'Isla Bouvet', 'bw' => 'Botsuana', 'by' => 'Bielorrusia', 'bz' => 'Belice', 'ca' => 'Canadá', 'cc' => 'Islas Cocos', 'cd' => 'Congo [República Democrática del Congo]', 'cf' => 'República Centroafricana', 'cg' => 'Congo [República]', 'ch' => 'Suiza', 'ci' => 'Costa de Marfil', 'ck' => 'Islas Cook', 'cl' => 'Chile', 'cm' => 'Camerún', 'cn' => 'China', 'co' => 'Colombia', 'cp' => 'Isla Clipperton', 'cr' => 'Costa Rica', 'cs' => 'Serbia y Montenegro', 'cu' => 'Cuba', 'cv' => 'Cabo Verde', 'cx' => 'Isla Christmas', 'cy' => 'Chipre', 'cz' => 'República Checa', 'de' => 'Alemania', 'dg' => 'Diego García', 'dj' => 'Yibuti', 'dk' => 'Dinamarca', 'dm' => 'Dominica', 'do' => 'República Dominicana', 'dz' => 'Argelia', 'ea' => 'Ceuta y Melilla', 'ec' => 'Ecuador', 'ee' => 'Estonia', 'eg' => 'Egipto', 'eh' => 'Sáhara Occidental', 'er' => 'Eritrea', 'es' => 'España', 'et' => 'Etiopía', 'eu' => 'Unión Europea', 'fi' => 'Finlandia', 'fj' => 'Fiyi', 'fk' => 'Islas Malvinas [Islas Falkland]', 'fm' => 'Micronesia', 'fo' => 'Islas Feroe', 'fr' => 'Francia', 'fx' => 'Francia metropolitana', 'ga' => 'Gabón', 'gb' => 'Reino Unido', 'gd' => 'Granada', 'ge' => 'Georgia', 'gf' => 'Guayana Francesa', 'gg' => 'Guernsey', 'gh' => 'Ghana', 'gi' => 'Gibraltar', 'gl' => 'Groenlandia', 'gm' => 'Gambia', 'gn' => 'Guinea', 'gp' => 'Guadalupe', 'gq' => 'Guinea Ecuatorial', 'gr' => 'Grecia', 'gs' => 'Islas Georgia del Sur y Sandwich del Sur', 'gt' => 'Guatemala', 'gu' => 'Guam', 'gw' => 'Guinea-Bissau', 'gy' => 'Guyana', 'hk' => 'Hong Kong', 'hm' => 'Islas Heard y McDonald', 'hn' => 'Honduras', 'hr' => 'Croacia', 'ht' => 'Haití', 'hu' => 'Hungría', 'ic' => 'Islas Canarias', 'id' => 'Indonesia', 'ie' => 'Irlanda', 'il' => 'Israel', 'im' => 'Isla de Man', 'in' => 'India', 'io' => 'Territorio Británico del Océano Índico', 'iq' => 'Iraq', 'ir' => 'Irán', 'is' => 'Islandia', 'it' => 'Italia', 'je' => 'Jersey', 'jm' => 'Jamaica', 'jo' => 'Jordania', 'jp' => 'Japón', 'ke' => 'Kenia', 'kg' => 'Kirguistán', 'kh' => 'Camboya', 'ki' => 'Kiribati', 'km' => 'Comoras', 'kn' => 'San Cristóbal y Nieves', 'kp' => 'Corea del Norte', 'kr' => 'Corea del Sur', 'kw' => 'Kuwait', 'ky' => 'Islas Caimán', 'kz' => 'Kazajistán', 'la' => 'Laos', 'lb' => 'Líbano', 'lc' => 'Santa Lucía', 'li' => 'Liechtenstein', 'lk' => 'Sri Lanka', 'lr' => 'Liberia', 'ls' => 'Lesoto', 'lt' => 'Lituania', 'lu' => 'Luxemburgo', 'lv' => 'Letonia', 'ly' => 'Libia', 'ma' => 'Marruecos', 'mc' => 'Mónaco', 'md' => 'Moldavia', 'me' => 'Montenegro', 'mf' => 'San Martín', 'mg' => 'Madagascar', 'mh' => 'Islas Marshall', 'mk' => 'Macedonia [ERYM]', 'ml' => 'Mali', 'mm' => 'Myanmar [Birmania]', 'mn' => 'Mongolia', 'mo' => 'Macao', 'mp' => 'Islas Marianas del Norte', 'mq' => 'Martinica', 'mr' => 'Mauritania', 'ms' => 'Montserrat', 'mt' => 'Malta', 'mu' => 'Mauricio', 'mv' => 'Maldivas', 'mw' => 'Malaui', 'mx' => 'México', 'my' => 'Malasia', 'mz' => 'Mozambique', 'na' => 'Namibia', 'nc' => 'Nueva Caledonia', 'ne' => 'Níger', 'nf' => 'Isla Norfolk', 'ng' => 'Nigeria', 'ni' => 'Nicaragua', 'nl' => 'Países Bajos', 'no' => 'Noruega', 'np' => 'Nepal', 'nr' => 'Nauru', 'nu' => 'Isla Niue', 'nz' => 'Nueva Zelanda', 'om' => 'Omán', 'pa' => 'Panamá', 'pe' => 'Perú', 'pf' => 'Polinesia Francesa', 'pg' => 'Papúa Nueva Guinea', 'ph' => 'Filipinas', 'pk' => 'Pakistán', 'pl' => 'Polonia', 'pm' => 'San Pedro y Miquelón', 'pn' => 'Islas Pitcairn', 'pr' => 'Puerto Rico', 'ps' => 'Territorios Palestinos', 'pt' => 'Portugal', 'pw' => 'Palau', 'py' => 'Paraguay', 'qa' => 'Qatar', 'qo' => 'Territorios alejados de Oceanía', 're' => 'Reunión', 'ro' => 'Rumanía', 'rs' => 'Serbia', 'ru' => 'Rusia', 'rw' => 'Ruanda', 'sa' => 'Arabia Saudí', 'sb' => 'Islas Salomón', 'sc' => 'Seychelles', 'sd' => 'Sudán', 'se' => 'Suecia', 'sg' => 'Singapur', 'sh' => 'Santa Elena', 'si' => 'Eslovenia', 'sj' => 'Svalbard y Jan Mayen', 'sk' => 'Eslovaquia', 'sl' => 'Sierra Leona', 'sm' => 'San Marino', 'sn' => 'Senegal', 'so' => 'Somalia', 'sr' => 'Surinam', 'st' => 'Santo Tomé y Príncipe', 'sv' => 'El Salvador', 'sy' => 'Siria', 'sz' => 'Suazilandia', 'ta' => 'Tristán da Cunha', 'tc' => 'Islas Turcas y Caicos', 'td' => 'Chad', 'tf' => 'Territorios Australes Franceses', 'tg' => 'Togo', 'th' => 'Tailandia', 'tj' => 'Tayikistán', 'tk' => 'Tokelau', 'tl' => 'Timor Oriental', 'tm' => 'Turkmenistán', 'tn' => 'Túnez', 'to' => 'Tonga', 'tr' => 'Turquía', 'tt' => 'Trinidad y Tobago', 'tv' => 'Tuvalu', 'tw' => 'Taiwán', 'tz' => 'Tanzania', 'ua' => 'Ucrania', 'ug' => 'Uganda', 'um' => 'Islas menores alejadas de los Estados Unidos', 'us' => 'Estados Unidos', 'uy' => 'Uruguay', 'uz' => 'Uzbekistán', 'va' => 'Ciudad del Vaticano', 'vc' => 'San Vicente y las Granadinas', 've' => 'Venezuela', 'vg' => 'Islas Vírgenes Británicas', 'vi' => 'Islas Vírgenes de los Estados Unidos', 'vn' => 'Vietnam', 'vu' => 'Vanuatu', 'wf' => 'Wallis y Futuna', 'ws' => 'Samoa', 'ye' => 'Yemen', 'yt' => 'Mayotte', 'za' => 'Sudáfrica', 'zm' => 'Zambia', 'zw' => 'Zimbabue', 'zz' => 'Región desconocida', ), 'pluralRules' => array ( 0 => 'n==1', 1 => 'true', ), );
priest671/retalapp
yii/framework/i18n/data/es_es.php
PHP
mit
28,005
/* Plugin for Cycle2; Copyright (c) 2012 M. Alsup; v20140415 */ !function(a){"use strict";a.event.special.swipe=a.event.special.swipe||{scrollSupressionThreshold:10,durationThreshold:1e3,horizontalDistanceThreshold:30,verticalDistanceThreshold:75,setup:function(){var b=a(this);b.bind("touchstart",function(c){function d(b){if(g){var c=b.originalEvent.touches?b.originalEvent.touches[0]:b;e={time:(new Date).getTime(),coords:[c.pageX,c.pageY]},Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.scrollSupressionThreshold&&b.preventDefault()}}var e,f=c.originalEvent.touches?c.originalEvent.touches[0]:c,g={time:(new Date).getTime(),coords:[f.pageX,f.pageY],origin:a(c.target)};b.bind("touchmove",d).one("touchend",function(){b.unbind("touchmove",d),g&&e&&e.time-g.time<a.event.special.swipe.durationThreshold&&Math.abs(g.coords[0]-e.coords[0])>a.event.special.swipe.horizontalDistanceThreshold&&Math.abs(g.coords[1]-e.coords[1])<a.event.special.swipe.verticalDistanceThreshold&&g.origin.trigger("swipe").trigger(g.coords[0]>e.coords[0]?"swipeleft":"swiperight"),g=e=void 0})})}},a.event.special.swipeleft=a.event.special.swipeleft||{setup:function(){a(this).bind("swipe",a.noop)}},a.event.special.swiperight=a.event.special.swiperight||a.event.special.swipeleft}(jQuery);
thetable/cdnjs
ajax/libs/jquery.cycle2/20140415/jquery.cycle2.swipe.min.js
JavaScript
mit
1,276
/*! * GMaps.js v0.3 * http://hpneo.github.com/gmaps/ * * Copyright 2012, Gustavo Leon * Released under the MIT License. */ if(window.google&&window.google.maps){var GMaps=function(global){"use strict";var doc=document;var getElementById=function(id,context){var ele;if("jQuery"in global&&context){ele=$("#"+id.replace("#",""),context)[0]}else{ele=doc.getElementById(id.replace("#",""))}return ele};var GMaps=function(options){var self=this;var events_that_hide_context_menu=["bounds_changed","center_changed","click","dblclick","drag","dragend","dragstart","idle","maptypeid_changed","projection_changed","resize","tilesloaded","zoom_changed"];var events_that_doesnt_hide_context_menu=["mousemove","mouseout","mouseover"];window.context_menu={};if(typeof options.el==="string"||typeof options.div==="string"){this.el=getElementById(options.el||options.div,options.context)}else{this.el=options.el||options.div}if(typeof this.el==="undefined"||this.el===null){throw"No element defined."}this.el.style.width=options.width||this.el.scrollWidth||this.el.offsetWidth;this.el.style.height=options.height||this.el.scrollHeight||this.el.offsetHeight;this.controls=[];this.overlays=[];this.layers=[];this.singleLayers={};this.markers=[];this.polylines=[];this.routes=[];this.polygons=[];this.infoWindow=null;this.overlay_el=null;this.zoom=options.zoom||15;this.registered_events={};var markerClusterer=options.markerClusterer;var mapType;if(options.mapType){mapType=google.maps.MapTypeId[options.mapType.toUpperCase()]}else{mapType=google.maps.MapTypeId.ROADMAP}var map_center=new google.maps.LatLng(options.lat,options.lng);delete options.el;delete options.lat;delete options.lng;delete options.mapType;delete options.width;delete options.height;delete options.markerClusterer;var zoomControlOpt=options.zoomControlOpt||{style:"DEFAULT",position:"TOP_LEFT"};var zoomControl=options.zoomControl||true,zoomControlStyle=zoomControlOpt.style||"DEFAULT",zoomControlPosition=zoomControlOpt.position||"TOP_LEFT",panControl=options.panControl||true,mapTypeControl=options.mapTypeControl||true,scaleControl=options.scaleControl||true,streetViewControl=options.streetViewControl||true,overviewMapControl=overviewMapControl||true;var map_options={};var map_base_options={zoom:this.zoom,center:map_center,mapTypeId:mapType};var map_controls_options={panControl:panControl,zoomControl:zoomControl,zoomControlOptions:{style:google.maps.ZoomControlStyle[zoomControlStyle],position:google.maps.ControlPosition[zoomControlPosition]},mapTypeControl:mapTypeControl,scaleControl:scaleControl,streetViewControl:streetViewControl,overviewMapControl:overviewMapControl};if(options.disableDefaultUI!=true)map_base_options=extend_object(map_base_options,map_controls_options);map_options=extend_object(map_base_options,options);for(var i=0;i<events_that_hide_context_menu.length;i++){delete map_options[events_that_hide_context_menu[i]]}for(var i=0;i<events_that_doesnt_hide_context_menu.length;i++){delete map_options[events_that_doesnt_hide_context_menu[i]]}this.map=new google.maps.Map(this.el,map_options);if(markerClusterer){this.markerClusterer=markerClusterer.apply(this,[this.map])}var findAbsolutePosition=function(obj){var curleft=0;var curtop=0;if(obj.offsetParent){do{curleft+=obj.offsetLeft;curtop+=obj.offsetTop}while(obj=obj.offsetParent)}return[curleft,curtop]};var buildContextMenuHTML=function(control,e){var html="";var options=window.context_menu[control];for(var i in options){if(options.hasOwnProperty(i)){var option=options[i];html+='<li><a id="'+control+"_"+i+'" href="#">'+option.title+"</a></li>"}}if(!getElementById("gmaps_context_menu"))return;var context_menu_element=getElementById("gmaps_context_menu");context_menu_element.innerHTML=html;var context_menu_items=context_menu_element.getElementsByTagName("a");var context_menu_items_count=context_menu_items.length;for(var i=0;i<context_menu_items_count;i++){var context_menu_item=context_menu_items[i];var assign_menu_item_action=function(ev){ev.preventDefault();options[this.id.replace(control+"_","")].action.apply(self,[e]);self.hideContextMenu()};google.maps.event.clearListeners(context_menu_item,"click");google.maps.event.addDomListenerOnce(context_menu_item,"click",assign_menu_item_action,false)}var position=findAbsolutePosition.apply(this,[self.el]);var left=position[0]+e.pixel.x-15;var top=position[1]+e.pixel.y-15;context_menu_element.style.left=left+"px";context_menu_element.style.top=top+"px";context_menu_element.style.display="block"};var buildContextMenu=function(control,e){if(control==="marker"){e.pixel={};var overlay=new google.maps.OverlayView;overlay.setMap(self.map);overlay.draw=function(){var projection=overlay.getProjection();var position=e.marker.getPosition();e.pixel=projection.fromLatLngToContainerPixel(position);buildContextMenuHTML(control,e)}}else{buildContextMenuHTML(control,e)}};this.setContextMenu=function(options){window.context_menu[options.control]={};for(var i in options.options){if(options.options.hasOwnProperty(i)){var option=options.options[i];window.context_menu[options.control][option.name]={title:option.title,action:option.action}}}var ul=doc.createElement("ul");ul.id="gmaps_context_menu";ul.style.display="none";ul.style.position="absolute";ul.style.minWidth="100px";ul.style.background="white";ul.style.listStyle="none";ul.style.padding="8px";ul.style.boxShadow="2px 2px 6px #ccc";doc.body.appendChild(ul);var context_menu_element=getElementById("gmaps_context_menu");google.maps.event.addDomListener(context_menu_element,"mouseout",function(ev){if(!ev.relatedTarget||!this.contains(ev.relatedTarget)){window.setTimeout(function(){context_menu_element.style.display="none"},400)}},false)};this.hideContextMenu=function(){var context_menu_element=getElementById("gmaps_context_menu");if(context_menu_element)context_menu_element.style.display="none"};var setupListener=function(object,name){google.maps.event.addListener(object,name,function(e){if(e==undefined){e=this}options[name].apply(this,[e]);self.hideContextMenu()})};for(var ev=0;ev<events_that_hide_context_menu.length;ev++){var name=events_that_hide_context_menu[ev];if(name in options){setupListener(this.map,name)}}for(var ev=0;ev<events_that_doesnt_hide_context_menu.length;ev++){var name=events_that_doesnt_hide_context_menu[ev];if(name in options){setupListener(this.map,name)}}google.maps.event.addListener(this.map,"rightclick",function(e){if(options.rightclick){options.rightclick.apply(this,[e])}if(window.context_menu["map"]!=undefined){buildContextMenu("map",e)}});this.refresh=function(){google.maps.event.trigger(this.map,"resize")};this.fitZoom=function(){var latLngs=[];var markers_length=this.markers.length;for(var i=0;i<markers_length;i++){latLngs.push(this.markers[i].getPosition())}this.fitLatLngBounds(latLngs)};this.fitLatLngBounds=function(latLngs){var total=latLngs.length;var bounds=new google.maps.LatLngBounds;for(var i=0;i<total;i++){bounds.extend(latLngs[i])}this.map.fitBounds(bounds)};this.setCenter=function(lat,lng,callback){this.map.panTo(new google.maps.LatLng(lat,lng));if(callback){callback()}};this.getElement=function(){return this.el};this.zoomIn=function(value){this.zoom=this.map.getZoom()+value;this.map.setZoom(this.zoom)};this.zoomOut=function(value){this.zoom=this.map.getZoom()-value;this.map.setZoom(this.zoom)};var native_methods=[];for(var method in this.map){if(typeof this.map[method]=="function"&&!this[method]){native_methods.push(method)}}for(var i=0;i<native_methods.length;i++){(function(gmaps,scope,method_name){gmaps[method_name]=function(){return scope[method_name].apply(scope,arguments)}})(this,this.map,native_methods[i])}this.createControl=function(options){var control=doc.createElement("div");control.style.cursor="pointer";control.style.fontFamily="Arial, sans-serif";control.style.fontSize="13px";control.style.boxShadow="rgba(0, 0, 0, 0.398438) 0px 2px 4px";for(var option in options.style)control.style[option]=options.style[option];if(options.id){control.id=options.id}if(options.classes){control.className=options.classes}if(options.content){control.innerHTML=options.content}for(var ev in options.events){(function(object,name){google.maps.event.addDomListener(object,name,function(){options.events[name].apply(this,[this])})})(control,ev)}control.index=1;return control};this.addControl=function(options){var position=google.maps.ControlPosition[options.position.toUpperCase()];delete options.position;var control=this.createControl(options);this.controls.push(control);this.map.controls[position].push(control);return control};this.createMarker=function(options){if(options.hasOwnProperty("lat")&&options.hasOwnProperty("lng")||options.position){var self=this;var details=options.details;var fences=options.fences;var outside=options.outside;var base_options={position:new google.maps.LatLng(options.lat,options.lng),map:null};delete options.lat;delete options.lng;delete options.fences;delete options.outside;var marker_options=extend_object(base_options,options);var marker=new google.maps.Marker(marker_options);marker.fences=fences;if(options.infoWindow){marker.infoWindow=new google.maps.InfoWindow(options.infoWindow);var info_window_events=["closeclick","content_changed","domready","position_changed","zindex_changed"];for(var ev=0;ev<info_window_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(e){if(options.infoWindow[name])options.infoWindow[name].apply(this,[e])})})(marker.infoWindow,info_window_events[ev])}}var marker_events=["animation_changed","clickable_changed","cursor_changed","draggable_changed","flat_changed","icon_changed","position_changed","shadow_changed","shape_changed","title_changed","visible_changed","zindex_changed"];var marker_events_with_mouse=["dblclick","drag","dragend","dragstart","mousedown","mouseout","mouseover","mouseup"];for(var ev=0;ev<marker_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(){if(options[name])options[name].apply(this,[this])})})(marker,marker_events[ev])}for(var ev=0;ev<marker_events_with_mouse.length;ev++){(function(map,object,name){google.maps.event.addListener(object,name,function(me){if(!me.pixel){me.pixel=map.getProjection().fromLatLngToPoint(me.latLng)}if(options[name])options[name].apply(this,[me])})})(this.map,marker,marker_events_with_mouse[ev])}google.maps.event.addListener(marker,"click",function(){this.details=details;if(options.click){options.click.apply(this,[this])}if(marker.infoWindow){self.hideInfoWindows();marker.infoWindow.open(self.map,marker)}});google.maps.event.addListener(marker,"rightclick",function(e){e.marker=this;if(options.rightclick){options.rightclick.apply(this,[e])}if(window.context_menu["marker"]!=undefined){buildContextMenu("marker",e)}});if(options.dragend||marker.fences){google.maps.event.addListener(marker,"dragend",function(){if(marker.fences){self.checkMarkerGeofence(marker,function(m,f){outside(m,f)})}})}return marker}else{throw"No latitude or longitude defined."}};this.addMarker=function(options){var marker;if(options.hasOwnProperty("gm_accessors_")){marker=options}else{if(options.hasOwnProperty("lat")&&options.hasOwnProperty("lng")||options.position){marker=this.createMarker(options)}else{throw"No latitude or longitude defined."}}marker.setMap(this.map);if(this.markerClusterer){this.markerClusterer.addMarker(marker)}this.markers.push(marker);GMaps.fire("marker_added",marker,this);return marker};this.addMarkers=function(array){for(var i=0,marker;marker=array[i];i++){this.addMarker(marker)}return this.markers};this.hideInfoWindows=function(){for(var i=0,marker;marker=this.markers[i];i++){if(marker.infoWindow){marker.infoWindow.close()}}};this.removeMarker=function(marker){for(var i=0;i<this.markers.length;i++){if(this.markers[i]===marker){this.markers[i].setMap(null);this.markers.splice(i,1);GMaps.fire("marker_removed",marker,this);break}}return marker};this.removeMarkers=function(collection){var collection=collection||this.markers;for(var i=0;i<this.markers.length;i++){if(this.markers[i]===collection[i])this.markers[i].setMap(null)}var new_markers=[];for(var i=0;i<this.markers.length;i++){if(this.markers[i].getMap()!=null)new_markers.push(this.markers[i])}this.markers=new_markers};this.drawOverlay=function(options){var overlay=new google.maps.OverlayView;overlay.setMap(self.map);var auto_show=true;if(options.auto_show!=null)auto_show=options.auto_show;overlay.onAdd=function(){var el=doc.createElement("div");el.style.borderStyle="none";el.style.borderWidth="0px";el.style.position="absolute";el.style.zIndex=100;el.innerHTML=options.content;overlay.el=el;var panes=this.getPanes();if(!options.layer){options.layer="overlayLayer"}var overlayLayer=panes[options.layer];overlayLayer.appendChild(el);var stop_overlay_events=["contextmenu","DOMMouseScroll","dblclick","mousedown"];for(var ev=0;ev<stop_overlay_events.length;ev++){(function(object,name){google.maps.event.addDomListener(object,name,function(e){if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1&&document.all){e.cancelBubble=true;e.returnValue=false}else{e.stopPropagation()}})})(el,stop_overlay_events[ev])}google.maps.event.trigger(this,"ready")};overlay.draw=function(){var projection=this.getProjection();var pixel=projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat,options.lng));options.horizontalOffset=options.horizontalOffset||0;options.verticalOffset=options.verticalOffset||0;var el=overlay.el;var content=el.children[0];var content_height=content.clientHeight;var content_width=content.clientWidth;switch(options.verticalAlign){case"top":el.style.top=pixel.y-content_height+options.verticalOffset+"px";break;default:case"middle":el.style.top=pixel.y-content_height/2+options.verticalOffset+"px";break;case"bottom":el.style.top=pixel.y+options.verticalOffset+"px";break}switch(options.horizontalAlign){case"left":el.style.left=pixel.x-content_width+options.horizontalOffset+"px";break;default:case"center":el.style.left=pixel.x-content_width/2+options.horizontalOffset+"px";break;case"right":el.style.left=pixel.x+options.horizontalOffset+"px";break}el.style.display=auto_show?"block":"none";if(!auto_show){options.show.apply(this,[el])}};overlay.onRemove=function(){var el=overlay.el;if(options.remove){options.remove.apply(this,[el])}else{overlay.el.parentNode.removeChild(overlay.el);overlay.el=null}};self.overlays.push(overlay);return overlay};this.removeOverlay=function(overlay){for(var i=0;i<this.overlays.length;i++){if(this.overlays[i]===overlay){this.overlays[i].setMap(null);this.overlays.splice(i,1);break}}};this.removeOverlays=function(){for(var i=0,item;item=self.overlays[i];i++){item.setMap(null)}self.overlays=[]};this.drawPolyline=function(options){var path=[];var points=options.path;if(points.length){if(points[0][0]===undefined){path=points}else{for(var i=0,latlng;latlng=points[i];i++){path.push(new google.maps.LatLng(latlng[0],latlng[1]))}}}var polyline_options={map:this.map,path:path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight,geodesic:options.geodesic,clickable:true,editable:false,visible:true};if(options.hasOwnProperty("clickable"))polyline_options.clickable=options.clickable;if(options.hasOwnProperty("editable"))polyline_options.editable=options.editable;if(options.hasOwnProperty("icons"))polyline_options.icons=options.icons;if(options.hasOwnProperty("zIndex"))polyline_options.zIndex=options.zIndex;var polyline=new google.maps.Polyline(polyline_options);var polyline_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];for(var ev=0;ev<polyline_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(e){if(options[name])options[name].apply(this,[e])})})(polyline,polyline_events[ev])}this.polylines.push(polyline);GMaps.fire("polyline_added",polyline,this);return polyline};this.removePolyline=function(polyline){for(var i=0;i<this.polylines.length;i++){if(this.polylines[i]===polyline){this.polylines[i].setMap(null);this.polylines.splice(i,1);GMaps.fire("polyline_removed",polyline,this);break}}};this.removePolylines=function(){for(var i=0,item;item=self.polylines[i];i++){item.setMap(null)}self.polylines=[]};this.drawCircle=function(options){options=extend_object({map:this.map,center:new google.maps.LatLng(options.lat,options.lng)},options);delete options.lat;delete options.lng;var polygon=new google.maps.Circle(options);var polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];for(var ev=0;ev<polygon_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(e){if(options[name])options[name].apply(this,[e])})})(polygon,polygon_events[ev])}this.polygons.push(polygon);return polygon};this.drawRectangle=function(options){options=extend_object({map:this.map},options);var latLngBounds=new google.maps.LatLngBounds(new google.maps.LatLng(options.bounds[0][0],options.bounds[0][1]),new google.maps.LatLng(options.bounds[1][0],options.bounds[1][1]));options.bounds=latLngBounds;var polygon=new google.maps.Rectangle(options);var polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];for(var ev=0;ev<polygon_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(e){if(options[name])options[name].apply(this,[e])})})(polygon,polygon_events[ev])}this.polygons.push(polygon);return polygon};this.drawPolygon=function(options){var useGeoJSON=false;if(options.hasOwnProperty("useGeoJSON"))useGeoJSON=options.useGeoJSON;delete options.useGeoJSON;options=extend_object({map:this.map},options);if(useGeoJSON==false)options.paths=[options.paths.slice(0)];if(options.paths.length>0){if(options.paths[0].length>0){options.paths=array_flat(array_map(options.paths,arrayToLatLng,useGeoJSON))}}var polygon=new google.maps.Polygon(options);var polygon_events=["click","dblclick","mousedown","mousemove","mouseout","mouseover","mouseup","rightclick"];for(var ev=0;ev<polygon_events.length;ev++){(function(object,name){google.maps.event.addListener(object,name,function(e){if(options[name])options[name].apply(this,[e])})})(polygon,polygon_events[ev])}this.polygons.push(polygon);GMaps.fire("polygon_added",polygon,this);return polygon};this.removePolygon=function(polygon){for(var i=0;i<this.polygons.length;i++){if(this.polygons[i]===polygon){this.polygons[i].setMap(null);this.polygons.splice(i,1);GMaps.fire("polygon_removed",polygon,this);break}}};this.removePolygons=function(){for(var i=0,item;item=self.polygons[i];i++){item.setMap(null)}self.polygons=[]};this.getFromFusionTables=function(options){var events=options.events;delete options.events;var fusion_tables_options=options;var layer=new google.maps.FusionTablesLayer(fusion_tables_options);for(var ev in events){(function(object,name){google.maps.event.addListener(object,name,function(e){events[name].apply(this,[e])})})(layer,ev)}this.layers.push(layer);return layer};this.loadFromFusionTables=function(options){var layer=this.getFromFusionTables(options);layer.setMap(this.map);return layer};this.getFromKML=function(options){var url=options.url;var events=options.events;delete options.url;delete options.events;var kml_options=options;var layer=new google.maps.KmlLayer(url,kml_options);for(var ev in events){(function(object,name){google.maps.event.addListener(object,name,function(e){events[name].apply(this,[e])})})(layer,ev)}this.layers.push(layer);return layer};this.loadFromKML=function(options){var layer=this.getFromKML(options);layer.setMap(this.map);return layer};var travelMode,unitSystem;this.getRoutes=function(options){switch(options.travelMode){case"bicycling":travelMode=google.maps.TravelMode.BICYCLING;break;case"transit":travelMode=google.maps.TravelMode.TRANSIT;break;case"driving":travelMode=google.maps.TravelMode.DRIVING;break;default:travelMode=google.maps.TravelMode.WALKING;break}if(options.unitSystem==="imperial"){unitSystem=google.maps.UnitSystem.IMPERIAL}else{unitSystem=google.maps.UnitSystem.METRIC}var base_options={avoidHighways:false,avoidTolls:false,optimizeWaypoints:false,waypoints:[]};var request_options=extend_object(base_options,options);request_options.origin=/string/.test(typeof options.origin)?options.origin:new google.maps.LatLng(options.origin[0],options.origin[1]);request_options.destination=new google.maps.LatLng(options.destination[0],options.destination[1]);request_options.travelMode=travelMode;request_options.unitSystem=unitSystem;delete request_options.callback;var self=this;var service=new google.maps.DirectionsService;service.route(request_options,function(result,status){if(status===google.maps.DirectionsStatus.OK){for(var r in result.routes){if(result.routes.hasOwnProperty(r)){self.routes.push(result.routes[r])}}}if(options.callback){options.callback(self.routes)}})};this.removeRoutes=function(){this.routes=[]};this.getElevations=function(options){options=extend_object({locations:[],path:false,samples:256},options);if(options.locations.length>0){if(options.locations[0].length>0){options.locations=array_flat(array_map([options.locations],arrayToLatLng,false))}}var callback=options.callback;delete options.callback;var service=new google.maps.ElevationService;if(!options.path){delete options.path;delete options.samples;service.getElevationForLocations(options,function(result,status){if(callback&&typeof callback==="function"){callback(result,status)}})}else{var pathRequest={path:options.locations,samples:options.samples};service.getElevationAlongPath(pathRequest,function(result,status){if(callback&&typeof callback==="function"){callback(result,status)}})}};this.cleanRoute=this.removePolylines;this.drawRoute=function(options){var self=this;this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,unitSystem:options.unitSystem,callback:function(e){if(e.length>0){self.drawPolyline({path:e[e.length-1].overview_path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight});if(options.callback){options.callback(e[e.length-1])}}}})};this.travelRoute=function(options){if(options.origin&&options.destination){this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,callback:function(e){if(e.length>0&&options.start){options.start(e[e.length-1])}if(e.length>0&&options.step){var route=e[e.length-1];if(route.legs.length>0){var steps=route.legs[0].steps;for(var i=0,step;step=steps[i];i++){step.step_number=i;options.step(step,route.legs[0].steps.length-1)}}}if(e.length>0&&options.end){options.end(e[e.length-1])}}})}else if(options.route){if(options.route.legs.length>0){var steps=options.route.legs[0].steps;for(var i=0,step;step=steps[i];i++){step.step_number=i;options.step(step)}}}};this.drawSteppedRoute=function(options){if(options.origin&&options.destination){this.getRoutes({origin:options.origin,destination:options.destination,travelMode:options.travelMode,waypoints:options.waypoints,callback:function(e){if(e.length>0&&options.start){options.start(e[e.length-1])}if(e.length>0&&options.step){var route=e[e.length-1];if(route.legs.length>0){var steps=route.legs[0].steps;for(var i=0,step;step=steps[i];i++){step.step_number=i;self.drawPolyline({path:step.path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight});options.step(step,route.legs[0].steps.length-1)}}}if(e.length>0&&options.end){options.end(e[e.length-1])}}})}else if(options.route){if(options.route.legs.length>0){var steps=options.route.legs[0].steps;for(var i=0,step;step=steps[i];i++){step.step_number=i;self.drawPolyline({path:step.path,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight});options.step(step)}}}};this.checkGeofence=function(lat,lng,fence){return fence.containsLatLng(new google.maps.LatLng(lat,lng))};this.checkMarkerGeofence=function(marker,outside_callback){if(marker.fences){for(var i=0,fence;fence=marker.fences[i];i++){var pos=marker.getPosition();if(!self.checkGeofence(pos.lat(),pos.lng(),fence)){outside_callback(marker,fence)}}}};this.addLayer=function(layerName,options){options=options||{};var layer;switch(layerName){case"weather":this.singleLayers.weather=layer=new google.maps.weather.WeatherLayer;break;case"clouds":this.singleLayers.clouds=layer=new google.maps.weather.CloudLayer;break;case"traffic":this.singleLayers.traffic=layer=new google.maps.TrafficLayer;break;case"transit":this.singleLayers.transit=layer=new google.maps.TransitLayer;break;case"bicycling":this.singleLayers.bicycling=layer=new google.maps.BicyclingLayer;break;case"panoramio":this.singleLayers.panoramio=layer=new google.maps.panoramio.PanoramioLayer;layer.setTag(options.filter);delete options.filter;if(options.click){google.maps.event.addListener(layer,"click",function(event){options.click(event);delete options.click})}break;case"places":this.singleLayers.places=layer=new google.maps.places.PlacesService(this.map);if(options.search||options.nearbySearch){var placeSearchRequest={bounds:options.bounds||null,keyword:options.keyword||null,location:options.location||null,name:options.name||null,radius:options.radius||null,rankBy:options.rankBy||null,types:options.types||null};if(options.search){layer.search(placeSearchRequest,options.search)}if(options.nearbySearch){layer.nearbySearch(placeSearchRequest,options.nearbySearch)}}if(options.textSearch){var textSearchRequest={bounds:options.bounds||null,location:options.location||null,query:options.query||null,radius:options.radius||null};layer.textSearch(textSearchRequest,options.textSearch)}break}if(layer!==undefined){if(typeof layer.setOptions=="function"){layer.setOptions(options)}if(typeof layer.setMap=="function"){layer.setMap(this.map)}return layer}};this.removeLayer=function(layerName){if(this.singleLayers[layerName]!==undefined){this.singleLayers[layerName].setMap(null);delete this.singleLayers[layerName]}};this.toImage=function(options){var options=options||{};var static_map_options={};static_map_options["size"]=options["size"]||[this.el.clientWidth,this.el.clientHeight];static_map_options["lat"]=this.getCenter().lat();static_map_options["lng"]=this.getCenter().lng();if(this.markers.length>0){static_map_options["markers"]=[];for(var i=0;i<this.markers.length;i++){static_map_options["markers"].push({lat:this.markers[i].getPosition().lat(),lng:this.markers[i].getPosition().lng()})}}if(this.polylines.length>0){var polyline=this.polylines[0];static_map_options["polyline"]={};static_map_options["polyline"]["path"]=google.maps.geometry.encoding.encodePath(polyline.getPath());static_map_options["polyline"]["strokeColor"]=polyline.strokeColor;static_map_options["polyline"]["strokeOpacity"]=polyline.strokeOpacity;static_map_options["polyline"]["strokeWeight"]=polyline.strokeWeight}return GMaps.staticMapURL(static_map_options)};this.addMapType=function(mapTypeId,options){if(options.hasOwnProperty("getTileUrl")&&typeof options["getTileUrl"]=="function"){options.tileSize=options.tileSize||new google.maps.Size(256,256);var mapType=new google.maps.ImageMapType(options);this.map.mapTypes.set(mapTypeId,mapType)}else{throw"'getTileUrl' function required."}};this.addOverlayMapType=function(options){if(options.hasOwnProperty("getTile")&&typeof options["getTile"]=="function"){var overlayMapTypeIndex=options.index;delete options.index;this.map.overlayMapTypes.insertAt(overlayMapTypeIndex,options)}else{throw"'getTile' function required."}};this.removeOverlayMapType=function(overlayMapTypeIndex){this.map.overlayMapTypes.removeAt(overlayMapTypeIndex)};this.addStyle=function(options){var styledMapType=new google.maps.StyledMapType(options.styles,options.styledMapName);this.map.mapTypes.set(options.mapTypeId,styledMapType)};this.setStyle=function(mapTypeId){this.map.setMapTypeId(mapTypeId)};this.createPanorama=function(streetview_options){if(!streetview_options.hasOwnProperty("lat")||!streetview_options.hasOwnProperty("lng")){streetview_options.lat=this.getCenter().lat();streetview_options.lng=this.getCenter().lng()}this.panorama=GMaps.createPanorama(streetview_options);this.map.setStreetView(this.panorama);return this.panorama};this.on=function(event_name,handler){return GMaps.on(event_name,this,handler)};this.off=function(event_name){GMaps.off(event_name,this)}};GMaps.createPanorama=function(options){var el=getElementById(options.el,options.context);options.position=new google.maps.LatLng(options.lat,options.lng);delete options.el;delete options.context;delete options.lat;delete options.lng;var streetview_events=["closeclick","links_changed","pano_changed","position_changed","pov_changed","resize","visible_changed"];var streetview_options=extend_object({visible:true},options);for(var i=0;i<streetview_events.length;i++){delete streetview_options[streetview_events[i]]}var panorama=new google.maps.StreetViewPanorama(el,streetview_options);for(var i=0;i<streetview_events.length;i++){(function(object,name){if(options[name]){google.maps.event.addListener(object,name,function(){options[name].apply(this)})}})(panorama,streetview_events[i])}return panorama};GMaps.Route=function(options){this.map=options.map;this.route=options.route;this.step_count=0;this.steps=this.route.legs[0].steps;this.steps_length=this.steps.length;this.polyline=this.map.drawPolyline({path:new google.maps.MVCArray,strokeColor:options.strokeColor,strokeOpacity:options.strokeOpacity,strokeWeight:options.strokeWeight}).getPath();this.back=function(){if(this.step_count>0){this.step_count--;var path=this.route.legs[0].steps[this.step_count].path;for(var p in path){if(path.hasOwnProperty(p)){this.polyline.pop()}}}};this.forward=function(){if(this.step_count<this.steps_length){var path=this.route.legs[0].steps[this.step_count].path;for(var p in path){if(path.hasOwnProperty(p)){this.polyline.push(path[p])}}this.step_count++}}};GMaps.geolocate=function(options){var complete_callback=options.always||options.complete;if(navigator.geolocation){navigator.geolocation.getCurrentPosition(function(position){options.success(position);if(complete_callback){complete_callback()}},function(error){options.error(error);if(complete_callback){complete_callback()}},options.options)}else{options.not_supported();if(complete_callback){complete_callback()}}};GMaps.geocode=function(options){this.geocoder=new google.maps.Geocoder;var callback=options.callback;if(options.hasOwnProperty("lat")&&options.hasOwnProperty("lng")){options.latLng=new google.maps.LatLng(options.lat,options.lng)}delete options.lat;delete options.lng;delete options.callback;this.geocoder.geocode(options,function(results,status){callback(results,status)})};GMaps.staticMapURL=function(options){var parameters=[];var data;var static_root="http://maps.googleapis.com/maps/api/staticmap";if(options.url){static_root=options.url;delete options.url}static_root+="?";var markers=options.markers;delete options.markers;if(!markers&&options.marker){markers=[options.marker];delete options.marker}var polyline=options.polyline;delete options.polyline;if(options.center){parameters.push("center="+options.center);delete options.center}else if(options.address){parameters.push("center="+options.address);delete options.address}else if(options.lat){parameters.push(["center=",options.lat,",",options.lng].join(""));delete options.lat;delete options.lng}else if(options.visible){var visible=encodeURI(options.visible.join("|"));parameters.push("visible="+visible)}var size=options.size;if(size){if(size.join){size=size.join("x")}delete options.size}else{size="630x300"}parameters.push("size="+size);if(!options.zoom){options.zoom=15}var sensor=options.hasOwnProperty("sensor")?!!options.sensor:true;delete options.sensor;parameters.push("sensor="+sensor);for(var param in options){if(options.hasOwnProperty(param)){parameters.push(param+"="+options[param])}}if(markers){var marker,loc;for(var i=0;data=markers[i];i++){marker=[];if(data.size&&data.size!=="normal"){marker.push("size:"+data.size) }else if(data.icon){marker.push("icon:"+encodeURI(data.icon))}if(data.color){marker.push("color:"+data.color.replace("#","0x"))}if(data.label){marker.push("label:"+data.label[0].toUpperCase())}loc=data.address?data.address:data.lat+","+data.lng;if(marker.length||i===0){marker.push(loc);marker=marker.join("|");parameters.push("markers="+encodeURI(marker))}else{marker=parameters.pop()+encodeURI("|"+loc);parameters.push(marker)}}}function parseColor(color,opacity){if(color[0]==="#"){color=color.replace("#","0x");if(opacity){opacity=parseFloat(opacity);opacity=Math.min(1,Math.max(opacity,0));if(opacity===0){return"0x00000000"}opacity=(opacity*255).toString(16);if(opacity.length===1){opacity+=opacity}color=color.slice(0,8)+opacity}}return color}if(polyline){data=polyline;polyline=[];if(data.strokeWeight){polyline.push("weight:"+parseInt(data.strokeWeight,10))}if(data.strokeColor){var color=parseColor(data.strokeColor,data.strokeOpacity);polyline.push("color:"+color)}if(data.fillColor){var fillcolor=parseColor(data.fillColor,data.fillOpacity);polyline.push("fillcolor:"+fillcolor)}var path=data.path;if(path.join){for(var j=0,pos;pos=path[j];j++){polyline.push(pos.join(","))}}else{polyline.push("enc:"+path)}polyline=polyline.join("|");parameters.push("path="+encodeURI(polyline))}parameters=parameters.join("&");return static_root+parameters};GMaps.custom_events=["marker_added","marker_removed","polyline_added","polyline_removed","polygon_added","polygon_removed","geolocated","geolocation_failed"];GMaps.on=function(event_name,object,handler){if(GMaps.custom_events.indexOf(event_name)==-1){return google.maps.event.addListener(object,event_name,handler)}else{var registered_event={handler:handler,eventName:event_name};object.registered_events[event_name]=object.registered_events[event_name]||[];object.registered_events[event_name].push(registered_event);return registered_event}};GMaps.off=function(event_name,object){if(GMaps.custom_events.indexOf(event_name)==-1){google.maps.event.clearListeners(object,event_name)}else{object.registered_events[event_name]=[]}};GMaps.fire=function(event_name,object,scope){if(GMaps.custom_events.indexOf(event_name)==-1){google.maps.event.trigger(object,event_name,Array.prototype.slice.apply(arguments).slice(2))}else{if(event_name in scope.registered_events){var firing_events=scope.registered_events[event_name];for(var i=0;i<firing_events.length;i++){(function(handler,scope,object){handler.apply(scope,[object])})(firing_events[i]["handler"],scope,object)}}}};if(!google.maps.Polygon.prototype.getBounds){google.maps.Polygon.prototype.getBounds=function(latLng){var bounds=new google.maps.LatLngBounds;var paths=this.getPaths();var path;for(var p=0;p<paths.getLength();p++){path=paths.getAt(p);for(var i=0;i<path.getLength();i++){bounds.extend(path.getAt(i))}}return bounds}}if(!google.maps.Polygon.prototype.containsLatLng){google.maps.Polygon.prototype.containsLatLng=function(latLng){var bounds=this.getBounds();if(bounds!==null&&!bounds.contains(latLng)){return false}var inPoly=false;var numPaths=this.getPaths().getLength();for(var p=0;p<numPaths;p++){var path=this.getPaths().getAt(p);var numPoints=path.getLength();var j=numPoints-1;for(var i=0;i<numPoints;i++){var vertex1=path.getAt(i);var vertex2=path.getAt(j);if(vertex1.lng()<latLng.lng()&&vertex2.lng()>=latLng.lng()||vertex2.lng()<latLng.lng()&&vertex1.lng()>=latLng.lng()){if(vertex1.lat()+(latLng.lng()-vertex1.lng())/(vertex2.lng()-vertex1.lng())*(vertex2.lat()-vertex1.lat())<latLng.lat()){inPoly=!inPoly}}j=i}}return inPoly}}google.maps.LatLngBounds.prototype.containsLatLng=function(latLng){return this.contains(latLng)};google.maps.Marker.prototype.setFences=function(fences){this.fences=fences};google.maps.Marker.prototype.addFence=function(fence){this.fences.push(fence)};return GMaps}(this);var coordsToLatLngs=function(coords,useGeoJSON){var first_coord=coords[0];var second_coord=coords[1];if(useGeoJSON){first_coord=coords[1];second_coord=coords[0]}return new google.maps.LatLng(first_coord,second_coord)};var arrayToLatLng=function(coords,useGeoJSON){for(var i=0;i<coords.length;i++){if(coords[i].length>0&&typeof coords[i][0]!="number"){coords[i]=arrayToLatLng(coords[i],useGeoJSON)}else{coords[i]=coordsToLatLngs(coords[i],useGeoJSON)}}return coords};var extend_object=function(obj,new_obj){if(obj===new_obj)return obj;for(var name in new_obj){obj[name]=new_obj[name]}return obj};var replace_object=function(obj,replace){if(obj===replace)return obj;for(var name in replace){if(obj[name]!=undefined)obj[name]=replace[name]}return obj};var array_map=function(array,callback){var original_callback_params=Array.prototype.slice.call(arguments,2);if(Array.prototype.map&&array.map===Array.prototype.map){return Array.prototype.map.call(array,function(item){callback_params=original_callback_params;callback_params.splice(0,0,item);return callback.apply(this,callback_params)})}else{var array_return=[];var array_length=array.length;for(var i=0;i<array_length;i++){callback_params=original_callback_params;callback_params=callback_params.splice(0,0,array[i]);array_return.push(callback.apply(this,callback_params))}return array_return}};var array_flat=function(array){new_array=[];for(var i=0;i<array.length;i++){new_array=new_array.concat(array[i])}return new_array}}else{throw"Google Maps API is required. Please register the following JavaScript library http://maps.google.com/maps/api/js?sensor=true."}
svenanders/cdnjs
ajax/libs/gmaps.js/0.3/gmaps.min.js
JavaScript
mit
37,639
/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('overlay', function (Y, NAME) { /** * Provides a basic Overlay widget, with Standard Module content support. The Overlay widget * provides Page XY positioning support, alignment and centering support along with basic * stackable support (z-index and shimming). * * @module overlay */ /** * A basic Overlay Widget, which can be positioned based on Page XY co-ordinates and is stackable (z-index support). * It also provides alignment and centering support and uses a standard module format for it's content, with header, * body and footer section support. * * @class Overlay * @constructor * @extends Widget * @uses WidgetStdMod * @uses WidgetPosition * @uses WidgetStack * @uses WidgetPositionAlign * @uses WidgetPositionConstrain * @param {Object} object The user configuration for the instance. */ Y.Overlay = Y.Base.create("overlay", Y.Widget, [Y.WidgetStdMod, Y.WidgetPosition, Y.WidgetStack, Y.WidgetPositionAlign, Y.WidgetPositionConstrain]); }, '3.17.2', { "requires": [ "widget", "widget-stdmod", "widget-position", "widget-position-align", "widget-stack", "widget-position-constrain" ], "skinnable": true });
ethantw/cdnjs
ajax/libs/yui/3.17.2/overlay/overlay-debug.js
JavaScript
mit
1,355
/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('graphics-vml', function (Y, NAME) { var IMPLEMENTATION = "vml", SHAPE = "shape", SPLITPATHPATTERN = /[a-z][^a-z]*/ig, SPLITARGSPATTERN = /[\-]?[0-9]*[0-9|\.][0-9]*/g, Y_LANG = Y.Lang, IS_NUM = Y_LANG.isNumber, IS_ARRAY = Y_LANG.isArray, Y_DOM = Y.DOM, Y_SELECTOR = Y.Selector, DOCUMENT = Y.config.doc, AttributeLite = Y.AttributeLite, VMLShape, VMLCircle, VMLPath, VMLRect, VMLEllipse, VMLGraphic, VMLPieSlice, _getClassName = Y.ClassNameManager.getClassName; function VMLDrawing() {} /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Drawing.html">`Drawing`</a> class. * `VMLDrawing` is not intended to be used directly. Instead, use the <a href="Drawing.html">`Drawing`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Drawing.html">`Drawing`</a> class will point to the `VMLDrawing` class. * * @module graphics * @class VMLDrawing * @constructor */ VMLDrawing.prototype = { /** * Maps path to methods * * @property _pathSymbolToMethod * @type Object * @private */ _pathSymbolToMethod: { M: "moveTo", m: "relativeMoveTo", L: "lineTo", l: "relativeLineTo", C: "curveTo", c: "relativeCurveTo", Q: "quadraticCurveTo", q: "relativeQuadraticCurveTo", z: "closePath", Z: "closePath" }, /** * Value for rounding up to coordsize * * @property _coordSpaceMultiplier * @type Number * @private */ _coordSpaceMultiplier: 100, /** * Rounds dimensions and position values based on the coordinate space. * * @method _round * @param {Number} The value for rounding * @return Number * @private */ _round:function(val) { return Math.round(val * this._coordSpaceMultiplier); }, /** * Concatanates the path. * * @method _addToPath * @param {String} val The value to add to the path string. * @private */ _addToPath: function(val) { this._path = this._path || ""; if(this._movePath) { this._path += this._movePath; this._movePath = null; } this._path += val; }, /** * Current x position of the drawing. * * @property _currentX * @type Number * @private */ _currentX: 0, /** * Current y position of the drqwing. * * @property _currentY * @type Number * @private */ _currentY: 0, /** * Draws a bezier curve. * * @method curveTo * @param {Number} cp1x x-coordinate for the first control point. * @param {Number} cp1y y-coordinate for the first control point. * @param {Number} cp2x x-coordinate for the second control point. * @param {Number} cp2y y-coordinate for the second control point. * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ curveTo: function() { this._curveTo.apply(this, [Y.Array(arguments), false]); return this; }, /** * Draws a bezier curve. * * @method relativeCurveTo * @param {Number} cp1x x-coordinate for the first control point. * @param {Number} cp1y y-coordinate for the first control point. * @param {Number} cp2x x-coordinate for the second control point. * @param {Number} cp2y y-coordinate for the second control point. * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ relativeCurveTo: function() { this._curveTo.apply(this, [Y.Array(arguments), true]); return this; }, /** * Implements curveTo methods. * * @method _curveTo * @param {Array} args The arguments to be used. * @param {Boolean} relative Indicates whether or not to use relative coordinates. * @private */ _curveTo: function(args, relative) { var w, h, x, y, cp1x, cp1y, cp2x, cp2y, pts, right, left, bottom, top, i, len, path, command = relative ? " v " : " c ", relativeX = relative ? parseFloat(this._currentX) : 0, relativeY = relative ? parseFloat(this._currentY) : 0; len = args.length - 5; path = command; for(i = 0; i < len; i = i + 6) { cp1x = parseFloat(args[i]); cp1y = parseFloat(args[i + 1]); cp2x = parseFloat(args[i + 2]); cp2y = parseFloat(args[i + 3]); x = parseFloat(args[i + 4]); y = parseFloat(args[i + 5]); if(i > 0) { path = path + ", "; } path = path + this._round(cp1x) + ", " + this._round(cp1y) + ", " + this._round(cp2x) + ", " + this._round(cp2y) + ", " + this._round(x) + ", " + this._round(y); cp1x = cp1x + relativeX; cp1y = cp1y + relativeY; cp2x = cp2x + relativeX; cp2y = cp2y + relativeY; x = x + relativeX; y = y + relativeY; right = Math.max(x, Math.max(cp1x, cp2x)); bottom = Math.max(y, Math.max(cp1y, cp2y)); left = Math.min(x, Math.min(cp1x, cp2x)); top = Math.min(y, Math.min(cp1y, cp2y)); w = Math.abs(right - left); h = Math.abs(bottom - top); pts = [[this._currentX, this._currentY] , [cp1x, cp1y], [cp2x, cp2y], [x, y]]; this._setCurveBoundingBox(pts, w, h); this._currentX = x; this._currentY = y; } this._addToPath(path); }, /** * Draws a quadratic bezier curve. * * @method quadraticCurveTo * @param {Number} cpx x-coordinate for the control point. * @param {Number} cpy y-coordinate for the control point. * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ quadraticCurveTo: function() { this._quadraticCurveTo.apply(this, [Y.Array(arguments), false]); return this; }, /** * Draws a quadratic bezier curve relative to the current position. * * @method relativeQuadraticCurveTo * @param {Number} cpx x-coordinate for the control point. * @param {Number} cpy y-coordinate for the control point. * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ relativeQuadraticCurveTo: function() { this._quadraticCurveTo.apply(this, [Y.Array(arguments), true]); return this; }, /** * Implements quadraticCurveTo methods. * * @method _quadraticCurveTo * @param {Array} args The arguments to be used. * @param {Boolean} relative Indicates whether or not to use relative coordinates. * @private */ _quadraticCurveTo: function(args, relative) { var cpx, cpy, cp1x, cp1y, cp2x, cp2y, x, y, currentX = this._currentX, currentY = this._currentY, i, len = args.length - 3, bezierArgs = [], relativeX = relative ? parseFloat(this._currentX) : 0, relativeY = relative ? parseFloat(this._currentY) : 0; for(i = 0; i < len; i = i + 4) { cpx = parseFloat(args[i]) + relativeX; cpy = parseFloat(args[i + 1]) + relativeY; x = parseFloat(args[i + 2]) + relativeX; y = parseFloat(args[i + 3]) + relativeY; cp1x = currentX + 0.67*(cpx - currentX); cp1y = currentY + 0.67*(cpy - currentY); cp2x = cp1x + (x - currentX) * 0.34; cp2y = cp1y + (y - currentY) * 0.34; bezierArgs.push(cp1x); bezierArgs.push(cp1y); bezierArgs.push(cp2x); bezierArgs.push(cp2y); bezierArgs.push(x); bezierArgs.push(y); } this._curveTo.apply(this, [bezierArgs, false]); }, /** * Draws a rectangle. * * @method drawRect * @param {Number} x x-coordinate * @param {Number} y y-coordinate * @param {Number} w width * @param {Number} h height * @chainable */ drawRect: function(x, y, w, h) { this.moveTo(x, y); this.lineTo(x + w, y); this.lineTo(x + w, y + h); this.lineTo(x, y + h); this.lineTo(x, y); this._currentX = x; this._currentY = y; return this; }, /** * Draws a rectangle with rounded corners. * * @method drawRect * @param {Number} x x-coordinate * @param {Number} y y-coordinate * @param {Number} w width * @param {Number} h height * @param {Number} ew width of the ellipse used to draw the rounded corners * @param {Number} eh height of the ellipse used to draw the rounded corners * @chainable */ drawRoundRect: function(x, y, w, h, ew, eh) { this.moveTo(x, y + eh); this.lineTo(x, y + h - eh); this.quadraticCurveTo(x, y + h, x + ew, y + h); this.lineTo(x + w - ew, y + h); this.quadraticCurveTo(x + w, y + h, x + w, y + h - eh); this.lineTo(x + w, y + eh); this.quadraticCurveTo(x + w, y, x + w - ew, y); this.lineTo(x + ew, y); this.quadraticCurveTo(x, y, x, y + eh); return this; }, /** * Draws a circle. Used internally by `CanvasCircle` class. * * @method drawCircle * @param {Number} x y-coordinate * @param {Number} y x-coordinate * @param {Number} r radius * @chainable * @protected */ drawCircle: function(x, y, radius) { var startAngle = 0, endAngle = 360, circum = radius * 2; endAngle *= 65535; this._drawingComplete = false; this._trackSize(x + circum, y + circum); this.moveTo((x + circum), (y + radius)); this._addToPath( " ae " + this._round(x + radius) + ", " + this._round(y + radius) + ", " + this._round(radius) + ", " + this._round(radius) + ", " + startAngle + ", " + endAngle ); return this; }, /** * Draws an ellipse. * * @method drawEllipse * @param {Number} x x-coordinate * @param {Number} y y-coordinate * @param {Number} w width * @param {Number} h height * @chainable * @protected */ drawEllipse: function(x, y, w, h) { var startAngle = 0, endAngle = 360, radius = w * 0.5, yRadius = h * 0.5; endAngle *= 65535; this._drawingComplete = false; this._trackSize(x + w, y + h); this.moveTo((x + w), (y + yRadius)); this._addToPath( " ae " + this._round(x + radius) + ", " + this._round(x + radius) + ", " + this._round(y + yRadius) + ", " + this._round(radius) + ", " + this._round(yRadius) + ", " + startAngle + ", " + endAngle ); return this; }, /** * Draws a diamond. * * @method drawDiamond * @param {Number} x y-coordinate * @param {Number} y x-coordinate * @param {Number} width width * @param {Number} height height * @chainable * @protected */ drawDiamond: function(x, y, width, height) { var midWidth = width * 0.5, midHeight = height * 0.5; this.moveTo(x + midWidth, y); this.lineTo(x + width, y + midHeight); this.lineTo(x + midWidth, y + height); this.lineTo(x, y + midHeight); this.lineTo(x + midWidth, y); return this; }, /** * Draws a wedge. * * @method drawWedge * @param {Number} x x-coordinate of the wedge's center point * @param {Number} y y-coordinate of the wedge's center point * @param {Number} startAngle starting angle in degrees * @param {Number} arc sweep of the wedge. Negative values draw clockwise. * @param {Number} radius radius of wedge. If [optional] yRadius is defined, then radius is the x radius. * @param {Number} yRadius [optional] y radius for wedge. * @chainable * @private */ drawWedge: function(x, y, startAngle, arc, radius) { var diameter = radius * 2; if(Math.abs(arc) > 360) { arc = 360; } this._currentX = x; this._currentY = y; startAngle *= -65535; arc *= 65536; startAngle = Math.round(startAngle); arc = Math.round(arc); this.moveTo(x, y); this._addToPath( " ae " + this._round(x) + ", " + this._round(y) + ", " + this._round(radius) + " " + this._round(radius) + ", " + startAngle + ", " + arc ); this._trackSize(diameter, diameter); return this; }, /** * Draws a line segment from the current drawing position to the specified x and y coordinates. * * @method lineTo * @param {Number} point1 x-coordinate for the end point. * @param {Number} point2 y-coordinate for the end point. * @chainable */ lineTo: function() { this._lineTo.apply(this, [Y.Array(arguments), false]); return this; }, /** * Draws a line segment using the current line style from the current drawing position to the relative x and y coordinates. * * @method relativeLineTo * @param {Number} point1 x-coordinate for the end point. * @param {Number} point2 y-coordinate for the end point. * @chainable */ relativeLineTo: function() { this._lineTo.apply(this, [Y.Array(arguments), true]); return this; }, /** * Implements lineTo methods. * * @method _lineTo * @param {Array} args The arguments to be used. * @param {Boolean} relative Indicates whether or not to use relative coordinates. * @private */ _lineTo: function(args, relative) { var point1 = args[0], i, len, x, y, path = relative ? " r " : " l ", relativeX = relative ? parseFloat(this._currentX) : 0, relativeY = relative ? parseFloat(this._currentY) : 0; if (typeof point1 === "string" || typeof point1 === "number") { len = args.length - 1; for (i = 0; i < len; i = i + 2) { x = parseFloat(args[i]); y = parseFloat(args[i + 1]); path += ' ' + this._round(x) + ', ' + this._round(y); x = x + relativeX; y = y + relativeY; this._currentX = x; this._currentY = y; this._trackSize.apply(this, [x, y]); } } else { len = args.length; for (i = 0; i < len; i = i + 1) { x = parseFloat(args[i][0]); y = parseFloat(args[i][1]); path += ' ' + this._round(x) + ', ' + this._round(y); x = x + relativeX; y = y + relativeY; this._currentX = x; this._currentY = y; this._trackSize.apply(this, [x, y]); } } this._addToPath(path); return this; }, /** * Moves the current drawing position to specified x and y coordinates. * * @method moveTo * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ moveTo: function() { this._moveTo.apply(this, [Y.Array(arguments), false]); return this; }, /** * Moves the current drawing position relative to specified x and y coordinates. * * @method relativeMoveTo * @param {Number} x x-coordinate for the end point. * @param {Number} y y-coordinate for the end point. * @chainable */ relativeMoveTo: function() { this._moveTo.apply(this, [Y.Array(arguments), true]); return this; }, /** * Implements moveTo methods. * * @method _moveTo * @param {Array} args The arguments to be used. * @param {Boolean} relative Indicates whether or not to use relative coordinates. * @private */ _moveTo: function(args, relative) { var x = parseFloat(args[0]), y = parseFloat(args[1]), command = relative ? " t " : " m ", relativeX = relative ? parseFloat(this._currentX) : 0, relativeY = relative ? parseFloat(this._currentY) : 0; this._movePath = command + this._round(x) + ", " + this._round(y); x = x + relativeX; y = y + relativeY; this._trackSize(x, y); this._currentX = x; this._currentY = y; }, /** * Draws the graphic. * * @method _draw * @private */ _closePath: function() { var fill = this.get("fill"), stroke = this.get("stroke"), node = this.node, w = this.get("width"), h = this.get("height"), path = this._path, pathEnd = "", multiplier = this._coordSpaceMultiplier; this._fillChangeHandler(); this._strokeChangeHandler(); if(path) { if(fill && fill.color) { pathEnd += ' x'; } if(stroke) { pathEnd += ' e'; } } if(path) { node.path = path + pathEnd; } if(!isNaN(w) && !isNaN(h)) { node.coordOrigin = this._left + ", " + this._top; node.coordSize = (w * multiplier) + ", " + (h * multiplier); node.style.position = "absolute"; node.style.width = w + "px"; node.style.height = h + "px"; } this._path = path; this._movePath = null; this._updateTransform(); }, /** * Completes a drawing operation. * * @method end * @chainable */ end: function() { this._closePath(); return this; }, /** * Ends a fill and stroke * * @method closePath * @chainable */ closePath: function() { this._addToPath(" x e"); return this; }, /** * Clears the path. * * @method clear * @chainable */ clear: function() { this._right = 0; this._bottom = 0; this._width = 0; this._height = 0; this._left = 0; this._top = 0; this._path = ""; this._movePath = null; return this; }, /** * Returns the points on a curve * * @method getBezierData * @param Array points Array containing the begin, end and control points of a curve. * @param Number t The value for incrementing the next set of points. * @return Array * @private */ getBezierData: function(points, t) { var n = points.length, tmp = [], i, j; for (i = 0; i < n; ++i){ tmp[i] = [points[i][0], points[i][1]]; // save input } for (j = 1; j < n; ++j) { for (i = 0; i < n - j; ++i) { tmp[i][0] = (1 - t) * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; tmp[i][1] = (1 - t) * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; } } return [ tmp[0][0], tmp[0][1] ]; }, /** * Calculates the bounding box for a curve * * @method _setCurveBoundingBox * @param Array pts Array containing points for start, end and control points of a curve. * @param Number w Width used to calculate the number of points to describe the curve. * @param Number h Height used to calculate the number of points to describe the curve. * @private */ _setCurveBoundingBox: function(pts, w, h) { var i, left = this._currentX, right = left, top = this._currentY, bottom = top, len = Math.round(Math.sqrt((w * w) + (h * h))), t = 1/len, xy; for(i = 0; i < len; ++i) { xy = this.getBezierData(pts, t * i); left = isNaN(left) ? xy[0] : Math.min(xy[0], left); right = isNaN(right) ? xy[0] : Math.max(xy[0], right); top = isNaN(top) ? xy[1] : Math.min(xy[1], top); bottom = isNaN(bottom) ? xy[1] : Math.max(xy[1], bottom); } left = Math.round(left * 10)/10; right = Math.round(right * 10)/10; top = Math.round(top * 10)/10; bottom = Math.round(bottom * 10)/10; this._trackSize(right, bottom); this._trackSize(left, top); }, /** * Updates the size of the graphics object * * @method _trackSize * @param {Number} w width * @param {Number} h height * @private */ _trackSize: function(w, h) { if (w > this._right) { this._right = w; } if(w < this._left) { this._left = w; } if (h < this._top) { this._top = h; } if (h > this._bottom) { this._bottom = h; } this._width = this._right - this._left; this._height = this._bottom - this._top; }, _left: 0, _right: 0, _top: 0, _bottom: 0, _width: 0, _height: 0 }; Y.VMLDrawing = VMLDrawing; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Shape.html">`Shape`</a> class. * `VMLShape` is not intended to be used directly. Instead, use the <a href="Shape.html">`Shape`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Shape.html">`Shape`</a> class will point to the `VMLShape` class. * * @module graphics * @class VMLShape * @constructor * @param {Object} cfg (optional) Attribute configs */ VMLShape = function() { this._transforms = []; this.matrix = new Y.Matrix(); this._normalizedMatrix = new Y.Matrix(); VMLShape.superclass.constructor.apply(this, arguments); }; VMLShape.NAME = "shape"; Y.extend(VMLShape, Y.GraphicBase, Y.mix({ /** * Indicates the type of shape * * @property _type * @type String * @private */ _type: "shape", /** * Init method, invoked during construction. * Calls `initializer` method. * * @method init * @protected */ init: function() { this.initializer.apply(this, arguments); }, /** * Initializes the shape * * @private * @method _initialize */ initializer: function(cfg) { var host = this, graphic = cfg.graphic, data = this.get("data"); host.createNode(); if(graphic) { this._setGraphic(graphic); } if(data) { host._parsePathData(data); } this._updateHandler(); }, /** * Set the Graphic instance for the shape. * * @method _setGraphic * @param {Graphic | Node | HTMLElement | String} render This param is used to determine the graphic instance. If it is a * `Graphic` instance, it will be assigned to the `graphic` attribute. Otherwise, a new Graphic instance will be created * and rendered into the dom element that the render represents. * @private */ _setGraphic: function(render) { var graphic; if(render instanceof Y.VMLGraphic) { this._graphic = render; } else { graphic = new Y.VMLGraphic({ render: render }); graphic._appendShape(this); this._graphic = graphic; this._appendStrokeAndFill(); } }, /** * Appends fill and stroke nodes to the shape. * * @method _appendStrokeAndFill * @private */ _appendStrokeAndFill: function() { if(this._strokeNode) { this.node.appendChild(this._strokeNode); } if(this._fillNode) { this.node.appendChild(this._fillNode); } }, /** * Creates the dom node for the shape. * * @method createNode * @return HTMLElement * @private */ createNode: function() { var node, concat = this._camelCaseConcat, x = this.get("x"), y = this.get("y"), w = this.get("width"), h = this.get("height"), id, type, name = this.name, nodestring, visibility = this.get("visible") ? "visible" : "hidden", strokestring, classString, stroke, endcap, opacity, joinstyle, miterlimit, dashstyle, fill, fillstring; id = this.get("id"); type = this._type === "path" ? "shape" : this._type; classString = _getClassName(SHAPE) + " " + _getClassName(concat(IMPLEMENTATION, SHAPE)) + " " + _getClassName(name) + " " + _getClassName(concat(IMPLEMENTATION, name)) + " " + IMPLEMENTATION + type; stroke = this._getStrokeProps(); fill = this._getFillProps(); nodestring = '<' + type + ' xmlns="urn:schemas-microsft.com:vml" id="' + id + '" class="' + classString + '" style="behavior:url(#default#VML);display:inline-block;position:absolute;left:' + x + 'px;top:' + y + 'px;width:' + w + 'px;height:' + h + 'px;visibility:' + visibility + '"'; if(stroke && stroke.weight && stroke.weight > 0) { endcap = stroke.endcap; opacity = parseFloat(stroke.opacity); joinstyle = stroke.joinstyle; miterlimit = stroke.miterlimit; dashstyle = stroke.dashstyle; nodestring += ' stroked="t" strokecolor="' + stroke.color + '" strokeWeight="' + stroke.weight + 'px"'; strokestring = '<stroke class="vmlstroke"' + ' xmlns="urn:schemas-microsft.com:vml"' + ' on="t"' + ' style="behavior:url(#default#VML);display:inline-block;"' + ' opacity="' + opacity + '"'; if(endcap) { strokestring += ' endcap="' + endcap + '"'; } if(joinstyle) { strokestring += ' joinstyle="' + joinstyle + '"'; } if(miterlimit) { strokestring += ' miterlimit="' + miterlimit + '"'; } if(dashstyle) { strokestring += ' dashstyle="' + dashstyle + '"'; } strokestring += '></stroke>'; this._strokeNode = DOCUMENT.createElement(strokestring); nodestring += ' stroked="t"'; } else { nodestring += ' stroked="f"'; } if(fill) { if(fill.node) { fillstring = fill.node; this._fillNode = DOCUMENT.createElement(fillstring); } if(fill.color) { nodestring += ' fillcolor="' + fill.color + '"'; } nodestring += ' filled="' + fill.filled + '"'; } nodestring += '>'; nodestring += '</' + type + '>'; node = DOCUMENT.createElement(nodestring); this.node = node; this._strokeFlag = false; this._fillFlag = false; }, /** * Add a class name to each node. * * @method addClass * @param {String} className the class name to add to the node's class attribute */ addClass: function(className) { var node = this.node; Y_DOM.addClass(node, className); }, /** * Removes a class name from each node. * * @method removeClass * @param {String} className the class name to remove from the node's class attribute */ removeClass: function(className) { var node = this.node; Y_DOM.removeClass(node, className); }, /** * Gets the current position of the node in page coordinates. * * @method getXY * @return Array The XY position of the shape. */ getXY: function() { var graphic = this._graphic, parentXY = graphic.getXY(), x = this.get("x"), y = this.get("y"); return [parentXY[0] + x, parentXY[1] + y]; }, /** * Set the position of the shape in page coordinates, regardless of how the node is positioned. * * @method setXY * @param {Array} Contains x & y values for new position (coordinates are page-based) * */ setXY: function(xy) { var graphic = this._graphic, parentXY = graphic.getXY(); this.set("x", xy[0] - parentXY[0]); this.set("y", xy[1] - parentXY[1]); }, /** * Determines whether the node is an ancestor of another HTML element in the DOM hierarchy. * * @method contains * @param {VMLShape | HTMLElement} needle The possible node or descendent * @return Boolean Whether or not this shape is the needle or its ancestor. */ contains: function(needle) { var node = needle instanceof Y.Node ? needle._node : needle; return node === this.node; }, /** * Compares nodes to determine if they match. * Node instances can be compared to each other and/or HTMLElements. * @method compareTo * @param {HTMLElement | Node} refNode The reference node to compare to the node. * @return {Boolean} True if the nodes match, false if they do not. */ compareTo: function(refNode) { var node = this.node; return node === refNode; }, /** * Test if the supplied node matches the supplied selector. * * @method test * @param {String} selector The CSS selector to test against. * @return Boolean Wheter or not the shape matches the selector. */ test: function(selector) { return Y_SELECTOR.test(this.node, selector); }, /** * Calculates and returns properties for setting an initial stroke. * * @method _getStrokeProps * @return Object * * @private */ _getStrokeProps: function() { var props, stroke = this.get("stroke"), strokeOpacity, dashstyle, dash = "", val, i = 0, len, linecap, linejoin; if(stroke && stroke.weight && stroke.weight > 0) { props = {}; linecap = stroke.linecap || "flat"; linejoin = stroke.linejoin || "round"; if(linecap !== "round" && linecap !== "square") { linecap = "flat"; } strokeOpacity = parseFloat(stroke.opacity); dashstyle = stroke.dashstyle || "none"; stroke.color = stroke.color || "#000000"; stroke.weight = stroke.weight || 1; stroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1; props.stroked = true; props.color = stroke.color; props.weight = stroke.weight; props.endcap = linecap; props.opacity = stroke.opacity; if(IS_ARRAY(dashstyle)) { dash = []; len = dashstyle.length; for(i = 0; i < len; ++i) { val = dashstyle[i]; dash[i] = val / stroke.weight; } } if(linejoin === "round" || linejoin === "bevel") { props.joinstyle = linejoin; } else { linejoin = parseInt(linejoin, 10); if(IS_NUM(linejoin)) { props.miterlimit = Math.max(linejoin, 1); props.joinstyle = "miter"; } } props.dashstyle = dash; } return props; }, /** * Adds a stroke to the shape node. * * @method _strokeChangeHandler * @private */ _strokeChangeHandler: function() { if(!this._strokeFlag) { return; } var node = this.node, stroke = this.get("stroke"), strokeOpacity, dashstyle, dash = "", val, i = 0, len, linecap, linejoin; if(stroke && stroke.weight && stroke.weight > 0) { linecap = stroke.linecap || "flat"; linejoin = stroke.linejoin || "round"; if(linecap !== "round" && linecap !== "square") { linecap = "flat"; } strokeOpacity = parseFloat(stroke.opacity); dashstyle = stroke.dashstyle || "none"; stroke.color = stroke.color || "#000000"; stroke.weight = stroke.weight || 1; stroke.opacity = IS_NUM(strokeOpacity) ? strokeOpacity : 1; node.stroked = true; node.strokeColor = stroke.color; node.strokeWeight = stroke.weight + "px"; if(!this._strokeNode) { this._strokeNode = this._createGraphicNode("stroke"); node.appendChild(this._strokeNode); } this._strokeNode.endcap = linecap; this._strokeNode.opacity = stroke.opacity; if(IS_ARRAY(dashstyle)) { dash = []; len = dashstyle.length; for(i = 0; i < len; ++i) { val = dashstyle[i]; dash[i] = val / stroke.weight; } } if(linejoin === "round" || linejoin === "bevel") { this._strokeNode.joinstyle = linejoin; } else { linejoin = parseInt(linejoin, 10); if(IS_NUM(linejoin)) { this._strokeNode.miterlimit = Math.max(linejoin, 1); this._strokeNode.joinstyle = "miter"; } } this._strokeNode.dashstyle = dash; this._strokeNode.on = true; } else { if(this._strokeNode) { this._strokeNode.on = false; } node.stroked = false; } this._strokeFlag = false; }, /** * Calculates and returns properties for setting an initial fill. * * @method _getFillProps * @return Object * * @private */ _getFillProps: function() { var fill = this.get("fill"), fillOpacity, props, gradient, i, fillstring, filled = false; if(fill) { props = {}; if(fill.type === "radial" || fill.type === "linear") { fillOpacity = parseFloat(fill.opacity); fillOpacity = IS_NUM(fillOpacity) ? fillOpacity : 1; filled = true; gradient = this._getGradientFill(fill); fillstring = '<fill xmlns="urn:schemas-microsft.com:vml"' + ' class="vmlfill" style="behavior:url(#default#VML);display:inline-block;"' + ' opacity="' + fillOpacity + '"'; for(i in gradient) { if(gradient.hasOwnProperty(i)) { fillstring += ' ' + i + '="' + gradient[i] + '"'; } } fillstring += ' />'; props.node = fillstring; } else if(fill.color) { fillOpacity = parseFloat(fill.opacity); filled = true; props.color = fill.color; if(IS_NUM(fillOpacity)) { fillOpacity = Math.max(Math.min(fillOpacity, 1), 0); props.opacity = fillOpacity; if(fillOpacity < 1) { props.node = '<fill xmlns="urn:schemas-microsft.com:vml"' + ' class="vmlfill" style="behavior:url(#default#VML);display:inline-block;"' + ' type="solid" opacity="' + fillOpacity + '"/>'; } } } props.filled = filled; } return props; }, /** * Adds a fill to the shape node. * * @method _fillChangeHandler * @private */ _fillChangeHandler: function() { if(!this._fillFlag) { return; } var node = this.node, fill = this.get("fill"), fillOpacity, fillstring, filled = false, i, gradient; if(fill) { if(fill.type === "radial" || fill.type === "linear") { filled = true; gradient = this._getGradientFill(fill); if(this._fillNode) { for(i in gradient) { if(gradient.hasOwnProperty(i)) { if(i === "colors") { this._fillNode.colors.value = gradient[i]; } else { this._fillNode[i] = gradient[i]; } } } } else { fillstring = '<fill xmlns="urn:schemas-microsft.com:vml"' + ' class="vmlfill"' + ' style="behavior:url(#default#VML);display:inline-block;"'; for(i in gradient) { if(gradient.hasOwnProperty(i)) { fillstring += ' ' + i + '="' + gradient[i] + '"'; } } fillstring += ' />'; this._fillNode = DOCUMENT.createElement(fillstring); node.appendChild(this._fillNode); } } else if(fill.color) { node.fillcolor = fill.color; fillOpacity = parseFloat(fill.opacity); filled = true; if(IS_NUM(fillOpacity) && fillOpacity < 1) { fill.opacity = fillOpacity; if(this._fillNode) { if(this._fillNode.getAttribute("type") !== "solid") { this._fillNode.type = "solid"; } this._fillNode.opacity = fillOpacity; } else { fillstring = '<fill xmlns="urn:schemas-microsft.com:vml"' + ' class="vmlfill"' + ' style="behavior:url(#default#VML);display:inline-block;"' + ' type="solid"' + ' opacity="' + fillOpacity + '"' + '/>'; this._fillNode = DOCUMENT.createElement(fillstring); node.appendChild(this._fillNode); } } else if(this._fillNode) { this._fillNode.opacity = 1; this._fillNode.type = "solid"; } } } node.filled = filled; this._fillFlag = false; }, //not used. remove next release. _updateFillNode: function(node) { if(!this._fillNode) { this._fillNode = this._createGraphicNode("fill"); node.appendChild(this._fillNode); } }, /** * Calculates and returns an object containing gradient properties for a fill node. * * @method _getGradientFill * @param {Object} fill Object containing fill properties. * @return Object * @private */ _getGradientFill: function(fill) { var gradientProps = {}, gradientBoxWidth, gradientBoxHeight, type = fill.type, w = this.get("width"), h = this.get("height"), isNumber = IS_NUM, stop, stops = fill.stops, len = stops.length, opacity, color, i, oi, colorstring = "", cx = fill.cx, cy = fill.cy, fx = fill.fx, fy = fill.fy, r = fill.r, pct, rotation = fill.rotation || 0; if(type === "linear") { if(rotation <= 270) { rotation = Math.abs(rotation - 270); } else if(rotation < 360) { rotation = 270 + (360 - rotation); } else { rotation = 270; } gradientProps.type = "gradient";//"gradientunscaled"; gradientProps.angle = rotation; } else if(type === "radial") { gradientBoxWidth = w * (r * 2); gradientBoxHeight = h * (r * 2); fx = r * 2 * (fx - 0.5); fy = r * 2 * (fy - 0.5); fx += cx; fy += cy; gradientProps.focussize = (gradientBoxWidth/w)/10 + "% " + (gradientBoxHeight/h)/10 + "%"; gradientProps.alignshape = false; gradientProps.type = "gradientradial"; gradientProps.focus = "100%"; gradientProps.focusposition = Math.round(fx * 100) + "% " + Math.round(fy * 100) + "%"; } for(i = 0;i < len; ++i) { stop = stops[i]; color = stop.color; opacity = stop.opacity; opacity = isNumber(opacity) ? opacity : 1; pct = stop.offset || i/(len-1); pct *= (r * 2); pct = Math.round(100 * pct) + "%"; oi = i > 0 ? i + 1 : ""; gradientProps["opacity" + oi] = opacity + ""; colorstring += ", " + pct + " " + color; } if(parseFloat(pct) < 100) { colorstring += ", 100% " + color; } gradientProps.colors = colorstring.substr(2); return gradientProps; }, /** * Adds a transform to the shape. * * @method _addTransform * @param {String} type The transform being applied. * @param {Array} args The arguments for the transform. * @private */ _addTransform: function(type, args) { args = Y.Array(args); this._transform = Y_LANG.trim(this._transform + " " + type + "(" + args.join(", ") + ")"); args.unshift(type); this._transforms.push(args); if(this.initialized) { this._updateTransform(); } }, /** * Applies all transforms. * * @method _updateTransform * @private */ _updateTransform: function() { var node = this.node, key, transform, transformOrigin, x = this.get("x"), y = this.get("y"), tx, ty, matrix = this.matrix, normalizedMatrix = this._normalizedMatrix, isPathShape = this instanceof Y.VMLPath, i, len = this._transforms.length; if(this._transforms && this._transforms.length > 0) { transformOrigin = this.get("transformOrigin"); if(isPathShape) { normalizedMatrix.translate(this._left, this._top); } //vml skew matrix transformOrigin ranges from -0.5 to 0.5. //subtract 0.5 from values tx = transformOrigin[0] - 0.5; ty = transformOrigin[1] - 0.5; //ensure the values are within the appropriate range to avoid errors tx = Math.max(-0.5, Math.min(0.5, tx)); ty = Math.max(-0.5, Math.min(0.5, ty)); for(i = 0; i < len; ++i) { key = this._transforms[i].shift(); if(key) { normalizedMatrix[key].apply(normalizedMatrix, this._transforms[i]); matrix[key].apply(matrix, this._transforms[i]); } } if(isPathShape) { normalizedMatrix.translate(-this._left, -this._top); } transform = normalizedMatrix.a + "," + normalizedMatrix.c + "," + normalizedMatrix.b + "," + normalizedMatrix.d + "," + 0 + "," + 0; } this._graphic.addToRedrawQueue(this); if(transform) { if(!this._skew) { this._skew = DOCUMENT.createElement( '<skew class="vmlskew"' + ' xmlns="urn:schemas-microsft.com:vml"' + ' on="false"' + ' style="behavior:url(#default#VML);display:inline-block;"' + '/>' ); this.node.appendChild(this._skew); } this._skew.matrix = transform; this._skew.on = true; //this._skew.offset = this._getSkewOffsetValue(normalizedMatrix.dx) + "px, " + this._getSkewOffsetValue(normalizedMatrix.dy) + "px"; this._skew.origin = tx + ", " + ty; } if(this._type !== "path") { this._transforms = []; } //add the translate to the x and y coordinates node.style.left = (x + this._getSkewOffsetValue(normalizedMatrix.dx)) + "px"; node.style.top = (y + this._getSkewOffsetValue(normalizedMatrix.dy)) + "px"; }, /** * Normalizes the skew offset values between -32767 and 32767. * * @method _getSkewOffsetValue * @param {Number} val The value to normalize * @return Number * @private */ _getSkewOffsetValue: function(val) { var sign = Y.MatrixUtil.sign(val), absVal = Math.abs(val); val = Math.min(absVal, 32767) * sign; return val; }, /** * Storage for translateX * * @property _translateX * @type Number * @private */ _translateX: 0, /** * Storage for translateY * * @property _translateY * @type Number * @private */ _translateY: 0, /** * Storage for the transform attribute. * * @property _transform * @type String * @private */ _transform: "", /** * Specifies a 2d translation. * * @method translate * @param {Number} x The value to translate on the x-axis. * @param {Number} y The value to translate on the y-axis. */ translate: function(x, y) { this._translateX += x; this._translateY += y; this._addTransform("translate", arguments); }, /** * Translates the shape along the x-axis. When translating x and y coordinates, * use the `translate` method. * * @method translateX * @param {Number} x The value to translate. */ translateX: function(x) { this._translateX += x; this._addTransform("translateX", arguments); }, /** * Performs a translate on the y-coordinate. When translating x and y coordinates, * use the `translate` method. * * @method translateY * @param {Number} y The value to translate. */ translateY: function(y) { this._translateY += y; this._addTransform("translateY", arguments); }, /** * Skews the shape around the x-axis and y-axis. * * @method skew * @param {Number} x The value to skew on the x-axis. * @param {Number} y The value to skew on the y-axis. */ skew: function() { this._addTransform("skew", arguments); }, /** * Skews the shape around the x-axis. * * @method skewX * @param {Number} x x-coordinate */ skewX: function() { this._addTransform("skewX", arguments); }, /** * Skews the shape around the y-axis. * * @method skewY * @param {Number} y y-coordinate */ skewY: function() { this._addTransform("skewY", arguments); }, /** * Rotates the shape clockwise around it transformOrigin. * * @method rotate * @param {Number} deg The degree of the rotation. */ rotate: function() { this._addTransform("rotate", arguments); }, /** * Specifies a 2d scaling operation. * * @method scale * @param {Number} val */ scale: function() { this._addTransform("scale", arguments); }, /** * Overrides default `on` method. Checks to see if its a dom interaction event. If so, * return an event attached to the `node` element. If not, return the normal functionality. * * @method on * @param {String} type event type * @param {Object} callback function * @private */ on: function(type, fn) { if(Y.Node.DOM_EVENTS[type]) { return Y.on(type, fn, "#" + this.get("id")); } return Y.on.apply(this, arguments); }, /** * Draws the shape. * * @method _draw * @private */ _draw: function() { }, /** * Updates `Shape` based on attribute changes. * * @method _updateHandler * @private */ _updateHandler: function() { var host = this, node = host.node; host._fillChangeHandler(); host._strokeChangeHandler(); node.style.width = this.get("width") + "px"; node.style.height = this.get("height") + "px"; this._draw(); host._updateTransform(); }, /** * Creates a graphic node * * @method _createGraphicNode * @param {String} type node type to create * @return HTMLElement * @private */ _createGraphicNode: function(type) { type = type || this._type; return DOCUMENT.createElement( '<' + type + ' xmlns="urn:schemas-microsft.com:vml"' + ' style="behavior:url(#default#VML);display:inline-block;"' + ' class="vml' + type + '"' + '/>' ); }, /** * Value function for fill attribute * * @private * @method _getDefaultFill * @return Object */ _getDefaultFill: function() { return { type: "solid", opacity: 1, cx: 0.5, cy: 0.5, fx: 0.5, fy: 0.5, r: 0.5 }; }, /** * Value function for stroke attribute * * @private * @method _getDefaultStroke * @return Object */ _getDefaultStroke: function() { return { weight: 1, dashstyle: "none", color: "#000", opacity: 1.0 }; }, /** * Sets the value of an attribute. * * @method set * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can * be passed in to set multiple attributes at once. * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as * the name param. */ set: function() { var host = this; AttributeLite.prototype.set.apply(host, arguments); if(host.initialized) { host._updateHandler(); } }, /** * Returns the bounds for a shape. * * Calculates the a new bounding box from the original corner coordinates (base on size and position) and the transform matrix. * The calculated bounding box is used by the graphic instance to calculate its viewBox. * * @method getBounds * @return Object */ getBounds: function() { var isPathShape = this instanceof Y.VMLPath, w = this.get("width"), h = this.get("height"), x = this.get("x"), y = this.get("y"); if(isPathShape) { x = x + this._left; y = y + this._top; w = this._right - this._left; h = this._bottom - this._top; } return this._getContentRect(w, h, x, y); }, /** * Calculates the bounding box for the shape. * * @method _getContentRect * @param {Number} w width of the shape * @param {Number} h height of the shape * @param {Number} x x-coordinate of the shape * @param {Number} y y-coordinate of the shape * @private */ _getContentRect: function(w, h, x, y) { var transformOrigin = this.get("transformOrigin"), transformX = transformOrigin[0] * w, transformY = transformOrigin[1] * h, transforms = this.matrix.getTransformArray(this.get("transform")), matrix = new Y.Matrix(), i, len = transforms.length, transform, key, contentRect, isPathShape = this instanceof Y.VMLPath; if(isPathShape) { matrix.translate(this._left, this._top); } transformX = !isNaN(transformX) ? transformX : 0; transformY = !isNaN(transformY) ? transformY : 0; matrix.translate(transformX, transformY); for(i = 0; i < len; i = i + 1) { transform = transforms[i]; key = transform.shift(); if(key) { matrix[key].apply(matrix, transform); } } matrix.translate(-transformX, -transformY); if(isPathShape) { matrix.translate(-this._left, -this._top); } contentRect = matrix.getContentRect(w, h, x, y); return contentRect; }, /** * Places the shape above all other shapes. * * @method toFront */ toFront: function() { var graphic = this.get("graphic"); if(graphic) { graphic._toFront(this); } }, /** * Places the shape underneath all other shapes. * * @method toFront */ toBack: function() { var graphic = this.get("graphic"); if(graphic) { graphic._toBack(this); } }, /** * Parses path data string and call mapped methods. * * @method _parsePathData * @param {String} val The path data * @private */ _parsePathData: function(val) { var method, methodSymbol, args, commandArray = Y.Lang.trim(val.match(SPLITPATHPATTERN)), i, len, str, symbolToMethod = this._pathSymbolToMethod; if(commandArray) { this.clear(); len = commandArray.length || 0; for(i = 0; i < len; i = i + 1) { str = commandArray[i]; methodSymbol = str.substr(0, 1); args = str.substr(1).match(SPLITARGSPATTERN); method = symbolToMethod[methodSymbol]; if(method) { if(args) { this[method].apply(this, args); } else { this[method].apply(this); } } } this.end(); } }, /** * Destroys shape * * @method destroy */ destroy: function() { var graphic = this.get("graphic"); if(graphic) { graphic.removeShape(this); } else { this._destroy(); } }, /** * Implementation for shape destruction * * @method destroy * @protected */ _destroy: function() { if(this.node) { if(this._fillNode) { this.node.removeChild(this._fillNode); this._fillNode = null; } if(this._strokeNode) { this.node.removeChild(this._strokeNode); this._strokeNode = null; } Y.Event.purgeElement(this.node, true); if(this.node.parentNode) { this.node.parentNode.removeChild(this.node); } this.node = null; } } }, Y.VMLDrawing.prototype)); VMLShape.ATTRS = { /** * An array of x, y values which indicates the transformOrigin in which to rotate the shape. Valid values range between 0 and 1 representing a * fraction of the shape's corresponding bounding box dimension. The default value is [0.5, 0.5]. * * @config transformOrigin * @type Array */ transformOrigin: { valueFn: function() { return [0.5, 0.5]; } }, /** * <p>A string containing, in order, transform operations applied to the shape instance. The `transform` string can contain the following values: * * <dl> * <dt>rotate</dt><dd>Rotates the shape clockwise around it transformOrigin.</dd> * <dt>translate</dt><dd>Specifies a 2d translation.</dd> * <dt>skew</dt><dd>Skews the shape around the x-axis and y-axis.</dd> * <dt>scale</dt><dd>Specifies a 2d scaling operation.</dd> * <dt>translateX</dt><dd>Translates the shape along the x-axis.</dd> * <dt>translateY</dt><dd>Translates the shape along the y-axis.</dd> * <dt>skewX</dt><dd>Skews the shape around the x-axis.</dd> * <dt>skewY</dt><dd>Skews the shape around the y-axis.</dd> * <dt>matrix</dt><dd>Specifies a 2D transformation matrix comprised of the specified six values.</dd> * </dl> * </p> * <p>Applying transforms through the transform attribute will reset the transform matrix and apply a new transform. The shape class also contains * corresponding methods for each transform that will apply the transform to the current matrix. The below code illustrates how you might use the * `transform` attribute to instantiate a recangle with a rotation of 45 degrees.</p> var myRect = new Y.Rect({ type:"rect", width: 50, height: 40, transform: "rotate(45)" }; * <p>The code below would apply `translate` and `rotate` to an existing shape.</p> myRect.set("transform", "translate(40, 50) rotate(45)"); * @config transform * @type String */ transform: { setter: function(val) { var i, len, transform; this.matrix.init(); this._normalizedMatrix.init(); this._transforms = this.matrix.getTransformArray(val); len = this._transforms.length; for(i = 0;i < len; ++i) { transform = this._transforms[i]; } this._transform = val; return val; }, getter: function() { return this._transform; } }, /** * Indicates the x position of shape. * * @config x * @type Number */ x: { value: 0 }, /** * Indicates the y position of shape. * * @config y * @type Number */ y: { value: 0 }, /** * Unique id for class instance. * * @config id * @type String */ id: { valueFn: function() { return Y.guid(); }, setter: function(val) { var node = this.node; if(node) { node.setAttribute("id", val); } return val; } }, /** * * @config width */ width: { value: 0 }, /** * * @config height */ height: { value: 0 }, /** * Indicates whether the shape is visible. * * @config visible * @type Boolean */ visible: { value: true, setter: function(val){ var node = this.node, visibility = val ? "visible" : "hidden"; if(node) { node.style.visibility = visibility; } return val; } }, /** * Contains information about the fill of the shape. * <dl> * <dt>color</dt><dd>The color of the fill.</dd> * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the fill. The default value is 1.</dd> * <dt>type</dt><dd>Type of fill. * <dl> * <dt>solid</dt><dd>Solid single color fill. (default)</dd> * <dt>linear</dt><dd>Linear gradient fill.</dd> * <dt>radial</dt><dd>Radial gradient fill.</dd> * </dl> * </dd> * </dl> * <p>If a `linear` or `radial` is specified as the fill type. The following additional property is used: * <dl> * <dt>stops</dt><dd>An array of objects containing the following properties: * <dl> * <dt>color</dt><dd>The color of the stop.</dd> * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stop. The default value is 1. * Note: No effect for IE 6 - 8</dd> * <dt>offset</dt><dd>Number between 0 and 1 indicating where the color stop is positioned.</dd> * </dl> * </dd> * <p>Linear gradients also have the following property:</p> * <dt>rotation</dt><dd>Linear gradients flow left to right by default. The rotation property allows you to change the * flow by rotation. (e.g. A rotation of 180 would make the gradient pain from right to left.)</dd> * <p>Radial gradients have the following additional properties:</p> * <dt>r</dt><dd>Radius of the gradient circle.</dd> * <dt>fx</dt><dd>Focal point x-coordinate of the gradient.</dd> * <dt>fy</dt><dd>Focal point y-coordinate of the gradient.</dd> * </dl> * <p>The corresponding `SVGShape` class implements the following additional properties.</p> * <dl> * <dt>cx</dt><dd> * <p>The x-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.</p> * <p><strong>Note: </strong>Currently, this property is not implemented for corresponding `CanvasShape` and * `VMLShape` classes which are used on Android or IE 6 - 8.</p> * </dd> * <dt>cy</dt><dd> * <p>The y-coordinate of the center of the gradient circle. Determines where the color stop begins. The default value 0.5.</p> * <p><strong>Note: </strong>Currently, this property is not implemented for corresponding `CanvasShape` and `VMLShape` * classes which are used on Android or IE 6 - 8.</p> * </dd> * </dl> * <p>These properties are not currently implemented in `CanvasShape` or `VMLShape`.</p> * * @config fill * @type Object */ fill: { valueFn: "_getDefaultFill", setter: function(val) { var i, fill, tmpl = this.get("fill") || this._getDefaultFill(); if(val) { //ensure, fill type is solid if color is explicitly passed. if(val.hasOwnProperty("color")) { val.type = "solid"; } for(i in val) { if(val.hasOwnProperty(i)) { tmpl[i] = val[i]; } } } fill = tmpl; if(fill && fill.color) { if(fill.color === undefined || fill.color === "none") { fill.color = null; } else { if(fill.color.toLowerCase().indexOf("rgba") > -1) { fill.opacity = Y.Color._getAlpha(fill.color); fill.color = Y.Color.toHex(fill.color); } } } this._fillFlag = true; return fill; } }, /** * Contains information about the stroke of the shape. * <dl> * <dt>color</dt><dd>The color of the stroke.</dd> * <dt>weight</dt><dd>Number that indicates the width of the stroke.</dd> * <dt>opacity</dt><dd>Number between 0 and 1 that indicates the opacity of the stroke. The default value is 1.</dd> * <dt>dashstyle</dt>Indicates whether to draw a dashed stroke. When set to "none", a solid stroke is drawn. When set * to an array, the first index indicates the length of the dash. The second index indicates the length of gap. * <dt>linecap</dt><dd>Specifies the linecap for the stroke. The following values can be specified: * <dl> * <dt>butt (default)</dt><dd>Specifies a butt linecap.</dd> * <dt>square</dt><dd>Specifies a sqare linecap.</dd> * <dt>round</dt><dd>Specifies a round linecap.</dd> * </dl> * </dd> * <dt>linejoin</dt><dd>Specifies a linejoin for the stroke. The following values can be specified: * <dl> * <dt>round (default)</dt><dd>Specifies that the linejoin will be round.</dd> * <dt>bevel</dt><dd>Specifies a bevel for the linejoin.</dd> * <dt>miter limit</dt><dd>An integer specifying the miter limit of a miter linejoin. If you want to specify a linejoin * of miter, you simply specify the limit as opposed to having separate miter and miter limit values.</dd> * </dl> * </dd> * </dl> * * @config stroke * @type Object */ stroke: { valueFn: "_getDefaultStroke", setter: function(val) { var i, stroke, wt, tmpl = this.get("stroke") || this._getDefaultStroke(); if(val) { if(val.hasOwnProperty("weight")) { wt = parseInt(val.weight, 10); if(!isNaN(wt)) { val.weight = wt; } } for(i in val) { if(val.hasOwnProperty(i)) { tmpl[i] = val[i]; } } } if(tmpl.color && tmpl.color.toLowerCase().indexOf("rgba") > -1) { tmpl.opacity = Y.Color._getAlpha(tmpl.color); tmpl.color = Y.Color.toHex(tmpl.color); } stroke = tmpl; this._strokeFlag = true; return stroke; } }, //Not used. Remove in future. autoSize: { value: false }, // Only implemented in SVG // Determines whether the instance will receive mouse events. // // @config pointerEvents // @type string // pointerEvents: { value: "visiblePainted" }, /** * Dom node for the shape. * * @config node * @type HTMLElement * @readOnly */ node: { readOnly: true, getter: function() { return this.node; } }, /** * Represents an SVG Path string. This will be parsed and added to shape's API to represent the SVG data across all * implementations. Note that when using VML or SVG implementations, part of this content will be added to the DOM using * respective VML/SVG attributes. If your content comes from an untrusted source, you will need to ensure that no * malicious code is included in that content. * * @config data * @type String */ data: { setter: function(val) { if(this.get("node")) { this._parsePathData(val); } return val; } }, /** * Reference to the container Graphic. * * @config graphic * @type Graphic */ graphic: { readOnly: true, getter: function() { return this._graphic; } } }; Y.VMLShape = VMLShape; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Path.html">`Path`</a> class. * `VMLPath` is not intended to be used directly. Instead, use the <a href="Path.html">`Path`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Path.html">`Path`</a> class will point to the `VMLPath` class. * * @module graphics * @class VMLPath * @extends VMLShape */ VMLPath = function() { VMLPath.superclass.constructor.apply(this, arguments); }; VMLPath.NAME = "path"; Y.extend(VMLPath, Y.VMLShape); VMLPath.ATTRS = Y.merge(Y.VMLShape.ATTRS, { /** * Indicates the width of the shape * * @config width * @type Number */ width: { getter: function() { var val = Math.max(this._right - this._left, 0); return val; } }, /** * Indicates the height of the shape * * @config height * @type Number */ height: { getter: function() { return Math.max(this._bottom - this._top, 0); } }, /** * Indicates the path used for the node. * * @config path * @type String * @readOnly */ path: { readOnly: true, getter: function() { return this._path; } } }); Y.VMLPath = VMLPath; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Rect.html">`Rect`</a> class. * `VMLRect` is not intended to be used directly. Instead, use the <a href="Rect.html">`Rect`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Rect.html">`Rect`</a> class will point to the `VMLRect` class. * * @module graphics * @class VMLRect * @constructor */ VMLRect = function() { VMLRect.superclass.constructor.apply(this, arguments); }; VMLRect.NAME = "rect"; Y.extend(VMLRect, Y.VMLShape, { /** * Indicates the type of shape * * @property _type * @type String * @private */ _type: "rect" }); VMLRect.ATTRS = Y.VMLShape.ATTRS; Y.VMLRect = VMLRect; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Ellipse.html">`Ellipse`</a> class. * `VMLEllipse` is not intended to be used directly. Instead, use the <a href="Ellipse.html">`Ellipse`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Ellipse.html">`Ellipse`</a> class will point to the `VMLEllipse` class. * * @module graphics * @class VMLEllipse * @constructor */ VMLEllipse = function() { VMLEllipse.superclass.constructor.apply(this, arguments); }; VMLEllipse.NAME = "ellipse"; Y.extend(VMLEllipse, Y.VMLShape, { /** * Indicates the type of shape * * @property _type * @type String * @private */ _type: "oval" }); VMLEllipse.ATTRS = Y.merge(Y.VMLShape.ATTRS, { /** * Horizontal radius for the ellipse. * * @config xRadius * @type Number */ xRadius: { lazyAdd: false, getter: function() { var val = this.get("width"); val = Math.round((val/2) * 100)/100; return val; }, setter: function(val) { var w = val * 2; this.set("width", w); return val; } }, /** * Vertical radius for the ellipse. * * @config yRadius * @type Number * @readOnly */ yRadius: { lazyAdd: false, getter: function() { var val = this.get("height"); val = Math.round((val/2) * 100)/100; return val; }, setter: function(val) { var h = val * 2; this.set("height", h); return val; } } }); Y.VMLEllipse = VMLEllipse; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Circle.html">`Circle`</a> class. * `VMLCircle` is not intended to be used directly. Instead, use the <a href="Circle.html">`Circle`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Circle.html">`Circle`</a> class will point to the `VMLCircle` class. * * @module graphics * @class VMLCircle * @constructor */ VMLCircle = function() { VMLCircle.superclass.constructor.apply(this, arguments); }; VMLCircle.NAME = "circle"; Y.extend(VMLCircle, VMLShape, { /** * Indicates the type of shape * * @property _type * @type String * @private */ _type: "oval" }); VMLCircle.ATTRS = Y.merge(VMLShape.ATTRS, { /** * Radius for the circle. * * @config radius * @type Number */ radius: { lazyAdd: false, value: 0 }, /** * Indicates the width of the shape * * @config width * @type Number */ width: { setter: function(val) { this.set("radius", val/2); return val; }, getter: function() { var radius = this.get("radius"), val = radius && radius > 0 ? radius * 2 : 0; return val; } }, /** * Indicates the height of the shape * * @config height * @type Number */ height: { setter: function(val) { this.set("radius", val/2); return val; }, getter: function() { var radius = this.get("radius"), val = radius && radius > 0 ? radius * 2 : 0; return val; } } }); Y.VMLCircle = VMLCircle; /** * Draws pie slices * * @module graphics * @class VMLPieSlice * @constructor */ VMLPieSlice = function() { VMLPieSlice.superclass.constructor.apply(this, arguments); }; VMLPieSlice.NAME = "vmlPieSlice"; Y.extend(VMLPieSlice, Y.VMLShape, Y.mix({ /** * Indicates the type of shape * * @property _type * @type String * @private */ _type: "shape", /** * Change event listener * * @private * @method _updateHandler */ _draw: function() { var x = this.get("cx"), y = this.get("cy"), startAngle = this.get("startAngle"), arc = this.get("arc"), radius = this.get("radius"); this.clear(); this.drawWedge(x, y, startAngle, arc, radius); this.end(); } }, Y.VMLDrawing.prototype)); VMLPieSlice.ATTRS = Y.mix({ cx: { value: 0 }, cy: { value: 0 }, /** * Starting angle in relation to a circle in which to begin the pie slice drawing. * * @config startAngle * @type Number */ startAngle: { value: 0 }, /** * Arc of the slice. * * @config arc * @type Number */ arc: { value: 0 }, /** * Radius of the circle in which the pie slice is drawn * * @config radius * @type Number */ radius: { value: 0 } }, Y.VMLShape.ATTRS); Y.VMLPieSlice = VMLPieSlice; /** * <a href="http://www.w3.org/TR/NOTE-VML">VML</a> implementation of the <a href="Graphic.html">`Graphic`</a> class. * `VMLGraphic` is not intended to be used directly. Instead, use the <a href="Graphic.html">`Graphic`</a> class. * If the browser lacks <a href="http://www.w3.org/TR/SVG/">SVG</a> and <a href="http://www.w3.org/TR/html5/the-canvas-element.html">Canvas</a> * capabilities, the <a href="Graphic.html">`Graphic`</a> class will point to the `VMLGraphic` class. * * @module graphics * @class VMLGraphic * @constructor */ VMLGraphic = function() { VMLGraphic.superclass.constructor.apply(this, arguments); }; VMLGraphic.NAME = "vmlGraphic"; VMLGraphic.ATTRS = { /** * Whether or not to render the `Graphic` automatically after to a specified parent node after init. This can be a Node * instance or a CSS selector string. * * @config render * @type Node | String */ render: {}, /** * Unique id for class instance. * * @config id * @type String */ id: { valueFn: function() { return Y.guid(); }, setter: function(val) { var node = this._node; if(node) { node.setAttribute("id", val); } return val; } }, /** * Key value pairs in which a shape instance is associated with its id. * * @config shapes * @type Object * @readOnly */ shapes: { readOnly: true, getter: function() { return this._shapes; } }, /** * Object containing size and coordinate data for the content of a Graphic in relation to the coordSpace node. * * @config contentBounds * @type Object */ contentBounds: { readOnly: true, getter: function() { return this._contentBounds; } }, /** * The html element that represents to coordinate system of the Graphic instance. * * @config node * @type HTMLElement */ node: { readOnly: true, getter: function() { return this._node; } }, /** * Indicates the width of the `Graphic`. * * @config width * @type Number */ width: { setter: function(val) { if(this._node) { this._node.style.width = val + "px"; } return val; } }, /** * Indicates the height of the `Graphic`. * * @config height * @type Number */ height: { setter: function(val) { if(this._node) { this._node.style.height = val + "px"; } return val; } }, /** * Determines the sizing of the Graphic. * * <dl> * <dt>sizeContentToGraphic</dt><dd>The Graphic's width and height attributes are, either explicitly set through the * <code>width</code> and <code>height</code> attributes or are determined by the dimensions of the parent element. The * content contained in the Graphic will be sized to fit with in the Graphic instance's dimensions. When using this * setting, the <code>preserveAspectRatio</code> attribute will determine how the contents are sized.</dd> * <dt>sizeGraphicToContent</dt><dd>(Also accepts a value of true) The Graphic's width and height are determined by the * size and positioning of the content.</dd> * <dt>false</dt><dd>The Graphic's width and height attributes are, either explicitly set through the <code>width</code> * and <code>height</code> attributes or are determined by the dimensions of the parent element. The contents of the * Graphic instance are not affected by this setting.</dd> * </dl> * * * @config autoSize * @type Boolean | String * @default false */ autoSize: { value: false }, /** * Determines how content is sized when <code>autoSize</code> is set to <code>sizeContentToGraphic</code>. * * <dl> * <dt>none<dt><dd>Do not force uniform scaling. Scale the graphic content of the given element non-uniformly if necessary * such that the element's bounding box exactly matches the viewport rectangle.</dd> * <dt>xMinYMin</dt><dd>Force uniform scaling position along the top left of the Graphic's node.</dd> * <dt>xMidYMin</dt><dd>Force uniform scaling horizontally centered and positioned at the top of the Graphic's node.<dd> * <dt>xMaxYMin</dt><dd>Force uniform scaling positioned horizontally from the right and vertically from the top.</dd> * <dt>xMinYMid</dt>Force uniform scaling positioned horizontally from the left and vertically centered.</dd> * <dt>xMidYMid (the default)</dt><dd>Force uniform scaling with the content centered.</dd> * <dt>xMaxYMid</dt><dd>Force uniform scaling positioned horizontally from the right and vertically centered.</dd> * <dt>xMinYMax</dt><dd>Force uniform scaling positioned horizontally from the left and vertically from the bottom.</dd> * <dt>xMidYMax</dt><dd>Force uniform scaling horizontally centered and position vertically from the bottom.</dd> * <dt>xMaxYMax</dt><dd>Force uniform scaling positioned horizontally from the right and vertically from the bottom.</dd> * </dl> * * @config preserveAspectRatio * @type String * @default xMidYMid */ preserveAspectRatio: { value: "xMidYMid" }, /** * The contentBounds will resize to greater values but not values. (for performance) * When resizing the contentBounds down is desirable, set the resizeDown value to true. * * @config resizeDown * @type Boolean */ resizeDown: { resizeDown: false }, /** * Indicates the x-coordinate for the instance. * * @config x * @type Number */ x: { getter: function() { return this._x; }, setter: function(val) { this._x = val; if(this._node) { this._node.style.left = val + "px"; } return val; } }, /** * Indicates the y-coordinate for the instance. * * @config y * @type Number */ y: { getter: function() { return this._y; }, setter: function(val) { this._y = val; if(this._node) { this._node.style.top = val + "px"; } return val; } }, /** * Indicates whether or not the instance will automatically redraw after a change is made to a shape. * This property will get set to false when batching operations. * * @config autoDraw * @type Boolean * @default true * @private */ autoDraw: { value: true }, visible: { value: true, setter: function(val) { this._toggleVisible(val); return val; } } }; Y.extend(VMLGraphic, Y.GraphicBase, { /** * Sets the value of an attribute. * * @method set * @param {String|Object} name The name of the attribute. Alternatively, an object of key value pairs can * be passed in to set multiple attributes at once. * @param {Any} value The value to set the attribute to. This value is ignored if an object is received as * the name param. */ set: function() { var host = this, attr = arguments[0], redrawAttrs = { autoDraw: true, autoSize: true, preserveAspectRatio: true, resizeDown: true }, key, forceRedraw = false; AttributeLite.prototype.set.apply(host, arguments); if(host._state.autoDraw === true && Y.Object.size(this._shapes) > 0) { if(Y_LANG.isString && redrawAttrs[attr]) { forceRedraw = true; } else if(Y_LANG.isObject(attr)) { for(key in redrawAttrs) { if(redrawAttrs.hasOwnProperty(key) && attr[key]) { forceRedraw = true; break; } } } } if(forceRedraw) { host._redraw(); } }, /** * Storage for `x` attribute. * * @property _x * @type Number * @private */ _x: 0, /** * Storage for `y` attribute. * * @property _y * @type Number * @private */ _y: 0, /** * Gets the current position of the graphic instance in page coordinates. * * @method getXY * @return Array The XY position of the shape. */ getXY: function() { var node = this.parentNode, x = this.get("x"), y = this.get("y"), xy; if(node) { xy = Y.DOM.getXY(node); xy[0] += x; xy[1] += y; } else { xy = Y.DOM._getOffset(this._node); } return xy; }, /** * Initializes the class. * * @method initializer * @private */ initializer: function() { var render = this.get("render"), visibility = this.get("visible") ? "visible" : "hidden"; this._shapes = {}; this._contentBounds = { left: 0, top: 0, right: 0, bottom: 0 }; this._node = this._createGraphic(); this._node.style.left = this.get("x") + "px"; this._node.style.top = this.get("y") + "px"; this._node.style.visibility = visibility; this._node.setAttribute("id", this.get("id")); if(render) { this.render(render); } }, /** * Adds the graphics node to the dom. * * @method render * @param {HTMLElement} parentNode node in which to render the graphics node into. */ render: function(render) { var parentNode = render || DOCUMENT.body, node = this._node, w, h; if(render instanceof Y.Node) { parentNode = render._node; } else if(Y.Lang.isString(render)) { parentNode = Y.Selector.query(render, DOCUMENT.body, true); } w = this.get("width") || parseInt(Y.DOM.getComputedStyle(parentNode, "width"), 10); h = this.get("height") || parseInt(Y.DOM.getComputedStyle(parentNode, "height"), 10); parentNode.appendChild(node); this.parentNode = parentNode; this.set("width", w); this.set("height", h); return this; }, /** * Removes all nodes. * * @method destroy */ destroy: function() { this.removeAllShapes(); if(this._node) { this._removeChildren(this._node); if(this._node.parentNode) { this._node.parentNode.removeChild(this._node); } this._node = null; } }, /** * Generates a shape instance by type. * * @method addShape * @param {Object} cfg attributes for the shape * @return Shape */ addShape: function(cfg) { cfg.graphic = this; if(!this.get("visible")) { cfg.visible = false; } var ShapeClass = this._getShapeClass(cfg.type), shape = new ShapeClass(cfg); this._appendShape(shape); shape._appendStrokeAndFill(); return shape; }, /** * Adds a shape instance to the graphic instance. * * @method _appendShape * @param {Shape} shape The shape instance to be added to the graphic. * @private */ _appendShape: function(shape) { var node = shape.node, parentNode = this._frag || this._node; if(this.get("autoDraw") || this.get("autoSize") === "sizeContentToGraphic") { parentNode.appendChild(node); } else { this._getDocFrag().appendChild(node); } }, /** * Removes a shape instance from from the graphic instance. * * @method removeShape * @param {Shape|String} shape The instance or id of the shape to be removed. */ removeShape: function(shape) { if(!(shape instanceof VMLShape)) { if(Y_LANG.isString(shape)) { shape = this._shapes[shape]; } } if(shape && (shape instanceof VMLShape)) { shape._destroy(); this._shapes[shape.get("id")] = null; delete this._shapes[shape.get("id")]; } if(this.get("autoDraw")) { this._redraw(); } }, /** * Removes all shape instances from the dom. * * @method removeAllShapes */ removeAllShapes: function() { var shapes = this._shapes, i; for(i in shapes) { if(shapes.hasOwnProperty(i)) { shapes[i].destroy(); } } this._shapes = {}; }, /** * Removes all child nodes. * * @method _removeChildren * @param node * @private */ _removeChildren: function(node) { if(node.hasChildNodes()) { var child; while(node.firstChild) { child = node.firstChild; this._removeChildren(child); node.removeChild(child); } } }, /** * Clears the graphics object. * * @method clear */ clear: function() { this.removeAllShapes(); this._removeChildren(this._node); }, /** * Toggles visibility * * @method _toggleVisible * @param {Boolean} val indicates visibilitye * @private */ _toggleVisible: function(val) { var i, shapes = this._shapes, visibility = val ? "visible" : "hidden"; if(shapes) { for(i in shapes) { if(shapes.hasOwnProperty(i)) { shapes[i].set("visible", val); } } } if(this._node) { this._node.style.visibility = visibility; } if(this._node) { this._node.style.visibility = visibility; } }, /** * Sets the size of the graphics object. * * @method setSize * @param w {Number} width to set for the instance. * @param h {Number} height to set for the instance. */ setSize: function(w, h) { w = Math.round(w); h = Math.round(h); this._node.style.width = w + 'px'; this._node.style.height = h + 'px'; }, /** * Sets the positon of the graphics object. * * @method setPosition * @param {Number} x x-coordinate for the object. * @param {Number} y y-coordinate for the object. */ setPosition: function(x, y) { x = Math.round(x); y = Math.round(y); this._node.style.left = x + "px"; this._node.style.top = y + "px"; }, /** * Creates a group element * * @method _createGraphic * @private */ _createGraphic: function() { var group = DOCUMENT.createElement( '<group xmlns="urn:schemas-microsft.com:vml"' + ' style="behavior:url(#default#VML);padding:0px 0px 0px 0px;display:block;position:absolute;top:0px;left:0px;zoom:1;"' + '/>' ); return group; }, /** * Creates a graphic node * * @method _createGraphicNode * @param {String} type node type to create * @param {String} pe specified pointer-events value * @return HTMLElement * @private */ _createGraphicNode: function(type) { return DOCUMENT.createElement( '<' + type + ' xmlns="urn:schemas-microsft.com:vml"' + ' style="behavior:url(#default#VML);display:inline-block;zoom:1;"' + '/>' ); }, /** * Returns a shape based on the id of its dom node. * * @method getShapeById * @param {String} id Dom id of the shape's node attribute. * @return Shape */ getShapeById: function(id) { return this._shapes[id]; }, /** * Returns a shape class. Used by `addShape`. * * @method _getShapeClass * @param {Shape | String} val Indicates which shape class. * @return Function * @private */ _getShapeClass: function(val) { var shape = this._shapeClass[val]; if(shape) { return shape; } return val; }, /** * Look up for shape classes. Used by `addShape` to retrieve a class for instantiation. * * @property _shapeClass * @type Object * @private */ _shapeClass: { circle: Y.VMLCircle, rect: Y.VMLRect, path: Y.VMLPath, ellipse: Y.VMLEllipse, pieslice: Y.VMLPieSlice }, /** * Allows for creating multiple shapes in order to batch appending and redraw operations. * * @method batch * @param {Function} method Method to execute. */ batch: function(method) { var autoDraw = this.get("autoDraw"); this.set("autoDraw", false); method.apply(); this.set("autoDraw", autoDraw); }, /** * Returns a document fragment to for attaching shapes. * * @method _getDocFrag * @return DocumentFragment * @private */ _getDocFrag: function() { if(!this._frag) { this._frag = DOCUMENT.createDocumentFragment(); } return this._frag; }, /** * Adds a shape to the redraw queue and calculates the contentBounds. * * @method addToRedrawQueue * @param shape {VMLShape} * @protected */ addToRedrawQueue: function(shape) { var shapeBox, box; this._shapes[shape.get("id")] = shape; if(!this.get("resizeDown")) { shapeBox = shape.getBounds(); box = this._contentBounds; box.left = box.left < shapeBox.left ? box.left : shapeBox.left; box.top = box.top < shapeBox.top ? box.top : shapeBox.top; box.right = box.right > shapeBox.right ? box.right : shapeBox.right; box.bottom = box.bottom > shapeBox.bottom ? box.bottom : shapeBox.bottom; box.width = box.right - box.left; box.height = box.bottom - box.top; this._contentBounds = box; } if(this.get("autoDraw")) { this._redraw(); } }, /** * Redraws all shapes. * * @method _redraw * @private */ _redraw: function() { var autoSize = this.get("autoSize"), preserveAspectRatio, node = this.parentNode, nodeWidth = parseFloat(Y.DOM.getComputedStyle(node, "width")), nodeHeight = parseFloat(Y.DOM.getComputedStyle(node, "height")), xCoordOrigin = 0, yCoordOrigin = 0, box = this.get("resizeDown") ? this._getUpdatedContentBounds() : this._contentBounds, left = box.left, right = box.right, top = box.top, bottom = box.bottom, contentWidth = right - left, contentHeight = bottom - top, aspectRatio, xCoordSize, yCoordSize, scaledWidth, scaledHeight, visible = this.get("visible"); this._node.style.visibility = "hidden"; if(autoSize) { if(autoSize === "sizeContentToGraphic") { preserveAspectRatio = this.get("preserveAspectRatio"); if(preserveAspectRatio === "none" || contentWidth/contentHeight === nodeWidth/nodeHeight) { xCoordOrigin = left; yCoordOrigin = top; xCoordSize = contentWidth; yCoordSize = contentHeight; } else { if(contentWidth * nodeHeight/contentHeight > nodeWidth) { aspectRatio = nodeHeight/nodeWidth; xCoordSize = contentWidth; yCoordSize = contentWidth * aspectRatio; scaledHeight = (nodeWidth * (contentHeight/contentWidth)) * (yCoordSize/nodeHeight); yCoordOrigin = this._calculateCoordOrigin(preserveAspectRatio.slice(5).toLowerCase(), scaledHeight, yCoordSize); yCoordOrigin = top + yCoordOrigin; xCoordOrigin = left; } else { aspectRatio = nodeWidth/nodeHeight; xCoordSize = contentHeight * aspectRatio; yCoordSize = contentHeight; scaledWidth = (nodeHeight * (contentWidth/contentHeight)) * (xCoordSize/nodeWidth); xCoordOrigin = this._calculateCoordOrigin(preserveAspectRatio.slice(1, 4).toLowerCase(), scaledWidth, xCoordSize); xCoordOrigin = xCoordOrigin + left; yCoordOrigin = top; } } this._node.style.width = nodeWidth + "px"; this._node.style.height = nodeHeight + "px"; this._node.coordOrigin = xCoordOrigin + ", " + yCoordOrigin; } else { xCoordSize = contentWidth; yCoordSize = contentHeight; this._node.style.width = contentWidth + "px"; this._node.style.height = contentHeight + "px"; this._state.width = contentWidth; this._state.height = contentHeight; } this._node.coordSize = xCoordSize + ", " + yCoordSize; } else { this._node.style.width = nodeWidth + "px"; this._node.style.height = nodeHeight + "px"; this._node.coordSize = nodeWidth + ", " + nodeHeight; } if(this._frag) { this._node.appendChild(this._frag); this._frag = null; } if(visible) { this._node.style.visibility = "visible"; } }, /** * Determines the value for either an x or y coordinate to be used for the <code>coordOrigin</code> of the Graphic. * * @method _calculateCoordOrigin * @param {String} position The position for placement. Possible values are min, mid and max. * @param {Number} size The total scaled size of the content. * @param {Number} coordsSize The coordsSize for the Graphic. * @return Number * @private */ _calculateCoordOrigin: function(position, size, coordsSize) { var coord; switch(position) { case "min" : coord = 0; break; case "mid" : coord = (size - coordsSize)/2; break; case "max" : coord = (size - coordsSize); break; } return coord; }, /** * Recalculates and returns the `contentBounds` for the `Graphic` instance. * * @method _getUpdatedContentBounds * @return {Object} * @private */ _getUpdatedContentBounds: function() { var bounds, i, shape, queue = this._shapes, box = {}; for(i in queue) { if(queue.hasOwnProperty(i)) { shape = queue[i]; bounds = shape.getBounds(); box.left = Y_LANG.isNumber(box.left) ? Math.min(box.left, bounds.left) : bounds.left; box.top = Y_LANG.isNumber(box.top) ? Math.min(box.top, bounds.top) : bounds.top; box.right = Y_LANG.isNumber(box.right) ? Math.max(box.right, bounds.right) : bounds.right; box.bottom = Y_LANG.isNumber(box.bottom) ? Math.max(box.bottom, bounds.bottom) : bounds.bottom; } } box.left = Y_LANG.isNumber(box.left) ? box.left : 0; box.top = Y_LANG.isNumber(box.top) ? box.top : 0; box.right = Y_LANG.isNumber(box.right) ? box.right : 0; box.bottom = Y_LANG.isNumber(box.bottom) ? box.bottom : 0; this._contentBounds = box; return box; }, /** * Inserts shape on the top of the tree. * * @method _toFront * @param {VMLShape} Shape to add. * @private */ _toFront: function(shape) { var contentNode = this._node; if(shape instanceof Y.VMLShape) { shape = shape.get("node"); } if(contentNode && shape) { contentNode.appendChild(shape); } }, /** * Inserts shape as the first child of the content node. * * @method _toBack * @param {VMLShape} Shape to add. * @private */ _toBack: function(shape) { var contentNode = this._node, targetNode; if(shape instanceof Y.VMLShape) { shape = shape.get("node"); } if(contentNode && shape) { targetNode = contentNode.firstChild; if(targetNode) { contentNode.insertBefore(shape, targetNode); } else { contentNode.appendChild(shape); } } } }); Y.VMLGraphic = VMLGraphic; }, '3.17.2', {"requires": ["graphics", "color-base"]});
mikesir87/cdnjs
ajax/libs/yui/3.17.2/graphics-vml/graphics-vml.js
JavaScript
mit
100,710
/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ (function() { var stateChangeListener, GLOBAL_ENV = YUI.Env, config = YUI.config, doc = config.doc, docElement = doc && doc.documentElement, EVENT_NAME = 'onreadystatechange', pollInterval = config.pollInterval || 40; if (docElement.doScroll && !GLOBAL_ENV._ieready) { GLOBAL_ENV._ieready = function() { GLOBAL_ENV._ready(); }; /*! DOMReady: based on work by: Dean Edwards/John Resig/Matthias Miller/Diego Perini */ // Internet Explorer: use the doScroll() method on the root element. // This isolates what appears to be a safe moment to manipulate the // DOM prior to when the document's readyState suggests it is safe to do so. if (self !== self.top) { stateChangeListener = function() { if (doc.readyState == 'complete') { GLOBAL_ENV.remove(doc, EVENT_NAME, stateChangeListener); GLOBAL_ENV.ieready(); } }; GLOBAL_ENV.add(doc, EVENT_NAME, stateChangeListener); } else { GLOBAL_ENV._dri = setInterval(function() { try { docElement.doScroll('left'); clearInterval(GLOBAL_ENV._dri); GLOBAL_ENV._dri = null; GLOBAL_ENV._ieready(); } catch (domNotReady) { } }, pollInterval); } } })(); YUI.add('event-base-ie', function (Y, NAME) { /* * Custom event engine, DOM event listener abstraction layer, synthetic DOM * events. * @module event * @submodule event-base */ function IEEventFacade() { // IEEventFacade.superclass.constructor.apply(this, arguments); Y.DOM2EventFacade.apply(this, arguments); } /* * (intentially left out of API docs) * Alternate Facade implementation that is based on Object.defineProperty, which * is partially supported in IE8. Properties that involve setup work are * deferred to temporary getters using the static _define method. */ function IELazyFacade(e) { var proxy = Y.config.doc.createEventObject(e), proto = IELazyFacade.prototype; // TODO: necessary? proxy.hasOwnProperty = function () { return true; }; proxy.init = proto.init; proxy.halt = proto.halt; proxy.preventDefault = proto.preventDefault; proxy.stopPropagation = proto.stopPropagation; proxy.stopImmediatePropagation = proto.stopImmediatePropagation; Y.DOM2EventFacade.apply(proxy, arguments); return proxy; } var imp = Y.config.doc && Y.config.doc.implementation, useLazyFacade = Y.config.lazyEventFacade, buttonMap = { 0: 1, // left click 4: 2, // middle click 2: 3 // right click }, relatedTargetMap = { mouseout: 'toElement', mouseover: 'fromElement' }, resolve = Y.DOM2EventFacade.resolve, proto = { init: function() { IEEventFacade.superclass.init.apply(this, arguments); var e = this._event, x, y, d, b, de, t; this.target = resolve(e.srcElement); if (('clientX' in e) && (!x) && (0 !== x)) { x = e.clientX; y = e.clientY; d = Y.config.doc; b = d.body; de = d.documentElement; x += (de.scrollLeft || (b && b.scrollLeft) || 0); y += (de.scrollTop || (b && b.scrollTop) || 0); this.pageX = x; this.pageY = y; } if (e.type == "mouseout") { t = e.toElement; } else if (e.type == "mouseover") { t = e.fromElement; } // fallback to t.relatedTarget to support simulated events. // IE doesn't support setting toElement or fromElement on generic // events, so Y.Event.simulate sets relatedTarget instead. this.relatedTarget = resolve(t || e.relatedTarget); // which should contain the unicode key code if this is a key event. // For click events, which is normalized for which mouse button was // clicked. this.which = // chained assignment this.button = e.keyCode || buttonMap[e.button] || e.button; }, stopPropagation: function() { this._event.cancelBubble = true; this._wrapper.stopped = 1; this.stopped = 1; }, stopImmediatePropagation: function() { this.stopPropagation(); this._wrapper.stopped = 2; this.stopped = 2; }, preventDefault: function(returnValue) { this._event.returnValue = returnValue || false; this._wrapper.prevented = 1; this.prevented = 1; } }; Y.extend(IEEventFacade, Y.DOM2EventFacade, proto); Y.extend(IELazyFacade, Y.DOM2EventFacade, proto); IELazyFacade.prototype.init = function () { var e = this._event, overrides = this._wrapper.overrides, define = IELazyFacade._define, lazyProperties = IELazyFacade._lazyProperties, prop; this.altKey = e.altKey; this.ctrlKey = e.ctrlKey; this.metaKey = e.metaKey; this.shiftKey = e.shiftKey; this.type = (overrides && overrides.type) || e.type; this.clientX = e.clientX; this.clientY = e.clientY; this.keyCode = // chained assignment this.charCode = e.keyCode; this.which = // chained assignment this.button = e.keyCode || buttonMap[e.button] || e.button; for (prop in lazyProperties) { if (lazyProperties.hasOwnProperty(prop)) { define(this, prop, lazyProperties[prop]); } } if (this._touch) { this._touch(e, this._currentTarget, this._wrapper); } }; IELazyFacade._lazyProperties = { target: function () { return resolve(this._event.srcElement); }, relatedTarget: function () { var e = this._event, targetProp = relatedTargetMap[e.type] || 'relatedTarget'; // fallback to t.relatedTarget to support simulated events. // IE doesn't support setting toElement or fromElement on generic // events, so Y.Event.simulate sets relatedTarget instead. return resolve(e[targetProp] || e.relatedTarget); }, currentTarget: function () { return resolve(this._currentTarget); }, wheelDelta: function () { var e = this._event; if (e.type === "mousewheel" || e.type === "DOMMouseScroll") { return (e.detail) ? (e.detail * -1) : // wheelDelta between -80 and 80 result in -1 or 1 Math.round(e.wheelDelta / 80) || ((e.wheelDelta < 0) ? -1 : 1); } }, pageX: function () { var e = this._event, val = e.pageX, doc, bodyScroll, docScroll; if (val === undefined) { doc = Y.config.doc; bodyScroll = doc.body && doc.body.scrollLeft; docScroll = doc.documentElement.scrollLeft; val = e.clientX + (docScroll || bodyScroll || 0); } return val; }, pageY: function () { var e = this._event, val = e.pageY, doc, bodyScroll, docScroll; if (val === undefined) { doc = Y.config.doc; bodyScroll = doc.body && doc.body.scrollTop; docScroll = doc.documentElement.scrollTop; val = e.clientY + (docScroll || bodyScroll || 0); } return val; } }; /** * Wrapper function for Object.defineProperty that creates a property whose * value will be calulated only when asked for. After calculating the value, * the getter wll be removed, so it will behave as a normal property beyond that * point. A setter is also assigned so assigning to the property will clear * the getter, so foo.prop = 'a'; foo.prop; won't trigger the getter, * overwriting value 'a'. * * Used only by the DOMEventFacades used by IE8 when the YUI configuration * <code>lazyEventFacade</code> is set to true. * * @method _define * @param o {DOMObject} A DOM object to add the property to * @param prop {String} The name of the new property * @param valueFn {Function} The function that will return the initial, default * value for the property. * @static * @private */ IELazyFacade._define = function (o, prop, valueFn) { function val(v) { var ret = (arguments.length) ? v : valueFn.call(this); delete o[prop]; Object.defineProperty(o, prop, { value: ret, configurable: true, writable: true }); return ret; } Object.defineProperty(o, prop, { get: val, set: val, configurable: true }); }; if (imp && (!imp.hasFeature('Events', '2.0'))) { if (useLazyFacade) { // Make sure we can use the lazy facade logic try { Object.defineProperty(Y.config.doc.createEventObject(), 'z', {}); } catch (e) { useLazyFacade = false; } } Y.DOMEventFacade = (useLazyFacade) ? IELazyFacade : IEEventFacade; } }, '3.17.2', {"requires": ["node-base"]});
johan-gorter/cdnjs
ajax/libs/yui/3.17.2/event-base-ie/event-base-ie-debug.js
JavaScript
mit
9,380
/* YUI 3.17.2 (build 9c3c78e) Copyright 2014 Yahoo! Inc. All rights reserved. Licensed under the BSD License. http://yuilibrary.com/license/ */ YUI.add('series-column-stacked', function (Y, NAME) { /** * Provides functionality for creating a stacked column series. * * @module charts * @submodule series-column-stacked */ var Y_Lang = Y.Lang; /** * The StackedColumnSeries renders column chart in which series are stacked vertically to show * their contribution to the cumulative total. * * @class StackedColumnSeries * @extends ColumnSeries * @uses StackingUtil * @constructor * @param {Object} config (optional) Configuration parameters. * @submodule series-column-stacked */ Y.StackedColumnSeries = Y.Base.create("stackedColumnSeries", Y.ColumnSeries, [Y.StackingUtil], { /** * Draws the series. * * @method drawSeries * @protected */ drawSeries: function() { if(this.get("xcoords").length < 1) { return; } var isNumber = Y_Lang.isNumber, style = this._copyObject(this.get("styles").marker), w = style.width, h = style.height, xcoords = this.get("xcoords"), ycoords = this.get("ycoords"), i = 0, len = xcoords.length, top = ycoords[0], seriesCollection = this.get("seriesTypeCollection"), ratio, order = this.get("order"), graphOrder = this.get("graphOrder"), left, marker, fillColors, borderColors, lastCollection, negativeBaseValues, positiveBaseValues, useOrigin = order === 0, totalWidth = len * w, dimensions = { width: [], height: [] }, xvalues = [], yvalues = [], groupMarkers = this.get("groupMarkers"); if(Y_Lang.isArray(style.fill.color)) { fillColors = style.fill.color.concat(); } if(Y_Lang.isArray(style.border.color)) { borderColors = style.border.color.concat(); } this._createMarkerCache(); if(totalWidth > this.get("width")) { ratio = this.get("width")/totalWidth; w *= ratio; w = Math.max(w, 1); } if(!useOrigin) { lastCollection = seriesCollection[order - 1]; negativeBaseValues = lastCollection.get("negativeBaseValues"); positiveBaseValues = lastCollection.get("positiveBaseValues"); if(!negativeBaseValues || !positiveBaseValues) { useOrigin = true; positiveBaseValues = []; negativeBaseValues = []; } } else { negativeBaseValues = []; positiveBaseValues = []; } this.set("negativeBaseValues", negativeBaseValues); this.set("positiveBaseValues", positiveBaseValues); for(i = 0; i < len; ++i) { left = xcoords[i]; top = ycoords[i]; if(!isNumber(top) || !isNumber(left)) { if(useOrigin) { negativeBaseValues[i] = this._bottomOrigin; positiveBaseValues[i] = this._bottomOrigin; } this._markers.push(null); continue; } if(useOrigin) { h = Math.abs(this._bottomOrigin - top); if(top < this._bottomOrigin) { positiveBaseValues[i] = top; negativeBaseValues[i] = this._bottomOrigin; } else if(top > this._bottomOrigin) { positiveBaseValues[i] = this._bottomOrigin; negativeBaseValues[i] = top; top -= h; } else { positiveBaseValues[i] = top; negativeBaseValues[i] = top; } } else { if(top > this._bottomOrigin) { top += (negativeBaseValues[i] - this._bottomOrigin); h = top - negativeBaseValues[i]; negativeBaseValues[i] = top; top -= h; } else if(top <= this._bottomOrigin) { top = positiveBaseValues[i] - (this._bottomOrigin - top); h = positiveBaseValues[i] - top; positiveBaseValues[i] = top; } } if(!isNaN(h) && h > 0) { left -= w/2; if(groupMarkers) { dimensions.width[i] = w; dimensions.height[i] = h; xvalues.push(left); yvalues.push(top); } else { style.width = w; style.height = h; style.x = left; style.y = top; if(fillColors) { style.fill.color = fillColors[i % fillColors.length]; } if(borderColors) { style.border.color = borderColors[i % borderColors.length]; } marker = this.getMarker(style, graphOrder, i); } } else if(!groupMarkers) { this._markers.push(null); } } if(groupMarkers) { this._createGroupMarker({ fill: style.fill, border: style.border, dimensions: dimensions, xvalues: xvalues, yvalues: yvalues, shape: style.shape }); } else { this._clearMarkerCache(); } }, /** * Resizes and positions markers based on a mouse interaction. * * @method updateMarkerState * @param {String} type state of the marker * @param {Number} i index of the marker * @protected */ updateMarkerState: function(type, i) { if(this._markers && this._markers[i]) { var styles, markerStyles, state = this._getState(type), xcoords = this.get("xcoords"), marker = this._markers[i], offset = 0, fillColor, borderColor; styles = this.get("styles").marker; offset = styles.width * 0.5; markerStyles = state === "off" || !styles[state] ? this._copyObject(styles) : this._copyObject(styles[state]); markerStyles.height = marker.get("height"); markerStyles.x = (xcoords[i] - offset); markerStyles.y = marker.get("y"); markerStyles.id = marker.get("id"); fillColor = markerStyles.fill.color; borderColor = markerStyles.border.color; if(Y_Lang.isArray(fillColor)) { markerStyles.fill.color = fillColor[i % fillColor.length]; } else { markerStyles.fill.color = this._getItemColor(markerStyles.fill.color, i); } if(Y_Lang.isArray(borderColor)) { markerStyles.border.color = borderColor[i % borderColor.length]; } else { markerStyles.border.color = this._getItemColor(markerStyles.border.color, i); } marker.set(markerStyles); } }, /** * Gets the default values for the markers. * * @method _getPlotDefaults * @return Object * @protected */ _getPlotDefaults: function() { var defs = { fill:{ type: "solid", alpha: 1, colors:null, alphas: null, ratios: null }, border:{ weight: 0, alpha: 1 }, width: 24, height: 24, shape: "rect", padding:{ top: 0, left: 0, right: 0, bottom: 0 } }; defs.fill.color = this._getDefaultColor(this.get("graphOrder"), "fill"); defs.border.color = this._getDefaultColor(this.get("graphOrder"), "border"); return defs; } }, { ATTRS: { /** * Read-only attribute indicating the type of series. * * @attribute type * @type String * @default stackedColumn */ type: { value: "stackedColumn" }, /** * @attribute negativeBaseValues * @type Array * @default null * @private */ negativeBaseValues: { value: null }, /** * @attribute positiveBaseValues * @type Array * @default null * @private */ positiveBaseValues: { value: null } /** * Style properties used for drawing markers. This attribute is inherited from `ColumnSeries`. Below are the default values: * <dl> * <dt>fill</dt><dd>A hash containing the following values: * <dl> * <dt>color</dt><dd>Color of the fill. The default value is determined by the order of the series on the graph. The color * will be retrieved from the below array:<br/> * `["#66007f", "#a86f41", "#295454", "#996ab2", "#e8cdb7", "#90bdbd","#000000","#c3b8ca", "#968373", "#678585"]` * </dd> * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker fill. The default value is 1.</dd> * </dl> * </dd> * <dt>border</dt><dd>A hash containing the following values: * <dl> * <dt>color</dt><dd>Color of the border. The default value is determined by the order of the series on the graph. The color * will be retrieved from the below array:<br/> * `["#205096", "#b38206", "#000000", "#94001e", "#9d6fa0", "#e55b00", "#5e85c9", "#adab9e", "#6ac291", "#006457"]` * <dt>alpha</dt><dd>Number from 0 to 1 indicating the opacity of the marker border. The default value is 1.</dd> * <dt>weight</dt><dd>Number indicating the width of the border. The default value is 1.</dd> * </dl> * </dd> * <dt>width</dt><dd>indicates the width of the marker. The default value is 24.</dd> * <dt>over</dt><dd>hash containing styles for markers when highlighted by a `mouseover` event. The default * values for each style is null. When an over style is not set, the non-over value will be used. For example, * the default value for `marker.over.fill.color` is equivalent to `marker.fill.color`.</dd> * </dl> * * @attribute styles * @type Object */ } }); }, '3.17.2', {"requires": ["series-stacked", "series-column"]});
jmusicc/cdnjs
ajax/libs/yui/3.17.2/series-column-stacked/series-column-stacked.js
JavaScript
mit
11,724
/** * Hooks are useful if we want to add a method that automatically has `pre` and `post` hooks. * For example, it would be convenient to have `pre` and `post` hooks for `save`. * _.extend(Model, mixins.hooks); * Model.hook('save', function () { * console.log('saving'); * }); * Model.pre('save', function (next, done) { * console.log('about to save'); * next(); * }); * Model.post('save', function (next, done) { * console.log('saved'); * next(); * }); * * var m = new Model(); * m.save(); * // about to save * // saving * // saved */ // TODO Add in pre and post skipping options module.exports = { /** * Declares a new hook to which you can add pres and posts * @param {String} name of the function * @param {Function} the method * @param {Function} the error handler callback */ hook: function (name, fn, err) { if (arguments.length === 1 && typeof name === 'object') { for (var k in name) { // `name` is a hash of hookName->hookFn this.hook(k, name[k]); } return; } if (!err) err = fn; var proto = this.prototype || this , pres = proto._pres = proto._pres || {} , posts = proto._posts = proto._posts || {}; pres[name] = pres[name] || []; posts[name] = posts[name] || []; function noop () {} proto[name] = function () { var self = this , pres = this._pres[name] , posts = this._posts[name] , numAsyncPres = 0 , hookArgs = [].slice.call(arguments) , preChain = pres.map( function (pre, i) { var wrapper = function () { if (arguments[0] instanceof Error) return err(arguments[0]); if (numAsyncPres) { // arguments[1] === asyncComplete if (arguments.length) hookArgs = [].slice.call(arguments, 2); pre.apply(self, [ preChain[i+1] || allPresInvoked, asyncComplete ].concat(hookArgs) ); } else { if (arguments.length) hookArgs = [].slice.call(arguments); pre.apply(self, [ preChain[i+1] || allPresDone ].concat(hookArgs)); } }; // end wrapper = function () {... if (wrapper.isAsync = pre.isAsync) numAsyncPres++; return wrapper; }); // end posts.map(...) function allPresInvoked () { if (arguments[0] instanceof Error) err(arguments[0]); } function allPresDone () { if (arguments[0] instanceof Error) return err(arguments[0]); if (arguments.length) hookArgs = [].slice.call(arguments); fn.apply(self, hookArgs); var postChain = posts.map( function (post, i) { var wrapper = function () { if (arguments[0] instanceof Error) return err(arguments[0]); if (arguments.length) hookArgs = [].slice.call(arguments); post.apply(self, [ postChain[i+1] || noop].concat(hookArgs)); }; // end wrapper = function () {... return wrapper; }); // end posts.map(...) if (postChain.length) postChain[0](); } if (numAsyncPres) { complete = numAsyncPres; function asyncComplete () { if (arguments[0] instanceof Error) return err(arguments[0]); --complete || allPresDone.call(this); } } (preChain[0] || allPresDone)(); }; return this; }, pre: function (name, fn, isAsync) { var proto = this.prototype , pres = proto._pres = proto._pres || {}; if (fn.isAsync = isAsync) { this.prototype[name].numAsyncPres++; } (pres[name] = pres[name] || []).push(fn); return this; }, post: function (name, fn, isAsync) { var proto = this.prototype , posts = proto._posts = proto._posts || {}; (posts[name] = posts[name] || []).push(fn); return this; } };
Sabrosoftware/Hackernation
node_modules/mongoose/node_modules/hooks-fixed/hooks.alt.js
JavaScript
mit
4,102
/* * Handles finding a text string anywhere in the slides and showing the next occurrence to the user * by navigatating to that slide and highlighting it. * * By Jon Snyder <snyder.jon@gmail.com>, February 2013 */ var RevealSearch = (function() { var matchedSlides; var currentMatchedIndex; var searchboxDirty; var myHilitor; // Original JavaScript code by Chirp Internet: www.chirp.com.au // Please acknowledge use of this code by including this header. // 2/2013 jon: modified regex to display any match, not restricted to word boundaries. function Hilitor(id, tag) { var targetNode = document.getElementById(id) || document.body; var hiliteTag = tag || "EM"; var skipTags = new RegExp("^(?:" + hiliteTag + "|SCRIPT|FORM|SPAN)$"); var colors = ["#ff6", "#a0ffff", "#9f9", "#f99", "#f6f"]; var wordColor = []; var colorIdx = 0; var matchRegex = ""; var matchingSlides = []; this.setRegex = function(input) { input = input.replace(/^[^\w]+|[^\w]+$/g, "").replace(/[^\w'-]+/g, "|"); matchRegex = new RegExp("(" + input + ")","i"); } this.getRegex = function() { return matchRegex.toString().replace(/^\/\\b\(|\)\\b\/i$/g, "").replace(/\|/g, " "); } // recursively apply word highlighting this.hiliteWords = function(node) { if(node == undefined || !node) return; if(!matchRegex) return; if(skipTags.test(node.nodeName)) return; if(node.hasChildNodes()) { for(var i=0; i < node.childNodes.length; i++) this.hiliteWords(node.childNodes[i]); } if(node.nodeType == 3) { // NODE_TEXT if((nv = node.nodeValue) && (regs = matchRegex.exec(nv))) { //find the slide's section element and save it in our list of matching slides var secnode = node.parentNode; while (secnode.nodeName != 'SECTION') { secnode = secnode.parentNode; } var slideIndex = Reveal.getIndices(secnode); var slidelen = matchingSlides.length; var alreadyAdded = false; for (var i=0; i < slidelen; i++) { if ( (matchingSlides[i].h === slideIndex.h) && (matchingSlides[i].v === slideIndex.v) ) { alreadyAdded = true; } } if (! alreadyAdded) { matchingSlides.push(slideIndex); } if(!wordColor[regs[0].toLowerCase()]) { wordColor[regs[0].toLowerCase()] = colors[colorIdx++ % colors.length]; } var match = document.createElement(hiliteTag); match.appendChild(document.createTextNode(regs[0])); match.style.backgroundColor = wordColor[regs[0].toLowerCase()]; match.style.fontStyle = "inherit"; match.style.color = "#000"; var after = node.splitText(regs.index); after.nodeValue = after.nodeValue.substring(regs[0].length); node.parentNode.insertBefore(match, after); } } }; // remove highlighting this.remove = function() { var arr = document.getElementsByTagName(hiliteTag); while(arr.length && (el = arr[0])) { el.parentNode.replaceChild(el.firstChild, el); } }; // start highlighting at target node this.apply = function(input) { if(input == undefined || !input) return; this.remove(); this.setRegex(input); this.hiliteWords(targetNode); return matchingSlides; }; } function openSearch() { //ensure the search term input dialog is visible and has focus: var inputbox = document.getElementById("searchinput"); inputbox.style.display = "inline"; inputbox.focus(); inputbox.select(); } function toggleSearch() { var inputbox = document.getElementById("searchinput"); if (inputbox.style.display !== "inline") { openSearch(); } else { inputbox.style.display = "none"; myHilitor.remove(); } } function doSearch() { //if there's been a change in the search term, perform a new search: if (searchboxDirty) { var searchstring = document.getElementById("searchinput").value; //find the keyword amongst the slides myHilitor = new Hilitor("slidecontent"); matchedSlides = myHilitor.apply(searchstring); currentMatchedIndex = 0; } //navigate to the next slide that has the keyword, wrapping to the first if necessary if (matchedSlides.length && (matchedSlides.length <= currentMatchedIndex)) { currentMatchedIndex = 0; } if (matchedSlides.length > currentMatchedIndex) { Reveal.slide(matchedSlides[currentMatchedIndex].h, matchedSlides[currentMatchedIndex].v); currentMatchedIndex++; } } var dom = {}; dom.wrapper = document.querySelector( '.reveal' ); if( !dom.wrapper.querySelector( '.searchbox' ) ) { var searchElement = document.createElement( 'div' ); searchElement.id = "searchinputdiv"; searchElement.classList.add( 'searchdiv' ); searchElement.style.position = 'absolute'; searchElement.style.top = '10px'; searchElement.style.left = '10px'; //embedded base64 search icon Designed by Sketchdock - http://www.sketchdock.com/: searchElement.innerHTML = '<span><input type="search" id="searchinput" class="searchinput" style="vertical-align: top;"/><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAABGdBTUEAAK/INwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAJiSURBVHjatFZNaxNBGH5md+Mmu92NVdKDRipSAyqCghgQD4L4cRe86UUtAQ+eFCxoa4/25EXBFi8eBE+eRPoDhB6KgiiixdAPCEkx2pjvTXadd9yNsflwuyUDD/O+u8PzzDPvzOwyx3EwyCZhwG3gAkp7MnpjgbopjsltcD4gjuXZZKeAR348MYLYTm3LzOs/y3j3JTfZxgXWXmTuwPHIc4VmoOmv5IrI53+AO2DdHLjkDWQ3GoEEVFXtXQOvkSnPWcyUceviLhwbDYv8/XIVj97kse7TodLvZXxYxrPUHkQ1ufXs3FEdybEIxucySOesoNvUgWU1cP3MkCBfTFdw9fGaAMVmRELq7LBw2Q3/FaAxxWIRpw+ZIr/7IouPqzUBiqmdHAv7EuhRAwf1er2Vy4x1jW3b2d5Jfvu5IPp7l2LYbcgCFFNb+FoJ7oBqEAqFMPNqFcmEgVMJDfMT+1tvN0pNjERlMS6QA5pFOKxiKVPFhakPeL3It+WGJUDxt2wFR+JhzI7v5ctkd8DXOZAkCYYxhO+lKm4+Xfqz/rIixBuNBl7eOYzkQQNzqX249mRl6zUgEcYkaJrGhUwBinVdh6IouPzwE6/DL5w4oLkH8y981aDf+uq6hlKpJESiUdNfDZi7/ehG9K6KfiA3pml0PLcsq+cSMTj2NL9ukc4UOmz7AZ3+crkC4mHujFvXNaMFB3bEr8xPS6p5O+jXxq4VZtaen7/PwzrntjcLUE0iHPS1Ud1cdiEJl/8WivZk0wXd7zWOMkeF8s0CcAmkNrC2nvXZDbbbN73ccYnZoH9bfgswAFzAe9/h3dbKAAAAAElFTkSuQmCC" id="searchbutton" class="searchicon" style="vertical-align: top; margin-top: -1px;"/></span>'; dom.wrapper.appendChild( searchElement ); } document.getElementById("searchbutton").addEventListener( 'click', function(event) { doSearch(); }, false ); document.getElementById("searchinput").addEventListener( 'keyup', function( event ) { switch (event.keyCode) { case 13: event.preventDefault(); doSearch(); searchboxDirty = false; break; default: searchboxDirty = true; } }, false ); // Open the search when the 's' key is hit (yes, this conflicts with the notes plugin, disabling for now) /* document.addEventListener( 'keydown', function( event ) { // Disregard the event if the target is editable or a // modifier is present if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return; if( event.keyCode === 83 ) { event.preventDefault(); openSearch(); } }, false ); */ return { open: openSearch }; })();
pkozlowski-opensource/cdnjs
ajax/libs/reveal.js/2.5/plugin/search/search.js
JavaScript
mit
7,151
#!/bin/bash # Script for updating angular-phonecat repo from current local build. echo "#################################" echo "## Update angular-phonecat ###" echo "#################################" ARG_DEFS=( "--action=(prepare|publish)" "[--no-test=(true|false)]" ) function init { TMP_DIR=$(resolveDir ../../tmp) BUILD_DIR=$(resolveDir ../../build) REPO_DIR=$TMP_DIR/angular-phonecat NEW_VERSION=$(cat $BUILD_DIR/version.txt) } function prepare { echo "-- Cloning angular-phonecat" git clone git@github.com:angular/angular-phonecat.git $REPO_DIR # # copy the files from the build # echo "-- Updating angular-phonecat" cd $REPO_DIR ./scripts/private/update-angular.sh $BUILD_DIR # Test if [[ $NO_TEST != "true" ]]; then ./scripts/private/test-all.sh fi # Generate demo ./scripts/private/snapshot-web.sh git checkout gh-pages git pull rm -r step* mv angular-phonecat-snapshots-web/step* . git add step* git commit -am "Angular $NEW_VERSION release" } function publish { cd $REPO_DIR echo "-- Pushing angular-phonecat" git push origin master -f --tags git push origin gh-pages -f } source $(dirname $0)/../utils.inc
jbhicks/VisKoProject-Team4
scripts/angular-phonecat/publish.sh
Shell
mit
1,191
// // FSCalendarDelegationFactory.m // FSCalendar // // Created by dingwenchao on 19/12/2016. // Copyright © 2016 wenchaoios. All rights reserved. // #import "FSCalendarDelegationFactory.h" #define FSCalendarSelectorEntry(SEL1,SEL2) NSStringFromSelector(@selector(SEL1)):NSStringFromSelector(@selector(SEL2)) @implementation FSCalendarDelegationFactory + (FSCalendarDelegationProxy *)dataSourceProxy { FSCalendarDelegationProxy *delegation = [[FSCalendarDelegationProxy alloc] init]; delegation.protocol = @protocol(FSCalendarDataSource); delegation.deprecations = @{FSCalendarSelectorEntry(calendar:numberOfEventsForDate:, calendar:hasEventForDate:)}; return delegation; } + (FSCalendarDelegationProxy *)delegateProxy { FSCalendarDelegationProxy *delegation = [[FSCalendarDelegationProxy alloc] init]; delegation.protocol = @protocol(FSCalendarDelegateAppearance); delegation.deprecations = @{ FSCalendarSelectorEntry(calendarCurrentPageDidChange:, calendarCurrentMonthDidChange:), FSCalendarSelectorEntry(calendar:shouldSelectDate:atMonthPosition:, calendar:shouldSelectDate:), FSCalendarSelectorEntry(calendar:didSelectDate:atMonthPosition:, calendar:didSelectDate:), FSCalendarSelectorEntry(calendar:shouldDeselectDate:atMonthPosition:, calendar:shouldDeselectDate:), FSCalendarSelectorEntry(calendar:didDeselectDate:atMonthPosition:, calendar:didDeselectDate:) }; return delegation; } @end #undef FSCalendarSelectorEntry
softondigital/VelentiumDatepicker
Pods/FSCalendar/FSCalendar/FSCalendarDelegationFactory.m
Matlab
mit
1,662
(function (factory) { if (typeof define === 'function' && define.amd) { // AMD. Register as an anonymous module. define(['jquery'], factory); } else if (typeof module === "object" && module.exports) { var $ = require('jquery'); module.exports = factory($); } else { // Browser globals factory(jQuery); } }(function (jQuery) { /*! * jQuery.textcomplete * * Repository: https://github.com/yuku-t/jquery-textcomplete * License: MIT (https://github.com/yuku-t/jquery-textcomplete/blob/master/LICENSE) * Author: Yuku Takahashi */ if (typeof jQuery === 'undefined') { throw new Error('jQuery.textcomplete requires jQuery'); } +function ($) { 'use strict'; var warn = function (message) { if (console.warn) { console.warn(message); } }; var id = 1; $.fn.textcomplete = function (strategies, option) { var args = Array.prototype.slice.call(arguments); return this.each(function () { var self = this; var $this = $(this); var completer = $this.data('textComplete'); if (!completer) { option || (option = {}); option._oid = id++; // unique object id completer = new $.fn.textcomplete.Completer(this, option); $this.data('textComplete', completer); } if (typeof strategies === 'string') { if (!completer) return; args.shift() completer[strategies].apply(completer, args); if (strategies === 'destroy') { $this.removeData('textComplete'); } } else { // For backward compatibility. // TODO: Remove at v0.4 $.each(strategies, function (obj) { $.each(['header', 'footer', 'placement', 'maxCount'], function (name) { if (obj[name]) { completer.option[name] = obj[name]; warn(name + 'as a strategy param is deprecated. Use option.'); delete obj[name]; } }); }); completer.register($.fn.textcomplete.Strategy.parse(strategies, { el: self, $el: $this })); } }); }; }(jQuery); +function ($) { 'use strict'; // Exclusive execution control utility. // // func - The function to be locked. It is executed with a function named // `free` as the first argument. Once it is called, additional // execution are ignored until the free is invoked. Then the last // ignored execution will be replayed immediately. // // Examples // // var lockedFunc = lock(function (free) { // setTimeout(function { free(); }, 1000); // It will be free in 1 sec. // console.log('Hello, world'); // }); // lockedFunc(); // => 'Hello, world' // lockedFunc(); // none // lockedFunc(); // none // // 1 sec past then // // => 'Hello, world' // lockedFunc(); // => 'Hello, world' // lockedFunc(); // none // // Returns a wrapped function. var lock = function (func) { var locked, queuedArgsToReplay; return function () { // Convert arguments into a real array. var args = Array.prototype.slice.call(arguments); if (locked) { // Keep a copy of this argument list to replay later. // OK to overwrite a previous value because we only replay // the last one. queuedArgsToReplay = args; return; } locked = true; var self = this; args.unshift(function replayOrFree() { if (queuedArgsToReplay) { // Other request(s) arrived while we were locked. // Now that the lock is becoming available, replay // the latest such request, then call back here to // unlock (or replay another request that arrived // while this one was in flight). var replayArgs = queuedArgsToReplay; queuedArgsToReplay = undefined; replayArgs.unshift(replayOrFree); func.apply(self, replayArgs); } else { locked = false; } }); func.apply(this, args); }; }; var isString = function (obj) { return Object.prototype.toString.call(obj) === '[object String]'; }; var uniqueId = 0; var initializedEditors = []; function Completer(element, option) { this.$el = $(element); this.id = 'textcomplete' + uniqueId++; this.strategies = []; this.views = []; this.option = $.extend({}, Completer.defaults, option); if (!this.$el.is('input[type=text]') && !this.$el.is('input[type=search]') && !this.$el.is('textarea') && !element.isContentEditable && element.contentEditable != 'true') { throw new Error('textcomplete must be called on a Textarea or a ContentEditable.'); } // use ownerDocument to fix iframe / IE issues if (element === element.ownerDocument.activeElement) { // element has already been focused. Initialize view objects immediately. this.initialize() } else { // Initialize view objects lazily. var self = this; this.$el.one('focus.' + this.id, function () { self.initialize(); }); // Special handling for CKEditor: lazy init on instance load if ((!this.option.adapter || this.option.adapter == 'CKEditor') && typeof CKEDITOR != 'undefined' && (this.$el.is('textarea'))) { CKEDITOR.on("instanceReady", function(event) { //For multiple ckeditors on one page: this needs to be executed each time a ckeditor-instance is ready. if($.inArray(event.editor.id, initializedEditors) == -1) { //For multiple ckeditors on one page: focus-eventhandler should only be added once for every editor. initializedEditors.push(event.editor.id); event.editor.on("focus", function(event2) { //replace the element with the Iframe element and flag it as CKEditor self.$el = $(event.editor.editable().$); if (!self.option.adapter) { self.option.adapter = $.fn.textcomplete['CKEditor']; } self.option.ckeditor_instance = event.editor; //For multiple ckeditors on one page: in the old code this was not executed when adapter was alread set. So we were ALWAYS working with the FIRST instance. self.initialize(); }); } }); } } } Completer.defaults = { appendTo: 'body', className: '', // deprecated option dropdownClassName: 'dropdown-menu textcomplete-dropdown', maxCount: 10, zIndex: '100', rightEdgeOffset: 30 }; $.extend(Completer.prototype, { // Public properties // ----------------- id: null, option: null, strategies: null, adapter: null, dropdown: null, $el: null, $iframe: null, // Public methods // -------------- initialize: function () { var element = this.$el.get(0); // check if we are in an iframe // we need to alter positioning logic if using an iframe if (this.$el.prop('ownerDocument') !== document && window.frames.length) { for (var iframeIndex = 0; iframeIndex < window.frames.length; iframeIndex++) { if (this.$el.prop('ownerDocument') === window.frames[iframeIndex].document) { this.$iframe = $(window.frames[iframeIndex].frameElement); break; } } } // Initialize view objects. this.dropdown = new $.fn.textcomplete.Dropdown(element, this, this.option); var Adapter, viewName; if (this.option.adapter) { Adapter = this.option.adapter; } else { if (this.$el.is('textarea') || this.$el.is('input[type=text]') || this.$el.is('input[type=search]')) { viewName = typeof element.selectionEnd === 'number' ? 'Textarea' : 'IETextarea'; } else { viewName = 'ContentEditable'; } Adapter = $.fn.textcomplete[viewName]; } this.adapter = new Adapter(element, this, this.option); }, destroy: function () { this.$el.off('.' + this.id); if (this.adapter) { this.adapter.destroy(); } if (this.dropdown) { this.dropdown.destroy(); } this.$el = this.adapter = this.dropdown = null; }, deactivate: function () { if (this.dropdown) { this.dropdown.deactivate(); } }, // Invoke textcomplete. trigger: function (text, skipUnchangedTerm) { if (!this.dropdown) { this.initialize(); } text != null || (text = this.adapter.getTextFromHeadToCaret()); var searchQuery = this._extractSearchQuery(text); if (searchQuery.length) { var term = searchQuery[1]; // Ignore shift-key, ctrl-key and so on. if (skipUnchangedTerm && this._term === term && term !== "") { return; } this._term = term; this._search.apply(this, searchQuery); } else { this._term = null; this.dropdown.deactivate(); } }, fire: function (eventName) { var args = Array.prototype.slice.call(arguments, 1); this.$el.trigger(eventName, args); return this; }, register: function (strategies) { Array.prototype.push.apply(this.strategies, strategies); }, // Insert the value into adapter view. It is called when the dropdown is clicked // or selected. // // value - The selected element of the array callbacked from search func. // strategy - The Strategy object. // e - Click or keydown event object. select: function (value, strategy, e) { this._term = null; this.adapter.select(value, strategy, e); this.fire('change').fire('textComplete:select', value, strategy); this.adapter.focus(); }, // Private properties // ------------------ _clearAtNext: true, _term: null, // Private methods // --------------- // Parse the given text and extract the first matching strategy. // // Returns an array including the strategy, the query term and the match // object if the text matches an strategy; otherwise returns an empty array. _extractSearchQuery: function (text) { for (var i = 0; i < this.strategies.length; i++) { var strategy = this.strategies[i]; var context = strategy.context(text); if (context || context === '') { var matchRegexp = $.isFunction(strategy.match) ? strategy.match(text) : strategy.match; if (isString(context)) { text = context; } var match = text.match(matchRegexp); if (match) { return [strategy, match[strategy.index], match]; } } } return [] }, // Call the search method of selected strategy.. _search: lock(function (free, strategy, term, match) { var self = this; strategy.search(term, function (data, stillSearching) { if (!self.dropdown.shown) { self.dropdown.activate(); } if (self._clearAtNext) { // The first callback in the current lock. self.dropdown.clear(); self._clearAtNext = false; } self.dropdown.setPosition(self.adapter.getCaretPosition()); self.dropdown.render(self._zip(data, strategy, term)); if (!stillSearching) { // The last callback in the current lock. free(); self._clearAtNext = true; // Call dropdown.clear at the next time. } }, match); }), // Build a parameter for Dropdown#render. // // Examples // // this._zip(['a', 'b'], 's'); // //=> [{ value: 'a', strategy: 's' }, { value: 'b', strategy: 's' }] _zip: function (data, strategy, term) { return $.map(data, function (value) { return { value: value, strategy: strategy, term: term }; }); } }); $.fn.textcomplete.Completer = Completer; }(jQuery); +function ($) { 'use strict'; var $window = $(window); var include = function (zippedData, datum) { var i, elem; var idProperty = datum.strategy.idProperty for (i = 0; i < zippedData.length; i++) { elem = zippedData[i]; if (elem.strategy !== datum.strategy) continue; if (idProperty) { if (elem.value[idProperty] === datum.value[idProperty]) return true; } else { if (elem.value === datum.value) return true; } } return false; }; var dropdownViews = {}; $(document).on('click', function (e) { var id = e.originalEvent && e.originalEvent.keepTextCompleteDropdown; $.each(dropdownViews, function (key, view) { if (key !== id) { view.deactivate(); } }); }); var commands = { SKIP_DEFAULT: 0, KEY_UP: 1, KEY_DOWN: 2, KEY_ENTER: 3, KEY_PAGEUP: 4, KEY_PAGEDOWN: 5, KEY_ESCAPE: 6 }; // Dropdown view // ============= // Construct Dropdown object. // // element - Textarea or contenteditable element. function Dropdown(element, completer, option) { this.$el = Dropdown.createElement(option); this.completer = completer; this.id = completer.id + 'dropdown'; this._data = []; // zipped data. this.$inputEl = $(element); this.option = option; // Override setPosition method. if (option.listPosition) { this.setPosition = option.listPosition; } if (option.height) { this.$el.height(option.height); } var self = this; $.each(['maxCount', 'placement', 'footer', 'header', 'noResultsMessage', 'className'], function (_i, name) { if (option[name] != null) { self[name] = option[name]; } }); this._bindEvents(element); dropdownViews[this.id] = this; } $.extend(Dropdown, { // Class methods // ------------- createElement: function (option) { var $parent = option.appendTo; if (!($parent instanceof $)) { $parent = $($parent); } var $el = $('<ul></ul>') .addClass(option.dropdownClassName) .attr('id', 'textcomplete-dropdown-' + option._oid) .css({ display: 'none', left: 0, position: 'absolute', zIndex: option.zIndex }) .appendTo($parent); return $el; } }); $.extend(Dropdown.prototype, { // Public properties // ----------------- $el: null, // jQuery object of ul.dropdown-menu element. $inputEl: null, // jQuery object of target textarea. completer: null, footer: null, header: null, id: null, maxCount: null, placement: '', shown: false, data: [], // Shown zipped data. className: '', // Public methods // -------------- destroy: function () { // Don't remove $el because it may be shared by several textcompletes. this.deactivate(); this.$el.off('.' + this.id); this.$inputEl.off('.' + this.id); this.clear(); this.$el.remove(); this.$el = this.$inputEl = this.completer = null; delete dropdownViews[this.id] }, render: function (zippedData) { var contentsHtml = this._buildContents(zippedData); var unzippedData = $.map(zippedData, function (d) { return d.value; }); if (zippedData.length) { var strategy = zippedData[0].strategy; if (strategy.id) { this.$el.attr('data-strategy', strategy.id); } else { this.$el.removeAttr('data-strategy'); } this._renderHeader(unzippedData); this._renderFooter(unzippedData); if (contentsHtml) { this._renderContents(contentsHtml); this._fitToBottom(); this._fitToRight(); this._activateIndexedItem(); } this._setScroll(); } else if (this.noResultsMessage) { this._renderNoResultsMessage(unzippedData); } else if (this.shown) { this.deactivate(); } }, setPosition: function (pos) { // Make the dropdown fixed if the input is also fixed // This can't be done during init, as textcomplete may be used on multiple elements on the same page // Because the same dropdown is reused behind the scenes, we need to recheck every time the dropdown is showed var position = 'absolute'; // Check if input or one of its parents has positioning we need to care about this.$inputEl.add(this.$inputEl.parents()).each(function() { if($(this).css('position') === 'absolute') // The element has absolute positioning, so it's all OK return false; if($(this).css('position') === 'fixed') { pos.top -= $window.scrollTop(); pos.left -= $window.scrollLeft(); position = 'fixed'; return false; } }); this.$el.css(this._applyPlacement(pos)); this.$el.css({ position: position }); // Update positioning return this; }, clear: function () { this.$el.html(''); this.data = []; this._index = 0; this._$header = this._$footer = this._$noResultsMessage = null; }, activate: function () { if (!this.shown) { this.clear(); this.$el.show(); if (this.className) { this.$el.addClass(this.className); } this.completer.fire('textComplete:show'); this.shown = true; } return this; }, deactivate: function () { if (this.shown) { this.$el.hide(); if (this.className) { this.$el.removeClass(this.className); } this.completer.fire('textComplete:hide'); this.shown = false; } return this; }, isUp: function (e) { return e.keyCode === 38 || (e.ctrlKey && e.keyCode === 80); // UP, Ctrl-P }, isDown: function (e) { return e.keyCode === 40 || (e.ctrlKey && e.keyCode === 78); // DOWN, Ctrl-N }, isEnter: function (e) { var modifiers = e.ctrlKey || e.altKey || e.metaKey || e.shiftKey; return !modifiers && (e.keyCode === 13 || e.keyCode === 9 || (this.option.completeOnSpace === true && e.keyCode === 32)) // ENTER, TAB }, isPageup: function (e) { return e.keyCode === 33; // PAGEUP }, isPagedown: function (e) { return e.keyCode === 34; // PAGEDOWN }, isEscape: function (e) { return e.keyCode === 27; // ESCAPE }, // Private properties // ------------------ _data: null, // Currently shown zipped data. _index: null, _$header: null, _$noResultsMessage: null, _$footer: null, // Private methods // --------------- _bindEvents: function () { this.$el.on('mousedown.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this)); this.$el.on('touchstart.' + this.id, '.textcomplete-item', $.proxy(this._onClick, this)); this.$el.on('mouseover.' + this.id, '.textcomplete-item', $.proxy(this._onMouseover, this)); this.$inputEl.on('keydown.' + this.id, $.proxy(this._onKeydown, this)); }, _onClick: function (e) { var $el = $(e.target); e.preventDefault(); e.originalEvent.keepTextCompleteDropdown = this.id; if (!$el.hasClass('textcomplete-item')) { $el = $el.closest('.textcomplete-item'); } var datum = this.data[parseInt($el.data('index'), 10)]; this.completer.select(datum.value, datum.strategy, e); var self = this; // Deactive at next tick to allow other event handlers to know whether // the dropdown has been shown or not. setTimeout(function () { self.deactivate(); if (e.type === 'touchstart') { self.$inputEl.focus(); } }, 0); }, // Activate hovered item. _onMouseover: function (e) { var $el = $(e.target); e.preventDefault(); if (!$el.hasClass('textcomplete-item')) { $el = $el.closest('.textcomplete-item'); } this._index = parseInt($el.data('index'), 10); this._activateIndexedItem(); }, _onKeydown: function (e) { if (!this.shown) { return; } var command; if ($.isFunction(this.option.onKeydown)) { command = this.option.onKeydown(e, commands); } if (command == null) { command = this._defaultKeydown(e); } switch (command) { case commands.KEY_UP: e.preventDefault(); this._up(); break; case commands.KEY_DOWN: e.preventDefault(); this._down(); break; case commands.KEY_ENTER: e.preventDefault(); this._enter(e); break; case commands.KEY_PAGEUP: e.preventDefault(); this._pageup(); break; case commands.KEY_PAGEDOWN: e.preventDefault(); this._pagedown(); break; case commands.KEY_ESCAPE: e.preventDefault(); this.deactivate(); break; } }, _defaultKeydown: function (e) { if (this.isUp(e)) { return commands.KEY_UP; } else if (this.isDown(e)) { return commands.KEY_DOWN; } else if (this.isEnter(e)) { return commands.KEY_ENTER; } else if (this.isPageup(e)) { return commands.KEY_PAGEUP; } else if (this.isPagedown(e)) { return commands.KEY_PAGEDOWN; } else if (this.isEscape(e)) { return commands.KEY_ESCAPE; } }, _up: function () { if (this._index === 0) { this._index = this.data.length - 1; } else { this._index -= 1; } this._activateIndexedItem(); this._setScroll(); }, _down: function () { if (this._index === this.data.length - 1) { this._index = 0; } else { this._index += 1; } this._activateIndexedItem(); this._setScroll(); }, _enter: function (e) { var datum = this.data[parseInt(this._getActiveElement().data('index'), 10)]; this.completer.select(datum.value, datum.strategy, e); this.deactivate(); }, _pageup: function () { var target = 0; var threshold = this._getActiveElement().position().top - this.$el.innerHeight(); this.$el.children().each(function (i) { if ($(this).position().top + $(this).outerHeight() > threshold) { target = i; return false; } }); this._index = target; this._activateIndexedItem(); this._setScroll(); }, _pagedown: function () { var target = this.data.length - 1; var threshold = this._getActiveElement().position().top + this.$el.innerHeight(); this.$el.children().each(function (i) { if ($(this).position().top > threshold) { target = i; return false } }); this._index = target; this._activateIndexedItem(); this._setScroll(); }, _activateIndexedItem: function () { this.$el.find('.textcomplete-item.active').removeClass('active'); this._getActiveElement().addClass('active'); }, _getActiveElement: function () { return this.$el.children('.textcomplete-item:nth(' + this._index + ')'); }, _setScroll: function () { var $activeEl = this._getActiveElement(); var itemTop = $activeEl.position().top; var itemHeight = $activeEl.outerHeight(); var visibleHeight = this.$el.innerHeight(); var visibleTop = this.$el.scrollTop(); if (this._index === 0 || this._index == this.data.length - 1 || itemTop < 0) { this.$el.scrollTop(itemTop + visibleTop); } else if (itemTop + itemHeight > visibleHeight) { this.$el.scrollTop(itemTop + itemHeight + visibleTop - visibleHeight); } }, _buildContents: function (zippedData) { var datum, i, index; var html = ''; for (i = 0; i < zippedData.length; i++) { if (this.data.length === this.maxCount) break; datum = zippedData[i]; if (include(this.data, datum)) { continue; } index = this.data.length; this.data.push(datum); html += '<li class="textcomplete-item" data-index="' + index + '"><a>'; html += datum.strategy.template(datum.value, datum.term); html += '</a></li>'; } return html; }, _renderHeader: function (unzippedData) { if (this.header) { if (!this._$header) { this._$header = $('<li class="textcomplete-header"></li>').prependTo(this.$el); } var html = $.isFunction(this.header) ? this.header(unzippedData) : this.header; this._$header.html(html); } }, _renderFooter: function (unzippedData) { if (this.footer) { if (!this._$footer) { this._$footer = $('<li class="textcomplete-footer"></li>').appendTo(this.$el); } var html = $.isFunction(this.footer) ? this.footer(unzippedData) : this.footer; this._$footer.html(html); } }, _renderNoResultsMessage: function (unzippedData) { if (this.noResultsMessage) { if (!this._$noResultsMessage) { this._$noResultsMessage = $('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el); } var html = $.isFunction(this.noResultsMessage) ? this.noResultsMessage(unzippedData) : this.noResultsMessage; this._$noResultsMessage.html(html); } }, _renderContents: function (html) { if (this._$footer) { this._$footer.before(html); } else { this.$el.append(html); } }, _fitToBottom: function() { var windowScrollBottom = $window.scrollTop() + $window.height(); var height = this.$el.height(); if ((this.$el.position().top + height) > windowScrollBottom) { // only do this if we are not in an iframe if (!this.completer.$iframe) { this.$el.offset({top: windowScrollBottom - height}); } } }, _fitToRight: function() { // We don't know how wide our content is until the browser positions us, and at that point it clips us // to the document width so we don't know if we would have overrun it. As a heuristic to avoid that clipping // (which makes our elements wrap onto the next line and corrupt the next item), if we're close to the right // edge, move left. We don't know how far to move left, so just keep nudging a bit. var tolerance = this.option.rightEdgeOffset; // pixels. Make wider than vertical scrollbar because we might not be able to use that space. var lastOffset = this.$el.offset().left, offset; var width = this.$el.width(); var maxLeft = $window.width() - tolerance; while (lastOffset + width > maxLeft) { this.$el.offset({left: lastOffset - tolerance}); offset = this.$el.offset().left; if (offset >= lastOffset) { break; } lastOffset = offset; } }, _applyPlacement: function (position) { // If the 'placement' option set to 'top', move the position above the element. if (this.placement.indexOf('top') !== -1) { // Overwrite the position object to set the 'bottom' property instead of the top. position = { top: 'auto', bottom: this.$el.parent().height() - position.top + position.lineHeight, left: position.left }; } else { position.bottom = 'auto'; delete position.lineHeight; } if (this.placement.indexOf('absleft') !== -1) { position.left = 0; } else if (this.placement.indexOf('absright') !== -1) { position.right = 0; position.left = 'auto'; } return position; } }); $.fn.textcomplete.Dropdown = Dropdown; $.extend($.fn.textcomplete, commands); }(jQuery); +function ($) { 'use strict'; // Memoize a search function. var memoize = function (func) { var memo = {}; return function (term, callback) { if (memo[term]) { callback(memo[term]); } else { func.call(this, term, function (data) { memo[term] = (memo[term] || []).concat(data); callback.apply(null, arguments); }); } }; }; function Strategy(options) { $.extend(this, options); if (this.cache) { this.search = memoize(this.search); } } Strategy.parse = function (strategiesArray, params) { return $.map(strategiesArray, function (strategy) { var strategyObj = new Strategy(strategy); strategyObj.el = params.el; strategyObj.$el = params.$el; return strategyObj; }); }; $.extend(Strategy.prototype, { // Public properties // ----------------- // Required match: null, replace: null, search: null, // Optional id: null, cache: false, context: function () { return true; }, index: 2, template: function (obj) { return obj; }, idProperty: null }); $.fn.textcomplete.Strategy = Strategy; }(jQuery); +function ($) { 'use strict'; var now = Date.now || function () { return new Date().getTime(); }; // Returns a function, that, as long as it continues to be invoked, will not // be triggered. The function will be called after it stops being called for // `wait` msec. // // This utility function was originally implemented at Underscore.js. var debounce = function (func, wait) { var timeout, args, context, timestamp, result; var later = function () { var last = now() - timestamp; if (last < wait) { timeout = setTimeout(later, wait - last); } else { timeout = null; result = func.apply(context, args); context = args = null; } }; return function () { context = this; args = arguments; timestamp = now(); if (!timeout) { timeout = setTimeout(later, wait); } return result; }; }; function Adapter () {} $.extend(Adapter.prototype, { // Public properties // ----------------- id: null, // Identity. completer: null, // Completer object which creates it. el: null, // Textarea element. $el: null, // jQuery object of the textarea. option: null, // Public methods // -------------- initialize: function (element, completer, option) { this.el = element; this.$el = $(element); this.id = completer.id + this.constructor.name; this.completer = completer; this.option = option; if (this.option.debounce) { this._onKeyup = debounce(this._onKeyup, this.option.debounce); } this._bindEvents(); }, destroy: function () { this.$el.off('.' + this.id); // Remove all event handlers. this.$el = this.el = this.completer = null; }, // Update the element with the given value and strategy. // // value - The selected object. It is one of the item of the array // which was callbacked from the search function. // strategy - The Strategy associated with the selected value. select: function (/* value, strategy */) { throw new Error('Not implemented'); }, // Returns the caret's relative coordinates from body's left top corner. getCaretPosition: function () { var position = this._getCaretRelativePosition(); var offset = this.$el.offset(); // Calculate the left top corner of `this.option.appendTo` element. var $parent = this.option.appendTo; if ($parent) { if (!($parent instanceof $)) { $parent = $($parent); } var parentOffset = $parent.offsetParent().offset(); offset.top -= parentOffset.top; offset.left -= parentOffset.left; } position.top += offset.top; position.left += offset.left; return position; }, // Focus on the element. focus: function () { this.$el.focus(); }, // Private methods // --------------- _bindEvents: function () { this.$el.on('keyup.' + this.id, $.proxy(this._onKeyup, this)); }, _onKeyup: function (e) { if (this._skipSearch(e)) { return; } this.completer.trigger(this.getTextFromHeadToCaret(), true); }, // Suppress searching if it returns true. _skipSearch: function (clickEvent) { switch (clickEvent.keyCode) { case 9: // TAB case 13: // ENTER case 16: // SHIFT case 17: // CTRL case 18: // ALT case 33: // PAGEUP case 34: // PAGEDOWN case 40: // DOWN case 38: // UP case 27: // ESC return true; } if (clickEvent.ctrlKey) switch (clickEvent.keyCode) { case 78: // Ctrl-N case 80: // Ctrl-P return true; } } }); $.fn.textcomplete.Adapter = Adapter; }(jQuery); +function ($) { 'use strict'; // Textarea adapter // ================ // // Managing a textarea. It doesn't know a Dropdown. function Textarea(element, completer, option) { this.initialize(element, completer, option); } $.extend(Textarea.prototype, $.fn.textcomplete.Adapter.prototype, { // Public methods // -------------- // Update the textarea with the given value and strategy. select: function (value, strategy, e) { var pre = this.getTextFromHeadToCaret(); var post = this.el.value.substring(this.el.selectionEnd); var newSubstr = strategy.replace(value, e); var regExp; if (typeof newSubstr !== 'undefined') { if ($.isArray(newSubstr)) { post = newSubstr[1] + post; newSubstr = newSubstr[0]; } regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match; pre = pre.replace(regExp, newSubstr); this.$el.val(pre + post); this.el.selectionStart = this.el.selectionEnd = pre.length; } }, getTextFromHeadToCaret: function () { return this.el.value.substring(0, this.el.selectionEnd); }, // Private methods // --------------- _getCaretRelativePosition: function () { var p = $.fn.textcomplete.getCaretCoordinates(this.el, this.el.selectionStart); return { top: p.top + this._calculateLineHeight() - this.$el.scrollTop(), left: p.left - this.$el.scrollLeft(), lineHeight: this._calculateLineHeight() }; }, _calculateLineHeight: function () { var lineHeight = parseInt(this.$el.css('line-height'), 10); if (isNaN(lineHeight)) { // http://stackoverflow.com/a/4515470/1297336 var parentNode = this.el.parentNode; var temp = document.createElement(this.el.nodeName); var style = this.el.style; temp.setAttribute( 'style', 'margin:0px;padding:0px;font-family:' + style.fontFamily + ';font-size:' + style.fontSize ); temp.innerHTML = 'test'; parentNode.appendChild(temp); lineHeight = temp.clientHeight; parentNode.removeChild(temp); } return lineHeight; } }); $.fn.textcomplete.Textarea = Textarea; }(jQuery); +function ($) { 'use strict'; var sentinelChar = '吶'; function IETextarea(element, completer, option) { this.initialize(element, completer, option); $('<span>' + sentinelChar + '</span>').css({ position: 'absolute', top: -9999, left: -9999 }).insertBefore(element); } $.extend(IETextarea.prototype, $.fn.textcomplete.Textarea.prototype, { // Public methods // -------------- select: function (value, strategy, e) { var pre = this.getTextFromHeadToCaret(); var post = this.el.value.substring(pre.length); var newSubstr = strategy.replace(value, e); var regExp; if (typeof newSubstr !== 'undefined') { if ($.isArray(newSubstr)) { post = newSubstr[1] + post; newSubstr = newSubstr[0]; } regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match; pre = pre.replace(regExp, newSubstr); this.$el.val(pre + post); this.el.focus(); var range = this.el.createTextRange(); range.collapse(true); range.moveEnd('character', pre.length); range.moveStart('character', pre.length); range.select(); } }, getTextFromHeadToCaret: function () { this.el.focus(); var range = document.selection.createRange(); range.moveStart('character', -this.el.value.length); var arr = range.text.split(sentinelChar) return arr.length === 1 ? arr[0] : arr[1]; } }); $.fn.textcomplete.IETextarea = IETextarea; }(jQuery); // NOTE: TextComplete plugin has contenteditable support but it does not work // fine especially on old IEs. // Any pull requests are REALLY welcome. +function ($) { 'use strict'; // ContentEditable adapter // ======================= // // Adapter for contenteditable elements. function ContentEditable (element, completer, option) { this.initialize(element, completer, option); } $.extend(ContentEditable.prototype, $.fn.textcomplete.Adapter.prototype, { // Public methods // -------------- // Update the content with the given value and strategy. // When an dropdown item is selected, it is executed. select: function (value, strategy, e) { var pre = this.getTextFromHeadToCaret(); // use ownerDocument instead of window to support iframes var sel = this.el.ownerDocument.getSelection(); var range = sel.getRangeAt(0); var selection = range.cloneRange(); selection.selectNodeContents(range.startContainer); var content = selection.toString(); var post = content.substring(range.startOffset); var newSubstr = strategy.replace(value, e); var regExp; if (typeof newSubstr !== 'undefined') { if ($.isArray(newSubstr)) { post = newSubstr[1] + post; newSubstr = newSubstr[0]; } regExp = $.isFunction(strategy.match) ? strategy.match(pre) : strategy.match; pre = pre.replace(regExp, newSubstr) .replace(/ $/, "&nbsp"); // &nbsp necessary at least for CKeditor to not eat spaces range.selectNodeContents(range.startContainer); range.deleteContents(); // create temporary elements var preWrapper = this.el.ownerDocument.createElement("div"); preWrapper.innerHTML = pre; var postWrapper = this.el.ownerDocument.createElement("div"); postWrapper.innerHTML = post; // create the fragment thats inserted var fragment = this.el.ownerDocument.createDocumentFragment(); var childNode; var lastOfPre; while (childNode = preWrapper.firstChild) { lastOfPre = fragment.appendChild(childNode); } while (childNode = postWrapper.firstChild) { fragment.appendChild(childNode); } // insert the fragment & jump behind the last node in "pre" range.insertNode(fragment); range.setStartAfter(lastOfPre); range.collapse(true); sel.removeAllRanges(); sel.addRange(range); } }, // Private methods // --------------- // Returns the caret's relative position from the contenteditable's // left top corner. // // Examples // // this._getCaretRelativePosition() // //=> { top: 18, left: 200, lineHeight: 16 } // // Dropdown's position will be decided using the result. _getCaretRelativePosition: function () { var range = this.el.ownerDocument.getSelection().getRangeAt(0).cloneRange(); var node = this.el.ownerDocument.createElement('span'); range.insertNode(node); range.selectNodeContents(node); range.deleteContents(); var $node = $(node); var position = $node.offset(); position.left -= this.$el.offset().left; position.top += $node.height() - this.$el.offset().top; position.lineHeight = $node.height(); // special positioning logic for iframes // this is typically used for contenteditables such as tinymce or ckeditor if (this.completer.$iframe) { var iframePosition = this.completer.$iframe.offset(); position.top += iframePosition.top; position.left += iframePosition.left; //subtract scrollTop from element in iframe position.top -= this.$el.scrollTop(); } $node.remove(); return position; }, // Returns the string between the first character and the caret. // Completer will be triggered with the result for start autocompleting. // // Example // // // Suppose the html is '<b>hello</b> wor|ld' and | is the caret. // this.getTextFromHeadToCaret() // // => ' wor' // not '<b>hello</b> wor' getTextFromHeadToCaret: function () { var range = this.el.ownerDocument.getSelection().getRangeAt(0); var selection = range.cloneRange(); selection.selectNodeContents(range.startContainer); return selection.toString().substring(0, range.startOffset); } }); $.fn.textcomplete.ContentEditable = ContentEditable; }(jQuery); // NOTE: TextComplete plugin has contenteditable support but it does not work // fine especially on old IEs. // Any pull requests are REALLY welcome. +function ($) { 'use strict'; // CKEditor adapter // ======================= // // Adapter for CKEditor, based on contenteditable elements. function CKEditor (element, completer, option) { this.initialize(element, completer, option); } $.extend(CKEditor.prototype, $.fn.textcomplete.ContentEditable.prototype, { _bindEvents: function () { var $this = this; this.option.ckeditor_instance.on('key', function(event) { var domEvent = event.data; $this._onKeyup(domEvent); if ($this.completer.dropdown.shown && $this._skipSearch(domEvent)) { return false; } }, null, null, 1); // 1 = Priority = Important! // we actually also need the native event, as the CKEditor one is happening to late this.$el.on('keyup.' + this.id, $.proxy(this._onKeyup, this)); }, }); $.fn.textcomplete.CKEditor = CKEditor; }(jQuery); // The MIT License (MIT) // // Copyright (c) 2015 Jonathan Ong me@jongleberry.com // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and // associated documentation files (the "Software"), to deal in the Software without restriction, // including without limitation the rights to use, copy, modify, merge, publish, distribute, // sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all copies or // substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT // NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // // https://github.com/component/textarea-caret-position (function ($) { // The properties that we copy into a mirrored div. // Note that some browsers, such as Firefox, // do not concatenate properties, i.e. padding-top, bottom etc. -> padding, // so we have to do every single property specifically. var properties = [ 'direction', // RTL support 'boxSizing', 'width', // on Chrome and IE, exclude the scrollbar, so the mirror div wraps exactly as the textarea does 'height', 'overflowX', 'overflowY', // copy the scrollbar for IE 'borderTopWidth', 'borderRightWidth', 'borderBottomWidth', 'borderLeftWidth', 'borderStyle', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', // https://developer.mozilla.org/en-US/docs/Web/CSS/font 'fontStyle', 'fontVariant', 'fontWeight', 'fontStretch', 'fontSize', 'fontSizeAdjust', 'lineHeight', 'fontFamily', 'textAlign', 'textTransform', 'textIndent', 'textDecoration', // might not make a difference, but better be safe 'letterSpacing', 'wordSpacing', 'tabSize', 'MozTabSize' ]; var isBrowser = (typeof window !== 'undefined'); var isFirefox = (isBrowser && window.mozInnerScreenX != null); function getCaretCoordinates(element, position, options) { if(!isBrowser) { throw new Error('textarea-caret-position#getCaretCoordinates should only be called in a browser'); } var debug = options && options.debug || false; if (debug) { var el = document.querySelector('#input-textarea-caret-position-mirror-div'); if ( el ) { el.parentNode.removeChild(el); } } // mirrored div var div = document.createElement('div'); div.id = 'input-textarea-caret-position-mirror-div'; document.body.appendChild(div); var style = div.style; var computed = window.getComputedStyle? getComputedStyle(element) : element.currentStyle; // currentStyle for IE < 9 // default textarea styles style.whiteSpace = 'pre-wrap'; if (element.nodeName !== 'INPUT') style.wordWrap = 'break-word'; // only for textarea-s // position off-screen style.position = 'absolute'; // required to return coordinates properly if (!debug) style.visibility = 'hidden'; // not 'display: none' because we want rendering // transfer the element's properties to the div properties.forEach(function (prop) { style[prop] = computed[prop]; }); if (isFirefox) { // Firefox lies about the overflow property for textareas: https://bugzilla.mozilla.org/show_bug.cgi?id=984275 if (element.scrollHeight > parseInt(computed.height)) style.overflowY = 'scroll'; } else { style.overflow = 'hidden'; // for Chrome to not render a scrollbar; IE keeps overflowY = 'scroll' } div.textContent = element.value.substring(0, position); // the second special handling for input type="text" vs textarea: spaces need to be replaced with non-breaking spaces - http://stackoverflow.com/a/13402035/1269037 if (element.nodeName === 'INPUT') div.textContent = div.textContent.replace(/\s/g, '\u00a0'); var span = document.createElement('span'); // Wrapping must be replicated *exactly*, including when a long word gets // onto the next line, with whitespace at the end of the line before (#7). // The *only* reliable way to do that is to copy the *entire* rest of the // textarea's content into the <span> created at the caret position. // for inputs, just '.' would be enough, but why bother? span.textContent = element.value.substring(position) || '.'; // || because a completely empty faux span doesn't render at all div.appendChild(span); var coordinates = { top: span.offsetTop + parseInt(computed['borderTopWidth']), left: span.offsetLeft + parseInt(computed['borderLeftWidth']) }; if (debug) { span.style.backgroundColor = '#aaa'; } else { document.body.removeChild(div); } return coordinates; } $.fn.textcomplete.getCaretCoordinates = getCaretCoordinates; }(jQuery)); return jQuery; }));
wout/cdnjs
ajax/libs/jquery.textcomplete/1.8.2/jquery.textcomplete.js
JavaScript
mit
47,506
/* * Copyright 2006 Sony Computer Entertainment Inc. * * Licensed under the MIT Open Source License, for details please see license.txt or the website * http://www.opensource.org/licenses/mit-license.php * */ #include <dae.h> #include <dae/daeDom.h> #include <dom/domExtra.h> #include <dae/daeMetaCMPolicy.h> #include <dae/daeMetaSequence.h> #include <dae/daeMetaChoice.h> #include <dae/daeMetaGroup.h> #include <dae/daeMetaAny.h> #include <dae/daeMetaElementAttribute.h> daeElementRef domExtra::create(DAE& dae) { domExtraRef ref = new domExtra(dae); return ref; } daeMetaElement * domExtra::registerElement(DAE& dae) { daeMetaElement* meta = dae.getMeta(ID()); if ( meta != NULL ) return meta; meta = new daeMetaElement(dae); dae.setMeta(ID(), *meta); meta->setName( "extra" ); meta->registerClass(domExtra::create); daeMetaCMPolicy *cm = NULL; daeMetaElementAttribute *mea = NULL; cm = new daeMetaSequence( meta, cm, 0, 1, 1 ); mea = new daeMetaElementAttribute( meta, cm, 0, 0, 1 ); mea->setName( "asset" ); mea->setOffset( daeOffsetOf(domExtra,elemAsset) ); mea->setElementType( domAsset::registerElement(dae) ); cm->appendChild( mea ); mea = new daeMetaElementArrayAttribute( meta, cm, 1, 1, -1 ); mea->setName( "technique" ); mea->setOffset( daeOffsetOf(domExtra,elemTechnique_array) ); mea->setElementType( domTechnique::registerElement(dae) ); cm->appendChild( mea ); cm->setMaxOrdinal( 1 ); meta->setCMRoot( cm ); // Add attribute: id { daeMetaAttribute *ma = new daeMetaAttribute; ma->setName( "id" ); ma->setType( dae.getAtomicTypes().get("xsID")); ma->setOffset( daeOffsetOf( domExtra , attrId )); ma->setContainer( meta ); meta->appendAttribute(ma); } // Add attribute: name { daeMetaAttribute *ma = new daeMetaAttribute; ma->setName( "name" ); ma->setType( dae.getAtomicTypes().get("xsNCName")); ma->setOffset( daeOffsetOf( domExtra , attrName )); ma->setContainer( meta ); meta->appendAttribute(ma); } // Add attribute: type { daeMetaAttribute *ma = new daeMetaAttribute; ma->setName( "type" ); ma->setType( dae.getAtomicTypes().get("xsNMTOKEN")); ma->setOffset( daeOffsetOf( domExtra , attrType )); ma->setContainer( meta ); meta->appendAttribute(ma); } meta->setElementSize(sizeof(domExtra)); meta->validate(); return meta; }
cubieboard/openbox_external_collada
src/1.4/dom/domExtra.cpp
C++
mit
2,344
<!-- //********************************************************* // // Copyright (c) Microsoft. All rights reserved. // This code is licensed under the MIT License (MIT). // THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF // ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY // IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR // PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT. // //********************************************************* --> <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script src="/js/scenario5_Certificates.js"></script> </head> <body> <div data-win-control="SdkSample.ScenarioInput"> <p> Prior to executing this scenario, execute .\Server\SetupServer.ps1 in an elevated PowerShell commandline to install and configure IIS. The script will generate a self-signed, <i>untrusted</i> certificate with SN=www.fabrikam.com.<br /> </p> <p> The sample will attempt to connect to https://localhost, evaluate the certificate validity and display its properties. A certificate error is expected since the self-signed certificate is not trusted and issued to a different name. <b>We strongly advise against ignoring SSL errors in your applications.</b><br /> </p> <p> <label for="hostNameConnect">Host Name:</label> <input id="hostNameConnect" type="text" value="localhost" /> </p> <p> <label for="serviceNameConnect">Service Name:</label> <input id="serviceNameConnect" type="text" value="443" disabled /> </p> <p> <button id="buttonConnectSocket">Connect</button> </p> </div> <div data-win-control="SdkSample.ScenarioOutput"> <p id="statusBox"></p> <p id="outputBox"></p> </div> </body> </html>
peterpy8/Windows-universal-samples
streamsocket/js/html/scenario5_Certificates.html
HTML
mit
1,872
import { Application } from 'spectron'; import electronPath from 'electron'; import path from 'path'; jasmine.DEFAULT_TIMEOUT_INTERVAL = 15000; const delay = time => new Promise(resolve => setTimeout(resolve, time)); describe('main window', function spec() { beforeAll(async () => { this.app = new Application({ path: electronPath, args: [path.join(__dirname, '..', '..', 'app')], }); return this.app.start(); }); afterAll(() => { if (this.app && this.app.isRunning()) { return this.app.stop(); } }); const findCounter = () => this.app.client.element('[data-tid="counter"]'); const findButtons = async () => { const { value } = await this.app.client.elements('[data-tclass="btn"]'); return value.map(btn => btn.ELEMENT); }; it('should open window', async () => { const { client, browserWindow } = this.app; await client.waitUntilWindowLoaded(); await delay(500); const title = await browserWindow.getTitle(); expect(title).toBe('Hello Electron React!'); }); it('should haven\'t any logs in console of main window', async () => { const { client } = this.app; const logs = await client.getRenderProcessLogs(); // Print renderer process logs logs.forEach(log => { console.log(log.message); console.log(log.source); console.log(log.level); }); expect(logs).toHaveLength(0); }); it('should to Counter with click "to Counter" link', async () => { const { client } = this.app; await client.click('[data-tid=container] > a'); expect(await findCounter().getText()).toBe('0'); }); it('should display updated count after increment button click', async () => { const { client } = this.app; const buttons = await findButtons(); await client.elementIdClick(buttons[0]); // + expect(await findCounter().getText()).toBe('1'); }); it('should display updated count after descrement button click', async () => { const { client } = this.app; const buttons = await findButtons(); await client.elementIdClick(buttons[1]); // - expect(await findCounter().getText()).toBe('0'); }); it('shouldnt change if even and if odd button clicked', async () => { const { client } = this.app; const buttons = await findButtons(); await client.elementIdClick(buttons[2]); // odd expect(await findCounter().getText()).toBe('0'); }); it('should change if odd and if odd button clicked', async () => { const { client } = this.app; const buttons = await findButtons(); await client.elementIdClick(buttons[0]); // + await client.elementIdClick(buttons[2]); // odd expect(await findCounter().getText()).toBe('2'); }); it('should change if async button clicked and a second later', async () => { const { client } = this.app; const buttons = await findButtons(); await client.elementIdClick(buttons[3]); // async expect(await findCounter().getText()).toBe('2'); await delay(1500); expect(await findCounter().getText()).toBe('3'); }); it('should back to home if back button clicked', async () => { const { client } = this.app; await client.element( '[data-tid="backButton"] > a' ).click(); expect( await client.isExisting('[data-tid="container"]') ).toBe(true); }); });
DenQ/electron-react-lex
test/e2e/e2e.spec.js
JavaScript
mit
3,348
#!/usr/bin/env python """ csvcut is originally the work of eminent hackers Joe Germuska and Aaron Bycoffe. This code is forked from: https://gist.github.com/561347/9846ebf8d0a69b06681da9255ffe3d3f59ec2c97 Used and modified with permission. """ import itertools from csvkit import CSVKitReader, CSVKitWriter from csvkit.cli import CSVKitUtility, parse_column_identifiers from csvkit.headers import make_default_headers class CSVCut(CSVKitUtility): description = 'Filter and truncate CSV files. Like unix "cut" command, but for tabular data.' def add_arguments(self): self.argparser.add_argument('-n', '--names', dest='names_only', action='store_true', help='Display column names and indices from the input CSV and exit.') self.argparser.add_argument('-c', '--columns', dest='columns', help='A comma separated list of column indices or names to be extracted. Defaults to all columns.') self.argparser.add_argument('-C', '--not-columns', dest='not_columns', help='A comma separated list of column indices or names to be excluded. Defaults to no columns.') self.argparser.add_argument('-x', '--delete-empty-rows', dest='delete_empty', action='store_true', help='After cutting, delete rows which are completely empty.') def main(self): if self.args.names_only: self.print_column_names() return rows = CSVKitReader(self.input_file, **self.reader_kwargs) if self.args.no_header_row: row = next(rows) column_names = make_default_headers(len(row)) # Put the row back on top rows = itertools.chain([row], rows) else: column_names = next(rows) column_ids = parse_column_identifiers(self.args.columns, column_names, self.args.zero_based, self.args.not_columns) output = CSVKitWriter(self.output_file, **self.writer_kwargs) output.writerow([column_names[c] for c in column_ids]) for row in rows: out_row = [row[c] if c < len(row) else None for c in column_ids] if self.args.delete_empty: if ''.join(out_row) == '': continue output.writerow(out_row) def launch_new_instance(): utility = CSVCut() utility.main() if __name__ == "__main__": launch_new_instance()
matterker/csvkit
csvkit/utilities/csvcut.py
Python
mit
2,390
<?xml version="1.0" encoding="ascii"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>test_pyclasslookup</title> <link rel="stylesheet" href="epydoc.css" type="text/css" /> <script type="text/javascript" src="epydoc.js"></script> </head> <body bgcolor="white" text="black" link="blue" vlink="#204080" alink="#204080"> <h1 class="toc">Module test_pyclasslookup</h1> <hr /> <h2 class="toc">Classes</h2> <a target="mainFrame" href="lxml.tests.test_pyclasslookup.PyClassLookupTestCase-class.html" >PyClassLookupTestCase</a><br /> <h2 class="toc">Functions</h2> <a target="mainFrame" href="lxml.tests.test_pyclasslookup-module.html#test_suite" >test_suite</a><br /> <h2 class="toc">Variables</h2> <a target="mainFrame" href="lxml.tests.test_pyclasslookup-module.html#__package__" >__package__</a><br /> <a target="mainFrame" href="lxml.tests.test_pyclasslookup-module.html#this_dir" >this_dir</a><br /> <a target="mainFrame" href="lxml.tests.test_pyclasslookup-module.html#xml_str" >xml_str</a><br /><hr /> <span class="options">[<a href="javascript:void(0);" class="privatelink" onclick="toggle_private();">hide&nbsp;private</a>]</span> <script type="text/javascript"> <!-- // Private objects are initially displayed (because if // javascript is turned off then we want them to be // visible); but by default, we want to hide them. So hide // them unless we have a cookie that says to show them. checkCookie(); // --> </script> </body> </html>
bertucho/epic-movie-quotes-quiz
dialogos/build/lxml/doc/html/api/toc-lxml.tests.test_pyclasslookup-module.html
HTML
mit
1,659
/*! * OOjs UI v0.22.3 * https://www.mediawiki.org/wiki/OOjs_UI * * Copyright 2011–2017 OOjs UI Team and other contributors. * Released under the MIT license * http://oojs.mit-license.org * * Date: 2017-07-11T22:12:41Z */.oo-ui-icon-alert{background-image:url(themes/wikimediaui/images/icons/alert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert.png)}.oo-ui-image-warning.oo-ui-icon-alert{background-image:url(themes/wikimediaui/images/icons/alert-warning.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-warning.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-warning.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-warning.png)}.oo-ui-image-invert.oo-ui-icon-alert{background-image:url(themes/wikimediaui/images/icons/alert-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-invert.png)}.oo-ui-image-progressive.oo-ui-icon-alert{background-image:url(themes/wikimediaui/images/icons/alert-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/alert-progressive.png)}.oo-ui-icon-bell{background-image:url(themes/wikimediaui/images/icons/bell.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell.png)}.oo-ui-image-invert.oo-ui-icon-bell{background-image:url(themes/wikimediaui/images/icons/bell-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-invert.png)}.oo-ui-image-progressive.oo-ui-icon-bell{background-image:url(themes/wikimediaui/images/icons/bell-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bell-progressive.png)}.oo-ui-icon-bellOn{background-image:url(themes/wikimediaui/images/icons/bellOn-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl.png)}.oo-ui-image-invert.oo-ui-icon-bellOn{background-image:url(themes/wikimediaui/images/icons/bellOn-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-bellOn{background-image:url(themes/wikimediaui/images/icons/bellOn-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/bellOn-rtl-progressive.png)}.oo-ui-icon-comment{background-image:url(themes/wikimediaui/images/icons/comment.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment.png)}.oo-ui-image-invert.oo-ui-icon-comment{background-image:url(themes/wikimediaui/images/icons/comment-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-invert.png)}.oo-ui-image-progressive.oo-ui-icon-comment{background-image:url(themes/wikimediaui/images/icons/comment-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/comment-progressive.png)}.oo-ui-icon-eye{background-image:url(themes/wikimediaui/images/icons/eye.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye.png)}.oo-ui-image-invert.oo-ui-icon-eye{background-image:url(themes/wikimediaui/images/icons/eye-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-invert.png)}.oo-ui-image-progressive.oo-ui-icon-eye{background-image:url(themes/wikimediaui/images/icons/eye-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eye-progressive.png)}.oo-ui-icon-eyeClosed{background-image:url(themes/wikimediaui/images/icons/eyeClosed.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed.png)}.oo-ui-image-invert.oo-ui-icon-eyeClosed{background-image:url(themes/wikimediaui/images/icons/eyeClosed-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-invert.png)}.oo-ui-image-progressive.oo-ui-icon-eyeClosed{background-image:url(themes/wikimediaui/images/icons/eyeClosed-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/eyeClosed-progressive.png)}.oo-ui-icon-message{background-image:url(themes/wikimediaui/images/icons/message-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl.png)}.oo-ui-image-invert.oo-ui-icon-message{background-image:url(themes/wikimediaui/images/icons/message-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-message{background-image:url(themes/wikimediaui/images/icons/message-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/message-rtl-progressive.png)}.oo-ui-icon-notice{background-image:url(themes/wikimediaui/images/icons/notice.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice.png)}.oo-ui-image-invert.oo-ui-icon-notice{background-image:url(themes/wikimediaui/images/icons/notice-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-invert.png)}.oo-ui-image-progressive.oo-ui-icon-notice{background-image:url(themes/wikimediaui/images/icons/notice-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/notice-progressive.png)}.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl.png)}.oo-ui-image-invert.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-signature{background-image:url(themes/wikimediaui/images/icons/signature-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/signature-rtl-progressive.png)}.oo-ui-icon-speechBubble{background-image:url(themes/wikimediaui/images/icons/speechBubble-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl.png)}.oo-ui-image-invert.oo-ui-icon-speechBubble{background-image:url(themes/wikimediaui/images/icons/speechBubble-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-speechBubble{background-image:url(themes/wikimediaui/images/icons/speechBubble-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubble-rtl-progressive.png)}.oo-ui-icon-speechBubbleAdd{background-image:url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl.png)}.oo-ui-image-invert.oo-ui-icon-speechBubbleAdd{background-image:url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-speechBubbleAdd{background-image:url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbleAdd-rtl-progressive.png)}.oo-ui-icon-speechBubbles{background-image:url(themes/wikimediaui/images/icons/speechBubbles-rtl.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl.png)}.oo-ui-image-invert.oo-ui-icon-speechBubbles{background-image:url(themes/wikimediaui/images/icons/speechBubbles-rtl-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-invert.png)}.oo-ui-image-progressive.oo-ui-icon-speechBubbles{background-image:url(themes/wikimediaui/images/icons/speechBubbles-rtl-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/speechBubbles-rtl-progressive.png)}.oo-ui-icon-tray{background-image:url(themes/wikimediaui/images/icons/tray.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray.png)}.oo-ui-image-invert.oo-ui-icon-tray{background-image:url(themes/wikimediaui/images/icons/tray-invert.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-invert.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-invert.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-invert.png)}.oo-ui-image-progressive.oo-ui-icon-tray{background-image:url(themes/wikimediaui/images/icons/tray-progressive.png);background-image:-webkit-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-progressive.svg);background-image:linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-progressive.svg);background-image:-o-linear-gradient(transparent,transparent),url(themes/wikimediaui/images/icons/tray-progressive.png)}
tholu/cdnjs
ajax/libs/oojs-ui/0.22.3/oojs-ui-wikimediaui-icons-alerts.rtl.min.css
CSS
mit
18,963
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. using Microsoft.AspNet.Mvc; using Microsoft.Data.Entity; using PartsUnlimited.Models; using System.Linq; using System.Threading.Tasks; namespace PartsUnlimited.Areas.Admin.Controllers { public class CustomerController : AdminController { private readonly IPartsUnlimitedContext _context; public CustomerController(IPartsUnlimitedContext context) { _context = context; } public async Task<IActionResult> Index(string id) { if (string.IsNullOrEmpty(id)) { return Redirect(nameof(Find)); } var user = await _context.Users.SingleOrDefaultAsync(u => u.Id == id); if (user == null) { return Redirect(nameof(Find)); } return View(user); } public async Task<IActionResult> Find(string username, string email, string phoneNumber) { IQueryable<ApplicationUser> query = _context.Users; if (!string.IsNullOrWhiteSpace(username)) { query = query.Where(u => u.UserName == username); } if (!string.IsNullOrWhiteSpace(email)) { query = query.Where(u => u.Email == email); } if (!string.IsNullOrWhiteSpace(phoneNumber)) { query = query.Where(u => u.PhoneNumber == phoneNumber); } // We only want cases where there is one instance. SingleOrDefault will throw an exception // when there is more than one, so we take two and only use the result if it was the only one var result = await query.Take(2).ToListAsync(); if (result.Count == 1) { return RedirectToAction(nameof(Index), new { id = result[0].Id }); } return View(); } } }
XpiritBV/PartsUnlimited
src/PartsUnlimitedWebsite/Areas/Admin/Controllers/CustomerController.cs
C#
mit
2,079