Skip to content

Instantly share code, notes, and snippets.

@rdricco
Last active February 19, 2021 16:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rdricco/cbfe1ff2198cc8e490927caab15f2f97 to your computer and use it in GitHub Desktop.
Save rdricco/cbfe1ff2198cc8e490927caab15f2f97 to your computer and use it in GitHub Desktop.
Fascar
window.onload = function() {
$("#cart-link-coupon-add").click();
$("#vtexIdUI-auth-selector button").click(function() {
setTimeout(() => {
$("#dark").remove();
$("#boxLight").remove();
}, 500);
});
$("#print-bank-invoice").click(function() {
$("#dark").remove();
$("#boxLight").remove();
});
$(".checkout-container .cart-template.full-cart > .cart-links.cart-links-bottom").clone().insertAfter("body > div.container.container-main.container-cart > div.checkout-container.row-fluid.cart-active > div.cart-template.full-cart.span12.active > .cart-template-holder");
setInterval(function() {
$("#ship-number").attr({ "data-parsley-maxlength": 10, maxlength: 10 }),
$("#ship-more-info").attr({
"data-parsley-maxlength": 20,
maxlength: 20
});
}, 500);
$(".container-cart .cart-template.full-cart").prepend(
'<p class="entrega-info"><strong>Compre com <span style="background-color: black;color: #ffe5ac;padding: 0px 10px;">Frete Grátis!*</span> </strong> <br>Sul, Sudeste, Centro-Oeste, BA e PE;<br>Demais Localidades acima de R$ 400,00.<br><small>*Exceto para meias, conservação e pulseiras.</small><br><br><small><strong style="color: maroon;">Importante: Devido os protocolos de segurança ligados ao Covid- 19, o prazo de entrega poderá sofrer alteração e ser estendido sem aviso prévio</small></strong></p>'
);
setTimeout(function() {
$(".payment-discounts-alert-wrap").remove(),
$(".gift-card-section:not(.only-gift-card):nth-child(2)").click();
}, 500);
$("a#remove-gift-card").click(function() {
setTimeout(() => {
$("#show-gift-card-group").click();
}, 500);
});
function voucherVtex() {
$("#show-gift-card-group").click();
$("#gift-card-provider-selector")
.val("VtexGiftCard")
.change();
// .hide()
$("#gift-card-provider-selector option:contains('fascarclub')").hide();
$("#payment-data .payment-discounts-options.text label").text("Voucher");
$("#show-gift-card-group").text("Voucher");
$("a#remove-gift-card").click(function() {
setTimeout(() => {
$("#show-gift-card-group").click();
}, 500);
});
}
function observeElement(el) {
var target = document.querySelector(el);
var observer = new MutationObserver(function(mutations) {
console.log("mutação detectada");
voucherVtex();
});
var configObserver = {
attributes: true,
childList: true,
characterData: true
};
observer.observe(target, configObserver);
}
observeElement("#payment-data");
$("#show-gift-card-group").text("Voucher");
function checkCPF() {
if (
$("#client-document").attr("value") === undefined ||
$("#client-document").attr("value").length == 0
) {
console.log("CPF Vazio");
} else {
console.log("CPF Preenchido");
$("#client-document")
.attr("disabled", true)
.attr("readonly", true);
}
}
function observeAccountElement(el) {
var targetElement = document.querySelector(el);
var observerAccount = new MutationObserver(function(mutations) {
checkCPF();
console.log("mutation detected");
});
var configObserver = {
attributes: true,
childList: true,
characterData: true
};
observerAccount.observe(targetElement, configObserver);
}
observeAccountElement(".box-info");
vtexjs.checkout.getOrderForm().done(function(orderForm) {
function promokit01() {
const kit_01 =
"<div id='sugestao-compra'><div class='kit-image'><img src='http://fascar.vteximg.com.br/arquivos/ids/390829-250-250/REV00_505_VTEX_KIT01_1000x1000px.png' alt-text='kit 1'/></div><div class='kit-content'><h4>LEVE TAMBÉM!</h4><span>01 Creme Hidratante para Sapato de Couro (incolor) + 01 Calçadeira de R$ 45,00 por R$ 30,00. Aproveite!</span></div> <div class='kit-comprar'> <span>?</span> <button onclick='#'>INCLUIR</button></div></div><a href='/' class='voltar'>Escolher mais produtos</a>";
$(kit_01).insertAfter("table.cart-items");
$(".kit-comprar button").on("click", function() {
vtexjs.checkout.addToCart([{ id: 4349967, quantity: 1, seller: "1" }]);
console.log("DESATIVAR BOTAO");
$("#sugestao-compra").remove();
});
}
function promokit02() {
const kit_02 =
'<div id="sugestao-compra"><div class="kit-image"><img src="https://fascar.vteximg.com.br/arquivos/ids/390830-250-250/REV00_505_VTEX_KIT02_1000x1000px.png" alt-text="kit 2"/></div><div class="kit-content"><h4>LEVE TAMBÉM!</h4><span>02 Pares de Meias Sociais (café e preta) de R$ 44,00 (141156) por R$ 33,00. Aproveite!</span></div><div class="kit-comprar"><span>?</span><button onclick="buyKit02()">INCLUIR</button></div></div><a href="/" class="voltar">Escolher mais produtos</a>';
$(kit_02).insertAfter("table.cart-items");
$(".kit-comprar button").on("click", function() {
vtexjs.checkout.addToCart([{ id: 4349968, quantity: 1, seller: "1" }]);
console.log("DESATIVAR BOTAO");
$("#sugestao-compra").remove();
});
}
function promokit03() {
const kit_03 =
'<div id="sugestao-compra"><div class="kit-image"><img src="https://fascar.vteximg.com.br/arquivos/ids/390831-250-250/REV00_505_VTEX_KIT03_1000x1000px.png" alt-text="kit 3"/></div><div class="kit-content"><h4>LEVE TAMBÉM!</h4><span>02 Pares de Meias Sociais (preta e azul marinho) de R$ 44,00 por R$ 33,00. Aproveite!</span></div><div class="kit-comprar"><span>?</span><button onclick="buyKit03()">INCLUIR</button></div></div><a class="voltar" href="/">Escolher mais produtos</a>';
$(kit_03).insertAfter("table.cart-items");
$(".kit-comprar button").on("click", function() {
vtexjs.checkout.addToCart([{ id: 4349969, quantity: 1, seller: "1" }]);
console.log("DESATIVAR BOTAO");
$("#sugestao-compra").remove();
});
}
var regra1 = "Social";
var regra2 = "Casual";
var regra3 = "Alto Conforto";
var regra4 = "Lazer";
var regra5 = "Linhas Especiais";
let estadoPromo = "Inválido";
function checagemPromoKit(regra) {
var itemsCarrinho = orderForm.items;
$.each(itemsCarrinho, function(value, key) {
var categoriasProduto = key.productCategories;
$.each(categoriasProduto, function(value, key) {
let promoverifica = key;
if (promoverifica === regra) {
// console.log(promoverifica);
// console.log("Válido");
estadoPromo = "Válido";
}
});
});
}
checagemPromoKit(regra1);
checagemPromoKit(regra2);
checagemPromoKit(regra3);
checagemPromoKit(regra4);
checagemPromoKit(regra5);
console.log(estadoPromo);
if (estadoPromo === "Válido") {
if (".product-name a:contains(Calçadeira)".length > 0) {
promokit01();
} else {
if (".product-name a:contains(Meia):contains(Marrom)".length > 0) {
promokit02();
} else {
promokit03();
}
}
}
if ($('td.product-name:contains("Kit")').length > 0) {
$("#sugestao-compra").hide();
}
});
};
div#cartLoadedDiv {
width: 60%;
}
.container .checkout-container .cart-template .summary-template-holder {
margin-top: 20px;
width: 30%;
float: right;
background-color: #f2f2f2;
padding: 15px;
border: 0.5px solid darkgray;
margin-left: auto;
margin-right: 18px;
}
.container .checkout-container .cart-template .cart-links {
padding: 15px;
}
table.cart-items td.product-name a {
font-weight: 500;
color: #333;
line-height: 18px !important;
text-transform: uppercase;
min-height: 60px;
}
.coupon-form .coupon-fieldset p a {
background: lightgray;
background: black;
color: white !important;
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
margin-left: auto;
margin-right: 0;
padding-right: 0;
}
.cart-items .product-name {
width: auto;
max-width: 200px;
}
footer#footer {
padding: 50px 10% !important;
}
.container .checkout-container .cart-template .cart-links .btn-place-order-wrapper {
padding: 0;
margin: 0;
max-width: 100%;
width: 100%;
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
padding: 10px 0px;
}
.container .checkout-container .cart-template .cart-links .btn-place-order-wrapper {
padding: 0px 20px;
background-color: transparent;
margin: 0;
padding: 0 20px 0 0;
float: none;
}
#payment-data .gift-card-provider-options>label {
visibility: hidden;
}
#payment-data #btn-add-gift-card {
margin-top: 10px;
}
#payment-data .payment-discounts-options label:before {
content: "Insira o código";
text-transform: initial;
color: black !important;
}
#payment-data .payment-discounts-options label {
color: transparent !important;
}
.entrega-warning {
background-color: white;
font-weight: 600;
border-top: 1px solid;
padding: 20px;
border-bottom: 1px solid;
margin: 0;
}
span.brand-name, #payment-data .link-gift-card, #payment-data #gift-card-provider-selector, #payment-data #show-gift-card-group, #cart-choose-more-products, .payment-discounts-alert-wrap, .gift-card-section:not(.only-gift-card):nth-child(1), .vtex-profile-form__toggle-business-btn__wrapper, .fieldset.payment-discounts, .gift-card-multiple-providers, .gift-card-section.form-step.box-default, p#go-to-cart-button, .gift-card-multiple-providers, .gift-card-section.form-step.box-default {
display: none !important;
}
#payment-data .link-gift-card, #payment-data #show-gift-card-group, .gift-card-multiple-providers, .gift-card-section.form-step.box-default {
display: block !important;
}
@media screen and (max-width: 1180px) {
body>div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div:nth-child(3) {
display: none !important;
}
.cart-template.full-cart.span12.active {
display: flex !important;
flex-direction: column !important;
}
div#cartLoadedDiv {
width: 100%;
}
.container .checkout-container .cart-template .summary-template-holder {
width: 100%;
/* max-width: 320px; */
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
width: 100%;
max-width: 390px;
}
}
@media screen and (max-width: 768px) {
a#show-gift-card-group {
margin: 12px 10px;
}
#payment-data .payment-discounts-options label:before {
content: "";
}
header .logo-checkout {
margin-left: 10px;
}
.cart {
/* max-width: 320px !important; */
margin-left: auto;
margin-right: auto;
}
div#cartLoadedDiv {
display: flex;
}
.summary-template-holder {
margin-right: auto;
justify-content: center;
display: flex;
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
max-width: 100%;
width: 100% !important;
}
.container .checkout-container .cart-template .summary-template-holder {
max-width: 90%;
}
#cartLoadedDiv>div.cart>table>tbody {
display: flex;
flex-direction: row !important;
flex-wrap: wrap;
width: auto;
}
#cartLoadedDiv>div.cart>table>tbody {
display: flex;
justify-content: center;
}
}
@media screen and (max-width: 490px) {
.full-cart .cart table tbody {
display: flex;
}
.cart {
max-width: 100%x !important;
/* max-width: 320px !important; */
}
}
@media (min-width: 1024px) {
.gift-card-multiple-providers, .gift-card-section.form-step.box-default {
/* display: none !important; */
}
}
a#show-gift-card-group {
margin-left: auto;
text-align: start;
padding: 6px 10px;
margin-right: 20px;
}
a#show-gift-card-group {
color: #666;
}
p.link.link-gift-card {
left: 0px;
margin-top: 0px;
position: absolute;
border: 2px solid #f4f4f4;
border-right: none;
opacity: 0.7;
width: 100%;
border-radius: 5px 0 0 5px;
-moz-border-radius: 5px 0 0 5px;
-webkit-border-radius: 5px 0 0 5px;
-webkit-transition: all 0.2s ease-in-out;
-moz-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.cart-fixed.cart-fixed-transition.affix-top {
width: 100%;
}
#show-gift-card-group {
color: black !important;
}
.container .checkout-container .cart-template .summary-template-holder {
float: initial;
padding: 0;
max-width: 100%;
}
.cart-fixed.cart-fixed-transition.affix {
margin-bottom: 20px;
}
.checkout-container.row-fluid.orderform-active {
padding-bottom: 20px;
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
width: 30%;
margin-right: 18px;
}
body>div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div {
border: 1px solid dimgray;
}
/* CUSTOM */
@media (min-width: 1180px) {
.container .checkout-container .cart-template .cart-template-holder .cart {
width: 110% !important;
}
}
.clearfix.pull-right.cart-links.cart-links-bottom.hide {
background: none !important;
border: none !important;
}
thead {
background-color: gray;
color: white;
}
table.cart-items thead th {
color: white;
padding: 3px;
}
table.cart-items thead th.product {
padding-left: 20px;
}
.cart-items span.shipping-estimate-date, th.shipping-date {
color: transparent !important;
}
td.shipping-date.empty {
color: transparent !important;
cursor: default;
}
span.new-product-price {
font-weight: 600;
}
.container .checkout-container .cart-template .summary-template-holder {
background: none;
border: none;
float: right;
}
table.cart-items tbody tr {
border-right: 1px dotted #ccc;
}
body>div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.forms.coupon-column.summary-coupon-wrap.span7.pull-left>div>form>fieldset>div {
padding: 10px 15px;
}
p.coupon-data.pull-right {
width: 90%;
float: none;
margin: auto;
margin-top: 10px;
}
.product-image {
width: auto;
max-width: 90px;
}
.mini-cart .summary-cart-template-holder, .cart-fixed .payment-confirmation-wrap {
border-left: 0px solid #999!important;
border-right: 0px solid #999!important;
border-bottom: 0px solid #999!important;
border-top: 0px solid #999!important;
}
body>div.container.container-main.container-order-form>div.checkout-container.row-fluid.orderform-active>div.row-fluid.orderform-template.span12.active>div.cart-template.mini-cart.span4>div {
border: 1px solid;
display: flex;
flex-direction: column;
}
body>div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tbody.totalizers-list>tr.Items>td.info, tbody.totalizers-list span {
color: black;
font-weight: 700;
}
tbody.totalizers-list span {
margin: 10px 0px;
}
.container .checkout-container .cart-template .summary-template-holder .summary .totalizers .accordion-group .accordion-body .accordion-inner .table tr td.monetary {
text-align: right;
font-weight: 700;
font-size: 14px;
}
.container .checkout-container .cart-template .summary-template-holder .summary .totalizers .accordion-group .accordion-body .accordion-inner .table tfoot tr td.info {
font-size: 15px;
}
a.btn.btn-mini.btn-default.dropdown-toggle.shipping-sla-button {
background: white;
box-shadow: none;
border-radius: 0;
padding: 5px 10px;
border: 1px solid gray;
transition: .5s;
color: gray;
}
a.btn.btn-mini.btn-default.dropdown-toggle.shipping-sla-button:hover {
background: white;
box-shadow: none;
border: 1px solid #E38E26;
color: black;
}
div#sugestao-compra {
display: flex;
flex-direction: row;
/* width: 60%; */
margin-top: 30px;
background-color: gray;
color: white;
border: 1px solid lightgray;
}
div#sugestao-compra img {
max-width: 150px;
}
div#sugestao-compra .kit-content {
width: -webkit-fill-available;
color: white;
padding: 10px 20px;
}
div#sugestao-compra .kit-content h4 {
color: white;
}
div#sugestao-compra .kit-comprar {
display: flex;
flex-direction: column;
align-items: flex-end;
margin-right: 20px;
margin-top: 20px;
}
div#sugestao-compra .kit-comprar button {
background: #E38E26 !important;
border: none;
color: white;
padding: 10px 25px;
}
div#sugestao-compra .kit-comprar span {
background: black !important;
border-radius: 100%;
color: white;
padding: 1px 9px;
margin: 5px 0px;
font-size: 10px;
visibility: hidden;
}
table.cart-items td.product-image {
display: flex !important;
}
table.cart-items td.product-name {
margin-left: auto !important;
margin-right: auto !important;
}
table.cart-items td.product-image {
margin-left: auto !important;
margin-right: auto !important;
}
div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tbody.totalizers-list>tr.Items>td.info, div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tbody.totalizers-list>tr.Items>td.monetary, div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tfoot>tr {
background-color: white;
padding-left: 5px;
padding-right: 10px;
}
.cart-template.full-cart .summary-template-holder .summary .totalizers {
padding: 10px 0px 0px;
}
div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tfoot>tr>td.info, div.container.container-main.container-cart>div.checkout-container.row-fluid.cart-active>div.cart-template.full-cart.span12.active>div.summary-template-holder>div>div.span5.totalizers.summary-totalizers.cart-totalizers.pull-right>div>div.accordion-body.collapse.in>div>table>tfoot>tr>td.monetary {
padding: 0 10px;
}
.container .checkout-container .cart-template .summary-template-holder .summary .totalizers .accordion-group .accordion-body .accordion-inner .table tr td.info {
padding-left: 5px;
}
.coupon-form .coupon-fieldset p a {
background: lightgray;
background: darkgray;
color: white !important;
}
@media (max-width: 768px) {
table.cart-items tbody .product-item {
margin-bottom: 30px;
position: relative;
border: 1px solid lightgray;
}
table.cart-items td.product-image {
display: flex !important;
}
table.cart-items td.product-name {
margin-left: auto !important;
margin-right: auto !important;
}
table.cart-items td.product-image {
margin-left: auto !important;
margin-right: auto !important;
}
}
@media (max-width: 768px) {
#cartLoadedDiv>div.cart>table>tbody>tr>td.product-name a {
margin-right: 0;
padding-right: 0;
}
#cartLoadedDiv>div.cart>table>tbody>tr>td.product-name, .full-cart .cart table tbody tr td.product-image, .full-cart .cart table tbody tr td.bundle-item-image {
justify-content: center;
margin: auto !important;
padding-left: 0;
padding-right: 0;
display: flex !important;
}
#cartLoadedDiv>div.cart>table>tbody>tr>td.shipping-date {
display: none !important;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Fascar</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/meyer-reset/2.0/reset.min.css" />
<style>
body{
background: #111111;
font-family: arial;
font-size: 22px;
text-align: center;
}
.wrap-tab{
width: 1200px;
margin: 0 auto;
}
.tab-header,
.tab-footer{
float: left;
position: relative;
width: 100%;
}
.tab-header .bx-img,
.tab-footer .bx-img{
float: left;
position: relative;
width: 25%;
}
.tab-header .bx-img img,
.tab-footer .bx-img img{
width: 100%;
}
.text--desc{
color: #968862;
}
.tab-content{
padding: 25px 0px;
float: left;
width: 100%;
color: #969396;
line-height: 28px;
background: url("/arquivos/img-tab-bg.jpg") repeat-x;
}
.tab-content p {
margin-bottom: 40px;
font-weight: 100;
}
.clearfix{
clear: both;
}
@media (max-width: 900px) {
.wrap-tab{
width: 100%;
}
.tab-content{
padding-left: 10px;
padding-right: 10px;
box-sizing: border-box;
background: transparent;
}
.tab-content br{
display: none;
}
}
</style>
</head>
<body>
<div class="wrap-tab">
<div class="tab-header">
<div class="bx-img"><img src="/arquivos/img-tab-1.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-2.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-3.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-4.jpg" alt="" /></div>
</div>
<div class="tab-content">
<div class="content--text">
<p class="text--desc">
Uma nova Fascar On-line está chegando e, com ela, muito mais novidades<br /> para você. Caso tenha pedidos em andamento.
não se preocupe: todos serão<br /> entregues normalmente e você poderá acompanhá-los pelo nosso SAC.
</p>
<p>
SAC FASCAR 0300 0327 227 | sac@fascar.com.br.<br />
De 2ª a 6ª, exceto feriados. das 8h30 às 17h30.
</p>
<div>
<img src="/arquivos/img-tab-logo.jpg" alt="" />
</div>
</div>
</div>
<div class="tab-footer">
<div class="bx-img"><img src="/arquivos/img-tab-5.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-6.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-7.jpg" alt="" /></div>
<div class="bx-img"><img src="/arquivos/img-tab-8.jpg" alt="" /></div>
</div>
<div class="clearfix"></div>
</div>
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<meta charset="utf-8" />
<head>
<title>Fascar | 404</title>
<vtex:metaTags />
<vtex:template id="00-CommonStyles" />
</head>
<!--/head-->
<body class="erro404">
<div id="app-fascar" class="wrapper">
<vtex:template id="00-header" />
<div id="container_404" class="page-error shell">
<div class="col-1-1">
<div class="page-error-ico">404</div>
<h1>Página não encontrada.</h1>
<p>
<b>Procuramos está pagina por toda a loja.</b><br />
Tem certeza de que a URL do site está correta?
</p>
<a href="/" class="btn-back">Voltar para o inicio</a>
</div>
</div>
<vtex:template id="00-footer" />
</div>
</body>
<!-- templateHeader -->
<vtex.cmc:welcomeModal />
<vtex:template id="00-CommonScripts" />
<!-- / templateHeader -->
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<meta charset="utf-8" />
<head>
<title>500</title>
<vtex:metaTags />
<vtex:template id="00-CommonStyles" />
</head>
<!--/head-->
<body class="erro404">
<div id="app-fascar" class="wrapper">
<vtex:template id="00-header" />
<div id="container_404" class="page-error shell">
<div class="col-1-1">
<div class="page-error-ico">500</div>
<h1>Pagina não encontrada :( </h1>
<p>
<b>Houve um problema interno.</b><br />
Caso necessário entre em contato conosco!
</p>
<a href="/" class="btn-back">Voltar para o inicio</a>
</div>
</div>
<vtex:template id="00-footer" />
</div>
</body>
<!-- templateHeader -->
<vtex:template id="00-CommonScripts" />
<!-- / templateHeader -->
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<meta charset="utf-8" />
<head>
<title>
<vtex.cmc:searchTitle /> | Fascar Online
</title>
<vtex:metaTags />
<vtex:template id="00-CommonStylesV2" />
<vtex:contentPlaceHolder id="metatags" />
<!-- Hotjar Tracking Code for fascar.com.br -->
</head>
<body>
<vtex:template id="00-header-V3" />
<main>
<div class="fascar-hero">
<vtex:contentPlaceHolder id="fascar-hero" />
</div>
<div class="fascar-breadCrumb">
<div class="container">
<vtex.cmc:breadCrumb />
</div>
</div>
<div>
<div class="container">
<span class="line"></span>
<div class="area-especial-info">
<div class="especial-field especial-left-field">
<vtex:contentPlaceHolder id="intro-texto" />
</div>
<div class="especial-field especial-right-field">
<vtex:contentPlaceHolder id="intro-imagem" />
</div>
</div>
</div>
</div>
<div class="resultados-de-busca container">
<div class="fascar-searchNavigator">
<vtex.cmc:searchNavigator />
</div>
<div id="fascar-searchResult">
<vtex.cmc:searchResult layout="67bd95d5-e6d6-483f-8ec4-8407089b9d9c" itemCount="12" columnCount="12" />
</div>
</div>
<vtex:template id="00-newsletterV2" />
</main>
<vtex:template id="00-footerV2" />
</body>
<vtex:template id="00-CommonScriptsV2" />
</html>
<header id="headroom" class="header headroom headroom--top headroom--not-bottom">
<vtex.cmc:cssCustomMenu />
<div class="header__bar">
<div class="shell">
<div class="header__bar-inner">
<ul class="list-features">
<li><span style="color: white; text-transform: none;">
FRETE GRÁTIS* Brasil: Veja as condições.
</span></li>
<li><span style="color: white;">
Parcele em até 6x no cartão
</span> <span style="color: white;">
5% OFF no Boleto
</span></li>
</ul>
<ul class="list-links">
<li><a href="/Institucional/nossas-lojas">Lojas</a></li>
<li><a href="/Institucional/atendimento">Atendimento</a></li>
<li><a href="/Institucional/duvidas-frequentes">Ajuda</a></li>
</ul>
</div>
</div>
</div>
<div class="header__body">
<div class="shell">
<div class="header__content">
<a href="/">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 119.02 22.75" class="logo">
<title>Logo Fascar</title>
<g id="logo" data-name="Camada 2">
<g id="Camada_1-2" data-name="Camada 1">
<polygon
points="1.67 2.78 15.01 2.78 15.01 1.16 0 1.16 0 22.41 1.67 22.41 1.67 12.74 13.23 12.74 13.23 11.13 1.67 11.13 1.67 2.78">
</polygon>
<path
d="M45.66,10.85c-4.51-.92-6.11-2-6.11-4.26V6.53c0-2,2-4.05,5.37-4.05a10.2,10.2,0,0,1,6.21,2.15l.41.31,1-1.33-.41-.32A11.74,11.74,0,0,0,45,.87c-4,0-7.1,2.5-7.1,5.69v.06c0,3.12,2,4.76,7.32,5.82s6.2,2.39,6.2,4.35v.06c0,2.5-2.34,4.25-5.69,4.25a10.26,10.26,0,0,1-7.24-3l-.37-.36L36.9,19l.38.37a12,12,0,0,0,8.36,3.38c4.37,0,7.42-2.42,7.42-5.89v-.06C53.06,13.59,51,11.93,45.66,10.85Z">
</path>
<path
d="M74.07,18a9.43,9.43,0,0,1-7,3.13c-4.91,0-8.75-4.1-8.75-9.33v-.06c0-5.23,3.84-9.33,8.75-9.33A9.17,9.17,0,0,1,74,5.35l.37.35,1.17-1.17-.38-.37a10.46,10.46,0,0,0-8-3.35c-5.86,0-10.45,4.82-10.45,11v.06c0,6.12,4.57,10.91,10.39,10.91a11,11,0,0,0,8.23-3.6l.36-.38-1.22-1.15Z">
</path>
<path
d="M76.87,22.41h1.81l2.89-6.06H93.8l2.89,6.06h1.84L87.7,0ZM93,14.74H82.36l1-2h8.75Zm-8.94-3.61,3.61-7.46,3.61,7.46Z">
</path>
<path
d="M112.23,12.63c3.07-.24,6.21-2.24,6.21-5.63V6.94c0-3.73-2.77-5.78-7.81-5.78h-8.78V22.41h1.67V12.73h6.72l6.61,9.53.11.15H119Zm-8.71-9.85h7c4.08,0,6.15,1.4,6.15,4.15V7c0,3.42-3.49,4.14-6.41,4.14h-6.79V2.78Z">
</path>
<path
d="M13.87,22.41h1.81l2.89-6.06H30.8l2.89,6.06h1.84L24.7,0ZM30,14.74H19.36l.95-2h8.75Zm-8.94-3.61,3.61-7.46,3.61,7.46Z">
</path>
</g>
</g>
</svg>
</a>
<div class="header__content-inner">
<div class="pw-header-search">
<vtex.cmc:fullTextSearchBox />
</div>
<ul class="list-actions">
<li class="account-drop"><a href="/account"><i class="ico-account"></i><span
class="botao-entrar">Entrar</span></a>
<div class="user-DropDown">
<ul>
<li class="account-name">Minha conta</li>
<li class="account-data"><a href="/account">Meus dados</a></li>
<li class="account-order"><a href="/account/orders">Meus pedidos</a></li>
<!---->
</ul>
</div>
</li>
<li><a href="/checkout/#/cart">
<i class="ico-bag"></i>
<input type="hidden" name="headercart_count" value="" />
<span id="contagem_produtos_carrinho">0</span>
<span>|</span> Finalizar
</a>
</li>
</ul>
</div>
</div>
<div class="header__body-bar">
<div>
<nav class="nav__dropdown__newstyle">
<ul>
<li data-categoria="Acessórios" class="menu-father"><a title="Acessórios"
href="http://www.fascar.com.br/acessorios?PS=12&amp;O=OrderByReleaseDateDESC">Acessórios</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/carteira?PS=12&amp;O=OrderByReleaseDateDESC">
Carteira
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/cinto?PS=12&amp;O=OrderByReleaseDateDESC">
Cinto
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/conservacao?PS=12&amp;O=OrderByReleaseDateDESC">
Conservação
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/meia?PS=12&amp;O=OrderByReleaseDateDESC">
Meia
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/mochila?PS=12&amp;O=OrderByReleaseDateDESC">
Mochila
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/necessaire?PS=12&amp;O=OrderByReleaseDateDESC">
Nécessaire
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/pasta?PS=12&amp;O=OrderByReleaseDateDESC">
Pasta
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/acessorios/pulseira?PS=12&amp;O=OrderByReleaseDateDESC">
Pulseira
</a></li>
</ul>
</div>
</div>
</li>
<li data-categoria="Alto Conforto" class="menu-father"><a title="Alto Conforto"
href="http://www.fascar.com.br/alto-conforto?PS=12&amp;O=OrderByReleaseDateDESC">Alto
Conforto</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/bota?PS=12&amp;O=OrderByReleaseDateDESC">
Bota
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/chinelo?PS=12&amp;O=OrderByReleaseDateDESC">
Chinelo
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/classico?PS=12&amp;O=OrderByReleaseDateDESC">
Clássico
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/mocassim?PS=12&amp;O=OrderByReleaseDateDESC">
Mocassim
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/sandalia?PS=12&amp;O=OrderByReleaseDateDESC">
Sandália
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/alto-conforto/sneaker?PS=12&amp;O=OrderByReleaseDateDESC">
Sneaker
</a></li>
</ul>
</div>
</div>
</li>
<li data-categoria="Casual" class="menu-father"><a title="Casual"
href="http://www.fascar.com.br/casual?PS=12&amp;O=OrderByReleaseDateDESC">Casual</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="http://www.fascar.com.br/casual/bota?PS=12&amp;O=OrderByReleaseDateDESC">
Bota
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/casual/esportivo?PS=12&amp;O=OrderByReleaseDateDESC">
Esportivo
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/casual/mocassim?PS=12&amp;O=OrderByReleaseDateDESC">
Mocassim
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/casual/mule?PS=12&amp;O=OrderByReleaseDateDESC">
Mule
</a></li>
</ul>
</div>
</div>
</li>
<li data-categoria="Lazer" class="menu-father"><a title="Lazer"
href="http://www.fascar.com.br/lazer?PS=12&amp;O=OrderByReleaseDateDESC">Lazer</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="http://www.fascar.com.br/lazer/chinelo?PS=12&amp;O=OrderByReleaseDateDESC">
Chinelo
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/lazer/drive?PS=12&amp;O=OrderByReleaseDateDESC">
Drive
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/lazer/sandalia?PS=12&amp;O=OrderByReleaseDateDESC">
Sandália
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/lazer/sider?PS=12&amp;O=OrderByReleaseDateDESC">
Sider
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/lazer/sneaker?PS=12&amp;O=OrderByReleaseDateDESC">
Sneaker
</a></li>
</ul>
</div>
</div>
</li>
<li data-categoria="Social" class="menu-father"><a title="Social"
href="http://www.fascar.com.br/social?PS=12&amp;O=OrderByReleaseDateDESC">Social</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="http://www.fascar.com.br/social/bota?PS=12&amp;O=OrderByReleaseDateDESC">
Bota
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/social/classico?PS=12&amp;O=OrderByReleaseDateDESC">
Clássico
</a></li>
<li class="aaaa"><a
href="http://www.fascar.com.br/social/mocassim?PS=12&amp;O=OrderByReleaseDateDESC">
Mocassim
</a></li>
</ul>
</div>
</div>
</li>
<li data-categoria="Hand Made" class="menu-father not-childs"><a title="Hand Made"
href="http://www.fascar.com.br/handmade?PS=12&amp;O=OrderByReleaseDateDESC">Hand
Made</a>
<div style="display: none;">
<div class=" nav__dropdown__newstyle-div">
<ul></ul>
</div>
</div>
</li>
<li data-categoria="Outlet" class="menu-father not-childs"><a title="Outlet"
href="http://www.fascar.com.br/outlet?PS=12&amp;O=OrderByReleaseDateDESC">Outlet</a>
<div style="display: none;">
<div class=" nav__dropdown__newstyle-div">
<ul></ul>
</div>
</div>
</li>
<li data-categoria="Linhas Especiais" class="menu-father"><a title="Linhas Especiais"
href="/especial?PS=12&amp;O=OrderByReleaseDateDESC">Linhas Especiais</a>
<div>
<div class=" nav__dropdown__newstyle-div">
<ul>
<li class="aaaa"><a
href="/especial/active-airflow?PS=12&amp;O=OrderByReleaseDateDESC">
Active Airflow
</a></li>
<li class="aaaa"><a
href="/especial/airtech?PS=12&amp;O=OrderByReleaseDateDESC">
Airtech
</a></li>
<li class="aaaa"><a
href="/especial/altus?PS=12&amp;O=OrderByReleaseDateDESC">
Altus
</a></li>
<li class="aaaa"><a
href="/especial/Flexilinea?PS=12&amp;O=OrderByReleaseDateDESC">
Flexilinea
</a></li>
<li class="aaaa"><a href="/handmade?PS=12&amp;O=OrderByReleaseDateDESC">
Handmade
</a></li>
<li class="aaaa"><a href="/especial/izi?PS=12&amp;O=OrderByReleaseDateDESC">
IZI
</a></li>
<li class="aaaa"><a
href="/especial/linha-branca?PS=12&amp;O=OrderByReleaseDateDESC">
Linha branca
</a></li>
<li class="aaaa"><a
href="/especial/lite?PS=12&amp;O=OrderByReleaseDateDESC">
Lite
</a></li>
<li class="aaaa"><a href="/ns20?PS=12&amp;O=OrderByReleaseDateDESC">
NS20
</a></li>
<li class="aaaa"><a
href="/especial/tamanhos-grandes?PS=12&amp;O=OrderByReleaseDateDESC">
Tamanhos Grandes
</a></li>
</ul>
</div>
</div>
</li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div class="header__bar mobile hidden padrao">
<div class="shell">
<div class="header__bar-inner morphext"><span class="animated fadeIn">FRETE GRÁTIS* Brasil: Veja as
condições.</span></div>
</div>
</div>
</header>
<vtex.cmc:hadertopbar />
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<head>
<title>Fascar | Calçados e Acessórios Masculinos em Couro</title>
<vtex:metaTags />
<vtex:template id="00-CommonStyles" />
<vtex:contentPlaceHolder id="metatags" />
</head>
<body class="home">
<vtex:template id="00-header-dev" />
<main>
<section id="hero">
<vtex:contentPlaceHolder id="carrossel-topo" />
<vtex:contentPlaceHolder id="carrossel-topo-mobile" />
</section>
<section id="mosaico" class="container">
</section>
<section id="vitrine01" class="container">
<header class="heading">
<span class="line"> </span>
<h3>TITULO</h3>
</header>
<main class="vitrine-carrossel">
<vtex:contentPlaceHolder id="vitrine01-carrossel" />
</main>
</section>
<section id="vitrine02" class="container">
<header class="heading">
<span class="line"> </span>
<h3>TITULO</h3>
</header>
<main class="vitrine-mista">
<vtex:contentPlaceHolder id="vitrine02-banner" />
<vtex:contentPlaceHolder id="vitrine02-carrossel" />
</main>
</section>
<section id="vitrine03" class="container">
<header class="heading">
<span class="line"> </span>
<h3>TITULO</h3>
</header>
<main class="vitrine-mista">
<vtex:contentPlaceHolder id="vitrine03-banner" />
<vtex:contentPlaceHolder id="vitrine03-carrossel" />
</main>
</section>
<section id="newsletter">
<vtex:template id="newsletter-form" />
</section>
</main>
<vtex:template id="00-footer" />
<div id="returnToTop" style="opacity: 1; display: none;">
<a href="#"><span class="text">voltar ao</span>
<span class="text2">TOPO</span>
<span class="arrowToTop"></span>
</a>
</div>
<vtex:template id="00-CommonScripts" />
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<meta charset="utf-8" />
<head>
<title>
<vtex.cmc:searchTitle /> | Fascar Online
</title>
<vtex:metaTags />
<vtex:template id="00-CommonStylesV2" />
<vtex:contentPlaceHolder id="metatags" />
<!-- Hotjar Tracking Code for fascar.com.br -->
</head>
<body class="cms V2">
<vtex:template id="00-header-V3" />
<main>
<div class="fascar-breadCrumb">
<div class="container">
<!-- <vtex.cmc:breadCrumb /> -->
<vtex:contentPlaceHolder id="nomedapagina" />
</div>
</div>
<div>
<div class="container">
<vtex:contentPlaceHolder id="conteudodapagina" />
</div>
</div>
<vtex:template id="00-newsletterV2" />
</main>
<vtex:template id="00-footerV2" />
</body>
<vtex:template id="00-CommonScriptsV2" />
</html>
<!DOCTYPE html>
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:vtex="http://www.vtex.com.br/2009/vtex-common"
xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce"
lang="pt-BR"
>
<head>
<title><vtex.cmc:productPageTitle /></title>
<vtex:metaTags />
<vtex:template id="00-CommonStylesV2" />
<vtex:contentPlaceHolder id="metatags" />
</head>
<body class="product V2020">
<vtex:template id="00-header-V3" />
<div class="fascar-breadCrumb">
<div class="container">
<vtex.cmc:breadCrumb />
</div>
</div>
<main class="container">
<div class="hproduct">
<div class="hproduct-preview left-panel">
<vtex.cmc:HightLight />
<div class="product-thumb">
<vtex.cmc:ProductImage zoom="on" />
</div>
</div>
<div class="hproduct-details right-panel">
<div class="product-title">
<vtex.cmc:productName />
</div>
<vtex.cmc:skuReference />
<div class="product-type">
<vtex.cmc:productDescriptionShort />
</div>
<div class="value">
<vtex.cmc:skuPrice />
</div>
<div class="property">
<vtex.cmc:skuRichSelection changeImage="1" />
</div>
<div class="product-buy">
<vtex.cmc:BuyButton />
<vtex.cmc:BuyInPage />
</div>
<div class="product-promoInfo">
<span>
<svg
aria-hidden="true"
focusable="false"
data-prefix="far"
data-icon="check-circle"
class="svg-inline--fa fa-check-circle fa-w-16"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
fill="currentColor"
d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"
></path>
</svg>
Entrega grátis à partir de R$ 300,00
</span>
<span>
<svg
aria-hidden="true"
focusable="false"
data-prefix="far"
data-icon="check-circle"
class="svg-inline--fa fa-check-circle fa-w-16"
role="img"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 512 512"
>
<path
fill="currentColor"
d="M256 8C119.033 8 8 119.033 8 256s111.033 248 248 248 248-111.033 248-248S392.967 8 256 8zm0 48c110.532 0 200 89.451 200 200 0 110.532-89.451 200-200 200-110.532 0-200-89.451-200-200 0-110.532 89.451-200 200-200m140.204 130.267l-22.536-22.718c-4.667-4.705-12.265-4.736-16.97-.068L215.346 303.697l-59.792-60.277c-4.667-4.705-12.265-4.736-16.97-.069l-22.719 22.536c-4.705 4.667-4.736 12.265-.068 16.971l90.781 91.516c4.667 4.705 12.265 4.736 16.97.068l172.589-171.204c4.704-4.668 4.734-12.266.067-16.971z"
></path>
</svg>
Primeira troca grátis
</span>
</div>
<div class="product-minictaWidget">
<vtex.cmc:fascarClubSmallWidget />
</div>
</div>
<div class="produto-detalhes left-panel">
<vtex.cmc:ProductDescription />
<vtex.cmc:productSpecification />
</div>
<div class="produto-detalhex-extra right-panel">
<vtex.cmc:sobreCouros />
</div>
<div class="produto-extras-recomendacoes">
<section class="BuyTogether container hidden">
<vtex.cmc:BuyTogether />
</section>
<section
id="complementoCompra"
class="complement-compra container hidden"
>
<header class="heading">
<span class="line"> </span>
<h3>COMPLEMENTE SUA COMPRA</h3>
<vtex:contentPlaceHolder id="complementoCompra-Titulo" />
</header>
<main class="vitrine-carrossel">
<vtex:contentPlaceHolder id="colecao-complemente-sua-compra" />
</main>
</section>
<section
id="produtosRelacionados"
class="confira-tambem container hidden"
>
<header class="heading">
<span class="line"> </span>
<h3>MAIS PROCURADOS</h3>
<vtex:contentPlaceHolder id="produtosRelacionados-Titulo" />
</header>
<main class="vitrine-carrossel">
<vtex:contentPlaceHolder id="colecao-produtos-relacionados" />
</main>
</section>
</div>
<div class="produto-extras-components">
<vtex:contentPlaceHolder id="link-guia-tamanho" />
<vtex:contentPlaceHolder id="modal-guia" />
<vtex.cmc:discountHightLight />
<vtex.cmc:AmountItemsInCart />
</div>
</div>
</main>
<vtex:template id="00-newsletterV2" />
<vtex:template id="00-footerV2" />
<vtex:template id="00-CommonScriptsV2" />
</body>
</html>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:vtex="http://www.vtex.com.br/2009/vtex-common" xmlns:vtex.cmc="http://www.vtex.com.br/2009/vtex-commerce" lang="pt-BR">
<meta charset="utf-8" />
<head>
<title>Fascar | Sobre a Fascar</title>
<vtex:metaTags />
<vtex:template id="00-CommonStyles" />
<!-- faço o style incorporado pois não há complexibilidade -->
<style>
.col-1-1 {
margin-top: 0;
}
.area-sobre-fascar {
padding: 10px;
}
#titulo {
font-size: 18pt;
}
.texto-sobre {
font-size: 12pt;
color: #757575;
line-height: 1.4em;
/*margin-top: 20px;*/
margin-bottom: 25px;
}
.area-elementos {
display: inline-flex;
justify-content: space-between;
align-items: flex-start;
margin-top: 30px;
}
.area-imagem {
width: 30%;
}
.area-texto {
width: 68%;
}
.area-beneficios {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: 30px;
margin-bottom: 20px;
}
.figura-beneficio {
align-items: center;
display: inline-flex;
padding:10px;
width: 300px;
}
.figura-beneficio img {
opacity: .6;
width: 80px;
margin-right: 20px;
}
/*botão fale com a gente*/
.fale-com-a-gente {
align-items: center;
display: flex;
justify-content: center;
margin-top: 40px;
width: 100%;
}
#botao_fale_com_a_gente {
background-color: white;
color: #444444;
border:1px solid #444444;
padding: 15px 30px 15px 30px;
cursor: pointer;
transition: .2s ease;
}
#botao_fale_com_a_gente:hover {
background-color: #444444;
color: white;
}
/* responsivo */
@media screen and (max-width: 414px) {
.area-bread:after {
right: 10px !important;
}
.area-elementos {
display: flex;
flex-wrap: wrap;
}
.area-elementos div {
width: 100%;
margin-bottom: 40px;
}
}
</style>
</head>
<body class="cms V2">
<vtex:template id="00-header-V3" />
<section id="app-fascar">
<vtex:template id="00-header" />
<div class="bread-crumb">
<!-- estrutura bread crumb -->
<div class="grid area-bread">
<p class="vc-esta">Você está em:</p>
<ul class="lista-bread">
<!-- <li><a title="pearson" href="index.html">Inicio</a></li> -->
<li class="last"><strong><a href="#" class="bread-active">Sobre a fascar</a></strong></li>
</ul>
</div>
</div>
<div class="fundo-conteiner">
<div class="grid">
<div class="col-1-1">
<article class="area-sobre-fascar">
<!-- <header>
<h1 id="titulo">Sobre a fascar</h1>
</header> -->
<div class="area-elementos">
<div class="area-imagem">
<vtex:contentPlaceHolder id="banner-sobre-fascar" />
</div>
<div class="area-texto">
<p class="texto-sobre">Desde 1963, a Fascar cumpre uma missão que vai além de produzir sapatos de alta qualidade. Há mais de 50 anos, é sinônimo de inovação em calçados masculinos modernos, usados por homens de estilo e personalidade, e referência de atendimento, pelo nível de dedicação de seus funcionários.</p>
<p class="texto-sobre">Uma marca não conquista este espaço por acaso.
<br />É preciso inspiração... Ser diferente. Fazer mais!</p>
<p class="texto-sobre">Foi assim que começamos quando nosso fundador, Manuel de Souza, um experiente artesão sapateiro europeu e apaixonado por calçados, chegou ao Brasil. Um grande admirador da arte de manufaturar calçados impecáveis, exclusivos e de altíssima qualidade.</p>
<p class="texto-sobre">Hoje, com presença em todo o Brasil, nosso compromisso permanece o mesmo: oferecer sempre o melhor em conforto, design e tecnologia, seguindo sempre as maiores tendências da moda internacional. Produtos sofisticados e exclusivos para clientes exigentes que também admiram calçados bem feitos, únicos, que, mais do que protegerem os pés de quem os compra, os levam sempre adiante.</p>
</div>
</div>
</article>
</div>
</div>
</div>
</section>
<vtex:template id="00-footerV2" />
<!-- templateHeader -->
<vtex:template id="00-CommonScripts" />
</body>
</html>
body{
transition: all .3s;
}
.fascar-produto {
background-color: white;
position: relative;
}
.produto-imagem {
width: 100%;
}
.produto-titulo {
color: #6c6c6c !important;
display: block;
overflow: hidden;
-o-text-overflow: ellipsis;
text-overflow: ellipsis;
width: 100%;
height: 40px;
}
.produto-precode {
color: #a1a1a1;
font-size: 11px;
}
.produto-preco {
font-size: 16px;
font-weight: 700;
}
.produto-comprar {
background-color: #fff;
color: #333;
width: auto;
display: block;
position: relative;
opacity: 1;
right: 0;
border: 1px solid #6c6c6c;
padding: 10px 28px;
text-transform: uppercase;
}
.produto-comprar:hover {
background-color: #333;
color: #fff;
border: 1px solid #6c6c6c;
}
.fascar-vitrine ul {
display: flex;
flex-wrap: wrap;
}
.produto-flag {
position: absolute;
}
.compare,
.searchResultsTime,
.filterBy {
display: none;
}
span {
display: block;
color: #757575;
font-size: 12px;
}
#set($id = $product.Id)
#set($uri = $product.Uri)
#set($escapedName = $product.HtmlEscapedName)
<div class="fascar-produto" data-id="$id">
<a href="#" class="produto-flag">
$product.HightLight
</a>
<a class="produto-imagem" title="$product.Name" alt="$product.Name" href="$uri" width="281" height="281">
$product.GetImageTag(30)
</a>
<div class="produto-infos">
<p>
<a class="produto-titulo" title="$escapedName" href="$uri">$product.Name</a>
</p>
<div class="product__content-inner">
<!-- vtexcp miniaturas -->
<div class="vtex-cpBox">
<div class="vtex-cpSkuList #if($product.IsInStock) vtex-cpShow #else vtex-cpHide #end"></div>
<span class="vtex-cpViewMore vtex-cpHide"><a href="$uri" class="vtex-cpProductLink">+</a></span>
<div style="clear:both;"></div>
</div>
<!-- vtexcp miniaturas -->
#if ($product.IsInStock)
<div class="info-valores ab">
<p class="produto-a-partir">
<span class="txt-a-partir"></span>
</p>
#if ($product.HasBestPrice)
<p class="produto-precode">
<span class="txt-de">
$product.ListPrice
</span>
</p>
#end
<p class="produto-preco">$product.BestPrice</p>
#if ($product.NumbersOfInstallment > 1)
<p>
<span>
ou ${product.NumbersOfInstallment}x de $product.InstallmentValue
</span>
</p>
#end
</div>
<span class="produto-comprar">
$product.BottomBuy
</span>
#else
<p class="text-sem-estoque" style="width: 100%;text-align: center;margin-top: 10px;">
Sem estoque,
<a href="$uri" style="color: #424242; text-decoration: underline;">
avise-me quando disponível
</a>
</p>
#end
</div>
</div>
</div>
<div class="header__bar">
<div class="shell">
<div class="header__bar-inner">
<ul class="list-features">
<li>
<span style="color: white; text-transform:none;">
<a href="https://www.fascar.com.br/Institucional/formas-de-entrega-e-frete">
<strong>FRETE GRÁTIS</strong>* Brasil: Veja as condições.
</a>
</span>
</li>
<li>
<span style="color: white;">
Parcele em até <strong>6x no cartão</strong>
</span>
</li>
<li>
<span style="color: white;">
<strong>5% OFF</strong> no Boleto
</span>
</li>
<li>
<span>
<a href="https://www.fascar.com.br/Institucional/formas-de-entrega-e-frete">
<strong>Troca Fácil</strong>
na loja física ou no site
</a>
</span>
</li>
</ul>
<ul class="list-links">
<li><a href="/Institucional/nossas-lojas">Lojas</a></li>
<li><a href="/Institucional/atendimento">Atendimento</a></li>
<li><a href="/Institucional/duvidas-frequentes">Ajuda</a></li>
</ul>
</div>
</div>
</div>
<style>
.tooltip {
position: relative;
display: inline-block;
}
.tooltip .tooltiptext {
visibility: hidden;
width: 140px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 150%;
left: 50%;
margin-left: -75px;
opacity: 0;
transition: opacity 0.3s;
}
.tooltip .tooltiptext::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}
.tooltip:hover .tooltiptext {
visibility: visible;
opacity: 1;
}
</style>
</head>
<div id="modal-welcome" class="modal hidden">
<header>
<h2>Bem-Vindo</h2>
</header>
<main>
<p>
Inscreva-se para receber nossos lançamentos e sugestões para o seu estilo, e na sua primeira compra ganhe:
</p>
<span>
<img src="/arquivos/modal-15percent.png" alt="quinze por cento de desconto">
</span>
<form id="">
<input class='name' type="text" placeholder="Insira seu Nome"/>
<input class='email' type="email" placeholder="Insira seu Email"/>
<button type="submit" class="cadastroModal">Enviar</button>
</form>
</main>
<footer>
<span>
Ao clicar em enviar, você concorda com a nossa Política de Privacidade e aceita receber mensagens da Fascar via e-mail. Desconto válido exclusivamente para a primeira compra, exceto para promoções e frete. Oferta não cumulativa e limitada a um único
</span>
</footer>
</div>
<h2>Obrigado!</h2>
<span>Você ganhou 15% de desconto para usar na sua primeira compra.</span>
<div id="cupomBv">
<span>Cupom:</span>
<input type="text" value="BEMVINDO15" id="myInput">
<div class="tooltip">
<button onclick="myFunction()" onmouseout="outFunc()">
<span class="tooltiptext" id="myTooltip">Copiar para Area de Transferência</span>
Copiar Texto
</button>
</div>
</div>
<div id="fvpp-blackout"></div>
<div id="blackout-overlay"></div>
<script>
function myFunction() {
var copyText = document.getElementById("myInput");
copyText.select();
copyText.setSelectionRange(0, 99999);
document.execCommand("copy");
var tooltip = document.getElementById("myTooltip");
tooltip.innerHTML = "Copied: " + copyText.value;
}
function outFunc() {
var tooltip = document.getElementById("myTooltip");
tooltip.innerHTML = "Copy to clipboard";
}
</script>
.zoomPup {}/* VENDOR */
.zoomPad {
position: relative;
float: left;
z-index: 99;
cursor: crosshair;
}
.zoomPreload {
-moz-opacity: 0.8;
opacity: 0.8;
filter: alpha(opacity=80);
color: #333;
font-size: 12px;
font-family: Tahoma;
text-decoration: none;
border: 1px solid #ccc;
background-color: #fff;
padding: 8px;
text-align: center;
background-image: url(/arquivos/ajax-loader.gif);
background-repeat: no-repeat;
background-position: center center;
z-index: 110;
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
}
.zoomPup {
overflow: hidden;
background-color: #fff;
-moz-opacity: 0.6;
opacity: 0.6;
filter: alpha(opacity=60);
z-index: 120;
border: none !important;
position: absolute;
border: 1px solid #ccc;
z-index: 101;
cursor: crosshair;
}
.zoomOverlay {
position: absolute;
left: 0;
top: 0;
background: #fff;
z-index: 5000;
width: 100%;
height: 100%;
display: none;
z-index: 101;
}
.zoomWindow {
position: absolute;
left: 0px !important;
top: 0px !important;
background: #fff;
z-index: 6000;
height: auto;
z-index: 10000;
z-index: 110;
width: auto;
}
.zoomWrapper {
position: relative;
border: none;
z-index: 110;
width: 740px !important;
height: 740px !important;
}
.zoomWrapperTitle {
display: block;
background: #999;
color: #fff;
height: 18px;
line-height: 18px;
width: 100%;
overflow: hidden;
text-align: center;
font-size: 10px;
position: absolute;
top: 0;
left: 0;
z-index: 120;
-moz-opacity: 0.6;
opacity: 0.6;
filter: alpha(opacity=60);
}
.zoomWrapperImage {
display: block;
position: relative;
overflow: hidden;
z-index: 110;
height: 745px !important;
}
.zoomWrapperImage img {
border: 0;
display: block;
position: absolute;
z-index: 101;
width: 1500px !important;
height: 1500px !important;
max-width: 1500px !important;
max-height: 1500px !important;
}
.zoomIframe {
z-index: -1;
filter: alpha(opacity=0);
-moz-opacity: 0.8;
opacity: 0.8;
position: absolute;
display: block;
}
.fascarClub--landingPage main#fascarClub {
max-width: 1140px;
margin: auto;
}
.fascarClub--landingPage .bread-crumb {
display: none;
}
.fascarClub--landingPage a.vtex-account_menu-link {
border-top: none;
border-bottom: none;
border-right: none;
}
.fascarClub--landingPage #generic--content > header > img {
border-bottom: 5px solid black;
border-top: 5px solid black;
}
.fascarClub--landingPage #generic--content {
color: white;
background-color: #816e71;
}
.fascarClub--landingPage #fascarClub > h1 {
font-family: "Montserrat";
font-size: 50px;
text-align: center;
font-weight: bold;
}
.fascarClub--landingPage #fascarClub > div > div {
background-color: #916f71;
display: flex;
min-height: 285px;
max-width: 48%;
}
.fascarClub--landingPage div#descontos-fc {
flex-direction: row;
display: flex;
justify-content: space-between;
margin-bottom: 50px;
margin-top: 120px;
}
.fascarClub--landingPage #descontos-fc > div > img {
width: 269px;
}
.fascarClub--landingPage #fascarClub > h2 {
text-align: center;
/* font-size: 25px; */
margin-bottom: 50px;
}
.fascarClub--landingPage #descontos-fc > div > span {
font-size: 27px;
text-align: start;
margin-top: auto;
margin-left: -50px;
}
.fascarClub--landingPage #descontos-fc > div {
padding: 20px;
}
.fascarClub--landingPage #participe-fc a {
background-color: #000000;
color: white;
font-size: 30px;
padding: 15px 20px;
width: 100%;
max-width: 390px;
display: flex;
justify-content: center;
font-weight: bold;
margin: 50px auto;
}
#fascarClubLPLogo {
display: flex;
align-items: center;
text-align: center;
margin: 50px auto;
}
#fascarClubLPLogo::after {
content: "";
flex: 1;
margin-left: 1rem;
height: 1px;
background-color: #000;
}
#fascarClubLPLogo::before {
content: "";
flex: 1;
margin-left: 1rem;
height: 1px;
background-color: #000;
}
#fascarclublplogo {
display: flex;
align-items: center;
text-align: center;
margin: auto;
}
#fascarclublplogo::after {
content: "";
flex: 1;
margin-left: 1rem;
height: 1px;
background-color: #000;
}
#fascarclublplogo::before {
content: "";
flex: 1;
margin-left: 1rem;
height: 1px;
background-color: #000;
}
@media (max-width: 768px) {
.fascarClub--landingPage div#descontos-fc {
flex-direction: column;
margin-top: 40px;
}
.fascarClub--landingPage #fascarClub > div > div {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.fascarClub--landingPage #fascarClub > h2 {
margin-bottom: 20px;
}
.fascarClub--landingPage #descontos-fc > div > img {
width: 150px;
height: auto;
}
.fascarClub--landingPage #descontos-fc > div > span {
font-size: 20px;
margin-left: 0;
margin-bottom: auto;
}
}
.boleto_product {
/* display: none !important; */
}
.zoomWindow,
.zoomPup {
/* display: none !important; */
}
body.produto main {
/* max-width: calc(100% - 40px); */
/* margin: auto; */
}
body.produto .hproduct {
display: flex;
flex-wrap: wrap;
background-color: #ffffff;
padding: 20px;
margin-bottom: 25px;
}
body.produto .hproduct .product-thumb {
/* width: 60%; */
}
body.produto .hproduct .product-thumb #botaoZoom {
background-color: gray;
}
body.produto .hproduct div#show {
display: flex;
flex-direction: column;
}
body.produto .hproduct ul.thumbs {
flex-direction: row;
display: flex;
flex-wrap: wrap;
justify-content: space-evenly;
margin-top: 10px;
}
body.produto .hproduct .productName {
font-family: "Montserrat";
font-weight: bold;
font-size: 25px;
margin-bottom: 15px;
}
body.produto .hproduct .right-panel {
max-width: 440px;
height: 100%;
display: flex;
flex-direction: column;
}
body.produto .hproduct .left-panel {
max-width: 840px;
padding-right: 15px;
}
body.produto .hproduct .skuReference {
font-size: 14px;
font-family: "Montserrat";
margin-bottom: 25px;
color: #acacac;
}
body.produto .hproduct .economia-de,
body.produto .hproduct .preco-a-vista {
display: none !important;
}
.hproduct p.descricao-preco {
display: flex;
flex-direction: row;
flex-wrap: wrap;
}
.hproduct .descricao-preco {
flex-direction: row;
}
body.produto .hproduct .sku-selector-container {
font-family: "Montserrat";
font-size: 14px;
text-transform: none;
}
.hproduct ul.thumbs {
display: flex;
}
body.produto .hproduct #show > ul > li > a > img {
max-height: 115px;
}
body.produto .hproduct #show .thumbs li {
/* padding: 5px; */
max-width: 25% !important;
display: block;
}
body.produto .descricao-preco .price-list-price {
width: 100%;
color: #acacac;
font-style: normal;
font-size: 17px;
}
body.produto .hproduct em.valor-por.price-best-price,
body.produto .hproduct em.valor-dividido.price-installments {
}
body.produto .hproduct em.valor-dividido.price-installments {
}
body.produto .hproduct em.valor-por.price-best-price {
margin-right: 25px;
}
body.produto .hproduct .price-installments,
body.produto .hproduct .price-installments span,
body.produto .hproduct .skuBestInstallmentValue {
font-family: "Montserrat";
font-style: normal;
color: #404040;
font-weight: 500;
font-size: 16px;
margin-top: auto;
}
body.produto .hproduct label.skuBestInstallmentValue {
}
body.produto .hproduct strong.skuBestPrice {
font-family: "Montserrat";
font-size: 29px;
font-style: normal;
}
body.produto .hproduct .product-buy {
/* background-color: #e48f27; */
color: white;
text-transform: capitalize;
justify-content: center;
display: flex;
margin-bottom: 15px;
margin-top: 10px;
flex-direction: column;
}
body.produto .hproduct #caracteristicas > table > tbody > tr.even > td > p {
background-color: #f4f4f4;
width: calc(50% - 10px);
margin: 5px;
padding: 11px;
}
#caracteristicas > table > tbody > tr:nth-child(2) {
display: flex;
/* flex-direction: column; */
width: 100%;
max-width: 100%;
}
#caracteristicas > table > tbody > tr:nth-child(2) > td {
display: flex;
flex-wrap: wrap;
font-weight: 300;
font-family: "Montserrat";
margin: 0 -5px;
}
body.produto th.name-field.Uso-e-Conservacao,
body.produto td.value-field.Uso-e-Conservacao,
.sobreCouros {
font-weight: 300;
font-family: "Montserrat";
text-align: start;
font-size: 14px;
}
body.produto th.name-field.Uso-e-Conservacao,
sobreCouros span {
font-size: 16px;
margin-bottom: 15px;
margin-top: 10px;
}
#caracteristicas > table > tbody > tr:nth-child(2) > th {
text-align: start;
font-weight: 400;
margin-bottom: 20px;
margin-top: 15px;
display: none;
}
body.produto .descricao-preco .price-list-price {
width: 100%;
}
body.produto h4.group.Fascar {
display: none;
}
body.produto .hproduct #caracteristicas > table > tbody > tr.even > td > p,
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p
br:nth-child(1),
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p
br:nth-child(2) {
display: none;
}
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p:nth-child(1),
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p:nth-child(3),
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p:nth-child(5),
body.produto
.hproduct
#caracteristicas
> table
> tbody
> tr.even
> td
> p:nth-child(7) {
display: block;
}
body.produto .hproduct p.flag {
display: none !important;
}
body.produto input.buy-in-page-quantity {
display: none !important;
}
body.produto a.buy-in-page-button {
text-align: center;
}
body.produto a.buy-button.buy-button-ref {
text-align: center;
margin: auto;
}
body.produto .product-buy a {
margin-bottom: 5px;
background-color: #e48f27;
width: 100%;
padding: 15px 10px;
margin-bottom: 5px !important;
}
.product-promoInfo {
display: flex;
flex-direction: column;
color: dimgray;
font-weight: bold;
margin-bottom: auto;
}
body.produto > .bread-crumb {
padding: 10px;
}
.fascar-breadCrumb ul > li.last {
margin-top: 15px !important;
display: block !important;
}
body.produto .fascar-breadCrumb {
background-color: rgb(51, 51, 51);
color: white;
margin-bottom: 25px;
}
body.produto .bread-crumb {
max-width: 1280px;
margin: auto;
}
body.produto .bread-crumb ul {
display: flex;
flex-wrap: wrap;
padding: 5px 0px 0px;
margin-bottom: 15px;
margin-left: 0px;
}
body.produto .bread-crumb ul li {
font-family: Montserrat;
text-transform: uppercase;
font-size: 12px;
margin: 5px 0px;
color: gray;
}
body.produto .bread-crumb ul li:last-child {
font-size: 20px;
color: white !important;
}
body.produto .bread-crumb ul li.last {
font-family: Montserrat;
font-weight: 700;
text-transform: uppercase;
width: 100%;
}
body.produto .bread-crumb ul li a {
color: lightgray;
display: flex;
}
body.produto .bread-crumb ul li a::before {
content: "|";
margin: 0px 5px;
}
body.produto .bread-crumb ul li:nth-child(1) > a::before,
body.produto .bread-crumb ul li.last::before {
content: "";
display: none !important;
}
body.produto .bread-crumb ul li.last a::before {
display: none;
}
body.produto .bread-crumb ul li a:hover {
color: white;
}
body.produto .bread-crumb ul li strong a {
color: white;
}
.product-minictaWidget {
background: #303030;
color: #ffffff;
display: flex;
flex-direction: row;
padding: 10px;
}
.product-minictaWidget > div {
display: flex;
flex-direction: column;
}
.cashback-widget-left {
display: flex;
flex-direction: column;
margin-right: 15px;
padding-top: 15px;
}
.cashback-widget-left span {
width: 100%;
text-align: center;
}
.cashback-widget-right a {
background-color: gray;
width: 100%;
}
.cashback-widget-right {
display: flex;
flex-direction: column;
}
.cashback-widget-right a.botão-fclub {
text-align: center;
color: #303030;
background: #d6d6d6;
width: 100%;
padding: 10px;
margin-top: 15px;
}
.product-minictaWidget span {
font-family: "Montserrat";
font-size: 15px;
}
.product-minictaWidget {
margin-top: auto;
position: relative;
bottom: 0;
/* transform: translateY(-100%); */
}
body.produto .product-buy a.buy-in-page-button {
background: none;
text-decoration: underline !important;
text-transform: uppercase;
border: 1px solid #e48f27;
color: #e48f27;
transition: .3s ease;
}
body.produto .product-buy a.buy-in-page-button:hover {
color: white;
background: #e48f27;
}
body.produto .product-buy a.buy-button {
text-transform: uppercase;
}
.sobreCouros span.title {
text-transform: none;
margin-bottom: 15px;
display: flex;
}
.produto-detalhes.left-panel,
.produto-detalhex-extra.right-panel {
padding-top: 15px;
}
.cashback-detalhe {
text-align: center;
display: flex;
flex-direction: column;
margin-top: auto;
margin-bottom: 0;
}
@media all and (min-width: 600px) {
body.produto .hproduct .left-panel {
width: 60%;
}
body.produto .hproduct .right-panel {
width: 40%;
}
body > main > div > div.hproduct-details.right-panel{
min-height: 840px;
justify-content: space-evenly;
}
body.produto .hproduct #caracteristicas > table > tbody > tr.even > td > p {
background-color: transparent;
width: 100%;
margin: 5px 0px;
padding: 0;
}
}
/* tablet-large */
@media all and (min-width: 601px) and (max-width: 1090px) and (orientation: portrait) {
body.produto .hproduct .left-panel {
width: 50%;
}
body.produto .hproduct .right-panel {
width: 50%;
}
}
/* desktop-x-small-landscape */
@media all and (min-width: 0) and (max-width: 480px) and (orientation: landscape) {
}
/* desktop-x-small */
@media all and (min-width: 0) and (max-width: 480px) and (max-aspect-ratio: 4/3) {
}
/* desktop-small-landscape */
@media all and (min-width: 481px) and (max-width: 840px) and (orientation: landscape) {
}
/* desktop-small */
@media all and (min-width: 481px) and (max-width: 840px) and (max-aspect-ratio: 4/3) {
}
/* desktop-medium-landscape */
@media all and (min-width: 841px) and (max-width: 1280px) and (orientation: landscape) {
}
/* desktop-medium */
@media all and (min-width: 841px) and (max-width: 1280px) and (max-aspect-ratio: 4/3) {
}
/* desktop-large */
@media all and (min-width: 1281px) and (max-width: 1600px) {
}
/* desktop-xlarge */
@media all and (min-width: 1601px) and (max-width: 1920px) {
}
body.produto {
display: flex:
flex-direction: column;
justify-content: center;
}
body.produto main {
width: calc(100% - 40px);
margin: auto;
}
.hproduct {
display: flex;
flex-wrap: wrap;
}
.hproduct .product-thumb {
/* width: 60%; */
}
.hproduct div#show {
display: flex;
flex-direction: column;
}
.hproduct ul.thumbs {
flex-direction: row;
display: flex;
/* min-width: 100px; */
}
.hproduct .productName {
font-family: 'Montserrat';
font-weight: bold;
font-size: 25px;
margin-bottom: 35px;
}
.hproduct .right-panel {
max-width: 440px;
}
.hproduct .left-panel {
max-width: 840px;
}
.hproduct .skuReference {
font-size: 14px;
font-family: 'Montserrat';
margin-bottom: 25px;
color: #ACACAC;
}
.hproduct .economia-de,
.hproduct .preco-a-vista { display: none !important; }
.hproduct p.descricao-preco {
display: flex;
flex-direction: row;
}
.hproduct .descricao-preco {
flex-direction: row;
}
.hproduct .sku-selector-container {
font-family: 'Montserrat';
font-size: 14px;
text-transform: none;
}
ul.thumbs {
/* min-height: 335px; */
}
#show > ul > li > a > img {
height: 335px;
width: 335px;
}
#show .thumbs li {
max-width: 150px;
max-height: 150px;
}
.hproduct-details .skuList.item-dimension-Cor input {
display: none;
}
label.dimension-Cor::before {
content: "";
width: 45px;
height: 16px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border: 2px solid;
display: inline-block;
vertical-align: middle;
margin-right: 12px;
}
label.dimension-Cor {
font-size: 0;
}
label.dimension-Cor.skuespec_Azul.skuespec_Cor_opcao_Azul.skuespec_Cor_opcao_Azul::before {
border-color: blue;
background-color: blue;
}
label.dimension-Cor.skuespec_Preto.skuespec_Cor_opcao_Preto.skuespec_Cor_opcao_Preto::before {
border-color: black;
background-color: black;
}
label.dimension-Cor.espec_0.skuespec_Verde.skuespec_Cor_opcao_Verde.skuespec_Cor_opcao_Verde::before {
border-color: green;
background-color: green;
}
label.dimension-Cor.skuespec_Cor_opcao_Marrom::before {
border-color: brown;
background-color: brown;
}
label.dimension-Cor.skuespec_Cor_opcao_Marrom::before {
border-color: brown;
background-color: brown;
}
label.dimension-Cor.skuespec_Cor_opcao_Marromclaro::before {
border-color: lightsalmon;
background-color: lightsalmon;
}
label.dimension-Cor.skuespec_Cor_opcao_Marrom::before {
border-color: brown;
background-color: brown;
}
#caracteristicas > table > tbody > tr > td > p {
width: fit-content;
}
#caracteristicas > table > tbody > tr:nth-child(1) {}
#caracteristicas > table > tbody > tr:nth-child(1) > th {
display: none;
}
#caracteristicas > table > tbody > tr:nth-child(1) > td {}
#caracteristicas > table > tbody > tr:nth-child(3) {}
#caracteristicas > table > tbody > tr > td > p br {
display: none;
}
.produto-extras-components {
display: none;
}
#caracteristicas > table > tbody > tr:nth-child(2) > td > p:nth-child(7) {
display: none;
width: 100%;
}
.hproduct-details.right-panel .topic.Cor > li.specification {
color: #707070;
font-family: 'Montserrat';
font-size: 14px;
}
#caracteristicas > table > tbody > tr a {
font-weight: bold;
display: contents;
}
#caracteristicas > table > tbody > tr.even > td > br {
display: none;
}
/*
* Copyright (c) 2014 Mike King (@micjamking)
*
* jQuery Succinct plugin
* Version 1.1.0 (October 2014)
*
* Licensed under the MIT License
*/
/*global jQuery*/
(function($) {
'use strict';
$.fn.succinct = function(options) {
var settings = $.extend({
size: 240,
omission: '...',
ignore: true
}, options);
return this.each(function() {
var textDefault,
textTruncated,
elements = $(this),
regex = /[!-\/:-@\[-`{-~]$/,
init = function() {
elements.each(function() {
textDefault = $(this).html();
if (textDefault.length > settings.size) {
textTruncated = $.trim(textDefault)
.substring(0, settings.size)
.split(' ')
.slice(0, -1)
.join(' ');
if (settings.ignore) {
textTruncated = textTruncated.replace(regex, '');
}
$(this).html(textTruncated + settings.omission);
}
});
};
init();
});
};
})(jQuery);
/*
_ _ _ _
___| (_) ___| | __ (_)___
/ __| | |/ __| |/ / | / __|
\__ \ | | (__| < _ | \__ \
|___/_|_|\___|_|\_(_)/ |___/
|__/
Version: 1.9.0
Author: Ken Wheeler
Website: http://kenwheeler.github.io
Docs: http://kenwheeler.github.io/slick
Repo: http://github.com/kenwheeler/slick
Issues: http://github.com/kenwheeler/slick/issues
*/
/* global window, document, define, jQuery, setInterval, clearInterval */
;(function(factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['jquery'], factory);
} else if (typeof exports !== 'undefined') {
module.exports = factory(require('jquery'));
} else {
factory(jQuery);
}
}(function($) {
'use strict';
var Slick = window.Slick || {};
Slick = (function() {
var instanceUid = 0;
function Slick(element, settings) {
var _ = this, dataSettings;
_.defaults = {
accessibility: true,
adaptiveHeight: false,
appendArrows: $(element),
appendDots: $(element),
arrows: true,
asNavFor: null,
prevArrow: '<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',
nextArrow: '<button class="slick-next" aria-label="Next" type="button">Next</button>',
autoplay: false,
autoplaySpeed: 3000,
centerMode: false,
centerPadding: '50px',
cssEase: 'ease',
customPaging: function(slider, i) {
return $('<button type="button" />').text(i + 1);
},
dots: false,
dotsClass: 'slick-dots',
draggable: true,
easing: 'linear',
edgeFriction: 0.35,
fade: false,
focusOnSelect: false,
focusOnChange: false,
infinite: true,
initialSlide: 0,
lazyLoad: 'ondemand',
mobileFirst: false,
pauseOnHover: true,
pauseOnFocus: true,
pauseOnDotsHover: false,
respondTo: 'window',
responsive: null,
rows: 1,
rtl: false,
slide: '',
slidesPerRow: 1,
slidesToShow: 1,
slidesToScroll: 1,
speed: 500,
swipe: true,
swipeToSlide: false,
touchMove: true,
touchThreshold: 5,
useCSS: true,
useTransform: true,
variableWidth: false,
vertical: false,
verticalSwiping: false,
waitForAnimate: true,
zIndex: 1000
};
_.initials = {
animating: false,
dragging: false,
autoPlayTimer: null,
currentDirection: 0,
currentLeft: null,
currentSlide: 0,
direction: 1,
$dots: null,
listWidth: null,
listHeight: null,
loadIndex: 0,
$nextArrow: null,
$prevArrow: null,
scrolling: false,
slideCount: null,
slideWidth: null,
$slideTrack: null,
$slides: null,
sliding: false,
slideOffset: 0,
swipeLeft: null,
swiping: false,
$list: null,
touchObject: {},
transformsEnabled: false,
unslicked: false
};
$.extend(_, _.initials);
_.activeBreakpoint = null;
_.animType = null;
_.animProp = null;
_.breakpoints = [];
_.breakpointSettings = [];
_.cssTransitions = false;
_.focussed = false;
_.interrupted = false;
_.hidden = 'hidden';
_.paused = true;
_.positionProp = null;
_.respondTo = null;
_.rowCount = 1;
_.shouldClick = true;
_.$slider = $(element);
_.$slidesCache = null;
_.transformType = null;
_.transitionType = null;
_.visibilityChange = 'visibilitychange';
_.windowWidth = 0;
_.windowTimer = null;
dataSettings = $(element).data('slick') || {};
_.options = $.extend({}, _.defaults, settings, dataSettings);
_.currentSlide = _.options.initialSlide;
_.originalSettings = _.options;
if (typeof document.mozHidden !== 'undefined') {
_.hidden = 'mozHidden';
_.visibilityChange = 'mozvisibilitychange';
} else if (typeof document.webkitHidden !== 'undefined') {
_.hidden = 'webkitHidden';
_.visibilityChange = 'webkitvisibilitychange';
}
_.autoPlay = $.proxy(_.autoPlay, _);
_.autoPlayClear = $.proxy(_.autoPlayClear, _);
_.autoPlayIterator = $.proxy(_.autoPlayIterator, _);
_.changeSlide = $.proxy(_.changeSlide, _);
_.clickHandler = $.proxy(_.clickHandler, _);
_.selectHandler = $.proxy(_.selectHandler, _);
_.setPosition = $.proxy(_.setPosition, _);
_.swipeHandler = $.proxy(_.swipeHandler, _);
_.dragHandler = $.proxy(_.dragHandler, _);
_.keyHandler = $.proxy(_.keyHandler, _);
_.instanceUid = instanceUid++;
// A simple way to check for HTML strings
// Strict HTML recognition (must start with <)
// Extracted from jQuery v1.11 source
_.htmlExpr = /^(?:\s*(<[\w\W]+>)[^>]*)$/;
_.registerBreakpoints();
_.init(true);
}
return Slick;
}());
Slick.prototype.activateADA = function() {
var _ = this;
_.$slideTrack.find('.slick-active').attr({
'aria-hidden': 'false'
}).find('a, input, button, select').attr({
'tabindex': '0'
});
};
Slick.prototype.addSlide = Slick.prototype.slickAdd = function(markup, index, addBefore) {
var _ = this;
if (typeof(index) === 'boolean') {
addBefore = index;
index = null;
} else if (index < 0 || (index >= _.slideCount)) {
return false;
}
_.unload();
if (typeof(index) === 'number') {
if (index === 0 && _.$slides.length === 0) {
$(markup).appendTo(_.$slideTrack);
} else if (addBefore) {
$(markup).insertBefore(_.$slides.eq(index));
} else {
$(markup).insertAfter(_.$slides.eq(index));
}
} else {
if (addBefore === true) {
$(markup).prependTo(_.$slideTrack);
} else {
$(markup).appendTo(_.$slideTrack);
}
}
_.$slides = _.$slideTrack.children(this.options.slide);
_.$slideTrack.children(this.options.slide).detach();
_.$slideTrack.append(_.$slides);
_.$slides.each(function(index, element) {
$(element).attr('data-slick-index', index);
});
_.$slidesCache = _.$slides;
_.reinit();
};
Slick.prototype.animateHeight = function() {
var _ = this;
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
_.$list.animate({
height: targetHeight
}, _.options.speed);
}
};
Slick.prototype.animateSlide = function(targetLeft, callback) {
var animProps = {},
_ = this;
_.animateHeight();
if (_.options.rtl === true && _.options.vertical === false) {
targetLeft = -targetLeft;
}
if (_.transformsEnabled === false) {
if (_.options.vertical === false) {
_.$slideTrack.animate({
left: targetLeft
}, _.options.speed, _.options.easing, callback);
} else {
_.$slideTrack.animate({
top: targetLeft
}, _.options.speed, _.options.easing, callback);
}
} else {
if (_.cssTransitions === false) {
if (_.options.rtl === true) {
_.currentLeft = -(_.currentLeft);
}
$({
animStart: _.currentLeft
}).animate({
animStart: targetLeft
}, {
duration: _.options.speed,
easing: _.options.easing,
step: function(now) {
now = Math.ceil(now);
if (_.options.vertical === false) {
animProps[_.animType] = 'translate(' +
now + 'px, 0px)';
_.$slideTrack.css(animProps);
} else {
animProps[_.animType] = 'translate(0px,' +
now + 'px)';
_.$slideTrack.css(animProps);
}
},
complete: function() {
if (callback) {
callback.call();
}
}
});
} else {
_.applyTransition();
targetLeft = Math.ceil(targetLeft);
if (_.options.vertical === false) {
animProps[_.animType] = 'translate3d(' + targetLeft + 'px, 0px, 0px)';
} else {
animProps[_.animType] = 'translate3d(0px,' + targetLeft + 'px, 0px)';
}
_.$slideTrack.css(animProps);
if (callback) {
setTimeout(function() {
_.disableTransition();
callback.call();
}, _.options.speed);
}
}
}
};
Slick.prototype.getNavTarget = function() {
var _ = this,
asNavFor = _.options.asNavFor;
if ( asNavFor && asNavFor !== null ) {
asNavFor = $(asNavFor).not(_.$slider);
}
return asNavFor;
};
Slick.prototype.asNavFor = function(index) {
var _ = this,
asNavFor = _.getNavTarget();
if ( asNavFor !== null && typeof asNavFor === 'object' ) {
asNavFor.each(function() {
var target = $(this).slick('getSlick');
if(!target.unslicked) {
target.slideHandler(index, true);
}
});
}
};
Slick.prototype.applyTransition = function(slide) {
var _ = this,
transition = {};
if (_.options.fade === false) {
transition[_.transitionType] = _.transformType + ' ' + _.options.speed + 'ms ' + _.options.cssEase;
} else {
transition[_.transitionType] = 'opacity ' + _.options.speed + 'ms ' + _.options.cssEase;
}
if (_.options.fade === false) {
_.$slideTrack.css(transition);
} else {
_.$slides.eq(slide).css(transition);
}
};
Slick.prototype.autoPlay = function() {
var _ = this;
_.autoPlayClear();
if ( _.slideCount > _.options.slidesToShow ) {
_.autoPlayTimer = setInterval( _.autoPlayIterator, _.options.autoplaySpeed );
}
};
Slick.prototype.autoPlayClear = function() {
var _ = this;
if (_.autoPlayTimer) {
clearInterval(_.autoPlayTimer);
}
};
Slick.prototype.autoPlayIterator = function() {
var _ = this,
slideTo = _.currentSlide + _.options.slidesToScroll;
if ( !_.paused && !_.interrupted && !_.focussed ) {
if ( _.options.infinite === false ) {
if ( _.direction === 1 && ( _.currentSlide + 1 ) === ( _.slideCount - 1 )) {
_.direction = 0;
}
else if ( _.direction === 0 ) {
slideTo = _.currentSlide - _.options.slidesToScroll;
if ( _.currentSlide - 1 === 0 ) {
_.direction = 1;
}
}
}
_.slideHandler( slideTo );
}
};
Slick.prototype.buildArrows = function() {
var _ = this;
if (_.options.arrows === true ) {
_.$prevArrow = $(_.options.prevArrow).addClass('slick-arrow');
_.$nextArrow = $(_.options.nextArrow).addClass('slick-arrow');
if( _.slideCount > _.options.slidesToShow ) {
_.$prevArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
_.$nextArrow.removeClass('slick-hidden').removeAttr('aria-hidden tabindex');
if (_.htmlExpr.test(_.options.prevArrow)) {
_.$prevArrow.prependTo(_.options.appendArrows);
}
if (_.htmlExpr.test(_.options.nextArrow)) {
_.$nextArrow.appendTo(_.options.appendArrows);
}
if (_.options.infinite !== true) {
_.$prevArrow
.addClass('slick-disabled')
.attr('aria-disabled', 'true');
}
} else {
_.$prevArrow.add( _.$nextArrow )
.addClass('slick-hidden')
.attr({
'aria-disabled': 'true',
'tabindex': '-1'
});
}
}
};
Slick.prototype.buildDots = function() {
var _ = this,
i, dot;
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
_.$slider.addClass('slick-dotted');
dot = $('<ul />').addClass(_.options.dotsClass);
for (i = 0; i <= _.getDotCount(); i += 1) {
dot.append($('<li />').append(_.options.customPaging.call(this, _, i)));
}
_.$dots = dot.appendTo(_.options.appendDots);
_.$dots.find('li').first().addClass('slick-active');
}
};
Slick.prototype.buildOut = function() {
var _ = this;
_.$slides =
_.$slider
.children( _.options.slide + ':not(.slick-cloned)')
.addClass('slick-slide');
_.slideCount = _.$slides.length;
_.$slides.each(function(index, element) {
$(element)
.attr('data-slick-index', index)
.data('originalStyling', $(element).attr('style') || '');
});
_.$slider.addClass('slick-slider');
_.$slideTrack = (_.slideCount === 0) ?
$('<div class="slick-track"/>').appendTo(_.$slider) :
_.$slides.wrapAll('<div class="slick-track"/>').parent();
_.$list = _.$slideTrack.wrap(
'<div class="slick-list"/>').parent();
_.$slideTrack.css('opacity', 0);
if (_.options.centerMode === true || _.options.swipeToSlide === true) {
_.options.slidesToScroll = 1;
}
$('img[data-lazy]', _.$slider).not('[src]').addClass('slick-loading');
_.setupInfinite();
_.buildArrows();
_.buildDots();
_.updateDots();
_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
if (_.options.draggable === true) {
_.$list.addClass('draggable');
}
};
Slick.prototype.buildRows = function() {
var _ = this, a, b, c, newSlides, numOfSlides, originalSlides,slidesPerSection;
newSlides = document.createDocumentFragment();
originalSlides = _.$slider.children();
if(_.options.rows > 0) {
slidesPerSection = _.options.slidesPerRow * _.options.rows;
numOfSlides = Math.ceil(
originalSlides.length / slidesPerSection
);
for(a = 0; a < numOfSlides; a++){
var slide = document.createElement('div');
for(b = 0; b < _.options.rows; b++) {
var row = document.createElement('div');
for(c = 0; c < _.options.slidesPerRow; c++) {
var target = (a * slidesPerSection + ((b * _.options.slidesPerRow) + c));
if (originalSlides.get(target)) {
row.appendChild(originalSlides.get(target));
}
}
slide.appendChild(row);
}
newSlides.appendChild(slide);
}
_.$slider.empty().append(newSlides);
_.$slider.children().children().children()
.css({
'width':(100 / _.options.slidesPerRow) + '%',
'display': 'inline-block'
});
}
};
Slick.prototype.checkResponsive = function(initial, forceUpdate) {
var _ = this,
breakpoint, targetBreakpoint, respondToWidth, triggerBreakpoint = false;
var sliderWidth = _.$slider.width();
var windowWidth = window.innerWidth || $(window).width();
if (_.respondTo === 'window') {
respondToWidth = windowWidth;
} else if (_.respondTo === 'slider') {
respondToWidth = sliderWidth;
} else if (_.respondTo === 'min') {
respondToWidth = Math.min(windowWidth, sliderWidth);
}
if ( _.options.responsive &&
_.options.responsive.length &&
_.options.responsive !== null) {
targetBreakpoint = null;
for (breakpoint in _.breakpoints) {
if (_.breakpoints.hasOwnProperty(breakpoint)) {
if (_.originalSettings.mobileFirst === false) {
if (respondToWidth < _.breakpoints[breakpoint]) {
targetBreakpoint = _.breakpoints[breakpoint];
}
} else {
if (respondToWidth > _.breakpoints[breakpoint]) {
targetBreakpoint = _.breakpoints[breakpoint];
}
}
}
}
if (targetBreakpoint !== null) {
if (_.activeBreakpoint !== null) {
if (targetBreakpoint !== _.activeBreakpoint || forceUpdate) {
_.activeBreakpoint =
targetBreakpoint;
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
_.unslick(targetBreakpoint);
} else {
_.options = $.extend({}, _.originalSettings,
_.breakpointSettings[
targetBreakpoint]);
if (initial === true) {
_.currentSlide = _.options.initialSlide;
}
_.refresh(initial);
}
triggerBreakpoint = targetBreakpoint;
}
} else {
_.activeBreakpoint = targetBreakpoint;
if (_.breakpointSettings[targetBreakpoint] === 'unslick') {
_.unslick(targetBreakpoint);
} else {
_.options = $.extend({}, _.originalSettings,
_.breakpointSettings[
targetBreakpoint]);
if (initial === true) {
_.currentSlide = _.options.initialSlide;
}
_.refresh(initial);
}
triggerBreakpoint = targetBreakpoint;
}
} else {
if (_.activeBreakpoint !== null) {
_.activeBreakpoint = null;
_.options = _.originalSettings;
if (initial === true) {
_.currentSlide = _.options.initialSlide;
}
_.refresh(initial);
triggerBreakpoint = targetBreakpoint;
}
}
// only trigger breakpoints during an actual break. not on initialize.
if( !initial && triggerBreakpoint !== false ) {
_.$slider.trigger('breakpoint', [_, triggerBreakpoint]);
}
}
};
Slick.prototype.changeSlide = function(event, dontAnimate) {
var _ = this,
$target = $(event.currentTarget),
indexOffset, slideOffset, unevenOffset;
// If target is a link, prevent default action.
if($target.is('a')) {
event.preventDefault();
}
// If target is not the <li> element (ie: a child), find the <li>.
if(!$target.is('li')) {
$target = $target.closest('li');
}
unevenOffset = (_.slideCount % _.options.slidesToScroll !== 0);
indexOffset = unevenOffset ? 0 : (_.slideCount - _.currentSlide) % _.options.slidesToScroll;
switch (event.data.message) {
case 'previous':
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : _.options.slidesToShow - indexOffset;
if (_.slideCount > _.options.slidesToShow) {
_.slideHandler(_.currentSlide - slideOffset, false, dontAnimate);
}
break;
case 'next':
slideOffset = indexOffset === 0 ? _.options.slidesToScroll : indexOffset;
if (_.slideCount > _.options.slidesToShow) {
_.slideHandler(_.currentSlide + slideOffset, false, dontAnimate);
}
break;
case 'index':
var index = event.data.index === 0 ? 0 :
event.data.index || $target.index() * _.options.slidesToScroll;
_.slideHandler(_.checkNavigable(index), false, dontAnimate);
$target.children().trigger('focus');
break;
default:
return;
}
};
Slick.prototype.checkNavigable = function(index) {
var _ = this,
navigables, prevNavigable;
navigables = _.getNavigableIndexes();
prevNavigable = 0;
if (index > navigables[navigables.length - 1]) {
index = navigables[navigables.length - 1];
} else {
for (var n in navigables) {
if (index < navigables[n]) {
index = prevNavigable;
break;
}
prevNavigable = navigables[n];
}
}
return index;
};
Slick.prototype.cleanUpEvents = function() {
var _ = this;
if (_.options.dots && _.$dots !== null) {
$('li', _.$dots)
.off('click.slick', _.changeSlide)
.off('mouseenter.slick', $.proxy(_.interrupt, _, true))
.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
if (_.options.accessibility === true) {
_.$dots.off('keydown.slick', _.keyHandler);
}
}
_.$slider.off('focus.slick blur.slick');
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
_.$prevArrow && _.$prevArrow.off('click.slick', _.changeSlide);
_.$nextArrow && _.$nextArrow.off('click.slick', _.changeSlide);
if (_.options.accessibility === true) {
_.$prevArrow && _.$prevArrow.off('keydown.slick', _.keyHandler);
_.$nextArrow && _.$nextArrow.off('keydown.slick', _.keyHandler);
}
}
_.$list.off('touchstart.slick mousedown.slick', _.swipeHandler);
_.$list.off('touchmove.slick mousemove.slick', _.swipeHandler);
_.$list.off('touchend.slick mouseup.slick', _.swipeHandler);
_.$list.off('touchcancel.slick mouseleave.slick', _.swipeHandler);
_.$list.off('click.slick', _.clickHandler);
$(document).off(_.visibilityChange, _.visibility);
_.cleanUpSlideEvents();
if (_.options.accessibility === true) {
_.$list.off('keydown.slick', _.keyHandler);
}
if (_.options.focusOnSelect === true) {
$(_.$slideTrack).children().off('click.slick', _.selectHandler);
}
$(window).off('orientationchange.slick.slick-' + _.instanceUid, _.orientationChange);
$(window).off('resize.slick.slick-' + _.instanceUid, _.resize);
$('[draggable!=true]', _.$slideTrack).off('dragstart', _.preventDefault);
$(window).off('load.slick.slick-' + _.instanceUid, _.setPosition);
};
Slick.prototype.cleanUpSlideEvents = function() {
var _ = this;
_.$list.off('mouseenter.slick', $.proxy(_.interrupt, _, true));
_.$list.off('mouseleave.slick', $.proxy(_.interrupt, _, false));
};
Slick.prototype.cleanUpRows = function() {
var _ = this, originalSlides;
if(_.options.rows > 0) {
originalSlides = _.$slides.children().children();
originalSlides.removeAttr('style');
_.$slider.empty().append(originalSlides);
}
};
Slick.prototype.clickHandler = function(event) {
var _ = this;
if (_.shouldClick === false) {
event.stopImmediatePropagation();
event.stopPropagation();
event.preventDefault();
}
};
Slick.prototype.destroy = function(refresh) {
var _ = this;
_.autoPlayClear();
_.touchObject = {};
_.cleanUpEvents();
$('.slick-cloned', _.$slider).detach();
if (_.$dots) {
_.$dots.remove();
}
if ( _.$prevArrow && _.$prevArrow.length ) {
_.$prevArrow
.removeClass('slick-disabled slick-arrow slick-hidden')
.removeAttr('aria-hidden aria-disabled tabindex')
.css('display','');
if ( _.htmlExpr.test( _.options.prevArrow )) {
_.$prevArrow.remove();
}
}
if ( _.$nextArrow && _.$nextArrow.length ) {
_.$nextArrow
.removeClass('slick-disabled slick-arrow slick-hidden')
.removeAttr('aria-hidden aria-disabled tabindex')
.css('display','');
if ( _.htmlExpr.test( _.options.nextArrow )) {
_.$nextArrow.remove();
}
}
if (_.$slides) {
_.$slides
.removeClass('slick-slide slick-active slick-center slick-visible slick-current')
.removeAttr('aria-hidden')
.removeAttr('data-slick-index')
.each(function(){
$(this).attr('style', $(this).data('originalStyling'));
});
_.$slideTrack.children(this.options.slide).detach();
_.$slideTrack.detach();
_.$list.detach();
_.$slider.append(_.$slides);
}
_.cleanUpRows();
_.$slider.removeClass('slick-slider');
_.$slider.removeClass('slick-initialized');
_.$slider.removeClass('slick-dotted');
_.unslicked = true;
if(!refresh) {
_.$slider.trigger('destroy', [_]);
}
};
Slick.prototype.disableTransition = function(slide) {
var _ = this,
transition = {};
transition[_.transitionType] = '';
if (_.options.fade === false) {
_.$slideTrack.css(transition);
} else {
_.$slides.eq(slide).css(transition);
}
};
Slick.prototype.fadeSlide = function(slideIndex, callback) {
var _ = this;
if (_.cssTransitions === false) {
_.$slides.eq(slideIndex).css({
zIndex: _.options.zIndex
});
_.$slides.eq(slideIndex).animate({
opacity: 1
}, _.options.speed, _.options.easing, callback);
} else {
_.applyTransition(slideIndex);
_.$slides.eq(slideIndex).css({
opacity: 1,
zIndex: _.options.zIndex
});
if (callback) {
setTimeout(function() {
_.disableTransition(slideIndex);
callback.call();
}, _.options.speed);
}
}
};
Slick.prototype.fadeSlideOut = function(slideIndex) {
var _ = this;
if (_.cssTransitions === false) {
_.$slides.eq(slideIndex).animate({
opacity: 0,
zIndex: _.options.zIndex - 2
}, _.options.speed, _.options.easing);
} else {
_.applyTransition(slideIndex);
_.$slides.eq(slideIndex).css({
opacity: 0,
zIndex: _.options.zIndex - 2
});
}
};
Slick.prototype.filterSlides = Slick.prototype.slickFilter = function(filter) {
var _ = this;
if (filter !== null) {
_.$slidesCache = _.$slides;
_.unload();
_.$slideTrack.children(this.options.slide).detach();
_.$slidesCache.filter(filter).appendTo(_.$slideTrack);
_.reinit();
}
};
Slick.prototype.focusHandler = function() {
var _ = this;
// If any child element receives focus within the slider we need to pause the autoplay
_.$slider
.off('focus.slick blur.slick')
.on(
'focus.slick',
'*',
function(event) {
var $sf = $(this);
setTimeout(function() {
if( _.options.pauseOnFocus ) {
if ($sf.is(':focus')) {
_.focussed = true;
_.autoPlay();
}
}
}, 0);
}
).on(
'blur.slick',
'*',
function(event) {
var $sf = $(this);
// When a blur occurs on any elements within the slider we become unfocused
if( _.options.pauseOnFocus ) {
_.focussed = false;
_.autoPlay();
}
}
);
};
Slick.prototype.getCurrent = Slick.prototype.slickCurrentSlide = function() {
var _ = this;
return _.currentSlide;
};
Slick.prototype.getDotCount = function() {
var _ = this;
var breakPoint = 0;
var counter = 0;
var pagerQty = 0;
if (_.options.infinite === true) {
if (_.slideCount <= _.options.slidesToShow) {
++pagerQty;
} else {
while (breakPoint < _.slideCount) {
++pagerQty;
breakPoint = counter + _.options.slidesToScroll;
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
}
}
} else if (_.options.centerMode === true) {
pagerQty = _.slideCount;
} else if(!_.options.asNavFor) {
pagerQty = 1 + Math.ceil((_.slideCount - _.options.slidesToShow) / _.options.slidesToScroll);
}else {
while (breakPoint < _.slideCount) {
++pagerQty;
breakPoint = counter + _.options.slidesToScroll;
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
}
}
return pagerQty - 1;
};
Slick.prototype.getLeft = function(slideIndex) {
var _ = this,
targetLeft,
verticalHeight,
verticalOffset = 0,
targetSlide,
coef;
_.slideOffset = 0;
verticalHeight = _.$slides.first().outerHeight(true);
if (_.options.infinite === true) {
if (_.slideCount > _.options.slidesToShow) {
_.slideOffset = (_.slideWidth * _.options.slidesToShow) * -1;
coef = -1
if (_.options.vertical === true && _.options.centerMode === true) {
if (_.options.slidesToShow === 2) {
coef = -1.5;
} else if (_.options.slidesToShow === 1) {
coef = -2
}
}
verticalOffset = (verticalHeight * _.options.slidesToShow) * coef;
}
if (_.slideCount % _.options.slidesToScroll !== 0) {
if (slideIndex + _.options.slidesToScroll > _.slideCount && _.slideCount > _.options.slidesToShow) {
if (slideIndex > _.slideCount) {
_.slideOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * _.slideWidth) * -1;
verticalOffset = ((_.options.slidesToShow - (slideIndex - _.slideCount)) * verticalHeight) * -1;
} else {
_.slideOffset = ((_.slideCount % _.options.slidesToScroll) * _.slideWidth) * -1;
verticalOffset = ((_.slideCount % _.options.slidesToScroll) * verticalHeight) * -1;
}
}
}
} else {
if (slideIndex + _.options.slidesToShow > _.slideCount) {
_.slideOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * _.slideWidth;
verticalOffset = ((slideIndex + _.options.slidesToShow) - _.slideCount) * verticalHeight;
}
}
if (_.slideCount <= _.options.slidesToShow) {
_.slideOffset = 0;
verticalOffset = 0;
}
if (_.options.centerMode === true && _.slideCount <= _.options.slidesToShow) {
_.slideOffset = ((_.slideWidth * Math.floor(_.options.slidesToShow)) / 2) - ((_.slideWidth * _.slideCount) / 2);
} else if (_.options.centerMode === true && _.options.infinite === true) {
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2) - _.slideWidth;
} else if (_.options.centerMode === true) {
_.slideOffset = 0;
_.slideOffset += _.slideWidth * Math.floor(_.options.slidesToShow / 2);
}
if (_.options.vertical === false) {
targetLeft = ((slideIndex * _.slideWidth) * -1) + _.slideOffset;
} else {
targetLeft = ((slideIndex * verticalHeight) * -1) + verticalOffset;
}
if (_.options.variableWidth === true) {
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
} else {
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow);
}
if (_.options.rtl === true) {
if (targetSlide[0]) {
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
} else {
targetLeft = 0;
}
} else {
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
}
if (_.options.centerMode === true) {
if (_.slideCount <= _.options.slidesToShow || _.options.infinite === false) {
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex);
} else {
targetSlide = _.$slideTrack.children('.slick-slide').eq(slideIndex + _.options.slidesToShow + 1);
}
if (_.options.rtl === true) {
if (targetSlide[0]) {
targetLeft = (_.$slideTrack.width() - targetSlide[0].offsetLeft - targetSlide.width()) * -1;
} else {
targetLeft = 0;
}
} else {
targetLeft = targetSlide[0] ? targetSlide[0].offsetLeft * -1 : 0;
}
targetLeft += (_.$list.width() - targetSlide.outerWidth()) / 2;
}
}
return targetLeft;
};
Slick.prototype.getOption = Slick.prototype.slickGetOption = function(option) {
var _ = this;
return _.options[option];
};
Slick.prototype.getNavigableIndexes = function() {
var _ = this,
breakPoint = 0,
counter = 0,
indexes = [],
max;
if (_.options.infinite === false) {
max = _.slideCount;
} else {
breakPoint = _.options.slidesToScroll * -1;
counter = _.options.slidesToScroll * -1;
max = _.slideCount * 2;
}
while (breakPoint < max) {
indexes.push(breakPoint);
breakPoint = counter + _.options.slidesToScroll;
counter += _.options.slidesToScroll <= _.options.slidesToShow ? _.options.slidesToScroll : _.options.slidesToShow;
}
return indexes;
};
Slick.prototype.getSlick = function() {
return this;
};
Slick.prototype.getSlideCount = function() {
var _ = this,
slidesTraversed, swipedSlide, swipeTarget, centerOffset;
centerOffset = _.options.centerMode === true ? Math.floor(_.$list.width() / 2) : 0;
swipeTarget = (_.swipeLeft * -1) + centerOffset;
if (_.options.swipeToSlide === true) {
_.$slideTrack.find('.slick-slide').each(function(index, slide) {
var slideOuterWidth, slideOffset, slideRightBoundary;
slideOuterWidth = $(slide).outerWidth();
slideOffset = slide.offsetLeft;
if (_.options.centerMode !== true) {
slideOffset += (slideOuterWidth / 2);
}
slideRightBoundary = slideOffset + (slideOuterWidth);
if (swipeTarget < slideRightBoundary) {
swipedSlide = slide;
return false;
}
});
slidesTraversed = Math.abs($(swipedSlide).attr('data-slick-index') - _.currentSlide) || 1;
return slidesTraversed;
} else {
return _.options.slidesToScroll;
}
};
Slick.prototype.goTo = Slick.prototype.slickGoTo = function(slide, dontAnimate) {
var _ = this;
_.changeSlide({
data: {
message: 'index',
index: parseInt(slide)
}
}, dontAnimate);
};
Slick.prototype.init = function(creation) {
var _ = this;
if (!$(_.$slider).hasClass('slick-initialized')) {
$(_.$slider).addClass('slick-initialized');
_.buildRows();
_.buildOut();
_.setProps();
_.startLoad();
_.loadSlider();
_.initializeEvents();
_.updateArrows();
_.updateDots();
_.checkResponsive(true);
_.focusHandler();
}
if (creation) {
_.$slider.trigger('init', [_]);
}
if (_.options.accessibility === true) {
_.initADA();
}
if ( _.options.autoplay ) {
_.paused = false;
_.autoPlay();
}
};
Slick.prototype.initADA = function() {
var _ = this,
numDotGroups = Math.ceil(_.slideCount / _.options.slidesToShow),
tabControlIndexes = _.getNavigableIndexes().filter(function(val) {
return (val >= 0) && (val < _.slideCount);
});
_.$slides.add(_.$slideTrack.find('.slick-cloned')).attr({
'aria-hidden': 'true',
'tabindex': '-1'
}).find('a, input, button, select').attr({
'tabindex': '-1'
});
if (_.$dots !== null) {
_.$slides.not(_.$slideTrack.find('.slick-cloned')).each(function(i) {
var slideControlIndex = tabControlIndexes.indexOf(i);
$(this).attr({
'role': 'tabpanel',
'id': 'slick-slide' + _.instanceUid + i,
'tabindex': -1
});
if (slideControlIndex !== -1) {
var ariaButtonControl = 'slick-slide-control' + _.instanceUid + slideControlIndex
if ($('#' + ariaButtonControl).length) {
$(this).attr({
'aria-describedby': ariaButtonControl
});
}
}
});
_.$dots.attr('role', 'tablist').find('li').each(function(i) {
var mappedSlideIndex = tabControlIndexes[i];
$(this).attr({
'role': 'presentation'
});
$(this).find('button').first().attr({
'role': 'tab',
'id': 'slick-slide-control' + _.instanceUid + i,
'aria-controls': 'slick-slide' + _.instanceUid + mappedSlideIndex,
'aria-label': (i + 1) + ' of ' + numDotGroups,
'aria-selected': null,
'tabindex': '-1'
});
}).eq(_.currentSlide).find('button').attr({
'aria-selected': 'true',
'tabindex': '0'
}).end();
}
for (var i=_.currentSlide, max=i+_.options.slidesToShow; i < max; i++) {
if (_.options.focusOnChange) {
_.$slides.eq(i).attr({'tabindex': '0'});
} else {
_.$slides.eq(i).removeAttr('tabindex');
}
}
_.activateADA();
};
Slick.prototype.initArrowEvents = function() {
var _ = this;
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
_.$prevArrow
.off('click.slick')
.on('click.slick', {
message: 'previous'
}, _.changeSlide);
_.$nextArrow
.off('click.slick')
.on('click.slick', {
message: 'next'
}, _.changeSlide);
if (_.options.accessibility === true) {
_.$prevArrow.on('keydown.slick', _.keyHandler);
_.$nextArrow.on('keydown.slick', _.keyHandler);
}
}
};
Slick.prototype.initDotEvents = function() {
var _ = this;
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
$('li', _.$dots).on('click.slick', {
message: 'index'
}, _.changeSlide);
if (_.options.accessibility === true) {
_.$dots.on('keydown.slick', _.keyHandler);
}
}
if (_.options.dots === true && _.options.pauseOnDotsHover === true && _.slideCount > _.options.slidesToShow) {
$('li', _.$dots)
.on('mouseenter.slick', $.proxy(_.interrupt, _, true))
.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
}
};
Slick.prototype.initSlideEvents = function() {
var _ = this;
if ( _.options.pauseOnHover ) {
_.$list.on('mouseenter.slick', $.proxy(_.interrupt, _, true));
_.$list.on('mouseleave.slick', $.proxy(_.interrupt, _, false));
}
};
Slick.prototype.initializeEvents = function() {
var _ = this;
_.initArrowEvents();
_.initDotEvents();
_.initSlideEvents();
_.$list.on('touchstart.slick mousedown.slick', {
action: 'start'
}, _.swipeHandler);
_.$list.on('touchmove.slick mousemove.slick', {
action: 'move'
}, _.swipeHandler);
_.$list.on('touchend.slick mouseup.slick', {
action: 'end'
}, _.swipeHandler);
_.$list.on('touchcancel.slick mouseleave.slick', {
action: 'end'
}, _.swipeHandler);
_.$list.on('click.slick', _.clickHandler);
$(document).on(_.visibilityChange, $.proxy(_.visibility, _));
if (_.options.accessibility === true) {
_.$list.on('keydown.slick', _.keyHandler);
}
if (_.options.focusOnSelect === true) {
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
}
$(window).on('orientationchange.slick.slick-' + _.instanceUid, $.proxy(_.orientationChange, _));
$(window).on('resize.slick.slick-' + _.instanceUid, $.proxy(_.resize, _));
$('[draggable!=true]', _.$slideTrack).on('dragstart', _.preventDefault);
$(window).on('load.slick.slick-' + _.instanceUid, _.setPosition);
$(_.setPosition);
};
Slick.prototype.initUI = function() {
var _ = this;
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
_.$prevArrow.show();
_.$nextArrow.show();
}
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
_.$dots.show();
}
};
Slick.prototype.keyHandler = function(event) {
var _ = this;
//Dont slide if the cursor is inside the form fields and arrow keys are pressed
if(!event.target.tagName.match('TEXTAREA|INPUT|SELECT')) {
if (event.keyCode === 37 && _.options.accessibility === true) {
_.changeSlide({
data: {
message: _.options.rtl === true ? 'next' : 'previous'
}
});
} else if (event.keyCode === 39 && _.options.accessibility === true) {
_.changeSlide({
data: {
message: _.options.rtl === true ? 'previous' : 'next'
}
});
}
}
};
Slick.prototype.lazyLoad = function() {
var _ = this,
loadRange, cloneRange, rangeStart, rangeEnd;
function loadImages(imagesScope) {
$('img[data-lazy]', imagesScope).each(function() {
var image = $(this),
imageSource = $(this).attr('data-lazy'),
imageSrcSet = $(this).attr('data-srcset'),
imageSizes = $(this).attr('data-sizes') || _.$slider.attr('data-sizes'),
imageToLoad = document.createElement('img');
imageToLoad.onload = function() {
image
.animate({ opacity: 0 }, 100, function() {
if (imageSrcSet) {
image
.attr('srcset', imageSrcSet );
if (imageSizes) {
image
.attr('sizes', imageSizes );
}
}
image
.attr('src', imageSource)
.animate({ opacity: 1 }, 200, function() {
image
.removeAttr('data-lazy data-srcset data-sizes')
.removeClass('slick-loading');
});
_.$slider.trigger('lazyLoaded', [_, image, imageSource]);
});
};
imageToLoad.onerror = function() {
image
.removeAttr( 'data-lazy' )
.removeClass( 'slick-loading' )
.addClass( 'slick-lazyload-error' );
_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
};
imageToLoad.src = imageSource;
});
}
if (_.options.centerMode === true) {
if (_.options.infinite === true) {
rangeStart = _.currentSlide + (_.options.slidesToShow / 2 + 1);
rangeEnd = rangeStart + _.options.slidesToShow + 2;
} else {
rangeStart = Math.max(0, _.currentSlide - (_.options.slidesToShow / 2 + 1));
rangeEnd = 2 + (_.options.slidesToShow / 2 + 1) + _.currentSlide;
}
} else {
rangeStart = _.options.infinite ? _.options.slidesToShow + _.currentSlide : _.currentSlide;
rangeEnd = Math.ceil(rangeStart + _.options.slidesToShow);
if (_.options.fade === true) {
if (rangeStart > 0) rangeStart--;
if (rangeEnd <= _.slideCount) rangeEnd++;
}
}
loadRange = _.$slider.find('.slick-slide').slice(rangeStart, rangeEnd);
if (_.options.lazyLoad === 'anticipated') {
var prevSlide = rangeStart - 1,
nextSlide = rangeEnd,
$slides = _.$slider.find('.slick-slide');
for (var i = 0; i < _.options.slidesToScroll; i++) {
if (prevSlide < 0) prevSlide = _.slideCount - 1;
loadRange = loadRange.add($slides.eq(prevSlide));
loadRange = loadRange.add($slides.eq(nextSlide));
prevSlide--;
nextSlide++;
}
}
loadImages(loadRange);
if (_.slideCount <= _.options.slidesToShow) {
cloneRange = _.$slider.find('.slick-slide');
loadImages(cloneRange);
} else
if (_.currentSlide >= _.slideCount - _.options.slidesToShow) {
cloneRange = _.$slider.find('.slick-cloned').slice(0, _.options.slidesToShow);
loadImages(cloneRange);
} else if (_.currentSlide === 0) {
cloneRange = _.$slider.find('.slick-cloned').slice(_.options.slidesToShow * -1);
loadImages(cloneRange);
}
};
Slick.prototype.loadSlider = function() {
var _ = this;
_.setPosition();
_.$slideTrack.css({
opacity: 1
});
_.$slider.removeClass('slick-loading');
_.initUI();
if (_.options.lazyLoad === 'progressive') {
_.progressiveLazyLoad();
}
};
Slick.prototype.next = Slick.prototype.slickNext = function() {
var _ = this;
_.changeSlide({
data: {
message: 'next'
}
});
};
Slick.prototype.orientationChange = function() {
var _ = this;
_.checkResponsive();
_.setPosition();
};
Slick.prototype.pause = Slick.prototype.slickPause = function() {
var _ = this;
_.autoPlayClear();
_.paused = true;
};
Slick.prototype.play = Slick.prototype.slickPlay = function() {
var _ = this;
_.autoPlay();
_.options.autoplay = true;
_.paused = false;
_.focussed = false;
_.interrupted = false;
};
Slick.prototype.postSlide = function(index) {
var _ = this;
if( !_.unslicked ) {
_.$slider.trigger('afterChange', [_, index]);
_.animating = false;
if (_.slideCount > _.options.slidesToShow) {
_.setPosition();
}
_.swipeLeft = null;
if ( _.options.autoplay ) {
_.autoPlay();
}
if (_.options.accessibility === true) {
_.initADA();
if (_.options.focusOnChange) {
var $currentSlide = $(_.$slides.get(_.currentSlide));
$currentSlide.attr('tabindex', 0).focus();
}
}
}
};
Slick.prototype.prev = Slick.prototype.slickPrev = function() {
var _ = this;
_.changeSlide({
data: {
message: 'previous'
}
});
};
Slick.prototype.preventDefault = function(event) {
event.preventDefault();
};
Slick.prototype.progressiveLazyLoad = function( tryCount ) {
tryCount = tryCount || 1;
var _ = this,
$imgsToLoad = $( 'img[data-lazy]', _.$slider ),
image,
imageSource,
imageSrcSet,
imageSizes,
imageToLoad;
if ( $imgsToLoad.length ) {
image = $imgsToLoad.first();
imageSource = image.attr('data-lazy');
imageSrcSet = image.attr('data-srcset');
imageSizes = image.attr('data-sizes') || _.$slider.attr('data-sizes');
imageToLoad = document.createElement('img');
imageToLoad.onload = function() {
if (imageSrcSet) {
image
.attr('srcset', imageSrcSet );
if (imageSizes) {
image
.attr('sizes', imageSizes );
}
}
image
.attr( 'src', imageSource )
.removeAttr('data-lazy data-srcset data-sizes')
.removeClass('slick-loading');
if ( _.options.adaptiveHeight === true ) {
_.setPosition();
}
_.$slider.trigger('lazyLoaded', [ _, image, imageSource ]);
_.progressiveLazyLoad();
};
imageToLoad.onerror = function() {
if ( tryCount < 3 ) {
/**
* try to load the image 3 times,
* leave a slight delay so we don't get
* servers blocking the request.
*/
setTimeout( function() {
_.progressiveLazyLoad( tryCount + 1 );
}, 500 );
} else {
image
.removeAttr( 'data-lazy' )
.removeClass( 'slick-loading' )
.addClass( 'slick-lazyload-error' );
_.$slider.trigger('lazyLoadError', [ _, image, imageSource ]);
_.progressiveLazyLoad();
}
};
imageToLoad.src = imageSource;
} else {
_.$slider.trigger('allImagesLoaded', [ _ ]);
}
};
Slick.prototype.refresh = function( initializing ) {
var _ = this, currentSlide, lastVisibleIndex;
lastVisibleIndex = _.slideCount - _.options.slidesToShow;
// in non-infinite sliders, we don't want to go past the
// last visible index.
if( !_.options.infinite && ( _.currentSlide > lastVisibleIndex )) {
_.currentSlide = lastVisibleIndex;
}
// if less slides than to show, go to start.
if ( _.slideCount <= _.options.slidesToShow ) {
_.currentSlide = 0;
}
currentSlide = _.currentSlide;
_.destroy(true);
$.extend(_, _.initials, { currentSlide: currentSlide });
_.init();
if( !initializing ) {
_.changeSlide({
data: {
message: 'index',
index: currentSlide
}
}, false);
}
};
Slick.prototype.registerBreakpoints = function() {
var _ = this, breakpoint, currentBreakpoint, l,
responsiveSettings = _.options.responsive || null;
if ( $.type(responsiveSettings) === 'array' && responsiveSettings.length ) {
_.respondTo = _.options.respondTo || 'window';
for ( breakpoint in responsiveSettings ) {
l = _.breakpoints.length-1;
if (responsiveSettings.hasOwnProperty(breakpoint)) {
currentBreakpoint = responsiveSettings[breakpoint].breakpoint;
// loop through the breakpoints and cut out any existing
// ones with the same breakpoint number, we don't want dupes.
while( l >= 0 ) {
if( _.breakpoints[l] && _.breakpoints[l] === currentBreakpoint ) {
_.breakpoints.splice(l,1);
}
l--;
}
_.breakpoints.push(currentBreakpoint);
_.breakpointSettings[currentBreakpoint] = responsiveSettings[breakpoint].settings;
}
}
_.breakpoints.sort(function(a, b) {
return ( _.options.mobileFirst ) ? a-b : b-a;
});
}
};
Slick.prototype.reinit = function() {
var _ = this;
_.$slides =
_.$slideTrack
.children(_.options.slide)
.addClass('slick-slide');
_.slideCount = _.$slides.length;
if (_.currentSlide >= _.slideCount && _.currentSlide !== 0) {
_.currentSlide = _.currentSlide - _.options.slidesToScroll;
}
if (_.slideCount <= _.options.slidesToShow) {
_.currentSlide = 0;
}
_.registerBreakpoints();
_.setProps();
_.setupInfinite();
_.buildArrows();
_.updateArrows();
_.initArrowEvents();
_.buildDots();
_.updateDots();
_.initDotEvents();
_.cleanUpSlideEvents();
_.initSlideEvents();
_.checkResponsive(false, true);
if (_.options.focusOnSelect === true) {
$(_.$slideTrack).children().on('click.slick', _.selectHandler);
}
_.setSlideClasses(typeof _.currentSlide === 'number' ? _.currentSlide : 0);
_.setPosition();
_.focusHandler();
_.paused = !_.options.autoplay;
_.autoPlay();
_.$slider.trigger('reInit', [_]);
};
Slick.prototype.resize = function() {
var _ = this;
if ($(window).width() !== _.windowWidth) {
clearTimeout(_.windowDelay);
_.windowDelay = window.setTimeout(function() {
_.windowWidth = $(window).width();
_.checkResponsive();
if( !_.unslicked ) { _.setPosition(); }
}, 50);
}
};
Slick.prototype.removeSlide = Slick.prototype.slickRemove = function(index, removeBefore, removeAll) {
var _ = this;
if (typeof(index) === 'boolean') {
removeBefore = index;
index = removeBefore === true ? 0 : _.slideCount - 1;
} else {
index = removeBefore === true ? --index : index;
}
if (_.slideCount < 1 || index < 0 || index > _.slideCount - 1) {
return false;
}
_.unload();
if (removeAll === true) {
_.$slideTrack.children().remove();
} else {
_.$slideTrack.children(this.options.slide).eq(index).remove();
}
_.$slides = _.$slideTrack.children(this.options.slide);
_.$slideTrack.children(this.options.slide).detach();
_.$slideTrack.append(_.$slides);
_.$slidesCache = _.$slides;
_.reinit();
};
Slick.prototype.setCSS = function(position) {
var _ = this,
positionProps = {},
x, y;
if (_.options.rtl === true) {
position = -position;
}
x = _.positionProp == 'left' ? Math.ceil(position) + 'px' : '0px';
y = _.positionProp == 'top' ? Math.ceil(position) + 'px' : '0px';
positionProps[_.positionProp] = position;
if (_.transformsEnabled === false) {
_.$slideTrack.css(positionProps);
} else {
positionProps = {};
if (_.cssTransitions === false) {
positionProps[_.animType] = 'translate(' + x + ', ' + y + ')';
_.$slideTrack.css(positionProps);
} else {
positionProps[_.animType] = 'translate3d(' + x + ', ' + y + ', 0px)';
_.$slideTrack.css(positionProps);
}
}
};
Slick.prototype.setDimensions = function() {
var _ = this;
if (_.options.vertical === false) {
if (_.options.centerMode === true) {
_.$list.css({
padding: ('0px ' + _.options.centerPadding)
});
}
} else {
_.$list.height(_.$slides.first().outerHeight(true) * _.options.slidesToShow);
if (_.options.centerMode === true) {
_.$list.css({
padding: (_.options.centerPadding + ' 0px')
});
}
}
_.listWidth = _.$list.width();
_.listHeight = _.$list.height();
if (_.options.vertical === false && _.options.variableWidth === false) {
_.slideWidth = Math.ceil(_.listWidth / _.options.slidesToShow);
_.$slideTrack.width(Math.ceil((_.slideWidth * _.$slideTrack.children('.slick-slide').length)));
} else if (_.options.variableWidth === true) {
_.$slideTrack.width(5000 * _.slideCount);
} else {
_.slideWidth = Math.ceil(_.listWidth);
_.$slideTrack.height(Math.ceil((_.$slides.first().outerHeight(true) * _.$slideTrack.children('.slick-slide').length)));
}
var offset = _.$slides.first().outerWidth(true) - _.$slides.first().width();
if (_.options.variableWidth === false) _.$slideTrack.children('.slick-slide').width(_.slideWidth - offset);
};
Slick.prototype.setFade = function() {
var _ = this,
targetLeft;
_.$slides.each(function(index, element) {
targetLeft = (_.slideWidth * index) * -1;
if (_.options.rtl === true) {
$(element).css({
position: 'relative',
right: targetLeft,
top: 0,
zIndex: _.options.zIndex - 2,
opacity: 0
});
} else {
$(element).css({
position: 'relative',
left: targetLeft,
top: 0,
zIndex: _.options.zIndex - 2,
opacity: 0
});
}
});
_.$slides.eq(_.currentSlide).css({
zIndex: _.options.zIndex - 1,
opacity: 1
});
};
Slick.prototype.setHeight = function() {
var _ = this;
if (_.options.slidesToShow === 1 && _.options.adaptiveHeight === true && _.options.vertical === false) {
var targetHeight = _.$slides.eq(_.currentSlide).outerHeight(true);
_.$list.css('height', targetHeight);
}
};
Slick.prototype.setOption =
Slick.prototype.slickSetOption = function() {
/**
* accepts arguments in format of:
*
* - for changing a single option's value:
* .slick("setOption", option, value, refresh )
*
* - for changing a set of responsive options:
* .slick("setOption", 'responsive', [{}, ...], refresh )
*
* - for updating multiple values at once (not responsive)
* .slick("setOption", { 'option': value, ... }, refresh )
*/
var _ = this, l, item, option, value, refresh = false, type;
if( $.type( arguments[0] ) === 'object' ) {
option = arguments[0];
refresh = arguments[1];
type = 'multiple';
} else if ( $.type( arguments[0] ) === 'string' ) {
option = arguments[0];
value = arguments[1];
refresh = arguments[2];
if ( arguments[0] === 'responsive' && $.type( arguments[1] ) === 'array' ) {
type = 'responsive';
} else if ( typeof arguments[1] !== 'undefined' ) {
type = 'single';
}
}
if ( type === 'single' ) {
_.options[option] = value;
} else if ( type === 'multiple' ) {
$.each( option , function( opt, val ) {
_.options[opt] = val;
});
} else if ( type === 'responsive' ) {
for ( item in value ) {
if( $.type( _.options.responsive ) !== 'array' ) {
_.options.responsive = [ value[item] ];
} else {
l = _.options.responsive.length-1;
// loop through the responsive object and splice out duplicates.
while( l >= 0 ) {
if( _.options.responsive[l].breakpoint === value[item].breakpoint ) {
_.options.responsive.splice(l,1);
}
l--;
}
_.options.responsive.push( value[item] );
}
}
}
if ( refresh ) {
_.unload();
_.reinit();
}
};
Slick.prototype.setPosition = function() {
var _ = this;
_.setDimensions();
_.setHeight();
if (_.options.fade === false) {
_.setCSS(_.getLeft(_.currentSlide));
} else {
_.setFade();
}
_.$slider.trigger('setPosition', [_]);
};
Slick.prototype.setProps = function() {
var _ = this,
bodyStyle = document.body.style;
_.positionProp = _.options.vertical === true ? 'top' : 'left';
if (_.positionProp === 'top') {
_.$slider.addClass('slick-vertical');
} else {
_.$slider.removeClass('slick-vertical');
}
if (bodyStyle.WebkitTransition !== undefined ||
bodyStyle.MozTransition !== undefined ||
bodyStyle.msTransition !== undefined) {
if (_.options.useCSS === true) {
_.cssTransitions = true;
}
}
if ( _.options.fade ) {
if ( typeof _.options.zIndex === 'number' ) {
if( _.options.zIndex < 3 ) {
_.options.zIndex = 3;
}
} else {
_.options.zIndex = _.defaults.zIndex;
}
}
if (bodyStyle.OTransform !== undefined) {
_.animType = 'OTransform';
_.transformType = '-o-transform';
_.transitionType = 'OTransition';
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
}
if (bodyStyle.MozTransform !== undefined) {
_.animType = 'MozTransform';
_.transformType = '-moz-transform';
_.transitionType = 'MozTransition';
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.MozPerspective === undefined) _.animType = false;
}
if (bodyStyle.webkitTransform !== undefined) {
_.animType = 'webkitTransform';
_.transformType = '-webkit-transform';
_.transitionType = 'webkitTransition';
if (bodyStyle.perspectiveProperty === undefined && bodyStyle.webkitPerspective === undefined) _.animType = false;
}
if (bodyStyle.msTransform !== undefined) {
_.animType = 'msTransform';
_.transformType = '-ms-transform';
_.transitionType = 'msTransition';
if (bodyStyle.msTransform === undefined) _.animType = false;
}
if (bodyStyle.transform !== undefined && _.animType !== false) {
_.animType = 'transform';
_.transformType = 'transform';
_.transitionType = 'transition';
}
_.transformsEnabled = _.options.useTransform && (_.animType !== null && _.animType !== false);
};
Slick.prototype.setSlideClasses = function(index) {
var _ = this,
centerOffset, allSlides, indexOffset, remainder;
allSlides = _.$slider
.find('.slick-slide')
.removeClass('slick-active slick-center slick-current')
.attr('aria-hidden', 'true');
_.$slides
.eq(index)
.addClass('slick-current');
if (_.options.centerMode === true) {
var evenCoef = _.options.slidesToShow % 2 === 0 ? 1 : 0;
centerOffset = Math.floor(_.options.slidesToShow / 2);
if (_.options.infinite === true) {
if (index >= centerOffset && index <= (_.slideCount - 1) - centerOffset) {
_.$slides
.slice(index - centerOffset + evenCoef, index + centerOffset + 1)
.addClass('slick-active')
.attr('aria-hidden', 'false');
} else {
indexOffset = _.options.slidesToShow + index;
allSlides
.slice(indexOffset - centerOffset + 1 + evenCoef, indexOffset + centerOffset + 2)
.addClass('slick-active')
.attr('aria-hidden', 'false');
}
if (index === 0) {
allSlides
.eq(allSlides.length - 1 - _.options.slidesToShow)
.addClass('slick-center');
} else if (index === _.slideCount - 1) {
allSlides
.eq(_.options.slidesToShow)
.addClass('slick-center');
}
}
_.$slides
.eq(index)
.addClass('slick-center');
} else {
if (index >= 0 && index <= (_.slideCount - _.options.slidesToShow)) {
_.$slides
.slice(index, index + _.options.slidesToShow)
.addClass('slick-active')
.attr('aria-hidden', 'false');
} else if (allSlides.length <= _.options.slidesToShow) {
allSlides
.addClass('slick-active')
.attr('aria-hidden', 'false');
} else {
remainder = _.slideCount % _.options.slidesToShow;
indexOffset = _.options.infinite === true ? _.options.slidesToShow + index : index;
if (_.options.slidesToShow == _.options.slidesToScroll && (_.slideCount - index) < _.options.slidesToShow) {
allSlides
.slice(indexOffset - (_.options.slidesToShow - remainder), indexOffset + remainder)
.addClass('slick-active')
.attr('aria-hidden', 'false');
} else {
allSlides
.slice(indexOffset, indexOffset + _.options.slidesToShow)
.addClass('slick-active')
.attr('aria-hidden', 'false');
}
}
}
if (_.options.lazyLoad === 'ondemand' || _.options.lazyLoad === 'anticipated') {
_.lazyLoad();
}
};
Slick.prototype.setupInfinite = function() {
var _ = this,
i, slideIndex, infiniteCount;
if (_.options.fade === true) {
_.options.centerMode = false;
}
if (_.options.infinite === true && _.options.fade === false) {
slideIndex = null;
if (_.slideCount > _.options.slidesToShow) {
if (_.options.centerMode === true) {
infiniteCount = _.options.slidesToShow + 1;
} else {
infiniteCount = _.options.slidesToShow;
}
for (i = _.slideCount; i > (_.slideCount -
infiniteCount); i -= 1) {
slideIndex = i - 1;
$(_.$slides[slideIndex]).clone(true).attr('id', '')
.attr('data-slick-index', slideIndex - _.slideCount)
.prependTo(_.$slideTrack).addClass('slick-cloned');
}
for (i = 0; i < infiniteCount + _.slideCount; i += 1) {
slideIndex = i;
$(_.$slides[slideIndex]).clone(true).attr('id', '')
.attr('data-slick-index', slideIndex + _.slideCount)
.appendTo(_.$slideTrack).addClass('slick-cloned');
}
_.$slideTrack.find('.slick-cloned').find('[id]').each(function() {
$(this).attr('id', '');
});
}
}
};
Slick.prototype.interrupt = function( toggle ) {
var _ = this;
if( !toggle ) {
_.autoPlay();
}
_.interrupted = toggle;
};
Slick.prototype.selectHandler = function(event) {
var _ = this;
var targetElement =
$(event.target).is('.slick-slide') ?
$(event.target) :
$(event.target).parents('.slick-slide');
var index = parseInt(targetElement.attr('data-slick-index'));
if (!index) index = 0;
if (_.slideCount <= _.options.slidesToShow) {
_.slideHandler(index, false, true);
return;
}
_.slideHandler(index);
};
Slick.prototype.slideHandler = function(index, sync, dontAnimate) {
var targetSlide, animSlide, oldSlide, slideLeft, targetLeft = null,
_ = this, navTarget;
sync = sync || false;
if (_.animating === true && _.options.waitForAnimate === true) {
return;
}
if (_.options.fade === true && _.currentSlide === index) {
return;
}
if (sync === false) {
_.asNavFor(index);
}
targetSlide = index;
targetLeft = _.getLeft(targetSlide);
slideLeft = _.getLeft(_.currentSlide);
_.currentLeft = _.swipeLeft === null ? slideLeft : _.swipeLeft;
if (_.options.infinite === false && _.options.centerMode === false && (index < 0 || index > _.getDotCount() * _.options.slidesToScroll)) {
if (_.options.fade === false) {
targetSlide = _.currentSlide;
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
_.animateSlide(slideLeft, function() {
_.postSlide(targetSlide);
});
} else {
_.postSlide(targetSlide);
}
}
return;
} else if (_.options.infinite === false && _.options.centerMode === true && (index < 0 || index > (_.slideCount - _.options.slidesToScroll))) {
if (_.options.fade === false) {
targetSlide = _.currentSlide;
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
_.animateSlide(slideLeft, function() {
_.postSlide(targetSlide);
});
} else {
_.postSlide(targetSlide);
}
}
return;
}
if ( _.options.autoplay ) {
clearInterval(_.autoPlayTimer);
}
if (targetSlide < 0) {
if (_.slideCount % _.options.slidesToScroll !== 0) {
animSlide = _.slideCount - (_.slideCount % _.options.slidesToScroll);
} else {
animSlide = _.slideCount + targetSlide;
}
} else if (targetSlide >= _.slideCount) {
if (_.slideCount % _.options.slidesToScroll !== 0) {
animSlide = 0;
} else {
animSlide = targetSlide - _.slideCount;
}
} else {
animSlide = targetSlide;
}
_.animating = true;
_.$slider.trigger('beforeChange', [_, _.currentSlide, animSlide]);
oldSlide = _.currentSlide;
_.currentSlide = animSlide;
_.setSlideClasses(_.currentSlide);
if ( _.options.asNavFor ) {
navTarget = _.getNavTarget();
navTarget = navTarget.slick('getSlick');
if ( navTarget.slideCount <= navTarget.options.slidesToShow ) {
navTarget.setSlideClasses(_.currentSlide);
}
}
_.updateDots();
_.updateArrows();
if (_.options.fade === true) {
if (dontAnimate !== true) {
_.fadeSlideOut(oldSlide);
_.fadeSlide(animSlide, function() {
_.postSlide(animSlide);
});
} else {
_.postSlide(animSlide);
}
_.animateHeight();
return;
}
if (dontAnimate !== true && _.slideCount > _.options.slidesToShow) {
_.animateSlide(targetLeft, function() {
_.postSlide(animSlide);
});
} else {
_.postSlide(animSlide);
}
};
Slick.prototype.startLoad = function() {
var _ = this;
if (_.options.arrows === true && _.slideCount > _.options.slidesToShow) {
_.$prevArrow.hide();
_.$nextArrow.hide();
}
if (_.options.dots === true && _.slideCount > _.options.slidesToShow) {
_.$dots.hide();
}
_.$slider.addClass('slick-loading');
};
Slick.prototype.swipeDirection = function() {
var xDist, yDist, r, swipeAngle, _ = this;
xDist = _.touchObject.startX - _.touchObject.curX;
yDist = _.touchObject.startY - _.touchObject.curY;
r = Math.atan2(yDist, xDist);
swipeAngle = Math.round(r * 180 / Math.PI);
if (swipeAngle < 0) {
swipeAngle = 360 - Math.abs(swipeAngle);
}
if ((swipeAngle <= 45) && (swipeAngle >= 0)) {
return (_.options.rtl === false ? 'left' : 'right');
}
if ((swipeAngle <= 360) && (swipeAngle >= 315)) {
return (_.options.rtl === false ? 'left' : 'right');
}
if ((swipeAngle >= 135) && (swipeAngle <= 225)) {
return (_.options.rtl === false ? 'right' : 'left');
}
if (_.options.verticalSwiping === true) {
if ((swipeAngle >= 35) && (swipeAngle <= 135)) {
return 'down';
} else {
return 'up';
}
}
return 'vertical';
};
Slick.prototype.swipeEnd = function(event) {
var _ = this,
slideCount,
direction;
_.dragging = false;
_.swiping = false;
if (_.scrolling) {
_.scrolling = false;
return false;
}
_.interrupted = false;
_.shouldClick = ( _.touchObject.swipeLength > 10 ) ? false : true;
if ( _.touchObject.curX === undefined ) {
return false;
}
if ( _.touchObject.edgeHit === true ) {
_.$slider.trigger('edge', [_, _.swipeDirection() ]);
}
if ( _.touchObject.swipeLength >= _.touchObject.minSwipe ) {
direction = _.swipeDirection();
switch ( direction ) {
case 'left':
case 'down':
slideCount =
_.options.swipeToSlide ?
_.checkNavigable( _.currentSlide + _.getSlideCount() ) :
_.currentSlide + _.getSlideCount();
_.currentDirection = 0;
break;
case 'right':
case 'up':
slideCount =
_.options.swipeToSlide ?
_.checkNavigable( _.currentSlide - _.getSlideCount() ) :
_.currentSlide - _.getSlideCount();
_.currentDirection = 1;
break;
default:
}
if( direction != 'vertical' ) {
_.slideHandler( slideCount );
_.touchObject = {};
_.$slider.trigger('swipe', [_, direction ]);
}
} else {
if ( _.touchObject.startX !== _.touchObject.curX ) {
_.slideHandler( _.currentSlide );
_.touchObject = {};
}
}
};
Slick.prototype.swipeHandler = function(event) {
var _ = this;
if ((_.options.swipe === false) || ('ontouchend' in document && _.options.swipe === false)) {
return;
} else if (_.options.draggable === false && event.type.indexOf('mouse') !== -1) {
return;
}
_.touchObject.fingerCount = event.originalEvent && event.originalEvent.touches !== undefined ?
event.originalEvent.touches.length : 1;
_.touchObject.minSwipe = _.listWidth / _.options
.touchThreshold;
if (_.options.verticalSwiping === true) {
_.touchObject.minSwipe = _.listHeight / _.options
.touchThreshold;
}
switch (event.data.action) {
case 'start':
_.swipeStart(event);
break;
case 'move':
_.swipeMove(event);
break;
case 'end':
_.swipeEnd(event);
break;
}
};
Slick.prototype.swipeMove = function(event) {
var _ = this,
edgeWasHit = false,
curLeft, swipeDirection, swipeLength, positionOffset, touches, verticalSwipeLength;
touches = event.originalEvent !== undefined ? event.originalEvent.touches : null;
if (!_.dragging || _.scrolling || touches && touches.length !== 1) {
return false;
}
curLeft = _.getLeft(_.currentSlide);
_.touchObject.curX = touches !== undefined ? touches[0].pageX : event.clientX;
_.touchObject.curY = touches !== undefined ? touches[0].pageY : event.clientY;
_.touchObject.swipeLength = Math.round(Math.sqrt(
Math.pow(_.touchObject.curX - _.touchObject.startX, 2)));
verticalSwipeLength = Math.round(Math.sqrt(
Math.pow(_.touchObject.curY - _.touchObject.startY, 2)));
if (!_.options.verticalSwiping && !_.swiping && verticalSwipeLength > 4) {
_.scrolling = true;
return false;
}
if (_.options.verticalSwiping === true) {
_.touchObject.swipeLength = verticalSwipeLength;
}
swipeDirection = _.swipeDirection();
if (event.originalEvent !== undefined && _.touchObject.swipeLength > 4) {
_.swiping = true;
event.preventDefault();
}
positionOffset = (_.options.rtl === false ? 1 : -1) * (_.touchObject.curX > _.touchObject.startX ? 1 : -1);
if (_.options.verticalSwiping === true) {
positionOffset = _.touchObject.curY > _.touchObject.startY ? 1 : -1;
}
swipeLength = _.touchObject.swipeLength;
_.touchObject.edgeHit = false;
if (_.options.infinite === false) {
if ((_.currentSlide === 0 && swipeDirection === 'right') || (_.currentSlide >= _.getDotCount() && swipeDirection === 'left')) {
swipeLength = _.touchObject.swipeLength * _.options.edgeFriction;
_.touchObject.edgeHit = true;
}
}
if (_.options.vertical === false) {
_.swipeLeft = curLeft + swipeLength * positionOffset;
} else {
_.swipeLeft = curLeft + (swipeLength * (_.$list.height() / _.listWidth)) * positionOffset;
}
if (_.options.verticalSwiping === true) {
_.swipeLeft = curLeft + swipeLength * positionOffset;
}
if (_.options.fade === true || _.options.touchMove === false) {
return false;
}
if (_.animating === true) {
_.swipeLeft = null;
return false;
}
_.setCSS(_.swipeLeft);
};
Slick.prototype.swipeStart = function(event) {
var _ = this,
touches;
_.interrupted = true;
if (_.touchObject.fingerCount !== 1 || _.slideCount <= _.options.slidesToShow) {
_.touchObject = {};
return false;
}
if (event.originalEvent !== undefined && event.originalEvent.touches !== undefined) {
touches = event.originalEvent.touches[0];
}
_.touchObject.startX = _.touchObject.curX = touches !== undefined ? touches.pageX : event.clientX;
_.touchObject.startY = _.touchObject.curY = touches !== undefined ? touches.pageY : event.clientY;
_.dragging = true;
};
Slick.prototype.unfilterSlides = Slick.prototype.slickUnfilter = function() {
var _ = this;
if (_.$slidesCache !== null) {
_.unload();
_.$slideTrack.children(this.options.slide).detach();
_.$slidesCache.appendTo(_.$slideTrack);
_.reinit();
}
};
Slick.prototype.unload = function() {
var _ = this;
$('.slick-cloned', _.$slider).remove();
if (_.$dots) {
_.$dots.remove();
}
if (_.$prevArrow && _.htmlExpr.test(_.options.prevArrow)) {
_.$prevArrow.remove();
}
if (_.$nextArrow && _.htmlExpr.test(_.options.nextArrow)) {
_.$nextArrow.remove();
}
_.$slides
.removeClass('slick-slide slick-active slick-visible slick-current')
.attr('aria-hidden', 'true')
.css('width', '');
};
Slick.prototype.unslick = function(fromBreakpoint) {
var _ = this;
_.$slider.trigger('unslick', [_, fromBreakpoint]);
_.destroy();
};
Slick.prototype.updateArrows = function() {
var _ = this,
centerOffset;
centerOffset = Math.floor(_.options.slidesToShow / 2);
if ( _.options.arrows === true &&
_.slideCount > _.options.slidesToShow &&
!_.options.infinite ) {
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
if (_.currentSlide === 0) {
_.$prevArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
_.$nextArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
} else if (_.currentSlide >= _.slideCount - _.options.slidesToShow && _.options.centerMode === false) {
_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
} else if (_.currentSlide >= _.slideCount - 1 && _.options.centerMode === true) {
_.$nextArrow.addClass('slick-disabled').attr('aria-disabled', 'true');
_.$prevArrow.removeClass('slick-disabled').attr('aria-disabled', 'false');
}
}
};
Slick.prototype.updateDots = function() {
var _ = this;
if (_.$dots !== null) {
_.$dots
.find('li')
.removeClass('slick-active')
.end();
_.$dots
.find('li')
.eq(Math.floor(_.currentSlide / _.options.slidesToScroll))
.addClass('slick-active');
}
};
Slick.prototype.visibility = function() {
var _ = this;
if ( _.options.autoplay ) {
if ( document[_.hidden] ) {
_.interrupted = true;
} else {
_.interrupted = false;
}
}
};
$.fn.slick = function() {
var _ = this,
opt = arguments[0],
args = Array.prototype.slice.call(arguments, 1),
l = _.length,
i,
ret;
for (i = 0; i < l; i++) {
if (typeof opt == 'object' || typeof opt == 'undefined')
_[i].slick = new Slick(_[i], opt);
else
ret = _[i].slick[opt].apply(_[i].slick, args);
if (typeof ret != 'undefined') return ret;
}
return _;
};
}));
/*!
* sweetalert2 v8.11.8
* Released under the MIT License.
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global.Sweetalert2 = factory());
}(this, (function () { 'use strict';
function _typeof(obj) {
if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
_typeof = function (obj) {
return typeof obj;
};
} else {
_typeof = function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
};
}
return _typeof(obj);
}
function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
}
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
return Constructor;
}
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _inherits(subClass, superClass) {
if (typeof superClass !== "function" && superClass !== null) {
throw new TypeError("Super expression must either be null or a function");
}
subClass.prototype = Object.create(superClass && superClass.prototype, {
constructor: {
value: subClass,
writable: true,
configurable: true
}
});
if (superClass) _setPrototypeOf(subClass, superClass);
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
return o.__proto__ || Object.getPrototypeOf(o);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
function isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
if (Reflect.construct.sham) return false;
if (typeof Proxy === "function") return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct(Parent, args, Class) {
var a = [null];
a.push.apply(a, args);
var Constructor = Function.bind.apply(Parent, a);
var instance = new Constructor();
if (Class) _setPrototypeOf(instance, Class.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _assertThisInitialized(self) {
if (self === void 0) {
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
}
return self;
}
function _possibleConstructorReturn(self, call) {
if (call && (typeof call === "object" || typeof call === "function")) {
return call;
}
return _assertThisInitialized(self);
}
function _superPropBase(object, property) {
while (!Object.prototype.hasOwnProperty.call(object, property)) {
object = _getPrototypeOf(object);
if (object === null) break;
}
return object;
}
function _get(target, property, receiver) {
if (typeof Reflect !== "undefined" && Reflect.get) {
_get = Reflect.get;
} else {
_get = function _get(target, property, receiver) {
var base = _superPropBase(target, property);
if (!base) return;
var desc = Object.getOwnPropertyDescriptor(base, property);
if (desc.get) {
return desc.get.call(receiver);
}
return desc.value;
};
}
return _get(target, property, receiver || target);
}
var consolePrefix = 'SweetAlert2:';
/**
* Filter the unique values into a new array
* @param arr
*/
var uniqueArray = function uniqueArray(arr) {
var result = [];
for (var i = 0; i < arr.length; i++) {
if (result.indexOf(arr[i]) === -1) {
result.push(arr[i]);
}
}
return result;
};
/**
* Returns the array ob object values (Object.values isn't supported in IE11)
* @param obj
*/
var objectValues = function objectValues(obj) {
return Object.keys(obj).map(function (key) {
return obj[key];
});
};
/**
* Convert NodeList to Array
* @param nodeList
*/
var toArray = function toArray(nodeList) {
return Array.prototype.slice.call(nodeList);
};
/**
* Standardise console warnings
* @param message
*/
var warn = function warn(message) {
console.warn("".concat(consolePrefix, " ").concat(message));
};
/**
* Standardise console errors
* @param message
*/
var error = function error(message) {
console.error("".concat(consolePrefix, " ").concat(message));
};
/**
* Private global state for `warnOnce`
* @type {Array}
* @private
*/
var previousWarnOnceMessages = [];
/**
* Show a console warning, but only if it hasn't already been shown
* @param message
*/
var warnOnce = function warnOnce(message) {
if (!(previousWarnOnceMessages.indexOf(message) !== -1)) {
previousWarnOnceMessages.push(message);
warn(message);
}
};
/**
* Show a one-time console warning about deprecated params/methods
*/
var warnAboutDepreation = function warnAboutDepreation(deprecatedParam, useInstead) {
warnOnce("\"".concat(deprecatedParam, "\" is deprecated and will be removed in the next major release. Please use \"").concat(useInstead, "\" instead."));
};
/**
* If `arg` is a function, call it (with no arguments or context) and return the result.
* Otherwise, just pass the value through
* @param arg
*/
var callIfFunction = function callIfFunction(arg) {
return typeof arg === 'function' ? arg() : arg;
};
var isPromise = function isPromise(arg) {
return arg && Promise.resolve(arg) === arg;
};
var DismissReason = Object.freeze({
cancel: 'cancel',
backdrop: 'backdrop',
close: 'close',
esc: 'esc',
timer: 'timer'
});
var argsToParams = function argsToParams(args) {
var params = {};
switch (_typeof(args[0])) {
case 'object':
_extends(params, args[0]);
break;
default:
['title', 'html', 'type'].forEach(function (name, index) {
switch (_typeof(args[index])) {
case 'string':
params[name] = args[index];
break;
case 'undefined':
break;
default:
error("Unexpected type of ".concat(name, "! Expected \"string\", got ").concat(_typeof(args[index])));
}
});
}
return params;
};
var swalPrefix = 'swal2-';
var prefix = function prefix(items) {
var result = {};
for (var i in items) {
result[items[i]] = swalPrefix + items[i];
}
return result;
};
var swalClasses = prefix(['container', 'shown', 'height-auto', 'iosfix', 'popup', 'modal', 'no-backdrop', 'toast', 'toast-shown', 'toast-column', 'fade', 'show', 'hide', 'noanimation', 'close', 'title', 'header', 'content', 'actions', 'confirm', 'cancel', 'footer', 'icon', 'image', 'input', 'file', 'range', 'select', 'radio', 'checkbox', 'label', 'textarea', 'inputerror', 'validation-message', 'progress-steps', 'active-progress-step', 'progress-step', 'progress-step-line', 'loading', 'styled', 'top', 'top-start', 'top-end', 'top-left', 'top-right', 'center', 'center-start', 'center-end', 'center-left', 'center-right', 'bottom', 'bottom-start', 'bottom-end', 'bottom-left', 'bottom-right', 'grow-row', 'grow-column', 'grow-fullscreen', 'rtl']);
var iconTypes = prefix(['success', 'warning', 'info', 'question', 'error']);
var states = {
previousBodyPadding: null
};
var hasClass = function hasClass(elem, className) {
return elem.classList.contains(className);
};
var applyCustomClass = function applyCustomClass(elem, customClass, className) {
// Clean up previous custom classes
toArray(elem.classList).forEach(function (className) {
if (!(objectValues(swalClasses).indexOf(className) !== -1) && !(objectValues(iconTypes).indexOf(className) !== -1)) {
elem.classList.remove(className);
}
});
if (customClass && customClass[className]) {
addClass(elem, customClass[className]);
}
};
function getInput(content, inputType) {
if (!inputType) {
return null;
}
switch (inputType) {
case 'select':
case 'textarea':
case 'file':
return getChildByClass(content, swalClasses[inputType]);
case 'checkbox':
return content.querySelector(".".concat(swalClasses.checkbox, " input"));
case 'radio':
return content.querySelector(".".concat(swalClasses.radio, " input:checked")) || content.querySelector(".".concat(swalClasses.radio, " input:first-child"));
case 'range':
return content.querySelector(".".concat(swalClasses.range, " input"));
default:
return getChildByClass(content, swalClasses.input);
}
}
var focusInput = function focusInput(input) {
input.focus(); // place cursor at end of text in text input
if (input.type !== 'file') {
// http://stackoverflow.com/a/2345915
var val = input.value;
input.value = '';
input.value = val;
}
};
var toggleClass = function toggleClass(target, classList, condition) {
if (!target || !classList) {
return;
}
if (typeof classList === 'string') {
classList = classList.split(/\s+/).filter(Boolean);
}
classList.forEach(function (className) {
if (target.forEach) {
target.forEach(function (elem) {
condition ? elem.classList.add(className) : elem.classList.remove(className);
});
} else {
condition ? target.classList.add(className) : target.classList.remove(className);
}
});
};
var addClass = function addClass(target, classList) {
toggleClass(target, classList, true);
};
var removeClass = function removeClass(target, classList) {
toggleClass(target, classList, false);
};
var getChildByClass = function getChildByClass(elem, className) {
for (var i = 0; i < elem.childNodes.length; i++) {
if (hasClass(elem.childNodes[i], className)) {
return elem.childNodes[i];
}
}
};
var applyNumericalStyle = function applyNumericalStyle(elem, property, value) {
if (value || parseInt(value) === 0) {
elem.style[property] = typeof value === 'number' ? value + 'px' : value;
} else {
elem.style.removeProperty(property);
}
};
var show = function show(elem) {
var display = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'flex';
elem.style.opacity = '';
elem.style.display = display;
};
var hide = function hide(elem) {
elem.style.opacity = '';
elem.style.display = 'none';
};
var toggle = function toggle(elem, condition, display) {
condition ? show(elem, display) : hide(elem);
}; // borrowed from jquery $(elem).is(':visible') implementation
var isVisible = function isVisible(elem) {
return !!(elem && (elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length));
};
var isScrollable = function isScrollable(elem) {
return !!(elem.scrollHeight > elem.clientHeight);
}; // borrowed from https://stackoverflow.com/a/46352119
var hasCssAnimation = function hasCssAnimation(elem) {
var style = window.getComputedStyle(elem);
var animDuration = parseFloat(style.getPropertyValue('animation-duration') || '0');
var transDuration = parseFloat(style.getPropertyValue('transition-duration') || '0');
return animDuration > 0 || transDuration > 0;
};
var contains = function contains(haystack, needle) {
if (typeof haystack.contains === 'function') {
return haystack.contains(needle);
}
};
var getContainer = function getContainer() {
return document.body.querySelector('.' + swalClasses.container);
};
var elementBySelector = function elementBySelector(selectorString) {
var container = getContainer();
return container ? container.querySelector(selectorString) : null;
};
var elementByClass = function elementByClass(className) {
return elementBySelector('.' + className);
};
var getPopup = function getPopup() {
return elementByClass(swalClasses.popup);
};
var getIcons = function getIcons() {
var popup = getPopup();
return toArray(popup.querySelectorAll('.' + swalClasses.icon));
};
var getIcon = function getIcon() {
var visibleIcon = getIcons().filter(function (icon) {
return isVisible(icon);
});
return visibleIcon.length ? visibleIcon[0] : null;
};
var getTitle = function getTitle() {
return elementByClass(swalClasses.title);
};
var getContent = function getContent() {
return elementByClass(swalClasses.content);
};
var getImage = function getImage() {
return elementByClass(swalClasses.image);
};
var getProgressSteps = function getProgressSteps() {
return elementByClass(swalClasses['progress-steps']);
};
var getValidationMessage = function getValidationMessage() {
return elementByClass(swalClasses['validation-message']);
};
var getConfirmButton = function getConfirmButton() {
return elementBySelector('.' + swalClasses.actions + ' .' + swalClasses.confirm);
};
var getCancelButton = function getCancelButton() {
return elementBySelector('.' + swalClasses.actions + ' .' + swalClasses.cancel);
};
var getActions = function getActions() {
return elementByClass(swalClasses.actions);
};
var getHeader = function getHeader() {
return elementByClass(swalClasses.header);
};
var getFooter = function getFooter() {
return elementByClass(swalClasses.footer);
};
var getCloseButton = function getCloseButton() {
return elementByClass(swalClasses.close);
};
var getFocusableElements = function getFocusableElements() {
var focusableElementsWithTabindex = toArray(getPopup().querySelectorAll('[tabindex]:not([tabindex="-1"]):not([tabindex="0"])')) // sort according to tabindex
.sort(function (a, b) {
a = parseInt(a.getAttribute('tabindex'));
b = parseInt(b.getAttribute('tabindex'));
if (a > b) {
return 1;
} else if (a < b) {
return -1;
}
return 0;
}); // https://github.com/jkup/focusable/blob/master/index.js
var otherFocusableElements = toArray(getPopup().querySelectorAll('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex="0"], [contenteditable], audio[controls], video[controls]')).filter(function (el) {
return el.getAttribute('tabindex') !== '-1';
});
return uniqueArray(focusableElementsWithTabindex.concat(otherFocusableElements)).filter(function (el) {
return isVisible(el);
});
};
var isModal = function isModal() {
return !isToast() && !document.body.classList.contains(swalClasses['no-backdrop']);
};
var isToast = function isToast() {
return document.body.classList.contains(swalClasses['toast-shown']);
};
var isLoading = function isLoading() {
return getPopup().hasAttribute('data-loading');
};
// Detect Node env
var isNodeEnv = function isNodeEnv() {
return typeof window === 'undefined' || typeof document === 'undefined';
};
var sweetHTML = "\n <div aria-labelledby=\"".concat(swalClasses.title, "\" aria-describedby=\"").concat(swalClasses.content, "\" class=\"").concat(swalClasses.popup, "\" tabindex=\"-1\">\n <div class=\"").concat(swalClasses.header, "\">\n <ul class=\"").concat(swalClasses['progress-steps'], "\"></ul>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.error, "\">\n <span class=\"swal2-x-mark\"><span class=\"swal2-x-mark-line-left\"></span><span class=\"swal2-x-mark-line-right\"></span></span>\n </div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.question, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.warning, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.info, "\"></div>\n <div class=\"").concat(swalClasses.icon, " ").concat(iconTypes.success, "\">\n <div class=\"swal2-success-circular-line-left\"></div>\n <span class=\"swal2-success-line-tip\"></span> <span class=\"swal2-success-line-long\"></span>\n <div class=\"swal2-success-ring\"></div> <div class=\"swal2-success-fix\"></div>\n <div class=\"swal2-success-circular-line-right\"></div>\n </div>\n <img class=\"").concat(swalClasses.image, "\" />\n <h2 class=\"").concat(swalClasses.title, "\" id=\"").concat(swalClasses.title, "\"></h2>\n <button type=\"button\" class=\"").concat(swalClasses.close, "\">&times;</button>\n </div>\n <div class=\"").concat(swalClasses.content, "\">\n <div id=\"").concat(swalClasses.content, "\"></div>\n <input class=\"").concat(swalClasses.input, "\" />\n <input type=\"file\" class=\"").concat(swalClasses.file, "\" />\n <div class=\"").concat(swalClasses.range, "\">\n <input type=\"range\" />\n <output></output>\n </div>\n <select class=\"").concat(swalClasses.select, "\"></select>\n <div class=\"").concat(swalClasses.radio, "\"></div>\n <label for=\"").concat(swalClasses.checkbox, "\" class=\"").concat(swalClasses.checkbox, "\">\n <input type=\"checkbox\" />\n <span class=\"").concat(swalClasses.label, "\"></span>\n </label>\n <textarea class=\"").concat(swalClasses.textarea, "\"></textarea>\n <div class=\"").concat(swalClasses['validation-message'], "\" id=\"").concat(swalClasses['validation-message'], "\"></div>\n </div>\n <div class=\"").concat(swalClasses.actions, "\">\n <button type=\"button\" class=\"").concat(swalClasses.confirm, "\">OK</button>\n <button type=\"button\" class=\"").concat(swalClasses.cancel, "\">Cancel</button>\n </div>\n <div class=\"").concat(swalClasses.footer, "\">\n </div>\n </div>\n").replace(/(^|\n)\s*/g, '');
var resetOldContainer = function resetOldContainer() {
var oldContainer = getContainer();
if (!oldContainer) {
return;
}
oldContainer.parentNode.removeChild(oldContainer);
removeClass([document.documentElement, document.body], [swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['has-column']]);
};
var oldInputVal; // IE11 workaround, see #1109 for details
var resetValidationMessage = function resetValidationMessage(e) {
if (Swal.isVisible() && oldInputVal !== e.target.value) {
Swal.resetValidationMessage();
}
oldInputVal = e.target.value;
};
var addInputChangeListeners = function addInputChangeListeners() {
var content = getContent();
var input = getChildByClass(content, swalClasses.input);
var file = getChildByClass(content, swalClasses.file);
var range = content.querySelector(".".concat(swalClasses.range, " input"));
var rangeOutput = content.querySelector(".".concat(swalClasses.range, " output"));
var select = getChildByClass(content, swalClasses.select);
var checkbox = content.querySelector(".".concat(swalClasses.checkbox, " input"));
var textarea = getChildByClass(content, swalClasses.textarea);
input.oninput = resetValidationMessage;
file.onchange = resetValidationMessage;
select.onchange = resetValidationMessage;
checkbox.onchange = resetValidationMessage;
textarea.oninput = resetValidationMessage;
range.oninput = function (e) {
resetValidationMessage(e);
rangeOutput.value = range.value;
};
range.onchange = function (e) {
resetValidationMessage(e);
range.nextSibling.value = range.value;
};
};
var getTarget = function getTarget(target) {
return typeof target === 'string' ? document.querySelector(target) : target;
};
var setupAccessibility = function setupAccessibility(params) {
var popup = getPopup();
popup.setAttribute('role', params.toast ? 'alert' : 'dialog');
popup.setAttribute('aria-live', params.toast ? 'polite' : 'assertive');
if (!params.toast) {
popup.setAttribute('aria-modal', 'true');
}
};
var setupRTL = function setupRTL(targetElement) {
if (window.getComputedStyle(targetElement).direction === 'rtl') {
addClass(getContainer(), swalClasses.rtl);
}
};
/*
* Add modal + backdrop to DOM
*/
var init = function init(params) {
// Clean up the old popup container if it exists
resetOldContainer();
/* istanbul ignore if */
if (isNodeEnv()) {
error('SweetAlert2 requires document to initialize');
return;
}
var container = document.createElement('div');
container.className = swalClasses.container;
container.innerHTML = sweetHTML;
var targetElement = getTarget(params.target);
targetElement.appendChild(container);
setupAccessibility(params);
setupRTL(targetElement);
addInputChangeListeners();
};
var parseHtmlToContainer = function parseHtmlToContainer(param, target) {
// DOM element
if (param instanceof HTMLElement) {
target.appendChild(param); // JQuery element(s)
} else if (_typeof(param) === 'object') {
handleJqueryElem(target, param); // Plain string
} else if (param) {
target.innerHTML = param;
}
};
var handleJqueryElem = function handleJqueryElem(target, elem) {
target.innerHTML = '';
if (0 in elem) {
for (var i = 0; i in elem; i++) {
target.appendChild(elem[i].cloneNode(true));
}
} else {
target.appendChild(elem.cloneNode(true));
}
};
var animationEndEvent = function () {
// Prevent run in Node env
/* istanbul ignore if */
if (isNodeEnv()) {
return false;
}
var testEl = document.createElement('div');
var transEndEventNames = {
'WebkitAnimation': 'webkitAnimationEnd',
'OAnimation': 'oAnimationEnd oanimationend',
'animation': 'animationend'
};
for (var i in transEndEventNames) {
if (transEndEventNames.hasOwnProperty(i) && typeof testEl.style[i] !== 'undefined') {
return transEndEventNames[i];
}
}
return false;
}();
// Measure width of scrollbar
// https://github.com/twbs/bootstrap/blob/master/js/modal.js#L279-L286
var measureScrollbar = function measureScrollbar() {
var supportsTouch = 'ontouchstart' in window || navigator.msMaxTouchPoints;
if (supportsTouch) {
return 0;
}
var scrollDiv = document.createElement('div');
scrollDiv.style.width = '50px';
scrollDiv.style.height = '50px';
scrollDiv.style.overflow = 'scroll';
document.body.appendChild(scrollDiv);
var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
document.body.removeChild(scrollDiv);
return scrollbarWidth;
};
function handleButtonsStyling(confirmButton, cancelButton, params) {
addClass([confirmButton, cancelButton], swalClasses.styled); // Buttons background colors
if (params.confirmButtonColor) {
confirmButton.style.backgroundColor = params.confirmButtonColor;
}
if (params.cancelButtonColor) {
cancelButton.style.backgroundColor = params.cancelButtonColor;
} // Loading state
var confirmButtonBackgroundColor = window.getComputedStyle(confirmButton).getPropertyValue('background-color');
confirmButton.style.borderLeftColor = confirmButtonBackgroundColor;
confirmButton.style.borderRightColor = confirmButtonBackgroundColor;
}
function renderButton(button, buttonType, params) {
toggle(button, params['showC' + buttonType.substring(1) + 'Button'], 'inline-block');
button.innerHTML = params[buttonType + 'ButtonText']; // Set caption text
button.setAttribute('aria-label', params[buttonType + 'ButtonAriaLabel']); // ARIA label
// Add buttons custom classes
button.className = swalClasses[buttonType];
applyCustomClass(button, params.customClass, buttonType + 'Button');
addClass(button, params[buttonType + 'ButtonClass']);
}
var renderActions = function renderActions(instance, params) {
var actions = getActions();
var confirmButton = getConfirmButton();
var cancelButton = getCancelButton(); // Actions (buttons) wrapper
if (!params.showConfirmButton && !params.showCancelButton) {
hide(actions);
} else {
show(actions);
} // Custom class
applyCustomClass(actions, params.customClass, 'actions'); // Render confirm button
renderButton(confirmButton, 'confirm', params); // render Cancel Button
renderButton(cancelButton, 'cancel', params);
if (params.buttonsStyling) {
handleButtonsStyling(confirmButton, cancelButton, params);
} else {
removeClass([confirmButton, cancelButton], swalClasses.styled);
confirmButton.style.backgroundColor = confirmButton.style.borderLeftColor = confirmButton.style.borderRightColor = '';
cancelButton.style.backgroundColor = cancelButton.style.borderLeftColor = cancelButton.style.borderRightColor = '';
}
};
function handleBackdropParam(container, backdrop) {
if (typeof backdrop === 'string') {
container.style.background = backdrop;
} else if (!backdrop) {
addClass([document.documentElement, document.body], swalClasses['no-backdrop']);
}
}
function handlePositionParam(container, position) {
if (position in swalClasses) {
addClass(container, swalClasses[position]);
} else {
warn('The "position" parameter is not valid, defaulting to "center"');
addClass(container, swalClasses.center);
}
}
function handleGrowParam(container, grow) {
if (grow && typeof grow === 'string') {
var growClass = 'grow-' + grow;
if (growClass in swalClasses) {
addClass(container, swalClasses[growClass]);
}
}
}
var renderContainer = function renderContainer(instance, params) {
var container = getContainer();
if (!container) {
return;
}
handleBackdropParam(container, params.backdrop);
if (!params.backdrop && params.allowOutsideClick) {
warn('"allowOutsideClick" parameter requires `backdrop` parameter to be set to `true`');
}
handlePositionParam(container, params.position);
handleGrowParam(container, params.grow); // Custom class
applyCustomClass(container, params.customClass, 'container');
if (params.customContainerClass) {
// @deprecated
addClass(container, params.customContainerClass);
}
};
/**
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
* This is the approach that Babel will probably take to implement private methods/fields
* https://github.com/tc39/proposal-private-methods
* https://github.com/babel/babel/pull/7555
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
* then we can use that language feature.
*/
var privateProps = {
promise: new WeakMap(),
innerParams: new WeakMap(),
domCache: new WeakMap()
};
var renderInput = function renderInput(instance, params) {
var innerParams = privateProps.innerParams.get(instance);
var rerender = !innerParams || params.input !== innerParams.input;
var content = getContent();
var inputTypes = ['input', 'file', 'range', 'select', 'radio', 'checkbox', 'textarea'];
for (var i = 0; i < inputTypes.length; i++) {
var inputClass = swalClasses[inputTypes[i]];
var inputContainer = getChildByClass(content, inputClass); // set attributes
setAttributes(inputTypes[i], params.inputAttributes); // set class
setClass(inputContainer, inputClass, params);
rerender && hide(inputContainer);
}
if (!params.input) {
return;
}
if (!renderInputType[params.input]) {
return error("Unexpected type of input! Expected \"text\", \"email\", \"password\", \"number\", \"tel\", \"select\", \"radio\", \"checkbox\", \"textarea\", \"file\" or \"url\", got \"".concat(params.input, "\""));
}
if (rerender) {
var input = renderInputType[params.input](params);
show(input);
}
};
var removeAttributes = function removeAttributes(input) {
for (var i = 0; i < input.attributes.length; i++) {
var attrName = input.attributes[i].name;
if (!(['type', 'value', 'style'].indexOf(attrName) !== -1)) {
input.removeAttribute(attrName);
}
}
};
var setAttributes = function setAttributes(inputType, inputAttributes) {
var input = getInput(getContent(), inputType);
if (!input) {
return;
}
removeAttributes(input);
for (var attr in inputAttributes) {
// Do not set a placeholder for <input type="range">
// it'll crash Edge, #1298
if (inputType === 'range' && attr === 'placeholder') {
continue;
}
input.setAttribute(attr, inputAttributes[attr]);
}
};
var setClass = function setClass(inputContainer, inputClass, params) {
inputContainer.className = inputClass;
if (params.inputClass) {
addClass(inputContainer, params.inputClass);
}
if (params.customClass) {
addClass(inputContainer, params.customClass.input);
}
};
var setInputPlaceholder = function setInputPlaceholder(input, params) {
if (!input.placeholder || params.inputPlaceholder) {
input.placeholder = params.inputPlaceholder;
}
};
var renderInputType = {};
renderInputType.text = renderInputType.email = renderInputType.password = renderInputType.number = renderInputType.tel = renderInputType.url = function (params) {
var input = getChildByClass(getContent(), swalClasses.input);
if (typeof params.inputValue === 'string' || typeof params.inputValue === 'number') {
input.value = params.inputValue;
} else if (!isPromise(params.inputValue)) {
warn("Unexpected type of inputValue! Expected \"string\", \"number\" or \"Promise\", got \"".concat(_typeof(params.inputValue), "\""));
}
setInputPlaceholder(input, params);
input.type = params.input;
return input;
};
renderInputType.file = function (params) {
var input = getChildByClass(getContent(), swalClasses.file);
setInputPlaceholder(input, params);
input.type = params.input;
return input;
};
renderInputType.range = function (params) {
var range = getChildByClass(getContent(), swalClasses.range);
var rangeInput = range.querySelector('input');
var rangeOutput = range.querySelector('output');
rangeInput.value = params.inputValue;
rangeInput.type = params.input;
rangeOutput.value = params.inputValue;
return range;
};
renderInputType.select = function (params) {
var select = getChildByClass(getContent(), swalClasses.select);
select.innerHTML = '';
if (params.inputPlaceholder) {
var placeholder = document.createElement('option');
placeholder.innerHTML = params.inputPlaceholder;
placeholder.value = '';
placeholder.disabled = true;
placeholder.selected = true;
select.appendChild(placeholder);
}
return select;
};
renderInputType.radio = function () {
var radio = getChildByClass(getContent(), swalClasses.radio);
radio.innerHTML = '';
return radio;
};
renderInputType.checkbox = function (params) {
var checkbox = getChildByClass(getContent(), swalClasses.checkbox);
var checkboxInput = getInput(getContent(), 'checkbox');
checkboxInput.type = 'checkbox';
checkboxInput.value = 1;
checkboxInput.id = swalClasses.checkbox;
checkboxInput.checked = Boolean(params.inputValue);
var label = checkbox.querySelector('span');
label.innerHTML = params.inputPlaceholder;
return checkbox;
};
renderInputType.textarea = function (params) {
var textarea = getChildByClass(getContent(), swalClasses.textarea);
textarea.value = params.inputValue;
setInputPlaceholder(textarea, params);
return textarea;
};
var renderContent = function renderContent(instance, params) {
var content = getContent().querySelector('#' + swalClasses.content); // Content as HTML
if (params.html) {
parseHtmlToContainer(params.html, content);
show(content, 'block'); // Content as plain text
} else if (params.text) {
content.textContent = params.text;
show(content, 'block'); // No content
} else {
hide(content);
}
renderInput(instance, params); // Custom class
applyCustomClass(getContent(), params.customClass, 'content');
};
var renderFooter = function renderFooter(instance, params) {
var footer = getFooter();
toggle(footer, params.footer);
if (params.footer) {
parseHtmlToContainer(params.footer, footer);
} // Custom class
applyCustomClass(footer, params.customClass, 'footer');
};
var renderCloseButton = function renderCloseButton(instance, params) {
var closeButton = getCloseButton(); // Custom class
applyCustomClass(closeButton, params.customClass, 'closeButton');
toggle(closeButton, params.showCloseButton);
closeButton.setAttribute('aria-label', params.closeButtonAriaLabel);
};
var renderIcon = function renderIcon(instance, params) {
var innerParams = privateProps.innerParams.get(instance); // if the icon with the given type already rendered,
// apply the custom class without re-rendering the icon
if (innerParams && params.type === innerParams.type && getIcon()) {
applyCustomClass(getIcon(), params.customClass, 'icon');
return;
}
hideAllIcons();
if (!params.type) {
return;
}
adjustSuccessIconBackgoundColor();
if (Object.keys(iconTypes).indexOf(params.type) !== -1) {
var icon = elementBySelector(".".concat(swalClasses.icon, ".").concat(iconTypes[params.type]));
show(icon); // Custom class
applyCustomClass(icon, params.customClass, 'icon'); // Animate icon
toggleClass(icon, "swal2-animate-".concat(params.type, "-icon"), params.animation);
} else {
error("Unknown type! Expected \"success\", \"error\", \"warning\", \"info\" or \"question\", got \"".concat(params.type, "\""));
}
};
var hideAllIcons = function hideAllIcons() {
var icons = getIcons();
for (var i = 0; i < icons.length; i++) {
hide(icons[i]);
}
}; // Adjust success icon background color to match the popup background color
var adjustSuccessIconBackgoundColor = function adjustSuccessIconBackgoundColor() {
var popup = getPopup();
var popupBackgroundColor = window.getComputedStyle(popup).getPropertyValue('background-color');
var successIconParts = popup.querySelectorAll('[class^=swal2-success-circular-line], .swal2-success-fix');
for (var i = 0; i < successIconParts.length; i++) {
successIconParts[i].style.backgroundColor = popupBackgroundColor;
}
};
var renderImage = function renderImage(instance, params) {
var image = getImage();
if (!params.imageUrl) {
return hide(image);
}
show(image); // Src, alt
image.setAttribute('src', params.imageUrl);
image.setAttribute('alt', params.imageAlt); // Width, height
applyNumericalStyle(image, 'width', params.imageWidth);
applyNumericalStyle(image, 'height', params.imageHeight); // Class
image.className = swalClasses.image;
applyCustomClass(image, params.customClass, 'image');
if (params.imageClass) {
addClass(image, params.imageClass);
}
};
var createStepElement = function createStepElement(step) {
var stepEl = document.createElement('li');
addClass(stepEl, swalClasses['progress-step']);
stepEl.innerHTML = step;
return stepEl;
};
var createLineElement = function createLineElement(params) {
var lineEl = document.createElement('li');
addClass(lineEl, swalClasses['progress-step-line']);
if (params.progressStepsDistance) {
lineEl.style.width = params.progressStepsDistance;
}
return lineEl;
};
var renderProgressSteps = function renderProgressSteps(instance, params) {
var progressStepsContainer = getProgressSteps();
if (!params.progressSteps || params.progressSteps.length === 0) {
return hide(progressStepsContainer);
}
show(progressStepsContainer);
progressStepsContainer.innerHTML = '';
var currentProgressStep = parseInt(params.currentProgressStep === null ? Swal.getQueueStep() : params.currentProgressStep);
if (currentProgressStep >= params.progressSteps.length) {
warn('Invalid currentProgressStep parameter, it should be less than progressSteps.length ' + '(currentProgressStep like JS arrays starts from 0)');
}
params.progressSteps.forEach(function (step, index) {
var stepEl = createStepElement(step);
progressStepsContainer.appendChild(stepEl);
if (index === currentProgressStep) {
addClass(stepEl, swalClasses['active-progress-step']);
}
if (index !== params.progressSteps.length - 1) {
var lineEl = createLineElement(step);
progressStepsContainer.appendChild(lineEl);
}
});
};
var renderTitle = function renderTitle(instance, params) {
var title = getTitle();
toggle(title, params.title || params.titleText);
if (params.title) {
parseHtmlToContainer(params.title, title);
}
if (params.titleText) {
title.innerText = params.titleText;
} // Custom class
applyCustomClass(title, params.customClass, 'title');
};
var renderHeader = function renderHeader(instance, params) {
var header = getHeader(); // Custom class
applyCustomClass(header, params.customClass, 'header'); // Progress steps
renderProgressSteps(instance, params); // Icon
renderIcon(instance, params); // Image
renderImage(instance, params); // Title
renderTitle(instance, params); // Close button
renderCloseButton(instance, params);
};
var renderPopup = function renderPopup(instance, params) {
var popup = getPopup(); // Width
applyNumericalStyle(popup, 'width', params.width); // Padding
applyNumericalStyle(popup, 'padding', params.padding); // Background
if (params.background) {
popup.style.background = params.background;
} // Default Class
popup.className = swalClasses.popup;
if (params.toast) {
addClass([document.documentElement, document.body], swalClasses['toast-shown']);
addClass(popup, swalClasses.toast);
} else {
addClass(popup, swalClasses.modal);
} // Custom class
applyCustomClass(popup, params.customClass, 'popup');
if (typeof params.customClass === 'string') {
addClass(popup, params.customClass);
} // CSS animation
toggleClass(popup, swalClasses.noanimation, !params.animation);
};
var render = function render(instance, params) {
renderPopup(instance, params);
renderContainer(instance, params);
renderHeader(instance, params);
renderContent(instance, params);
renderActions(instance, params);
renderFooter(instance, params);
};
/*
* Global function to determine if SweetAlert2 popup is shown
*/
var isVisible$1 = function isVisible$$1() {
return isVisible(getPopup());
};
/*
* Global function to click 'Confirm' button
*/
var clickConfirm = function clickConfirm() {
return getConfirmButton() && getConfirmButton().click();
};
/*
* Global function to click 'Cancel' button
*/
var clickCancel = function clickCancel() {
return getCancelButton() && getCancelButton().click();
};
function fire() {
var Swal = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return _construct(Swal, args);
}
/**
* Returns an extended version of `Swal` containing `params` as defaults.
* Useful for reusing Swal configuration.
*
* For example:
*
* Before:
* const textPromptOptions = { input: 'text', showCancelButton: true }
* const {value: firstName} = await Swal.fire({ ...textPromptOptions, title: 'What is your first name?' })
* const {value: lastName} = await Swal.fire({ ...textPromptOptions, title: 'What is your last name?' })
*
* After:
* const TextPrompt = Swal.mixin({ input: 'text', showCancelButton: true })
* const {value: firstName} = await TextPrompt('What is your first name?')
* const {value: lastName} = await TextPrompt('What is your last name?')
*
* @param mixinParams
*/
function mixin(mixinParams) {
var MixinSwal =
/*#__PURE__*/
function (_this) {
_inherits(MixinSwal, _this);
function MixinSwal() {
_classCallCheck(this, MixinSwal);
return _possibleConstructorReturn(this, _getPrototypeOf(MixinSwal).apply(this, arguments));
}
_createClass(MixinSwal, [{
key: "_main",
value: function _main(params) {
return _get(_getPrototypeOf(MixinSwal.prototype), "_main", this).call(this, _extends({}, mixinParams, params));
}
}]);
return MixinSwal;
}(this);
return MixinSwal;
}
// private global state for the queue feature
var currentSteps = [];
/*
* Global function for chaining sweetAlert popups
*/
var queue = function queue(steps) {
var Swal = this;
currentSteps = steps;
var resetAndResolve = function resetAndResolve(resolve, value) {
currentSteps = [];
document.body.removeAttribute('data-swal2-queue-step');
resolve(value);
};
var queueResult = [];
return new Promise(function (resolve) {
(function step(i, callback) {
if (i < currentSteps.length) {
document.body.setAttribute('data-swal2-queue-step', i);
Swal.fire(currentSteps[i]).then(function (result) {
if (typeof result.value !== 'undefined') {
queueResult.push(result.value);
step(i + 1, callback);
} else {
resetAndResolve(resolve, {
dismiss: result.dismiss
});
}
});
} else {
resetAndResolve(resolve, {
value: queueResult
});
}
})(0);
});
};
/*
* Global function for getting the index of current popup in queue
*/
var getQueueStep = function getQueueStep() {
return document.body.getAttribute('data-swal2-queue-step');
};
/*
* Global function for inserting a popup to the queue
*/
var insertQueueStep = function insertQueueStep(step, index) {
if (index && index < currentSteps.length) {
return currentSteps.splice(index, 0, step);
}
return currentSteps.push(step);
};
/*
* Global function for deleting a popup from the queue
*/
var deleteQueueStep = function deleteQueueStep(index) {
if (typeof currentSteps[index] !== 'undefined') {
currentSteps.splice(index, 1);
}
};
/**
* Show spinner instead of Confirm button and disable Cancel button
*/
var showLoading = function showLoading() {
var popup = getPopup();
if (!popup) {
Swal.fire('');
}
popup = getPopup();
var actions = getActions();
var confirmButton = getConfirmButton();
var cancelButton = getCancelButton();
show(actions);
show(confirmButton);
addClass([popup, actions], swalClasses.loading);
confirmButton.disabled = true;
cancelButton.disabled = true;
popup.setAttribute('data-loading', true);
popup.setAttribute('aria-busy', true);
popup.focus();
};
var RESTORE_FOCUS_TIMEOUT = 100;
var globalState = {};
var focusPreviousActiveElement = function focusPreviousActiveElement() {
if (globalState.previousActiveElement && globalState.previousActiveElement.focus) {
globalState.previousActiveElement.focus();
globalState.previousActiveElement = null;
} else if (document.body) {
document.body.focus();
}
}; // Restore previous active (focused) element
var restoreActiveElement = function restoreActiveElement() {
return new Promise(function (resolve) {
var x = window.scrollX;
var y = window.scrollY;
globalState.restoreFocusTimeout = setTimeout(function () {
focusPreviousActiveElement();
resolve();
}, RESTORE_FOCUS_TIMEOUT); // issues/900
if (typeof x !== 'undefined' && typeof y !== 'undefined') {
// IE doesn't have scrollX/scrollY support
window.scrollTo(x, y);
}
});
};
/**
* If `timer` parameter is set, returns number of milliseconds of timer remained.
* Otherwise, returns undefined.
*/
var getTimerLeft = function getTimerLeft() {
return globalState.timeout && globalState.timeout.getTimerLeft();
};
/**
* Stop timer. Returns number of milliseconds of timer remained.
* If `timer` parameter isn't set, returns undefined.
*/
var stopTimer = function stopTimer() {
return globalState.timeout && globalState.timeout.stop();
};
/**
* Resume timer. Returns number of milliseconds of timer remained.
* If `timer` parameter isn't set, returns undefined.
*/
var resumeTimer = function resumeTimer() {
return globalState.timeout && globalState.timeout.start();
};
/**
* Resume timer. Returns number of milliseconds of timer remained.
* If `timer` parameter isn't set, returns undefined.
*/
var toggleTimer = function toggleTimer() {
var timer = globalState.timeout;
return timer && (timer.running ? timer.stop() : timer.start());
};
/**
* Increase timer. Returns number of milliseconds of an updated timer.
* If `timer` parameter isn't set, returns undefined.
*/
var increaseTimer = function increaseTimer(n) {
return globalState.timeout && globalState.timeout.increase(n);
};
/**
* Check if timer is running. Returns true if timer is running
* or false if timer is paused or stopped.
* If `timer` parameter isn't set, returns undefined
*/
var isTimerRunning = function isTimerRunning() {
return globalState.timeout && globalState.timeout.isRunning();
};
var defaultParams = {
title: '',
titleText: '',
text: '',
html: '',
footer: '',
type: null,
toast: false,
customClass: '',
customContainerClass: '',
target: 'body',
backdrop: true,
animation: true,
heightAuto: true,
allowOutsideClick: true,
allowEscapeKey: true,
allowEnterKey: true,
stopKeydownPropagation: true,
keydownListenerCapture: false,
showConfirmButton: true,
showCancelButton: false,
preConfirm: null,
confirmButtonText: 'OK',
confirmButtonAriaLabel: '',
confirmButtonColor: null,
confirmButtonClass: '',
cancelButtonText: 'Cancel',
cancelButtonAriaLabel: '',
cancelButtonColor: null,
cancelButtonClass: '',
buttonsStyling: true,
reverseButtons: false,
focusConfirm: true,
focusCancel: false,
showCloseButton: false,
closeButtonAriaLabel: 'Close this dialog',
showLoaderOnConfirm: false,
imageUrl: null,
imageWidth: null,
imageHeight: null,
imageAlt: '',
imageClass: '',
timer: null,
width: null,
padding: null,
background: null,
input: null,
inputPlaceholder: '',
inputValue: '',
inputOptions: {},
inputAutoTrim: true,
inputClass: '',
inputAttributes: {},
inputValidator: null,
validationMessage: null,
grow: false,
position: 'center',
progressSteps: [],
currentProgressStep: null,
progressStepsDistance: null,
onBeforeOpen: null,
onAfterClose: null,
onOpen: null,
onClose: null,
scrollbarPadding: true
};
var updatableParams = ['title', 'titleText', 'text', 'html', 'type', 'customClass', 'showConfirmButton', 'showCancelButton', 'confirmButtonText', 'confirmButtonAriaLabel', 'confirmButtonColor', 'confirmButtonClass', 'cancelButtonText', 'cancelButtonAriaLabel', 'cancelButtonColor', 'cancelButtonClass', 'buttonsStyling', 'reverseButtons', 'imageUrl', 'imageWidth', 'imageHeigth', 'imageAlt', 'imageClass', 'progressSteps', 'currentProgressStep'];
var deprecatedParams = {
customContainerClass: 'customClass',
confirmButtonClass: 'customClass',
cancelButtonClass: 'customClass',
imageClass: 'customClass',
inputClass: 'customClass'
};
var toastIncompatibleParams = ['allowOutsideClick', 'allowEnterKey', 'backdrop', 'focusConfirm', 'focusCancel', 'heightAuto', 'keydownListenerCapture'];
/**
* Is valid parameter
* @param {String} paramName
*/
var isValidParameter = function isValidParameter(paramName) {
return defaultParams.hasOwnProperty(paramName);
};
/**
* Is valid parameter for Swal.update() method
* @param {String} paramName
*/
var isUpdatableParameter = function isUpdatableParameter(paramName) {
return updatableParams.indexOf(paramName) !== -1;
};
/**
* Is deprecated parameter
* @param {String} paramName
*/
var isDeprecatedParameter = function isDeprecatedParameter(paramName) {
return deprecatedParams[paramName];
};
var checkIfParamIsValid = function checkIfParamIsValid(param) {
if (!isValidParameter(param)) {
warn("Unknown parameter \"".concat(param, "\""));
}
};
var checkIfToastParamIsValid = function checkIfToastParamIsValid(param) {
if (toastIncompatibleParams.indexOf(param) !== -1) {
warn("The parameter \"".concat(param, "\" is incompatible with toasts"));
}
};
var checkIfParamIsDeprecated = function checkIfParamIsDeprecated(param) {
if (isDeprecatedParameter(param)) {
warnAboutDepreation(param, isDeprecatedParameter(param));
}
};
/**
* Show relevant warnings for given params
*
* @param params
*/
var showWarningsForParams = function showWarningsForParams(params) {
for (var param in params) {
checkIfParamIsValid(param);
if (params.toast) {
checkIfToastParamIsValid(param);
}
checkIfParamIsDeprecated();
}
};
var staticMethods = Object.freeze({
isValidParameter: isValidParameter,
isUpdatableParameter: isUpdatableParameter,
isDeprecatedParameter: isDeprecatedParameter,
argsToParams: argsToParams,
isVisible: isVisible$1,
clickConfirm: clickConfirm,
clickCancel: clickCancel,
getContainer: getContainer,
getPopup: getPopup,
getTitle: getTitle,
getContent: getContent,
getImage: getImage,
getIcon: getIcon,
getIcons: getIcons,
getCloseButton: getCloseButton,
getActions: getActions,
getConfirmButton: getConfirmButton,
getCancelButton: getCancelButton,
getHeader: getHeader,
getFooter: getFooter,
getFocusableElements: getFocusableElements,
getValidationMessage: getValidationMessage,
isLoading: isLoading,
fire: fire,
mixin: mixin,
queue: queue,
getQueueStep: getQueueStep,
insertQueueStep: insertQueueStep,
deleteQueueStep: deleteQueueStep,
showLoading: showLoading,
enableLoading: showLoading,
getTimerLeft: getTimerLeft,
stopTimer: stopTimer,
resumeTimer: resumeTimer,
toggleTimer: toggleTimer,
increaseTimer: increaseTimer,
isTimerRunning: isTimerRunning
});
/**
* Enables buttons and hide loader.
*/
function hideLoading() {
var innerParams = privateProps.innerParams.get(this);
var domCache = privateProps.domCache.get(this);
if (!innerParams.showConfirmButton) {
hide(domCache.confirmButton);
if (!innerParams.showCancelButton) {
hide(domCache.actions);
}
}
removeClass([domCache.popup, domCache.actions], swalClasses.loading);
domCache.popup.removeAttribute('aria-busy');
domCache.popup.removeAttribute('data-loading');
domCache.confirmButton.disabled = false;
domCache.cancelButton.disabled = false;
}
function getInput$1(instance) {
var innerParams = privateProps.innerParams.get(instance || this);
var domCache = privateProps.domCache.get(instance || this);
return getInput(domCache.content, innerParams.input);
}
var fixScrollbar = function fixScrollbar() {
// for queues, do not do this more than once
if (states.previousBodyPadding !== null) {
return;
} // if the body has overflow
if (document.body.scrollHeight > window.innerHeight) {
// add padding so the content doesn't shift after removal of scrollbar
states.previousBodyPadding = parseInt(window.getComputedStyle(document.body).getPropertyValue('padding-right'));
document.body.style.paddingRight = states.previousBodyPadding + measureScrollbar() + 'px';
}
};
var undoScrollbar = function undoScrollbar() {
if (states.previousBodyPadding !== null) {
document.body.style.paddingRight = states.previousBodyPadding + 'px';
states.previousBodyPadding = null;
}
};
/* istanbul ignore next */
var iOSfix = function iOSfix() {
var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
if (iOS && !hasClass(document.body, swalClasses.iosfix)) {
var offset = document.body.scrollTop;
document.body.style.top = offset * -1 + 'px';
addClass(document.body, swalClasses.iosfix);
lockBodyScroll();
}
};
var lockBodyScroll = function lockBodyScroll() {
// #1246
var container = getContainer();
var preventTouchMove;
container.ontouchstart = function (e) {
preventTouchMove = e.target === container || !isScrollable(container) && e.target.tagName !== 'INPUT' // #1603
;
};
container.ontouchmove = function (e) {
if (preventTouchMove) {
e.preventDefault();
e.stopPropagation();
}
};
};
/* istanbul ignore next */
var undoIOSfix = function undoIOSfix() {
if (hasClass(document.body, swalClasses.iosfix)) {
var offset = parseInt(document.body.style.top, 10);
removeClass(document.body, swalClasses.iosfix);
document.body.style.top = '';
document.body.scrollTop = offset * -1;
}
};
var isIE11 = function isIE11() {
return !!window.MSInputMethodContext && !!document.documentMode;
}; // Fix IE11 centering sweetalert2/issues/933
/* istanbul ignore next */
var fixVerticalPositionIE = function fixVerticalPositionIE() {
var container = getContainer();
var popup = getPopup();
container.style.removeProperty('align-items');
if (popup.offsetTop < 0) {
container.style.alignItems = 'flex-start';
}
};
/* istanbul ignore next */
var IEfix = function IEfix() {
if (typeof window !== 'undefined' && isIE11()) {
fixVerticalPositionIE();
window.addEventListener('resize', fixVerticalPositionIE);
}
};
/* istanbul ignore next */
var undoIEfix = function undoIEfix() {
if (typeof window !== 'undefined' && isIE11()) {
window.removeEventListener('resize', fixVerticalPositionIE);
}
};
// Adding aria-hidden="true" to elements outside of the active modal dialog ensures that
// elements not within the active modal dialog will not be surfaced if a user opens a screen
// reader’s list of elements (headings, form controls, landmarks, etc.) in the document.
var setAriaHidden = function setAriaHidden() {
var bodyChildren = toArray(document.body.children);
bodyChildren.forEach(function (el) {
if (el === getContainer() || contains(el, getContainer())) {
return;
}
if (el.hasAttribute('aria-hidden')) {
el.setAttribute('data-previous-aria-hidden', el.getAttribute('aria-hidden'));
}
el.setAttribute('aria-hidden', 'true');
});
};
var unsetAriaHidden = function unsetAriaHidden() {
var bodyChildren = toArray(document.body.children);
bodyChildren.forEach(function (el) {
if (el.hasAttribute('data-previous-aria-hidden')) {
el.setAttribute('aria-hidden', el.getAttribute('data-previous-aria-hidden'));
el.removeAttribute('data-previous-aria-hidden');
} else {
el.removeAttribute('aria-hidden');
}
});
};
/**
* This module containts `WeakMap`s for each effectively-"private property" that a `Swal` has.
* For example, to set the private property "foo" of `this` to "bar", you can `privateProps.foo.set(this, 'bar')`
* This is the approach that Babel will probably take to implement private methods/fields
* https://github.com/tc39/proposal-private-methods
* https://github.com/babel/babel/pull/7555
* Once we have the changes from that PR in Babel, and our core class fits reasonable in *one module*
* then we can use that language feature.
*/
var privateMethods = {
swalPromiseResolve: new WeakMap()
};
/*
* Instance method to close sweetAlert
*/
function removePopupAndResetState(container, isToast, onAfterClose) {
if (isToast) {
triggerOnAfterClose(onAfterClose);
} else {
restoreActiveElement().then(function () {
return triggerOnAfterClose(onAfterClose);
});
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
capture: globalState.keydownListenerCapture
});
globalState.keydownHandlerAdded = false;
} // Unset globalState props so GC will dispose globalState (#1569)
delete globalState.keydownHandler;
delete globalState.keydownTarget;
if (container.parentNode) {
container.parentNode.removeChild(container);
}
removeBodyClasses();
if (isModal()) {
undoScrollbar();
undoIOSfix();
undoIEfix();
unsetAriaHidden();
}
}
function removeBodyClasses() {
removeClass([document.documentElement, document.body], [swalClasses.shown, swalClasses['height-auto'], swalClasses['no-backdrop'], swalClasses['toast-shown'], swalClasses['toast-column']]);
}
function swalCloseEventFinished(popup, container, isToast, onAfterClose) {
if (hasClass(popup, swalClasses.hide)) {
removePopupAndResetState(container, isToast, onAfterClose);
} // Unset WeakMaps so GC will be able to dispose them (#1569)
unsetWeakMaps(privateProps);
unsetWeakMaps(privateMethods);
}
function close(resolveValue) {
var container = getContainer();
var popup = getPopup();
if (!popup || hasClass(popup, swalClasses.hide)) {
return;
}
var innerParams = privateProps.innerParams.get(this);
var swalPromiseResolve = privateMethods.swalPromiseResolve.get(this);
var onClose = innerParams.onClose;
var onAfterClose = innerParams.onAfterClose;
removeClass(popup, swalClasses.show);
addClass(popup, swalClasses.hide); // If animation is supported, animate
if (animationEndEvent && hasCssAnimation(popup)) {
popup.addEventListener(animationEndEvent, function (e) {
if (e.target === popup) {
swalCloseEventFinished(popup, container, isToast(), onAfterClose);
}
});
} else {
// Otherwise, remove immediately
removePopupAndResetState(container, isToast(), onAfterClose);
}
if (onClose !== null && typeof onClose === 'function') {
onClose(popup);
} // Resolve Swal promise
swalPromiseResolve(resolveValue || {}); // Unset this.params so GC will dispose it (#1569)
delete this.params;
}
var unsetWeakMaps = function unsetWeakMaps(obj) {
for (var i in obj) {
obj[i] = new WeakMap();
}
};
var triggerOnAfterClose = function triggerOnAfterClose(onAfterClose) {
if (onAfterClose !== null && typeof onAfterClose === 'function') {
setTimeout(function () {
onAfterClose();
});
}
};
function setButtonsDisabled(instance, buttons, disabled) {
var domCache = privateProps.domCache.get(instance);
buttons.forEach(function (button) {
domCache[button].disabled = disabled;
});
}
function setInputDisabled(input, disabled) {
if (!input) {
return false;
}
if (input.type === 'radio') {
var radiosContainer = input.parentNode.parentNode;
var radios = radiosContainer.querySelectorAll('input');
for (var i = 0; i < radios.length; i++) {
radios[i].disabled = disabled;
}
} else {
input.disabled = disabled;
}
}
function enableButtons() {
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], false);
}
function disableButtons() {
setButtonsDisabled(this, ['confirmButton', 'cancelButton'], true);
} // @deprecated
function enableConfirmButton() {
warnAboutDepreation('Swal.disableConfirmButton()', "Swal.getConfirmButton().removeAttribute('disabled')");
setButtonsDisabled(this, ['confirmButton'], false);
} // @deprecated
function disableConfirmButton() {
warnAboutDepreation('Swal.enableConfirmButton()', "Swal.getConfirmButton().setAttribute('disabled', '')");
setButtonsDisabled(this, ['confirmButton'], true);
}
function enableInput() {
return setInputDisabled(this.getInput(), false);
}
function disableInput() {
return setInputDisabled(this.getInput(), true);
}
function showValidationMessage(error) {
var domCache = privateProps.domCache.get(this);
domCache.validationMessage.innerHTML = error;
var popupComputedStyle = window.getComputedStyle(domCache.popup);
domCache.validationMessage.style.marginLeft = "-".concat(popupComputedStyle.getPropertyValue('padding-left'));
domCache.validationMessage.style.marginRight = "-".concat(popupComputedStyle.getPropertyValue('padding-right'));
show(domCache.validationMessage);
var input = this.getInput();
if (input) {
input.setAttribute('aria-invalid', true);
input.setAttribute('aria-describedBy', swalClasses['validation-message']);
focusInput(input);
addClass(input, swalClasses.inputerror);
}
} // Hide block with validation message
function resetValidationMessage$1() {
var domCache = privateProps.domCache.get(this);
if (domCache.validationMessage) {
hide(domCache.validationMessage);
}
var input = this.getInput();
if (input) {
input.removeAttribute('aria-invalid');
input.removeAttribute('aria-describedBy');
removeClass(input, swalClasses.inputerror);
}
}
function getProgressSteps$1() {
warnAboutDepreation('Swal.getProgressSteps()', "const swalInstance = Swal.fire({progressSteps: ['1', '2', '3']}); const progressSteps = swalInstance.params.progressSteps");
var innerParams = privateProps.innerParams.get(this);
return innerParams.progressSteps;
}
function setProgressSteps(progressSteps) {
warnAboutDepreation('Swal.setProgressSteps()', 'Swal.update()');
var innerParams = privateProps.innerParams.get(this);
var updatedParams = _extends({}, innerParams, {
progressSteps: progressSteps
});
renderProgressSteps(this, updatedParams);
privateProps.innerParams.set(this, updatedParams);
}
function showProgressSteps() {
var domCache = privateProps.domCache.get(this);
show(domCache.progressSteps);
}
function hideProgressSteps() {
var domCache = privateProps.domCache.get(this);
hide(domCache.progressSteps);
}
var Timer =
/*#__PURE__*/
function () {
function Timer(callback, delay) {
_classCallCheck(this, Timer);
this.callback = callback;
this.remaining = delay;
this.running = false;
this.start();
}
_createClass(Timer, [{
key: "start",
value: function start() {
if (!this.running) {
this.running = true;
this.started = new Date();
this.id = setTimeout(this.callback, this.remaining);
}
return this.remaining;
}
}, {
key: "stop",
value: function stop() {
if (this.running) {
this.running = false;
clearTimeout(this.id);
this.remaining -= new Date() - this.started;
}
return this.remaining;
}
}, {
key: "increase",
value: function increase(n) {
var running = this.running;
if (running) {
this.stop();
}
this.remaining += n;
if (running) {
this.start();
}
return this.remaining;
}
}, {
key: "getTimerLeft",
value: function getTimerLeft() {
if (this.running) {
this.stop();
this.start();
}
return this.remaining;
}
}, {
key: "isRunning",
value: function isRunning() {
return this.running;
}
}]);
return Timer;
}();
var defaultInputValidators = {
email: function email(string, validationMessage) {
return /^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,24}$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage ? validationMessage : 'Invalid email address');
},
url: function url(string, validationMessage) {
// taken from https://stackoverflow.com/a/3809435 with a small change from #1306
return /^https?:\/\/(www\.)?[-a-zA-Z0-9@:%._+~#=]{2,256}\.[a-z]{2,63}\b([-a-zA-Z0-9@:%_+.~#?&/=]*)$/.test(string) ? Promise.resolve() : Promise.resolve(validationMessage ? validationMessage : 'Invalid URL');
}
};
/**
* Set type, text and actions on popup
*
* @param params
* @returns {boolean}
*/
function setParameters(params) {
// Use default `inputValidator` for supported input types if not provided
if (!params.inputValidator) {
Object.keys(defaultInputValidators).forEach(function (key) {
if (params.input === key) {
params.inputValidator = defaultInputValidators[key];
}
});
} // showLoaderOnConfirm && preConfirm
if (params.showLoaderOnConfirm && !params.preConfirm) {
warn('showLoaderOnConfirm is set to true, but preConfirm is not defined.\n' + 'showLoaderOnConfirm should be used together with preConfirm, see usage example:\n' + 'https://sweetalert2.github.io/#ajax-request');
} // params.animation will be actually used in renderPopup.js
// but in case when params.animation is a function, we need to call that function
// before popup (re)initialization, so it'll be possible to check Swal.isVisible()
// inside the params.animation function
params.animation = callIfFunction(params.animation); // Determine if the custom target element is valid
if (!params.target || typeof params.target === 'string' && !document.querySelector(params.target) || typeof params.target !== 'string' && !params.target.appendChild) {
warn('Target parameter is not valid, defaulting to "body"');
params.target = 'body';
} // Replace newlines with <br> in title
if (typeof params.title === 'string') {
params.title = params.title.split('\n').join('<br />');
}
var oldPopup = getPopup();
var targetElement = typeof params.target === 'string' ? document.querySelector(params.target) : params.target;
if (!oldPopup || // If the model target has changed, refresh the popup
oldPopup && targetElement && oldPopup.parentNode !== targetElement.parentNode) {
init(params);
}
}
function swalOpenAnimationFinished(popup, container) {
popup.removeEventListener(animationEndEvent, swalOpenAnimationFinished);
container.style.overflowY = 'auto';
}
/**
* Open popup, add necessary classes and styles, fix scrollbar
*
* @param {Array} params
*/
var openPopup = function openPopup(params) {
var container = getContainer();
var popup = getPopup();
if (params.onBeforeOpen !== null && typeof params.onBeforeOpen === 'function') {
params.onBeforeOpen(popup);
}
if (params.animation) {
addClass(popup, swalClasses.show);
addClass(container, swalClasses.fade);
}
show(popup); // scrolling is 'hidden' until animation is done, after that 'auto'
if (animationEndEvent && hasCssAnimation(popup)) {
container.style.overflowY = 'hidden';
popup.addEventListener(animationEndEvent, swalOpenAnimationFinished.bind(null, popup, container));
} else {
container.style.overflowY = 'auto';
}
addClass([document.documentElement, document.body, container], swalClasses.shown);
if (params.heightAuto && params.backdrop && !params.toast) {
addClass([document.documentElement, document.body], swalClasses['height-auto']);
}
if (isModal()) {
if (params.scrollbarPadding) {
fixScrollbar();
}
iOSfix();
IEfix();
setAriaHidden(); // sweetalert2/issues/1247
setTimeout(function () {
container.scrollTop = 0;
});
}
if (!isToast() && !globalState.previousActiveElement) {
globalState.previousActiveElement = document.activeElement;
}
if (params.onOpen !== null && typeof params.onOpen === 'function') {
setTimeout(function () {
params.onOpen(popup);
});
}
};
var _this = undefined;
var handleInputOptions = function handleInputOptions(instance, params) {
var content = getContent();
var processInputOptions = function processInputOptions(inputOptions) {
return populateInputOptions[params.input](content, formatInputOptions(inputOptions), params);
};
if (isPromise(params.inputOptions)) {
showLoading();
params.inputOptions.then(function (inputOptions) {
instance.hideLoading();
processInputOptions(inputOptions);
});
} else if (_typeof(params.inputOptions) === 'object') {
processInputOptions(params.inputOptions);
} else {
error("Unexpected type of inputOptions! Expected object, Map or Promise, got ".concat(_typeof(params.inputOptions)));
}
};
var handleInputValue = function handleInputValue(instance, params) {
var input = instance.getInput();
hide(input);
params.inputValue.then(function (inputValue) {
input.value = params.input === 'number' ? parseFloat(inputValue) || 0 : inputValue + '';
show(input);
input.focus();
instance.hideLoading();
})["catch"](function (err) {
error('Error in inputValue promise: ' + err);
input.value = '';
show(input);
input.focus();
_this.hideLoading();
});
};
var populateInputOptions = {
select: function select(content, inputOptions, params) {
var select = getChildByClass(content, swalClasses.select);
inputOptions.forEach(function (inputOption) {
var optionValue = inputOption[0];
var optionLabel = inputOption[1];
var option = document.createElement('option');
option.value = optionValue;
option.innerHTML = optionLabel;
if (params.inputValue.toString() === optionValue.toString()) {
option.selected = true;
}
select.appendChild(option);
});
select.focus();
},
radio: function radio(content, inputOptions, params) {
var radio = getChildByClass(content, swalClasses.radio);
inputOptions.forEach(function (inputOption) {
var radioValue = inputOption[0];
var radioLabel = inputOption[1];
var radioInput = document.createElement('input');
var radioLabelElement = document.createElement('label');
radioInput.type = 'radio';
radioInput.name = swalClasses.radio;
radioInput.value = radioValue;
if (params.inputValue.toString() === radioValue.toString()) {
radioInput.checked = true;
}
var label = document.createElement('span');
label.innerHTML = radioLabel;
label.className = swalClasses.label;
radioLabelElement.appendChild(radioInput);
radioLabelElement.appendChild(label);
radio.appendChild(radioLabelElement);
});
var radios = radio.querySelectorAll('input');
if (radios.length) {
radios[0].focus();
}
}
/**
* Converts `inputOptions` into an array of `[value, label]`s
* @param inputOptions
*/
};
var formatInputOptions = function formatInputOptions(inputOptions) {
var result = [];
if (typeof Map !== 'undefined' && inputOptions instanceof Map) {
inputOptions.forEach(function (value, key) {
result.push([key, value]);
});
} else {
Object.keys(inputOptions).forEach(function (key) {
result.push([key, inputOptions[key]]);
});
}
return result;
};
function _main(userParams) {
var _this = this;
showWarningsForParams(userParams);
var innerParams = _extends({}, defaultParams, userParams);
setParameters(innerParams);
Object.freeze(innerParams); // clear the previous timer
if (globalState.timeout) {
globalState.timeout.stop();
delete globalState.timeout;
} // clear the restore focus timeout
clearTimeout(globalState.restoreFocusTimeout);
var domCache = {
popup: getPopup(),
container: getContainer(),
content: getContent(),
actions: getActions(),
confirmButton: getConfirmButton(),
cancelButton: getCancelButton(),
closeButton: getCloseButton(),
validationMessage: getValidationMessage(),
progressSteps: getProgressSteps()
};
privateProps.domCache.set(this, domCache);
render(this, innerParams);
privateProps.innerParams.set(this, innerParams);
var constructor = this.constructor;
return new Promise(function (resolve) {
// functions to handle all closings/dismissals
var succeedWith = function succeedWith(value) {
_this.closePopup({
value: value
});
};
var dismissWith = function dismissWith(dismiss) {
_this.closePopup({
dismiss: dismiss
});
};
privateMethods.swalPromiseResolve.set(_this, resolve); // Close on timer
if (innerParams.timer) {
globalState.timeout = new Timer(function () {
dismissWith('timer');
delete globalState.timeout;
}, innerParams.timer);
} // Get the value of the popup input
var getInputValue = function getInputValue() {
var input = _this.getInput();
if (!input) {
return null;
}
switch (innerParams.input) {
case 'checkbox':
return input.checked ? 1 : 0;
case 'radio':
return input.checked ? input.value : null;
case 'file':
return input.files.length ? input.files[0] : null;
default:
return innerParams.inputAutoTrim ? input.value.trim() : input.value;
}
}; // input autofocus
if (innerParams.input) {
setTimeout(function () {
var input = _this.getInput();
if (input) {
focusInput(input);
}
}, 0);
}
var confirm = function confirm(value) {
if (innerParams.showLoaderOnConfirm) {
constructor.showLoading(); // TODO: make showLoading an *instance* method
}
if (innerParams.preConfirm) {
_this.resetValidationMessage();
var preConfirmPromise = Promise.resolve().then(function () {
return innerParams.preConfirm(value, innerParams.validationMessage);
});
preConfirmPromise.then(function (preConfirmValue) {
if (isVisible(domCache.validationMessage) || preConfirmValue === false) {
_this.hideLoading();
} else {
succeedWith(typeof preConfirmValue === 'undefined' ? value : preConfirmValue);
}
});
} else {
succeedWith(value);
}
}; // Mouse interactions
var onButtonEvent = function onButtonEvent(e) {
var target = e.target;
var confirmButton = domCache.confirmButton,
cancelButton = domCache.cancelButton;
var targetedConfirm = confirmButton && (confirmButton === target || confirmButton.contains(target));
var targetedCancel = cancelButton && (cancelButton === target || cancelButton.contains(target));
switch (e.type) {
case 'click':
// Clicked 'confirm'
if (targetedConfirm) {
_this.disableButtons();
if (innerParams.input) {
var inputValue = getInputValue();
if (innerParams.inputValidator) {
_this.disableInput();
var validationPromise = Promise.resolve().then(function () {
return innerParams.inputValidator(inputValue, innerParams.validationMessage);
});
validationPromise.then(function (validationMessage) {
_this.enableButtons();
_this.enableInput();
if (validationMessage) {
_this.showValidationMessage(validationMessage);
} else {
confirm(inputValue);
}
});
} else if (!_this.getInput().checkValidity()) {
_this.enableButtons();
_this.showValidationMessage(innerParams.validationMessage);
} else {
confirm(inputValue);
}
} else {
confirm(true);
} // Clicked 'cancel'
} else if (targetedCancel) {
_this.disableButtons();
dismissWith(constructor.DismissReason.cancel);
}
break;
default:
}
};
var buttons = domCache.popup.querySelectorAll('button');
for (var i = 0; i < buttons.length; i++) {
buttons[i].onclick = onButtonEvent;
buttons[i].onmouseover = onButtonEvent;
buttons[i].onmouseout = onButtonEvent;
buttons[i].onmousedown = onButtonEvent;
} // Closing popup by close button
domCache.closeButton.onclick = function () {
dismissWith(constructor.DismissReason.close);
};
if (innerParams.toast) {
// Closing popup by internal click
domCache.popup.onclick = function () {
if (innerParams.showConfirmButton || innerParams.showCancelButton || innerParams.showCloseButton || innerParams.input) {
return;
}
dismissWith(constructor.DismissReason.close);
};
} else {
var ignoreOutsideClick = false; // Ignore click events that had mousedown on the popup but mouseup on the container
// This can happen when the user drags a slider
domCache.popup.onmousedown = function () {
domCache.container.onmouseup = function (e) {
domCache.container.onmouseup = undefined; // We only check if the mouseup target is the container because usually it doesn't
// have any other direct children aside of the popup
if (e.target === domCache.container) {
ignoreOutsideClick = true;
}
};
}; // Ignore click events that had mousedown on the container but mouseup on the popup
domCache.container.onmousedown = function () {
domCache.popup.onmouseup = function (e) {
domCache.popup.onmouseup = undefined; // We also need to check if the mouseup target is a child of the popup
if (e.target === domCache.popup || domCache.popup.contains(e.target)) {
ignoreOutsideClick = true;
}
};
};
domCache.container.onclick = function (e) {
if (ignoreOutsideClick) {
ignoreOutsideClick = false;
return;
}
if (e.target !== domCache.container) {
return;
}
if (callIfFunction(innerParams.allowOutsideClick)) {
dismissWith(constructor.DismissReason.backdrop);
}
};
} // Reverse buttons (Confirm on the right side)
if (innerParams.reverseButtons) {
domCache.confirmButton.parentNode.insertBefore(domCache.cancelButton, domCache.confirmButton);
} else {
domCache.confirmButton.parentNode.insertBefore(domCache.confirmButton, domCache.cancelButton);
} // Focus handling
var setFocus = function setFocus(index, increment) {
var focusableElements = getFocusableElements(innerParams.focusCancel); // search for visible elements and select the next possible match
for (var _i = 0; _i < focusableElements.length; _i++) {
index = index + increment; // rollover to first item
if (index === focusableElements.length) {
index = 0; // go to last item
} else if (index === -1) {
index = focusableElements.length - 1;
}
return focusableElements[index].focus();
} // no visible focusable elements, focus the popup
domCache.popup.focus();
};
var keydownHandler = function keydownHandler(e, innerParams) {
if (innerParams.stopKeydownPropagation) {
e.stopPropagation();
}
var arrowKeys = ['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Left', 'Right', 'Up', 'Down' // IE11
];
if (e.key === 'Enter' && !e.isComposing) {
if (e.target && _this.getInput() && e.target.outerHTML === _this.getInput().outerHTML) {
if (['textarea', 'file'].indexOf(innerParams.input) !== -1) {
return; // do not submit
}
constructor.clickConfirm();
e.preventDefault();
} // TAB
} else if (e.key === 'Tab') {
var targetElement = e.target;
var focusableElements = getFocusableElements(innerParams.focusCancel);
var btnIndex = -1;
for (var _i2 = 0; _i2 < focusableElements.length; _i2++) {
if (targetElement === focusableElements[_i2]) {
btnIndex = _i2;
break;
}
}
if (!e.shiftKey) {
// Cycle to the next button
setFocus(btnIndex, 1);
} else {
// Cycle to the prev button
setFocus(btnIndex, -1);
}
e.stopPropagation();
e.preventDefault(); // ARROWS - switch focus between buttons
} else if (arrowKeys.indexOf(e.key) !== -1) {
// focus Cancel button if Confirm button is currently focused
if (document.activeElement === domCache.confirmButton && isVisible(domCache.cancelButton)) {
domCache.cancelButton.focus(); // and vice versa
} else if (document.activeElement === domCache.cancelButton && isVisible(domCache.confirmButton)) {
domCache.confirmButton.focus();
} // ESC
} else if ((e.key === 'Escape' || e.key === 'Esc') && callIfFunction(innerParams.allowEscapeKey) === true) {
e.preventDefault();
dismissWith(constructor.DismissReason.esc);
}
};
if (globalState.keydownTarget && globalState.keydownHandlerAdded) {
globalState.keydownTarget.removeEventListener('keydown', globalState.keydownHandler, {
capture: globalState.keydownListenerCapture
});
globalState.keydownHandlerAdded = false;
}
if (!innerParams.toast) {
globalState.keydownHandler = function (e) {
return keydownHandler(e, innerParams);
};
globalState.keydownTarget = innerParams.keydownListenerCapture ? window : domCache.popup;
globalState.keydownListenerCapture = innerParams.keydownListenerCapture;
globalState.keydownTarget.addEventListener('keydown', globalState.keydownHandler, {
capture: globalState.keydownListenerCapture
});
globalState.keydownHandlerAdded = true;
}
_this.enableButtons();
_this.hideLoading();
_this.resetValidationMessage();
if (innerParams.toast && (innerParams.input || innerParams.footer || innerParams.showCloseButton)) {
addClass(document.body, swalClasses['toast-column']);
} else {
removeClass(document.body, swalClasses['toast-column']);
} // inputOptions, inputValue
if (innerParams.input === 'select' || innerParams.input === 'radio') {
handleInputOptions(_this, innerParams);
} else if (['text', 'email', 'number', 'tel', 'textarea'].indexOf(innerParams.input) !== -1 && isPromise(innerParams.inputValue)) {
handleInputValue(_this, innerParams);
}
openPopup(innerParams);
if (!innerParams.toast) {
if (!callIfFunction(innerParams.allowEnterKey)) {
if (document.activeElement && typeof document.activeElement.blur === 'function') {
document.activeElement.blur();
}
} else if (innerParams.focusCancel && isVisible(domCache.cancelButton)) {
domCache.cancelButton.focus();
} else if (innerParams.focusConfirm && isVisible(domCache.confirmButton)) {
domCache.confirmButton.focus();
} else {
setFocus(-1, 1);
}
} // fix scroll
domCache.container.scrollTop = 0;
});
}
/**
* Updates popup parameters.
*/
function update(params) {
var validUpdatableParams = {}; // assign valid params from `params` to `defaults`
Object.keys(params).forEach(function (param) {
if (Swal.isUpdatableParameter(param)) {
validUpdatableParams[param] = params[param];
} else {
warn("Invalid parameter to update: \"".concat(param, "\". Updatable params are listed here: https://github.com/sweetalert2/sweetalert2/blob/master/src/utils/params.js"));
}
});
var innerParams = privateProps.innerParams.get(this);
var updatedParams = _extends({}, innerParams, validUpdatableParams);
render(this, updatedParams);
privateProps.innerParams.set(this, updatedParams);
Object.defineProperties(this, {
params: {
value: _extends({}, this.params, params),
writable: false,
enumerable: true
}
});
}
var instanceMethods = Object.freeze({
hideLoading: hideLoading,
disableLoading: hideLoading,
getInput: getInput$1,
close: close,
closePopup: close,
closeModal: close,
closeToast: close,
enableButtons: enableButtons,
disableButtons: disableButtons,
enableConfirmButton: enableConfirmButton,
disableConfirmButton: disableConfirmButton,
enableInput: enableInput,
disableInput: disableInput,
showValidationMessage: showValidationMessage,
resetValidationMessage: resetValidationMessage$1,
getProgressSteps: getProgressSteps$1,
setProgressSteps: setProgressSteps,
showProgressSteps: showProgressSteps,
hideProgressSteps: hideProgressSteps,
_main: _main,
update: update
});
var currentInstance; // SweetAlert constructor
function SweetAlert() {
// Prevent run in Node env
/* istanbul ignore if */
if (typeof window === 'undefined') {
return;
} // Check for the existence of Promise
/* istanbul ignore if */
if (typeof Promise === 'undefined') {
error('This package requires a Promise library, please include a shim to enable it in this browser (See: https://github.com/sweetalert2/sweetalert2/wiki/Migration-from-SweetAlert-to-SweetAlert2#1-ie-support)');
}
currentInstance = this;
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
var outerParams = Object.freeze(this.constructor.argsToParams(args));
Object.defineProperties(this, {
params: {
value: outerParams,
writable: false,
enumerable: true,
configurable: true
}
});
var promise = this._main(this.params);
privateProps.promise.set(this, promise);
} // `catch` cannot be the name of a module export, so we define our thenable methods here instead
SweetAlert.prototype.then = function (onFulfilled) {
var promise = privateProps.promise.get(this);
return promise.then(onFulfilled);
};
SweetAlert.prototype["finally"] = function (onFinally) {
var promise = privateProps.promise.get(this);
return promise["finally"](onFinally);
}; // Assign instance methods from src/instanceMethods/*.js to prototype
_extends(SweetAlert.prototype, instanceMethods); // Assign static methods from src/staticMethods/*.js to constructor
_extends(SweetAlert, staticMethods); // Proxy to instance methods to constructor, for now, for backwards compatibility
Object.keys(instanceMethods).forEach(function (key) {
SweetAlert[key] = function () {
if (currentInstance) {
var _currentInstance;
return (_currentInstance = currentInstance)[key].apply(_currentInstance, arguments);
}
};
});
SweetAlert.DismissReason = DismissReason;
SweetAlert.version = '8.11.8';
var Swal = SweetAlert;
Swal["default"] = Swal;
return Swal;
})));
if (typeof window !== 'undefined' && window.Sweetalert2){ window.swal = window.sweetAlert = window.Swal = window.SweetAlert = window.Sweetalert2}
// CUSTOM JS
class SlideColorSpecificationSelection {
constructor() {
this._elementoDataId = [];
}
// pega as informações do produto na api da vtex
informacoesAPI(productId) {
// caso receber um valor falso ou algo diferente de um numero inteiro, retorna
if (!productId && !Number.isInteger(productId)) return;
return new Promise((resolve, reject) => {
// protocol opening
let http = new XMLHttpRequest();
http.open(
"GET",
"/api/catalog_system/pub/products/search?fq=productId:" +
productId
);
// set headers
http.setRequestHeader("Content-type", "application/json");
http.setRequestHeader("Accept", "application/json");
// received return data
http.onload = () => {
resolve(JSON.parse(http.responseText));
};
// send request
http.send();
});
}
// retorna as cores disponiveis do produto
coresDisponiveis(items) {
// array de cores capturadas para controle de cores
let coresCapturadas = [];
// modifico e filtro o array de cores
return items
.map((item) => {
// modifico o item do array
return item.Cor[0];
})
.filter((item) => {
// caso a cord capturada for repetida remove
if (coresCapturadas.includes(item)) return;
// coloca no array de cores capturadas a nova cor disponivel
coresCapturadas.push(item);
return item; // retorna a cor
});
}
// monta o elemento com as imagens das cores para aplicar no elemento atual
montaCores(cores) {
if (!cores.length) return;
return cores.map((cor) => {
let imagemCor = new Image(30, 9);
imagemCor.src = "/arquivos/" + cor + ".jpg";
imagemCor.title = cor;
return imagemCor;
});
}
aplicaSelecaoCor(coresMontadas, elemento) {
let divCores = document.createElement("div");
divCores.classList.add("area-cores-produto");
coresMontadas.forEach((corMontada) => divCores.appendChild(corMontada));
elemento.appendChild(divCores);
}
adaptaCorParaListaProdutos(referenciaElemento) {
// pega todos os elementos do slide com [data-id]
this._elementoDataId = document.querySelectorAll(referenciaElemento);
if (!this._elementoDataId.length) return;
// passa em cada elemento encontrado
this._elementoDataId.forEach((item) => {
this.informacoesAPI(item.dataset.id).then((data) => {
let coresMontadas = this.montaCores(
this.coresDisponiveis(data[0].items)
);
this.aplicaSelecaoCor(coresMontadas, item);
});
});
}
}
window.addEventListener("load", () => {
function insereCores() {
const slideColorSpecificationSelection = new SlideColorSpecificationSelection();
slideColorSpecificationSelection.adaptaCorParaListaProdutos(
"div[data-id].product"
);
}
$.when($.ajax(insereCores())).then(function () {
$("#fascar-searchResult div.area-cores-produto").each(function (index) {
console.log(`div${index}: ${this.id}`);
var targetCor = $(this).parent().find(".product__content > p");
$(this).insertAfter(targetCor);
});
$("#tachyons-x-ray-body > main > div.fascar-searchNavigator > div.navigation-tabs > div > div > div.search-multiple-navigator > a").appendTo(".search-multiple-navigator");
});
});
function checaLogin() {
vtexjs.checkout.getOrderForm().done(function (orderForm) {
var logado = orderForm.loggedIn;
if (($logado = true)) {
console.log("usuário logado");
}
});
}
checaLogin();
function montaSlick() {
$(".prateleira-categoria .helperComplement").remove();
$(".prateleira-home .prateleira-categoria ul").slick({
slidesToShow: 3,
arrows: false,
slidesToScroll: 1,
infinite: true,
dots: false,
centerMode: false,
focusOnSelect: true,
variableWidth: false,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
infinite: true,
dots: false
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
$(".prateleira-recomendados .prateleira-categoria ul").slick({
slidesToShow: 3,
arrows: false,
slidesToScroll: 1,
infinite: true,
dots: false,
centerMode: false,
focusOnSelect: true,
variableWidth: false,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
infinite: true,
dots: false
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
$(".prateleira-busca .prateleira-categoria ul").slick({
slidesToShow: 3,
arrows: false,
slidesToScroll: 1,
infinite: true,
dots: false,
centerMode: false,
focusOnSelect: true,
variableWidth: false,
responsive: [
{
breakpoint: 1024,
settings: {
slidesToShow: 2,
slidesToScroll: 2,
infinite: true,
dots: false
}
},
{
breakpoint: 600,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
},
{
breakpoint: 480,
settings: {
slidesToShow: 1,
slidesToScroll: 1
}
}
]
});
}
montaSlick();
This file has been truncated, but you can view the full file.
{/* <script src="https://cdn.rawgit.com/inexorabletash/polyfill/v0.1.41/polyfill.min.js"></script> */
}
function __cons(t, a) {
return eval("new t(" + a.map(function(t, e) {
return "a[" + e + "]"
}).join(",") + ")")
}
Object.getPrototypeOf || (Object.getPrototypeOf = function(t) {
if (t !== Object(t))
throw TypeError("Object.getPrototypeOf called on non-object");
return t.__proto__ || t.constructor.prototype || Object.prototype
}
),
"function" != typeof Object.getOwnPropertyNames && (Object.getOwnPropertyNames = function(t) {
if (t !== Object(t))
throw TypeError("Object.getOwnPropertyNames called on non-object");
var e, r = [];
for (e in t)
Object.prototype.hasOwnProperty.call(t, e) && r.push(e);
return r
}
),
"function" != typeof Object.create && (Object.create = function(t, e) {
function r() {}
if ("object" != typeof t)
throw TypeError();
r.prototype = t;
var n = new r;
if (t && (n.constructor = r),
e !== undefined) {
if (e !== Object(e))
throw TypeError();
Object.defineProperties(n, e)
}
return n
}
),
function() {
if (!Object.defineProperty || !function() {
try {
return Object.defineProperty({}, "x", {}),
!0
} catch (t) {
return !1
}
}()) {
var t = Object.defineProperty;
Object.defineProperty = function(e, r, n) {
if (t)
try {
return t(e, r, n)
} catch (o) {}
if (e !== Object(e))
throw TypeError("Object.defineProperty called on non-object");
return Object.prototype.__defineGetter__ && "get"in n && Object.prototype.__defineGetter__.call(e, r, n.get),
Object.prototype.__defineSetter__ && "set"in n && Object.prototype.__defineSetter__.call(e, r, n.set),
"value"in n && (e[r] = n.value),
e
}
}
}(),
"function" != typeof Object.defineProperties && (Object.defineProperties = function(t, e) {
if (t !== Object(t))
throw TypeError("Object.defineProperties called on non-object");
var r;
for (r in e)
Object.prototype.hasOwnProperty.call(e, r) && Object.defineProperty(t, r, e[r]);
return t
}
),
Object.keys || (Object.keys = function(t) {
if (t !== Object(t))
throw TypeError("Object.keys called on non-object");
var e, r = [];
for (e in t)
Object.prototype.hasOwnProperty.call(t, e) && r.push(e);
return r
}
),
Function.prototype.bind || (Function.prototype.bind = function(t) {
if ("function" != typeof this)
throw TypeError("Bind must be called on a function");
var e = Array.prototype.slice.call(arguments, 1)
, r = this
, n = function() {}
, o = function() {
return r.apply(this instanceof n ? this : t, e.concat(Array.prototype.slice.call(arguments)))
};
return this.prototype && (n.prototype = this.prototype),
o.prototype = new n,
o
}
),
Array.isArray = Array.isArray || function(t) {
return Boolean(t && "[object Array]" === Object.prototype.toString.call(Object(t)))
}
,
Array.prototype.indexOf || (Array.prototype.indexOf = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if (0 === r)
return -1;
var n = 0;
if (arguments.length > 0 && (n = Number(arguments[1]),
isNaN(n) ? n = 0 : 0 !== n && n !== 1 / 0 && n !== -1 / 0 && (n = (n > 0 || -1) * Math.floor(Math.abs(n)))),
n >= r)
return -1;
for (var o = n >= 0 ? n : Math.max(r - Math.abs(n), 0); o < r; o++)
if (o in e && e[o] === t)
return o;
return -1
}
),
Array.prototype.lastIndexOf || (Array.prototype.lastIndexOf = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if (0 === r)
return -1;
var n = r;
arguments.length > 1 && ((n = Number(arguments[1])) !== n ? n = 0 : 0 !== n && n !== 1 / 0 && n !== -1 / 0 && (n = (n > 0 || -1) * Math.floor(Math.abs(n))));
for (var o = n >= 0 ? Math.min(n, r - 1) : r - Math.abs(n); o >= 0; o--)
if (o in e && e[o] === t)
return o;
return -1
}
),
Array.prototype.every || (Array.prototype.every = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
var n, o = arguments[1];
for (n = 0; n < r; n++)
if (n in e && !t.call(o, e[n], n, e))
return !1;
return !0
}
),
Array.prototype.some || (Array.prototype.some = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
var n, o = arguments[1];
for (n = 0; n < r; n++)
if (n in e && t.call(o, e[n], n, e))
return !0;
return !1
}
),
Array.prototype.forEach || (Array.prototype.forEach = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
var n, o = arguments[1];
for (n = 0; n < r; n++)
n in e && t.call(o, e[n], n, e)
}
),
Array.prototype.map || (Array.prototype.map = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
var n = [];
n.length = r;
var o, i = arguments[1];
for (o = 0; o < r; o++)
o in e && (n[o] = t.call(i, e[o], o, e));
return n
}
),
Array.prototype.filter || (Array.prototype.filter = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
var n, o = [], i = arguments[1];
for (n = 0; n < r; n++)
if (n in e) {
var a = e[n];
t.call(i, a, n, e) && o.push(a)
}
return o
}
),
Array.prototype.reduce || (Array.prototype.reduce = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
if (0 === r && 1 === arguments.length)
throw TypeError();
var n, o = 0;
if (arguments.length >= 2)
n = arguments[1];
else
for (; ; ) {
if (o in e) {
n = e[o++];
break
}
if (++o >= r)
throw TypeError()
}
for (; o < r; )
o in e && (n = t.call(undefined, n, e[o], o, e)),
o++;
return n
}
),
Array.prototype.reduceRight || (Array.prototype.reduceRight = function(t) {
if (void 0 === this || null === this)
throw TypeError();
var e = Object(this)
, r = e.length >>> 0;
if ("function" != typeof t)
throw TypeError();
if (0 === r && 1 === arguments.length)
throw TypeError();
var n, o = r - 1;
if (arguments.length >= 2)
n = arguments[1];
else
for (; ; ) {
if (o in this) {
n = this[o--];
break
}
if (--o < 0)
throw TypeError()
}
for (; o >= 0; )
o in e && (n = t.call(undefined, n, e[o], o, e)),
o--;
return n
}
),
String.prototype.trim || (String.prototype.trim = function() {
return String(this).replace(/^\s+/, "").replace(/\s+$/, "")
}
),
Date.now || (Date.now = function() {
return Number(new Date)
}
),
Date.prototype.toISOString || (Date.prototype.toISOString = function() {
function t(t) {
return ("00" + t).slice(-2)
}
return this.getUTCFullYear() + "-" + t(this.getUTCMonth() + 1) + "-" + t(this.getUTCDate()) + "T" + t(this.getUTCHours()) + ":" + t(this.getUTCMinutes()) + ":" + t(this.getUTCSeconds()) + "." + function(t) {
return ("000" + t).slice(-3)
}(this.getUTCMilliseconds()) + "Z"
}
),
function(t) {
"use strict";
function e(e) {
return e === t ? C : e
}
function r(t, e) {
for (var r = Object.getOwnPropertyDescriptor(t, e), n = Object.getPrototypeOf(t); !r && n; )
r = Object.getOwnPropertyDescriptor(n, e),
n = Object.getPrototypeOf(n);
return r
}
function n(t, e, r, n) {
e in t && !n && !I || ("function" == typeof r ? Object.defineProperty(t, e, {
value: r,
configurable: !0,
enumerable: !1,
writable: !0
}) : Object.defineProperty(t, e, {
value: r,
configurable: !1,
enumerable: !1,
writable: !1
}))
}
function o(t, e, r) {
Object.defineProperty(t, e, {
value: r,
configurable: !1,
enumerable: !1,
writable: !0
})
}
function i() {
function t(t) {
var e = t.valueOf
, n = R(null);
return Object.defineProperty(t, "valueOf", {
value: function(r) {
return function(o) {
return o === r ? n : e.apply(t, arguments)
}
}(r),
configurable: !0,
writeable: !0,
enumerable: !1
}),
n
}
function e(t) {
var e = "function" == typeof t.valueOf && t.valueOf(r);
return e === t ? null : e
}
var r = R(null);
return {
clear: function() {
r = R(null)
},
remove: function(t) {
var r = e(t);
return !(!r || !b(r, "value")) && (delete r.value,
!0)
},
get: function(t, r) {
var n = e(t);
return n && b(n, "value") ? n.value : r
},
has: function(t) {
var r = e(t);
return Boolean(r && b(r, "value"))
},
set: function(r, n) {
(e(r) || t(r)).value = n
}
}
}
function a(e) {
switch (typeof e) {
case "undefined":
return "undefined";
case "boolean":
return "boolean";
case "number":
return "number";
case "string":
return "string";
case "symbol":
return "symbol";
default:
return null === e ? "null" : e instanceof t.Symbol ? "symbol" : "object"
}
}
function u(t) {
return t = Number(t),
L(t) ? 0 : 0 === t || t === Infinity || t === -Infinity ? t : (t < 0 ? -1 : 1) * V(H(t))
}
function c(t) {
return t >>> 0
}
function s(t) {
if (null === t || t === C)
throw TypeError();
return Object(t)
}
function f(t) {
var e = u(t);
return e <= 0 ? 0 : e === Infinity ? 9007199254740991 : K(e, 9007199254740991)
}
function l(t) {
return "function" == typeof t
}
function p(t) {
return !!/Constructor/.test(Object.prototype.toString.call(t)) || (!!/Function/.test(Object.prototype.toString.call(t)) || "function" == typeof t)
}
function h(t, e) {
if (typeof t != typeof e)
return !1;
switch (typeof t) {
case "undefined":
return !0;
case "number":
return t !== t && e !== e || (0 === t && 0 === e ? 1 / t == 1 / e : t === e);
case "boolean":
case "string":
case "object":
default:
return t === e
}
}
function y(t, e) {
if (typeof t != typeof e)
return !1;
switch (typeof t) {
case "undefined":
return !0;
case "number":
return t !== t && e !== e || t === e;
case "boolean":
case "string":
case "object":
default:
return t === e
}
}
function v(t, e) {
return s(t)[e]
}
function d(t, e) {
var r = v(t, e);
if (r === C || null === r)
return C;
if (!l(r))
throw TypeError();
return r
}
function m(t, e) {
for (; t; ) {
if (Object.prototype.hasOwnProperty.call(t, e))
return !0;
if ("object" !== a(t))
return !1;
t = Object.getPrototypeOf(t)
}
return !1
}
function b(t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}
function g(t, e) {
arguments.length < 2 && (e = d(t, it));
var r = e.call(t);
if ("object" !== a(r))
throw TypeError();
return r
}
function E(t, e) {
if (arguments.length < 2)
var r = t.next();
else
r = t.next(e);
if ("object" !== a(r))
throw TypeError();
return r
}
function w(t) {
return t.value
}
function S(t, e) {
var r = E(t, e)
, n = r.done;
return !0 !== Boolean(n) && r
}
function O(t, e) {
var r = {};
return r.value = t,
r.done = e,
r
}
function T(t, e, r) {
k(function() {
e.apply(C, r)
})
}
function j(t) {}
function _(t) {
var e = [];
if (Object(t) !== t)
return e;
for (var r = new Set; null !== t; )
Object.getOwnPropertyNames(t).forEach(function(n) {
if (!r.has(n)) {
var o = Object.getOwnPropertyDescriptor(t, n);
o && (r.add(n),
o.enumerable && e.push(n))
}
}),
t = Object.getPrototypeOf(t);
return e[it]()
}
function P(t) {
return Object.getOwnPropertyNames(t)
}
function R(t, e) {
return Object.create(t, e)
}
function A() {}
function D(t, e) {
var r = String(t)
, n = new A;
return o(n, "[[IteratedString]]", r),
o(n, "[[StringIteratorNextIndex]]", 0),
o(n, "[[StringIterationKind]]", e),
n
}
function N() {}
function M(t, e) {
var r = s(t)
, n = new N;
return o(n, "[[IteratedObject]]", r),
o(n, "[[ArrayIteratorNextIndex]]", 0),
o(n, "[[ArrayIterationKind]]", e),
n
}
var x, I = !1, C = void 0, k = function(t, e) {
return t ? function(e) {
t.resolve().then(function() {
e()
})
}
: e ? function(t) {
e(t)
}
: function(t) {
setTimeout(t, 0)
}
}(t.Promise, t.setImmediate), L = t.isNaN, U = t.parseInt, F = t.parseFloat, W = Math.E, q = Math.LOG10E, B = Math.LOG2E, H = Math.abs, X = Math.ceil, G = Math.exp, V = Math.floor, z = Math.log, $ = Math.max, K = Math.min, J = Math.pow, Y = Math.random, Z = Math.sqrt, Q = String.prototype.match, tt = String.prototype.replace, et = String.prototype.search, rt = String.prototype.split, nt = Object.create(null);
!function() {
function r(t) {
return Array(t + 1).join("x").replace(/x/g, function() {
return Y() < .5 ? "‌" : "‍"
})
}
function i(t) {
if (!(this instanceof i))
return new i(t,a);
if (this instanceof i && arguments[1] !== a)
throw TypeError();
var e = t === C ? C : String(t);
return o(this, "[[SymbolData]]", r(128)),
o(this, "[[Description]]", e),
u[this] = this,
this
}
var a = Object.create(null)
, u = {};
x = function(t) {
return u[t]
}
;
var c = [];
"Symbol"in t && !I || (t.Symbol = i),
n(i, "for", function(t) {
for (var e = String(t), r = 0; r < c.length; ++r) {
var n = c[r];
if (h(n["[[key]]"], e))
return n["[[symbol]]"]
}
var o = i(t);
return c.push({
"[[key]]": e,
"[[symbol]]": o
}),
o
}),
n(t.Symbol, "iterator", t.Symbol("Symbol.iterator")),
n(i, "keyFor", function(t) {
if (!(t instanceof i))
throw TypeError();
for (var e = 0; e < c.length; ++e) {
var r = c[e];
if (h(r["[[symbol]]"], t))
return r["[[key]]"]
}
return C
}),
n(t.Symbol, "match", t.Symbol("Symbol.match")),
n(t.Symbol, "replace", t.Symbol("Symbol.replace")),
n(t.Symbol, "search", t.Symbol("Symbol.search")),
n(t.Symbol, "split", t.Symbol("Symbol.split")),
n(t.Symbol, "toStringTag", t.Symbol("Symbol.toStringTag")),
Object.defineProperty(i.prototype, "toString", {
value: function() {
var t = e(this)
, r = t["[[Description]]"];
return "Symbol(" + (r === C ? "" : r) + t["[[SymbolData]]"] + ")"
},
configurable: !0,
writeable: !0,
enumerable: !1
}),
Object.defineProperty(i.prototype, "valueOf", {
value: function() {
throw TypeError()
},
configurable: !0,
writeable: !0,
enumerable: !1
})
}();
var ot = {}
, it = t.Symbol.iterator
, at = t.Symbol.match
, ut = t.Symbol.replace
, ct = t.Symbol.search
, st = t.Symbol.split
, ft = t.Symbol.toStringTag;
n(Object, "assign", function(t, e) {
var r = s(t);
if (arguments.length < 2)
return r;
for (var n = 1; n < arguments.length; ) {
var o = arguments[n++];
if (o === C || null === o)
var i = [];
else {
var a = s(o);
i = P(a)
}
for (var u = 0; u < i.length; ++u) {
var c = i[u]
, f = Object.getOwnPropertyDescriptor(a, c);
if (f !== C && f.enumerable) {
var l = a[c];
r[c] = l
}
}
}
return r
}),
function() {
function e(t) {
return !x(t)
}
var r = "symbol" == typeof t.Symbol()
, o = Object.getOwnPropertyNames
, i = Object.keys
, a = "object" == typeof window ? o(window) : [];
n(Object, "getOwnPropertyNames", function(t) {
if ("[object Window]" === Object.prototype.toString.call(t))
try {
return o(t).filter(e)
} catch (r) {
return a.slice()
}
return o(t).filter(e)
}, !r),
n(Object, "getOwnPropertySymbols", function(t) {
return o(t).filter(x).map(x)
}, !r),
n(Object, "keys", function(t) {
return i(t).filter(e)
}, !r)
}(),
n(Object, "is", function(t, e) {
return h(t, e)
}),
n(Object, "setPrototypeOf", function(t, e) {
if ("object" !== a(t))
throw TypeError();
if ("object" !== a(e) && "null" !== a(e))
throw TypeError();
return t.__proto__ = e,
t
});
var lt = Object.prototype.toString;
n(Object.prototype, "toString", function() {
var t = e(this);
return t === Object(t) && ft in t ? "[object " + t[ft] + "]" : lt.apply(t, arguments)
}),
n(t.Symbol.prototype, t.Symbol.toStringTag, "Symbol"),
n(Number, "EPSILON", function() {
var t, e;
for (t = 1; 1 + t !== 1; t /= 2)
e = t;
return e
}()),
n(Number, "isFinite", function(t) {
return "number" === a(t) && (t === t && t !== +Infinity && t !== -Infinity)
}),
n(Number, "isInteger", function(t) {
return "number" === a(t) && (t === t && t !== +Infinity && t !== -Infinity && u(t) === t)
}),
n(Number, "isNaN", function(t) {
return "number" === a(t) && t !== t
}),
n(Number, "isSafeInteger", function(t) {
if ("number" !== a(t))
return !1;
if (t !== t || t === +Infinity || t === -Infinity)
return !1;
var e = u(t);
return e === t && H(e) <= 9007199254740991
}),
n(Number, "MAX_SAFE_INTEGER", 9007199254740991),
n(Number, "MIN_SAFE_INTEGER", -9007199254740991),
n(Number, "parseFloat", F),
n(Number, "parseInt", U),
n(Math, ft, "Math"),
n(Math, "acosh", function(t) {
return t = Number(t),
z(t + Z(t * t - 1))
}),
n(Math, "asinh", function(t) {
if (t = Number(t),
h(t, -0))
return t;
var e = Z(t * t + 1);
return z(e === -t ? 0 : t + e)
}),
n(Math, "atanh", function(t) {
return 0 === (t = Number(t)) ? t : z((1 + t) / (1 - t)) / 2
}),
n(Math, "cbrt", function(t) {
if (t = Number(t),
L(t / t))
return t;
var e = J(H(t), 1 / 3)
, r = t / e / e;
return e + e * (r - e) / (2 * e + r)
}),
n(Math, "clz32", function(t) {
function e(t) {
return 240 & t ? 128 & t ? 0 : 64 & t ? 1 : 32 & t ? 2 : 3 : 8 & t ? 4 : 4 & t ? 5 : 2 & t ? 6 : 1 & t ? 7 : 8
}
return 4278190080 & (t = c(t)) ? e(t >> 24) : 16711680 & t ? e(t >> 16) + 8 : 65280 & t ? e(t >> 8) + 16 : e(t) + 24
}),
n(Math, "cosh", function(t) {
return t = Number(t),
(J(W, t) + J(W, -t)) / 2
}),
n(Math, "expm1", function(t) {
return t = Number(t),
h(t, -0) ? -0 : H(t) < 1e-5 ? t + .5 * t * t : G(t) - 1
}),
n(Math, "fround", function(t) {
return L(t) ? NaN : 1 / t == +Infinity || 1 / t == -Infinity || t === +Infinity || t === -Infinity ? t : new Float32Array([t])[0]
}),
n(Math, "hypot", function() {
for (var t = [], e = 0, r = !1, n = 0; n < arguments.length; ++n) {
var o = H(Number(arguments[n]));
if (o === Infinity)
return o;
o !== o && (r = !0),
o > e && (e = o),
t[n] = o
}
if (r)
return NaN;
if (0 === e)
return 0;
var i = 0;
for (n = 0; n < t.length; ++n) {
var a = t[n] / e;
i += a * a
}
return e * Z(i)
}),
n(Math, "imul", function(t, e) {
var r = c(t)
, n = c(e)
, o = 65535 & r
, i = 65535 & n;
return o * i + ((r >>> 16 & 65535) * i + o * (n >>> 16 & 65535) << 16 >>> 0) | 0
}, "imul"in Math && 0 === Math.imul(1, 2147483648)),
n(Math, "log1p", function(t) {
return (t = Number(t)) < -1 ? NaN : h(t, -0) ? -0 : H(t) > 1e-4 ? z(1 + t) : (-.5 * t + 1) * t
}),
n(Math, "log10", function(t) {
return t = Number(t),
z(t) * q
}),
n(Math, "log2", function(t) {
return t = Number(t),
z(t) * B
}),
n(Math, "sign", function(t) {
return (t = Number(t)) < 0 ? -1 : t > 0 ? 1 : t
}),
n(Math, "sinh", function(t) {
return t = Number(t),
h(t, -0) ? t : (J(W, t) - J(W, -t)) / 2
}),
n(Math, "tanh", function(t) {
t = Number(t);
var e = J(W, 2 * t) - 1
, r = J(W, 2 * t) + 1;
return h(t, -0) ? t : e === r ? 1 : e / r
}),
n(Math, "trunc", function(t) {
return t = Number(t),
L(t) ? NaN : t < 0 ? X(t) : V(t)
});
var pt = function() {
var t = {}
, e = Symbol();
return t[Symbol.match] = function() {
return e
}
,
"".match(t) === e
}();
n(String, "fromCodePoint", function() {
for (var t = arguments, e = t.length, r = [], n = 0; n < e; ) {
var o = t[n]
, i = Number(o);
if (!h(i, u(i)) || i < 0 || i > 1114111)
throw RangeError("Invalid code point " + i);
i < 65536 ? r.push(String.fromCharCode(i)) : (i -= 65536,
r.push(String.fromCharCode(55296 + (i >> 10))),
r.push(String.fromCharCode(i % 1024 + 56320))),
n += 1
}
return r.join("")
}),
n(String, "raw", function(t) {
var e = [].slice.call(arguments, 1)
, r = Object(t).raw
, n = Object(r)
, o = f(n.length);
if (o <= 0)
return "";
for (var i = [], a = 0; ; ) {
var u = n[a]
, c = String(u);
if (i.push(c),
a + 1 === o)
return i.join("");
u = e[a];
var s = String(u);
i.push(s),
a += 1
}
}),
n(String.prototype, "codePointAt", function(t) {
var r = e(this)
, n = String(r)
, o = u(t)
, i = n.length;
if (o < 0 || o >= i)
return C;
var a = n.charCodeAt(o);
if (a < 55296 || a > 56319 || o + 1 === i)
return a;
var c = n.charCodeAt(o + 1);
return c < 56320 || c > 57343 ? a : 1024 * (a - 55296) + (c - 56320) + 65536
}),
n(String.prototype, "endsWith", function(t) {
var r = arguments[1]
, n = e(this)
, o = String(n)
, i = String(t)
, a = o.length
, c = r === C ? a : u(r)
, s = K($(c, 0), a)
, f = i.length
, l = s - f;
return !(l < 0) && o.substring(l, l + f) === i
}),
n(String.prototype, "includes", function(t) {
var r = arguments[1]
, n = e(this)
, o = String(n)
, i = String(t)
, a = u(r)
, c = o.length
, s = K($(a, 0), c);
return -1 !== o.indexOf(i, s)
}),
n(String.prototype, "match", function(t) {
var r = e(this)
, n = String(r);
if (m(t, at))
var o = t;
else
o = new RegExp(t);
return o[at](n)
}, !pt),
n(String.prototype, "repeat", function(t) {
var r = e(this)
, n = String(r)
, o = u(t);
if (o < 0)
throw RangeError();
if (o === Infinity)
throw RangeError();
return new Array(o + 1).join(n)
}),
n(String.prototype, "replace", function(t, r) {
var n = e(this);
return m(t, ut) ? t[ut](n, r) : tt.call(n, t, r)
}, !pt),
n(String.prototype, "search", function(t) {
var r = e(this)
, n = String(r);
if (m(t, ct))
var o = t;
else
o = new RegExp(t);
return o[ct](n)
}, !pt),
n(String.prototype, "split", function(t, r) {
var n = e(this);
return m(t, st) ? t[st](n, r) : rt.call(n, t, r)
}, !pt),
n(String.prototype, "startsWith", function(t) {
var r = arguments[1]
, n = e(this)
, o = String(n)
, i = String(t)
, a = u(r)
, c = o.length
, s = K($(a, 0), c)
, f = i.length;
return !(f + s > c) && o.substring(s, s + f) === i
}),
n(String.prototype, it, function() {
return D(this, "value")
});
var ht = Object.create(ot);
A.prototype = ht,
n(ht, "next", function() {
var t = s(this)
, e = String(t["[[IteratedString]]"])
, r = t["[[StringIteratorNextIndex]]"];
if (r >= e.length)
return o(t, "[[StringIteratorNextIndex]]", Infinity),
O(C, !0);
var n = e.codePointAt(r);
return o(t, "[[StringIteratorNextIndex]]", r + (n > 65535 ? 2 : 1)),
O(String.fromCodePoint(n), !1)
}),
n(ht, ft, "String Iterator"),
"flags"in RegExp.prototype || Object.defineProperty(RegExp.prototype, "flags", {
get: function() {
var t = String(this);
return t.substring(t.lastIndexOf("/") + 1)
}
}),
n(RegExp.prototype, at, function(t) {
var r = e(this);
return Q.call(t, r)
}),
n(RegExp.prototype, ut, function(t, r) {
var n = e(this);
return tt.call(t, n, r)
}),
n(RegExp.prototype, ct, function(t) {
var r = e(this);
return et.call(t, r)
}),
n(RegExp.prototype, st, function(t, r) {
var n = e(this);
return rt.call(t, n, r)
}),
n(Array, "from", function(t) {
var r = arguments[1]
, n = arguments[2]
, o = e(this);
if (r === C)
var i = !1;
else {
if (!l(r))
throw TypeError();
var a = n;
i = !0
}
var u = d(t, it);
if (u !== C) {
if (p(o))
var c = new o;
else
c = new Array(0);
for (var h = g(t, u), y = 0; ; ) {
var v = S(h);
if (!1 === v)
return c.length = y,
c;
var m = w(v);
if (i)
var b = r.call(a, m);
else
b = m;
c[y] = b,
y += 1
}
}
var E = s(t)
, O = f(E.length);
for (c = p(o) ? new o(O) : new Array(O),
y = 0; y < O; ) {
var T = E[y];
b = i ? r.call(a, T, y) : T,
c[y] = b,
y += 1
}
return c.length = O,
c
}),
n(Array, "of", function() {
var t, r = arguments, n = c(r.length), o = e(this);
t = p(o) ? s(t = new o(n)) : new Array(n);
for (var i = 0; i < n; )
t[i] = r[i],
i += 1;
return t.length = n,
t
}),
n(Array.prototype, "copyWithin", function(t, e) {
var r = arguments[2]
, n = s(this)
, o = f(n.length);
o = $(o, 0);
var i, a = u(t);
i = a < 0 ? $(o + a, 0) : K(a, o);
var c, l = u(e);
c = l < 0 ? $(o + l, 0) : K(l, o);
var p, h;
h = (p = r === C ? o : u(r)) < 0 ? $(o + p, 0) : K(p, o);
var y, v = K(h - c, o - i);
for (c < i && i < c + v ? (y = -1,
c = c + v - 1,
i = i + v - 1) : y = 1; v > 0; ) {
var d = String(c)
, b = String(i);
if (m(n, d)) {
var g = n[d];
n[b] = g
} else
delete n[b];
c += y,
i += y,
v -= 1
}
return n
});
var yt = "entries"in Array.prototype && "next"in [].entries();
n(Array.prototype, "entries", function() {
return M(this, "key+value")
}, !yt),
n(Array.prototype, "fill", function(t) {
var e = arguments[1]
, r = arguments[2]
, n = s(this)
, o = f(n.length);
o = $(o, 0);
var i, a = u(e);
i = a < 0 ? $(o + a, 0) : K(a, o);
var c, l;
for (l = (c = r === C ? o : u(r)) < 0 ? $(o + c, 0) : K(c, o); i < l; )
n[String(i)] = t,
i += 1;
return n
}),
n(Array.prototype, "find", function(t) {
var e = s(this)
, r = u(e.length);
if (!l(t))
throw TypeError();
for (var n = arguments.length > 1 ? arguments[1] : C, o = 0; o < r; ) {
var i = String(o);
if (m(e, i)) {
var a = e[i]
, c = t.call(n, a, o, e);
if (Boolean(c))
return a
}
++o
}
return C
}),
n(Array.prototype, "findIndex", function(t) {
var e = s(this)
, r = f(e.length);
if (!l(t))
throw TypeError();
for (var n = arguments.length > 1 ? arguments[1] : C, o = 0; o < r; ) {
var i = String(o);
if (m(e, i)) {
var a = e[i]
, u = t.call(n, a, o, e);
if (Boolean(u))
return o
}
++o
}
return -1
}),
n(Array.prototype, "keys", function() {
return M(this, "key")
}, !yt),
n(Array.prototype, "values", function() {
return M(this, "value")
}, !yt),
n(Array.prototype, it, Array.prototype.values);
var vt = Object.create(ot);
N.prototype = vt,
n(vt, "next", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
var r, n, i = t["[[IteratedObject]]"], u = t["[[ArrayIteratorNextIndex]]"], s = t["[[ArrayIterationKind]]"], f = c(i.length);
if (-1 !== s.indexOf("sparse"))
for (var l = !1; !l && u < f; )
(l = m(i, r = String(u))) || (u += 1);
if (u >= f)
return o(t, "[[ArrayIteratorNextIndex]]", Infinity),
O(C, !0);
if (r = u,
o(t, "[[ArrayIteratorNextIndex]]", u + 1),
-1 !== s.indexOf("value") && (n = i[r]),
-1 !== s.indexOf("key+value"))
return O([r, n], !1);
if (-1 !== s.indexOf("key"))
return O(r, !1);
if ("value" === s)
return O(n, !1);
throw Error("Internal error")
}),
n(vt, ft, "Array Iterator"),
["Int8Array", "Uint8Array", "Uint8ClampedArray", "Int16Array", "Uint16Array", "Int32Array", "Uint32Array", "Float32Array", "Float64Array"].forEach(function(r) {
if (r in t) {
var o = t[r];
n(o, "from", function(t) {
var r = arguments[1]
, n = arguments[2]
, o = e(this);
if (!p(o))
throw TypeError();
if (r === C)
var i = !1;
else {
if (l(r))
throw TypeError();
var a = n;
i = !0
}
var u = d(t, it);
if (u !== C) {
for (var c = g(t, u), h = [], y = !0; !1 !== y; )
if (!1 !== (y = S(c))) {
var v = w(y);
h.push(v)
}
for (var m = h.length, b = new o(m), E = 0; E < m; ) {
var O = h.shift();
if (i)
var T = r.call(a, O);
else
T = O;
b[E] = T,
++E
}
return b
}
var j = s(t);
for (b = new o(m = f(j.length)),
E = 0; E < m; )
O = j[E],
T = i ? r.call(a, O, E) : O,
b[E] = T,
++E;
return b
}),
n(o, "of", function() {
for (var t = arguments, r = t.length, n = new (e(this))(r), o = 0; o < r; )
n[o] = t[o],
++o;
return n
}),
n(o.prototype, "copyWithin", Array.prototype.copyWithin),
n(o.prototype, "entries", Array.prototype.entries),
n(o.prototype, "every", Array.prototype.every),
n(o.prototype, "fill", function(t) {
var e = arguments[1]
, r = arguments[2]
, n = s(this)
, o = f(n.length);
o = $(o, 0);
var i, a = u(e);
i = a < 0 ? $(o + a, 0) : K(a, o);
var c, l;
for (l = (c = r === C ? o : u(r)) < 0 ? $(o + c, 0) : K(c, o); i < l; )
n[String(i)] = t,
i += 1;
return n
}),
n(o.prototype, "filter", function(t) {
var e = arguments[1]
, r = s(this)
, n = f(r.length);
if (!l(t))
throw TypeError();
for (var o = e, i = r.constructor, a = [], u = 0, c = 0; u < n; ) {
var p = r[u];
t.call(o, p, u, r) && (a.push(p),
++c),
++u
}
for (var h = new i(c), y = 0, v = 0; v < a.length; ++v) {
var d = a[v];
h[y] = d,
++y
}
return h
}),
n(o.prototype, "find", Array.prototype.find),
n(o.prototype, "findIndex", Array.prototype.findIndex),
n(o.prototype, "forEach", Array.prototype.forEach),
n(o.prototype, "indexOf", Array.prototype.indexOf),
n(o.prototype, "join", Array.prototype.join),
n(o.prototype, "keys", Array.prototype.keys),
n(o.prototype, "lastIndexOf", Array.prototype.lastIndexOf),
n(o.prototype, "map", function(t) {
var e = arguments[1]
, r = s(this)
, n = f(r.length);
if (!l(t))
throw TypeError();
var o = e
, i = C
, a = r.constructor;
p(a) && (i = new a(n)),
i === C && (i = new Array(n));
for (var u = 0; u < n; ) {
if (m(r, u)) {
var c = r[u]
, h = t.call(o, c, u, r);
i[u] = h
}
++u
}
return i
}),
n(o.prototype, "reduce", Array.prototype.reduce),
n(o.prototype, "reduceRight", Array.prototype.reduceRight),
n(o.prototype, "reverse", Array.prototype.reverse),
n(o.prototype, "slice", function(t, e) {
var r = s(this)
, n = f(r.length)
, o = u(t)
, i = o < 0 ? $(n + o, 0) : K(o, n)
, a = e === C ? n : u(e)
, c = a < 0 ? $(n + a, 0) : K(a, n)
, l = c - i
, h = r.constructor;
if (!p(h))
throw TypeError();
for (var y = new h(l), v = 0; i < c; ) {
var d = r[i];
y[v] = d,
++i,
++v
}
return y
}),
n(o.prototype, "some", Array.prototype.some),
n(o.prototype, "sort", function() {
var t = arguments[0];
return Array.prototype.sort.call(this, function(e, r) {
return e !== e && r !== r ? 0 : e !== e ? 1 : r !== r ? -1 : t !== C ? t(e, r) : e < r ? -1 : e > r ? 1 : 0
})
}),
n(o.prototype, "values", Array.prototype.values),
n(o.prototype, it, o.prototype.values),
n(o.prototype, ft, r)
}
}),
function() {
function r() {
var t = e(this)
, r = arguments[0];
if ("object" !== a(t))
throw TypeError();
if ("[[MapData]]"in t)
throw TypeError();
if (r !== C) {
var n = t.set;
if (!l(n))
throw TypeError();
var i = g(s(r))
}
if (o(t, "[[MapData]]", {
keys: [],
values: []
}),
i === C)
return t;
for (; ; ) {
var u = S(i);
if (!1 === u)
return t;
var c = w(u);
if ("object" !== a(c))
throw TypeError();
var f = c[0]
, p = c[1];
n.call(t, f, p)
}
return t
}
function i(t, e) {
var r;
if (e === e)
return t.keys.indexOf(e);
for (r = 0; r < t.keys.length; r += 1)
if (y(t.keys[r], e))
return r;
return -1
}
function u() {}
function c(t, e) {
if ("object" !== a(t))
throw TypeError();
if (!("[[MapData]]"in t))
throw TypeError();
if (t["[[MapData]]"] === C)
throw TypeError();
var r = new u;
return o(r, "[[Map]]", t),
o(r, "[[MapNextIndex]]", 0),
o(r, "[[MapIterationKind]]", e),
r
}
"Map"in t && !I && !function() {
try {
return new t.Map([]),
!1
} catch (e) {
return !0
}
}() && !function() {
try {
return !(new t.Map).entries().next
} catch (e) {
return !0
}
}() && 1 === new t.Map([["a", 1]]).size || (t.Map = r);
var f = {};
n(r.prototype = f, "clear", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
if (!("[[MapData]]"in t))
throw TypeError();
if (t["[[MapData]]"] === C)
throw TypeError();
var r = t["[[MapData]]"];
return r.keys.length = 0,
r.values.length = 0,
C
}),
n(r.prototype, "delete", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[MapData]]"in r))
throw TypeError();
if (r["[[MapData]]"] === C)
throw TypeError();
var n = r["[[MapData]]"]
, o = i(n, t);
return !(o < 0) && (n.keys[o] = nt,
n.values[o] = nt,
!0)
}),
n(r.prototype, "entries", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "key+value")
}),
n(r.prototype, "forEach", function(t) {
var r = arguments[1]
, n = e(this);
if ("object" !== a(n))
throw TypeError();
if (!("[[MapData]]"in n))
throw TypeError();
if (n["[[MapData]]"] === C)
throw TypeError();
var o = n["[[MapData]]"];
if (!l(t))
throw TypeError("First argument to forEach is not callable.");
for (var i = 0; i < o.keys.length; ++i)
o.keys[i] !== nt && t.call(r, o.values[i], o.keys[i], n);
return C
}),
n(r.prototype, "get", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[MapData]]"in r))
throw TypeError();
if (r["[[MapData]]"] === C)
throw TypeError();
var n = r["[[MapData]]"]
, o = i(n, t);
return o >= 0 ? n.values[o] : C
}),
n(r.prototype, "has", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[MapData]]"in r))
throw TypeError();
if (r["[[MapData]]"] === C)
throw TypeError();
return i(r["[[MapData]]"], t) >= 0
}),
n(r.prototype, "keys", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "key")
}),
n(r.prototype, "set", function(t, r) {
var n = e(this);
if ("object" !== a(n))
throw TypeError();
if (!("[[MapData]]"in n))
throw TypeError();
if (n["[[MapData]]"] === C)
throw TypeError();
var o = n["[[MapData]]"]
, u = i(o, t);
return u < 0 && (u = o.keys.length),
h(t, -0) && (t = 0),
o.keys[u] = t,
o.values[u] = r,
n
}),
Object.defineProperty(r.prototype, "size", {
get: function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
if (!("[[MapData]]"in t))
throw TypeError();
if (t["[[MapData]]"] === C)
throw TypeError();
for (var r = t["[[MapData]]"], n = 0, o = 0; o < r.keys.length; ++o)
r.keys[o] !== nt && (n += 1);
return n
}
}),
n(r.prototype, "values", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "value")
}),
n(r.prototype, it, function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "key+value")
}),
n(t.Map.prototype, ft, "Map");
var p = Object.create(ot);
u.prototype = p,
n(p, "next", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
for (var r = t["[[Map]]"], n = t["[[MapNextIndex]]"], i = t["[[MapIterationKind]]"], u = r["[[MapData]]"]; n < u.keys.length; ) {
var c = {
key: u.keys[n],
value: u.values[n]
};
if (n = n += 1,
o(t, "[[MapNextIndex]]", n),
c.key !== nt)
return "key" === i ? O(c.key, !1) : "value" === i ? O(c.value, !1) : O([c.key, c.value], !1)
}
return O(C, !0)
}),
n(p, ft, "Map Iterator")
}(),
function() {
function r() {
var t = e(this)
, r = arguments[0];
if ("object" !== a(t))
throw TypeError();
if ("[[SetData]]"in t)
throw TypeError();
if (r !== C) {
var n = t.add;
if (!l(n))
throw TypeError();
var i = g(s(r))
}
if (o(t, "[[SetData]]", []),
i === C)
return t;
for (; ; ) {
var u = S(i);
if (!1 === u)
return t;
var c = w(u);
n.call(t, c)
}
return t
}
function i(t, e) {
var r;
if (e === e)
return t.indexOf(e);
for (r = 0; r < t.length; r += 1)
if (y(t[r], e))
return r;
return -1
}
function u() {}
function c(t, e) {
if ("object" !== a(t))
throw TypeError();
if (!("[[SetData]]"in t))
throw TypeError();
if (t["[[SetData]]"] === C)
throw TypeError();
var r = new u;
return o(r, "[[IteratedSet]]", t),
o(r, "[[SetNextIndex]]", 0),
o(r, "[[SetIterationKind]]", e),
r
}
"Set"in t && !I && !function() {
try {
return !(new t.Set).entries().next
} catch (e) {
return !0
}
}() && 1 === new t.Set([1]).size || (t.Set = r);
var f = {};
n(r.prototype = f, "add", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[SetData]]"in r))
throw TypeError();
if (r["[[SetData]]"] === C)
throw TypeError();
h(t, -0) && (t = 0);
var n = i(r["[[SetData]]"], t);
return n < 0 && (n = r["[[SetData]]"].length),
r["[[SetData]]"][n] = t,
r
}),
n(r.prototype, "clear", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
if (!("[[SetData]]"in t))
throw TypeError();
if (t["[[SetData]]"] === C)
throw TypeError();
return t["[[SetData]]"].length = 0,
C
}),
n(r.prototype, "delete", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[SetData]]"in r))
throw TypeError();
if (r["[[SetData]]"] === C)
throw TypeError();
var n = r["[[SetData]]"]
, o = i(n, t);
return !(o < 0) && (n[o] = nt,
!0)
}),
n(r.prototype, "entries", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "key+value")
}),
n(r.prototype, "forEach", function(t) {
var r = arguments[1]
, n = e(this);
if ("object" !== a(n))
throw TypeError();
if (!("[[SetData]]"in n))
throw TypeError();
if (n["[[SetData]]"] === C)
throw TypeError();
var o = n["[[SetData]]"];
if (!l(t))
throw TypeError("First argument to forEach is not callable.");
for (var i = 0; i < o.length; ++i)
o[i] !== nt && t.call(r, o[i], o[i], n)
}),
n(r.prototype, "has", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (!("[[SetData]]"in r))
throw TypeError();
if (r["[[SetData]]"] === C)
throw TypeError();
return -1 !== i(r["[[SetData]]"], t)
}),
Object.defineProperty(r.prototype, "size", {
get: function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
if (!("[[SetData]]"in t))
throw TypeError();
if (t["[[SetData]]"] === C)
throw TypeError();
for (var r = t["[[SetData]]"], n = 0, o = 0; o < r.length; ++o)
r[o] !== nt && (n += 1);
return n
}
}),
n(r.prototype, "values", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t, "value")
}),
r.prototype.keys = r.prototype.values,
n(r.prototype, it, function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
return c(t)
}),
n(t.Set.prototype, ft, "Set");
var p = Object.create(ot);
u.prototype = p,
n(p, "next", function() {
var t = e(this);
if ("object" !== a(t))
throw TypeError();
for (var r = t["[[IteratedSet]]"], n = t["[[SetNextIndex]]"], i = t["[[SetIterationKind]]"], u = r["[[SetData]]"]; n < u.length; ) {
var c = u[n];
if (n = n += 1,
o(t, "[[SetNextIndex]]", n),
c !== nt)
return "key+value" === i ? O([c, c], !1) : O(c, !1)
}
return O(C, !0)
}),
n(p, ft, "Set Iterator")
}(),
function() {
function r() {
var t = e(this)
, r = arguments[0];
if ("object" !== a(t))
throw TypeError();
if ("[[WeakMapData]]"in t)
throw TypeError();
if (r !== C) {
var n = t.set;
if (!l(n))
throw TypeError();
var u = g(s(r))
}
if (o(t, "[[WeakMapData]]", new i),
u === C)
return t;
for (; ; ) {
var c = S(u);
if (!1 === c)
return t;
var f = w(c);
if ("object" !== a(f))
throw TypeError();
var p = f[0]
, h = f[1];
n.call(t, p, h)
}
return t
}
"WeakMap"in t && !I || (t.WeakMap = r);
var u = {};
n(r.prototype = u, "delete", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (r["[[WeakMapData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return r["[[WeakMapData]]"].remove(t)
}),
n(r.prototype, "get", function(t, r) {
var n = e(this);
if ("object" !== a(n))
throw TypeError();
if (n["[[WeakMapData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return n["[[WeakMapData]]"].get(t, r)
}),
n(r.prototype, "has", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (r["[[WeakMapData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return r["[[WeakMapData]]"].has(t)
}),
n(r.prototype, "set", function(t, r) {
var n = e(this);
if ("object" !== a(n))
throw TypeError();
if (n["[[WeakMapData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return n["[[WeakMapData]]"].set(t, r),
n
}),
n(t.WeakMap.prototype, ft, "WeakMap"),
function() {
var e = new t.WeakMap
, r = t.WeakMap.prototype.set;
n(t.WeakMap.prototype, "set", function() {
return r.apply(this, arguments),
this
}, e.set({}, 0) !== e)
}()
}(),
function() {
function r() {
var t = e(this)
, r = arguments[0];
if ("object" !== a(t))
throw TypeError();
if ("[[WeakSetData]]"in t)
throw TypeError();
if (r !== C) {
var n = t.add;
if (!l(n))
throw TypeError();
var u = g(s(r))
}
if (o(t, "[[WeakSetData]]", new i),
u === C)
return t;
for (; ; ) {
var c = S(u);
if (!1 === c)
return t;
var f = w(c);
n.call(t, f)
}
return t
}
"WeakSet"in t && !I || (t.WeakSet = r);
var u = {};
n(r.prototype = u, "add", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (r["[[WeakSetData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return r["[[WeakSetData]]"].set(t, !0),
r
}),
n(r.prototype, "delete", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (r["[[WeakSetData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return r["[[WeakSetData]]"].remove(t)
}),
n(r.prototype, "has", function(t) {
var r = e(this);
if ("object" !== a(r))
throw TypeError();
if (r["[[WeakSetData]]"] === C)
throw TypeError();
if ("object" !== a(t))
throw TypeError("Expected object");
return r["[[WeakSetData]]"].has(t)
}),
n(t.WeakSet.prototype, ft, "WeakSet"),
function() {
var e = new t.WeakSet
, r = t.WeakSet.prototype.add;
n(t.WeakSet.prototype, "add", function() {
return r.apply(this, arguments),
this
}, e.add({}) !== e)
}()
}(),
"ArrayBuffer"in t && (n(ArrayBuffer, "isView", function(t) {
return "object" === a(t) && ("buffer"in t && t.buffer instanceof ArrayBuffer)
}),
n(ArrayBuffer.prototype, ft, "ArrayBuffer")),
"DataView"in t && n(DataView.prototype, ft, "DataView"),
n(JSON, ft, "JSON"),
n(ot, it, function() {
return this
}),
function() {
function r(t) {
var e = {
"[[value]]": !1
}
, r = u();
o(r, "[[Promise]]", t),
o(r, "[[AlreadyResolved]]", e);
var n = i();
return o(n, "[[Promise]]", t),
o(n, "[[AlreadyResolved]]", e),
{
"[[Resolve]]": r,
"[[Reject]]": n
}
}
function i() {
var t = function(e) {
var r = t["[[Promise]]"]
, n = t["[[AlreadyResolved]]"];
return n["[[value]]"] ? C : (o(n, "[[value]]", !0),
v(r, e))
};
return t
}
function u() {
var t = function(e) {
var r = t["[[Promise]]"]
, n = t["[[AlreadyResolved]]"];
if (n["[[value]]"])
return C;
if (o(n, "[[value]]", !0),
h(e, r)) {
var i = TypeError();
return v(r, i)
}
if ("object" !== a(e))
return c(r, e);
try {
var u = e.then
} catch (u) {
return v(r, u)
}
return l(u) ? (T("PromiseJobs", b, [r, e, u]),
C) : c(r, e)
};
return t
}
function c(t, e) {
var r = t["[[PromiseFulfillReactions]]"];
return o(t, "[[PromiseResult]]", e),
o(t, "[[PromiseFulfillReactions]]", C),
o(t, "[[PromiseRejectReactions]]", C),
o(t, "[[PromiseState]]", "fulfilled"),
d(r, e)
}
function s(t) {
return f(C, t)
}
function f(t, e) {
var r = {};
o(r, "[[Promise]]", t),
o(r, "[[Resolve]]", C),
o(r, "[[Reject]]", C);
var n = p();
o(n, "[[Capability]]", r);
var i = t = new e(n);
if (o(r, "[[Promise]]", t),
!l(r["[[Resolve]]"]))
throw TypeError();
if (!l(r["[[Reject]]"]))
throw TypeError();
if ("object" === a(i) && !h(t, i))
throw TypeError();
return r
}
function p() {
var t = function(e, r) {
var n = t["[[Capability]]"];
if (n["[[Resolve]]"] !== C)
throw TypeError();
if (n["[[Reject]]"] !== C)
throw TypeError();
return o(n, "[[Resolve]]", e),
o(n, "[[Reject]]", r),
C
};
return t
}
function y(t) {
return "object" === a(t) && ("[[PromiseState]]"in t && t["[[PromiseState]]"] !== C)
}
function v(t, e) {
var r = t["[[PromiseRejectReactions]]"];
return o(t, "[[PromiseResult]]", e),
o(t, "[[PromiseFulfillReactions]]", C),
o(t, "[[PromiseRejectReactions]]", C),
o(t, "[[PromiseState]]", "rejected"),
d(r, e)
}
function d(t, e) {
for (var r = 0, n = t.length; r < n; ++r)
T("PromiseJobs", m, [t[r], e]);
return C
}
function m(t, e) {
var r, n, o = t["[[Capabilities]]"], i = t["[[Handler]]"];
try {
if ("Identity" === i)
r = e;
else {
if ("Thrower" === i)
throw e;
r = i.call(C, e)
}
} catch (r) {
return n = o["[[Reject]]"].call(C, r),
void j(n)
}
j(n = o["[[Resolve]]"].call(C, r))
}
function b(t, e, n) {
var o = r(t);
try {
var i = n.call(e, o["[[Resolve]]"], o["[[Reject]]"])
} catch (i) {
return void j(o["[[Reject]]"].call(C, i))
}
j(i)
}
function E(t) {
var e = {
configurable: !1,
enumerable: !1,
writable: !0,
value: C
};
Object.defineProperty(this, "[[PromiseState]]", e),
Object.defineProperty(this, "[[PromiseConstructor]]", e),
Object.defineProperty(this, "[[PromiseResult]]", e),
Object.defineProperty(this, "[[PromiseFulfillReactions]]", e),
Object.defineProperty(this, "[[PromiseRejectReactions]]", e);
var r = this;
if ("object" !== a(r))
throw new TypeError;
if (!("[[PromiseState]]"in r))
throw TypeError();
if (r["[[PromiseState]]"] !== C)
throw TypeError();
if (!l(t))
throw TypeError();
return o(r, "[[PromiseConstructor]]", E),
O(r, t)
}
function O(t, e) {
o(t, "[[PromiseState]]", "pending"),
o(t, "[[PromiseFulfillReactions]]", []),
o(t, "[[PromiseRejectReactions]]", []);
var n = r(t);
try {
var i = e.call(C, n["[[Resolve]]"], n["[[Reject]]"])
} catch (i) {
n["[[Reject]]"].call(C, i)
}
return t
}
function _() {
var t = function(e) {
var r = t["[[AlreadyCalled]]"];
if (r.value)
return C;
r.value = !0;
var n = t["[[Index]]"]
, o = t["[[Values]]"]
, i = t["[[Capabilities]]"]
, a = t["[[RemainingElements]]"];
try {
o[n] = e
} catch (u) {
return i["[[Reject]]"].call(C, u),
i["[[Promise]]"]
}
return a.value -= 1,
0 === a.value ? i["[[Resolve]]"].call(C, o) : C
};
return t
}
n(E, "all", function(t) {
var r = e(this)
, n = s(r);
try {
var i = g(t)
} catch (y) {
return n["[[Reject]]"].call(C, y),
n["[[Promise]]"]
}
for (var a = [], u = {
value: 1
}, c = 0; ; ) {
try {
var f = S(i)
} catch (y) {
return n["[[Reject]]"].call(C, y),
n["[[Promise]]"]
}
if (!f) {
if (u.value -= 1,
0 === u.value)
n["[[Resolve]]"].apply(C, a);
return n["[[Promise]]"]
}
try {
var l = w(f)
} catch (y) {
return n["[[Reject]]"].call(C, y),
n["[[Promise]]"]
}
try {
var p = r.resolve(l)
} catch (y) {
return n["[[Reject]]"].call(C, y),
n["[[Promise]]"]
}
var h = _();
o(h, "[[AlreadyCalled]]", {
value: !1
}),
o(h, "[[Index]]", c),
o(h, "[[Values]]", a),
o(h, "[[Capabilities]]", n),
o(h, "[[RemainingElements]]", u),
u.value += 1;
try {
p.then(h, n["[[Reject]]"])
} catch (y) {
return n["[[Reject]]"].call(C, y),
n["[[Promise]]"]
}
c += 1
}
}),
E.prototype = {},
n(E, "race", function(t) {
var r = e(this)
, n = s(r);
try {
var o = g(t)
} catch (c) {
return n["[[Reject]]"].call(C, c),
n["[[Promise]]"]
}
for (; ; ) {
try {
var i = S(o)
} catch (c) {
return n["[[Reject]]"].call(C, c),
n["[[Promise]]"]
}
if (!i)
return n["[[Promise]]"];
try {
var a = w(i)
} catch (c) {
return n["[[Reject]]"].call(C, c),
n["[[Promise]]"]
}
try {
var u = r.resolve(a)
} catch (c) {
return n["[[Reject]]"].call(C, c),
n["[[Promise]]"]
}
try {
u.then(n["[[Resolve]]"], n["[[Reject]]"])
} catch (c) {
return n["[[Reject]]"].call(C, c),
n["[[Promise]]"]
}
}
}),
n(E, "reject", function(t) {
var r = s(e(this));
r["[[Reject]]"].call(C, t);
return r["[[Promise]]"]
}),
n(E, "resolve", function(t) {
var r = e(this);
if (y(t) && h(t["[[PromiseConstructor]]"], r))
return t;
var n = s(r);
n["[[Resolve]]"].call(C, t);
return n["[[Promise]]"]
}),
n(E.prototype, "catch", function(t) {
return this.then(C, t)
}),
E.prototype.constructor = E,
n(E.prototype, "then", function(t, e) {
var r = this;
if (!y(r))
throw TypeError();
l(t) || (t = "Identity"),
l(e) || (e = "Thrower");
var n = s(r.constructor)
, o = {
"[[Capabilities]]": n,
"[[Handler]]": t
}
, i = {
"[[Capabilities]]": n,
"[[Handler]]": e
};
return "pending" === r["[[PromiseState]]"] ? (r["[[PromiseFulfillReactions]]"].push(o),
r["[[PromiseRejectReactions]]"].push(i)) : "fulfilled" === r["[[PromiseState]]"] ? T("PromiseJobs", m, [o, r["[[PromiseResult]]"]]) : "rejected" === r["[[PromiseState]]"] && T("PromiseJobs", m, [i, r["[[PromiseResult]]"]]),
n["[[Promise]]"]
}),
"Promise"in t && !I || (t.Promise = E),
"cast"in t.Promise && (t.Promise.resolve = t.Promise.cast)
}(),
n(Promise.prototype, ft, "Promise"),
"Reflect"in t && !I || (t.Reflect = {}),
n(Reflect, "apply", function(t, e, r) {
if (!l(t))
throw TypeError();
return Function.prototype.apply.call(t, e, r)
}),
n(Reflect, "construct", function(t, e) {
return __cons(t, e)
}),
n(Reflect, "defineProperty", function(t, e, r) {
try {
return Object.defineProperty(t, e, r),
!0
} catch (n) {
return !1
}
}),
n(Reflect, "deleteProperty", function(t, e) {
try {
return delete t[e],
!b(t, e)
} catch (r) {
return !1
}
}),
n(Reflect, "enumerate", function(t) {
return _(t = s(t))
}),
n(Reflect, "get", function(t, e, n) {
t = s(t),
e = String(e),
n = n === C ? t : s(n);
var o = r(t, e);
return o && "get"in o ? Function.prototype.call.call(o.get, n) : t[e]
}),
n(Reflect, "getOwnPropertyDescriptor", Object.getOwnPropertyDescriptor),
n(Reflect, "getPrototypeOf", Object.getPrototypeOf),
n(Reflect, "has", function(t, e) {
return String(e)in s(t)
}),
n(Reflect, "isExtensible", Object.isExtensible),
n(Reflect, "ownKeys", function(t) {
var e = s(t);
return Object.getOwnPropertyNames(e)
}),
n(Reflect, "preventExtensions", function(t) {
try {
return Object.preventExtensions(t),
!0
} catch (e) {
return !1
}
}),
n(Reflect, "set", function(t, e, n, o) {
t = s(t),
e = String(e),
o = o === C ? t : s(o);
var i = r(t, e);
try {
return i && "set"in i ? Function.prototype.call.call(i.set, o, n) : t[e] = n,
!0
} catch (a) {
return !1
}
}),
n(Reflect, "setPrototypeOf", function(t, e) {
try {
return t.__proto__ = e,
Reflect.getPrototypeOf(t) === e
} catch (r) {
return !1
}
})
}(self),
function(t) {
"use strict";
function e(t) {
return t = Number(t),
a(t) ? 0 : 0 === t || t === Infinity || t === -Infinity ? t : (t < 0 ? -1 : 1) * c(u(t))
}
function r(t) {
if (null === t || t === i)
throw TypeError();
return Object(t)
}
function n(t) {
var r = e(t);
return r <= 0 ? 0 : s(r, 9007199254740991)
}
function o(t, e) {
if (typeof t != typeof e)
return !1;
switch (typeof t) {
case "undefined":
return !0;
case "number":
return t !== t && e !== e || t === e;
case "boolean":
case "string":
case "object":
default:
return t === e
}
}
var i = void 0
, a = t.isNaN
, u = Math.abs
, c = Math.floor
, s = (Math.max,
Math.min);
!function(t, e, r, n) {
e in t && !n || ("function" == typeof r ? Object.defineProperty(t, e, {
value: r,
configurable: !0,
enumerable: !1,
writable: !0
}) : Object.defineProperty(t, e, {
value: r,
configurable: !1,
enumerable: !1,
writable: !1
}))
}(Array.prototype, "includes", function(t) {
var i = arguments[1]
, a = r(this)
, u = n(a.length);
if (0 === u)
return !1;
var c = e(i);
if (c >= 0)
var s = c;
else
(s = u + c) < 0 && (s = 0);
for (; s < u; ) {
a[s];
if (o(a[s], t))
return !0;
s += 1
}
return !1
})
}(this),
function(t) {
"use strict";
function e(t, e, r, n) {
e in t && !n || ("function" == typeof r ? Object.defineProperty(t, e, {
value: r,
configurable: !0,
enumerable: !1,
writable: !0
}) : Object.defineProperty(t, e, {
value: r,
configurable: !1,
enumerable: !1,
writable: !1
}))
}
function r(t) {
return t = Number(t),
c(t) ? 0 : 0 === t || t === Infinity || t === -Infinity ? t : (t < 0 ? -1 : 1) * f(s(t))
}
function n(t) {
if (null === t || t === u)
throw TypeError();
return Object(t)
}
function o(t) {
var e = r(t);
return e <= 0 ? 0 : l(e, 9007199254740991)
}
function i(t, e, r) {
Object.defineProperty(t, e, {
value: r,
writable: !0,
enumerable: !0,
configurable: !0
})
}
function a(t, e) {
var r = [];
return Object.keys(t).forEach(function(n) {
var o = Object.getOwnPropertyDescriptor(t, n);
if (o && o.enumerable)
if ("key" === e)
r.push(n);
else {
var i = t[n];
"value" === e ? r.push(i) : r.push([n, i])
}
}),
r
}
var u = void 0
, c = t.isNaN
, s = Math.abs
, f = Math.floor
, l = Math.min;
e(Object, "entries", function(t) {
return a(n(t), "key+value")
}),
e(Object, "getOwnPropertyDescriptors", function(t) {
for (var e = n(t), r = Object.getOwnPropertyNames(e), o = {}, a = 0; a < r.length; ++a) {
var u = r[a];
i(o, u, Object.getOwnPropertyDescriptor(e, u))
}
return o
}),
e(Object, "values", function(t) {
return a(n(t), "value")
}),
e(String.prototype, "padEnd", function(t) {
var e = arguments[1]
, r = String(this)
, n = r.length;
if (e === u)
var i = "";
else
i = String(e);
"" === i && (i = " ");
var a = o(t);
if (a <= n)
return r;
for (var c = a - n, s = ""; s.length < c; )
s += i;
return r + s.substring(0, c)
}),
e(String.prototype, "padStart", function(t) {
var e = arguments[1]
, r = String(this)
, n = r.length;
if (e === u)
var i = "";
else
i = String(e);
"" === i && (i = " ");
var a = o(t);
if (a <= n)
return r;
for (var c = a - n, s = ""; s.length < c; )
s += i;
return s.substring(0, c) + r
})
}(this),
function(t) {
"use strict";
"window"in t && "document"in t && ("head"in document || (document.head = document.getElementsByTagName("head")[0]),
["abbr", "article", "aside", "audio", "bdi", "canvas", "data", "datalist", "details", "dialog", "figcaption", "figure", "footer", "header", "hgroup", "main", "mark", "meter", "nav", "output", "picture", "progress", "section", "summary", "template", "time", "video"].forEach(function(t) {
document.createElement(t)
}),
!("dataset"in document.createElement("span")) && "Element"in t && Element.prototype && Object.defineProperty && Object.defineProperty(Element.prototype, "dataset", {
get: function() {
for (var t = Object.create(null), e = 0; e < this.attributes.length; ++e) {
var r = this.attributes[e];
r.specified && "data-" === r.name.substring(0, 5) && function(e, r) {
var n = r.replace(/-([a-z])/g, function(t, e) {
return e.toUpperCase()
});
t[n] = e.getAttribute("data-" + r),
Object.defineProperty(t, n, {
get: function() {
return e.getAttribute("data-" + r)
},
set: function(t) {
e.setAttribute("data-" + r, t)
}
})
}(this, r.name.substring(5))
}
return t
}
}),
function() {
if (!("atob"in t && "btoa"in t)) {
var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
t.atob = function(t) {
var r = 0
, n = []
, o = 0
, i = 0;
if ((t = (t = String(t)).replace(/\s/g, "")).length % 4 == 0 && (t = t.replace(/=+$/, "")),
t.length % 4 == 1)
throw Error("InvalidCharacterError");
if (/[^+/0-9A-Za-z]/.test(t))
throw Error("InvalidCharacterError");
for (; r < t.length; )
o = o << 6 | e.indexOf(t.charAt(r)),
24 === (i += 6) && (n.push(String.fromCharCode(o >> 16 & 255)),
n.push(String.fromCharCode(o >> 8 & 255)),
n.push(String.fromCharCode(255 & o)),
i = 0,
o = 0),
r += 1;
return 12 === i ? (o >>= 4,
n.push(String.fromCharCode(255 & o))) : 18 === i && (o >>= 2,
n.push(String.fromCharCode(o >> 8 & 255)),
n.push(String.fromCharCode(255 & o))),
n.join("")
}
,
t.btoa = function(t) {
t = String(t);
var r, n, o, i, a, u, c, s = 0, f = [];
if (/[^\x00-\xFF]/.test(t))
throw Error("InvalidCharacterError");
for (; s < t.length; )
i = (r = t.charCodeAt(s++)) >> 2,
a = (3 & r) << 4 | (n = t.charCodeAt(s++)) >> 4,
u = (15 & n) << 2 | (o = t.charCodeAt(s++)) >> 6,
c = 63 & o,
s === t.length + 2 ? (u = 64,
c = 64) : s === t.length + 1 && (c = 64),
f.push(e.charAt(i), e.charAt(a), e.charAt(u), e.charAt(c));
return f.join("")
}
}
}(),
function() {
function e(t) {
return t.offsetWidth > 0 && t.offsetHeight > 0
}
function r() {
var t = o;
o = Object.create(null),
a = -1,
Object.keys(t).forEach(function(r) {
var n = t[r];
n.element && !e(n.element) || n.callback(Date.now())
})
}
if (!("requestAnimationFrame"in t)) {
var n = 60
, o = Object.create(null)
, i = 0
, a = -1;
t.requestAnimationFrame = function(e, u) {
var c = ++i;
return o[c] = {
callback: e,
element: u
},
-1 === a && (a = t.setTimeout(r, 1e3 / n)),
c
}
,
t.cancelAnimationFrame = function(e) {
delete o[e],
0 === Object.keys(o).length && (t.clearTimeout(a),
a = -1)
}
}
}())
}(self),
function(t) {
"use strict";
function e(t, e) {
t && Object.keys(e).forEach(function(r) {
if (!(r in t || r in t.prototype))
try {
Object.defineProperty(t.prototype, r, Object.getOwnPropertyDescriptor(e, r))
} catch (n) {
t[r] = e[r]
}
})
}
function r(t) {
var e = null;
return 1 === (t = t.map(function(t) {
return t instanceof Node ? t : document.createTextNode(t)
})).length ? e = t[0] : (e = document.createDocumentFragment(),
t.forEach(function(t) {
e.appendChild(t)
})),
e
}
if ("window"in t && "document"in t) {
document.querySelectorAll || (document.querySelectorAll = function(t) {
var e, r = document.createElement("style"), n = [];
for (document.documentElement.firstChild.appendChild(r),
document._qsa = [],
r.styleSheet.cssText = t + "{x-qsa:expression(document._qsa && document._qsa.push(this))}",
window.scrollBy(0, 0),
r.parentNode.removeChild(r); document._qsa.length; )
(e = document._qsa.shift()).style.removeAttribute("x-qsa"),
n.push(e);
return document._qsa = null,
n
}
),
document.querySelector || (document.querySelector = function(t) {
var e = document.querySelectorAll(t);
return e.length ? e[0] : null
}
),
document.getElementsByClassName || (document.getElementsByClassName = function(t) {
return t = String(t).replace(/^|\s+/g, "."),
document.querySelectorAll(t)
}
),
t.Node = t.Node || function() {
throw TypeError("Illegal constructor")
}
,
[["ELEMENT_NODE", 1], ["ATTRIBUTE_NODE", 2], ["TEXT_NODE", 3], ["CDATA_SECTION_NODE", 4], ["ENTITY_REFERENCE_NODE", 5], ["ENTITY_NODE", 6], ["PROCESSING_INSTRUCTION_NODE", 7], ["COMMENT_NODE", 8], ["DOCUMENT_NODE", 9], ["DOCUMENT_TYPE_NODE", 10], ["DOCUMENT_FRAGMENT_NODE", 11], ["NOTATION_NODE", 12]].forEach(function(e) {
e[0]in t.Node || (t.Node[e[0]] = e[1])
}),
t.DOMException = t.DOMException || function() {
throw TypeError("Illegal constructor")
}
,
[["INDEX_SIZE_ERR", 1], ["DOMSTRING_SIZE_ERR", 2], ["HIERARCHY_REQUEST_ERR", 3], ["WRONG_DOCUMENT_ERR", 4], ["INVALID_CHARACTER_ERR", 5], ["NO_DATA_ALLOWED_ERR", 6], ["NO_MODIFICATION_ALLOWED_ERR", 7], ["NOT_FOUND_ERR", 8], ["NOT_SUPPORTED_ERR", 9], ["INUSE_ATTRIBUTE_ERR", 10], ["INVALID_STATE_ERR", 11], ["SYNTAX_ERR", 12], ["INVALID_MODIFICATION_ERR", 13], ["NAMESPACE_ERR", 14], ["INVALID_ACCESS_ERR", 15]].forEach(function(e) {
e[0]in t.DOMException || (t.DOMException[e[0]] = e[1])
}),
function() {
function e(t, e, r) {
if ("function" == typeof e) {
"DOMContentLoaded" === t && (t = "load");
var n = this
, o = function(t) {
t._timeStamp = Date.now(),
t._currentTarget = n,
e.call(this, t),
t._currentTarget = null
};
this["_" + t + e] = o,
this.attachEvent("on" + t, o)
}
}
function r(t, e, r) {
if ("function" == typeof e) {
"DOMContentLoaded" === t && (t = "load");
var n = this["_" + t + e];
n && (this.detachEvent("on" + t, n),
this["_" + t + e] = null)
}
}
"Element"in t && !Element.prototype.addEventListener && Object.defineProperty && (Event.CAPTURING_PHASE = 1,
Event.AT_TARGET = 2,
Event.BUBBLING_PHASE = 3,
Object.defineProperties(Event.prototype, {
CAPTURING_PHASE: {
get: function() {
return 1
}
},
AT_TARGET: {
get: function() {
return 2
}
},
BUBBLING_PHASE: {
get: function() {
return 3
}
},
target: {
get: function() {
return this.srcElement
}
},
currentTarget: {
get: function() {
return this._currentTarget
}
},
eventPhase: {
get: function() {
return this.srcElement === this.currentTarget ? Event.AT_TARGET : Event.BUBBLING_PHASE
}
},
bubbles: {
get: function() {
switch (this.type) {
case "click":
case "dblclick":
case "mousedown":
case "mouseup":
case "mouseover":
case "mousemove":
case "mouseout":
case "mousewheel":
case "keydown":
case "keypress":
case "keyup":
case "resize":
case "scroll":
case "select":
case "change":
case "submit":
case "reset":
return !0
}
return !1
}
},
cancelable: {
get: function() {
switch (this.type) {
case "click":
case "dblclick":
case "mousedown":
case "mouseup":
case "mouseover":
case "mouseout":
case "mousewheel":
case "keydown":
case "keypress":
case "keyup":
case "submit":
return !0
}
return !1
}
},
timeStamp: {
get: function() {
return this._timeStamp
}
},
stopPropagation: {
value: function() {
this.cancelBubble = !0
}
},
preventDefault: {
value: function() {
this.returnValue = !1
}
},
defaultPrevented: {
get: function() {
return !1 === this.returnValue
}
}
}),
[Window, HTMLDocument, Element].forEach(function(t) {
t.prototype.addEventListener = e,
t.prototype.removeEventListener = r
}))
}(),
function() {
function e(t, e) {
e = e || {
bubbles: !1,
cancelable: !1,
detail: undefined
};
var r = document.createEvent("CustomEvent");
return r.initCustomEvent(t, e.bubbles, e.cancelable, e.detail),
r
}
"CustomEvent"in t && "function" == typeof t.CustomEvent || (e.prototype = t.Event.prototype,
t.CustomEvent = e)
}(),
window.addEvent = function(t, e, r) {
t.addEventListener ? t.addEventListener(e, r, !1) : t.attachEvent && (t["e" + e + r] = r,
t[e + r] = function() {
var n = window.event;
n.currentTarget = t,
n.preventDefault = function() {
n.returnValue = !1
}
,
n.stopPropagation = function() {
n.cancelBubble = !0
}
,
n.target = n.srcElement,
n.timeStamp = Date.now(),
t["e" + e + r].call(this, n)
}
,
t.attachEvent("on" + e, t[e + r]))
}
,
window.removeEvent = function(t, e, r) {
t.removeEventListener ? t.removeEventListener(e, r, !1) : t.detachEvent && (t.detachEvent("on" + e, t[e + r]),
t[e + r] = null,
t["e" + e + r] = null)
}
,
function() {
function e(t, e) {
function r(t) {
return t.length ? t.split(/\s+/g) : []
}
function n(t, e) {
var n = r(e)
, o = n.indexOf(t);
return -1 !== o && n.splice(o, 1),
n.join(" ")
}
if (Object.defineProperties(this, {
length: {
get: function() {
return r(t[e]).length
}
},
item: {
value: function(n) {
var o = r(t[e]);
return 0 <= n && n < o.length ? o[n] : null
}
},
contains: {
value: function(n) {
if (0 === (n = String(n)).length)
throw SyntaxError();
if (/\s/.test(n))
throw Error("InvalidCharacterError");
return -1 !== r(t[e]).indexOf(n)
}
},
add: {
value: function() {
var n = Array.prototype.slice.call(arguments).map(String);
if (n.some(function(t) {
return 0 === t.length
}))
throw SyntaxError();
if (n.some(function(t) {
return /\s/.test(t)
}))
throw Error("InvalidCharacterError");
try {
var o = t[e]
, i = r(o);
if (0 === (n = n.filter(function(t) {
return -1 === i.indexOf(t)
})).length)
return;
0 === o.length || /\s$/.test(o) || (o += " "),
o += n.join(" "),
t[e] = o
} finally {
var a = r(t[e]).length;
this.length !== a && (this.length = a)
}
}
},
remove: {
value: function() {
var o = Array.prototype.slice.call(arguments).map(String);
if (o.some(function(t) {
return 0 === t.length
}))
throw SyntaxError();
if (o.some(function(t) {
return /\s/.test(t)
}))
throw Error("InvalidCharacterError");
try {
var i = t[e];
o.forEach(function(t) {
i = n(t, i)
}),
t[e] = i
} finally {
var a = r(t[e]).length;
this.length !== a && (this.length = a)
}
}
},
toggle: {
value: function(o) {
var i = arguments[1];
try {
if (0 === (o = String(o)).length)
throw SyntaxError();
if (/\s/.test(o))
throw Error("InvalidCharacterError");
var a = r(t[e]).indexOf(o);
if (-1 !== a && (!i || void 0 === i))
return t[e] = n(o, t[e]),
!1;
if (-1 !== a && i)
return !0;
var u = t[e];
return 0 === u.length || /\s$/.test(u) || (u += " "),
u += o,
t[e] = u,
!0
} finally {
var c = r(t[e]).length;
this.length !== c && (this.length = c)
}
}
},
toString: {
value: function() {
return t[e]
}
}
}),
"length"in this)
for (var o = 0; o < 100; ++o)
Object.defineProperty(this, String(o), {
get: function(t) {
return function() {
return this.item(t)
}
}(o)
});
else
this.length = r(t[e]).length
}
function r(e, r) {
"Element"in t && Element.prototype && Object.defineProperty && Object.defineProperty(Element.prototype, e, {
get: r
})
}
"classList"in document.createElement("span") ? window.getClassList = function(t) {
return t.classList
}
: (window.getClassList = function(t) {
return new e(t,"className")
}
,
r("classList", function() {
return new e(this,"className")
})),
"relList"in document.createElement("link") ? window.getRelList = function(t) {
return t.relList
}
: (window.getRelList = function(t) {
return new e(t,"rel")
}
,
r("relList", function() {
return new e(this,"rel")
})),
function() {
if ("DOMTokenList"in t) {
var e = document.createElement("span");
"classList"in e && (e.classList.toggle("x", !1),
e.classList.contains("x") && (t.DOMTokenList.prototype.toggle = function(t) {
var e = arguments[1];
if (e === undefined) {
var r = !this.contains(t);
return this[r ? "add" : "remove"](t),
r
}
return e = !!e,
this[e ? "add" : "remove"](t),
e
}
))
}
}(),
"previousElementSibling"in document.documentElement || r("previousElementSibling", function() {
for (var t = this.previousSibling; t && t.nodeType !== Node.ELEMENT_NODE; )
t = t.previousSibling;
return t
}),
"nextElementSibling"in document.documentElement || r("nextElementSibling", function() {
for (var t = this.nextSibling; t && t.nodeType !== Node.ELEMENT_NODE; )
t = t.nextSibling;
return t
})
}(),
"Element"in t && !Element.prototype.matches && (Element.prototype.msMatchesSelector ? Element.prototype.matches = Element.prototype.msMatchesSelector : Element.prototype.oMatchesSelector ? Element.prototype.matches = Element.prototype.oMatchesSelector : Element.prototype.mozMatchesSelector ? Element.prototype.matches = Element.prototype.mozMatchesSelector : Element.prototype.webkitMatchesSelector ? Element.prototype.matches = Element.prototype.webkitMatchesSelector : document.querySelectorAll && (Element.prototype.matches = function(t) {
for (var e = (this.document || this.ownerDocument).querySelectorAll(t), r = e.length; --r >= 0 && e.item(r) !== this; )
;
return r > -1
}
)),
window.Element && !Element.prototype.closest && (Element.prototype.closest = function(t) {
var e, r = (this.document || this.ownerDocument).querySelectorAll(t), n = this;
do {
for (e = r.length; --e >= 0 && r.item(e) !== n; )
;
} while (e < 0 && (n = n.parentElement));return n
}
);
var n = {
prepend: function() {
var t = [].slice.call(arguments);
t = r(t),
this.insertBefore(t, this.firstChild)
},
append: function() {
var t = [].slice.call(arguments);
t = r(t),
this.appendChild(t)
}
};
e(t.Document || t.HTMLDocument, n),
e(t.DocumentFragment, n),
e(t.Element, n);
var o = {
before: function() {
var t = [].slice.call(arguments)
, e = this.parentNode;
if (e) {
for (var n = this.previousSibling; -1 !== t.indexOf(n); )
n = n.previousSibling;
var o = r(t);
e.insertBefore(o, n ? n.nextSibling : e.firstChild)
}
},
after: function() {
var t = [].slice.call(arguments)
, e = this.parentNode;
if (e) {
for (var n = this.nextSibling; -1 !== t.indexOf(n); )
n = n.nextSibling;
var o = r(t);
e.insertBefore(o, n)
}
},
replaceWith: function() {
var t = [].slice.call(arguments)
, e = this.parentNode;
if (e) {
for (var n = this.nextSibling; -1 !== t.indexOf(n); )
n = n.nextSibling;
var o = r(t);
this.parentNode === e ? e.replaceChild(o, this) : e.insertBefore(o, n)
}
},
remove: function() {
this.parentNode && this.parentNode.removeChild(this)
}
};
e(t.DocumentType, o),
e(t.Element, o),
e(t.CharacterData, o)
}
}(self),
function(t) {
"use strict";
"window"in t && "document"in t && (t.XMLHttpRequest = t.XMLHttpRequest || function() {
try {
return new ActiveXObject("Msxml2.XMLHTTP.6.0")
} catch (t) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP.3.0")
} catch (t) {}
try {
return new ActiveXObject("Msxml2.XMLHTTP")
} catch (t) {}
throw Error("This browser does not support XMLHttpRequest.")
}
,
[["UNSENT", 0], ["OPENED", 1], ["HEADERS_RECEIVED", 2], ["LOADING", 3], ["DONE", 4]].forEach(function(e) {
e[0]in t.XMLHttpRequest || (t.XMLHttpRequest[e[0]] = e[1])
}),
function() {
function e(t) {
if (this._data = [],
t)
for (var e = 0; e < t.elements.length; ++e) {
var r = t.elements[e];
"" !== r.name && this.append(r.name, r.value)
}
}
if (!("FormData"in t)) {
e.prototype = {
append: function(e, r) {
if ("Blob"in t && r instanceof t.Blob)
throw TypeError("Blob not supported");
e = String(e),
this._data.push([e, r])
},
toString: function() {
return this._data.map(function(t) {
return encodeURIComponent(t[0]) + "=" + encodeURIComponent(t[1])
}).join("&")
}
},
t.FormData = e;
var r = t.XMLHttpRequest.prototype.send;
t.XMLHttpRequest.prototype.send = function(t) {
return t instanceof e && (this.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"),
arguments[0] = t.toString()),
r.apply(this, arguments)
}
}
}())
}(self),
function(t) {
"use strict";
"window"in t && "document"in t && "TextRectangle"in t && !("width"in t.TextRectangle.prototype) && Object.defineProperties(t.TextRectangle.prototype, {
width: {
get: function() {
return this.right - this.left
}
},
height: {
get: function() {
return this.bottom - this.top
}
}
})
}(self),
function(t) {
"use strict";
function e(e) {
return !!e && ("Symbol"in t && "iterator"in t.Symbol && "function" == typeof e[Symbol.iterator] || !!Array.isArray(e))
}
function r(t) {
return "from"in Array ? Array.from(t) : Array.prototype.slice.call(t)
}
!function() {
function n(t) {
var e = ""
, r = !0;
return t.forEach(function(t) {
var n = encodeURIComponent(t.name)
, o = encodeURIComponent(t.value);
r || (e += "&"),
e += n + "=" + o,
r = !1
}),
e.replace(/%20/g, "+")
}
function o(t, e) {
var r = t.split("&");
e && -1 === r[0].indexOf("=") && (r[0] = "=" + r[0]);
var n = [];
r.forEach(function(t) {
if (0 !== t.length) {
var e = t.indexOf("=");
if (-1 !== e)
var r = t.substring(0, e)
, o = t.substring(e + 1);
else
r = t,
o = "";
r = r.replace(/\+/g, " "),
o = o.replace(/\+/g, " "),
n.push({
name: r,
value: o
})
}
});
var o = [];
return n.forEach(function(t) {
o.push({
name: decodeURIComponent(t.name),
value: decodeURIComponent(t.value)
})
}),
o
}
function i(t) {
if (s)
return new f(t);
var e = document.createElement("a");
return e.href = t,
e
}
function a(t) {
var i = this;
this._list = [],
t === undefined || null === t || (t instanceof a ? this._list = o(String(t)) : "object" == typeof t && e(t) ? r(t).forEach(function(t) {
if (!e(t))
throw TypeError();
var n = r(t);
if (2 !== n.length)
throw TypeError();
i._list.push({
name: String(n[0]),
value: String(n[1])
})
}) : "object" == typeof t && t ? Object.keys(t).forEach(function(e) {
i._list.push({
name: String(e),
value: String(t[e])
})
}) : ("?" === (t = String(t)).substring(0, 1) && (t = t.substring(1)),
this._list = o(t))),
this._url_object = null,
this._setList = function(t) {
u || (i._list = t)
}
;
var u = !1;
this._update_steps = function() {
u || (u = !0,
i._url_object && ("about:" === i._url_object.protocol && -1 !== i._url_object.pathname.indexOf("?") && (i._url_object.pathname = i._url_object.pathname.split("?")[0]),
i._url_object.search = n(i._list),
u = !1))
}
}
function u(t, e) {
var r = 0;
this.next = function() {
if (r >= t.length)
return {
done: !0,
value: undefined
};
var n = t[r++];
return {
done: !1,
value: "key" === e ? n.name : "value" === e ? n.value : [n.name, n.value]
}
}
}
function c(e, r) {
function n() {
var t = c.href.replace(/#$|\?$|\?(?=#)/g, "");
c.href !== t && (c.href = t)
}
function u() {
p._setList(c.search ? o(c.search.substring(1)) : []),
p._update_steps()
}
if (!(this instanceof t.URL))
throw new TypeError("Failed to construct 'URL': Please use the 'new' operator.");
r && (e = function() {
if (s)
return new f(e,r).href;
var t;
try {
var n;
if ("[object OperaMini]" === Object.prototype.toString.call(window.operamini) ? ((t = document.createElement("iframe")).style.display = "none",
document.documentElement.appendChild(t),
n = t.contentWindow.document) : document.implementation && document.implementation.createHTMLDocument ? n = document.implementation.createHTMLDocument("") : document.implementation && document.implementation.createDocument ? ((n = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html", null)).documentElement.appendChild(n.createElement("head")),
n.documentElement.appendChild(n.createElement("body"))) : window.ActiveXObject && ((n = new window.ActiveXObject("htmlfile")).write("<head></head><body></body>"),
n.close()),
!n)
throw Error("base not supported");
var o = n.createElement("base");
o.href = r,
n.getElementsByTagName("head")[0].appendChild(o);
var i = n.createElement("a");
return i.href = e,
i.href
} finally {
t && t.parentNode.removeChild(t)
}
}());
var c = i(e || "")
, l = function() {
if (!("defineProperties"in Object))
return !1;
try {
var t = {};
return Object.defineProperties(t, {
prop: {
get: function() {
return !0
}
}
}),
t.prop
} catch (e) {
return !1
}
}() ? this : document.createElement("a")
, p = new a(c.search ? c.search.substring(1) : null);
return p._url_object = l,
Object.defineProperties(l, {
href: {
get: function() {
return c.href
},
set: function(t) {
c.href = t,
n(),
u()
},
enumerable: !0,
configurable: !0
},
origin: {
get: function() {
return "origin"in c ? c.origin : this.protocol + "//" + this.host
},
enumerable: !0,
configurable: !0
},
protocol: {
get: function() {
return c.protocol
},
set: function(t) {
c.protocol = t
},
enumerable: !0,
configurable: !0
},
username: {
get: function() {
return c.username
},
set: function(t) {
c.username = t
},
enumerable: !0,
configurable: !0
},
password: {
get: function() {
return c.password
},
set: function(t) {
c.password = t
},
enumerable: !0,
configurable: !0
},
host: {
get: function() {
var t = {
"http:": /:80$/,
"https:": /:443$/,
"ftp:": /:21$/
}[c.protocol];
return t ? c.host.replace(t, "") : c.host
},
set: function(t) {
c.host = t
},
enumerable: !0,
configurable: !0
},
hostname: {
get: function() {
return c.hostname
},
set: function(t) {
c.hostname = t
},
enumerable: !0,
configurable: !0
},
port: {
get: function() {
return c.port
},
set: function(t) {
c.port = t
},
enumerable: !0,
configurable: !0
},
pathname: {
get: function() {
return "/" !== c.pathname.charAt(0) ? "/" + c.pathname : c.pathname
},
set: function(t) {
c.pathname = t
},
enumerable: !0,
configurable: !0
},
search: {
get: function() {
return c.search
},
set: function(t) {
c.search !== t && (c.search = t,
n(),
u())
},
enumerable: !0,
configurable: !0
},
searchParams: {
get: function() {
return p
},
enumerable: !0,
configurable: !0
},
hash: {
get: function() {
return c.hash
},
set: function(t) {
c.hash = t,
n()
},
enumerable: !0,
configurable: !0
},
toString: {
value: function() {
return c.toString()
},
enumerable: !1,
configurable: !0
},
valueOf: {
value: function() {
return c.valueOf()
},
enumerable: !1,
configurable: !0
}
}),
l
}
var s, f = t.URL;
try {
if (f) {
if ("searchParams"in (s = new t.URL("http://example.com")))
return;
"href"in s || (s = undefined)
}
} catch (p) {}
if (Object.defineProperties(a.prototype, {
append: {
value: function(t, e) {
this._list.push({
name: t,
value: e
}),
this._update_steps()
},
writable: !0,
enumerable: !0,
configurable: !0
},
"delete": {
value: function(t) {
for (var e = 0; e < this._list.length; )
this._list[e].name === t ? this._list.splice(e, 1) : ++e;
this._update_steps()
},
writable: !0,
enumerable: !0,
configurable: !0
},
get: {
value: function(t) {
for (var e = 0; e < this._list.length; ++e)
if (this._list[e].name === t)
return this._list[e].value;
return null
},
writable: !0,
enumerable: !0,
configurable: !0
},
getAll: {
value: function(t) {
for (var e = [], r = 0; r < this._list.length; ++r)
this._list[r].name === t && e.push(this._list[r].value);
return e
},
writable: !0,
enumerable: !0,
configurable: !0
},
has: {
value: function(t) {
for (var e = 0; e < this._list.length; ++e)
if (this._list[e].name === t)
return !0;
return !1
},
writable: !0,
enumerable: !0,
configurable: !0
},
set: {
value: function(t, e) {
for (var r = !1, n = 0; n < this._list.length; )
this._list[n].name === t ? r ? this._list.splice(n, 1) : (this._list[n].value = e,
r = !0,
++n) : ++n;
r || this._list.push({
name: t,
value: e
}),
this._update_steps()
},
writable: !0,
enumerable: !0,
configurable: !0
},
entries: {
value: function() {
return new u(this._list,"key+value")
},
writable: !0,
enumerable: !0,
configurable: !0
},
keys: {
value: function() {
return new u(this._list,"key")
},
writable: !0,
enumerable: !0,
configurable: !0
},
values: {
value: function() {
return new u(this._list,"value")
},
writable: !0,
enumerable: !0,
configurable: !0
},
forEach: {
value: function(t) {
var e = arguments.length > 1 ? arguments[1] : undefined;
this._list.forEach(function(r, n) {
t.call(e, r.value, r.name)
})
},
writable: !0,
enumerable: !0,
configurable: !0
},
toString: {
value: function() {
return n(this._list)
},
writable: !0,
enumerable: !1,
configurable: !0
}
}),
"Symbol"in t && "iterator"in t.Symbol && (Object.defineProperty(a.prototype, t.Symbol.iterator, {
value: a.prototype.entries,
writable: !0,
enumerable: !0,
configurable: !0
}),
Object.defineProperty(u.prototype, t.Symbol.iterator, {
value: function() {
return this
},
writable: !0,
enumerable: !0,
configurable: !0
})),
f)
for (var l in f)
f.hasOwnProperty(l) && "function" == typeof f[l] && (c[l] = f[l]);
t.URL = c,
t.URLSearchParams = a
}(),
function() {
if ("1" !== new t.URLSearchParams([["a", 1]]).get("a") || "1" !== new t.URLSearchParams({
a: 1
}).get("a")) {
var n = t.URLSearchParams;
t.URLSearchParams = function(t) {
if (t && "object" == typeof t && e(t)) {
var o = new n;
return r(t).forEach(function(t) {
if (!e(t))
throw TypeError();
var n = r(t);
if (2 !== n.length)
throw TypeError();
o.append(n[0], n[1])
}),
o
}
return t && "object" == typeof t ? (o = new n,
Object.keys(t).forEach(function(e) {
o.set(e, t[e])
}),
o) : new n(t)
}
}
}()
}(self),
function(t) {
"use strict";
function e(t) {
if ((t = String(t)).match(/[^\x00-\xFF]/))
throw TypeError("Not a valid ByteString");
return t
}
function r(t) {
return (t = String(t)).replace(/([\u0000-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDFFF])/g, function(t) {
return /^[\uD800-\uDFFF]$/.test(t) ? "�" : t
})
}
function n(t) {
return 65535 & t
}
function o(t) {
return String(t).replace(/[a-z]/g, function(t) {
return t.toUpperCase()
})
}
function i(t) {
return "CONNECT" === (t = o(t)) || "TRACE" === t || "TRACK" === t
}
function a(t) {
var e = o(t);
return "DELETE" === e || "GET" === e || "HEAD" === e || "OPTIONS" === e || "POST" === e || "PUT" === e ? e : t
}
function u(t) {
return /^[!#$%&'*+\-.09A-Z^_`a-z|~]+$/.test(t)
}
function c(t) {
return {
"accept-charset": !0,
"accept-encoding": !0,
"access-control-request-headers": !0,
"access-control-request-method": !0,
connection: !0,
"content-length": !0,
cookie: !0,
cookie2: !0,
date: !0,
dnt: !0,
expect: !0,
host: !0,
"keep-alive": !0,
origin: !0,
referer: !0,
te: !0,
trailer: !0,
"transfer-encoding": !0,
upgrade: !0,
"user-agent": !0,
via: !0
}[t = String(t).toLowerCase()] || "proxy-" === t.substring(0, 6) || "sec-" === t.substring(0, 4)
}
function s(t) {
return {
"set-cookie": !0,
"set-cookie2": !0
}[t = String(t).toLowerCase()]
}
function f(t, e) {
return "accept" === (t = String(t).toLowerCase()) || "accept-language" === t || "content-language" === t || "content-type" === t && -1 !== ["application/x-www-form-encoded", "multipart/form-data", "text/plain"].indexOf(e)
}
function l(t) {
this._guard = "none",
this._headerList = [],
t && p(this, t)
}
function p(t, e) {
e instanceof l ? e._headerList.forEach(function(e) {
t.append(e[0], e[1])
}) : Array.isArray(e) ? e.forEach(function(e) {
if (!Array.isArray(e) || 2 !== e.length)
throw TypeError();
t.append(e[0], e[1])
}) : (e = Object(e),
Object.keys(e).forEach(function(r) {
t.append(r, e[r])
}))
}
function h(t) {
this._headers = t,
this._index = 0
}
function y(t) {
this._stream = t,
this.bodyUsed = !1
}
function v(t, n) {
if (arguments.length < 1)
throw TypeError("Not enough arguments");
if (y.call(this, null),
this.method = "GET",
this.url = "",
this.headers = new l,
this.headers._guard = "request",
this.referrer = null,
this.mode = null,
this.credentials = "omit",
t instanceof v) {
if (t.bodyUsed)
throw TypeError();
t.bodyUsed = !0,
this.method = t.method,
this.url = t.url,
this.headers = new l(t.headers),
this.headers._guard = t.headers._guard,
this.credentials = t.credentials,
this._stream = t._stream
} else
t = r(t),
this.url = String(new URL(t,self.location));
if ("method"in (n = Object(n))) {
var o = e(n.method);
if (i(o))
throw TypeError();
this.method = a(o)
}
"headers"in n && (this.headers = new l,
p(this.headers, n.headers)),
"body"in n && (this._stream = n.body),
"credentials"in n && -1 !== ["omit", "same-origin", "include"].indexOf(n.credentials) && (this.credentials = n.credentials)
}
function d(t, e) {
if (arguments.length < 1 && (t = ""),
this.headers = new l,
this.headers._guard = "response",
t instanceof XMLHttpRequest && "_url"in t) {
var o = t;
return this.type = "basic",
this.url = r(o._url),
this.status = o.status,
this.ok = 200 <= this.status && this.status <= 299,
this.statusText = o.statusText,
o.getAllResponseHeaders().split(/\r?\n/).filter(function(t) {
return t.length
}).forEach(function(t) {
var e = t.indexOf(":");
this.headers.append(t.substring(0, e), t.substring(e + 2))
}, this),
void y.call(this, o.responseText)
}
y.call(this, t),
e = Object(e) || {},
this.url = "";
var i = "status"in e ? n(e.status) : 200;
if (i < 200 || i > 599)
throw RangeError();
this.status = i,
this.ok = 200 <= this.status && this.status <= 299;
var a = "statusText"in e ? String(e.statusText) : "OK";
if (/[^\x00-\xFF]/.test(a))
throw TypeError();
this.statusText = a,
"headers"in e && p(this.headers, e),
this.type = "basic"
}
l.prototype = {
append: function(t, r) {
if (t = e(t),
!u(t))
throw TypeError();
if ("immutable" === this._guard)
throw TypeError();
"request" === this._guard && c(t) || ("request-no-CORS" !== this._guard || f(t, r)) && ("response" === this._guard && s(t) || (t = t.toLowerCase(),
this._headerList.push([t, r])))
},
"delete": function(t) {
if (t = e(t),
!u(t))
throw TypeError();
if ("immutable" === this._guard)
throw TypeError();
if (("request" !== this._guard || !c(t)) && ("request-no-CORS" !== this._guard || f(t, "invalid")) && ("response" !== this._guard || !s(t))) {
t = t.toLowerCase();
for (var r = 0; r < this._headerList.length; )
this._headerList[r][0] === t ? this._headerList.splice(r, 1) : ++r
}
},
get: function(t) {
if (t = e(t),
!u(t))
throw TypeError();
t = t.toLowerCase();
for (var r = 0; r < this._headerList.length; ++r)
if (this._headerList[r][0] === t)
return this._headerList[r][1];
return null
},
getAll: function(t) {
if (t = e(t),
!u(t))
throw TypeError();
t = t.toLowerCase();
for (var r = [], n = 0; n < this._headerList.length; ++n)
this._headerList[n][0] === t && r.push(this._headerList[n][1]);
return r
},
has: function(t) {
if (t = e(t),
!u(t))
throw TypeError();
t = t.toLowerCase();
for (var r = 0; r < this._headerList.length; ++r)
if (this._headerList[r][0] === t)
return !0;
return !1
},
set: function(t, r) {
if (t = e(t),
!u(t))
throw TypeError();
if ("immutable" === this._guard)
throw TypeError();
if (("request" !== this._guard || !c(t)) && ("request-no-CORS" !== this._guard || f(t, r)) && ("response" !== this._guard || !s(t))) {
t = t.toLowerCase();
for (var n = 0; n < this._headerList.length; ++n)
if (this._headerList[n][0] === t) {
for (this._headerList[n++][1] = r; n < this._headerList.length; )
this._headerList[n][0] === t ? this._headerList.splice(n, 1) : ++n;
return
}
this._headerList.push([t, r])
}
}
},
l.prototype[Symbol.iterator] = function() {
return new h(this)
}
,
(h.prototype = {}).next = function() {
return this._index >= this._headers._headerList.length ? {
value: undefined,
done: !0
} : {
value: this._headers._headerList[this._index++],
done: !1
}
}
,
h.prototype[Symbol.iterator] = function() {
return this
}
,
y.prototype = {
arrayBuffer: function() {
if (this.bodyUsed)
return Promise.reject(TypeError());
if (this.bodyUsed = !0,
this._stream instanceof ArrayBuffer)
return Promise.resolve(this._stream);
var t = this._stream;
return new Promise(function(e, r) {
var n = unescape(encodeURIComponent(t)).split("").map(function(t) {
return t.charCodeAt(0)
});
e(new Uint8Array(n).buffer)
}
)
},
blob: function() {
return this.bodyUsed ? Promise.reject(TypeError()) : (this.bodyUsed = !0,
this._stream instanceof Blob ? Promise.resolve(this._stream) : Promise.resolve(new Blob([this._stream])))
},
formData: function() {
return this.bodyUsed ? Promise.reject(TypeError()) : (this.bodyUsed = !0,
this._stream instanceof FormData ? Promise.resolve(this._stream) : Promise.reject(Error("Not yet implemented")))
},
json: function() {
if (this.bodyUsed)
return Promise.reject(TypeError());
this.bodyUsed = !0;
var t = this;
return new Promise(function(e, r) {
e(JSON.parse(t._stream))
}
)
},
text: function() {
return this.bodyUsed ? Promise.reject(TypeError()) : (this.bodyUsed = !0,
Promise.resolve(String(this._stream)))
}
},
v.prototype = y.prototype,
d.prototype = y.prototype,
d.redirect = function() {
throw Error("Not supported")
}
,
"fetch"in t || (t.Headers = l,
t.Request = v,
t.Response = d,
t.fetch = function(t, e) {
return new Promise(function(r, n) {
var o = new v(t,e)
, i = new XMLHttpRequest;
i._url = o.url;
try {
i.open(o.method, o.url, !0)
} catch (c) {
throw TypeError(c.message)
}
for (var a = o.headers[Symbol.iterator](), u = a.next(); !u.done; u = a.next())
i.setRequestHeader(u.value[0], u.value[1]);
"include" === o.credentials && (i.withCredentials = !0),
i.onreadystatechange = function() {
i.readyState === XMLHttpRequest.DONE && (0 === i.status ? n(new TypeError("Network error")) : r(new d(i)))
}
,
i.send(o._stream)
}
)
}
)
}(self);
{/* <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> */
}
/*
HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
*/
(function(l, f) {
function m() {
var a = e.elements;
return "string" == typeof a ? a.split(" ") : a
}
function i(a) {
var b = n[a[o]];
b || (b = {},
h++,
a[o] = h,
n[h] = b);
return b
}
function p(a, b, c) {
b || (b = f);
if (g)
return b.createElement(a);
c || (c = i(b));
b = c.cache[a] ? c.cache[a].cloneNode() : r.test(a) ? (c.cache[a] = c.createElem(a)).cloneNode() : c.createElem(a);
return b.canHaveChildren && !s.test(a) ? c.frag.appendChild(b) : b
}
function t(a, b) {
if (!b.cache)
b.cache = {},
b.createElem = a.createElement,
b.createFrag = a.createDocumentFragment,
b.frag = b.createFrag();
a.createElement = function(c) {
return !e.shivMethods ? b.createElem(c) : p(c, a, b)
}
;
a.createDocumentFragment = Function("h,f", "return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&(" + m().join().replace(/[\w\-]+/g, function(a) {
b.createElem(a);
b.frag.createElement(a);
return 'c("' + a + '")'
}) + ");return n}")(e, b.frag)
}
function q(a) {
a || (a = f);
var b = i(a);
if (e.shivCSS && !j && !b.hasCSS) {
var c, d = a;
c = d.createElement("p");
d = d.getElementsByTagName("head")[0] || d.documentElement;
c.innerHTML = "x<style>article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}</style>";
c = d.insertBefore(c.lastChild, d.firstChild);
b.hasCSS = !!c
}
g || t(a, b);
return a
}
var k = l.html5 || {}, s = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i, r = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i, j, o = "_html5shiv", h = 0, n = {}, g;
(function() {
try {
var a = f.createElement("a");
a.innerHTML = "<xyz></xyz>";
j = "hidden"in a;
var b;
if (!(b = 1 == a.childNodes.length)) {
f.createElement("a");
var c = f.createDocumentFragment();
b = "undefined" == typeof c.cloneNode || "undefined" == typeof c.createDocumentFragment || "undefined" == typeof c.createElement
}
g = b
} catch (d) {
g = j = !0
}
}
)();
var e = {
elements: k.elements || "abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video",
version: "3.7.0",
shivCSS: !1 !== k.shivCSS,
supportsUnknownElements: g,
shivMethods: !1 !== k.shivMethods,
type: "default",
shivDocument: q,
createElement: p,
createDocumentFragment: function(a, b) {
a || (a = f);
if (g)
return a.createDocumentFragment();
for (var b = b || i(a), c = b.frag.cloneNode(), d = 0, e = m(), h = e.length; d < h; d++)
c.createElement(e[d]);
return c
}
};
l.html5 = e;
q(f)
}
)(this, document);
{/* <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script> */
}
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
window.matchMedia = window.matchMedia || function(a) {
"use strict";
var c, d = a.documentElement, e = d.firstElementChild || d.firstChild, f = a.createElement("body"), g = a.createElement("div");
return g.id = "mq-test-1",
g.style.cssText = "position:absolute;top:-100em",
f.style.background = "none",
f.appendChild(g),
function(a) {
return g.innerHTML = '&shy;<style media="' + a + '"> #mq-test-1 { width: 42px; }</style>',
d.insertBefore(f, e),
c = 42 === g.offsetWidth,
d.removeChild(f),
{
matches: c,
media: a
}
}
}(document);
/*! Respond.js v1.3.0: min/max-width media query polyfill. (c) Scott Jehl. MIT/GPLv2 Lic. j.mp/respondjs */
(function(a) {
"use strict";
function x() {
u(!0)
}
var b = {};
if (a.respond = b,
b.update = function() {}
,
b.mediaQueriesSupported = a.matchMedia && a.matchMedia("only all").matches,
!b.mediaQueriesSupported) {
var q, r, t, c = a.document, d = c.documentElement, e = [], f = [], g = [], h = {}, i = 30, j = c.getElementsByTagName("head")[0] || d, k = c.getElementsByTagName("base")[0], l = j.getElementsByTagName("link"), m = [], n = function() {
for (var b = 0; l.length > b; b++) {
var c = l[b]
, d = c.href
, e = c.media
, f = c.rel && "stylesheet" === c.rel.toLowerCase();
d && f && !h[d] && (c.styleSheet && c.styleSheet.rawCssText ? (p(c.styleSheet.rawCssText, d, e),
h[d] = !0) : (!/^([a-zA-Z:]*\/\/)/.test(d) && !k || d.replace(RegExp.$1, "").split("/")[0] === a.location.host) && m.push({
href: d,
media: e
}))
}
o()
}, o = function() {
if (m.length) {
var b = m.shift();
v(b.href, function(c) {
p(c, b.href, b.media),
h[b.href] = !0,
a.setTimeout(function() {
o()
}, 0)
})
}
}, p = function(a, b, c) {
var d = a.match(/@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi)
, g = d && d.length || 0;
b = b.substring(0, b.lastIndexOf("/"));
var h = function(a) {
return a.replace(/(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, "$1" + b + "$2$3")
}
, i = !g && c;
b.length && (b += "/"),
i && (g = 1);
for (var j = 0; g > j; j++) {
var k, l, m, n;
i ? (k = c,
f.push(h(a))) : (k = d[j].match(/@media *([^\{]+)\{([\S\s]+?)$/) && RegExp.$1,
f.push(RegExp.$2 && h(RegExp.$2))),
m = k.split(","),
n = m.length;
for (var o = 0; n > o; o++)
l = m[o],
e.push({
media: l.split("(")[0].match(/(only\s+)?([a-zA-Z]+)\s?/) && RegExp.$2 || "all",
rules: f.length - 1,
hasquery: l.indexOf("(") > -1,
minw: l.match(/\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
maxw: l.match(/\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
})
}
u()
}, s = function() {
var a, b = c.createElement("div"), e = c.body, f = !1;
return b.style.cssText = "position:absolute;font-size:1em;width:1em",
e || (e = f = c.createElement("body"),
e.style.background = "none"),
e.appendChild(b),
d.insertBefore(e, d.firstChild),
a = b.offsetWidth,
f ? d.removeChild(e) : e.removeChild(b),
a = t = parseFloat(a)
}, u = function(b) {
var h = "clientWidth"
, k = d[h]
, m = "CSS1Compat" === c.compatMode && k || c.body[h] || k
, n = {}
, o = l[l.length - 1]
, p = (new Date).getTime();
if (b && q && i > p - q)
return a.clearTimeout(r),
r = a.setTimeout(u, i),
void 0;
q = p;
for (var v in e)
if (e.hasOwnProperty(v)) {
var w = e[v]
, x = w.minw
, y = w.maxw
, z = null === x
, A = null === y
, B = "em";
x && (x = parseFloat(x) * (x.indexOf(B) > -1 ? t || s() : 1)),
y && (y = parseFloat(y) * (y.indexOf(B) > -1 ? t || s() : 1)),
w.hasquery && (z && A || !(z || m >= x) || !(A || y >= m)) || (n[w.media] || (n[w.media] = []),
n[w.media].push(f[w.rules]))
}
for (var C in g)
g.hasOwnProperty(C) && g[C] && g[C].parentNode === j && j.removeChild(g[C]);
for (var D in n)
if (n.hasOwnProperty(D)) {
var E = c.createElement("style")
, F = n[D].join("\n");
E.type = "text/css",
E.media = D,
j.insertBefore(E, o.nextSibling),
E.styleSheet ? E.styleSheet.cssText = F : E.appendChild(c.createTextNode(F)),
g.push(E)
}
}, v = function(a, b) {
var c = w();
c && (c.open("GET", a, !0),
c.onreadystatechange = function() {
4 !== c.readyState || 200 !== c.status && 304 !== c.status || b(c.responseText)
}
,
4 !== c.readyState && c.send(null))
}, w = function() {
var b = !1;
try {
b = new a.XMLHttpRequest
} catch (c) {
b = new a.ActiveXObject("Microsoft.XMLHTTP")
}
return function() {
return b
}
}();
n(),
b.update = n,
a.addEventListener ? a.addEventListener("resize", x, !1) : a.attachEvent && a.attachEvent("onresize", x)
}
}
)(this);
{/* <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.min.js"></script> */
}
!function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.ES6Promise = e()
}(this, function() {
"use strict";
function t(t) {
var e = typeof t;
return null !== t && ("object" === e || "function" === e)
}
function e(t) {
return "function" == typeof t
}
function n(t) {
W = t
}
function r(t) {
z = t
}
function o() {
return function() {
return process.nextTick(a)
}
}
function i() {
return "undefined" != typeof U ? function() {
U(a)
}
: c()
}
function s() {
var t = 0
, e = new H(a)
, n = document.createTextNode("");
return e.observe(n, {
characterData: !0
}),
function() {
n.data = t = ++t % 2
}
}
function u() {
var t = new MessageChannel;
return t.port1.onmessage = a,
function() {
return t.port2.postMessage(0)
}
}
function c() {
var t = setTimeout;
return function() {
return t(a, 1)
}
}
function a() {
for (var t = 0; t < N; t += 2) {
var e = Q[t]
, n = Q[t + 1];
e(n),
Q[t] = void 0,
Q[t + 1] = void 0
}
N = 0
}
function f() {
try {
var t = Function("return this")().require("vertx");
return U = t.runOnLoop || t.runOnContext,
i()
} catch (e) {
return c()
}
}
function l(t, e) {
var n = this
, r = new this.constructor(v);
void 0 === r[V] && x(r);
var o = n._state;
if (o) {
var i = arguments[o - 1];
z(function() {
return T(o, r, i, n._result)
})
} else
j(n, r, t, e);
return r
}
function h(t) {
var e = this;
if (t && "object" == typeof t && t.constructor === e)
return t;
var n = new e(v);
return w(n, t),
n
}
function v() {}
function p() {
return new TypeError("You cannot resolve a promise with itself")
}
function d() {
return new TypeError("A promises callback cannot return that same promise.")
}
function _(t, e, n, r) {
try {
t.call(e, n, r)
} catch (o) {
return o
}
}
function y(t, e, n) {
z(function(t) {
var r = !1
, o = _(n, e, function(n) {
r || (r = !0,
e !== n ? w(t, n) : A(t, n))
}, function(e) {
r || (r = !0,
S(t, e))
}, "Settle: " + (t._label || " unknown promise"));
!r && o && (r = !0,
S(t, o))
}, t)
}
function m(t, e) {
e._state === Z ? A(t, e._result) : e._state === $ ? S(t, e._result) : j(e, void 0, function(e) {
return w(t, e)
}, function(e) {
return S(t, e)
})
}
function b(t, n, r) {
n.constructor === t.constructor && r === l && n.constructor.resolve === h ? m(t, n) : void 0 === r ? A(t, n) : e(r) ? y(t, n, r) : A(t, n)
}
function w(e, n) {
if (e === n)
S(e, p());
else if (t(n)) {
var r = void 0;
try {
r = n.then
} catch (o) {
return void S(e, o)
}
b(e, n, r)
} else
A(e, n)
}
function g(t) {
t._onerror && t._onerror(t._result),
E(t)
}
function A(t, e) {
t._state === X && (t._result = e,
t._state = Z,
0 !== t._subscribers.length && z(E, t))
}
function S(t, e) {
t._state === X && (t._state = $,
t._result = e,
z(g, t))
}
function j(t, e, n, r) {
var o = t._subscribers
, i = o.length;
t._onerror = null,
o[i] = e,
o[i + Z] = n,
o[i + $] = r,
0 === i && t._state && z(E, t)
}
function E(t) {
var e = t._subscribers
, n = t._state;
if (0 !== e.length) {
for (var r = void 0, o = void 0, i = t._result, s = 0; s < e.length; s += 3)
r = e[s],
o = e[s + n],
r ? T(n, r, o, i) : o(i);
t._subscribers.length = 0
}
}
function T(t, n, r, o) {
var i = e(r)
, s = void 0
, u = void 0
, c = !0;
if (i) {
try {
s = r(o)
} catch (a) {
c = !1,
u = a
}
if (n === s)
return void S(n, d())
} else
s = o;
n._state !== X || (i && c ? w(n, s) : c === !1 ? S(n, u) : t === Z ? A(n, s) : t === $ && S(n, s))
}
function M(t, e) {
try {
e(function(e) {
w(t, e)
}, function(e) {
S(t, e)
})
} catch (n) {
S(t, n)
}
}
function P() {
return tt++
}
function x(t) {
t[V] = tt++,
t._state = void 0,
t._result = void 0,
t._subscribers = []
}
function C() {
return new Error("Array Methods must be provided an Array")
}
function O(t) {
return new et(this,t).promise
}
function k(t) {
var e = this;
return new e(L(t) ? function(n, r) {
for (var o = t.length, i = 0; i < o; i++)
e.resolve(t[i]).then(n, r)
}
: function(t, e) {
return e(new TypeError("You must pass an array to race."))
}
)
}
function F(t) {
var e = this
, n = new e(v);
return S(n, t),
n
}
function Y() {
throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")
}
function q() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
}
function D() {
var t = void 0;
if ("undefined" != typeof global)
t = global;
else if ("undefined" != typeof self)
t = self;
else
try {
t = Function("return this")()
} catch (e) {
throw new Error("polyfill failed because global object is unavailable in this environment")
}
var n = t.Promise;
if (n) {
var r = null;
try {
r = Object.prototype.toString.call(n.resolve())
} catch (e) {}
if ("[object Promise]" === r && !n.cast)
return
}
t.Promise = nt
}
var K = void 0;
K = Array.isArray ? Array.isArray : function(t) {
return "[object Array]" === Object.prototype.toString.call(t)
}
;
var L = K
, N = 0
, U = void 0
, W = void 0
, z = function(t, e) {
Q[N] = t,
Q[N + 1] = e,
N += 2,
2 === N && (W ? W(a) : R())
}
, B = "undefined" != typeof window ? window : void 0
, G = B || {}
, H = G.MutationObserver || G.WebKitMutationObserver
, I = "undefined" == typeof self && "undefined" != typeof process && "[object process]" === {}.toString.call(process)
, J = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel
, Q = new Array(1e3)
, R = void 0;
R = I ? o() : H ? s() : J ? u() : void 0 === B && "function" == typeof require ? f() : c();
var V = Math.random().toString(36).substring(2)
, X = void 0
, Z = 1
, $ = 2
, tt = 0
, et = function() {
function t(t, e) {
this._instanceConstructor = t,
this.promise = new t(v),
this.promise[V] || x(this.promise),
L(e) ? (this.length = e.length,
this._remaining = e.length,
this._result = new Array(this.length),
0 === this.length ? A(this.promise, this._result) : (this.length = this.length || 0,
this._enumerate(e),
0 === this._remaining && A(this.promise, this._result))) : S(this.promise, C())
}
return t.prototype._enumerate = function(t) {
for (var e = 0; this._state === X && e < t.length; e++)
this._eachEntry(t[e], e)
}
,
t.prototype._eachEntry = function(t, e) {
var n = this._instanceConstructor
, r = n.resolve;
if (r === h) {
var o = void 0
, i = void 0
, s = !1;
try {
o = t.then
} catch (u) {
s = !0,
i = u
}
if (o === l && t._state !== X)
this._settledAt(t._state, e, t._result);
else if ("function" != typeof o)
this._remaining--,
this._result[e] = t;
else if (n === nt) {
var c = new n(v);
s ? S(c, i) : b(c, t, o),
this._willSettleAt(c, e)
} else
this._willSettleAt(new n(function(e) {
return e(t)
}
), e)
} else
this._willSettleAt(r(t), e)
}
,
t.prototype._settledAt = function(t, e, n) {
var r = this.promise;
r._state === X && (this._remaining--,
t === $ ? S(r, n) : this._result[e] = n),
0 === this._remaining && A(r, this._result)
}
,
t.prototype._willSettleAt = function(t, e) {
var n = this;
j(t, void 0, function(t) {
return n._settledAt(Z, e, t)
}, function(t) {
return n._settledAt($, e, t)
})
}
,
t
}()
, nt = function() {
function t(e) {
this[V] = P(),
this._result = this._state = void 0,
this._subscribers = [],
v !== e && ("function" != typeof e && Y(),
this instanceof t ? M(this, e) : q())
}
return t.prototype["catch"] = function(t) {
return this.then(null, t)
}
,
t.prototype["finally"] = function(t) {
var n = this
, r = n.constructor;
return e(t) ? n.then(function(e) {
return r.resolve(t()).then(function() {
return e
})
}, function(e) {
return r.resolve(t()).then(function() {
throw e
})
}) : n.then(t, t)
}
,
t
}();
return nt.prototype.then = l,
nt.all = O,
nt.race = k,
nt.resolve = h,
nt.reject = F,
nt._setScheduler = n,
nt._setAsap = r,
nt._asap = z,
nt.polyfill = D,
nt.Promise = nt,
nt
});
{/* <script src="https://cdn.jsdelivr.net/npm/es6-promise@4/dist/es6-promise.auto.min.js"></script> */
}
!function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.ES6Promise = e()
}(this, function() {
"use strict";
function t(t) {
var e = typeof t;
return null !== t && ("object" === e || "function" === e)
}
function e(t) {
return "function" == typeof t
}
function n(t) {
W = t
}
function r(t) {
z = t
}
function o() {
return function() {
return process.nextTick(a)
}
}
function i() {
return "undefined" != typeof U ? function() {
U(a)
}
: c()
}
function s() {
var t = 0
, e = new H(a)
, n = document.createTextNode("");
return e.observe(n, {
characterData: !0
}),
function() {
n.data = t = ++t % 2
}
}
function u() {
var t = new MessageChannel;
return t.port1.onmessage = a,
function() {
return t.port2.postMessage(0)
}
}
function c() {
var t = setTimeout;
return function() {
return t(a, 1)
}
}
function a() {
for (var t = 0; t < N; t += 2) {
var e = Q[t]
, n = Q[t + 1];
e(n),
Q[t] = void 0,
Q[t + 1] = void 0
}
N = 0
}
function f() {
try {
var t = Function("return this")().require("vertx");
return U = t.runOnLoop || t.runOnContext,
i()
} catch (e) {
return c()
}
}
function l(t, e) {
var n = this
, r = new this.constructor(p);
void 0 === r[V] && x(r);
var o = n._state;
if (o) {
var i = arguments[o - 1];
z(function() {
return T(o, r, i, n._result)
})
} else
j(n, r, t, e);
return r
}
function h(t) {
var e = this;
if (t && "object" == typeof t && t.constructor === e)
return t;
var n = new e(p);
return w(n, t),
n
}
function p() {}
function v() {
return new TypeError("You cannot resolve a promise with itself")
}
function d() {
return new TypeError("A promises callback cannot return that same promise.")
}
function _(t, e, n, r) {
try {
t.call(e, n, r)
} catch (o) {
return o
}
}
function y(t, e, n) {
z(function(t) {
var r = !1
, o = _(n, e, function(n) {
r || (r = !0,
e !== n ? w(t, n) : A(t, n))
}, function(e) {
r || (r = !0,
S(t, e))
}, "Settle: " + (t._label || " unknown promise"));
!r && o && (r = !0,
S(t, o))
}, t)
}
function m(t, e) {
e._state === Z ? A(t, e._result) : e._state === $ ? S(t, e._result) : j(e, void 0, function(e) {
return w(t, e)
}, function(e) {
return S(t, e)
})
}
function b(t, n, r) {
n.constructor === t.constructor && r === l && n.constructor.resolve === h ? m(t, n) : void 0 === r ? A(t, n) : e(r) ? y(t, n, r) : A(t, n)
}
function w(e, n) {
if (e === n)
S(e, v());
else if (t(n)) {
var r = void 0;
try {
r = n.then
} catch (o) {
return void S(e, o)
}
b(e, n, r)
} else
A(e, n)
}
function g(t) {
t._onerror && t._onerror(t._result),
E(t)
}
function A(t, e) {
t._state === X && (t._result = e,
t._state = Z,
0 !== t._subscribers.length && z(E, t))
}
function S(t, e) {
t._state === X && (t._state = $,
t._result = e,
z(g, t))
}
function j(t, e, n, r) {
var o = t._subscribers
, i = o.length;
t._onerror = null,
o[i] = e,
o[i + Z] = n,
o[i + $] = r,
0 === i && t._state && z(E, t)
}
function E(t) {
var e = t._subscribers
, n = t._state;
if (0 !== e.length) {
for (var r = void 0, o = void 0, i = t._result, s = 0; s < e.length; s += 3)
r = e[s],
o = e[s + n],
r ? T(n, r, o, i) : o(i);
t._subscribers.length = 0
}
}
function T(t, n, r, o) {
var i = e(r)
, s = void 0
, u = void 0
, c = !0;
if (i) {
try {
s = r(o)
} catch (a) {
c = !1,
u = a
}
if (n === s)
return void S(n, d())
} else
s = o;
n._state !== X || (i && c ? w(n, s) : c === !1 ? S(n, u) : t === Z ? A(n, s) : t === $ && S(n, s))
}
function M(t, e) {
try {
e(function(e) {
w(t, e)
}, function(e) {
S(t, e)
})
} catch (n) {
S(t, n)
}
}
function P() {
return tt++
}
function x(t) {
t[V] = tt++,
t._state = void 0,
t._result = void 0,
t._subscribers = []
}
function C() {
return new Error("Array Methods must be provided an Array")
}
function O(t) {
return new et(this,t).promise
}
function k(t) {
var e = this;
return new e(L(t) ? function(n, r) {
for (var o = t.length, i = 0; i < o; i++)
e.resolve(t[i]).then(n, r)
}
: function(t, e) {
return e(new TypeError("You must pass an array to race."))
}
)
}
function F(t) {
var e = this
, n = new e(p);
return S(n, t),
n
}
function Y() {
throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")
}
function q() {
throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")
}
function D() {
var t = void 0;
if ("undefined" != typeof global)
t = global;
else if ("undefined" != typeof self)
t = self;
else
try {
t = Function("return this")()
} catch (e) {
throw new Error("polyfill failed because global object is unavailable in this environment")
}
var n = t.Promise;
if (n) {
var r = null;
try {
r = Object.prototype.toString.call(n.resolve())
} catch (e) {}
if ("[object Promise]" === r && !n.cast)
return
}
t.Promise = nt
}
var K = void 0;
K = Array.isArray ? Array.isArray : function(t) {
return "[object Array]" === Object.prototype.toString.call(t)
}
;
var L = K
, N = 0
, U = void 0
, W = void 0
, z = function(t, e) {
Q[N] = t,
Q[N + 1] = e,
N += 2,
2 === N && (W ? W(a) : R())
}
, B = "undefined" != typeof window ? window : void 0
, G = B || {}
, H = G.MutationObserver || G.WebKitMutationObserver
, I = "undefined" == typeof self && "undefined" != typeof process && "[object process]" === {}.toString.call(process)
, J = "undefined" != typeof Uint8ClampedArray && "undefined" != typeof importScripts && "undefined" != typeof MessageChannel
, Q = new Array(1e3)
, R = void 0;
R = I ? o() : H ? s() : J ? u() : void 0 === B && "function" == typeof require ? f() : c();
var V = Math.random().toString(36).substring(2)
, X = void 0
, Z = 1
, $ = 2
, tt = 0
, et = function() {
function t(t, e) {
this._instanceConstructor = t,
this.promise = new t(p),
this.promise[V] || x(this.promise),
L(e) ? (this.length = e.length,
this._remaining = e.length,
this._result = new Array(this.length),
0 === this.length ? A(this.promise, this._result) : (this.length = this.length || 0,
this._enumerate(e),
0 === this._remaining && A(this.promise, this._result))) : S(this.promise, C())
}
return t.prototype._enumerate = function(t) {
for (var e = 0; this._state === X && e < t.length; e++)
this._eachEntry(t[e], e)
}
,
t.prototype._eachEntry = function(t, e) {
var n = this._instanceConstructor
, r = n.resolve;
if (r === h) {
var o = void 0
, i = void 0
, s = !1;
try {
o = t.then
} catch (u) {
s = !0,
i = u
}
if (o === l && t._state !== X)
this._settledAt(t._state, e, t._result);
else if ("function" != typeof o)
this._remaining--,
this._result[e] = t;
else if (n === nt) {
var c = new n(p);
s ? S(c, i) : b(c, t, o),
this._willSettleAt(c, e)
} else
this._willSettleAt(new n(function(e) {
return e(t)
}
), e)
} else
this._willSettleAt(r(t), e)
}
,
t.prototype._settledAt = function(t, e, n) {
var r = this.promise;
r._state === X && (this._remaining--,
t === $ ? S(r, n) : this._result[e] = n),
0 === this._remaining && A(r, this._result)
}
,
t.prototype._willSettleAt = function(t, e) {
var n = this;
j(t, void 0, function(t) {
return n._settledAt(Z, e, t)
}, function(t) {
return n._settledAt($, e, t)
})
}
,
t
}()
, nt = function() {
function t(e) {
this[V] = P(),
this._result = this._state = void 0,
this._subscribers = [],
p !== e && ("function" != typeof e && Y(),
this instanceof t ? M(this, e) : q())
}
return t.prototype["catch"] = function(t) {
return this.then(null, t)
}
,
t.prototype["finally"] = function(t) {
var n = this
, r = n.constructor;
return e(t) ? n.then(function(e) {
return r.resolve(t()).then(function() {
return e
})
}, function(e) {
return r.resolve(t()).then(function() {
throw e
})
}) : n.then(t, t)
}
,
t
}();
return nt.prototype.then = l,
nt.all = O,
nt.race = k,
nt.resolve = h,
nt.reject = F,
nt._setScheduler = n,
nt._setAsap = r,
nt._asap = z,
nt.polyfill = D,
nt.Promise = nt,
nt.polyfill(),
nt
});
{/* <script src="/arquivos/fascar-vendor.min.js?v=32168132312"></script> */
}
window.MutationObserver = window.MutationObserver || function(t) {
"use strict";
function e(t) {
this._watched = [],
this._listener = t
}
function n(t) {
!function n() {
var r = t.takeRecords();
r.length && t._listener(r, t),
t._timeout = setTimeout(n, e._period)
}()
}
function r(e) {
var n = {
type: null,
target: null,
addedNodes: [],
removedNodes: [],
previousSibling: null,
nextSibling: null,
attributeName: null,
attributeNamespace: null,
oldValue: null
};
for (var r in e)
m(n, r) && e[r] !== t && (n[r] = e[r]);
return n
}
function i(t, e) {
var n = c(t, e);
return function(i) {
var o, a = i.length;
e.charData && 3 === t.nodeType && t.nodeValue !== n.charData && i.push(new r({
type: "characterData",
target: t,
oldValue: n.charData
})),
e.attr && n.attr && s(i, t, n.attr, e.afilter),
(e.kids || e.descendents) && (o = l(i, t, n, e)),
(o || i.length !== a) && (n = c(t, e))
}
}
function o(t, e) {
return e.value
}
function a(t, e) {
return "style" !== e.name ? e.value : t.style.cssText
}
function s(t, e, n, i) {
for (var o, a, s = {}, l = e.attributes, c = l.length; c--; )
o = l[c],
a = o.name,
i && !m(i, a) || (y(e, o) !== n[a] && t.push(r({
type: "attributes",
target: e,
attributeName: a,
oldValue: n[a],
attributeNamespace: o.namespaceURI
})),
s[a] = !0);
for (a in n)
s[a] || t.push(r({
target: e,
type: "attributes",
attributeName: a,
oldValue: n[a]
}))
}
function l(e, n, i, o) {
function a(t, n, i, a, c) {
for (var u, p, d, f = t.length - 1, h = -~((f - c) / 2); d = t.pop(); )
u = i[d.i],
p = a[d.j],
o.kids && h && Math.abs(d.i - d.j) >= f && (e.push(r({
type: "childList",
target: n,
addedNodes: [u],
removedNodes: [u],
nextSibling: u.nextSibling,
previousSibling: u.previousSibling
})),
h--),
o.attr && p.attr && s(e, u, p.attr, o.afilter),
o.charData && 3 === u.nodeType && u.nodeValue !== p.charData && e.push(r({
type: "characterData",
target: u,
oldValue: p.charData
})),
o.descendents && l(u, p)
}
function l(n, i) {
for (var d, f, m, v, g, y, _, b = n.childNodes, w = i.kids, x = b.length, C = w ? w.length : 0, $ = 0, S = 0, k = 0; S < x || k < C; )
y = b[S],
g = w[k],
_ = g && g.node,
y === _ ? (o.attr && g.attr && s(e, y, g.attr, o.afilter),
o.charData && g.charData !== t && y.nodeValue !== g.charData && e.push(r({
type: "characterData",
target: y,
oldValue: g.charData
})),
f && a(f, n, b, w, $),
o.descendents && (y.childNodes.length || g.kids && g.kids.length) && l(y, g),
S++,
k++) : (c = !0,
d || (d = {},
f = []),
y && (d[m = p(y)] || (d[m] = !0,
-1 === (v = u(w, y, k)) ? o.kids && (e.push(r({
type: "childList",
target: n,
addedNodes: [y],
nextSibling: y.nextSibling,
previousSibling: y.previousSibling
})),
$++) : f.push({
i: S,
j: v
})),
S++),
_ && _ !== b[S] && (d[m = p(_)] || (d[m] = !0,
-1 === (v = h(b, _, S)) ? o.kids && (e.push(r({
type: "childList",
target: i.node,
removedNodes: [_],
nextSibling: w[k + 1],
previousSibling: w[k - 1]
})),
$--) : f.push({
i: v,
j: k
})),
k++));
f && a(f, n, b, w, $)
}
var c;
return l(n, i),
c
}
function c(t, e) {
var n = !0;
return function t(r) {
var i = {
node: r
};
return !e.charData || 3 !== r.nodeType && 8 !== r.nodeType ? (e.attr && n && 1 === r.nodeType && (i.attr = f(r.attributes, function(t, n) {
return e.afilter && !e.afilter[n.name] || (t[n.name] = y(r, n)),
t
}, {})),
n && (e.kids || e.charData || e.attr && e.descendents) && (i.kids = d(r.childNodes, t)),
n = e.descendents) : i.charData = r.nodeValue,
i
}(t)
}
function u(t, e, n) {
return h(t, e, n, v("node"))
}
function p(t) {
try {
return t.id || (t[b] = t[b] || _++)
} catch (e) {
try {
return t.nodeValue
} catch (t) {
return _++
}
}
}
function d(t, e) {
for (var n = [], r = 0; r < t.length; r++)
n[r] = e(t[r], r, t);
return n
}
function f(t, e, n) {
for (var r = 0; r < t.length; r++)
n = e(n, t[r], r, t);
return n
}
function h(t, e, n, r) {
for (; n < t.length; n++)
if ((r ? t[n][r] : t[n]) === e)
return n;
return -1
}
function m(e, n) {
return e[n] !== t
}
function v(t) {
return t
}
e._period = 30,
e.prototype = {
observe: function(t, e) {
for (var r = {
attr: !!(e.attributes || e.attributeFilter || e.attributeOldValue),
kids: !!e.childList,
descendents: !!e.subtree,
charData: !(!e.characterData && !e.characterDataOldValue)
}, o = this._watched, a = 0; a < o.length; a++)
o[a].tar === t && o.splice(a, 1);
e.attributeFilter && (r.afilter = f(e.attributeFilter, function(t, e) {
return t[e] = !0,
t
}, {})),
o.push({
tar: t,
fn: i(t, r)
}),
this._timeout || n(this)
},
takeRecords: function() {
for (var t = [], e = this._watched, n = 0; n < e.length; n++)
e[n].fn(t);
return t
},
disconnect: function() {
this._watched = [],
clearTimeout(this._timeout),
this._timeout = null
}
};
var g = document.createElement("i");
g.style.top = 0,
g = "null" != g.attributes.style.value;
var y = g ? o : a
, _ = 1
, b = "mo_id";
return e
}(void 0),
function(t) {
"use strict";
var e = ["items", "totalizers", "clientProfileData", "shippingData", "paymentData", "sellers", "messages", "marketingData", "clientPreferencesData", "storePreferencesData", "giftRegistryData", "ratesAndBenefitsData", "openTextField", "commercialConditionData"]
, n = {}
, r = new Date
, i = {};
i.upperAllFirstLetter = function(t) {
if (t) {
for (var e, n, r = t.toLowerCase(), i = r.split(" "), o = 0; o < i.length; o++)
e = i[o],
(n = e[0]) && (e = n.toUpperCase() + e.slice(1),
i[o] = e);
return i.join(" ")
}
}
,
i.toFormData = function(t) {
var e = "";
for (var n in t)
e += "&" + n + "=" + t[n];
return e && (e = e.substring(1)),
e
}
,
i.getNumberOfString = function(t) {
if (t)
return t.replace(/[^0-9]/g, "")
}
,
i.getIdUserCripty = function(t) {
if (t)
return t.match(/\'(.*)'/, ""),
"object" == typeof t ? t[1] : ""
}
,
i.toObjectReview = function(e) {
var n = new DOMParser
, r = n.parseFromString(e, "text/html")
, o = {
userId: null,
rating: null,
media: null,
comments: []
};
return t(r).find(".resenhas > .quem > li").each(function() {
var e = t(this);
o.comments.push({
author: e.find(".dados > strong").text().replace("Opinião de: ", ""),
rating: t.trim(e.find(".rating-wrapper div").attr("class").replace("rating", "")),
comment: e.find(".opt-texto p").text(),
id: i.getNumberOfString(e.find("#lnkAjudou").attr("href"))
})
}),
o.userId = i.getIdUserCripty(t(r).find("#ulPubliqueResenha #lnkPubliqueResenha").attr("href")),
o.rating = t(r).find(".avaliacao > ul.rating").html(),
o.media = t(r).find(".media > em").html(),
o
}
,
i.getPriceTotalBuyTogether = function(e) {
if (e)
return e = e.match(/total:(.*)/, ""),
"object" == typeof e ? t.trim(e[1]) : ""
}
,
i.getSkusBuyTogether = function(t) {
var e = [];
if (t)
return e = t.match(/sku=[0-9]{0,}/g, ""),
"object" != typeof e ? "" : (e[0] = i.getNumberOfString(e[0]),
e[1] = i.getNumberOfString(e[1]),
e)
}
,
i.toObjectBuyTogether = function(e) {
var n, r, o = new DOMParser, a = o.parseFromString(e, "text/html"), s = {
url: null,
category: null,
total_price: null,
installment: null,
skus: [],
items: []
};
return n = t(a).find(".buy > strong:eq(0)").text(),
r = t(a).find(".buy > strong:eq(1)").text(),
s.url = t(a).find(".comprar-junto > #lnkComprar").attr("href"),
s.installment = {
number: t.trim(n),
price: t.trim(r)
},
s.total_price = i.getPriceTotalBuyTogether(t(a).find(".buy").text()),
s.category = t(a).find(".more > a#lnkVejaMais").attr("href"),
s.skus = i.getSkusBuyTogether(s.url),
s.items.push({
thumb: t(a).find(".itemA a img").attr("src"),
title: t(a).find(".itemA h3").text(),
url: t(a).find(".itemA a").attr("href")
}),
s.items.push({
thumb: t(a).find(".itemB a img").attr("src"),
title: t(a).find(".itemB h3").text(),
url: t(a).find(".itemB a").attr("href")
}),
s
}
,
i.monthNumber = function(t) {
if (t) {
var e;
switch (t) {
case "jan":
e = 0;
break;
case "fev":
e = 1;
break;
case "mar":
e = 2;
break;
case "abr":
e = 3;
break;
case "mai":
e = 4;
break;
case "jun":
e = 5;
break;
case "jul":
e = 6;
break;
case "ago":
e = 7;
break;
case "set":
e = 8;
break;
case "out":
e = 9;
break;
case "nov":
e = 10;
break;
case "dez":
e = 11
}
return e
}
}
,
i.formatData = function(t) {
return t = t.replace(",", ""),
t = t.split(" "),
t[0] = String(this.monthNumber(t[0])),
new Date(t[2],t[0],t[1],hours[0],hours[1],hours[2])
}
;
var o = function() {
return null
};
o.prototype.config = function(t) {
if (this.params = t,
this.params) {
var e = {
Accept: "application/json; charset=utf-8",
"Content-Type": "application/json",
"REST-Range": "resources=0-49"
};
n.DEBUG = this.params.DEBUG || !1,
n.headers = this.params.headers || e,
n.store_url = this.params.store_url || "",
n.url_api_search = n.store_url + "/api/catalog_system/pub/products/search",
n.url_api_search_autocomplete = n.store_url + "/buscaautocomplete",
n.url_api_search_buscapagina = n.store_url + "/buscapagina",
n.url_api_category = n.store_url + "/api/catalog_system/pub/category/tree/3",
n.url_api_brand = n.store_url + "/api/catalog_system/pvt/brand/list",
n.url_product_sku = n.store_url + "/produto/sku/",
n.url_product_variations = n.store_url + "/api/catalog_system/pub/products/variations/",
n.url_profile = n.store_url + "/api/checkout/pub/profiles",
n.url_get_profile = n.store_url + "/no-cache/profileSystem/getProfile",
n.url_order_form = n.store_url + "/api/checkout/pub/orderForm",
n.url_orders = n.store_url + "/api/checkout/pub/orders/",
n.url_orders_oms = n.store_url + "/api/oms/pvt/orders/",
n.url_postcode = n.store_url + "/no-cache/postalcode/address/",
n.url_simulation_shipping = n.store_url + "/api/checkout/pub/orderForms/simulation",
n.url_warn_me = n.store_url + "/no-cache/AviseMe.aspx",
n.url_sku_details = n.store_url + "/api/catalog_system/pvt/sku/stockkeepingunitbyid/",
n.url_publish_userreviewcomment = n.store_url + "/publishuserreviewcomment",
n.url_userreview = n.store_url + "/userreview",
n.url_publish_userreviewrelevance = n.store_url + "/PublishUserReviewRelevance",
n.url_add_coupon = n.store_url + "/coupons",
n.url_attachments_shippingData = n.store_url + "/attachments/shippingData",
n.url_attachments_openTextField = n.store_url + "/attachments/openTextField",
n.url_address_save = n.store_url + "/no-cache/account/address/save",
n.url_profile_save = n.store_url + "/no-cache/account/profile/save",
n.url_address_remove = n.store_url + "/no-cache/account/address/delete/",
n.url_address_detail = n.store_url + "/no-cache/account/address/detail/",
n.url_user_logout = n.store_url + "/no-cache/user/logout",
n.url_orderform_clear = n.store_url + "/checkout/changeToAnonymousUser/",
n.url_buy_together = n.store_url + "/comprejuntosku/",
n.url_service_sku = n.store_url + "/servico/",
n.url_api_newsletter = n.store_url + "/no-cache/Newsletter.aspx",
n.url_api_dataserver = n.store_url + "/no-cache/HoraAtualServidor.aspx",
n.url_api_carriers = n.store_url + "/api/logistics/pvt/configuration/carriers",
n.header = this.params.headers,
n.apiMasterData = "/api/dataentities/"
} else
console.error("Metodo config não definido!")
}
,
o.prototype.log = function(t) {
if (t)
return this.DEBUG && console.log(t)
}
,
o.prototype.error = function(t) {
if (t)
return this.DEBUG && console.error(t)
}
,
o.prototype.warn = function(t) {
if (t)
return this.DEBUG && console.warn(t)
}
,
o.prototype.parameters = function(t) {
if (!t)
return "";
var e = "";
for (var n in t)
e += "&" + n + "=" + t[n];
return "?" + e.substring(1)
}
,
o.prototype.ajax = function(e, n, r, i, o, a) {
if (e && n) {
var s, l;
a && "object" == typeof r ? (r = JSON.stringify(r),
s = "application/json",
l = "json") : (s = "application/x-www-form-urlencoded; charset=UTF-8",
l = ""),
t.ajax({
url: e,
type: n,
contentType: s,
dataType: l,
data: r || "",
success: function(t) {
i(t)
},
error: function(t) {
o(t)
}
})
}
}
,
o.prototype.search = function() {
var e = this;
return {
products: function(r, i, o) {
if (r) {
var a = "function" == typeof i && "function" == typeof o;
t.getJSON(n.url_api_search + e.parameters(r), function(t) {
a && i(t)
}, function(t) {
a && o(t)
})
}
},
autocomplete: function(r, i, o, a) {
if (r) {
var s = "function" == typeof i && "function" == typeof o
, l = {
productNameContains: r
}
, c = a || !1;
t.getJSON(n.url_api_search_autocomplete + e.parameters(l), function(t) {
s && i(!!t && (c ? [{
items: [],
thumb: "",
thumbUrl: null,
name: "Pocket em Toy",
href: "http://corebiz.vtexcommercestable.com.br/toy/Pocket",
criteria: "£Pocket em Toy¢/toy/Pocket"
}, {
items: [{
itemId: "21",
name: "Greg",
nameComplete: "Pocket Steven Universo Greg",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156430-25-25/greg.jpg"
}, {
itemId: "22",
name: "Connie",
nameComplete: "Pocket Steven Universo Connie",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156431-25-25/connie.jpg"
}, {
itemId: "23",
name: "Garnet",
nameComplete: "Pocket Steven Universo Garnet",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156432-25-25/garnet.jpg"
}, {
itemId: "24",
name: "Leon",
nameComplete: "Pocket Steven Universo Leon",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156434-25-25/leon.jpg"
}, {
itemId: "25",
name: "Rose",
nameComplete: "Pocket Steven Universo Rose",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156435-25-25/rose.jpg"
}, {
itemId: "26",
name: "Peridot",
nameComplete: "Pocket Steven Universo Peridot",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156436-25-25/peridot.jpg"
}, {
itemId: "27",
name: "Pérola",
nameComplete: "Pocket Steven Universo Pérola",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156437-25-25/perola.jpg"
}, {
itemId: "28",
name: "steven",
nameComplete: "Pocket Steven Universo steven",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156439-25-25/1stevenuniverse.jpg"
}],
thumb: '<img src="http://corebiz.vteximg.com.br/arquivos/ids/156439-25-25/1stevenuniverse.jpg" width="25" height="25" alt="steven" id="" />',
thumbUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156439-25-25/1stevenuniverse.jpg",
name: "pocket steven universo",
href: "http://corebiz.vtexcommercestable.com.br/pocket_steven_universo/p",
criteria: null
}] : t.itemsReturned))
}, function(t) {
s && o(t)
})
}
},
buscapagina: function(r, i, o) {
if (r) {
var a = "function" == typeof i && "function" == typeof o;
e.ajax(n.url_api_search_buscapagina + e.parameters(r), "GET", null, function(e) {
var n = t.parseHTML(e);
a && i(n)
}, function(t) {
a && o(t)
}, !0)
}
},
goPageSearch: function(t) {
t && (window.location.href = "/" + t)
}
}
}
,
o.prototype.default = function() {
var e = this;
return {
init: function(r, i) {
var o = "function" == typeof r && "function" == typeof i;
t.getJSON(n.url_api_search + e.parameters(config), function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
}
}
}
,
o.prototype.brands = function() {
return {
list: function(e, r) {
var i = "function" == typeof e && "function" == typeof r;
t.getJSON(n.url_api_brand, function(t) {
i && e(t)
}, function(t) {
i && r(t)
})
}
}
}
,
o.prototype.category = function() {
return {
list: function(e, r, i) {
var o = "function" == typeof e && "function" == typeof r
, a = i || !1;
t.getJSON(n.url_api_category, function(t) {
o && e(a ? [{
id: 1,
name: "Testes e Integração (Departamento)",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/testes-e-integracao--departamento-",
children: []
}, {
id: 4,
name: "Moda",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/moda",
children: [{
id: 5,
name: "Vestuario",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/moda/vestuario",
children: []
}, {
id: 6,
name: "Celulares",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/moda/celulares",
children: []
}, {
id: 7,
name: "Acessorios",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/moda/acessorios",
children: []
}]
}, {
id: 8,
name: "Eletrônicos",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/eletronicos",
children: []
}, {
id: 10,
name: "Parceiros VTEX Store",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/parceiros-vtex-store",
children: []
}, {
id: 12,
name: "Toy",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/toy",
children: [{
id: 13,
name: "steven universo",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/toy/steven-universo",
children: []
}]
}, {
id: 14,
name: "recorrencia",
hasChildren: !1,
url: "http://corebiz.vtexcommercestable.com.br/recorrencia",
children: []
}] : t)
}, function(t) {
o && r(t)
})
}
}
}
,
o.prototype.products = function() {
var e = this;
return {
service: function(e, r, i) {
if (e) {
var o = "function" == typeof r && "function" == typeof i;
t.get(n.url_service_sku + e, function(t) {
o && r(t || !1)
})
}
},
buyTogether: function(e, r, o, a) {
if (e) {
var s = "function" == typeof r && "function" == typeof o
, l = a || !1;
t.post(n.url_buy_together + e, function(t) {
s && r(!!t && (l ? {
url: "https://corebiz.vtexcommercestable.com.br/checkout/cart/add?sku=3&sku=19&qt…97a901a7e09572e8f34c43c1037f41_geral:467225D68C45B0DCBF4368FECA3DFB67&sc=1",
category: "http://corebiz.vtexcommercestable.com.br/moda",
total_price: "R$ 110,98",
installment: {
number: "12x",
price: "R$ 9,24"
},
skus: ["3", "19"],
items: [{
thumb: "http://corebiz.vteximg.com.br/arquivos/ids/155398-90-90/carexemplo.png",
title: "Produto Variação Cor e Tam SKU Variação Cor1 e Tam 1",
url: "http://corebiz.vtexcommercestable.com.br/produto-variacao-cor-e-tam/p"
}, {
thumb: "http://corebiz.vteximg.com.br/arquivos/ids/155397-90-90/corebiz-vtex-store.jpg",
title: "Agência Corebiz Vermelho",
url: "http://corebiz.vtexcommercestable.com.br/corebiz/p"
}]
} : i.toObjectBuyTogether(t)))
})
}
},
sku: function(e, r, i) {
if (e) {
var o = "function" == typeof r && "function" == typeof i;
t.getJSON(n.url_product_sku + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
}
},
product: function(t, n, r) {
if (t) {
var i = "function" == typeof n && "function" == typeof r;
e.search().products({
fq: "productId:" + t
}, function(t) {
i && n(t)
}, function(t) {
i && r(t)
})
}
},
variations: function(e, r, i) {
if (e) {
var o = "function" == typeof r && "function" == typeof i;
t.getJSON(n.url_product_variations + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
}
},
simulationShipping: function(t, r, i) {
if (t) {
var o = "function" == typeof r && "function" == typeof i;
e.ajax(n.url_simulation_shipping, "POST", t, function(t) {
o && r(!!t.logisticsInfo && t.logisticsInfo)
}, function(t) {
o && i(t)
}, !0)
}
},
warnMe: function(t, r, o) {
if (t) {
var a = i.toFormData(t)
, s = "function" == typeof r && "function" == typeof o;
e.ajax(n.url_warn_me, "POST", a, function(t) {
s && r(t)
}, function(t) {
s && o(t)
}, !0)
}
},
skuDetails: function(e, r, i) {
if (e) {
var o = "function" == typeof r && "function" == typeof i;
t.getJSON(n.url_sku_details + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
}
},
publishReviewComment: function(t, r, o) {
if (t && Object.keys(t).length) {
var a = "function" == typeof r && "function" == typeof o;
e.orderForm().list(function(s) {
if (s.loggedIn) {
var l = encodeURI("<Score><EvaluationRating><EvaluationId>" + t.productId + "</EvaluationId><Rating>" + t.ratingValue + "</Rating></EvaluationRating></Score>");
l = String(l);
var c = {
userId: t.userId,
productId: t.productId,
title: t.title,
comment: t.comment,
allowShowUserEmail: "false",
ratingValue: encodeURI(l),
save: "true",
categoryId: t.categoryId
}
, u = i.toFormData(c);
e.ajax(n.url_publish_userreviewcomment, "POST", u, function(t) {
a && r(t)
}, function(t) {
a && o(t)
}, !0)
}
}, function(t) {
a && o(t)
})
}
},
userReview: function(t, r, o, a) {
if (t) {
var s = {
productLinkId: t.produto_variacao,
qtdReviewsToBeShown: t.qtdReviewsToBeShown,
productId: t.productId,
categoryId: t.categoryId
}
, l = i.toFormData(s)
, c = "function" == typeof r && "function" == typeof o
, u = a || !1;
e.ajax(n.url_userreview, "POST", l, function(t) {
c && r(u ? {
userId: "",
rating: '<strong id="spnRatingProdutoBottom" class="rating-produto avaliacao30">\n <li>\n <em class="voteRatingStar">\n <strong class="rating-demonstrativo avaliacao50">\n </strong></em><strong class="rating-demonstrativo avaliacao50">\n <span class="voteRatingBar">\n <span style="width: 0%">\n </span>\n <span>nenhum voto</span>\n </span></strong></li><strong class="rating-demonstrativo avaliacao50">\n <li>\n <em class="voteRatingStar">\n <strong class="rating-demonstrativo avaliacao40">\n </strong></em><strong class="rating-demonstrativo avaliacao40">\n <span class="voteRatingBar">\n <span style="width: 0%">\n </span>\n <span>nenhum voto</span>\n </span></strong></li><strong class="rating-demonstrativo avaliacao40">\n <li>\n <em class="voteRatingStar">\n <strong class="rating-demonstrativo avaliacao30">\n </strong></em><strong class="rating-demonstrativo avaliacao30">\n <span class="voteRatingBar">\n <span style="width: 100%">\n </span>\n <span> 1 Voto</span>\n </span></strong></li><strong class="rating-demonstrativo avaliacao30">\n <li>\n <em class="voteRatingStar">\n <strong class="rating-demonstrativo avaliacao20">\n </strong></em><strong class="rating-demonstrativo avaliacao20">\n <span class="voteRatingBar">\n <span style="width: 0%">\n </span>\n <span>nenhum voto</span>\n </span></strong></li><strong class="rating-demonstrativo avaliacao20">\n <li>\n <em class="voteRatingStar">\n <strong class="rating-demonstrativo avaliacao10">\n </strong></em><strong class="rating-demonstrativo avaliacao10">\n <span class="voteRatingBar">\n <span style="width: 0%">\n </span>\n <span>nenhum voto</span>\n </span></strong></li><strong class="rating-demonstrativo avaliacao10">\n </strong></strong></strong></strong></strong></strong>',
media: '\n <strong id="spnRatingProdutoBottom" class="rating-produto avaliacao30">\n <span>\n1 voto\n</span>\n </strong>',
comments: [{
author: "Rafael",
rating: "a30",
comment: "Meu comentario 2",
id: "24"
}]
} : i.toObjectReview(t))
}, function(t) {
c && o(t)
}, !0)
}
},
ratingValue: function(t, r, i) {
if (t && Object.keys(t).length) {
var o = {
productId: t.productId,
categoryId: t.categoryId,
productLinkId: t.productLinkId,
ratingValue: t.ratingValue,
qtdReviewsToBeShown: t.qtdReviewsToBeShown
}
, a = "function" == typeof r && "function" == typeof i;
e.ajax(n.url_userreview, "POST", o, function(t) {
a && r(t)
}, function(t) {
a && i(t)
}, !0)
}
},
ratingViewRelevance: function(t, r, i) {
if (t && Object.keys(t).length) {
var o = {
ProductId: t.ProductId,
PaginaAtual: t.PaginaAtual,
TamPagina: t.TamPagina,
SortOrder: t.SortOrder,
isRelevant: t.isRelevant,
reviewId: t.reviewId,
qtdReviewsToBeShown: t.qtdReviewsToBeShown,
source: "UserReview",
currentPage: t.currentPage
}
, a = "function" == typeof r && "function" == typeof i;
e.ajax(n.url_publish_userreviewrelevance, "POST", o, function(t) {
a && r(t)
}, function(t) {
a && i(t)
}, !0)
}
}
}
}
,
o.prototype.profile = function() {
var e = this;
return {
getProfileByEmail: function(r, i, o) {
if (r) {
var a = "function" == typeof i && "function" == typeof o;
t.getJSON(n.url_profile + e.parameters(r), function(t) {
a && i(t)
}, function(t) {
a && o(t)
})
}
},
getProfile: function(e, r, i) {
var o = "function" == typeof e && "function" == typeof r
, a = i || !1;
t.getJSON(n.url_get_profile, function(t) {
o && e(a ? {
UserId: "555c43ff-c97c-43a8-8bfc-2e76e2255cc0",
IsReturningUser: !0,
IsUserDefined: !0,
IsPJ: !1,
FirstName: "Rafael",
LastName: "Cruz",
Gender: "M",
Email: "rafael.cruz@corebiz.com.br"
} : t)
}, function(t) {
o && r(t)
})
},
isUserLogged: function(t, n) {
var r = "function" == typeof t && "function" == typeof n;
e.orderForm().list(function(e) {
r && t(e.loggedIn)
}, function(t) {
r && n(t)
})
},
postcode: function(e, r, i) {
var o = "function" == typeof r && "function" == typeof i;
e && t.getJSON(n.url_postcode + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
},
getClientProfileData: function(t, n) {
var r = "function" == typeof t && "function" == typeof n;
e.orderForm().list(function(e) {
r && t(e.clientProfileData)
}, function(t) {
r && n(t)
})
},
getAddresses: function(t, e) {
var n = "function" == typeof t && "function" == typeof e
, r = this;
this.getProfile(function(i) {
if (!i && n)
return void t(!1);
var o = i.Email;
o || t(!1),
r.getProfileByEmail({
email: o
}, function(e) {
t(!(!n || !e) && {
email: o,
availableAddresses: e.availableAddresses
})
}, function(t) {
n && e(t)
})
}, function(t) {
console.error(t)
})
},
getAddress: function(e, r, i) {
var o = "function" == typeof r && "function" == typeof i;
t.getJSON(n.url_address_detail + e, function(t) {
o && r(t || !1)
}, function(t) {
o && i(t)
})
},
saveAddress: function(t, r, o) {
var a = "function" == typeof r && "function" == typeof o
, s = i.toFormData(t);
e.ajax(n.url_address_save, "POST", s, function() {
a && r(!0)
}, function(t) {
a && o(t)
}, !0)
},
saveProfile: function(t, r, o) {
var a = "function" == typeof r && "function" == typeof o
, s = i.toFormData(t);
e.ajax(n.url_profile_save, "POST", s, function(t) {
a && r(t)
}, function(t) {
a && o(t)
}, !0)
},
removeAddress: function(e, r, i) {
var o = "function" == typeof r && "function" == typeof i;
e && t.get(n.url_address_remove + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
}, !0)
},
loggout: function(e, r) {
var i = "function" == typeof e && "function" == typeof r;
i ? t.get(n.url_user_logout, function(t) {
i && e(t)
}, function(t) {
i && r(t)
}, !0) : window.location.href = n.url_user_logout
}
}
}
,
o.prototype.order = function() {
return {
list: function(e, r) {
var i = "function" == typeof e && "function" == typeof r;
t.getJSON(n.url_orders, function(t) {
i && e(t)
}, function(t) {
i && r(t)
})
},
orderByIdOrEmail: function(e, r, i) {
var o = "function" == typeof r && "function" == typeof i;
e && t.getJSON(n.url_orders + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
},
oms: function(e, r, i) {
var o = "function" == typeof r && "function" == typeof i;
e && t.getJSON(n.url_orders_oms + e, function(t) {
o && r(t)
}, function(t) {
o && i(t)
})
}
}
}
,
o.prototype.cart = function() {
var t = this;
return {
list: function(e, n, r) {
var i = "function" == typeof e && "function" == typeof n
, o = r || !1;
t.orderForm().list(function(t) {
var n = {}
, r = t.items.reduce(function(t, e) {
return t + e.quantity
}, 0);
n.resume = {
total_cart: t.value,
quantity_cart: r
},
n.items = t.items,
i && e(o ? {
resume: {
total_cart: 19798,
quantity_cart: 2
},
items: [{
uniqueId: "3C181015F9294BECB6AB3DAEECC3971A",
id: "30",
productId: "9",
refId: "camisetaazulpp",
ean: null,
name: "camiseta azul-pp",
skuName: "azul-pp",
modalType: null,
priceValidUntil: "2018-05-01T02:03:56.4800255Z",
tax: 0,
price: 9899,
listPrice: 2e4,
manualPrice: null,
sellingPrice: 9899,
rewardValue: 0,
isGift: !1,
additionalInfo: {
brandName: "Marca Eletrônicos",
brandId: "2000001",
offeringInfo: null,
offeringType: null,
offeringTypeId: null
},
preSaleDate: null,
productCategoryIds: "/4/5/",
productCategories: {
4: "Moda",
5: "Vestuario"
},
defaultPicker: null,
handlerSequence: 0,
handling: !1,
quantity: 1,
seller: "1",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156440-55-55/ico-socks-2x.png",
detailUrl: "/camiseta/p",
components: [],
bundleItems: [],
attachments: [],
itemAttachment: {
name: null,
content: {}
},
attachmentOfferings: [],
offerings: [],
priceTags: [],
availability: "available",
measurementUnit: "un",
unitMultiplier: 1
}, {
uniqueId: "3C181015F9294BECB6AB3DAEECC3971A",
id: "30",
productId: "9",
refId: "camisetaazulpp",
ean: null,
name: "camiseta azul-pp 2",
skuName: "azul-pp",
modalType: null,
priceValidUntil: "2018-05-01T02:03:56.4800255Z",
tax: 0,
price: 9899,
listPrice: 2e4,
manualPrice: null,
sellingPrice: 9899,
rewardValue: 0,
isGift: !1,
additionalInfo: {
brandName: "Marca Eletrônicos",
brandId: "2000001",
offeringInfo: null,
offeringType: null,
offeringTypeId: null
},
preSaleDate: null,
productCategoryIds: "/4/5/",
productCategories: {
4: "Moda",
5: "Vestuario"
},
defaultPicker: null,
handlerSequence: 0,
handling: !1,
quantity: 1,
seller: "1",
imageUrl: "http://corebiz.vteximg.com.br/arquivos/ids/156440-55-55/ico-socks-2x.png",
detailUrl: "/camiseta/p",
components: [],
bundleItems: [],
attachments: [],
itemAttachment: {
name: null,
content: {}
},
attachmentOfferings: [],
offerings: [],
priceTags: [],
availability: "available",
measurementUnit: "un",
unitMultiplier: 1
}]
} : n)
}, function(t) {
i && error_fnr(t)
})
},
handleremove: function(r, i, o, a) {
if (r = r || 0,
0 !== i.items.length) {
var s = "function" == typeof o && "function" == typeof a
, l = [{
index: r,
quantity: 0
}]
, c = {
orderItems: l,
expectedOrderFormSections: e,
noSplitItem: !1
}
, u = i.orderFormId;
return t.ajax(n.url_order_form + "/" + u + "/items/update", "POST", c, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
}
},
handleRemoveAllSkus: function(r, i, o, a) {
if (0 !== i.items.length) {
var s = "function" == typeof o && "function" == typeof a
, l = [];
r >= 0 ? l.push({
index: r,
quantity: 0
}) : l = i.items.map(function(t, e) {
return {
index: e,
quantity: 0
}
}),
t.warn(l);
var c = {
orderItems: l,
expectedOrderFormSections: e,
noSplitItem: !1
}
, u = i.orderFormId;
return t.ajax(n.url_order_form + "/" + u + "/items/update", "POST", c, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
}
},
remove: function(e, n, r, i) {
var o = "function" == typeof n && "function" == typeof r;
i || !1 ? n(!0) : t.orderForm().list(function(t) {
e >= 0 ? this.handleremove(e, t, function(t) {
o && n(t)
}, function(t) {
o && r(t)
}) : this.handleRemoveAllSkus(e, t, function(t) {
o && n(t)
}, function(t) {
o && r(t)
})
}
.bind(this), function(t) {
r(t)
})
},
handleadd: function(r, i, o, a, s) {
var l = "function" == typeof a && "function" == typeof s
, c = {
orderItems: i,
expectedOrderFormSections: e
};
return t.ajax(n.url_order_form + "/" + o + "/items?sc=" + r, "POST", c, function(t) {
l && a(t)
}, function(t) {
l && s(t)
}, !0),
null
},
add: function(e, n, r, i, o) {
if (n && "object" == typeof n) {
var a = "function" == typeof r && "function" == typeof i;
o || !1 ? r(!0) : t.orderForm().list(function(t) {
this.handleadd(e, n, t.orderFormId, function(t) {
a && r(t)
}, function(t) {
a && i(t)
})
}
.bind(this), function(t) {
i(t)
})
}
},
handleUpdate: function(r, i, o, a) {
var s = "function" == typeof o && "function" == typeof a;
r.hasBundleItems = !1;
var l = {
orderItems: r,
noSplitItem: !0,
expectedOrderFormSections: e
};
return t.ajax(n.url_order_form + "/" + i + "/items/update/", "POST", l, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
},
update: function(e, n, r, i) {
if (e && "object" == typeof e) {
var o = "function" == typeof n && "function" == typeof r;
i || !1 ? n(!0) : t.orderForm().list(function(t) {
this.handleUpdate(e, t.orderFormId, function(t) {
o && n(t)
}, function(t) {
o && r(t)
})
}
.bind(this), function(t) {
r(t)
})
}
},
handleAddCoupon: function(r, i, o, a) {
var s = "function" == typeof o && "function" == typeof a
, l = {
text: r,
expectedOrderFormSections: e
};
return t.ajax(n.url_order_form + "/" + i + n.url_add_coupon, "POST", l, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
},
addCoupon: function(e, n, r, i, o) {
var a = "function" == typeof n && "function" == typeof r
, s = i || !1;
o = o || !1,
s ? n(!0) : t.orderForm().list(function(t) {
this.handleAddCoupon(e, t.orderFormId, function(t) {
a && n(!!(t.marketingData && t.marketingData.coupon === e || o) && t)
}, function(t) {
a && r(t)
})
}
.bind(this), function(t) {
r(t)
})
},
deleteCoupon: function(t, e) {
var n = "function" == typeof t && "function" == typeof e;
this.addCoupon("", function(e) {
n && t(e)
}, function(e) {
n && t(e)
}, !1, !0)
},
getCouponActive: function(e, n, r) {
var i = "function" == typeof e && "function" == typeof n;
r || !1 ? i && e({
marketingData: {
attachmentId: "marketingData",
utmSource: null,
utmMedium: null,
utmCampaign: null,
utmipage: null,
utmiPart: null,
utmiCampaign: null,
coupon: "isDeveloperCupom",
marketingTags: []
},
totalizers: [{
id: "Items",
name: "Total dos Itens",
value: 9899
}, {
id: "Discounts",
name: "Total dos Descontos",
value: -990
}],
value: 8909
}) : t.orderForm().list(function(t) {
i && e(!(!t.marketingData || !t.marketingData.coupon) && {
marketingData: t.marketingData,
totalizers: t.totalizers,
value: t.value
})
}, function(t) {
i && n(t)
}, !1)
},
handleSimulationShipping: function(r, i, o, a) {
var s = "function" == typeof o && "function" == typeof a;
if (r) {
var l = {
address: {
postalCode: r,
country: "BRA"
},
country: "BRA",
postalCode: "06416070",
expectedOrderFormSections: e
};
return t.ajax(n.url_order_form + "/" + i + n.url_attachments_shippingData, "POST", l, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
}
},
simulationShipping: function(e, n, r, i) {
if (e) {
var o = "function" == typeof n && "function" == typeof r;
i || !1 ? n([{
id: "Sedex",
name: "Sedex",
deliveryIds: [{
courierId: "1",
warehouseId: "1_1",
dockId: "1",
courierName: "Sedex",
quantity: 1
}],
shippingEstimate: "3d",
shippingEstimateDate: null,
lockTTL: null,
availableDeliveryWindows: [{
startDateUtc: "2017-05-04T07:00:00+00:00",
endDateUtc: "2017-05-04T21:00:00+00:00",
price: 2e3,
lisPrice: 2e3,
tax: 0
}, {
startDateUtc: "2017-05-05T07:00:00+00:00",
endDateUtc: "2017-05-05T21:00:00+00:00",
price: 2e3,
lisPrice: 2e3,
tax: 0
}],
deliveryWindow: null,
price: 500,
listPrice: 500,
tax: 0,
pickupStoreInfo: null
}]) : t.orderForm().list(function(t) {
this.handleSimulationShipping(e, t.orderFormId, function(t) {
o && n(t.shippingData.logisticsInfo)
}, function(t) {
o && r(t)
})
}
.bind(this), function(t) {
r(t)
})
}
}
}
}
,
o.prototype.orderForm = function() {
return {
list: function(e, r, i) {
var o = "function" == typeof e && "function" == typeof r;
i || !1 ? e({
orderFormId: "35480778a7354d1b8162515599255c13",
salesChannel: "1",
loggedIn: !0,
isCheckedIn: !1,
storeId: null,
allowManualPrice: !1,
canEditData: !0,
userProfileId: "555c43ff-c97c-43a8-8bfc-2e76e2255cc0",
userType: null,
ignoreProfileData: !1,
value: 0,
messages: [],
items: [],
selectableGifts: [],
products: [],
totalizers: [],
shippingData: {
attachmentId: "shippingData",
address: {
addressType: null,
receiverName: null,
addressId: "0e33c6c6387c4a8da1c02d80a399eed2",
postalCode: "06416070",
city: "Barueri",
state: "SP",
country: "BRA",
street: "Rua Major Álvaro Fontes",
number: null,
neighborhood: "Vila Engenho Novo",
complement: null,
reference: null,
geoCoordinates: []
},
logisticsInfo: [],
availableAddresses: [{
addressType: null,
receiverName: null,
addressId: "0e33c6c6387c4a8da1c02d80a399eed2",
postalCode: "06416070",
city: "Barueri",
state: "SP",
country: "BRA",
street: "Rua Major Álvaro Fontes",
number: null,
neighborhood: "Vila Engenho Novo",
complement: null,
reference: null,
geoCoordinates: []
}]
},
clientProfileData: {
attachmentId: "clientProfileData",
email: "rafael.cruz@corebiz.com.br",
firstName: null,
lastName: null,
document: null,
documentType: null,
phone: null,
corporateName: null,
tradeName: null,
corporateDocument: null,
stateInscription: null,
corporatePhone: null,
isCorporate: !1,
profileCompleteOnLoading: !1,
profileErrorOnLoading: !1
},
paymentData: {
installmentOptions: [{
paymentSystem: "2",
bin: null,
paymentName: null,
paymentGroupName: null,
value: 39596,
installments: [{
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596
}]
}, {
count: 2,
hasInterestRate: !1,
interestRate: 0,
value: 19798,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 2,
hasInterestRate: !1,
interestRate: 0,
value: 19798,
total: 39596
}]
}, {
count: 3,
hasInterestRate: !1,
interestRate: 0,
value: 13198,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 3,
hasInterestRate: !1,
interestRate: 0,
value: 13198,
total: 39596
}]
}, {
count: 4,
hasInterestRate: !1,
interestRate: 0,
value: 9899,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 4,
hasInterestRate: !1,
interestRate: 0,
value: 9899,
total: 39596
}]
}, {
count: 5,
hasInterestRate: !1,
interestRate: 0,
value: 7919,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 5,
hasInterestRate: !1,
interestRate: 0,
value: 7919,
total: 39596
}]
}, {
count: 6,
hasInterestRate: !1,
interestRate: 0,
value: 6599,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 6,
hasInterestRate: !1,
interestRate: 0,
value: 6599,
total: 39596
}]
}, {
count: 7,
hasInterestRate: !1,
interestRate: 0,
value: 5656,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 7,
hasInterestRate: !1,
interestRate: 0,
value: 5656,
total: 39596
}]
}, {
count: 8,
hasInterestRate: !1,
interestRate: 0,
value: 4949,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 8,
hasInterestRate: !1,
interestRate: 0,
value: 4949,
total: 39596
}]
}, {
count: 9,
hasInterestRate: !1,
interestRate: 0,
value: 4399,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 9,
hasInterestRate: !1,
interestRate: 0,
value: 4399,
total: 39596
}]
}, {
count: 10,
hasInterestRate: !1,
interestRate: 0,
value: 3959,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 10,
hasInterestRate: !1,
interestRate: 0,
value: 3959,
total: 39596
}]
}, {
count: 11,
hasInterestRate: !1,
interestRate: 0,
value: 3599,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 11,
hasInterestRate: !1,
interestRate: 0,
value: 3599,
total: 39596
}]
}, {
count: 12,
hasInterestRate: !1,
interestRate: 0,
value: 3299,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 12,
hasInterestRate: !1,
interestRate: 0,
value: 3299,
total: 39596
}]
}]
}, {
paymentSystem: "4",
bin: null,
paymentName: null,
paymentGroupName: null,
value: 39596,
installments: [{
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596
}]
}, {
count: 2,
hasInterestRate: !1,
interestRate: 0,
value: 19798,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 2,
hasInterestRate: !1,
interestRate: 0,
value: 19798,
total: 39596
}]
}, {
count: 3,
hasInterestRate: !1,
interestRate: 0,
value: 13198,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 3,
hasInterestRate: !1,
interestRate: 0,
value: 13198,
total: 39596
}]
}, {
count: 4,
hasInterestRate: !1,
interestRate: 0,
value: 9899,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 4,
hasInterestRate: !1,
interestRate: 0,
value: 9899,
total: 39596
}]
}, {
count: 5,
hasInterestRate: !1,
interestRate: 0,
value: 7919,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 5,
hasInterestRate: !1,
interestRate: 0,
value: 7919,
total: 39596
}]
}, {
count: 6,
hasInterestRate: !1,
interestRate: 0,
value: 6599,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 6,
hasInterestRate: !1,
interestRate: 0,
value: 6599,
total: 39596
}]
}, {
count: 7,
hasInterestRate: !1,
interestRate: 0,
value: 5656,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 7,
hasInterestRate: !1,
interestRate: 0,
value: 5656,
total: 39596
}]
}, {
count: 8,
hasInterestRate: !1,
interestRate: 0,
value: 4949,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 8,
hasInterestRate: !1,
interestRate: 0,
value: 4949,
total: 39596
}]
}, {
count: 9,
hasInterestRate: !1,
interestRate: 0,
value: 4399,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 9,
hasInterestRate: !1,
interestRate: 0,
value: 4399,
total: 39596
}]
}, {
count: 10,
hasInterestRate: !1,
interestRate: 0,
value: 3959,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 10,
hasInterestRate: !1,
interestRate: 0,
value: 3959,
total: 39596
}]
}, {
count: 11,
hasInterestRate: !1,
interestRate: 0,
value: 3599,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 11,
hasInterestRate: !1,
interestRate: 0,
value: 3599,
total: 39596
}]
}, {
count: 12,
hasInterestRate: !1,
interestRate: 0,
value: 3299,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 12,
hasInterestRate: !1,
interestRate: 0,
value: 3299,
total: 39596
}]
}]
}, {
paymentSystem: "16",
bin: null,
paymentName: null,
paymentGroupName: null,
value: 39596,
installments: [{
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596
}]
}]
}, {
paymentSystem: "201",
bin: null,
paymentName: null,
paymentGroupName: null,
value: 39596,
installments: [{
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596,
sellerMerchantInstallments: [{
id: "COREBIZ",
count: 1,
hasInterestRate: !1,
interestRate: 0,
value: 39596,
total: 39596
}]
}]
}],
paymentSystems: [{
id: 201,
name: "Nome da Promissória",
groupName: "custom201PaymentGroupPaymentGroup",
validator: {
regex: null,
mask: null,
cardCodeRegex: null,
cardCodeMask: null,
weights: null,
useCvv: !1,
useExpirationDate: !1,
useCardHolderName: !1,
useBillingAddress: !1
},
stringId: "201",
template: "custom201PaymentGroupPaymentGroup-template",
requiresDocument: !1,
isCustom: !0,
description: "Descrição da Promissória",
requiresAuthentication: !1,
dueDate: "2017-05-08T02:13:57.026031Z"
}, {
id: 16,
name: "Vale",
groupName: "giftCardPaymentGroup",
validator: {
regex: null,
mask: null,
cardCodeRegex: null,
cardCodeMask: null,
weights: null,
useCvv: !1,
useExpirationDate: !1,
useCardHolderName: !1,
useBillingAddress: !1
},
stringId: "16",
template: "giftCardPaymentGroup-template",
requiresDocument: !1,
isCustom: !1,
description: null,
requiresAuthentication: !1,
dueDate: "2017-05-02T02:13:57.0572039Z"
}, {
id: 2,
name: "Visa",
groupName: "creditCardPaymentGroup",
validator: {
regex: "^4",
mask: "9999 9999 9999 9999",
cardCodeRegex: "^[0-9]{3}$",
cardCodeMask: "999",
weights: [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
useCvv: !0,
useExpirationDate: !0,
useCardHolderName: !0,
useBillingAddress: !0
},
stringId: "2",
template: "creditCardPaymentGroup-template",
requiresDocument: !1,
isCustom: !1,
description: null,
requiresAuthentication: !1,
dueDate: "2017-05-04T02:13:57.0728322Z"
}, {
id: 4,
name: "Mastercard",
groupName: "creditCardPaymentGroup",
validator: {
regex: "^((5(1(0(0(0([0-9])|[1-9][0-9])|[1-9][0-9]{0})|[1-9][0-9]{0})|3(0(4(0([0-9]))|[0-3][0-9]{0}))|2[0-9]{0})|^5(3(0(4(2([0-9])|[3-9][0-9])|[5-9][0-9]{0})|[1-9][0-9]{0})|5(9(9(9([0-9])|[0-8][0-9])|[0-8][0-9]{0})|[0-8][0-9]{0})|4[0-9]{0}))|((508116)\\d{0,10})|((502121)\\d{0,10})|((589916)\\d{0,10})|(2[0-9]{15}))",
mask: "9999 9999 9999 9999",
cardCodeRegex: "^[0-9]{3}$",
cardCodeMask: "999",
weights: [2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2],
useCvv: !0,
useExpirationDate: !0,
useCardHolderName: !0,
useBillingAddress: !0
},
stringId: "4",
template: "creditCardPaymentGroup-template",
requiresDocument: !1,
isCustom: !1,
description: null,
requiresAuthentication: !1,
dueDate: "2017-05-04T02:13:57.1040339Z"
}],
payments: [],
giftCards: [],
giftCardMessages: [],
availableAccounts: [],
availableTokens: []
},
marketingData: null,
sellers: [],
clientPreferencesData: {
attachmentId: "clientPreferencesData",
locale: "pt-BR",
optinNewsLetter: null
},
storePreferencesData: {
countryCode: "BRA",
checkToSavePersonDataByDefault: !0,
templateOptions: {
toggleCorporate: !1
},
timeZone: "E. South America Standard Time",
currencyCode: "BRL",
currencyLocale: 1046,
currencySymbol: "R$",
currencyFormatInfo: {
currencyDecimalDigits: 2,
currencyDecimalSeparator: ",",
currencyGroupSeparator: ".",
currencyGroupSize: 3,
startsWithCurrencySymbol: !0
}
},
giftRegistryData: null,
openTextField: {
attachmentId: "openTextField",
value: null
},
customData: null,
hooksData: null,
ratesAndBenefitsData: null,
itemsOrdination: null
}) : t.getJSON(n.url_order_form, function(t) {
o && e(t)
}, function(t) {
o && r(t)
})
},
clear: function() {
this.list(function(t) {
t.orderFormId && (window.location.href = n.url_orderform_clear + t.orderFormId)
}, function(t) {
error_fn(t)
})
}
}
}
,
o.prototype.checkout = function() {
var t = this;
return {
saveAttachments: function(e, r, i, o, a) {
var s = "function" == typeof o && "function" == typeof a;
if (e && i && r)
return t.ajax(n.url_order_form + "/" + i + "/attachments/" + r, "POST", e, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
},
handleAddAttachmentsOpenTextField: function(r, i, o, a) {
var s = "function" == typeof o && "function" == typeof a;
if (r) {
var l = {
value: r,
expectedOrderFormSections: e
};
return t.ajax(n.url_order_form + "/" + i + n.url_attachments_openTextField, "POST", l, function(t) {
s && o(t)
}, function(t) {
s && a(t)
}, !0),
null
}
},
addAttachmentsOpenTextField: function(e, n, r) {
if (e) {
var i = "function" == typeof n && "function" == typeof r;
t.orderForm().list(function(t) {
this.handleAddAttachmentsOpenTextField(e, t.orderFormId, function(t) {
i && n(t)
}, function(t) {
i && r(t)
})
}
.bind(this), function(t) {
r(t)
})
}
},
handleAddItemAttachment: function(r, i, o, a, s, l) {
var c = "function" == typeof s && "function" == typeof l;
if (r) {
var u = {
content: r,
expectedOrderFormSections: e,
noSplitItem: !1
};
return t.ajax(n.url_order_form + "/" + a + "/items/" + o + "/attachments/" + i, "POST", u, function(t) {
c && s(t)
}, function(t) {
c && l(t)
}, !0),
null
}
},
addItemAttachment: function(e, n, r, i, o) {
if (e && n && "" !== r) {
var a = "function" == typeof i && "function" == typeof o;
t.orderForm().list(function(t) {
this.handleAddItemAttachment(e, n, r, t.orderFormId, function(t) {
a && i(t)
}, function(t) {
a && o(t)
})
}
.bind(this), function(t) {
o(t)
})
}
},
saveClientProfileData: function(e, n, r) {
if (e) {
var i = "function" == typeof n && "function" == typeof r;
t.orderForm().list(function(t) {
void 0 !== e.homePhone && (e.homePhone = "+55" + e.homePhone),
void 0 !== e.phone && (e.phone = "+55" + e.phone),
this.saveAttachments(e, "clientProfileData", t.orderFormId, function(t) {
i && n(t)
}, function(t) {
i && r(t)
})
}
.bind(this), function(t) {
r(t)
})
}
},
saveShippingData: function(n, i, o) {
if (n && n.postalCode) {
var a = "function" == typeof i && "function" == typeof o;
t.orderForm().list(function(s) {
n.addressName = n.addressName || r.getTime(),
n.addressId = n.addressId || n.addressName;
var l = {
clearAddressIfPostalCodeNotFound: !0,
address: n,
expectedOrderFormSections: e
}
, c = this;
c.saveAttachments(l, "shippingData", s.orderFormId, function(r) {
a && t.orderForm().list(function(t) {
t.shippingData.address.street ? a && i(r) : (l = {
logisticsInfo: t.shippingData.logisticsInfo,
address: n,
expectedOrderFormSections: e
},
c.saveAttachments(l, "shippingData", r.orderFormId, function(t) {
a && i(t)
}, function(t) {
a && o(t)
}))
}, function(t) {
a && o(t)
})
}, function(t) {
a && o(t)
})
}
.bind(this), function(t) {
o(t)
})
}
},
getDeliveryShipping: function(e, n) {
var r = "function" == typeof e && "function" == typeof n;
t.orderForm().list(function(t) {
r && e(t.shippingData.logisticsInfo[0])
}
.bind(this), function(t) {
n(t)
})
},
chooseDeliveryShipping: function(e, n, r) {
var i = "function" == typeof n && "function" == typeof r;
"" !== e && t.orderForm().list(function(t) {
if (t.shippingData.logisticsInfo[0]) {
var o = t.shippingData.logisticsInfo[0].slas[e];
if (o) {
var a = {
address: Object.assign({}, t.shippingData.address),
logisticsInfo: t.items.map(function(t, e) {
return {
itemIndex: e,
selectedSla: o.id
}
})
}
, s = {
attachmentId: "shippingData",
address: a.address,
logisticsInfo: a.logisticsInfo
};
this.saveAttachments(s, "shippingData", t.orderFormId, function(t) {
i && n(t)
}, function(t) {
i && r(t)
})
} else
i && n(!1)
}
i && n(t.shippingData.logisticsInfo[0])
}
.bind(this), function(t) {
r(t)
})
}
}
}
,
o.prototype.masterData = function() {
var e = this;
return {
request: function(r, i, o, a, s) {
a && (n.header["REST-range"] = "resources=" + a);
var l = n.apiMasterData + i;
t.ajax({
url: l,
data: Object.keys(r).length ? JSON.stringify(r) : "",
type: o,
headers: n.header,
success: function(t) {
s(t),
e.log("OK " + o + " -- " + l),
e.log(t)
},
error: function(t) {
s(!1, t),
e.error("Error " + o + " -- " + l),
e.error(t)
}
})
},
insert: function(t, e, n, r) {
if (!t || !Object.keys(t).length)
return void console.info("O objeto de dados esta vazio");
var i = "function" == typeof n && "function" == typeof r;
return this.request(t, e, "POST", "0-1", function(t, e) {
i && (t ? n(t || !0) : r(e))
}),
null
},
select: function(t, n, r, i, o) {
var a = "function" == typeof i && "function" == typeof o;
return this.request({}, n + e.parameters(t), "GET", r, function(t, e) {
a && (t ? i(t || !0) : o(e))
}),
null
},
update: function(t, e, n, r) {
if (!t || !Object.keys(t).length)
return void console.info("O objeto de dados esta vazio");
var i = "function" == typeof n && "function" == typeof r;
return this.request(t, e, "PATCH", "0-1", function(t, e) {
i && (t ? n(t || !0) : r(e))
}),
null
},
delete: function(t, e, n) {
var r = "function" == typeof e && "function" == typeof n;
return this.request({}, t, "DELETE", "0-1", function(t, i) {
r && (t ? e(t || !0) : n(i))
}),
null
}
}
}
,
o.prototype.newslatter = function() {
return {
send: function(e, r, o) {
var a = "function" == typeof r && "function" == typeof o;
if (e) {
var s = {};
s.newsletterClientName = i.upperAllFirstLetter(e.name),
s.newsletterClientEmail = e.email,
s.newsInternalPage = "_newsletter-vtex",
s.newsInternalPart = "newsletter",
s.newsInternalCampaign = "newsletter:opt-in",
t.ajax({
url: n.url_api_newsletter,
type: "POST",
data: s,
success: function(t) {
"true" === t ? a && r(!0) : r(!1)
},
error: function(t) {
a && o(t)
}
})
}
}
}
}
,
o.prototype.vtex = function() {
return {
dataserver: function(e, r) {
var o = "function" == typeof e && "function" == typeof r;
t.ajax({
url: n.url_api_dataserver,
type: "GET",
success: function(t) {
o && (console.log(t),
e(i.formatData(t)))
},
error: function(t) {
o && r(t)
}
})
}
}
}
;
var a, s = new o, l = {};
for (var c in s)
"function" == typeof s[c] && ("config" != c ? (a = s[c](),
l[c] = a || s[c]) : l[c] = s[c]);
window.corebiz = l
}($),
function(t, e, n, r) {
function i(e, n) {
this.settings = null,
this.options = t.extend({}, i.Defaults, n),
this.$element = t(e),
this._handlers = {},
this._plugins = {},
this._supress = {},
this._current = null,
this._speed = null,
this._coordinates = [],
this._breakpoint = null,
this._width = null,
this._items = [],
this._clones = [],
this._mergers = [],
this._widths = [],
this._invalidated = {},
this._pipe = [],
this._drag = {
time: null,
target: null,
pointer: null,
stage: {
start: null,
current: null
},
direction: null
},
this._states = {
current: {},
tags: {
initializing: ["busy"],
animating: ["busy"],
dragging: ["interacting"]
}
},
t.each(["onResize", "onThrottledResize"], t.proxy(function(e, n) {
this._handlers[n] = t.proxy(this[n], this)
}, this)),
t.each(i.Plugins, t.proxy(function(t, e) {
this._plugins[t.charAt(0).toLowerCase() + t.slice(1)] = new e(this)
}, this)),
t.each(i.Workers, t.proxy(function(e, n) {
this._pipe.push({
filter: n.filter,
run: t.proxy(n.run, this)
})
}, this)),
this.setup(),
this.initialize()
}
i.Defaults = {
items: 3,
loop: !1,
center: !1,
rewind: !1,
mouseDrag: !0,
touchDrag: !0,
pullDrag: !0,
freeDrag: !1,
margin: 0,
stagePadding: 0,
merge: !1,
mergeFit: !0,
autoWidth: !1,
startPosition: 0,
rtl: !1,
smartSpeed: 250,
fluidSpeed: !1,
dragEndSpeed: !1,
responsive: {},
responsiveRefreshRate: 200,
responsiveBaseElement: e,
fallbackEasing: "swing",
info: !1,
nestedItemSelector: !1,
itemElement: "div",
stageElement: "div",
refreshClass: "owl-refresh",
loadedClass: "owl-loaded",
loadingClass: "owl-loading",
rtlClass: "owl-rtl",
responsiveClass: "owl-responsive",
dragClass: "owl-drag",
itemClass: "owl-item",
stageClass: "owl-stage",
stageOuterClass: "owl-stage-outer",
grabClass: "owl-grab"
},
i.Width = {
Default: "default",
Inner: "inner",
Outer: "outer"
},
i.Type = {
Event: "event",
State: "state"
},
i.Plugins = {},
i.Workers = [{
filter: ["width", "settings"],
run: function() {
this._width = this.$element.width()
}
}, {
filter: ["width", "items", "settings"],
run: function(t) {
t.current = this._items && this._items[this.relative(this._current)]
}
}, {
filter: ["items", "settings"],
run: function() {
this.$stage.children(".cloned").remove()
}
}, {
filter: ["width", "items", "settings"],
run: function(t) {
var e = this.settings.margin || ""
, n = !this.settings.autoWidth
, r = this.settings.rtl
, i = {
width: "auto",
"margin-left": r ? e : "",
"margin-right": r ? "" : e
};
!n && this.$stage.children().css(i),
t.css = i
}
}, {
filter: ["width", "items", "settings"],
run: function(t) {
var e = (this.width() / this.settings.items).toFixed(3) - this.settings.margin
, n = null
, r = this._items.length
, i = !this.settings.autoWidth
, o = [];
for (t.items = {
merge: !1,
width: e
}; r--; )
n = this._mergers[r],
n = this.settings.mergeFit && Math.min(n, this.settings.items) || n,
t.items.merge = n > 1 || t.items.merge,
o[r] = i ? e * n : this._items[r].width();
this._widths = o
}
}, {
filter: ["items", "settings"],
run: function() {
var e = []
, n = this._items
, r = this.settings
, i = Math.max(2 * r.items, 4)
, o = 2 * Math.ceil(n.length / 2)
, a = r.loop && n.length ? r.rewind ? i : Math.max(i, o) : 0
, s = ""
, l = "";
for (a /= 2; a--; )
e.push(this.normalize(e.length / 2, !0)),
s += n[e[e.length - 1]][0].outerHTML,
e.push(this.normalize(n.length - 1 - (e.length - 1) / 2, !0)),
l = n[e[e.length - 1]][0].outerHTML + l;
this._clones = e,
t(s).addClass("cloned").appendTo(this.$stage),
t(l).addClass("cloned").prependTo(this.$stage)
}
}, {
filter: ["width", "items", "settings"],
run: function() {
for (var t = this.settings.rtl ? 1 : -1, e = this._clones.length + this._items.length, n = -1, r = 0, i = 0, o = []; ++n < e; )
r = o[n - 1] || 0,
i = this._widths[this.relative(n)] + this.settings.margin,
o.push(r + i * t);
this._coordinates = o
}
}, {
filter: ["width", "items", "settings"],
run: function() {
var t = this.settings.stagePadding
, e = this._coordinates
, n = {
width: Math.ceil(Math.abs(e[e.length - 1])) + 2 * t,
"padding-left": t || "",
"padding-right": t || ""
};
this.$stage.css(n)
}
}, {
filter: ["width", "items", "settings"],
run: function(t) {
var e = this._coordinates.length
, n = !this.settings.autoWidth
, r = this.$stage.children();
if (n && t.items.merge)
for (; e--; )
t.css.width = this._widths[this.relative(e)],
r.eq(e).css(t.css);
else
n && (t.css.width = t.items.width,
r.css(t.css))
}
}, {
filter: ["items"],
run: function() {
this._coordinates.length < 1 && this.$stage.removeAttr("style")
}
}, {
filter: ["width", "items", "settings"],
run: function(t) {
t.current = t.current ? this.$stage.children().index(t.current) : 0,
t.current = Math.max(this.minimum(), Math.min(this.maximum(), t.current)),
this.reset(t.current)
}
}, {
filter: ["position"],
run: function() {
this.animate(this.coordinates(this._current))
}
}, {
filter: ["width", "position", "items", "settings"],
run: function() {
var t, e, n, r, i = this.settings.rtl ? 1 : -1, o = 2 * this.settings.stagePadding, a = this.coordinates(this.current()) + o, s = a + this.width() * i, l = [];
for (n = 0,
r = this._coordinates.length; r > n; n++)
t = this._coordinates[n - 1] || 0,
e = Math.abs(this._coordinates[n]) + o * i,
(this.op(t, "<=", a) && this.op(t, ">", s) || this.op(e, "<", a) && this.op(e, ">", s)) && l.push(n);
this.$stage.children(".active").removeClass("active"),
this.$stage.children(":eq(" + l.join("), :eq(") + ")").addClass("active"),
this.settings.center && (this.$stage.children(".center").removeClass("center"),
this.$stage.children().eq(this.current()).addClass("center"))
}
}],
i.prototype.initialize = function() {
if (this.enter("initializing"),
this.trigger("initialize"),
this.$element.toggleClass(this.settings.rtlClass, this.settings.rtl),
this.settings.autoWidth && !this.is("pre-loading")) {
var e, n, i;
e = this.$element.find("img"),
n = this.settings.nestedItemSelector ? "." + this.settings.nestedItemSelector : r,
i = this.$element.children(n).width(),
e.length && 0 >= i && this.preloadAutoWidthImages(e)
}
this.$element.addClass(this.options.loadingClass),
this.$stage = t("<" + this.settings.stageElement + ' class="' + this.settings.stageClass + '"/>').wrap('<div class="' + this.settings.stageOuterClass + '"/>'),
this.$element.append(this.$stage.parent()),
this.replace(this.$element.children().not(this.$stage.parent())),
this.$element.is(":visible") ? this.refresh() : this.invalidate("width"),
this.$element.removeClass(this.options.loadingClass).addClass(this.options.loadedClass),
this.registerEventHandlers(),
this.leave("initializing"),
this.trigger("initialized")
}
,
i.prototype.setup = function() {
var e = this.viewport()
, n = this.options.responsive
, r = -1
, i = null;
n ? (t.each(n, function(t) {
e >= t && t > r && (r = Number(t))
}),
i = t.extend({}, this.options, n[r]),
"function" == typeof i.stagePadding && (i.stagePadding = i.stagePadding()),
delete i.responsive,
i.responsiveClass && this.$element.attr("class", this.$element.attr("class").replace(new RegExp("(" + this.options.responsiveClass + "-)\\S+\\s","g"), "$1" + r))) : i = t.extend({}, this.options),
this.trigger("change", {
property: {
name: "settings",
value: i
}
}),
this._breakpoint = r,
this.settings = i,
this.invalidate("settings"),
this.trigger("changed", {
property: {
name: "settings",
value: this.settings
}
})
}
,
i.prototype.optionsLogic = function() {
this.settings.autoWidth && (this.settings.stagePadding = !1,
this.settings.merge = !1)
}
,
i.prototype.prepare = function(e) {
var n = this.trigger("prepare", {
content: e
});
return n.data || (n.data = t("<" + this.settings.itemElement + "/>").addClass(this.options.itemClass).append(e)),
this.trigger("prepared", {
content: n.data
}),
n.data
}
,
i.prototype.update = function() {
for (var e = 0, n = this._pipe.length, r = t.proxy(function(t) {
return this[t]
}, this._invalidated), i = {}; n > e; )
(this._invalidated.all || t.grep(this._pipe[e].filter, r).length > 0) && this._pipe[e].run(i),
e++;
this._invalidated = {},
!this.is("valid") && this.enter("valid")
}
,
i.prototype.width = function(t) {
switch (t = t || i.Width.Default) {
case i.Width.Inner:
case i.Width.Outer:
return this._width;
default:
return this._width - 2 * this.settings.stagePadding + this.settings.margin
}
}
,
i.prototype.refresh = function() {
this.enter("refreshing"),
this.trigger("refresh"),
this.setup(),
this.optionsLogic(),
this.$element.addClass(this.options.refreshClass),
this.update(),
this.$element.removeClass(this.options.refreshClass),
this.leave("refreshing"),
this.trigger("refreshed")
}
,
i.prototype.onThrottledResize = function() {
e.clearTimeout(this.resizeTimer),
this.resizeTimer = e.setTimeout(this._handlers.onResize, this.settings.responsiveRefreshRate)
}
,
i.prototype.onResize = function() {
return !!this._items.length && (this._width !== this.$element.width() && (!!this.$element.is(":visible") && (this.enter("resizing"),
this.trigger("resize").isDefaultPrevented() ? (this.leave("resizing"),
!1) : (this.invalidate("width"),
this.refresh(),
this.leave("resizing"),
void this.trigger("resized")))))
}
,
i.prototype.registerEventHandlers = function() {
t.support.transition && this.$stage.on(t.support.transition.end + ".owl.core", t.proxy(this.onTransitionEnd, this)),
!1 !== this.settings.responsive && this.on(e, "resize", this._handlers.onThrottledResize),
this.settings.mouseDrag && (this.$element.addClass(this.options.dragClass),
this.$stage.on("mousedown.owl.core", t.proxy(this.onDragStart, this)),
this.$stage.on("dragstart.owl.core selectstart.owl.core", function() {
return !1
})),
this.settings.touchDrag && (this.$stage.on("touchstart.owl.core", t.proxy(this.onDragStart, this)),
this.$stage.on("touchcancel.owl.core", t.proxy(this.onDragEnd, this)))
}
,
i.prototype.onDragStart = function(e) {
var r = null;
3 !== e.which && (t.support.transform ? (r = this.$stage.css("transform").replace(/.*\(|\)| /g, "").split(","),
r = {
x: r[16 === r.length ? 12 : 4],
y: r[16 === r.length ? 13 : 5]
}) : (r = this.$stage.position(),
r = {
x: this.settings.rtl ? r.left + this.$stage.width() - this.width() + this.settings.margin : r.left,
y: r.top
}),
this.is("animating") && (t.support.transform ? this.animate(r.x) : this.$stage.stop(),
this.invalidate("position")),
this.$element.toggleClass(this.options.grabClass, "mousedown" === e.type),
this.speed(0),
this._drag.time = (new Date).getTime(),
this._drag.target = t(e.target),
this._drag.stage.start = r,
this._drag.stage.current = r,
this._drag.pointer = this.pointer(e),
t(n).on("mouseup.owl.core touchend.owl.core", t.proxy(this.onDragEnd, this)),
t(n).one("mousemove.owl.core touchmove.owl.core", t.proxy(function(e) {
var r = this.difference(this._drag.pointer, this.pointer(e));
t(n).on("mousemove.owl.core touchmove.owl.core", t.proxy(this.onDragMove, this)),
Math.abs(r.x) < Math.abs(r.y) && this.is("valid") || (e.preventDefault(),
this.enter("dragging"),
this.trigger("drag"))
}, this)))
}
,
i.prototype.onDragMove = function(t) {
var e = null
, n = null
, r = null
, i = this.difference(this._drag.pointer, this.pointer(t))
, o = this.difference(this._drag.stage.start, i);
this.is("dragging") && (t.preventDefault(),
this.settings.loop ? (e = this.coordinates(this.minimum()),
n = this.coordinates(this.maximum() + 1) - e,
o.x = ((o.x - e) % n + n) % n + e) : (e = this.settings.rtl ? this.coordinates(this.maximum()) : this.coordinates(this.minimum()),
n = this.settings.rtl ? this.coordinates(this.minimum()) : this.coordinates(this.maximum()),
r = this.settings.pullDrag ? -1 * i.x / 5 : 0,
o.x = Math.max(Math.min(o.x, e + r), n + r)),
this._drag.stage.current = o,
this.animate(o.x))
}
,
i.prototype.onDragEnd = function(e) {
var r = this.difference(this._drag.pointer, this.pointer(e))
, i = this._drag.stage.current
, o = r.x > 0 ^ this.settings.rtl ? "left" : "right";
t(n).off(".owl.core"),
this.$element.removeClass(this.options.grabClass),
(0 !== r.x && this.is("dragging") || !this.is("valid")) && (this.speed(this.settings.dragEndSpeed || this.settings.smartSpeed),
this.current(this.closest(i.x, 0 !== r.x ? o : this._drag.direction)),
this.invalidate("position"),
this.update(),
this._drag.direction = o,
(Math.abs(r.x) > 3 || (new Date).getTime() - this._drag.time > 300) && this._drag.target.one("click.owl.core", function() {
return !1
})),
this.is("dragging") && (this.leave("dragging"),
this.trigger("dragged"))
}
,
i.prototype.closest = function(e, n) {
var r = -1
, i = 30
, o = this.width()
, a = this.coordinates();
return this.settings.freeDrag || t.each(a, t.proxy(function(t, s) {
return "left" === n && e > s - i && s + i > e ? r = t : "right" === n && e > s - o - i && s - o + i > e ? r = t + 1 : this.op(e, "<", s) && this.op(e, ">", a[t + 1] || s - o) && (r = "left" === n ? t + 1 : t),
-1 === r
}, this)),
this.settings.loop || (this.op(e, ">", a[this.minimum()]) ? r = e = this.minimum() : this.op(e, "<", a[this.maximum()]) && (r = e = this.maximum())),
r
}
,
i.prototype.animate = function(e) {
var n = this.speed() > 0;
this.is("animating") && this.onTransitionEnd(),
n && (this.enter("animating"),
this.trigger("translate")),
t.support.transform3d && t.support.transition ? this.$stage.css({
transform: "translate3d(" + e + "px,0px,0px)",
transition: this.speed() / 1e3 + "s"
}) : n ? this.$stage.animate({
left: e + "px"
}, this.speed(), this.settings.fallbackEasing, t.proxy(this.onTransitionEnd, this)) : this.$stage.css({
left: e + "px"
})
}
,
i.prototype.is = function(t) {
return this._states.current[t] && this._states.current[t] > 0
}
,
i.prototype.current = function(t) {
if (t === r)
return this._current;
if (0 === this._items.length)
return r;
if (t = this.normalize(t),
this._current !== t) {
var e = this.trigger("change", {
property: {
name: "position",
value: t
}
});
e.data !== r && (t = this.normalize(e.data)),
this._current = t,
this.invalidate("position"),
this.trigger("changed", {
property: {
name: "position",
value: this._current
}
})
}
return this._current
}
,
i.prototype.invalidate = function(e) {
return "string" === t.type(e) && (this._invalidated[e] = !0,
this.is("valid") && this.leave("valid")),
t.map(this._invalidated, function(t, e) {
return e
})
}
,
i.prototype.reset = function(t) {
(t = this.normalize(t)) !== r && (this._speed = 0,
this._current = t,
this.suppress(["translate", "translated"]),
this.animate(this.coordinates(t)),
this.release(["translate", "translated"]))
}
,
i.prototype.normalize = function(t, e) {
var n = this._items.length
, i = e ? 0 : this._clones.length;
return !this.isNumeric(t) || 1 > n ? t = r : (0 > t || t >= n + i) && (t = ((t - i / 2) % n + n) % n + i / 2),
t
}
,
i.prototype.relative = function(t) {
return t -= this._clones.length / 2,
this.normalize(t, !0)
}
,
i.prototype.maximum = function(t) {
var e, n, r, i = this.settings, o = this._coordinates.length;
if (i.loop)
o = this._clones.length / 2 + this._items.length - 1;
else if (i.autoWidth || i.merge) {
for (e = this._items.length,
n = this._items[--e].width(),
r = this.$element.width(); e-- && !((n += this._items[e].width() + this.settings.margin) > r); )
;
o = e + 1
} else
o = i.center ? this._items.length - 1 : this._items.length - i.items;
return t && (o -= this._clones.length / 2),
Math.max(o, 0)
}
,
i.prototype.minimum = function(t) {
return t ? 0 : this._clones.length / 2
}
,
i.prototype.items = function(t) {
return t === r ? this._items.slice() : (t = this.normalize(t, !0),
this._items[t])
}
,
i.prototype.mergers = function(t) {
return t === r ? this._mergers.slice() : (t = this.normalize(t, !0),
this._mergers[t])
}
,
i.prototype.clones = function(e) {
var n = this._clones.length / 2
, i = n + this._items.length
, o = function(t) {
return t % 2 == 0 ? i + t / 2 : n - (t + 1) / 2
};
return e === r ? t.map(this._clones, function(t, e) {
return o(e)
}) : t.map(this._clones, function(t, n) {
return t === e ? o(n) : null
})
}
,
i.prototype.speed = function(t) {
return t !== r && (this._speed = t),
this._speed
}
,
i.prototype.coordinates = function(e) {
var n, i = 1, o = e - 1;
return e === r ? t.map(this._coordinates, t.proxy(function(t, e) {
return this.coordinates(e)
}, this)) : (this.settings.center ? (this.settings.rtl && (i = -1,
o = e + 1),
n = this._coordinates[e],
n += (this.width() - n + (this._coordinates[o] || 0)) / 2 * i) : n = this._coordinates[o] || 0,
n = Math.ceil(n))
}
,
i.prototype.duration = function(t, e, n) {
return 0 === n ? 0 : Math.min(Math.max(Math.abs(e - t), 1), 6) * Math.abs(n || this.settings.smartSpeed)
}
,
i.prototype.to = function(t, e) {
var n = this.current()
, r = null
, i = t - this.relative(n)
, o = (i > 0) - (0 > i)
, a = this._items.length
, s = this.minimum()
, l = this.maximum();
this.settings.loop ? (!this.settings.rewind && Math.abs(i) > a / 2 && (i += -1 * o * a),
t = n + i,
(r = ((t - s) % a + a) % a + s) !== t && l >= r - i && r - i > 0 && (n = r - i,
t = r,
this.reset(n))) : this.settings.rewind ? (l += 1,
t = (t % l + l) % l) : t = Math.max(s, Math.min(l, t)),
this.speed(this.duration(n, t, e)),
this.current(t),
this.$element.is(":visible") && this.update()
}
,
i.prototype.next = function(t) {
t = t || !1,
this.to(this.relative(this.current()) + 1, t)
}
,
i.prototype.prev = function(t) {
t = t || !1,
this.to(this.relative(this.current()) - 1, t)
}
,
i.prototype.onTransitionEnd = function(t) {
return (t === r || (t.stopPropagation(),
(t.target || t.srcElement || t.originalTarget) === this.$stage.get(0))) && (this.leave("animating"),
void this.trigger("translated"))
}
,
i.prototype.viewport = function() {
var r;
if (this.options.responsiveBaseElement !== e)
r = t(this.options.responsiveBaseElement).width();
else if (e.innerWidth)
r = e.innerWidth;
else {
if (!n.documentElement || !n.documentElement.clientWidth)
throw "Can not detect viewport width.";
r = n.documentElement.clientWidth
}
return r
}
,
i.prototype.replace = function(e) {
this.$stage.empty(),
this._items = [],
e && (e = e instanceof jQuery ? e : t(e)),
this.settings.nestedItemSelector && (e = e.find("." + this.settings.nestedItemSelector)),
e.filter(function() {
return 1 === this.nodeType
}).each(t.proxy(function(t, e) {
e = this.prepare(e),
this.$stage.append(e),
this._items.push(e),
this._mergers.push(1 * e.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)
}, this)),
this.reset(this.isNumeric(this.settings.startPosition) ? this.settings.startPosition : 0),
this.invalidate("items")
}
,
i.prototype.add = function(e, n) {
var i = this.relative(this._current);
n = n === r ? this._items.length : this.normalize(n, !0),
e = e instanceof jQuery ? e : t(e),
this.trigger("add", {
content: e,
position: n
}),
e = this.prepare(e),
0 === this._items.length || n === this._items.length ? (0 === this._items.length && this.$stage.append(e),
0 !== this._items.length && this._items[n - 1].after(e),
this._items.push(e),
this._mergers.push(1 * e.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)) : (this._items[n].before(e),
this._items.splice(n, 0, e),
this._mergers.splice(n, 0, 1 * e.find("[data-merge]").addBack("[data-merge]").attr("data-merge") || 1)),
this._items[i] && this.reset(this._items[i].index()),
this.invalidate("items"),
this.trigger("added", {
content: e,
position: n
})
}
,
i.prototype.remove = function(t) {
(t = this.normalize(t, !0)) !== r && (this.trigger("remove", {
content: this._items[t],
position: t
}),
this._items[t].remove(),
this._items.splice(t, 1),
this._mergers.splice(t, 1),
this.invalidate("items"),
this.trigger("removed", {
content: null,
position: t
}))
}
,
i.prototype.preloadAutoWidthImages = function(e) {
e.each(t.proxy(function(e, n) {
this.enter("pre-loading"),
n = t(n),
t(new Image).one("load", t.proxy(function(t) {
n.attr("src", t.target.src),
n.css("opacity", 1),
this.leave("pre-loading"),
!this.is("pre-loading") && !this.is("initializing") && this.refresh()
}, this)).attr("src", n.attr("src") || n.attr("data-src") || n.attr("data-src-retina"))
}, this))
}
,
i.prototype.destroy = function() {
this.$element.off(".owl.core"),
this.$stage.off(".owl.core"),
t(n).off(".owl.core"),
!1 !== this.settings.responsive && (e.clearTimeout(this.resizeTimer),
this.off(e, "resize", this._handlers.onThrottledResize));
for (var r in this._plugins)
this._plugins[r].destroy();
this.$stage.children(".cloned").remove(),
this.$stage.unwrap(),
this.$stage.children().contents().unwrap(),
this.$stage.children().unwrap(),
this.$element.removeClass(this.options.refreshClass).removeClass(this.options.loadingClass).removeClass(this.options.loadedClass).removeClass(this.options.rtlClass).removeClass(this.options.dragClass).removeClass(this.options.grabClass).attr("class", this.$element.attr("class").replace(new RegExp(this.options.responsiveClass + "-\\S+\\s","g"), "")).removeData("owl.carousel")
}
,
i.prototype.op = function(t, e, n) {
var r = this.settings.rtl;
switch (e) {
case "<":
return r ? t > n : n > t;
case ">":
return r ? n > t : t > n;
case ">=":
return r ? n >= t : t >= n;
case "<=":
return r ? t >= n : n >= t
}
}
,
i.prototype.on = function(t, e, n, r) {
t.addEventListener ? t.addEventListener(e, n, r) : t.attachEvent && t.attachEvent("on" + e, n)
}
,
i.prototype.off = function(t, e, n, r) {
t.removeEventListener ? t.removeEventListener(e, n, r) : t.detachEvent && t.detachEvent("on" + e, n)
}
,
i.prototype.trigger = function(e, n, r, o, a) {
var s = {
item: {
count: this._items.length,
index: this.current()
}
}
, l = t.camelCase(t.grep(["on", e, r], function(t) {
return t
}).join("-").toLowerCase())
, c = t.Event([e, "owl", r || "carousel"].join(".").toLowerCase(), t.extend({
relatedTarget: this
}, s, n));
return this._supress[e] || (t.each(this._plugins, function(t, e) {
e.onTrigger && e.onTrigger(c)
}),
this.register({
type: i.Type.Event,
name: e
}),
this.$element.trigger(c),
this.settings && "function" == typeof this.settings[l] && this.settings[l].call(this, c)),
c
}
,
i.prototype.enter = function(e) {
t.each([e].concat(this._states.tags[e] || []), t.proxy(function(t, e) {
this._states.current[e] === r && (this._states.current[e] = 0),
this._states.current[e]++
}, this))
}
,
i.prototype.leave = function(e) {
t.each([e].concat(this._states.tags[e] || []), t.proxy(function(t, e) {
this._states.current[e]--
}, this))
}
,
i.prototype.register = function(e) {
if (e.type === i.Type.Event) {
if (t.event.special[e.name] || (t.event.special[e.name] = {}),
!t.event.special[e.name].owl) {
var n = t.event.special[e.name]._default;
t.event.special[e.name]._default = function(t) {
return !n || !n.apply || t.namespace && -1 !== t.namespace.indexOf("owl") ? t.namespace && t.namespace.indexOf("owl") > -1 : n.apply(this, arguments)
}
,
t.event.special[e.name].owl = !0
}
} else
e.type === i.Type.State && (this._states.tags[e.name] ? this._states.tags[e.name] = this._states.tags[e.name].concat(e.tags) : this._states.tags[e.name] = e.tags,
this._states.tags[e.name] = t.grep(this._states.tags[e.name], t.proxy(function(n, r) {
return t.inArray(n, this._states.tags[e.name]) === r
}, this)))
}
,
i.prototype.suppress = function(e) {
t.each(e, t.proxy(function(t, e) {
this._supress[e] = !0
}, this))
}
,
i.prototype.release = function(e) {
t.each(e, t.proxy(function(t, e) {
delete this._supress[e]
}, this))
}
,
i.prototype.pointer = function(t) {
var n = {
x: null,
y: null
};
return t = t.originalEvent || t || e.event,
t = t.touches && t.touches.length ? t.touches[0] : t.changedTouches && t.changedTouches.length ? t.changedTouches[0] : t,
t.pageX ? (n.x = t.pageX,
n.y = t.pageY) : (n.x = t.clientX,
n.y = t.clientY),
n
}
,
i.prototype.isNumeric = function(t) {
return !isNaN(parseFloat(t))
}
,
i.prototype.difference = function(t, e) {
return {
x: t.x - e.x,
y: t.y - e.y
}
}
,
t.fn.owlCarousel = function(e) {
var n = Array.prototype.slice.call(arguments, 1);
return this.each(function() {
var r = t(this)
, o = r.data("owl.carousel");
o || (o = new i(this,"object" == typeof e && e),
r.data("owl.carousel", o),
t.each(["next", "prev", "to", "destroy", "refresh", "replace", "add", "remove"], function(e, n) {
o.register({
type: i.Type.Event,
name: n
}),
o.$element.on(n + ".owl.carousel.core", t.proxy(function(t) {
t.namespace && t.relatedTarget !== this && (this.suppress([n]),
o[n].apply(this, [].slice.call(arguments, 1)),
this.release([n]))
}, o))
})),
"string" == typeof e && "_" !== e.charAt(0) && o[e].apply(o, n)
})
}
,
t.fn.owlCarousel.Constructor = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this._core = e,
this._interval = null,
this._visible = null,
this._handlers = {
"initialized.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.autoRefresh && this.watch()
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this._core.$element.on(this._handlers)
};
i.Defaults = {
autoRefresh: !0,
autoRefreshInterval: 500
},
i.prototype.watch = function() {
this._interval || (this._visible = this._core.$element.is(":visible"),
this._interval = e.setInterval(t.proxy(this.refresh, this), this._core.settings.autoRefreshInterval))
}
,
i.prototype.refresh = function() {
this._core.$element.is(":visible") !== this._visible && (this._visible = !this._visible,
this._core.$element.toggleClass("owl-hidden", !this._visible),
this._visible && this._core.invalidate("width") && this._core.refresh())
}
,
i.prototype.destroy = function() {
var t, n;
e.clearInterval(this._interval);
for (t in this._handlers)
this._core.$element.off(t, this._handlers[t]);
for (n in Object.getOwnPropertyNames(this))
"function" != typeof this[n] && (this[n] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.AutoRefresh = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this._core = e,
this._loaded = [],
this._handlers = {
"initialized.owl.carousel change.owl.carousel resized.owl.carousel": t.proxy(function(e) {
if (e.namespace && this._core.settings && this._core.settings.lazyLoad && (e.property && "position" == e.property.name || "initialized" == e.type))
for (var n = this._core.settings, i = n.center && Math.ceil(n.items / 2) || n.items, o = n.center && -1 * i || 0, a = (e.property && e.property.value !== r ? e.property.value : this._core.current()) + o, s = this._core.clones().length, l = t.proxy(function(t, e) {
this.load(e)
}, this); o++ < i; )
this.load(s / 2 + this._core.relative(a)),
s && t.each(this._core.clones(this._core.relative(a)), l),
a++
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this._core.$element.on(this._handlers)
};
i.Defaults = {
lazyLoad: !1
},
i.prototype.load = function(n) {
var r = this._core.$stage.children().eq(n)
, i = r && r.find(".owl-lazy");
!i || t.inArray(r.get(0), this._loaded) > -1 || (i.each(t.proxy(function(n, r) {
var i, o = t(r), a = e.devicePixelRatio > 1 && o.attr("data-src-retina") || o.attr("data-src");
this._core.trigger("load", {
element: o,
url: a
}, "lazy"),
o.is("img") ? o.one("load.owl.lazy", t.proxy(function() {
o.css("opacity", 1),
this._core.trigger("loaded", {
element: o,
url: a
}, "lazy")
}, this)).attr("src", a) : (i = new Image,
i.onload = t.proxy(function() {
o.css({
"background-image": "url(" + a + ")",
opacity: "1"
}),
this._core.trigger("loaded", {
element: o,
url: a
}, "lazy")
}, this),
i.src = a)
}, this)),
this._loaded.push(r.get(0)))
}
,
i.prototype.destroy = function() {
var t, e;
for (t in this.handlers)
this._core.$element.off(t, this.handlers[t]);
for (e in Object.getOwnPropertyNames(this))
"function" != typeof this[e] && (this[e] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.Lazy = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this._core = e,
this._handlers = {
"initialized.owl.carousel refreshed.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.autoHeight && this.update()
}, this),
"changed.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.autoHeight && "position" == t.property.name && this.update()
}, this),
"loaded.owl.lazy": t.proxy(function(t) {
t.namespace && this._core.settings.autoHeight && t.element.closest("." + this._core.settings.itemClass).index() === this._core.current() && this.update()
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this._core.$element.on(this._handlers)
};
i.Defaults = {
autoHeight: !1,
autoHeightClass: "owl-height"
},
i.prototype.update = function() {
var e = this._core._current
, n = e + this._core.settings.items
, r = this._core.$stage.children().toArray().slice(e, n)
, i = []
, o = 0;
t.each(r, function(e, n) {
i.push(t(n).height())
}),
o = Math.max.apply(null, i),
this._core.$stage.parent().height(o).addClass(this._core.settings.autoHeightClass)
}
,
i.prototype.destroy = function() {
var t, e;
for (t in this._handlers)
this._core.$element.off(t, this._handlers[t]);
for (e in Object.getOwnPropertyNames(this))
"function" != typeof this[e] && (this[e] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.AutoHeight = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this._core = e,
this._videos = {},
this._playing = null,
this._handlers = {
"initialized.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.register({
type: "state",
name: "playing",
tags: ["interacting"]
})
}, this),
"resize.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.video && this.isInFullScreen() && t.preventDefault()
}, this),
"refreshed.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.is("resizing") && this._core.$stage.find(".cloned .owl-video-frame").remove()
}, this),
"changed.owl.carousel": t.proxy(function(t) {
t.namespace && "position" === t.property.name && this._playing && this.stop()
}, this),
"prepared.owl.carousel": t.proxy(function(e) {
if (e.namespace) {
var n = t(e.content).find(".owl-video");
n.length && (n.css("display", "none"),
this.fetch(n, t(e.content)))
}
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this._core.$element.on(this._handlers),
this._core.$element.on("click.owl.video", ".owl-video-play-icon", t.proxy(function(t) {
this.play(t)
}, this))
};
i.Defaults = {
video: !1,
videoHeight: !1,
videoWidth: !1
},
i.prototype.fetch = function(t, e) {
var n = function() {
return t.attr("data-vimeo-id") ? "vimeo" : t.attr("data-vzaar-id") ? "vzaar" : "youtube"
}()
, r = t.attr("data-vimeo-id") || t.attr("data-youtube-id") || t.attr("data-vzaar-id")
, i = t.attr("data-width") || this._core.settings.videoWidth
, o = t.attr("data-height") || this._core.settings.videoHeight
, a = t.attr("href");
if (!a)
throw new Error("Missing video URL.");
if (r = a.match(/(http:|https:|)\/\/(player.|www.|app.)?(vimeo\.com|youtu(be\.com|\.be|be\.googleapis\.com)|vzaar\.com)\/(video\/|videos\/|embed\/|channels\/.+\/|groups\/.+\/|watch\?v=|v\/)?([A-Za-z0-9._%-]*)(\&\S+)?/),
r[3].indexOf("youtu") > -1)
n = "youtube";
else if (r[3].indexOf("vimeo") > -1)
n = "vimeo";
else {
if (!(r[3].indexOf("vzaar") > -1))
throw new Error("Video URL not supported.");
n = "vzaar"
}
r = r[6],
this._videos[a] = {
type: n,
id: r,
width: i,
height: o
},
e.attr("data-video", a),
this.thumbnail(t, this._videos[a])
}
,
i.prototype.thumbnail = function(e, n) {
var r, i, o, a = n.width && n.height ? 'style="width:' + n.width + "px;height:" + n.height + 'px;"' : "", s = e.find("img"), l = "src", c = "", u = this._core.settings, p = function(t) {
i = '<div class="owl-video-play-icon"></div>',
r = u.lazyLoad ? '<div class="owl-video-tn ' + c + '" ' + l + '="' + t + '"></div>' : '<div class="owl-video-tn" style="opacity:1;background-image:url(' + t + ')"></div>',
e.after(r),
e.after(i)
};
return e.wrap('<div class="owl-video-wrapper"' + a + "></div>"),
this._core.settings.lazyLoad && (l = "data-src",
c = "owl-lazy"),
s.length ? (p(s.attr(l)),
s.remove(),
!1) : void ("youtube" === n.type ? (o = "//img.youtube.com/vi/" + n.id + "/hqdefault.jpg",
p(o)) : "vimeo" === n.type ? t.ajax({
type: "GET",
url: "//vimeo.com/api/v2/video/" + n.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function(t) {
o = t[0].thumbnail_large,
p(o)
}
}) : "vzaar" === n.type && t.ajax({
type: "GET",
url: "//vzaar.com/api/videos/" + n.id + ".json",
jsonp: "callback",
dataType: "jsonp",
success: function(t) {
o = t.framegrab_url,
p(o)
}
}))
}
,
i.prototype.stop = function() {
this._core.trigger("stop", null, "video"),
this._playing.find(".owl-video-frame").remove(),
this._playing.removeClass("owl-video-playing"),
this._playing = null,
this._core.leave("playing"),
this._core.trigger("stopped", null, "video")
}
,
i.prototype.play = function(e) {
var n, r = t(e.target), i = r.closest("." + this._core.settings.itemClass), o = this._videos[i.attr("data-video")], a = o.width || "100%", s = o.height || this._core.$stage.height();
this._playing || (this._core.enter("playing"),
this._core.trigger("play", null, "video"),
i = this._core.items(this._core.relative(i.index())),
this._core.reset(i.index()),
"youtube" === o.type ? n = '<iframe width="' + a + '" height="' + s + '" src="//www.youtube.com/embed/' + o.id + "?autoplay=1&v=" + o.id + '" frameborder="0" allowfullscreen></iframe>' : "vimeo" === o.type ? n = '<iframe src="//player.vimeo.com/video/' + o.id + '?autoplay=1" width="' + a + '" height="' + s + '" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>' : "vzaar" === o.type && (n = '<iframe frameborder="0"height="' + s + '"width="' + a + '" allowfullscreen mozallowfullscreen webkitAllowFullScreen src="//view.vzaar.com/' + o.id + '/player?autoplay=true"></iframe>'),
t('<div class="owl-video-frame">' + n + "</div>").insertAfter(i.find(".owl-video")),
this._playing = i.addClass("owl-video-playing"))
}
,
i.prototype.isInFullScreen = function() {
var e = n.fullscreenElement || n.mozFullScreenElement || n.webkitFullscreenElement;
return e && t(e).parent().hasClass("owl-video-frame")
}
,
i.prototype.destroy = function() {
var t, e;
this._core.$element.off("click.owl.video");
for (t in this._handlers)
this._core.$element.off(t, this._handlers[t]);
for (e in Object.getOwnPropertyNames(this))
"function" != typeof this[e] && (this[e] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.Video = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this.core = e,
this.core.options = t.extend({}, i.Defaults, this.core.options),
this.swapping = !0,
this.previous = r,
this.next = r,
this.handlers = {
"change.owl.carousel": t.proxy(function(t) {
t.namespace && "position" == t.property.name && (this.previous = this.core.current(),
this.next = t.property.value)
}, this),
"drag.owl.carousel dragged.owl.carousel translated.owl.carousel": t.proxy(function(t) {
t.namespace && (this.swapping = "translated" == t.type)
}, this),
"translate.owl.carousel": t.proxy(function(t) {
t.namespace && this.swapping && (this.core.options.animateOut || this.core.options.animateIn) && this.swap()
}, this)
},
this.core.$element.on(this.handlers)
};
i.Defaults = {
animateOut: !1,
animateIn: !1
},
i.prototype.swap = function() {
if (1 === this.core.settings.items && t.support.animation && t.support.transition) {
this.core.speed(0);
var e, n = t.proxy(this.clear, this), r = this.core.$stage.children().eq(this.previous), i = this.core.$stage.children().eq(this.next), o = this.core.settings.animateIn, a = this.core.settings.animateOut;
this.core.current() !== this.previous && (a && (e = this.core.coordinates(this.previous) - this.core.coordinates(this.next),
r.one(t.support.animation.end, n).css({
left: e + "px"
}).addClass("animated owl-animated-out").addClass(a)),
o && i.one(t.support.animation.end, n).addClass("animated owl-animated-in").addClass(o))
}
}
,
i.prototype.clear = function(e) {
t(e.target).css({
left: ""
}).removeClass("animated owl-animated-out owl-animated-in").removeClass(this.core.settings.animateIn).removeClass(this.core.settings.animateOut),
this.core.onTransitionEnd()
}
,
i.prototype.destroy = function() {
var t, e;
for (t in this.handlers)
this.core.$element.off(t, this.handlers[t]);
for (e in Object.getOwnPropertyNames(this))
"function" != typeof this[e] && (this[e] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.Animate = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
var i = function(e) {
this._core = e,
this._timeout = null,
this._paused = !1,
this._handlers = {
"changed.owl.carousel": t.proxy(function(t) {
t.namespace && "settings" === t.property.name ? this._core.settings.autoplay ? this.play() : this.stop() : t.namespace && "position" === t.property.name && this._core.settings.autoplay && this._setAutoPlayInterval()
}, this),
"initialized.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.autoplay && this.play()
}, this),
"play.owl.autoplay": t.proxy(function(t, e, n) {
t.namespace && this.play(e, n)
}, this),
"stop.owl.autoplay": t.proxy(function(t) {
t.namespace && this.stop()
}, this),
"mouseover.owl.autoplay": t.proxy(function() {
this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause()
}, this),
"mouseleave.owl.autoplay": t.proxy(function() {
this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.play()
}, this),
"touchstart.owl.core": t.proxy(function() {
this._core.settings.autoplayHoverPause && this._core.is("rotating") && this.pause()
}, this),
"touchend.owl.core": t.proxy(function() {
this._core.settings.autoplayHoverPause && this.play()
}, this)
},
this._core.$element.on(this._handlers),
this._core.options = t.extend({}, i.Defaults, this._core.options)
};
i.Defaults = {
autoplay: !1,
autoplayTimeout: 5e3,
autoplayHoverPause: !1,
autoplaySpeed: !1
},
i.prototype.play = function(t, e) {
this._paused = !1,
this._core.is("rotating") || (this._core.enter("rotating"),
this._setAutoPlayInterval())
}
,
i.prototype._getNextTimeout = function(r, i) {
return this._timeout && e.clearTimeout(this._timeout),
e.setTimeout(t.proxy(function() {
this._paused || this._core.is("busy") || this._core.is("interacting") || n.hidden || this._core.next(i || this._core.settings.autoplaySpeed)
}, this), r || this._core.settings.autoplayTimeout)
}
,
i.prototype._setAutoPlayInterval = function() {
this._timeout = this._getNextTimeout()
}
,
i.prototype.stop = function() {
this._core.is("rotating") && (e.clearTimeout(this._timeout),
this._core.leave("rotating"))
}
,
i.prototype.pause = function() {
this._core.is("rotating") && (this._paused = !0)
}
,
i.prototype.destroy = function() {
var t, e;
this.stop();
for (t in this._handlers)
this._core.$element.off(t, this._handlers[t]);
for (e in Object.getOwnPropertyNames(this))
"function" != typeof this[e] && (this[e] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.autoplay = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
"use strict";
var i = function(e) {
this._core = e,
this._initialized = !1,
this._pages = [],
this._controls = {},
this._templates = [],
this.$element = this._core.$element,
this._overrides = {
next: this._core.next,
prev: this._core.prev,
to: this._core.to
},
this._handlers = {
"prepared.owl.carousel": t.proxy(function(e) {
e.namespace && this._core.settings.dotsData && this._templates.push('<div class="' + this._core.settings.dotClass + '">' + t(e.content).find("[data-dot]").addBack("[data-dot]").attr("data-dot") + "</div>")
}, this),
"added.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.dotsData && this._templates.splice(t.position, 0, this._templates.pop())
}, this),
"remove.owl.carousel": t.proxy(function(t) {
t.namespace && this._core.settings.dotsData && this._templates.splice(t.position, 1)
}, this),
"changed.owl.carousel": t.proxy(function(t) {
t.namespace && "position" == t.property.name && this.draw()
}, this),
"initialized.owl.carousel": t.proxy(function(t) {
t.namespace && !this._initialized && (this._core.trigger("initialize", null, "navigation"),
this.initialize(),
this.update(),
this.draw(),
this._initialized = !0,
this._core.trigger("initialized", null, "navigation"))
}, this),
"refreshed.owl.carousel": t.proxy(function(t) {
t.namespace && this._initialized && (this._core.trigger("refresh", null, "navigation"),
this.update(),
this.draw(),
this._core.trigger("refreshed", null, "navigation"))
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this.$element.on(this._handlers)
};
i.Defaults = {
nav: !1,
navText: ["prev", "next"],
navSpeed: !1,
navElement: "div",
navContainer: !1,
navContainerClass: "owl-nav",
navClass: ["owl-prev", "owl-next"],
slideBy: 1,
dotClass: "owl-dot",
dotsClass: "owl-dots",
dots: !0,
dotsEach: !1,
dotsData: !1,
dotsSpeed: !1,
dotsContainer: !1
},
i.prototype.initialize = function() {
var e, n = this._core.settings;
this._controls.$relative = (n.navContainer ? t(n.navContainer) : t("<div>").addClass(n.navContainerClass).appendTo(this.$element)).addClass("disabled"),
this._controls.$previous = t("<" + n.navElement + ">").addClass(n.navClass[0]).html(n.navText[0]).prependTo(this._controls.$relative).on("click", t.proxy(function(t) {
this.prev(n.navSpeed)
}, this)),
this._controls.$next = t("<" + n.navElement + ">").addClass(n.navClass[1]).html(n.navText[1]).appendTo(this._controls.$relative).on("click", t.proxy(function(t) {
this.next(n.navSpeed)
}, this)),
n.dotsData || (this._templates = [t("<div>").addClass(n.dotClass).append(t("<span>")).prop("outerHTML")]),
this._controls.$absolute = (n.dotsContainer ? t(n.dotsContainer) : t("<div>").addClass(n.dotsClass).appendTo(this.$element)).addClass("disabled"),
this._controls.$absolute.on("click", "div", t.proxy(function(e) {
var r = t(e.target).parent().is(this._controls.$absolute) ? t(e.target).index() : t(e.target).parent().index();
e.preventDefault(),
this.to(r, n.dotsSpeed)
}, this));
for (e in this._overrides)
this._core[e] = t.proxy(this[e], this)
}
,
i.prototype.destroy = function() {
var t, e, n, r;
for (t in this._handlers)
this.$element.off(t, this._handlers[t]);
for (e in this._controls)
this._controls[e].remove();
for (r in this.overides)
this._core[r] = this._overrides[r];
for (n in Object.getOwnPropertyNames(this))
"function" != typeof this[n] && (this[n] = null)
}
,
i.prototype.update = function() {
var t, e, n, r = this._core.clones().length / 2, i = r + this._core.items().length, o = this._core.maximum(!0), a = this._core.settings, s = a.center || a.autoWidth || a.dotsData ? 1 : a.dotsEach || a.items;
if ("page" !== a.slideBy && (a.slideBy = Math.min(a.slideBy, a.items)),
a.dots || "page" == a.slideBy)
for (this._pages = [],
t = r,
e = 0,
n = 0; i > t; t++) {
if (e >= s || 0 === e) {
if (this._pages.push({
start: Math.min(o, t - r),
end: t - r + s - 1
}),
Math.min(o, t - r) === o)
break;
e = 0,
++n
}
e += this._core.mergers(this._core.relative(t))
}
}
,
i.prototype.draw = function() {
var e, n = this._core.settings, r = this._core.items().length <= n.items, i = this._core.relative(this._core.current()), o = n.loop || n.rewind;
this._controls.$relative.toggleClass("disabled", !n.nav || r),
n.nav && (this._controls.$previous.toggleClass("disabled", !o && i <= this._core.minimum(!0)),
this._controls.$next.toggleClass("disabled", !o && i >= this._core.maximum(!0))),
this._controls.$absolute.toggleClass("disabled", !n.dots || r),
n.dots && (e = this._pages.length - this._controls.$absolute.children().length,
n.dotsData && 0 !== e ? this._controls.$absolute.html(this._templates.join("")) : e > 0 ? this._controls.$absolute.append(new Array(e + 1).join(this._templates[0])) : 0 > e && this._controls.$absolute.children().slice(e).remove(),
this._controls.$absolute.find(".active").removeClass("active"),
this._controls.$absolute.children().eq(t.inArray(this.current(), this._pages)).addClass("active"))
}
,
i.prototype.onTrigger = function(e) {
var n = this._core.settings;
e.page = {
index: t.inArray(this.current(), this._pages),
count: this._pages.length,
size: n && (n.center || n.autoWidth || n.dotsData ? 1 : n.dotsEach || n.items)
}
}
,
i.prototype.current = function() {
var e = this._core.relative(this._core.current());
return t.grep(this._pages, t.proxy(function(t, n) {
return t.start <= e && t.end >= e
}, this)).pop()
}
,
i.prototype.getPosition = function(e) {
var n, r, i = this._core.settings;
return "page" == i.slideBy ? (n = t.inArray(this.current(), this._pages),
r = this._pages.length,
e ? ++n : --n,
n = this._pages[(n % r + r) % r].start) : (n = this._core.relative(this._core.current()),
r = this._core.items().length,
e ? n += i.slideBy : n -= i.slideBy),
n
}
,
i.prototype.next = function(e) {
t.proxy(this._overrides.to, this._core)(this.getPosition(!0), e)
}
,
i.prototype.prev = function(e) {
t.proxy(this._overrides.to, this._core)(this.getPosition(!1), e)
}
,
i.prototype.to = function(e, n, r) {
var i;
!r && this._pages.length ? (i = this._pages.length,
t.proxy(this._overrides.to, this._core)(this._pages[(e % i + i) % i].start, n)) : t.proxy(this._overrides.to, this._core)(e, n)
}
,
t.fn.owlCarousel.Constructor.Plugins.Navigation = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
"use strict";
var i = function(n) {
this._core = n,
this._hashes = {},
this.$element = this._core.$element,
this._handlers = {
"initialized.owl.carousel": t.proxy(function(n) {
n.namespace && "URLHash" === this._core.settings.startPosition && t(e).trigger("hashchange.owl.navigation")
}, this),
"prepared.owl.carousel": t.proxy(function(e) {
if (e.namespace) {
var n = t(e.content).find("[data-hash]").addBack("[data-hash]").attr("data-hash");
if (!n)
return;
this._hashes[n] = e.content
}
}, this),
"changed.owl.carousel": t.proxy(function(n) {
if (n.namespace && "position" === n.property.name) {
var r = this._core.items(this._core.relative(this._core.current()))
, i = t.map(this._hashes, function(t, e) {
return t === r ? e : null
}).join();
if (!i || e.location.hash.slice(1) === i)
return;
e.location.hash = i
}
}, this)
},
this._core.options = t.extend({}, i.Defaults, this._core.options),
this.$element.on(this._handlers),
t(e).on("hashchange.owl.navigation", t.proxy(function(t) {
var n = e.location.hash.substring(1)
, i = this._core.$stage.children()
, o = this._hashes[n] && i.index(this._hashes[n]);
o !== r && o !== this._core.current() && this._core.to(this._core.relative(o), !1, !0)
}, this))
};
i.Defaults = {
URLhashListener: !1
},
i.prototype.destroy = function() {
var n, r;
t(e).off("hashchange.owl.navigation");
for (n in this._handlers)
this._core.$element.off(n, this._handlers[n]);
for (r in Object.getOwnPropertyNames(this))
"function" != typeof this[r] && (this[r] = null)
}
,
t.fn.owlCarousel.Constructor.Plugins.Hash = i
}(window.Zepto || window.jQuery, window, document),
function(t, e, n, r) {
function i(e, n) {
var i = !1
, o = e.charAt(0).toUpperCase() + e.slice(1);
return t.each((e + " " + s.join(o + " ") + o).split(" "), function(t, e) {
return a[e] !== r ? (i = !n || e,
!1) : void 0
}),
i
}
function o(t) {
return i(t, !0)
}
var a = t("<support>").get(0).style
, s = "Webkit Moz O ms".split(" ")
, l = {
transition: {
end: {
WebkitTransition: "webkitTransitionEnd",
MozTransition: "transitionend",
OTransition: "oTransitionEnd",
transition: "transitionend"
}
},
animation: {
end: {
WebkitAnimation: "webkitAnimationEnd",
MozAnimation: "animationend",
OAnimation: "oAnimationEnd",
animation: "animationend"
}
}
}
, c = {
csstransforms: function() {
return !!i("transform")
},
csstransforms3d: function() {
return !!i("perspective")
},
csstransitions: function() {
return !!i("transition")
},
cssanimations: function() {
return !!i("animation")
}
};
c.csstransitions() && (t.support.transition = new String(o("transition")),
t.support.transition.end = l.transition.end[t.support.transition]),
c.cssanimations() && (t.support.animation = new String(o("animation")),
t.support.animation.end = l.animation.end[t.support.animation]),
c.csstransforms() && (t.support.transform = new String(o("transform")),
t.support.transform3d = c.csstransforms3d())
}(window.Zepto || window.jQuery, window, document),
function(t, e) {
function n(t, e, n) {
return "withCredentials"in n ? n.open(t, e, !0) : "undefined" != typeof XDomainRequest ? (n = new XDomainRequest).open(t, e) : n = null,
n
}
var r = {
debug: !0,
alert: !0
}
, o = {
console: function() {
if (0 != arguments.length || r.debug)
for (var t = 0; t < arguments.length; t++)
"log" == arguments[t] ? console.log = function() {}
: "info" == arguments[t] ? console.info = function() {}
: "error" == arguments[t] ? console.error = function() {}
: "warn" == arguments[t] ? console.warn = function() {}
: "debug" == arguments[t] ? console.debug = function() {}
: "dir" == arguments[t] ? console.dir = function() {}
: "dirxml" == arguments[t] ? console.dirxml = function() {}
: "group" == arguments[t] ? console.group = function() {}
: "groupEnd" == arguments[t] ? console.groupEnd = function() {}
: "trace" == arguments[t] ? console.trace = function() {}
: "time" == arguments[t] ? console.time = function() {}
: "profile" == arguments[t] && (console.profile = function() {}
);
else
console.log = function() {}
,
console.info = function() {}
,
console.error = function() {}
,
console.warn = function() {}
,
console.debug = function() {}
,
console.dir = function() {}
,
console.dirxml = function() {}
,
console.group = function() {}
,
console.groupEnd = function() {}
,
console.trace = function() {}
,
console.time = function() {}
,
console.profile = function() {}
},
alert: function() {
return r.alert || (alert = function() {}
),
null
}
}
, a = function() {
return -1 != navigator.userAgent.toLowerCase().indexOf("msie")
}
, s = function(t, e) {
if (t && e) {
for (var n = "", r = 0, i = e.length; r < i; r++)
n += "." + e[r];
return t += n
}
}
, l = function(t, e) {
if (t && e)
return t += "#" + e
}
, c = function(t) {
return new Promise(function(e, n) {
var o, a = p(), s = t.dataType, l = [];
if (a) {
var c = t.type ? t.type : "GET";
if (a.open(c, t.url, !0),
c && r.headers && f.countObj(r.headers))
for (var u in r.headers)
"string" == typeof r.headers[u] && (l[u] = r.headers[u]);
if (a.onreadystatechange = function() {
if (4 == a.readyState) {
switch (200 != a.status && 304 != a.status && 204 != a.status && (console.error(a.statusText + " " + a.responseURL),
console.error("HTTP error " + a.status),
console.error(a.response),
n(a)),
s) {
case "json":
o = f.toJSON(a.response);
break;
case "xml":
o = f.toXML(a.response);
break;
case "html":
o = f.convertHTML(a.response);
break;
case "string":
o = a.response;
break;
default:
o = f.toJSON(a.response)
}
e(o)
}
}
,
f.countObj(l))
for (i in l)
"string" == typeof l[i] && l[i] && a.setRequestHeader(i, l[i]);
a.send(r.data || null)
}
}
)
}
, u = function(t) {
var e = ""
, r = p()
, o = new XMLHttpRequest
, a = t.dataType
, s = t.type ? t.type : "GET"
, l = [];
if (e = t.async ? o : r,
n(s, t.url, e),
e.responseType = "text",
s && t.headers && f.countObj(t.headers))
for (var c in t.headers)
"string" == typeof t.headers[c] && (l[c] = t.headers[c]);
if (e.onreadystatechange = function() {
if (4 == e.readyState)
if (200 == e.status || 304 == e.status || 204 == e.status) {
switch (a) {
case "json":
_resp = f.toJSON(e.response);
break;
case "xml":
_resp = f.toXML(e.response);
break;
case "html":
_resp = f.convertHTML(e.response);
break;
case "string":
_resp = e.response;
break;
default:
_resp = f.toJSON(e.response)
}
t.success(_resp)
} else
t.error(e)
}
,
4 != e.readyState) {
if (e.upload && "GET" != s ? (e.upload.onprogress = function(e) {
e.lengthComputable && t.progress && t.progress(Math.floor(e.loaded / e.total * 100))
}
,
e.upload.onloadstart = function(e) {
t.progress && t.progress(0)
}
,
e.upload.onloadend = function(e) {
t.progress && t.progress(100)
}
) : (e.onprogress = function(e) {
e.lengthComputable && t.progress && t.progress(Math.floor(e.loaded / e.total * 100))
}
,
e.onloadstart = function(e) {
t.progress && t.progress(0)
}
,
e.onloadend = function(e) {
t.progress && t.progress(100)
}
),
f.countObj(l))
for (i in l)
"string" == typeof l[i] && l[i] && e.setRequestHeader(i, l[i]);
return e.send(t.data || null),
null
}
}
, p = function() {
for (var t = [function() {
return new XMLHttpRequest
}
, function() {
return new ActiveXObject("Msxml2.XMLHTTP")
}
, function() {
return new ActiveXObject("Msxml3.XMLHTTP")
}
, function() {
return new ActiveXObject("Microsoft.XMLHTTP")
}
], e = !1, n = t.length, r = 0; r < n; r++) {
try {
e = t[r]()
} catch (t) {
continue
}
break
}
return e
}
, t = function(t, e, n, r) {
return new d(t,e,n,r)
}
, d = function(e, n, r, i) {
var o = t.fn.selector(e, n, r)
, a = void 0 === o.length ? 1 : o.length;
void 0 !== i && (a = i >= 0 ? i : a,
a = 0 === i ? 1 : a);
for (var s in this)
delete this[s];
if (this.length = a,
this.exist = !!a,
this.selector = e,
a)
if (void 0 !== i)
for (l = 0; l <= this.length; l++)
this[l] = o[l];
else
for (var l = 0; l < this.length; l++)
this[l] = o[l];
else
this[0] = o;
return this
};
t.fn = d.prototype = {
done: function(t) {
return "loading" != document.readyState ? window.setTimeout(function() {
t(event)
}, 0) : document.addEventListener ? document.addEventListener("DOMContentLoaded", function(e) {
t(e)
}) : window.setTimeout(function() {
t(event)
}, 0),
null
},
onload: function(t) {
return this[0].onload = function(e) {
t(e)
}
,
null
},
scroll: function(t) {
this[0].onscroll = function(e) {
t(e)
}
},
on: function(t, e) {
if (t) {
for (var n = e || !1, r = this.length, i = 0; i < r; i++)
this[i].addEventListener(t, function(t) {
f.isFunction(n) && e.call(this, t)
}, !1);
return this
}
},
delegate: function(t, e, n) {
var r = document.querySelector(this.selector);
return r.addEventListener(t, function(t) {
for (var i = r.querySelectorAll(e), o = t.target, a = 0, s = i.length; a < s; a++)
for (var l = o, c = i[a]; l && l !== r; ) {
if (l === c)
return n.call(l, t),
this;
l = l.parentNode
}
}),
!1
},
content: function(t, e) {
if (t) {
var n = this.length
, r = t || "text";
if (e || "string" == typeof e) {
switch (r) {
case "text":
for (; n--; )
this[n] && (this[n].textContent = e);
break;
case "val":
for (; n--; )
this[n] && (this[n].value = e);
break;
case "html":
for (; n--; )
this[n] && (this[n].innerHTML = e)
}
return this
}
var i;
switch (r) {
case "text":
for (; n--; )
i = this[n].innerText ? this[n].innerText : this[n].textContent;
break;
case "val":
for (; n--; )
i = this[n].value;
break;
case "html":
for (; n--; )
i = this[n].innerHTML
}
return i
}
},
html: function(t) {
return t ? (this.content("html", t),
this) : this.content("html")
},
text: function(t) {
return t ? (this.content("text", t),
this) : this.content("text")
},
val: function(t) {
return t ? (this.content("val", t),
this) : this.content("val")
},
each: function(t) {
if (t) {
for (var e = this.length, n = 0; n < e; n++)
t.call(this[n], window);
return this
}
},
push: function(e, n, r) {
if (e) {
for (var i = r || !1, o = "before" == n ? "afterbegin" : "beforeend", a = this.length, s = 0; s < a; s++)
this[s].insertAdjacentHTML(o, e);
return t.fn.isFunction(i) && r.call(this, window),
this
}
},
destroy: function(e) {
for (var n = e || !1, r = this.length, i = 0; i < r; i++)
this[i].parentNode.removeChild(this[i]);
return t.fn.isFunction(n) && e.call(this, window),
this
},
addClass: function(t) {
if (t) {
var e = this.length;
if (e)
for (var n = 0; n < e; n++)
f.have(this[n].className, t) || (this[n].setAttribute("class", this[n].className + " " + t),
a() || this[n].setAttribute("class", this[n].className.trim()));
return this
}
},
toggleClass: function(e) {
if (e) {
var n = this.length;
if (n)
for (var r = 0; r < n; r++)
t(this[r]).hasClass(e) ? t(this[r]).removeClass(e) : t(this[r]).addClass(e);
return this
}
},
hasClass: function(t) {
if (t) {
var e = this[0].className.split(" ");
if (e)
for (var n = 0; n < e.length; n++)
if (e[n].toLowerCase() == t.toLowerCase())
return !0
}
},
removeClass: function(t) {
if (t) {
var e = this.length;
if (e)
for (var n = 0; n < e; n++)
this[n].className && (this[n].className = this[n].className.replace(t, ""));
return this
}
},
attr: function(t, e) {
if (t)
for (var n = this.length, r = 0; r < n; r++)
return e ? (this[r].setAttribute(t, e),
this) : this[r].getAttribute(t)
},
removeAttr: function(t) {
if (t) {
for (var e = this.length, n = 0; n < e; n++)
this[n].removeAttribute(t);
return this
}
},
styles: function(t) {
if (t) {
for (var e = this.length, n = 0; n <= e; n++)
this[n] && this[n].setAttribute("style", t);
return this
}
},
parent: function() {
return t(this[0].parentNode)
},
parents: function(e) {
if (e) {
for (var n = [], r = this[0].parentNode, i = ""; null !== r; ) {
var o = r;
n.push(o),
r = o.parentNode
}
for (var a = 0, c = n.length; a < c; a++) {
if (f.have(s(f.strLower(n[a].nodeName), n[a].classList), e)) {
i = n[a];
break
}
if (f.have(l(f.strLower(n[a].nodeName), f.strLower(n[a].id)), e)) {
i = n[a];
break
}
if (f.strUpper(n[a].nodeName) == f.strUpper(e)) {
i = n[a];
break
}
}
return t(i)
}
},
insert: function(t, e) {
if (t) {
for (var n = e || "before", r = this.length, i = 0; i < r; i++)
"before" == n ? this[i].insertAdjacentHTML("beforeBegin", t) : "after" == n && this[i].insertAdjacentHTML("afterEnd", t);
return this
}
},
wrap: function(t, e) {
if (t && e) {
for (var n = this.length, r = 0; r < n; r++)
this[r].outerHTML = t + this[r].outerHTML + e;
return this
}
},
exchange: function(t) {
if (t) {
for (var e = this.length, n = 0; n < e; n++)
this[n].outerHTML = t;
return this
}
},
copy: function() {
return this.length ? this[0].cloneNode(!0).outerHTML : "The element not exists"
},
changeTo: function(e, n) {
if (e && n) {
var r = this[0]
, i = t(r).copy();
return t(e).insert(i, n),
r.outerHTML = "",
this
}
},
animate: function(e, n) {
if (e) {
for (var r = n || !1, i = this.length, o = 0; o < i; o++)
t(this[o]).addClass("animated").addClass(e);
return t.fn.isFunction(r) && n.call(this, window),
this
}
},
hide: function() {
for (var t = this.length, e = 0; e < t; e++)
this[e].style.display = "none";
return this
},
show: function() {
for (var t = this.length, e = 0; e < t; e++)
this[e].style.display = "block";
return this
},
serialize: function(t, e, n) {
var r = this[0];
e = e || !1,
t = t || !0;
var i, o = window.event, a = {}, s = "";
if ("object" == typeof r && "FORM" == r.nodeName)
for (var l = r.elements.length - 1; l >= 0; l--)
if ((i = r.elements[l]).name && "file" != i.type && "reset" != i.type)
if ("select-multiple" == i.type)
for (var c = r.elements[l].options.length - 1; c >= 0; c--)
i.options[c].selected && (t ? n ? f.have(i.className, n) && (a[i.name] = i.options[c].value) : a[i.name] = i.options[c].value : s += "&" + i.name + "=" + i.options[c].value);
else
("submit" != i.type && "button" != i.type || o.target == i) && ("checkbox" != i.type && "radio" != i.type || i.checked || e) && (t ? n ? f.have(i.className, n) && (a[i.name] = i.value) : a[i.name] = i.value : s += "&" + i.name + "=" + i.value);
return t ? a : s.substr(1)
},
find: function(e) {
if (e)
return t(e, this[0])
},
child: function(e) {
if (e)
return t(e, this[0], !0)
},
eq: function(e) {
return e = e || 0,
t(this[e], "", !1, e)
},
first: function() {
return t(this[0], "", !1, 0)
},
last: function() {
return t(this[this.length - 1], "", !1, this.length - 1)
},
isChecked: function() {
return !!this[0].checked || void 0
},
isSelected: function() {
return !t(this[0]).isEmpty("val") || void 0
},
size: function() {
return {
w: this[0].offsetWidth,
h: this[0].offsetHeight
}
},
position: function() {
for (var t = 0, e = 0, n = this.length, r = 0; r < n; r++)
t += this[r].offsetLeft - this[r].scrollLeft + this[r].clientLeft,
e += this[r].offsetTop - this[r].scrollTop + this[r].clientTop,
this[r] = this[r].offsetParent;
return {
x: t,
y: e
}
},
isEmpty: function(t) {
if (t) {
var e = this.content(t);
return !e || !f.removeAllSpaces(e).length
}
},
clearForm: function() {
for (var t = this.length, e = 0; e < t; e++)
this[e].reset();
return this
},
load: function(e, n, r) {
if (e) {
var i = r || !1;
f.ajax({
url: e,
type: "GET",
dataType: "html",
success: function(e) {
t.fn.isFunction(i) && r(n ? t(e).find(n).copy() : t(e).html())
},
error: function(t) {
console.error("Error load"),
console.error(t)
}
})
}
},
next: function() {
return t(this[0].nextSibling.nextSibling)
},
prev: function() {
return t(this[0].previousElementSibling)
},
nextAll: function(t) {
for (var e = t || !1, n = this[0].parentNode.children, r = this[0].outerHTML, i = !1, o = [], a = 0, s = n.length; a < s; a++)
n[a].outerHTML != r ? i && (e && t.call(n[a]),
o.push(n[a])) : i = !0;
return o
},
prevAll: function(t) {
for (var e = t || !1, n = this[0].parentNode.children, r = this[0].outerHTML, i = [], o = 0, a = n.length; o < a && n[o].outerHTML != r; o++)
e && t.call(n[o]),
i.push(n[o]);
return i
},
brothers: function(t) {
for (var e = t || !1, n = this[0].parentNode.children, r = this[0].outerHTML, i = [], o = 0, a = n.length; o < a; o++)
n[o].outerHTML != r && (e && t.call(n[o]),
i.push(n[o]));
return i
},
fadeEffects: function(t, e, n) {
for (var r, i, o = this, a = o.length, s = 0; s < a; s++)
r = o[s],
0 == e ? (increment = 2,
r.style.display = "block") : increment = -2,
i = e,
intervalo = setInterval(function() {
i == n ? (0 == n && (r.style.display = "none"),
clearInterval(intervalo)) : (i += increment,
r.style.opacity = i / 100,
r.style.filter = "alpha(opacity=" + i + ")")
}, 10 * t);
return null
},
fadeIn: function(t) {
return t |= 1,
this.fadeEffects(t, 0, 100),
null
},
fadeOut: function(t) {
return t |= 1,
this.fadeEffects(t, 100, 0),
null
},
removeAllSpaces: function(t) {
if (t)
return t.replace(/\s/g, "")
},
convertHTML: function(t) {
if (t)
return (new DOMParser).parseFromString(t, "text/html")
},
config: function(t) {
return r = f.extend(r, t),
o.console(),
o.alert(),
null
},
getNumberOfString: function(t) {
if (t)
return t.replace(/[^0-9]/g, "")
},
toJSON: function(t) {
if (t)
return JSON.parse(t)
},
objToJSON: function(t) {
if (t)
return JSON.stringify(t)
},
toXML: function(t) {
if (t)
return (new DOMParser).parseFromString(t, "text/xml")
},
async: function(t) {
if (t)
return c(t)
},
ajax: function(t) {
if (t)
return u(t)
},
url: function() {
return window.location
},
now: function() {
return (new Date).getTime()
},
today: function(t) {
var e = new Date;
if ("date" == t)
return e.getDate() + "/" + e.getMonth() + "/" + e.getFullYear();
if ("time" == t) {
var n = e.getHours();
n < 10 && (n = "0" + n);
var r = e.getMinutes();
r < 10 && (r = "0" + r);
var i = e.getSeconds();
return i < 10 && (i = "0" + i),
n + ":" + r + ":" + i
}
},
date: function(t) {
var t;
return t = t ? new Date(t) : new Date,
{
day: t.getDate(),
month: t.getMonth(),
month_with_zero: t.getMonth() < 10 && t.getMonth() > 0 ? "0" + t.getMonth() : t.getMonth(),
year: t.getFullYear(),
year_prefix: parseInt(t.getFullYear().toString().substr(2, 4)),
hours: t.getHours(),
minutes: t.getMinutes(),
seconds: t.getSeconds(),
miliseconds: t.getTime()
}
},
urlCurrent: function() {
return window.location.href
},
dateServeToDateUser: function(t) {
if (t) {
var e = new Date(t)
, n = "" + e.getFullYear()
, r = "" + (e.getMonth() + 1);
1 == r.length && (r = "0" + r);
var i = "" + e.getDate();
1 == i.length && (i = "0" + i);
var o = "" + e.getHours();
1 == o.length && (o = "0" + o);
var a = "" + e.getMinutes();
1 == a.length && (a = "0" + a);
var s = "" + e.getSeconds();
return 1 == s.length && (s = "0" + s),
i + "/" + r + "/" + n + " " + o + ":" + a + ":" + s
}
},
dateToDateServer: function() {},
redirect: function(t) {
if (t)
return window.location.href = t,
null
},
params: function() {
return this.url().href.split("/")
},
have: function(t, e, n) {
var r = !1;
if (t && e) {
if (n) {
for (var i = 0, o = (t = t.split("/")).length; i < o; i++)
if (t[i] == e) {
r = !0;
break
}
return r
}
return t.toString().indexOf(e) > -1
}
return !1
},
isFunction: function(t) {
return "function" == typeof t || void 0
},
isObject: function(t) {
return "object" == typeof t || void 0
},
isString: function(t) {
return "string" == typeof t || void 0
},
isCPF: function(t) {
if (t) {
var e, n, r = f.getNumberOfString(t);
if (e = 0,
"00000000000" != r) {
for (i = 1; i <= 9; i++)
e += parseInt(r.substring(i - 1, i)) * (11 - i);
if (10 != (n = 10 * e % 11) && 11 != n || (n = 0),
n == parseInt(r.substring(9, 10))) {
for (e = 0,
i = 1; i <= 10; i++)
e += parseInt(r.substring(i - 1, i)) * (12 - i);
if (10 != (n = 10 * e % 11) && 11 != n || (n = 0),
n == parseInt(r.substring(10, 11)))
return !0
}
}
}
},
formatMoney: function(t, e, n, r, i) {
if (void 0 !== t && e && n && r && i) {
t = (t + "").replace(",", "").replace(" ", "");
var o = isFinite(+t) ? +t : 0
, a = isFinite(+e) ? Math.abs(e) : 0
, s = void 0 === r ? "," : r
, l = void 0 === n ? "." : n
, c = "";
return (c = (a ? function(t, e) {
var n = Math.pow(10, e);
return "" + Math.round(t * n) / n
}(o, a) : "" + Math.round(o)).split("."))[0].length > 3 && (c[0] = c[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, s)),
(c[1] || "").length < a && (c[1] = c[1] || "",
c[1] += new Array(a - c[1].length + 1).join("0")),
i + " " + c.join(l)
}
},
rewrite: function(t) {
if (t)
return a() ? t.toLowerCase().replace(/[áàãâä]/g, "a").replace(/[éèẽêë]/g, "e").replace(/[íìĩîï]/g, "i").replace(/[óòõôö]/g, "o").replace(/[úùũûü]/g, "u").replace(/ç/g, "c").replace(/(\ |_)+/, " ").replace(/(^-+|-+$)/, "").replace(/[^a-z0-9]+/g, "-") : t.toLowerCase().trim().replace(/[áàãâä]/g, "a").replace(/[éèẽêë]/g, "e").replace(/[íìĩîï]/g, "i").replace(/[óòõôö]/g, "o").replace(/[úùũûü]/g, "u").replace(/ç/g, "c").replace(/(\ |_)+/, " ").replace(/(^-+|-+$)/, "").replace(/[^a-z0-9]+/g, "-")
},
isEmail: function(t) {
if (t)
return !!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i.test(t) || void 0
},
isNumber: function(t) {
return !isNaN(t) || void 0
},
isLetter: function(t) {
var e = /^[a-zA-Z\s]+$/;
return !!t.match(e) || void 0
},
isURL: function(t) {
if (t)
return /^((http|https|ftp|ftps):\/\/)?([a-z0-9\-]+\.)?[a-z0-9\-]+\.[a-z0-9]{2,4}(\.[a-z0-9]{2,4})?(\/.*)?$/i.test(t)
},
convertMoneyToFloat: function(t, e) {
if (t && e)
return parseFloat(t.toString().replace(".", "").replace(",", ".").replace(e, "").replace(e + " ", ""))
},
getValueBill: function(t, e, n) {
if (t && e && n) {
var r, i = [], o = f.convertMoneyToFloat(t, n);
return o && e ? (r = o * e / 100,
r = r,
o -= r,
o = f.formatMoney(o, 2, ",", ".", n),
r = f.formatMoney(r, 2, ",", ".", n),
i.total = o,
i.descount = r,
i.porcent_descount = e,
i) : void 0
}
},
installment: function(t, e, n, r, i) {
if (t && e && r && i) {
var o = [];
e = parseInt(e),
n = parseFloat(n),
r = parseFloat(r);
var a, s = f.convertMoneyToFloat(t, i), l = parseInt(s / r), c = "";
return l > e && (l = e),
a = s / l,
0 === n ? l > 0 ? (o.parc = l + "x",
o.parc_number = l,
o.vl = f.formatMoney(a, 2, ",", ".", i),
o.vl_number = a,
o.juros = null,
o) : void 0 : (c = n / 100,
a = s * Math.pow(1 + c, l) / l,
l > 0 ? (o.parc = l + "x",
o.parc_number = l,
o.val = f.formatMoney(a, 2, ",", ".", i),
o.vl_number = a,
o.juros = parseFloat(n) + "% a.m",
o.juros_number = n,
o) : void 0)
}
},
financing: function(t, e, n, r, i) {
if (t && e && r && n && i) {
var o = [];
e = parseInt(e),
n = parseFloat(n),
r = parseFloat(r);
var a, s = f.convertMoneyToFloat(t, i), l = parseInt(s / r), c = "";
return l > e && (l = e),
a = s / l,
n ? (c = n / 100,
a = s * c * Math.pow(1 + c, l) / (Math.pow(1 + c, l) - 1),
l > 0 ? (o.parc = l + "x",
o.parc_number = l,
o.vl = f.formatMoney(a, 2, ",", ".", i),
o.vl_number = a,
o.juros = parseFloat(n) + "% a.m",
o.juros_number = n,
o) : void 0) : void 0
}
},
upperAllFirstLetter: function(t) {
if (t) {
for (var e = t.toLowerCase().split(" "), n = 0; n < e.length; n++) {
var r = e[n]
, i = r[0];
i && (r = i.toUpperCase() + r.slice(1),
e[n] = r)
}
return e.join(" ")
}
},
setCookie: function(t, e, n, r, i) {
if (t && e && n) {
e = encodeURI(e),
r = r || "/";
var o = new Date;
o.setTime(o.getTime() + 1e3 * n * 60 * 60);
var a = "expires=" + o.toGMTString()
, r = i ? "path=" + r : ""
, i = i ? "domain=" + i : "";
return document.cookie = t + "=" + e + ";" + a + ";" + r + ";" + i,
!0
}
},
getCookie: function(t) {
if (t) {
t += "=";
for (var e = document.cookie.split(";"), n = 0; n < e.length; n++) {
for (var r = e[n]; " " == r.charAt(0); )
r = r.substring(1);
if (-1 != r.indexOf(t))
return decodeURI(r.substring(t.length, r.length))
}
return ""
}
},
deleteCookie: function(t) {
if (t)
return document.cookie = t + "=;expires=Thu, 01 Jan 1970 00:00:01 GMT;",
!0
},
deleteAllCookies: function() {
for (var t = document.cookie.split("; "), e = 0; e < t.length; e++)
for (var n = window.location.hostname.split("."); n.length > 0; ) {
var r = encodeURIComponent(t[e].split(";")[0].split("=")[0]) + "=; expires=Thu, 01-Jan-1970 00:00:01 GMT; domain=" + n.join(".") + " ;path="
, i = location.pathname.split("/");
for (document.cookie = r + "/"; i.length > 0; )
document.cookie = r + i.join("/"),
i.pop();
n.shift()
}
return !0
},
percent: function(t, e, n) {
if (t && e && n) {
var r = [];
return e = f.convertMoneyToFloat(e, n),
t = f.convertMoneyToFloat(t, n),
r.discount = Math.abs(parseInt(e / t * 100 - 100)),
r.discount_format = r.discount + "%",
r
}
},
discountPercent: function(t, e, n) {
if (t && e && n) {
var r = [];
return e = f.convertMoneyToFloat(e, n),
r.discount_price = t / 100 * e,
r.total_price_with_discount = e - t / 100 * e,
r.total_price_with_increase = e + t / 100 * e,
r.discount_price_format = f.formatMoney(r.discount_price, 2, ",", ".", n),
r.total_price_with_discount_format = f.formatMoney(r.total_price_with_discount, 2, ",", ".", n),
r.total_price_with_increase_format = f.formatMoney(r.total_price_with_increase, 2, ",", ".", n),
r
}
},
limitLetter: function(t, e, n) {
if (t && n)
return t.length > n ? t.substring(e, n) + "..." : t.substring(e, n)
},
limitWord: function(t, e) {
if (t && e) {
var n = t.split(" ")
, r = "";
if (e < n.length) {
for (var i = 0; i <= e - 1; i++)
r += n[i] + " ";
return r + "..."
}
return t
}
},
dialogClose: function(e) {
var n = e || !1;
t(".ht-header .ht-close-thik, .ht-footer a.ht-popup-btn-confirm").on("click", function(r) {
t(".ht-popup-area, .ht-popup-bg").animate("fadeOut", function() {
t(".ht-popup-area, .ht-popup-bg").hide(),
t(".ht-popup-area, .ht-popup-bg").removeClass("animated"),
t(".ht-popup-area, .ht-popup-bg").removeClass("fadeIn"),
t(".ht-popup-area, .ht-popup-bg").removeClass("fadeOut")
}),
f.eventStop(r),
f.isFunction(n) && e(!0)
}),
t(".ht-footer a.ht-popup-btn-not-confirm").on("click", function(r) {
t(".ht-popup-area, .ht-popup-bg").animate("fadeOut", function() {
t(".ht-popup-area, .ht-popup-bg").hide(),
t(".ht-popup-area, .ht-popup-bg").removeClass("animated"),
t(".ht-popup-area, .ht-popup-bg").removeClass("fadeIn"),
t(".ht-popup-area, .ht-popup-bg").removeClass("fadeOut")
}),
f.eventStop(r),
f.isFunction(n) && e(!1)
})
},
strUpper: function(t) {
if (t)
return t.toUpperCase()
},
eventStop: function(t) {
t && (t.preventDefault ? t.preventDefault() : t.returnValue = !1)
},
strLower: function(t) {
if (t)
return t.toLowerCase()
},
messageBox: function(t, e) {
if (t && e)
return '<div class="alert-box ' + e + '"><span>' + t + "</span></div>"
},
loadPreloader: function() {
return t(".ht-box-loader").length || t("body").push('<div class="ht-box-loader"><div class="three-quarters-loader">Loading…</div></div><div class="ht-preloader-bg"></div>', "after"),
!0
},
showPreloader: function() {
this.loadPreloader(),
t(".ht-box-loader, .ht-preloader-bg").show()
},
hidePreloader: function() {
this.loadPreloader(),
t(".ht-box-loader, .ht-preloader-bg").hide()
},
loadAlert: function() {
return t(".ht-popup-area.ht-popup-alert").length || t("body").push('<div class="ht-popup ht-popup-area ht-popup-alert"><div class="ht-header-popup ht-header"><a href="#" class="ht-close-thik">✖</a>Mensagem para você!</div>\x3c!-- /header --\x3e<div class="ht-body ht-popup-body"></div><div class="ht-footer header-popup"><a class="ht-btn ht-popup-btn-confirm" href="">Confirmar!</a></div>\x3c!-- /header --\x3e</div><div class="ht-popup-bg"></div>', "after"),
null
},
alert: function(e) {
e && r.alert && (this.loadAlert(),
t(".ht-popup-alert .ht-body.ht-popup-body").content("html", e),
t(".ht-popup-alert, .ht-popup-bg").show(),
t(".ht-popup-alert, .ht-popup-bg").animate("fadeIn"),
f.dialogClose())
},
confirm: function(e, n) {
if (e)
return this.loadConfirm(),
t(".ht-popup-confirm .ht-body.ht-popup-body").content("html", e),
t(".ht-popup-confirm, .ht-popup-bg").show(),
t(".ht-popup-confirm, .ht-popup-bg").animate("fadeIn"),
f.dialogClose(n)
},
loadConfirm: function() {
return t(".ht-popup.ht-popup-confirm").length || t("body").push('<div class="ht-popup-area ht-popup ht-popup-confirm"><div class="ht-header ht-header-popup">Mensagem para você</div>\x3c!-- /header --\x3e<div class="ht-body ht-popup-body"></div><div class="ht-footer"><a class="ht-btn ht-popup-btn-confirm" href="">Sim</a><a class="ht-btn ht-popup-btn-not-confirm" href="">Não</a><div class="ht-clearfix"></div></div>\x3c!-- /header --\x3e</div><div class="ht-popup-bg"></div></div>', "after"),
null
},
extend: function(t, e) {
if (!t || !e)
return t;
for (var n in e)
e.hasOwnProperty(n) && (t[n] = e[n]);
return t
},
countObj: function(t) {
if (t)
return Object.keys(t).length
},
sort_by: function(t, e, n) {
if (t && e && n) {
var r = n ? function(e) {
return n(e[t])
}
: function(e) {
return e[t]
}
;
return e = e ? -1 : 1,
function(t, n) {
return t = r(t),
n = r(n),
e * ((t > n) - (n > t))
}
}
},
endTime: function(t) {
if (t) {
var e = (new Date).getTime()
, n = e - t < 0 ? 0 : e - t;
n >= 1e3 ? console.log("Call to doSomething took " + n / 1e3 + " seconds.") : console.log("Call to doSomething took " + n + " milliseconds.")
}
},
selector: function(e, n, r) {
if (n) {
if (r) {
for (var i = n.childNodes, o = [], a = 0; a < i.length; a++)
i[a].nodeName && (i[a].nodeName.toLowerCase() == e ? o.push(i[a]) : i[a].className ? f.have(i[a].nodeName.toLowerCase() + "." + i[a].className.replace("/s/g", "."), e) && o.push(i[a]) : i[a].id && f.have(i[a].nodeName.toLowerCase() + "#" + i[a].id, e) && o.push(i[a]));
return o
}
return t.fn.isObject(e) ? [e] : n.querySelectorAll(e)
}
return t.fn.isString(e) ? f.have(e, "<") && f.have(e, ">") ? f.convertHTML(e).querySelectorAll(e.replace("<", "").replace(">", "")) : document.querySelectorAll(e) : [e]
},
getParams: function(t, e) {
if (t) {
e = e || window.location.href;
var n = "[\\?&]" + (t = t.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]")) + "=([^&#]*)"
, r = new RegExp(n).exec(e);
return null == r ? "" : decodeURIComponent(r[1].replace(/\+/g, " "))
}
},
isIE: function() {
return a()
},
whatBrowser: function() {
var t = !1;
return navigator.appVersion.indexOf("MSIE 12") > -1 ? t = "IE12" : navigator.appVersion.indexOf("MSIE 11") > -1 ? t = "IE11" : navigator.appVersion.indexOf("MSIE 10") > -1 ? t = "IE10" : navigator.appVersion.indexOf("MSIE 9") > -1 ? t = "IE9" : navigator.appVersion.indexOf("MSIE 8") > -1 ? t = "IE8" : navigator.appVersion.indexOf("MSIE 7") > -1 ? t = "IE7" : navigator.userAgent.indexOf("Chrome") > -1 ? t = "Chrome" : navigator.userAgent.indexOf("Firefox") > -1 ? t = "Firefox" : navigator.userAgent.indexOf("Safari") > -1 ? t = "Safari" : navigator.userAgent.toLowerCase().indexOf("op") > -1 && (t = "Opera"),
t
},
ieObjectSetPrototypeOf: function(t, e) {
if (t && e)
return t.__proto__ = e,
t
},
elementExist: function(e) {
if (e)
return !!t(e).length
},
whatDevice: function() {
var e = t("body").size();
return e.w >= 1200 ? "desktop" : e.w >= 550 && e.w < 1200 ? "tablet" : "mobile"
},
daysDifferenceBetweenDates: function(t, e) {
if (t && e) {
if (t.getTime() <= e.getTime()) {
var n = Date.UTC(t.getYear(), t.getMonth(), t.getDate(), 0, 0, 0) - Date.UTC(e.getYear(), e.getMonth(), e.getDate(), 0, 0, 0);
return Math.abs(n / 1e3 / 60 / 60 / 24)
}
return 0
}
}
};
var f = new d;
window.$savana || (window.$savana = t,
window.$sjs = t,
window.savana = f,
window.sjs = f,
console.info("%cSavanaJS - You are working on your project! Thanks:) | See documentation: http://savanajs.github.io/docs", "color:#7ac142;font-weight:bold;font-size:11px"))
}(),
urlFiltro = "",
"function" != typeof String.prototype.replaceSpecialChars && (String.prototype.replaceSpecialChars = function() {
var t = {
"ç": "c",
"æ": "ae",
"œ": "oe",
"á": "a",
"é": "e",
"í": "i",
"ó": "o",
"ú": "u",
"à": "a",
"è": "e",
"ì": "i",
"ò": "o",
"ù": "u",
"ä": "a",
"ë": "e",
"ï": "i",
"ö": "o",
"ü": "u",
"ÿ": "y",
"â": "a",
"ê": "e",
"î": "i",
"ô": "o",
"û": "u",
"å": "a",
"ã": "a",
"ø": "o",
"õ": "o",
u: "u",
"Á": "A",
"É": "E",
"Í": "I",
"Ó": "O",
"Ú": "U",
"Ê": "E",
"Ô": "O",
"Ü": "U",
"Ã": "A",
"Õ": "O",
"À": "A",
"Ç": "C"
};
return this.replace(/[\u00e0-\u00fa]/g, function(e) {
return void 0 !== t[e] ? t[e] : e
})
}
),
"function" != typeof String.prototype.trim && (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "")
}
),
jQuery.fn.vtexSmartResearch = function(t) {
$this = jQuery(this);
var e = function(t, e) {
"object" == typeof console && console.log("[Smart Research - " + (e || "Erro") + "] " + t)
}
, n = {
pageLimit: null,
loadContent: ".prateleira-categoria[id^=ResultItems]",
shelfClass: ".prateleira-categoria",
filtersMenu: ".search-multiple-navigator",
linksMenu: ".search-single-navigator",
menuDepartament: ".navigation-tabs .menu-departamento",
mergeMenu: !0,
insertMenuAfter: ".search-multiple-navigator h3:first",
emptySearchElem: jQuery('<div class="vtexsr-emptySearch"></div>'),
elemLoading: '<div id="scrollLoading">Carregando ... </div>',
returnTopText: "",
emptySearchMsg: "<h3>Esta combinação de filtros não retornou nenhum resultado!</h3>",
searchUrl: null,
usePopup: !1,
showLinks: !0,
popupAutoCloseSeconds: 3,
filterScrollTop: function(t) {
return t.top - 20
},
callback: function() {},
getShelfHeight: function(t) {
return t.scrollTop() + t.height()
},
shelfCallback: function() {},
ajaxCallback: function() {},
emptySearchCallback: function() {
$(".x-prateleira").addClass("x-empty")
},
authorizeScroll: function() {
return !0
},
authorizeUpdate: function() {
return !0
},
labelCallback: function() {}
}
, r = jQuery.extend(n, t)
, i = jQuery("")
, o = (jQuery(r.elemLoading),
2)
, a = !0
, s = jQuery(window)
, l = (jQuery(document),
jQuery("html,body"))
, c = jQuery("body")
, u = ""
, p = ""
, d = ""
, f = !1
, h = jQuery(r.loadContent)
, m = jQuery(r.filtersMenu)
, v = "&"
, g = {
requests: 0,
filters: 0,
isEmpty: !1
}
, y = {}
, _ = {
getUrl: function(t) {
var e = t || !1;
return urlFiltro = (e ? u.replace(/PageNumber=[0-9]*/, "PageNumber=" + o) : (d + p).replace(/PageNumber=[0-9]*/, "PageNumber=" + S)).replace("O=OrderByReleaseDateDESC", "") + v,
urlFiltro
},
getSearchUrl: function() {
var t, n, r;
return jQuery("script:not([src])").each(function() {
return n = jQuery(this)[0].innerHTML,
r = /\/buscapagina\?.+&PageNumber=/i,
n.search(/\/buscapagina\?/i) > -1 ? (t = r.exec(n),
!1) : void 0
}),
void 0 !== t && void 0 !== t[0] ? t[0] : (e("Não foi possível localizar a url de busca da página.\n Tente adicionar o .js ao final da página. \n[Método: getSearchUrl]"),
"")
},
scrollToTop: function() {
var t = c.find("#returnToTop");
t.length < 1 && (t = jQuery('<div id="returnToTop"></div>'),
c.append(t));
var e = s.height();
s.bind("resize", function() {
e = s.height()
}),
s.bind("scroll", function() {
s.scrollTop() > e ? t.stop(!0).fadeTo(300, 1, function() {
t.show()
}) : t.stop(!0).fadeTo(300, 0, function() {
t.hide()
})
}),
t.bind("click", function() {
return l.animate({
scrollTop: 0
}, "slow"),
!1
})
}
};
if (u = d = null !== r.searchUrl ? r.searchUrl : _.getSearchUrl(),
$this.length < 1)
return e("Nenhuma opção de filtro encontrada", "Aviso"),
r.showLinks && jQuery(r.linksMenu).css("visibility", "visible").show(),
_.scrollToTop(),
$this;
if (h.length < 1)
return e("Elemento para destino da requisição não foi encontrado \n (" + h.selector + ")"),
!1;
m.length < 1 && e("O menu de filtros não foi encontrado \n (" + m.selector + ")");
var b = (document.location.href,
jQuery(r.linksMenu))
, w = jQuery('<div class="vtexSr-overlay"></div>')
, x = jQuery(r.menuDepartament)
, C = h.offset()
, S = 1
, k = null
, T = null;
r.emptySearchElem.append(r.emptySearchMsg),
h.before(w);
var I = {
exec: function() {
I.setFilterMenu(),
I.fieldsetFormat(),
$this.each(function() {
var t = jQuery(this)
, e = t.parent();
t.is(":checked") && (p += "&" + (t.attr("rel") || ""),
e.addClass("sr_selected")),
I.adjustText(t),
e.append('<span class="sr_box"></span><span class="sr_box2"></span>'),
t.bind("change", function() {
S = "1",
I.inputAction(),
t.is(":checked") ? I.addFilter(t) : I.removeFilter(t),
g.filters = $this.filter(":checked").length,
$(".pages .first").click()
})
}),
"" !== p && I.addFilter(i)
},
mergeMenu: function() {
if (!r.mergeMenu)
return !1;
var t = x;
t.insertAfter(r.insertMenuAfter),
I.departamentMenuFormat(t)
},
mergeMenuList: function() {
var t = 0;
m.find("h3,h4").each(function() {
var e = b.find("h3,h4").eq(t).next("ul");
e.insertAfter(jQuery(this)),
I.departamentMenuFormat(e),
t++
})
},
departamentMenuFormat: function(t) {
t.find("a").each(function() {
var t = jQuery(this);
t.text(I.removeCounter(t.text()))
})
},
fieldsetFormat: function() {
y.fieldsetCount = 0,
y.tmpCurrentLabel = {},
m.find("fieldset").each(function() {
var t = jQuery(this)
, e = t.find("label")
, n = "filtro_" + (t.find("h5:first").text() || "").toLowerCase().replaceSpecialChars().replace(/\s/g, "-");
return y[n] = {},
e.length < 1 ? void t.hide() : (t.addClass(n),
e.each(function(e) {
var i = jQuery(this)
, o = i.find("input").val() || ""
, a = "sr_" + o.toLowerCase().replaceSpecialChars().replace(/\s/g, "-");
y.tmpCurrentLabel = {
fieldsetParent: [t, n],
elem: i
},
y[n][e.toString()] = {
className: a,
title: o
},
i.addClass(a).attr({
title: o,
index: e
}),
r.labelCallback(y)
}),
void y.fieldsetCount++)
})
},
inputAction: function() {
null !== T && T.abort(),
null !== k && k.abort(),
o = 2,
a = !0
},
addFilter: function(t) {
p += "&" + (t.attr("rel") || ""),
w.fadeTo(300, .6),
u = _.getUrl(),
k = jQuery.ajax({
url: u,
success: I.filterAjaxSuccess,
error: I.filterAjaxError
}),
t.parent().addClass("sr_selected")
},
removeFilter: function(t) {
var e = t.attr("rel") || "";
w.fadeTo(300, .6),
"" !== e && (p = p.replace("&" + e, "")),
u = _.getUrl(),
k = jQuery.ajax({
url: u,
success: I.filterAjaxSuccess,
error: I.filterAjaxError
}),
t.parent().removeClass("sr_selected")
},
filterAjaxSuccess: function(t) {
var e = jQuery(t);
w.fadeTo(300, 0, function() {
jQuery(this).hide()
}),
I.updateContent(e),
g.requests++,
r.ajaxCallback(g),
l.animate({
scrollTop: r.filterScrollTop(C || {
top: 0,
left: 0
})
}, 600),
setTimeout(function() {}, 2e3)
},
filterAjaxError: function() {
w.fadeTo(300, 0, function() {
jQuery(this).hide()
})
},
updateContent: function(t) {
if (f = !0,
!r.authorizeUpdate(g))
return !1;
var e = t.filter(r.shelfClass)
, n = h.find(r.shelfClass);
$(".x-prateleira").removeClass("x-empty"),
(n.length > 0 ? n : r.emptySearchElem).slideUp(600, function() {
jQuery(this).remove(),
r.usePopup ? c.find(".boxPopUp2").vtexPopUp2() : r.emptySearchElem.remove(),
e.length > 0 ? (e.hide(),
h.append(e),
r.shelfCallback(),
e.slideDown(600, function() {
f = !1
}),
g.isEmpty = !1) : (g.isEmpty = !0,
r.usePopup ? r.emptySearchElem.addClass("freeContent autoClose ac_" + r.popupAutoCloseSeconds).vtexPopUp2().stop(!0).show() : (h.append(r.emptySearchElem),
r.emptySearchElem.show().css("height", "auto").fadeTo(300, .2, function() {
r.emptySearchElem.fadeTo(300, 1)
})),
r.emptySearchCallback(g))
}),
setTimeout(function() {}, 2e3)
},
adjustText: function(t) {
var e = t.parent()
, n = e.text();
qtt = "",
n = I.removeCounter(n),
e.text(n).prepend(t)
},
removeCounter: function(t) {
return t.replace(/\([0-9]+\)/gi, function(t) {
return qtt = t.replace(/\(|\)/, ""),
""
})
},
setFilterMenu: function() {
m.length > 0 && (b.hide(),
m.show())
}
};
c.hasClass("departamento") ? I.mergeMenu() : (c.hasClass("categoria") || c.hasClass("resultado-busca")) && I.mergeMenuList(),
I.exec(),
_.scrollToTop(),
r.callback(),
m.css("visibility", "visible"),
$(".x-ordenar a").each(function() {
var t = $(this).attr("href");
$(this).attr("data-rel", t),
$(this).attr("href", "javascript:void(0)")
}).click(function() {
$(".x-ordenar > span").text($(this).text()),
S = "1",
v = $(this).attr("data-rel"),
u = _.getUrl(),
k = jQuery.ajax({
url: u,
success: I.filterAjaxSuccess,
error: I.filterAjaxError
}),
$(".pages .first").click()
}),
changingPages = function(t) {
S = t.text(),
u = _.getUrl(),
k = jQuery.ajax({
url: u,
success: I.filterAjaxSuccess,
error: I.filterAjaxError
}),
$(".pages .page-number").removeClass("pgCurrent"),
t.addClass("pgCurrent")
}
,
$(".pages .page-number").unbind("click"),
$(".pages .page-number").bind("click", function(t) {
changingPages($(this))
}),
$(".pages .previous").click(function() {
changingPages($(this).prev())
}),
$(".pages .next").click(function() {
changingPages($(this).next())
})
}
,
$(document).ready(function() {
$(".search-multiple-navigator input[type='checkbox']").vtexSmartResearch(),
$(".pager.bottom").html('<div id="x-infinityScroll">Carregar mais produtos</div>')
}),
"function" != typeof String.prototype.trim && (String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g, "")
}
),
function(t) {
"function" != typeof t.fn.QD_infinityScroll && (window._QuatroDigital_InfinityScroll = window._QuatroDigital_InfinityScroll || {},
t.fn.QD_infinityScroll = function(e) {
var n, r, i, o, a, s, l, c;
if (c = window._QuatroDigital_InfinityScroll,
r = function(t, e) {
if ("object" == typeof console) {
var n = "object" == typeof t;
void 0 === e || "alerta" !== e.toLowerCase() && "aviso" !== e.toLowerCase() ? void 0 !== e && "info" === e.toLowerCase() ? n ? console.info("[Infinity Scroll]\n", t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7]) : console.info("[Infinity Scroll]\n" + t) : n ? console.error("[Infinity Scroll]\n", t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7]) : console.error("[Infinity Scroll]\n" + t) : n ? console.warn("[Infinity Scroll]\n", t[0], t[1], t[2], t[3], t[4], t[5], t[6], t[7]) : console.warn("[Infinity Scroll]\n" + t)
}
}
,
n = {
lastShelf: ">div:last",
elemLoading: '<div id="scrollLoading"></div>',
searchUrl: null,
returnToTop: t('<div id="returnToTop"></div>'),
callback: function() {},
getShelfHeight: function() {
return o.scrollTop() + o.height()
},
paginate: null,
insertContent: function(t, e) {
t.after(e)
},
authorizeScroll: function() {
return !0
}
},
i = jQuery.extend({}, n, e),
o = jQuery(this),
1 > o.length)
return o;
1 < o.length && (r("Identifiquei que a seletor informado (" + o.selector + ") retornou " + o.length + " elementos.\n Para solucionar o problema estou selecionando automáticamente o primeiro com o id: #" + (o.filter("[id^=ResultItems]:first").attr("id") || "!Not Found"), "Aviso"),
o = o.filter("[id^=ResultItems]:first")),
o.filter("[id^=ResultItems]").length || r("Certifique-se que esta selecionando o elemento correto.\n O plugin espera que o elemento seja o que contém o id: #" + (t("div[id^=ResultItems]").attr("id") || "!Not Found"), "Info"),
o.parent().filter("[id^=ResultItems]").length && (r("Identifiquei que o seletor pai do elemento que você informou é o #" + (jQuery("div[id^=ResultItems]").attr("id") || "!Not Found") + ".\n Como forma de corrigir esse problema de seleção de elemento, assumirei prateleira correta.", "Aviso"),
o = o.parent()),
t("body").append(i.returnToTop),
a = t(window),
s = t(document),
c.toTopE = t(i.returnToTop),
l = t(i.elemLoading),
c.moreResults = !0,
c.currentPage = 2;
var u = {
scrollToTop: function() {
var t = a.height();
a.bind("resize.QD_infinityScroll", function() {
t = a.height()
}),
a.bind("scroll.QD_infinityScroll", function() {
s.scrollTop() > t ? c.toTopE.stop(!0).fadeTo(300, 1, function() {
c.toTopE.show()
}) : c.toTopE.stop(!0).fadeTo(300, 0, function() {
c.toTopE.hide()
})
}),
c.buttonToTop = c.toTopE.find("a").bind("click.QD_infinityScroll", function() {
return jQuery("html,body").animate({
scrollTop: 0
}, "slow"),
!1
})
},
getSearchUrl: function() {
var t, e, n, i;
return jQuery("script:not([src])").each(function() {
return e = jQuery(this)[0].innerHTML,
n = /\/buscapagina\?.+&PageNumber=/i,
i = /\/paginaprateleira\?.+PageNumber=/i,
-1 < e.indexOf("buscapagina") ? (t = n.exec(e),
!1) : -1 < e.indexOf("paginaprateleira") ? (t = i.exec(e),
!1) : void 0
}),
void 0 !== t && void 0 !== t[0] ? t[0].replace("paginaprateleira", "buscapagina") : (r("Não foi possível localizar a url de busca da página.\n Tente adicionar o .js ao final da página. \n[Método: getSearchUrl]"),
"")
},
infinityScroll: function() {
var e, n, s;
if (c.searchUrl = null !== i.searchUrl ? i.searchUrl : u.getSearchUrl(),
c.currentStatus = !0,
"" !== (e = t(".pager[id*=PagerTop]:first").attr("id") || "") && (c.pages = window["pagecount_" + e.split("_").pop()],
void 0 === c.pages))
for (s in window)
if (/pagecount_[0-9]+/.test(s)) {
c.pages = window[s];
break
}
void 0 === c.pages && (c.pages = 9999999999999),
n = function() {
if (c.currentStatus) {
var e = o.find(i.lastShelf);
if (1 > e.length)
return r("Última Prateleira/Vitrine não encontrada \n (" + e.selector + ")"),
!1;
e.after(l),
c.currentStatus = !1;
var n = c.currentPage;
urlMaisProdutos = c.searchUrl.replace(/pagenumber\=[0-9]*/i, "PageNumber=" + c.currentPage),
console.log(urlMaisProdutos),
"" != urlFiltro && (urlMaisProdutos = urlFiltro.replace(/pagenumber\=[0-9]*/i, "PageNumber=" + c.currentPage)),
t.ajax({
url: urlMaisProdutos,
dataType: "html",
success: function(t) {
1 > t.trim().length ? (c.moreResults = !1,
r("Não existem mais resultados a partir da página: " + n, "Aviso")) : i.insertContent(e, t),
c.currentStatus = !0,
l.remove()
},
error: function() {
r("Houve um erro na requisição Ajax de uma nova página.")
},
complete: function(t, e) {
i.callback()
}
}),
c.currentPage++
}
}
,
"function" == typeof i.paginate ? i.paginate(function() {
c.currentPage <= c.pages && c.moreResults && n()
}) : a.bind("scroll.QD_infinityScroll_paginate", function() {
$("body").on("click", "#x-infinityScroll", function(t) {
return !!(c.currentPage <= c.pages && c.moreResults && i.authorizeScroll()) && (n(),
void setTimeout(function() {}, 3e3))
})
})
}
};
return u.scrollToTop(),
u.infinityScroll(),
o
}
)
}(jQuery),
// $(document).ready(function() {
// $(".prateleira-categoria[id*=ResultItems]").QD_infinityScroll(),
// setTimeout(function() {
// $(".search-multiple-navigator input").vtexSmartResearch(),
// $(".pager.bottom").html('<div id="x-infinityScroll">Carregar mais produtos</div>')
// }, 1e3)
// }),
function(t, e) {
"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : t.Vue = e()
}(this, function() {
"use strict";
function t(t) {
return void 0 === t || null === t
}
function e(t) {
return void 0 !== t && null !== t
}
function n(t) {
return !0 === t
}
function r(t) {
return "string" == typeof t || "number" == typeof t
}
function i(t) {
return null !== t && "object" == typeof t
}
function o(t) {
return "[object Object]" === Ji.call(t)
}
function a(t) {
return "[object RegExp]" === Ji.call(t)
}
function s(t) {
return null == t ? "" : "object" == typeof t ? JSON.stringify(t, null, 2) : String(t)
}
function l(t) {
var e = parseFloat(t);
return isNaN(e) ? t : e
}
function c(t, e) {
for (var n = Object.create(null), r = t.split(","), i = 0; i < r.length; i++)
n[r[i]] = !0;
return e ? function(t) {
return n[t.toLowerCase()]
}
: function(t) {
return n[t]
}
}
function u(t, e) {
if (t.length) {
var n = t.indexOf(e);
if (n > -1)
return t.splice(n, 1)
}
}
function p(t, e) {
return Wi.call(t, e)
}
function d(t) {
var e = Object.create(null);
return function(n) {
return e[n] || (e[n] = t(n))
}
}
function f(t, e) {
function n(n) {
var r = arguments.length;
return r ? r > 1 ? t.apply(e, arguments) : t.call(e, n) : t.call(e)
}
return n._length = t.length,
n
}
function h(t, e) {
e = e || 0;
for (var n = t.length - e, r = new Array(n); n--; )
r[n] = t[n + e];
return r
}
function m(t, e) {
for (var n in e)
t[n] = e[n];
return t
}
function v(t) {
for (var e = {}, n = 0; n < t.length; n++)
t[n] && m(e, t[n]);
return e
}
function g() {}
function y(t) {
return t.reduce(function(t, e) {
return t.concat(e.staticKeys || [])
}, []).join(",")
}
function _(t, e) {
var n = i(t)
, r = i(e);
if (!n || !r)
return !n && !r && String(t) === String(e);
try {
return JSON.stringify(t) === JSON.stringify(e)
} catch (n) {
return t === e
}
}
function b(t, e) {
for (var n = 0; n < t.length; n++)
if (_(t[n], e))
return n;
return -1
}
function w(t) {
var e = !1;
return function() {
e || (e = !0,
t.apply(this, arguments))
}
}
function x(t) {
var e = (t + "").charCodeAt(0);
return 36 === e || 95 === e
}
function C(t, e, n, r) {
Object.defineProperty(t, e, {
value: n,
enumerable: !!r,
writable: !0,
configurable: !0
})
}
function $(t) {
if (!co.test(t)) {
var e = t.split(".");
return function(t) {
for (var n = 0; n < e.length; n++) {
if (!t)
return;
t = t[e[n]]
}
return t
}
}
}
function S(t, e, n) {
if (so.errorHandler)
so.errorHandler.call(null, t, e, n);
else {
if (uo("Error in " + n + ': "' + t.toString() + '"', e),
!_o || "undefined" == typeof console)
throw t;
console.error(t)
}
}
function k(t) {
return "function" == typeof t && /native code/.test(t.toString())
}
function T(t) {
Po.target && No.push(Po.target),
Po.target = t
}
function I() {
Po.target = No.pop()
}
function O(t, e) {
t.__proto__ = e
}
function A(t, e, n) {
for (var r = 0, i = n.length; i > r; r++) {
var o = n[r];
C(t, o, e[o])
}
}
function j(t, e) {
if (i(t)) {
var n;
return p(t, "__ob__") && t.__ob__ instanceof Bo ? n = t.__ob__ : Uo.shouldConvert && !jo() && (Array.isArray(t) || o(t)) && Object.isExtensible(t) && !t._isVue && (n = new Bo(t)),
e && n && n.vmCount++,
n
}
}
function R(t, e, n, r) {
var i = new Po
, o = Object.getOwnPropertyDescriptor(t, e);
if (!o || !1 !== o.configurable) {
var a = o && o.get
, s = o && o.set
, l = j(n);
Object.defineProperty(t, e, {
enumerable: !0,
configurable: !0,
get: function() {
var e = a ? a.call(t) : n;
return Po.target && (i.depend(),
l && l.dep.depend(),
Array.isArray(e) && D(e)),
e
},
set: function(e) {
var o = a ? a.call(t) : n;
e === o || e !== e && o !== o || (r && r(),
s ? s.call(t, e) : n = e,
l = j(e),
i.notify())
}
})
}
}
function E(t, e, n) {
if (Array.isArray(t) && "number" == typeof e)
return t.length = Math.max(t.length, e),
t.splice(e, 1, n),
n;
if (p(t, e))
return t[e] = n,
n;
var r = t.__ob__;
return t._isVue || r && r.vmCount ? (uo("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),
n) : r ? (R(r.value, e, n),
r.dep.notify(),
n) : (t[e] = n,
n)
}
function M(t, e) {
if (Array.isArray(t) && "number" == typeof e)
return void t.splice(e, 1);
var n = t.__ob__;
return t._isVue || n && n.vmCount ? void uo("Avoid deleting properties on a Vue instance or its root $data - just set it to null.") : void (p(t, e) && (delete t[e],
n && n.dep.notify()))
}
function D(t) {
for (var e = void 0, n = 0, r = t.length; r > n; n++)
e = t[n],
e && e.__ob__ && e.__ob__.dep.depend(),
Array.isArray(e) && D(e)
}
function P(t, e) {
if (!e)
return t;
for (var n, r, i, a = Object.keys(e), s = 0; s < a.length; s++)
n = a[s],
r = t[n],
i = e[n],
p(t, n) ? o(r) && o(i) && P(r, i) : E(t, n, i);
return t
}
function N(t, e) {
return e ? t ? t.concat(e) : Array.isArray(e) ? e : [e] : t
}
function L(t, e) {
var n = Object.create(t || null);
return e ? m(n, e) : n
}
function F(t) {
for (var e in t.components) {
var n = e.toLowerCase();
(Gi(n) || so.isReservedTag(n)) && uo("Do not use built-in or reserved HTML elements as component id: " + e)
}
}
function z(t) {
var e = t.props;
if (e) {
var n, r, i, a = {};
if (Array.isArray(e))
for (n = e.length; n--; )
r = e[n],
"string" == typeof r ? (i = Xi(r),
a[i] = {
type: null
}) : uo("props must be strings when using array syntax.");
else if (o(e))
for (var s in e)
r = e[s],
i = Xi(s),
a[i] = o(r) ? r : {
type: r
};
t.props = a
}
}
function U(t) {
var e = t.directives;
if (e)
for (var n in e) {
var r = e[n];
"function" == typeof r && (e[n] = {
bind: r,
update: r
})
}
}
function B(t, e, n) {
function r(r) {
var i = qo[r] || Qo;
l[r] = i(t[r], e[r], n, r)
}
F(e),
"function" == typeof e && (e = e.options),
z(e),
U(e);
var i = e.extends;
if (i && (t = B(t, i, n)),
e.mixins)
for (var o = 0, a = e.mixins.length; a > o; o++)
t = B(t, e.mixins[o], n);
var s, l = {};
for (s in t)
r(s);
for (s in e)
p(t, s) || r(s);
return l
}
function q(t, e, n, r) {
if ("string" == typeof n) {
var i = t[e];
if (p(i, n))
return i[n];
var o = Xi(n);
if (p(i, o))
return i[o];
var a = Yi(o);
if (p(i, a))
return i[a];
var s = i[n] || i[o] || i[a];
return r && !s && uo("Failed to resolve " + e.slice(0, -1) + ": " + n, t),
s
}
}
function H(t, e, n, r) {
var i = e[t]
, o = !p(n, t)
, a = n[t];
if (G(Boolean, i.type) && (o && !p(i, "default") ? a = !1 : G(String, i.type) || "" !== a && a !== eo(t) || (a = !0)),
void 0 === a) {
a = V(r, i, t);
var s = Uo.shouldConvert;
Uo.shouldConvert = !0,
j(a),
Uo.shouldConvert = s
}
return Q(i, t, a, r, o),
a
}
function V(t, e, n) {
if (p(e, "default")) {
var r = e.default;
return i(r) && uo('Invalid default value for prop "' + n + '": Props with type Object/Array must use a factory function to return the default value.', t),
t && t.$options.propsData && void 0 === t.$options.propsData[n] && void 0 !== t._props[n] ? t._props[n] : "function" == typeof r && "Function" !== J(e.type) ? r.call(t) : r
}
}
function Q(t, e, n, r, i) {
if (t.required && i)
return void uo('Missing required prop: "' + e + '"', r);
if (null != n || t.required) {
var o = t.type
, a = !o || !0 === o
, s = [];
if (o) {
Array.isArray(o) || (o = [o]);
for (var l = 0; l < o.length && !a; l++) {
var c = Z(n, o[l]);
s.push(c.expectedType || ""),
a = c.valid
}
}
if (!a)
return void uo('Invalid prop: type check failed for prop "' + e + '". Expected ' + s.map(Yi).join(", ") + ", got " + Object.prototype.toString.call(n).slice(8, -1) + ".", r);
var u = t.validator;
u && (u(n) || uo('Invalid prop: custom validator check failed for prop "' + e + '".', r))
}
}
function Z(t, e) {
var n, r = J(e);
return n = Zo.test(r) ? typeof t === r.toLowerCase() : "Object" === r ? o(t) : "Array" === r ? Array.isArray(t) : t instanceof e,
{
valid: n,
expectedType: r
}
}
function J(t) {
var e = t && t.toString().match(/^\s*function (\w+)/);
return e ? e[1] : ""
}
function G(t, e) {
if (!Array.isArray(e))
return J(e) === J(t);
for (var n = 0, r = e.length; r > n; n++)
if (J(e[n]) === J(t))
return !0;
return !1
}
function W(t) {
return new na(void 0,void 0,void 0,String(t))
}
function K(t) {
var e = new na(t.tag,t.data,t.children,t.text,t.elm,t.context,t.componentOptions);
return e.ns = t.ns,
e.isStatic = t.isStatic,
e.key = t.key,
e.isCloned = !0,
e
}
function X(t) {
for (var e = t.length, n = new Array(e), r = 0; e > r; r++)
n[r] = K(t[r]);
return n
}
function Y(t) {
function e() {
var t = arguments
, n = e.fns;
if (!Array.isArray(n))
return n.apply(null, arguments);
for (var r = 0; r < n.length; r++)
n[r].apply(null, t)
}
return e.fns = t,
e
}
function tt(e, n, r, i, o) {
var a, s, l, c;
for (a in e)
s = e[a],
l = n[a],
c = aa(a),
t(s) ? uo('Invalid handler for event "' + c.name + '": got ' + String(s), o) : t(l) ? (t(s.fns) && (s = e[a] = Y(s)),
r(c.name, s, c.once, c.capture, c.passive)) : s !== l && (l.fns = s,
e[a] = l);
for (a in n)
t(e[a]) && (c = aa(a),
i(c.name, n[a], c.capture))
}
function et(r, i, o) {
function a() {
o.apply(this, arguments),
u(s.fns, a)
}
var s, l = r[i];
t(l) ? s = Y([a]) : e(l.fns) && n(l.merged) ? (s = l,
s.fns.push(a)) : s = Y([l, a]),
s.merged = !0,
r[i] = s
}
function nt(n, r, i) {
var o = r.options.props;
if (!t(o)) {
var a = {}
, s = n.attrs
, l = n.props;
if (e(s) || e(l))
for (var c in o) {
var u = eo(c)
, d = c.toLowerCase();
c !== d && s && p(s, d) && po('Prop "' + d + '" is passed to component ' + Zi(i || r) + ', but the declared prop name is "' + c + '". Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM templates. You should probably use "' + u + '" instead of "' + c + '".'),
rt(a, l, c, u, !0) || rt(a, s, c, u, !1)
}
return a
}
}
function rt(t, n, r, i, o) {
if (e(n)) {
if (p(n, r))
return t[r] = n[r],
o || delete n[r],
!0;
if (p(n, i))
return t[r] = n[i],
o || delete n[i],
!0
}
return !1
}
function it(t) {
for (var e = 0; e < t.length; e++)
if (Array.isArray(t[e]))
return Array.prototype.concat.apply([], t);
return t
}
function ot(t) {
return r(t) ? [W(t)] : Array.isArray(t) ? at(t) : void 0
}
function at(n, i) {
var o, a, s, l = [];
for (o = 0; o < n.length; o++)
a = n[o],
t(a) || "boolean" == typeof a || (s = l[l.length - 1],
Array.isArray(a) ? l.push.apply(l, at(a, (i || "") + "_" + o)) : r(a) ? e(s) && e(s.text) ? s.text += String(a) : "" !== a && l.push(W(a)) : e(a.text) && e(s) && e(s.text) ? l[l.length - 1] = W(s.text + a.text) : (e(a.tag) && t(a.key) && e(i) && (a.key = "__vlist" + i + "_" + o + "__"),
l.push(a)));
return l
}
function st(t, e) {
return i(t) ? e.extend(t) : t
}
function lt(r, o, a) {
if (n(r.error) && e(r.errorComp))
return r.errorComp;
if (e(r.resolved))
return r.resolved;
if (n(r.loading) && e(r.loadingComp))
return r.loadingComp;
if (!e(r.contexts)) {
var s = r.contexts = [a]
, l = !0
, c = function() {
for (var t = 0, e = s.length; e > t; t++)
s[t].$forceUpdate()
}
, u = w(function(t) {
r.resolved = st(t, o),
l || c()
})
, p = w(function(t) {
uo("Failed to resolve async component: " + String(r) + (t ? "\nReason: " + t : "")),
e(r.errorComp) && (r.error = !0,
c())
})
, d = r(u, p);
return i(d) && ("function" == typeof d.then ? t(r.resolved) && d.then(u, p) : e(d.component) && "function" == typeof d.component.then && (d.component.then(u, p),
e(d.error) && (r.errorComp = st(d.error, o)),
e(d.loading) && (r.loadingComp = st(d.loading, o),
0 === d.delay ? r.loading = !0 : setTimeout(function() {
t(r.resolved) && t(r.error) && (r.loading = !0,
c())
}, d.delay || 200)),
e(d.timeout) && setTimeout(function() {
p("timeout (" + d.timeout + "ms)")
}, d.timeout))),
l = !1,
r.loading ? r.loadingComp : r.resolved
}
r.contexts.push(a)
}
function ct(t) {
if (Array.isArray(t))
for (var n = 0; n < t.length; n++) {
var r = t[n];
if (e(r) && e(r.componentOptions))
return r
}
}
function ut(t) {
t._events = Object.create(null),
t._hasHookEvent = !1;
var e = t.$options._parentListeners;
e && ft(t, e)
}
function pt(t, e, n) {
n ? ia.$once(t, e) : ia.$on(t, e)
}
function dt(t, e) {
ia.$off(t, e)
}
function ft(t, e, n) {
ia = t,
tt(e, n || {}, pt, dt, t)
}
function ht(t) {
var e = /^hook:/;
t.prototype.$on = function(t, n) {
var r = this
, i = this;
if (Array.isArray(t))
for (var o = 0, a = t.length; a > o; o++)
r.$on(t[o], n);
else
(i._events[t] || (i._events[t] = [])).push(n),
e.test(t) && (i._hasHookEvent = !0);
return i
}
,
t.prototype.$once = function(t, e) {
function n() {
r.$off(t, n),
e.apply(r, arguments)
}
var r = this;
return n.fn = e,
r.$on(t, n),
r
}
,
t.prototype.$off = function(t, e) {
var n = this
, r = this;
if (!arguments.length)
return r._events = Object.create(null),
r;
if (Array.isArray(t)) {
for (var i = 0, o = t.length; o > i; i++)
n.$off(t[i], e);
return r
}
var a = r._events[t];
if (!a)
return r;
if (1 === arguments.length)
return r._events[t] = null,
r;
for (var s, l = a.length; l--; )
if ((s = a[l]) === e || s.fn === e) {
a.splice(l, 1);
break
}
return r
}
,
t.prototype.$emit = function(t) {
var e = this
, n = t.toLowerCase();
n !== t && e._events[n] && po('Event "' + n + '" is emitted in component ' + Zi(e) + ' but the handler is registered for "' + t + '". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "' + eo(t) + '" instead of "' + t + '".');
var r = e._events[t];
if (r) {
r = r.length > 1 ? h(r) : r;
for (var i = h(arguments, 1), o = 0, a = r.length; a > o; o++)
r[o].apply(e, i)
}
return e
}
}
function mt(t, e) {
var n = {};
if (!t)
return n;
for (var r = [], i = 0, o = t.length; o > i; i++) {
var a = t[i];
if (a.context !== e && a.functionalContext !== e || !a.data || null == a.data.slot)
r.push(a);
else {
var s = a.data.slot
, l = n[s] || (n[s] = []);
"template" === a.tag ? l.push.apply(l, a.children) : l.push(a)
}
}
return r.every(vt) || (n.default = r),
n
}
function vt(t) {
return t.isComment || " " === t.text
}
function gt(t) {
for (var e = {}, n = 0; n < t.length; n++)
e[t[n][0]] = t[n][1];
return e
}
function yt(t) {
var e = t.$options
, n = e.parent;
if (n && !e.abstract) {
for (; n.$options.abstract && n.$parent; )
n = n.$parent;
n.$children.push(t)
}
t.$parent = n,
t.$root = n ? n.$root : t,
t.$children = [],
t.$refs = {},
t._watcher = null,
t._inactive = null,
t._directInactive = !1,
t._isMounted = !1,
t._isDestroyed = !1,
t._isBeingDestroyed = !1
}
function _t(t) {
t.prototype._update = function(t, e) {
var n = this;
n._isMounted && St(n, "beforeUpdate");
var r = n.$el
, i = n._vnode
, o = sa;
sa = n,
n._vnode = t,
n.$el = i ? n.__patch__(i, t) : n.__patch__(n.$el, t, e, !1, n.$options._parentElm, n.$options._refElm),
sa = o,
r && (r.__vue__ = null),
n.$el && (n.$el.__vue__ = n),
n.$vnode && n.$parent && n.$vnode === n.$parent._vnode && (n.$parent.$el = n.$el)
}
,
t.prototype.$forceUpdate = function() {
var t = this;
t._watcher && t._watcher.update()
}
,
t.prototype.$destroy = function() {
var t = this;
if (!t._isBeingDestroyed) {
St(t, "beforeDestroy"),
t._isBeingDestroyed = !0;
var e = t.$parent;
!e || e._isBeingDestroyed || t.$options.abstract || u(e.$children, t),
t._watcher && t._watcher.teardown();
for (var n = t._watchers.length; n--; )
t._watchers[n].teardown();
t._data.__ob__ && t._data.__ob__.vmCount--,
t._isDestroyed = !0,
t.__patch__(t._vnode, null),
St(t, "destroyed"),
t.$off(),
t.$el && (t.$el.__vue__ = null),
t.$options._parentElm = t.$options._refElm = null
}
}
}
function bt(t, e, n) {
t.$el = e,
t.$options.render || (t.$options.render = oa,
t.$options.template && "#" !== t.$options.template.charAt(0) || t.$options.el || e ? uo("You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.", t) : uo("Failed to mount component: template or render function not defined.", t)),
St(t, "beforeMount");
var r;
return r = so.performance && Ho ? function() {
var e = t._name
, r = t._uid
, i = "vue-perf-start:" + r
, o = "vue-perf-end:" + r;
Ho(i);
var a = t._render();
Ho(o),
Vo(e + " render", i, o),
Ho(i),
t._update(a, n),
Ho(o),
Vo(e + " patch", i, o)
}
: function() {
t._update(t._render(), n)
}
,
t._watcher = new ga(t,r,g),
n = !1,
null == t.$vnode && (t._isMounted = !0,
St(t, "mounted")),
t
}
function wt(t, e, n, r, i) {
var o = !!(i || t.$options._renderChildren || r.data.scopedSlots || t.$scopedSlots !== lo);
if (t.$options._parentVnode = r,
t.$vnode = r,
t._vnode && (t._vnode.parent = r),
t.$options._renderChildren = i,
e && t.$options.props) {
Uo.shouldConvert = !1,
Uo.isSettingProps = !0;
for (var a = t._props, s = t.$options._propKeys || [], l = 0; l < s.length; l++) {
var c = s[l];
a[c] = H(c, t.$options.props, e, t)
}
Uo.shouldConvert = !0,
Uo.isSettingProps = !1,
t.$options.propsData = e
}
if (n) {
var u = t.$options._parentListeners;
t.$options._parentListeners = n,
ft(t, n, u)
}
o && (t.$slots = mt(i, r.context),
t.$forceUpdate())
}
function xt(t) {
for (; t && (t = t.$parent); )
if (t._inactive)
return !0;
return !1
}
function Ct(t, e) {
if (e) {
if (t._directInactive = !1,
xt(t))
return
} else if (t._directInactive)
return;
if (t._inactive || null === t._inactive) {
t._inactive = !1;
for (var n = 0; n < t.$children.length; n++)
Ct(t.$children[n]);
St(t, "activated")
}
}
function $t(t, e) {
if (!(e && (t._directInactive = !0,
xt(t)) || t._inactive)) {
t._inactive = !0;
for (var n = 0; n < t.$children.length; n++)
$t(t.$children[n]);
St(t, "deactivated")
}
}
function St(t, e) {
var n = t.$options[e];
if (n)
for (var r = 0, i = n.length; i > r; r++)
try {
n[r].call(t)
} catch (n) {
S(n, t, e + " hook")
}
t._hasHookEvent && t.$emit("hook:" + e)
}
function kt() {
ca.length = ua.length = 0,
pa = {},
da = {},
fa = ha = !1
}
function Tt() {
ha = !0;
var t, e;
for (ca.sort(function(t, e) {
return t.id - e.id
}),
ma = 0; ma < ca.length; ma++)
if (t = ca[ma],
e = t.id,
pa[e] = null,
t.run(),
null != pa[e] && (da[e] = (da[e] || 0) + 1,
da[e] > la)) {
uo("You may have an infinite update loop " + (t.user ? 'in watcher with expression "' + t.expression + '"' : "in a component render function."), t.vm);
break
}
var n = ua.slice()
, r = ca.slice();
kt(),
At(n),
It(r),
Ro && so.devtools && Ro.emit("flush")
}
function It(t) {
for (var e = t.length; e--; ) {
var n = t[e]
, r = n.vm;
r._watcher === n && r._isMounted && St(r, "updated")
}
}
function Ot(t) {
t._inactive = !1,
ua.push(t)
}
function At(t) {
for (var e = 0; e < t.length; e++)
t[e]._inactive = !0,
Ct(t[e], !0)
}
function jt(t) {
var e = t.id;
if (null == pa[e]) {
if (pa[e] = !0,
ha) {
for (var n = ca.length - 1; n >= 0 && ca[n].id > t.id; )
n--;
ca.splice(Math.max(n, ma) + 1, 0, t)
} else
ca.push(t);
fa || (fa = !0,
Mo(Tt))
}
}
function Rt(t) {
ya.clear(),
Et(t, ya)
}
function Et(t, e) {
var n, r, o = Array.isArray(t);
if ((o || i(t)) && Object.isExtensible(t)) {
if (t.__ob__) {
var a = t.__ob__.dep.id;
if (e.has(a))
return;
e.add(a)
}
if (o)
for (n = t.length; n--; )
Et(t[n], e);
else
for (r = Object.keys(t),
n = r.length; n--; )
Et(t[r[n]], e)
}
}
function Mt(t, e, n) {
_a.get = function() {
return this[e][n]
}
,
_a.set = function(t) {
this[e][n] = t
}
,
Object.defineProperty(t, n, _a)
}
function Dt(t) {
t._watchers = [];
var e = t.$options;
e.props && Pt(t, e.props),
e.methods && Bt(t, e.methods),
e.data ? Nt(t) : j(t._data = {}, !0),
e.computed && Ft(t, e.computed),
e.watch && qt(t, e.watch)
}
function Pt(t, e) {
var n = t.$options.propsData || {}
, r = t._props = {}
, i = t.$options._propKeys = []
, o = !t.$parent;
Uo.shouldConvert = o;
var a = function(o) {
i.push(o);
var a = H(o, e, n, t);
(ba[o] || so.isReservedAttr(o)) && uo('"' + o + '" is a reserved attribute and cannot be used as component prop.', t),
R(r, o, a, function() {
t.$parent && !Uo.isSettingProps && uo("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's value. Prop being mutated: \"" + o + '"', t)
}),
o in t || Mt(t, "_props", o)
};
for (var s in e)
a(s);
Uo.shouldConvert = !0
}
function Nt(t) {
var e = t.$options.data;
e = t._data = "function" == typeof e ? Lt(e, t) : e || {},
o(e) || (e = {},
uo("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function", t));
for (var n = Object.keys(e), r = t.$options.props, i = n.length; i--; )
r && p(r, n[i]) ? uo('The data property "' + n[i] + '" is already declared as a prop. Use prop default value instead.', t) : x(n[i]) || Mt(t, "_data", n[i]);
j(e, !0)
}
function Lt(t, e) {
try {
return t.call(e)
} catch (t) {
return S(t, e, "data()"),
{}
}
}
function Ft(t, e) {
var n = t._computedWatchers = Object.create(null);
for (var r in e) {
var i = e[r]
, o = "function" == typeof i ? i : i.get;
void 0 === o && (uo('No getter function has been defined for computed property "' + r + '".', t),
o = g),
n[r] = new ga(t,o,g,wa),
r in t ? r in t.$data ? uo('The computed property "' + r + '" is already defined in data.', t) : t.$options.props && r in t.$options.props && uo('The computed property "' + r + '" is already defined as a prop.', t) : zt(t, r, i)
}
}
function zt(t, e, n) {
"function" == typeof n ? (_a.get = Ut(e),
_a.set = g) : (_a.get = n.get ? !1 !== n.cache ? Ut(e) : n.get : g,
_a.set = n.set ? n.set : g),
Object.defineProperty(t, e, _a)
}
function Ut(t) {
return function() {
var e = this._computedWatchers && this._computedWatchers[t];
return e ? (e.dirty && e.evaluate(),
Po.target && e.depend(),
e.value) : void 0
}
}
function Bt(t, e) {
var n = t.$options.props;
for (var r in e)
t[r] = null == e[r] ? g : f(e[r], t),
null == e[r] && uo('method "' + r + '" has an undefined value in the component definition. Did you reference the function correctly?', t),
n && p(n, r) && uo('method "' + r + '" has already been defined as a prop.', t)
}
function qt(t, e) {
for (var n in e) {
var r = e[n];
if (Array.isArray(r))
for (var i = 0; i < r.length; i++)
Ht(t, n, r[i]);
else
Ht(t, n, r)
}
}
function Ht(t, e, n) {
var r;
o(n) && (r = n,
n = n.handler),
"string" == typeof n && (n = t[n]),
t.$watch(e, n, r)
}
function Vt(t) {
var e = {};
e.get = function() {
return this._data
}
;
var n = {};
n.get = function() {
return this._props
}
,
e.set = function(t) {
uo("Avoid replacing instance root $data. Use nested data properties instead.", this)
}
,
n.set = function() {
uo("$props is readonly.", this)
}
,
Object.defineProperty(t.prototype, "$data", e),
Object.defineProperty(t.prototype, "$props", n),
t.prototype.$set = E,
t.prototype.$delete = M,
t.prototype.$watch = function(t, e, n) {
var r = this;
n = n || {},
n.user = !0;
var i = new ga(r,t,e,n);
return n.immediate && e.call(r, i.value),
function() {
i.teardown()
}
}
}
function Qt(t) {
var e = t.$options.provide;
e && (t._provided = "function" == typeof e ? e.call(t) : e)
}
function Zt(t) {
var e = Jt(t.$options.inject, t);
e && Object.keys(e).forEach(function(n) {
R(t, n, e[n], function() {
uo('Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. injection being mutated: "' + n + '"', t)
})
})
}
function Jt(t, e) {
if (t) {
for (var n = Array.isArray(t), r = Object.create(null), i = n ? t : Eo ? Reflect.ownKeys(t) : Object.keys(t), o = 0; o < i.length; o++)
for (var a = i[o], s = n ? a : t[a], l = e; l; ) {
if (l._provided && s in l._provided) {
r[a] = l._provided[s];
break
}
l = l.$parent
}
return r
}
}
function Gt(t, n, r, i, o) {
var a = {}
, s = t.options.props;
if (e(s))
for (var l in s)
a[l] = H(l, s, n);
else
e(r.attrs) && Wt(a, r.attrs),
e(r.props) && Wt(a, r.props);
var c = Object.create(i)
, u = function(t, e, n, r) {
return ne(c, t, e, n, r, !0)
}
, p = t.options.render.call(null, u, {
data: r,
props: a,
children: o,
parent: i,
listeners: r.on || {},
injections: Jt(t.options.inject, i),
slots: function() {
return mt(o, i)
}
});
return p instanceof na && (p.functionalContext = i,
r.slot && ((p.data || (p.data = {})).slot = r.slot)),
p
}
function Wt(t, e) {
for (var n in e)
t[Xi(n)] = e[n]
}
function Kt(r, o, a, s, l) {
if (!t(r)) {
var c = a.$options._base;
if (i(r) && (r = c.extend(r)),
"function" != typeof r)
return void uo("Invalid Component definition: " + String(r), a);
if (!t(r.cid) || void 0 !== (r = lt(r, c, a))) {
ye(r),
o = o || {},
e(o.model) && ee(r.options, o);
var u = nt(o, r, l);
if (n(r.options.functional))
return Gt(r, u, o, a, s);
var p = o.on;
o.on = o.nativeOn,
n(r.options.abstract) && (o = {}),
Yt(o);
var d = r.options.name || l;
return new na("vue-component-" + r.cid + (d ? "-" + d : ""),o,void 0,void 0,void 0,a,{
Ctor: r,
propsData: u,
listeners: p,
tag: l,
children: s
})
}
}
}
function Xt(t, n, r, i) {
var o = t.componentOptions
, a = {
_isComponent: !0,
parent: n,
propsData: o.propsData,
_componentTag: o.tag,
_parentVnode: t,
_parentListeners: o.listeners,
_renderChildren: o.children,
_parentElm: r || null,
_refElm: i || null
}
, s = t.data.inlineTemplate;
return e(s) && (a.render = s.render,
a.staticRenderFns = s.staticRenderFns),
new o.Ctor(a)
}
function Yt(t) {
t.hook || (t.hook = {});
for (var e = 0; e < Ca.length; e++) {
var n = Ca[e]
, r = t.hook[n]
, i = xa[n];
t.hook[n] = r ? te(i, r) : i
}
}
function te(t, e) {
return function(n, r, i, o) {
t(n, r, i, o),
e(n, r, i, o)
}
}
function ee(t, n) {
var r = t.model && t.model.prop || "value"
, i = t.model && t.model.event || "input";
(n.props || (n.props = {}))[r] = n.model.value;
var o = n.on || (n.on = {});
e(o[i]) ? o[i] = [n.model.callback].concat(o[i]) : o[i] = n.model.callback
}
function ne(t, e, i, o, a, s) {
return (Array.isArray(i) || r(i)) && (a = o,
o = i,
i = void 0),
n(s) && (a = Sa),
re(t, e, i, o, a)
}
function re(t, n, r, i, o) {
if (e(r) && e(r.__ob__))
return uo("Avoid using observed data object as vnode data: " + JSON.stringify(r) + "\nAlways create fresh vnode data objects in each render!", t),
oa();
if (!n)
return oa();
Array.isArray(i) && "function" == typeof i[0] && (r = r || {},
r.scopedSlots = {
default: i[0]
},
i.length = 0),
o === Sa ? i = ot(i) : o === $a && (i = it(i));
var a, s;
if ("string" == typeof n) {
var l;
s = so.getTagNamespace(n),
a = so.isReservedTag(n) ? new na(so.parsePlatformTagName(n),r,i,void 0,void 0,t) : e(l = q(t.$options, "components", n)) ? Kt(l, r, t, i, n) : new na(n,r,i,void 0,void 0,t)
} else
a = Kt(n, r, t, i);
return void 0 !== a ? (s && ie(a, s),
a) : oa()
}
function ie(n, r) {
if (n.ns = r,
"foreignObject" !== n.tag && Array.isArray(n.children))
for (var i = 0, o = n.children.length; o > i; i++) {
var a = n.children[i];
e(a.tag) && t(a.ns) && ie(a, r)
}
}
function oe(t, e) {
var n, r, o, a, s;
if (Array.isArray(t) || "string" == typeof t)
for (n = new Array(t.length),
r = 0,
o = t.length; o > r; r++)
n[r] = e(t[r], r);
else if ("number" == typeof t)
for (n = new Array(t),
r = 0; t > r; r++)
n[r] = e(r + 1, r);
else if (i(t))
for (a = Object.keys(t),
n = new Array(a.length),
r = 0,
o = a.length; o > r; r++)
s = a[r],
n[r] = e(t[s], s, r);
return n
}
function ae(t, e, n, r) {
var i = this.$scopedSlots[t];
if (i)
return n = n || {},
r && m(n, r),
i(n) || e;
var o = this.$slots[t];
return o && (o._rendered && uo('Duplicate presence of slot "' + t + '" found in the same render tree - this will likely cause render errors.', this),
o._rendered = !0),
o || e
}
function se(t) {
return q(this.$options, "filters", t, !0) || ro
}
function le(t, e, n) {
var r = so.keyCodes[e] || n;
return Array.isArray(r) ? -1 === r.indexOf(t) : r !== t
}
function ce(t, e, n, r) {
if (n)
if (i(n)) {
Array.isArray(n) && (n = v(n));
var o;
for (var a in n) {
if ("class" === a || "style" === a)
o = t;
else {
var s = t.attrs && t.attrs.type;
o = r || so.mustUseProp(e, s, a) ? t.domProps || (t.domProps = {}) : t.attrs || (t.attrs = {})
}
a in o || (o[a] = n[a])
}
} else
uo("v-bind without argument expects an Object or Array value", this);
return t
}
function ue(t, e) {
var n = this._staticTrees[t];
return n && !e ? Array.isArray(n) ? X(n) : K(n) : (n = this._staticTrees[t] = this.$options.staticRenderFns[t].call(this._renderProxy),
de(n, "__static__" + t, !1),
n)
}
function pe(t, e, n) {
return de(t, "__once__" + e + (n ? "_" + n : ""), !0),
t
}
function de(t, e, n) {
if (Array.isArray(t))
for (var r = 0; r < t.length; r++)
t[r] && "string" != typeof t[r] && fe(t[r], e + "_" + r, n);
else
fe(t, e, n)
}
function fe(t, e, n) {
t.isStatic = !0,
t.key = e,
t.isOnce = n
}
function he(t) {
t._vnode = null,
t._staticTrees = null;
var e = t.$vnode = t.$options._parentVnode
, n = e && e.context;
t.$slots = mt(t.$options._renderChildren, n),
t.$scopedSlots = lo,
t._c = function(e, n, r, i) {
return ne(t, e, n, r, i, !1)
}
,
t.$createElement = function(e, n, r, i) {
return ne(t, e, n, r, i, !0)
}
}
function me(t) {
t.prototype.$nextTick = function(t) {
return Mo(t, this)
}
,
t.prototype._render = function() {
var t = this
, e = t.$options
, n = e.render
, r = e.staticRenderFns
, i = e._parentVnode;
if (t._isMounted)
for (var o in t.$slots)
t.$slots[o] = X(t.$slots[o]);
t.$scopedSlots = i && i.data.scopedSlots || lo,
r && !t._staticTrees && (t._staticTrees = []),
t.$vnode = i;
var a;
try {
a = n.call(t._renderProxy, t.$createElement)
} catch (e) {
S(e, t, "render function"),
a = t.$options.renderError ? t.$options.renderError.call(t._renderProxy, t.$createElement, e) : t._vnode
}
return a instanceof na || (Array.isArray(a) && uo("Multiple root nodes returned from render function. Render function should return a single root node.", t),
a = oa()),
a.parent = i,
a
}
,
t.prototype._o = pe,
t.prototype._n = l,
t.prototype._s = s,
t.prototype._l = oe,
t.prototype._t = ae,
t.prototype._q = _,
t.prototype._i = b,
t.prototype._m = ue,
t.prototype._f = se,
t.prototype._k = le,
t.prototype._b = ce,
t.prototype._v = W,
t.prototype._e = oa,
t.prototype._u = gt
}
function ve(t) {
t.prototype._init = function(t) {
var e = this;
e._uid = ka++;
var n, r;
so.performance && Ho && (n = "vue-perf-init:" + e._uid,
r = "vue-perf-end:" + e._uid,
Ho(n)),
e._isVue = !0,
t && t._isComponent ? ge(e, t) : e.$options = B(ye(e.constructor), t || {}, e),
Go(e),
e._self = e,
yt(e),
ut(e),
he(e),
St(e, "beforeCreate"),
Zt(e),
Dt(e),
Qt(e),
St(e, "created"),
so.performance && Ho && (e._name = Zi(e, !1),
Ho(r),
Vo(e._name + " init", n, r)),
e.$options.el && e.$mount(e.$options.el)
}
}
function ge(t, e) {
var n = t.$options = Object.create(t.constructor.options);
n.parent = e.parent,
n.propsData = e.propsData,
n._parentVnode = e._parentVnode,
n._parentListeners = e._parentListeners,
n._renderChildren = e._renderChildren,
n._componentTag = e._componentTag,
n._parentElm = e._parentElm,
n._refElm = e._refElm,
e.render && (n.render = e.render,
n.staticRenderFns = e.staticRenderFns)
}
function ye(t) {
var e = t.options;
if (t.super) {
var n = ye(t.super);
if (n !== t.superOptions) {
t.superOptions = n;
var r = _e(t);
r && m(t.extendOptions, r),
e = t.options = B(n, t.extendOptions),
e.name && (e.components[e.name] = t)
}
}
return e
}
function _e(t) {
var e, n = t.options, r = t.extendOptions, i = t.sealedOptions;
for (var o in n)
n[o] !== i[o] && (e || (e = {}),
e[o] = be(n[o], r[o], i[o]));
return e
}
function be(t, e, n) {
if (Array.isArray(t)) {
var r = [];
n = Array.isArray(n) ? n : [n],
e = Array.isArray(e) ? e : [e];
for (var i = 0; i < t.length; i++)
(e.indexOf(t[i]) >= 0 || n.indexOf(t[i]) < 0) && r.push(t[i]);
return r
}
return t
}
function we(t) {
this instanceof we || uo("Vue is a constructor and should be called with the `new` keyword"),
this._init(t)
}
function xe(t) {
t.use = function(t) {
if (!t.installed) {
var e = h(arguments, 1);
return e.unshift(this),
"function" == typeof t.install ? t.install.apply(t, e) : "function" == typeof t && t.apply(null, e),
t.installed = !0,
this
}
}
}
function Ce(t) {
t.mixin = function(t) {
this.options = B(this.options, t)
}
}
function $e(t) {
t.cid = 0;
var e = 1;
t.extend = function(t) {
t = t || {};
var n = this
, r = n.cid
, i = t._Ctor || (t._Ctor = {});
if (i[r])
return i[r];
var o = t.name || n.options.name;
/^[a-zA-Z][\w-]*$/.test(o) || uo('Invalid component name: "' + o + '". Component names can only contain alphanumeric characters and the hyphen, and must start with a letter.');
var a = function(t) {
this._init(t)
};
return a.prototype = Object.create(n.prototype),
a.prototype.constructor = a,
a.cid = e++,
a.options = B(n.options, t),
a.super = n,
a.options.props && Se(a),
a.options.computed && ke(a),
a.extend = n.extend,
a.mixin = n.mixin,
a.use = n.use,
oo.forEach(function(t) {
a[t] = n[t]
}),
o && (a.options.components[o] = a),
a.superOptions = n.options,
a.extendOptions = t,
a.sealedOptions = m({}, a.options),
i[r] = a,
a
}
}
function Se(t) {
var e = t.options.props;
for (var n in e)
Mt(t.prototype, "_props", n)
}
function ke(t) {
var e = t.options.computed;
for (var n in e)
zt(t.prototype, n, e[n])
}
function Te(t) {
oo.forEach(function(e) {
t[e] = function(t, n) {
return n ? ("component" === e && so.isReservedTag(t) && uo("Do not use built-in or reserved HTML elements as component id: " + t),
"component" === e && o(n) && (n.name = n.name || t,
n = this.options._base.extend(n)),
"directive" === e && "function" == typeof n && (n = {
bind: n,
update: n
}),
this.options[e + "s"][t] = n,
n) : this.options[e + "s"][t]
}
})
}
function Ie(t) {
return t && (t.Ctor.options.name || t.tag)
}
function Oe(t, e) {
return "string" == typeof t ? t.split(",").indexOf(e) > -1 : !!a(t) && t.test(e)
}
function Ae(t, e, n) {
for (var r in t) {
var i = t[r];
if (i) {
var o = Ie(i.componentOptions);
o && !n(o) && (i !== e && je(i),
t[r] = null)
}
}
}
function je(t) {
t && t.componentInstance.$destroy()
}
function Re(t) {
var e = {};
e.get = function() {
return so
}
,
e.set = function() {
uo("Do not replace the Vue.config object, set individual fields instead.")
}
,
Object.defineProperty(t, "config", e),
t.util = {
warn: uo,
extend: m,
mergeOptions: B,
defineReactive: R
},
t.set = E,
t.delete = M,
t.nextTick = Mo,
t.options = Object.create(null),
oo.forEach(function(e) {
t.options[e + "s"] = Object.create(null)
}),
t.options._base = t,
m(t.options.components, Oa),
xe(t),
Ce(t),
$e(t),
Te(t)
}
function Ee(t) {
for (var n = t.data, r = t, i = t; e(i.componentInstance); )
i = i.componentInstance._vnode,
i.data && (n = Me(i.data, n));
for (; e(r = r.parent); )
r.data && (n = Me(n, r.data));
return De(n)
}
function Me(t, n) {
return {
staticClass: Pe(t.staticClass, n.staticClass),
class: e(t.class) ? [t.class, n.class] : n.class
}
}
function De(t) {
var n = t.class
, r = t.staticClass;
return e(r) || e(n) ? Pe(r, Ne(n)) : ""
}
function Pe(t, e) {
return t ? e ? t + " " + e : t : e || ""
}
function Ne(n) {
if (t(n))
return "";
if ("string" == typeof n)
return n;
var r = "";
if (Array.isArray(n)) {
for (var o, a = 0, s = n.length; s > a; a++)
e(n[a]) && e(o = Ne(n[a])) && "" !== o && (r += o + " ");
return r.slice(0, -1)
}
if (i(n)) {
for (var l in n)
n[l] && (r += l + " ");
return r.slice(0, -1)
}
return r
}
function Le(t) {
return Wa(t) ? "svg" : "math" === t ? "math" : void 0
}
function Fe(t) {
if (!_o)
return !0;
if (Xa(t))
return !1;
if (t = t.toLowerCase(),
null != Ya[t])
return Ya[t];
var e = document.createElement(t);
return t.indexOf("-") > -1 ? Ya[t] = e.constructor === window.HTMLUnknownElement || e.constructor === window.HTMLElement : Ya[t] = /HTMLUnknownElement/.test(e.toString())
}
function ze(t) {
if ("string" == typeof t) {
var e = document.querySelector(t);
return e || (uo("Cannot find element: " + t),
document.createElement("div"))
}
return t
}
function Ue(t, e) {
var n = document.createElement(t);
return "select" !== t ? n : (e.data && e.data.attrs && void 0 !== e.data.attrs.multiple && n.setAttribute("multiple", "multiple"),
n)
}
function Be(t, e) {
return document.createElementNS(Ja[t], e)
}
function qe(t) {
return document.createTextNode(t)
}
function He(t) {
return document.createComment(t)
}
function Ve(t, e, n) {
t.insertBefore(e, n)
}
function Qe(t, e) {
t.removeChild(e)
}
function Ze(t, e) {
t.appendChild(e)
}
function Je(t) {
return t.parentNode
}
function Ge(t) {
return t.nextSibling
}
function We(t) {
return t.tagName
}
function Ke(t, e) {
t.textContent = e
}
function Xe(t, e, n) {
t.setAttribute(e, n)
}
function Ye(t, e) {
var n = t.data.ref;
if (n) {
var r = t.context
, i = t.componentInstance || t.elm
, o = r.$refs;
e ? Array.isArray(o[n]) ? u(o[n], i) : o[n] === i && (o[n] = void 0) : t.data.refInFor ? Array.isArray(o[n]) && o[n].indexOf(i) < 0 ? o[n].push(i) : o[n] = [i] : o[n] = i
}
}
function tn(t, n) {
return t.key === n.key && t.tag === n.tag && t.isComment === n.isComment && e(t.data) === e(n.data) && en(t, n)
}
function en(t, n) {
if ("input" !== t.tag)
return !0;
var r;
return (e(r = t.data) && e(r = r.attrs) && r.type) === (e(r = n.data) && e(r = r.attrs) && r.type)
}
function nn(t, n, r) {
var i, o, a = {};
for (i = n; r >= i; ++i)
o = t[i].key,
e(o) && (a[o] = i);
return a
}
function rn(i) {
function o(t) {
return new na(j.tagName(t).toLowerCase(),{},[],void 0,t)
}
function a(t, e) {
function n() {
0 == --n.listeners && s(t)
}
return n.listeners = e,
n
}
function s(t) {
var n = j.parentNode(t);
e(n) && j.removeChild(n, t)
}
function l(t, r, i, o, a) {
if (t.isRootInsert = !a,
!u(t, r, i, o)) {
var s = t.data
, l = t.children
, c = t.tag;
e(c) ? (s && s.pre && R++,
R || t.ns || so.ignoredElements.length && so.ignoredElements.indexOf(c) > -1 || !so.isUnknownElement(c) || uo("Unknown custom element: <" + c + '> - did you register the component correctly? For recursive components, make sure to provide the "name" option.', t.context),
t.elm = t.ns ? j.createElementNS(t.ns, c) : j.createElement(c, t),
g(t),
h(t, l, r),
e(s) && v(t, r),
f(i, t.elm, o),
s && s.pre && R--) : n(t.isComment) ? (t.elm = j.createComment(t.text),
f(i, t.elm, o)) : (t.elm = j.createTextNode(t.text),
f(i, t.elm, o))
}
}
function u(t, r, i, o) {
var a = t.data;
if (e(a)) {
var s = e(t.componentInstance) && a.keepAlive;
if (e(a = a.hook) && e(a = a.init) && a(t, !1, i, o),
e(t.componentInstance))
return p(t, r),
n(s) && d(t, r, i, o),
!0
}
}
function p(t, n) {
e(t.data.pendingInsert) && n.push.apply(n, t.data.pendingInsert),
t.elm = t.componentInstance.$el,
m(t) ? (v(t, n),
g(t)) : (Ye(t),
n.push(t))
}
function d(t, n, r, i) {
for (var o, a = t; a.componentInstance; )
if (a = a.componentInstance._vnode,
e(o = a.data) && e(o = o.transition)) {
for (o = 0; o < O.activate.length; ++o)
O.activate[o](ns, a);
n.push(a);
break
}
f(r, t.elm, i)
}
function f(t, n, r) {
e(t) && (e(r) ? r.parentNode === t && j.insertBefore(t, n, r) : j.appendChild(t, n))
}
function h(t, e, n) {
if (Array.isArray(e))
for (var i = 0; i < e.length; ++i)
l(e[i], n, t.elm, null, !0);
else
r(t.text) && j.appendChild(t.elm, j.createTextNode(t.text))
}
function m(t) {
for (; t.componentInstance; )
t = t.componentInstance._vnode;
return e(t.tag)
}
function v(t, n) {
for (var r = 0; r < O.create.length; ++r)
O.create[r](ns, t);
T = t.data.hook,
e(T) && (e(T.create) && T.create(ns, t),
e(T.insert) && n.push(t))
}
function g(t) {
for (var n, r = t; r; )
e(n = r.context) && e(n = n.$options._scopeId) && j.setAttribute(t.elm, n, ""),
r = r.parent;
e(n = sa) && n !== t.context && e(n = n.$options._scopeId) && j.setAttribute(t.elm, n, "")
}
function y(t, e, n, r, i, o) {
for (; i >= r; ++r)
l(n[r], o, t, e)
}
function _(t) {
var n, r, i = t.data;
if (e(i))
for (e(n = i.hook) && e(n = n.destroy) && n(t),
n = 0; n < O.destroy.length; ++n)
O.destroy[n](t);
if (e(n = t.children))
for (r = 0; r < t.children.length; ++r)
_(t.children[r])
}
function b(t, n, r, i) {
for (; i >= r; ++r) {
var o = n[r];
e(o) && (e(o.tag) ? (w(o),
_(o)) : s(o.elm))
}
}
function w(t, n) {
if (e(n) || e(t.data)) {
var r, i = O.remove.length + 1;
for (e(n) ? n.listeners += i : n = a(t.elm, i),
e(r = t.componentInstance) && e(r = r._vnode) && e(r.data) && w(r, n),
r = 0; r < O.remove.length; ++r)
O.remove[r](t, n);
e(r = t.data.hook) && e(r = r.remove) ? r(t, n) : n()
} else
s(t.elm)
}
function x(n, r, i, o, a) {
for (var s, c, u, p, d = 0, f = 0, h = r.length - 1, m = r[0], v = r[h], g = i.length - 1, _ = i[0], w = i[g], x = !a; h >= d && g >= f; )
t(m) ? m = r[++d] : t(v) ? v = r[--h] : tn(m, _) ? (C(m, _, o),
m = r[++d],
_ = i[++f]) : tn(v, w) ? (C(v, w, o),
v = r[--h],
w = i[--g]) : tn(m, w) ? (C(m, w, o),
x && j.insertBefore(n, m.elm, j.nextSibling(v.elm)),
m = r[++d],
w = i[--g]) : tn(v, _) ? (C(v, _, o),
x && j.insertBefore(n, v.elm, m.elm),
v = r[--h],
_ = i[++f]) : (t(s) && (s = nn(r, d, h)),
c = e(_.key) ? s[_.key] : null,
t(c) ? (l(_, o, n, m.elm),
_ = i[++f]) : (u = r[c],
u || uo("It seems there are duplicate keys that is causing an update error. Make sure each v-for item has a unique key."),
tn(u, _) ? (C(u, _, o),
r[c] = void 0,
x && j.insertBefore(n, _.elm, m.elm),
_ = i[++f]) : (l(_, o, n, m.elm),
_ = i[++f])));
d > h ? (p = t(i[g + 1]) ? null : i[g + 1].elm,
y(n, p, i, f, g, o)) : f > g && b(n, r, d, h)
}
function C(r, i, o, a) {
if (r !== i) {
if (n(i.isStatic) && n(r.isStatic) && i.key === r.key && (n(i.isCloned) || n(i.isOnce)))
return i.elm = r.elm,
void (i.componentInstance = r.componentInstance);
var s, l = i.data;
e(l) && e(s = l.hook) && e(s = s.prepatch) && s(r, i);
var c = i.elm = r.elm
, u = r.children
, p = i.children;
if (e(l) && m(i)) {
for (s = 0; s < O.update.length; ++s)
O.update[s](r, i);
e(s = l.hook) && e(s = s.update) && s(r, i)
}
t(i.text) ? e(u) && e(p) ? u !== p && x(c, u, p, o, a) : e(p) ? (e(r.text) && j.setTextContent(c, ""),
y(c, null, p, 0, p.length - 1, o)) : e(u) ? b(c, u, 0, u.length - 1) : e(r.text) && j.setTextContent(c, "") : r.text !== i.text && j.setTextContent(c, i.text),
e(l) && e(s = l.hook) && e(s = s.postpatch) && s(r, i)
}
}
function $(t, r, i) {
if (n(i) && e(t.parent))
t.parent.data.pendingInsert = r;
else
for (var o = 0; o < r.length; ++o)
r[o].data.hook.insert(r[o])
}
function S(t, n, r) {
if (!k(t, n))
return !1;
n.elm = t;
var i = n.tag
, o = n.data
, a = n.children;
if (e(o) && (e(T = o.hook) && e(T = T.init) && T(n, !0),
e(T = n.componentInstance)))
return p(n, r),
!0;
if (e(i)) {
if (e(a))
if (t.hasChildNodes()) {
for (var s = !0, l = t.firstChild, c = 0; c < a.length; c++) {
if (!l || !S(l, a[c], r)) {
s = !1;
break
}
l = l.nextSibling
}
if (!s || l)
return "undefined" == typeof console || E || (E = !0,
console.warn("Parent: ", t),
console.warn("Mismatching childNodes vs. VNodes: ", t.childNodes, a)),
!1
} else
h(n, a, r);
if (e(o))
for (var u in o)
if (!M(u)) {
v(n, r);
break
}
} else
t.data !== n.text && (t.data = n.text);
return !0
}
function k(t, n) {
return e(n.tag) ? 0 === n.tag.indexOf("vue-component") || n.tag.toLowerCase() === (t.tagName && t.tagName.toLowerCase()) : t.nodeType === (n.isComment ? 8 : 3)
}
var T, I, O = {}, A = i.modules, j = i.nodeOps;
for (T = 0; T < rs.length; ++T)
for (O[rs[T]] = [],
I = 0; I < A.length; ++I)
e(A[I][rs[T]]) && O[rs[T]].push(A[I][rs[T]]);
var R = 0
, E = !1
, M = c("attrs,style,class,staticClass,staticStyle,key");
return function(r, i, a, s, c, u) {
if (t(i))
return void (e(r) && _(r));
var p = !1
, d = [];
if (t(r))
p = !0,
l(i, d, c, u);
else {
var f = e(r.nodeType);
if (!f && tn(r, i))
C(r, i, d, s);
else {
if (f) {
if (1 === r.nodeType && r.hasAttribute(io) && (r.removeAttribute(io),
a = !0),
n(a)) {
if (S(r, i, d))
return $(i, d, !0),
r;
uo("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")
}
r = o(r)
}
var h = r.elm
, v = j.parentNode(h);
if (l(i, d, h._leaveCb ? null : v, j.nextSibling(h)),
e(i.parent)) {
for (var g = i.parent; g; )
g.elm = i.elm,
g = g.parent;
if (m(i))
for (var y = 0; y < O.create.length; ++y)
O.create[y](ns, i.parent)
}
e(v) ? b(v, [r], 0, 0) : e(r.tag) && _(r)
}
}
return $(i, d, p),
i.elm
}
}
function on(t, e) {
(t.data.directives || e.data.directives) && an(t, e)
}
function an(t, e) {
var n, r, i, o = t === ns, a = e === ns, s = sn(t.data.directives, t.context), l = sn(e.data.directives, e.context), c = [], u = [];
for (n in l)
r = s[n],
i = l[n],
r ? (i.oldValue = r.value,
cn(i, "update", e, t),
i.def && i.def.componentUpdated && u.push(i)) : (cn(i, "bind", e, t),
i.def && i.def.inserted && c.push(i));
if (c.length) {
var p = function() {
for (var n = 0; n < c.length; n++)
cn(c[n], "inserted", e, t)
};
o ? et(e.data.hook || (e.data.hook = {}), "insert", p) : p()
}
if (u.length && et(e.data.hook || (e.data.hook = {}), "postpatch", function() {
for (var n = 0; n < u.length; n++)
cn(u[n], "componentUpdated", e, t)
}),
!o)
for (n in s)
l[n] || cn(s[n], "unbind", t, t, a)
}
function sn(t, e) {
var n = Object.create(null);
if (!t)
return n;
var r, i;
for (r = 0; r < t.length; r++)
i = t[r],
i.modifiers || (i.modifiers = os),
n[ln(i)] = i,
i.def = q(e.$options, "directives", i.name, !0);
return n
}
function ln(t) {
return t.rawName || t.name + "." + Object.keys(t.modifiers || {}).join(".")
}
function cn(t, e, n, r, i) {
var o = t.def && t.def[e];
if (o)
try {
o(n.elm, t, n, r, i)
} catch (r) {
S(r, n.context, "directive " + t.name + " " + e + " hook")
}
}
function un(n, r) {
if (!t(n.data.attrs) || !t(r.data.attrs)) {
var i, o, a = r.elm, s = n.data.attrs || {}, l = r.data.attrs || {};
e(l.__ob__) && (l = r.data.attrs = m({}, l));
for (i in l)
o = l[i],
s[i] !== o && pn(a, i, o);
xo && l.value !== s.value && pn(a, "value", l.value);
for (i in s)
t(l[i]) && (Va(i) ? a.removeAttributeNS(Ha, Qa(i)) : Ba(i) || a.removeAttribute(i))
}
}
function pn(t, e, n) {
qa(e) ? Za(n) ? t.removeAttribute(e) : t.setAttribute(e, e) : Ba(e) ? t.setAttribute(e, Za(n) || "false" === n ? "false" : "true") : Va(e) ? Za(n) ? t.removeAttributeNS(Ha, Qa(e)) : t.setAttributeNS(Ha, e, n) : Za(n) ? t.removeAttribute(e) : t.setAttribute(e, n)
}
function dn(n, r) {
var i = r.elm
, o = r.data
, a = n.data;
if (!(t(o.staticClass) && t(o.class) && (t(a) || t(a.staticClass) && t(a.class)))) {
var s = Ee(r)
, l = i._transitionClasses;
e(l) && (s = Pe(s, Ne(l))),
s !== i._prevClass && (i.setAttribute("class", s),
i._prevClass = s)
}
}
function fn(t) {
function e() {
(a || (a = [])).push(t.slice(h, i).trim()),
h = i + 1
}
var n, r, i, o, a, s = !1, l = !1, c = !1, u = !1, p = 0, d = 0, f = 0, h = 0;
for (i = 0; i < t.length; i++)
if (r = n,
n = t.charCodeAt(i),
s)
39 === n && 92 !== r && (s = !1);
else if (l)
34 === n && 92 !== r && (l = !1);
else if (c)
96 === n && 92 !== r && (c = !1);
else if (u)
47 === n && 92 !== r && (u = !1);
else if (124 !== n || 124 === t.charCodeAt(i + 1) || 124 === t.charCodeAt(i - 1) || p || d || f) {
switch (n) {
case 34:
l = !0;
break;
case 39:
s = !0;
break;
case 96:
c = !0;
break;
case 40:
f++;
break;
case 41:
f--;
break;
case 91:
d++;
break;
case 93:
d--;
break;
case 123:
p++;
break;
case 125:
p--
}
if (47 === n) {
for (var m = i - 1, v = void 0; m >= 0 && " " === (v = t.charAt(m)); m--)
;
v && cs.test(v) || (u = !0)
}
} else
void 0 === o ? (h = i + 1,
o = t.slice(0, i).trim()) : e();
if (void 0 === o ? o = t.slice(0, i).trim() : 0 !== h && e(),
a)
for (i = 0; i < a.length; i++)
o = hn(o, a[i]);
return o
}
function hn(t, e) {
var n = e.indexOf("(");
return 0 > n ? '_f("' + e + '")(' + t + ")" : '_f("' + e.slice(0, n) + '")(' + t + "," + e.slice(n + 1)
}
function mn(t) {
console.error("[Vue compiler]: " + t)
}
function vn(t, e) {
return t ? t.map(function(t) {
return t[e]
}).filter(function(t) {
return t
}) : []
}
function gn(t, e, n) {
(t.props || (t.props = [])).push({
name: e,
value: n
})
}
function yn(t, e, n) {
(t.attrs || (t.attrs = [])).push({
name: e,
value: n
})
}
function _n(t, e, n, r, i, o) {
(t.directives || (t.directives = [])).push({
name: e,
rawName: n,
value: r,
arg: i,
modifiers: o
})
}
function bn(t, e, n, r, i, o) {
o && r && r.prevent && r.passive && o("passive and prevent can't be used together. Passive handler can't prevent default event."),
r && r.capture && (delete r.capture,
e = "!" + e),
r && r.once && (delete r.once,
e = "~" + e),
r && r.passive && (delete r.passive,
e = "&" + e);
var a;
r && r.native ? (delete r.native,
a = t.nativeEvents || (t.nativeEvents = {})) : a = t.events || (t.events = {});
var s = {
value: n,
modifiers: r
}
, l = a[e];
Array.isArray(l) ? i ? l.unshift(s) : l.push(s) : a[e] = l ? i ? [s, l] : [l, s] : s
}
function wn(t, e, n) {
var r = xn(t, ":" + e) || xn(t, "v-bind_" + e);
if (null != r)
return fn(r);
if (!1 !== n) {
var i = xn(t, e);
if (null != i)
return JSON.stringify(i)
}
}
function xn(t, e) {
var n;
if (null != (n = t.attrsMap[e]))
for (var r = t.attrsList, i = 0, o = r.length; o > i; i++)
if (r[i].name === e) {
r.splice(i, 1);
break
}
return n
}
function Cn(t, e, n) {
var r = n || {}
, i = r.number
, o = r.trim
, a = "$$v"
, s = a;
o && (s = "(typeof " + a + " === 'string'? " + a + ".trim(): " + a + ")"),
i && (s = "_n(" + s + ")");
var l = $n(e, s);
t.model = {
value: "(" + e + ")",
expression: '"' + e + '"',
callback: "function (" + a + ") {" + l + "}"
}
}
function $n(t, e) {
var n = Sn(t);
return null === n.idx ? t + "=" + e : "var $$exp = " + n.exp + ", $$idx = " + n.idx + ";if (!Array.isArray($$exp)){" + t + "=" + e + "}else{$$exp.splice($$idx, 1, " + e + ")}"
}
function Sn(t) {
if (ja = t,
Aa = ja.length,
Ea = Ma = Da = 0,
t.indexOf("[") < 0 || t.lastIndexOf("]") < Aa - 1)
return {
exp: t,
idx: null
};
for (; !Tn(); )
Ra = kn(),
In(Ra) ? An(Ra) : 91 === Ra && On(Ra);
return {
exp: t.substring(0, Ma),
idx: t.substring(Ma + 1, Da)
}
}
function kn() {
return ja.charCodeAt(++Ea)
}
function Tn() {
return Ea >= Aa
}
function In(t) {
return 34 === t || 39 === t
}
function On(t) {
var e = 1;
for (Ma = Ea; !Tn(); )
if (t = kn(),
In(t))
An(t);
else if (91 === t && e++,
93 === t && e--,
0 === e) {
Da = Ea;
break
}
}
function An(t) {
for (var e = t; !Tn() && (t = kn()) !== e; )
;
}
function jn(t, e, n) {
Pa = n;
var r = e.value
, i = e.modifiers
, o = t.tag
, a = t.attrsMap.type
, s = t.attrsMap["v-bind_type"] || t.attrsMap._type;
if ("input" === o && s && Pa('<input :type="' + s + '" v-model="' + r + '">:\nv-model does not support dynamic input types. Use v-if branches instead.'),
"input" === o && "file" === a && Pa("<" + t.tag + ' v-model="' + r + '" type="file">:\nFile inputs are read only. Use a v-on_change listener instead.'),
"select" === o)
Mn(t, r, i);
else if ("input" === o && "checkbox" === a)
Rn(t, r, i);
else if ("input" === o && "radio" === a)
En(t, r, i);
else if ("input" === o || "textarea" === o)
Dn(t, r, i);
else {
if (!so.isReservedTag(o))
return Cn(t, r, i),
!1;
Pa("<" + t.tag + ' v-model="' + r + "\">: v-model is not supported on this element type. If you are working with contenteditable, it's recommended to wrap a library dedicated for that purpose inside a custom component.")
}
return !0
}
function Rn(t, e, n) {
var r = n && n.number
, i = wn(t, "value") || "null"
, o = wn(t, "true-value") || "true"
, a = wn(t, "false-value") || "false";
gn(t, "checked", "Array.isArray(" + e + ")?_i(" + e + "," + i + ")>-1" + ("true" === o ? ":(" + e + ")" : ":_q(" + e + "," + o + ")")),
bn(t, ps, "var $$a=" + e + ",$$el=$event.target,$$c=$$el.checked?(" + o + "):(" + a + ");if(Array.isArray($$a)){var $$v=" + (r ? "_n(" + i + ")" : i) + ",$$i=_i($$a,$$v);if($$c){$$i<0&&(" + e + "=$$a.concat($$v))}else{$$i>-1&&(" + e + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}}else{" + $n(e, "$$c") + "}", null, !0)
}
function En(t, e, n) {
var r = n && n.number
, i = wn(t, "value") || "null";
i = r ? "_n(" + i + ")" : i,
gn(t, "checked", "_q(" + e + "," + i + ")"),
bn(t, ps, $n(e, i), null, !0)
}
function Mn(t, e, n) {
var r = n && n.number
, i = 'Array.prototype.filter.call($event.target.options,function(o){return o.selected}).map(function(o){var val = "_value" in o ? o._value : o.value;return ' + (r ? "_n(val)" : "val") + "})"
, o = "var $$selectedVal = " + i + ";";
o = o + " " + $n(e, "$event.target.multiple ? $$selectedVal : $$selectedVal[0]"),
bn(t, "change", o, null, !0)
}
function Dn(t, e, n) {
var r = t.attrsMap.type
, i = n || {}
, o = i.lazy
, a = i.number
, s = i.trim
, l = !o && "range" !== r
, c = o ? "change" : "range" === r ? us : "input"
, u = "$event.target.value";
s && (u = "$event.target.value.trim()"),
a && (u = "_n(" + u + ")");
var p = $n(e, u);
l && (p = "if($event.target.composing)return;" + p),
gn(t, "value", "(" + e + ")"),
bn(t, c, p, null, !0),
(s || a || "number" === r) && bn(t, "blur", "$forceUpdate()")
}
function Pn(t) {
var n;
e(t[us]) && (n = wo ? "change" : "input",
t[n] = [].concat(t[us], t[n] || []),
delete t[us]),
e(t[ps]) && (n = ko ? "click" : "change",
t[n] = [].concat(t[ps], t[n] || []),
delete t[ps])
}
function Nn(t, e, n, r, i) {
if (n) {
var o = e
, a = Na;
e = function(n) {
null !== (1 === arguments.length ? o(n) : o.apply(null, arguments)) && Ln(t, e, r, a)
}
}
Na.addEventListener(t, e, To ? {
capture: r,
passive: i
} : r)
}
function Ln(t, e, n, r) {
(r || Na).removeEventListener(t, e, n)
}
function Fn(e, n) {
if (!t(e.data.on) || !t(n.data.on)) {
var r = n.data.on || {}
, i = e.data.on || {};
Na = n.elm,
Pn(r),
tt(r, i, Nn, Ln, n.context)
}
}
function zn(n, r) {
if (!t(n.data.domProps) || !t(r.data.domProps)) {
var i, o, a = r.elm, s = n.data.domProps || {}, l = r.data.domProps || {};
e(l.__ob__) && (l = r.data.domProps = m({}, l));
for (i in s)
t(l[i]) && (a[i] = "");
for (i in l)
if (o = l[i],
"textContent" !== i && "innerHTML" !== i || (r.children && (r.children.length = 0),
o !== s[i]))
if ("value" === i) {
a._value = o;
var c = null == o ? "" : String(o);
Un(a, r, c) && (a.value = c)
} else
a[i] = o
}
}
function Un(t, e, n) {
return !t.composing && ("option" === e.tag || Bn(t, n) || qn(t, n))
}
function Bn(t, e) {
return document.activeElement !== t && t.value !== e
}
function qn(t, n) {
var r = t.value
, i = t._vModifiers;
return e(i) && i.number || "number" === t.type ? l(r) !== l(n) : e(i) && i.trim ? r.trim() !== n.trim() : r !== n
}
function Hn(t) {
var e = Vn(t.style);
return t.staticStyle ? m(t.staticStyle, e) : e
}
function Vn(t) {
return Array.isArray(t) ? v(t) : "string" == typeof t ? hs(t) : t
}
function Qn(t, e) {
var n, r = {};
if (e)
for (var i = t; i.componentInstance; )
i = i.componentInstance._vnode,
i.data && (n = Hn(i.data)) && m(r, n);
(n = Hn(t.data)) && m(r, n);
for (var o = t; o = o.parent; )
o.data && (n = Hn(o.data)) && m(r, n);
return r
}
function Zn(n, r) {
var i = r.data
, o = n.data;
if (!(t(i.staticStyle) && t(i.style) && t(o.staticStyle) && t(o.style))) {
var a, s, l = r.elm, c = o.staticStyle, u = o.normalizedStyle || o.style || {}, p = c || u, d = Vn(r.data.style) || {};
r.data.normalizedStyle = e(d.__ob__) ? m({}, d) : d;
var f = Qn(r, !0);
for (s in p)
t(f[s]) && gs(l, s, "");
for (s in f)
(a = f[s]) !== p[s] && gs(l, s, null == a ? "" : a)
}
}
function Jn(t, e) {
if (e && (e = e.trim()))
if (t.classList)
e.indexOf(" ") > -1 ? e.split(/\s+/).forEach(function(e) {
return t.classList.add(e)
}) : t.classList.add(e);
else {
var n = " " + (t.getAttribute("class") || "") + " ";
n.indexOf(" " + e + " ") < 0 && t.setAttribute("class", (n + e).trim())
}
}
function Gn(t, e) {
if (e && (e = e.trim()))
if (t.classList)
e.indexOf(" ") > -1 ? e.split(/\s+/).forEach(function(e) {
return t.classList.remove(e)
}) : t.classList.remove(e);
else {
for (var n = " " + (t.getAttribute("class") || "") + " ", r = " " + e + " "; n.indexOf(r) >= 0; )
n = n.replace(r, " ");
t.setAttribute("class", n.trim())
}
}
function Wn(t) {
if (t) {
if ("object" == typeof t) {
var e = {};
return !1 !== t.css && m(e, ws(t.name || "v")),
m(e, t),
e
}
return "string" == typeof t ? ws(t) : void 0
}
}
function Kn(t) {
Os(function() {
Os(t)
})
}
function Xn(t, e) {
(t._transitionClasses || (t._transitionClasses = [])).push(e),
Jn(t, e)
}
function Yn(t, e) {
t._transitionClasses && u(t._transitionClasses, e),
Gn(t, e)
}
function tr(t, e, n) {
var r = er(t, e)
, i = r.type
, o = r.timeout
, a = r.propCount;
if (!i)
return n();
var s = i === Cs ? ks : Is
, l = 0
, c = function() {
t.removeEventListener(s, u),
n()
}
, u = function(e) {
e.target === t && ++l >= a && c()
};
setTimeout(function() {
a > l && c()
}, o + 1),
t.addEventListener(s, u)
}
function er(t, e) {
var n, r = window.getComputedStyle(t), i = r[Ss + "Delay"].split(", "), o = r[Ss + "Duration"].split(", "), a = nr(i, o), s = r[Ts + "Delay"].split(", "), l = r[Ts + "Duration"].split(", "), c = nr(s, l), u = 0, p = 0;
return e === Cs ? a > 0 && (n = Cs,
u = a,
p = o.length) : e === $s ? c > 0 && (n = $s,
u = c,
p = l.length) : (u = Math.max(a, c),
n = u > 0 ? a > c ? Cs : $s : null,
p = n ? n === Cs ? o.length : l.length : 0),
{
type: n,
timeout: u,
propCount: p,
hasTransform: n === Cs && As.test(r[Ss + "Property"])
}
}
function nr(t, e) {
for (; t.length < e.length; )
t = t.concat(t);
return Math.max.apply(null, e.map(function(e, n) {
return rr(e) + rr(t[n])
}))
}
function rr(t) {
return 1e3 * Number(t.slice(0, -1))
}
function ir(n, r) {
var o = n.elm;
e(o._leaveCb) && (o._leaveCb.cancelled = !0,
o._leaveCb());
var a = Wn(n.data.transition);
if (!t(a) && !e(o._enterCb) && 1 === o.nodeType) {
for (var s = a, c = s.css, u = s.type, p = s.enterClass, d = s.enterToClass, f = s.enterActiveClass, h = s.appearClass, m = s.appearToClass, v = s.appearActiveClass, g = s.beforeEnter, y = s.enter, _ = s.afterEnter, b = s.enterCancelled, x = s.beforeAppear, C = s.appear, $ = s.afterAppear, S = s.appearCancelled, k = s.duration, T = sa, I = sa.$vnode; I && I.parent; )
I = I.parent,
T = I.context;
var O = !T._isMounted || !n.isRootInsert;
if (!O || C || "" === C) {
var A = O && h ? h : p
, j = O && v ? v : f
, R = O && m ? m : d
, E = O ? x || g : g
, M = O && "function" == typeof C ? C : y
, D = O ? $ || _ : _
, P = O ? S || b : b
, N = l(i(k) ? k.enter : k);
null != N && ar(N, "enter", n);
var L = !1 !== c && !xo
, F = lr(M)
, z = o._enterCb = w(function() {
L && (Yn(o, R),
Yn(o, j)),
z.cancelled ? (L && Yn(o, A),
P && P(o)) : D && D(o),
o._enterCb = null
});
n.data.show || et(n.data.hook || (n.data.hook = {}), "insert", function() {
var t = o.parentNode
, e = t && t._pending && t._pending[n.key];
e && e.tag === n.tag && e.elm._leaveCb && e.elm._leaveCb(),
M && M(o, z)
}),
E && E(o),
L && (Xn(o, A),
Xn(o, j),
Kn(function() {
Xn(o, R),
Yn(o, A),
z.cancelled || F || (sr(N) ? setTimeout(z, N) : tr(o, u, z))
})),
n.data.show && (r && r(),
M && M(o, z)),
L || F || z()
}
}
}
function or(n, r) {
function o() {
S.cancelled || (n.data.show || ((a.parentNode._pending || (a.parentNode._pending = {}))[n.key] = n),
m && m(a),
x && (Xn(a, d),
Xn(a, h),
Kn(function() {
Xn(a, f),
Yn(a, d),
S.cancelled || C || (sr($) ? setTimeout(S, $) : tr(a, p, S))
})),
v && v(a, S),
x || C || S())
}
var a = n.elm;
e(a._enterCb) && (a._enterCb.cancelled = !0,
a._enterCb());
var s = Wn(n.data.transition);
if (t(s))
return r();
if (!e(a._leaveCb) && 1 === a.nodeType) {
var c = s
, u = c.css
, p = c.type
, d = c.leaveClass
, f = c.leaveToClass
, h = c.leaveActiveClass
, m = c.beforeLeave
, v = c.leave
, g = c.afterLeave
, y = c.leaveCancelled
, _ = c.delayLeave
, b = c.duration
, x = !1 !== u && !xo
, C = lr(v)
, $ = l(i(b) ? b.leave : b);
null != $ && ar($, "leave", n);
var S = a._leaveCb = w(function() {
a.parentNode && a.parentNode._pending && (a.parentNode._pending[n.key] = null),
x && (Yn(a, f),
Yn(a, h)),
S.cancelled ? (x && Yn(a, d),
y && y(a)) : (r(),
g && g(a)),
a._leaveCb = null
});
_ ? _(o) : o()
}
}
function ar(t, e, n) {
"number" != typeof t ? uo("<transition> explicit " + e + " duration is not a valid number - got " + JSON.stringify(t) + ".", n.context) : isNaN(t) && uo("<transition> explicit " + e + " duration is NaN - the duration expression might be incorrect.", n.context)
}
function sr(t) {
return "number" == typeof t && !isNaN(t)
}
function lr(n) {
if (t(n))
return !1;
var r = n.fns;
return e(r) ? lr(Array.isArray(r) ? r[0] : r) : (n._length || n.length) > 1
}
function cr(t, e) {
!0 !== e.data.show && ir(e)
}
function ur(t, e, n) {
var r = e.value
, i = t.multiple;
if (i && !Array.isArray(r))
return void uo('<select multiple v-model="' + e.expression + '"> expects an Array value for its binding, but got ' + Object.prototype.toString.call(r).slice(8, -1), n);
for (var o, a, s = 0, l = t.options.length; l > s; s++)
if (a = t.options[s],
i)
o = b(r, dr(a)) > -1,
a.selected !== o && (a.selected = o);
else if (_(dr(a), r))
return void (t.selectedIndex !== s && (t.selectedIndex = s));
i || (t.selectedIndex = -1)
}
function pr(t, e) {
for (var n = 0, r = e.length; r > n; n++)
if (_(dr(e[n]), t))
return !1;
return !0
}
function dr(t) {
return "_value"in t ? t._value : t.value
}
function fr(t) {
t.target.composing = !0
}
function hr(t) {
t.target.composing = !1,
mr(t.target, "input")
}
function mr(t, e) {
var n = document.createEvent("HTMLEvents");
n.initEvent(e, !0, !0),
t.dispatchEvent(n)
}
function vr(t) {
return !t.componentInstance || t.data && t.data.transition ? t : vr(t.componentInstance._vnode)
}
function gr(t) {
var e = t && t.componentOptions;
return e && e.Ctor.options.abstract ? gr(ct(e.children)) : t
}
function yr(t) {
var e = {}
, n = t.$options;
for (var r in n.propsData)
e[r] = t[r];
var i = n._parentListeners;
for (var o in i)
e[Xi(o)] = i[o];
return e
}
function _r(t, e) {
return /\d-keep-alive$/.test(e.tag) ? t("keep-alive", {
props: e.componentOptions.propsData
}) : void 0
}
function br(t) {
for (; t = t.parent; )
if (t.data.transition)
return !0
}
function wr(t, e) {
return e.key === t.key && e.tag === t.tag
}
function xr(t) {
t.elm._moveCb && t.elm._moveCb(),
t.elm._enterCb && t.elm._enterCb()
}
function Cr(t) {
t.data.newPos = t.elm.getBoundingClientRect()
}
function $r(t) {
var e = t.data.pos
, n = t.data.newPos
, r = e.left - n.left
, i = e.top - n.top;
if (r || i) {
t.data.moved = !0;
var o = t.elm.style;
o.transform = o.WebkitTransform = "translate(" + r + "px," + i + "px)",
o.transitionDuration = "0s"
}
}
function Sr(t, e) {
var n = document.createElement("div");
return n.innerHTML = '<div a="' + t + '">',
n.innerHTML.indexOf(e) > 0
}
function kr(t) {
return qs = qs || document.createElement("div"),
qs.innerHTML = t,
qs.textContent
}
function Tr(t, e) {
var n = e ? Ol : Il;
return t.replace(n, function(t) {
return Tl[t]
})
}
function Ir(t, e) {
function n(e) {
d += e,
t = t.substring(e)
}
function r() {
var e = t.match(tl);
if (e) {
var r = {
tagName: e[1],
attrs: [],
start: d
};
n(e[0].length);
for (var i, o; !(i = t.match(el)) && (o = t.match(Ks)); )
n(o[0].length),
r.attrs.push(o);
if (i)
return r.unarySlash = i[1],
n(i[0].length),
r.end = d,
r
}
}
function i(t) {
var n = t.tagName
, r = t.unarySlash;
c && ("p" === s && Zs(n) && o(s),
p(n) && s === n && o(n));
for (var i = u(n) || "html" === n && "head" === s || !!r, a = t.attrs.length, d = new Array(a), f = 0; a > f; f++) {
var h = t.attrs[f];
al && -1 === h[0].indexOf('""') && ("" === h[3] && delete h[3],
"" === h[4] && delete h[4],
"" === h[5] && delete h[5]);
var m = h[3] || h[4] || h[5] || "";
d[f] = {
name: h[1],
value: Tr(m, e.shouldDecodeNewlines)
}
}
i || (l.push({
tag: n,
lowerCasedTag: n.toLowerCase(),
attrs: d
}),
s = n),
e.start && e.start(n, d, i, t.start, t.end)
}
function o(t, n, r) {
var i, o;
if (null == n && (n = d),
null == r && (r = d),
t && (o = t.toLowerCase()),
t)
for (i = l.length - 1; i >= 0 && l[i].lowerCasedTag !== o; i--)
;
else
i = 0;
if (i >= 0) {
for (var a = l.length - 1; a >= i; a--)
(a > i || !t) && e.warn && e.warn("tag <" + l[a].tag + "> has no matching end tag."),
e.end && e.end(l[a].tag, n, r);
l.length = i,
s = i && l[i - 1].tag
} else
"br" === o ? e.start && e.start(t, [], !0, n, r) : "p" === o && (e.start && e.start(t, [], !1, n, r),
e.end && e.end(t, n, r))
}
for (var a, s, l = [], c = e.expectHTML, u = e.isUnaryTag || no, p = e.canBeLeftOpenTag || no, d = 0; t; ) {
if (a = t,
s && Sl(s)) {
var f = s.toLowerCase()
, h = kl[f] || (kl[f] = new RegExp("([\\s\\S]*?)(</" + f + "[^>]*>)","i"))
, m = 0
, v = t.replace(h, function(t, n, r) {
return m = r.length,
Sl(f) || "noscript" === f || (n = n.replace(/<!--([\s\S]*?)-->/g, "$1").replace(/<!\[CDATA\[([\s\S]*?)]]>/g, "$1")),
e.chars && e.chars(n),
""
});
d += t.length - v.length,
t = v,
o(f, d - m, d)
} else {
var g = t.indexOf("<");
if (0 === g) {
if (il.test(t)) {
var y = t.indexOf("--\x3e");
if (y >= 0) {
n(y + 3);
continue
}
}
if (ol.test(t)) {
var _ = t.indexOf("]>");
if (_ >= 0) {
n(_ + 2);
continue
}
}
var b = t.match(rl);
if (b) {
n(b[0].length);
continue
}
var w = t.match(nl);
if (w) {
var x = d;
n(w[0].length),
o(w[1], x, d);
continue
}
var C = r();
if (C) {
i(C);
continue
}
}
var $ = void 0
, S = void 0
, k = void 0;
if (g >= 0) {
for (S = t.slice(g); !(nl.test(S) || tl.test(S) || il.test(S) || ol.test(S) || 0 > (k = S.indexOf("<", 1))); )
g += k,
S = t.slice(g);
$ = t.substring(0, g),
n(g)
}
0 > g && ($ = t,
t = ""),
e.chars && $ && e.chars($)
}
if (t === a) {
e.chars && e.chars(t),
!l.length && e.warn && e.warn('Mal-formatted tag at end of template: "' + t + '"');
break
}
}
o()
}
function Or(t, e) {
var n = e ? Rl(e) : Al;
if (n.test(t)) {
for (var r, i, o = [], a = n.lastIndex = 0; r = n.exec(t); ) {
(i = r.index) > a && o.push(JSON.stringify(t.slice(a, i)));
var s = fn(r[1].trim());
o.push("_s(" + s + ")"),
a = i + r[0].length
}
return a < t.length && o.push(JSON.stringify(t.slice(a))),
o.join("+")
}
}
function Ar(t, e) {
function n(t) {
u || (u = !0,
sl(t))
}
function r(t) {
t.pre && (l = !1),
dl(t.tag) && (c = !1)
}
sl = e.warn || mn,
hl = e.getTagNamespace || no,
fl = e.mustUseProp || no,
dl = e.isPreTag || no,
ul = vn(e.modules, "preTransformNode"),
cl = vn(e.modules, "transformNode"),
pl = vn(e.modules, "postTransformNode"),
ll = e.delimiters;
var i, o, a = [], s = !1 !== e.preserveWhitespace, l = !1, c = !1, u = !1;
return Ir(t, {
warn: sl,
expectHTML: e.expectHTML,
isUnaryTag: e.isUnaryTag,
canBeLeftOpenTag: e.canBeLeftOpenTag,
shouldDecodeNewlines: e.shouldDecodeNewlines,
start: function(t, s, u) {
function p(t) {
("slot" === t.tag || "template" === t.tag) && n("Cannot use <" + t.tag + "> as component root element because it may contain multiple nodes."),
t.attrsMap.hasOwnProperty("v-for") && n("Cannot use v-for on stateful component root element because it renders multiple elements.")
}
var d = o && o.ns || hl(t);
wo && "svg" === d && (s = Gr(s));
var f = {
type: 1,
tag: t,
attrsList: s,
attrsMap: Qr(s),
parent: o,
children: []
};
d && (f.ns = d),
Jr(f) && !jo() && (f.forbidden = !0,
sl("Templates should only be responsible for mapping the state to the UI. Avoid placing tags with side-effects in your templates, such as <" + t + ">, as they will not be parsed."));
for (var h = 0; h < ul.length; h++)
ul[h](f, e);
if (l || (jr(f),
f.pre && (l = !0)),
dl(f.tag) && (c = !0),
l)
Rr(f);
else {
Dr(f),
Pr(f),
zr(f),
Er(f),
f.plain = !f.key && !s.length,
Mr(f),
Ur(f),
Br(f);
for (var m = 0; m < cl.length; m++)
cl[m](f, e);
qr(f)
}
if (i ? a.length || (i.if && (f.elseif || f.else) ? (p(f),
Fr(i, {
exp: f.elseif,
block: f
})) : n("Component template should contain exactly one root element. If you are using v-if on multiple elements, use v-else-if to chain them instead.")) : (i = f,
p(i)),
o && !f.forbidden)
if (f.elseif || f.else)
Nr(f, o);
else if (f.slotScope) {
o.plain = !1;
var v = f.slotTarget || '"default"';
(o.scopedSlots || (o.scopedSlots = {}))[v] = f
} else
o.children.push(f),
f.parent = o;
u ? r(f) : (o = f,
a.push(f));
for (var g = 0; g < pl.length; g++)
pl[g](f, e)
},
end: function() {
var t = a[a.length - 1]
, e = t.children[t.children.length - 1];
e && 3 === e.type && " " === e.text && !c && t.children.pop(),
a.length -= 1,
o = a[a.length - 1],
r(t)
},
chars: function(e) {
if (!o)
return void (e === t ? n("Component template requires a root element, rather than just text.") : (e = e.trim()) && n('text "' + e + '" outside root element will be ignored.'));
if (!wo || "textarea" !== o.tag || o.attrsMap.placeholder !== e) {
var r = o.children;
if (e = c || e.trim() ? Zr(o) ? e : zl(e) : s && r.length ? " " : "") {
var i;
!l && " " !== e && (i = Or(e, ll)) ? r.push({
type: 2,
expression: i,
text: e
}) : " " === e && r.length && " " === r[r.length - 1].text || r.push({
type: 3,
text: e
})
}
}
}
}),
i
}
function jr(t) {
null != xn(t, "v-pre") && (t.pre = !0)
}
function Rr(t) {
var e = t.attrsList.length;
if (e)
for (var n = t.attrs = new Array(e), r = 0; e > r; r++)
n[r] = {
name: t.attrsList[r].name,
value: JSON.stringify(t.attrsList[r].value)
};
else
t.pre || (t.plain = !0)
}
function Er(t) {
var e = wn(t, "key");
e && ("template" === t.tag && sl("<template> cannot be keyed. Place the key on real elements instead."),
t.key = e)
}
function Mr(t) {
var e = wn(t, "ref");
e && (t.ref = e,
t.refInFor = Hr(t))
}
function Dr(t) {
var e;
if (e = xn(t, "v-for")) {
var n = e.match(Dl);
if (!n)
return void sl("Invalid v-for expression: " + e);
t.for = n[2].trim();
var r = n[1].trim()
, i = r.match(Pl);
i ? (t.alias = i[1].trim(),
t.iterator1 = i[2].trim(),
i[3] && (t.iterator2 = i[3].trim())) : t.alias = r
}
}
function Pr(t) {
var e = xn(t, "v-if");
if (e)
t.if = e,
Fr(t, {
exp: e,
block: t
});
else {
null != xn(t, "v-else") && (t.else = !0);
var n = xn(t, "v-else-if");
n && (t.elseif = n)
}
}
function Nr(t, e) {
var n = Lr(e.children);
n && n.if ? Fr(n, {
exp: t.elseif,
block: t
}) : sl("v-" + (t.elseif ? 'else-if="' + t.elseif + '"' : "else") + " used on element <" + t.tag + "> without corresponding v-if.")
}
function Lr(t) {
for (var e = t.length; e--; ) {
if (1 === t[e].type)
return t[e];
" " !== t[e].text && sl('text "' + t[e].text.trim() + '" between v-if and v-else(-if) will be ignored.'),
t.pop()
}
}
function Fr(t, e) {
t.ifConditions || (t.ifConditions = []),
t.ifConditions.push(e)
}
function zr(t) {
null != xn(t, "v-once") && (t.once = !0)
}
function Ur(t) {
if ("slot" === t.tag)
t.slotName = wn(t, "name"),
t.key && sl("`key` does not work on <slot> because slots are abstract outlets and can possibly expand into multiple elements. Use the key on a wrapping element instead.");
else {
var e = wn(t, "slot");
e && (t.slotTarget = '""' === e ? '"default"' : e),
"template" === t.tag && (t.slotScope = xn(t, "scope"))
}
}
function Br(t) {
var e;
(e = wn(t, "is")) && (t.component = e),
null != xn(t, "inline-template") && (t.inlineTemplate = !0)
}
function qr(t) {
var e, n, r, i, o, a, s, l = t.attrsList;
for (e = 0,
n = l.length; n > e; e++)
if (r = i = l[e].name,
o = l[e].value,
Ml.test(r))
if (t.hasBindings = !0,
a = Vr(r),
a && (r = r.replace(Fl, "")),
Ll.test(r))
r = r.replace(Ll, ""),
o = fn(o),
s = !1,
a && (a.prop && (s = !0,
"innerHtml" === (r = Xi(r)) && (r = "innerHTML")),
a.camel && (r = Xi(r)),
a.sync && bn(t, "update:" + Xi(r), $n(o, "$event"))),
s || fl(t.tag, t.attrsMap.type, r) ? gn(t, r, o) : yn(t, r, o);
else if (El.test(r))
r = r.replace(El, ""),
bn(t, r, o, a, !1, sl);
else {
r = r.replace(Ml, "");
var c = r.match(Nl)
, u = c && c[1];
u && (r = r.slice(0, -(u.length + 1))),
_n(t, r, i, o, u, a),
"model" === r && Wr(t, o)
}
else {
var p = Or(o, ll);
p && sl(r + '="' + o + '": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div id="{{ val }}">, use <div :id="val">.'),
yn(t, r, JSON.stringify(o))
}
}
function Hr(t) {
for (var e = t; e; ) {
if (void 0 !== e.for)
return !0;
e = e.parent
}
return !1
}
function Vr(t) {
var e = t.match(Fl);
if (e) {
var n = {};
return e.forEach(function(t) {
n[t.slice(1)] = !0
}),
n
}
}
function Qr(t) {
for (var e = {}, n = 0, r = t.length; r > n; n++)
!e[t[n].name] || wo || Co || sl("duplicate attribute: " + t[n].name),
e[t[n].name] = t[n].value;
return e
}
function Zr(t) {
return !1
}
function Jr(t) {
return !1
}
function Gr(t) {
for (var e = [], n = 0; n < t.length; n++) {
var r = t[n];
Ul.test(r.name) || (r.name = r.name.replace(Bl, ""),
e.push(r))
}
return e
}
function Wr(t, e) {
for (var n = t; n; )
n.for && n.alias === e && sl("<" + t.tag + ' v-model="' + e + '">: You are binding v-model directly to a v-for iteration alias. This will not be able to modify the v-for source array because writing to the alias is like modifying a function local variable. Consider using an array of objects and use v-model on an object property instead.'),
n = n.parent
}
function Kr(t, e) {
t && (ml = ql(e.staticKeys || ""),
vl = e.isReservedTag || no,
Yr(t),
ti(t, !1))
}
function Xr(t) {
return c("type,tag,attrsList,attrsMap,plain,parent,children,attrs" + (t ? "," + t : ""))
}
function Yr(t) {
if (t.static = ni(t),
1 === t.type) {
if (!vl(t.tag) && "slot" !== t.tag && null == t.attrsMap["inline-template"])
return;
for (var e = 0, n = t.children.length; n > e; e++) {
var r = t.children[e];
Yr(r),
r.static || (t.static = !1)
}
}
}
function ti(t, e) {
if (1 === t.type) {
if ((t.static || t.once) && (t.staticInFor = e),
t.static && t.children.length && (1 !== t.children.length || 3 !== t.children[0].type))
return void (t.staticRoot = !0);
if (t.staticRoot = !1,
t.children)
for (var n = 0, r = t.children.length; r > n; n++)
ti(t.children[n], e || !!t.for);
t.ifConditions && ei(t.ifConditions, e)
}
}
function ei(t, e) {
for (var n = 1, r = t.length; r > n; n++)
ti(t[n].block, e)
}
function ni(t) {
return 2 !== t.type && (3 === t.type || !(!t.pre && (t.hasBindings || t.if || t.for || Gi(t.tag) || !vl(t.tag) || ri(t) || !Object.keys(t).every(ml))))
}
function ri(t) {
for (; t.parent; ) {
if (t = t.parent,
"template" !== t.tag)
return !1;
if (t.for)
return !0
}
return !1
}
function ii(t, e, n) {
var r = e ? "nativeOn:{" : "on:{";
for (var i in t) {
var o = t[i];
"click" === i && o && o.modifiers && o.modifiers.right && n('Use "contextmenu" instead of "click.right" since right clicks do not actually fire "click" events.'),
r += '"' + i + '":' + oi(i, o) + ","
}
return r.slice(0, -1) + "}"
}
function oi(t, e) {
if (!e)
return "function(){}";
if (Array.isArray(e))
return "[" + e.map(function(e) {
return oi(t, e)
}).join(",") + "]";
var n = Vl.test(e.value)
, r = Hl.test(e.value);
if (e.modifiers) {
var i = ""
, o = ""
, a = [];
for (var s in e.modifiers)
Jl[s] ? (o += Jl[s],
Ql[s] && a.push(s)) : a.push(s);
a.length && (i += ai(a)),
o && (i += o);
return "function($event){" + i + (n ? e.value + "($event)" : r ? "(" + e.value + ")($event)" : e.value) + "}"
}
return n || r ? e.value : "function($event){" + e.value + "}"
}
function ai(t) {
return "if(!('button' in $event)&&" + t.map(si).join("&&") + ")return null;"
}
function si(t) {
var e = parseInt(t, 10);
if (e)
return "$event.keyCode!==" + e;
var n = Ql[t];
return "_k($event.keyCode," + JSON.stringify(t) + (n ? "," + JSON.stringify(n) : "") + ")"
}
function li(t, e) {
t.wrapData = function(n) {
return "_b(" + n + ",'" + t.tag + "'," + e.value + (e.modifiers && e.modifiers.prop ? ",true" : "") + ")"
}
}
function ci(t, e) {
var n = xl
, r = xl = []
, i = Cl;
Cl = 0,
$l = e,
gl = e.warn || mn,
yl = vn(e.modules, "transformCode"),
_l = vn(e.modules, "genData"),
bl = e.directives || {},
wl = e.isReservedTag || no;
var o = t ? ui(t) : '_c("div")';
return xl = n,
Cl = i,
{
render: "with(this){return " + o + "}",
staticRenderFns: r
}
}
function ui(t) {
if (t.staticRoot && !t.staticProcessed)
return pi(t);
if (t.once && !t.onceProcessed)
return di(t);
if (t.for && !t.forProcessed)
return mi(t);
if (t.if && !t.ifProcessed)
return fi(t);
if ("template" !== t.tag || t.slotTarget) {
if ("slot" === t.tag)
return Ti(t);
var e;
if (t.component)
e = Ii(t.component, t);
else {
var n = t.plain ? void 0 : vi(t)
, r = t.inlineTemplate ? null : wi(t, !0);
e = "_c('" + t.tag + "'" + (n ? "," + n : "") + (r ? "," + r : "") + ")"
}
for (var i = 0; i < yl.length; i++)
e = yl[i](t, e);
return e
}
return wi(t) || "void 0"
}
function pi(t) {
return t.staticProcessed = !0,
xl.push("with(this){return " + ui(t) + "}"),
"_m(" + (xl.length - 1) + (t.staticInFor ? ",true" : "") + ")"
}
function di(t) {
if (t.onceProcessed = !0,
t.if && !t.ifProcessed)
return fi(t);
if (t.staticInFor) {
for (var e = "", n = t.parent; n; ) {
if (n.for) {
e = n.key;
break
}
n = n.parent
}
return e ? "_o(" + ui(t) + "," + Cl++ + (e ? "," + e : "") + ")" : (gl("v-once can only be used inside v-for that is keyed. "),
ui(t))
}
return pi(t)
}
function fi(t) {
return t.ifProcessed = !0,
hi(t.ifConditions.slice())
}
function hi(t) {
function e(t) {
return t.once ? di(t) : ui(t)
}
if (!t.length)
return "_e()";
var n = t.shift();
return n.exp ? "(" + n.exp + ")?" + e(n.block) + ":" + hi(t) : "" + e(n.block)
}
function mi(t) {
var e = t.for
, n = t.alias
, r = t.iterator1 ? "," + t.iterator1 : ""
, i = t.iterator2 ? "," + t.iterator2 : "";
return $i(t) && "slot" !== t.tag && "template" !== t.tag && !t.key && gl("<" + t.tag + ' v-for="' + n + " in " + e + '">: component lists rendered with v-for should have explicit keys. See https://vuejs.org/guide/list.html#key for more info.', !0),
t.forProcessed = !0,
"_l((" + e + "),function(" + n + r + i + "){return " + ui(t) + "})"
}
function vi(t) {
var e = "{"
, n = gi(t);
n && (e += n + ","),
t.key && (e += "key:" + t.key + ","),
t.ref && (e += "ref:" + t.ref + ","),
t.refInFor && (e += "refInFor:true,"),
t.pre && (e += "pre:true,"),
t.component && (e += 'tag:"' + t.tag + '",');
for (var r = 0; r < _l.length; r++)
e += _l[r](t);
if (t.attrs && (e += "attrs:{" + Oi(t.attrs) + "},"),
t.props && (e += "domProps:{" + Oi(t.props) + "},"),
t.events && (e += ii(t.events, !1, gl) + ","),
t.nativeEvents && (e += ii(t.nativeEvents, !0, gl) + ","),
t.slotTarget && (e += "slot:" + t.slotTarget + ","),
t.scopedSlots && (e += _i(t.scopedSlots) + ","),
t.model && (e += "model:{value:" + t.model.value + ",callback:" + t.model.callback + ",expression:" + t.model.expression + "},"),
t.inlineTemplate) {
var i = yi(t);
i && (e += i + ",")
}
return e = e.replace(/,$/, "") + "}",
t.wrapData && (e = t.wrapData(e)),
e
}
function gi(t) {
var e = t.directives;
if (e) {
var n, r, i, o, a = "directives:[", s = !1;
for (n = 0,
r = e.length; r > n; n++) {
i = e[n],
o = !0;
var l = bl[i.name] || Gl[i.name];
l && (o = !!l(t, i, gl)),
o && (s = !0,
a += '{name:"' + i.name + '",rawName:"' + i.rawName + '"' + (i.value ? ",value:(" + i.value + "),expression:" + JSON.stringify(i.value) : "") + (i.arg ? ',arg:"' + i.arg + '"' : "") + (i.modifiers ? ",modifiers:" + JSON.stringify(i.modifiers) : "") + "},")
}
return s ? a.slice(0, -1) + "]" : void 0
}
}
function yi(t) {
var e = t.children[0];
if ((t.children.length > 1 || 1 !== e.type) && gl("Inline-template components must have exactly one child element."),
1 === e.type) {
var n = ci(e, $l);
return "inlineTemplate:{render:function(){" + n.render + "},staticRenderFns:[" + n.staticRenderFns.map(function(t) {
return "function(){" + t + "}"
}).join(",") + "]}"
}
}
function _i(t) {
return "scopedSlots:_u([" + Object.keys(t).map(function(e) {
return bi(e, t[e])
}).join(",") + "])"
}
function bi(t, e) {
return "[" + t + ",function(" + String(e.attrsMap.scope) + "){return " + ("template" === e.tag ? wi(e) || "void 0" : ui(e)) + "}]"
}
function wi(t, e) {
var n = t.children;
if (n.length) {
var r = n[0];
if (1 === n.length && r.for && "template" !== r.tag && "slot" !== r.tag)
return ui(r);
var i = e ? xi(n) : 0;
return "[" + n.map(Si).join(",") + "]" + (i ? "," + i : "")
}
}
function xi(t) {
for (var e = 0, n = 0; n < t.length; n++) {
var r = t[n];
if (1 === r.type) {
if (Ci(r) || r.ifConditions && r.ifConditions.some(function(t) {
return Ci(t.block)
})) {
e = 2;
break
}
($i(r) || r.ifConditions && r.ifConditions.some(function(t) {
return $i(t.block)
})) && (e = 1)
}
}
return e
}
function Ci(t) {
return void 0 !== t.for || "template" === t.tag || "slot" === t.tag
}
function $i(t) {
return !wl(t.tag)
}
function Si(t) {
return 1 === t.type ? ui(t) : ki(t)
}
function ki(t) {
return "_v(" + (2 === t.type ? t.expression : Ai(JSON.stringify(t.text))) + ")"
}
function Ti(t) {
var e = t.slotName || '"default"'
, n = wi(t)
, r = "_t(" + e + (n ? "," + n : "")
, i = t.attrs && "{" + t.attrs.map(function(t) {
return Xi(t.name) + ":" + t.value
}).join(",") + "}"
, o = t.attrsMap["v-bind"];
return !i && !o || n || (r += ",null"),
i && (r += "," + i),
o && (r += (i ? "" : ",null") + "," + o),
r + ")"
}
function Ii(t, e) {
var n = e.inlineTemplate ? null : wi(e, !0);
return "_c(" + t + "," + vi(e) + (n ? "," + n : "") + ")"
}
function Oi(t) {
for (var e = "", n = 0; n < t.length; n++) {
var r = t[n];
e += '"' + r.name + '":' + Ai(r.value) + ","
}
return e.slice(0, -1)
}
function Ai(t) {
return t.replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029")
}
function ji(t) {
var e = [];
return t && Ri(t, e),
e
}
function Ri(t, e) {
if (1 === t.type) {
for (var n in t.attrsMap)
if (Ml.test(n)) {
var r = t.attrsMap[n];
r && ("v-for" === n ? Mi(t, 'v-for="' + r + '"', e) : El.test(n) ? Ei(r, n + '="' + r + '"', e) : Pi(r, n + '="' + r + '"', e))
}
if (t.children)
for (var i = 0; i < t.children.length; i++)
Ri(t.children[i], e)
} else
2 === t.type && Pi(t.expression, t.text, e)
}
function Ei(t, e, n) {
var r = t.replace(Yl, "")
, i = r.match(Kl);
i && "$" !== r.charAt(i.index - 1) && n.push('avoid using JavaScript unary operator as property name: "' + i[0] + '" in expression ' + e.trim()),
Pi(t, e, n)
}
function Mi(t, e, n) {
Pi(t.for || "", e, n),
Di(t.alias, "v-for alias", e, n),
Di(t.iterator1, "v-for iterator", e, n),
Di(t.iterator2, "v-for iterator", e, n)
}
function Di(t, e, n, r) {
"string" != typeof t || Xl.test(t) || r.push("invalid " + e + ' "' + t + '" in expression: ' + n.trim())
}
function Pi(t, e, n) {
try {
new Function("return " + t)
} catch (i) {
var r = t.replace(Yl, "").match(Wl);
r ? n.push('avoid using JavaScript keyword as property name: "' + r[0] + '" in expression ' + e.trim()) : n.push("invalid expression: " + e.trim())
}
}
function Ni(t, e) {
var n = Ar(t.trim(), e);
Kr(n, e);
var r = ci(n, e);
return {
ast: n,
render: r.render,
staticRenderFns: r.staticRenderFns
}
}
function Li(t, e) {
try {
return new Function(t)
} catch (n) {
return e.push({
err: n,
code: t
}),
g
}
}
function Fi(t) {
function e(e, n) {
var r = Object.create(t)
, i = []
, o = [];
if (r.warn = function(t, e) {
(e ? o : i).push(t)
}
,
n) {
n.modules && (r.modules = (t.modules || []).concat(n.modules)),
n.directives && (r.directives = m(Object.create(t.directives), n.directives));
for (var a in n)
"modules" !== a && "directives" !== a && (r[a] = n[a])
}
var s = Ni(e, r);
return i.push.apply(i, ji(s.ast)),
s.errors = i,
s.tips = o,
s
}
function n(t, n, i) {
n = n || {};
try {
new Function("return 1")
} catch (t) {
t.toString().match(/unsafe-eval|CSP/) && uo("It seems you are using the standalone build of Vue.js in an environment with Content Security Policy that prohibits unsafe-eval. The template compiler cannot work in this environment. Consider relaxing the policy to allow unsafe-eval or pre-compiling your templates into render functions.")
}
var o = n.delimiters ? String(n.delimiters) + t : t;
if (r[o])
return r[o];
var a = e(t, n);
a.errors && a.errors.length && uo("Error compiling template:\n\n" + t + "\n\n" + a.errors.map(function(t) {
return "- " + t
}).join("\n") + "\n", i),
a.tips && a.tips.length && a.tips.forEach(function(t) {
return po(t, i)
});
var s = {}
, l = [];
s.render = Li(a.render, l);
var c = a.staticRenderFns.length;
s.staticRenderFns = new Array(c);
for (var u = 0; c > u; u++)
s.staticRenderFns[u] = Li(a.staticRenderFns[u], l);
return a.errors && a.errors.length || !l.length || uo("Failed to generate render function:\n\n" + l.map(function(t) {
var e = t.err
, n = t.code;
return e.toString() + " in\n\n" + n + "\n"
}).join("\n"), i),
r[o] = s
}
var r = Object.create(null);
return {
compile: e,
compileToFunctions: n
}
}
function zi(t, e) {
var n = e.warn || mn
, r = xn(t, "class");
if (r) {
Or(r, e.delimiters) && n('class="' + r + '": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div class="{{ val }}">, use <div :class="val">.')
}
r && (t.staticClass = JSON.stringify(r));
var i = wn(t, "class", !1);
i && (t.classBinding = i)
}
function Ui(t) {
var e = "";
return t.staticClass && (e += "staticClass:" + t.staticClass + ","),
t.classBinding && (e += "class:" + t.classBinding + ","),
e
}
function Bi(t, e) {
var n = e.warn || mn
, r = xn(t, "style");
if (r) {
Or(r, e.delimiters) && n('style="' + r + '": Interpolation inside attributes has been removed. Use v-bind or the colon shorthand instead. For example, instead of <div style="{{ val }}">, use <div :style="val">.'),
t.staticStyle = JSON.stringify(hs(r))
}
var i = wn(t, "style", !1);
i && (t.styleBinding = i)
}
function qi(t) {
var e = "";
return t.staticStyle && (e += "staticStyle:" + t.staticStyle + ","),
t.styleBinding && (e += "style:(" + t.styleBinding + "),"),
e
}
function Hi(t, e) {
e.value && gn(t, "textContent", "_s(" + e.value + ")")
}
function Vi(t, e) {
e.value && gn(t, "innerHTML", "_s(" + e.value + ")")
}
function Qi(t) {
if (t.outerHTML)
return t.outerHTML;
var e = document.createElement("div");
return e.appendChild(t.cloneNode(!0)),
e.innerHTML
}
var Zi, Ji = Object.prototype.toString, Gi = c("slot,component", !0), Wi = Object.prototype.hasOwnProperty, Ki = /-(\w)/g, Xi = d(function(t) {
return t.replace(Ki, function(t, e) {
return e ? e.toUpperCase() : ""
})
}), Yi = d(function(t) {
return t.charAt(0).toUpperCase() + t.slice(1)
}), to = /([^-])([A-Z])/g, eo = d(function(t) {
return t.replace(to, "$1-$2").replace(to, "$1-$2").toLowerCase()
}), no = function() {
return !1
}, ro = function(t) {
return t
}, io = "data-server-rendered", oo = ["component", "directive", "filter"], ao = ["beforeCreate", "created", "beforeMount", "mounted", "beforeUpdate", "updated", "beforeDestroy", "destroyed", "activated", "deactivated"], so = {
optionMergeStrategies: Object.create(null),
silent: !1,
productionTip: !1,
devtools: !1,
performance: !1,
errorHandler: null,
ignoredElements: [],
keyCodes: Object.create(null),
isReservedTag: no,
isReservedAttr: no,
isUnknownElement: no,
getTagNamespace: g,
parsePlatformTagName: ro,
mustUseProp: no,
_lifecycleHooks: ao
}, lo = Object.freeze({}), co = /[^\w.$]/, uo = g, po = g, fo = "undefined" != typeof console, ho = /(?:^|[-_])(\w)/g, mo = function(t) {
return t.replace(ho, function(t) {
return t.toUpperCase()
}).replace(/[-_]/g, "")
};
uo = function(t, e) {
fo && !so.silent && console.error("[Vue warn]: " + t + (e ? go(e) : ""))
}
,
po = function(t, e) {
fo && !so.silent && console.warn("[Vue tip]: " + t + (e ? go(e) : ""))
}
,
Zi = function(t, e) {
if (t.$root === t)
return "<Root>";
var n = "string" == typeof t ? t : "function" == typeof t && t.options ? t.options.name : t._isVue ? t.$options.name || t.$options._componentTag : t.name
, r = t._isVue && t.$options.__file;
if (!n && r) {
var i = r.match(/([^\/\\]+)\.vue$/);
n = i && i[1]
}
return (n ? "<" + mo(n) + ">" : "<Anonymous>") + (r && !1 !== e ? " at " + r : "")
}
;
var vo = function(t, e) {
for (var n = ""; e; )
e % 2 == 1 && (n += t),
e > 1 && (t += t),
e >>= 1;
return n
}
, go = function(t) {
if (t._isVue && t.$parent) {
for (var e = [], n = 0; t; ) {
if (e.length > 0) {
var r = e[e.length - 1];
if (r.constructor === t.constructor) {
n++,
t = t.$parent;
continue
}
n > 0 && (e[e.length - 1] = [r, n],
n = 0)
}
e.push(t),
t = t.$parent
}
return "\n\nfound in\n\n" + e.map(function(t, e) {
return "" + (0 === e ? "---\x3e " : vo(" ", 5 + 2 * e)) + (Array.isArray(t) ? Zi(t[0]) + "... (" + t[1] + " recursive calls)" : Zi(t))
}).join("\n")
}
return "\n\n(found in " + Zi(t) + ")"
}
, yo = "__proto__"in {}
, _o = "undefined" != typeof window
, bo = _o && window.navigator.userAgent.toLowerCase()
, wo = bo && /msie|trident/.test(bo)
, xo = bo && bo.indexOf("msie 9.0") > 0
, Co = bo && bo.indexOf("edge/") > 0
, $o = bo && bo.indexOf("android") > 0
, So = bo && /iphone|ipad|ipod|ios/.test(bo)
, ko = bo && /chrome\/\d+/.test(bo) && !Co
, To = !1;
if (_o)
try {
var Io = {};
Object.defineProperty(Io, "passive", {
get: function() {
To = !0
}
}),
window.addEventListener("test-passive", null, Io)
} catch (t) {}
var Oo, Ao, jo = function() {
return void 0 === Oo && (Oo = !_o && "undefined" != typeof global && "server" === global.process.env.VUE_ENV),
Oo
}, Ro = _o && window.__VUE_DEVTOOLS_GLOBAL_HOOK__, Eo = "undefined" != typeof Symbol && k(Symbol) && "undefined" != typeof Reflect && k(Reflect.ownKeys), Mo = function() {
function t() {
r = !1;
var t = n.slice(0);
n.length = 0;
for (var e = 0; e < t.length; e++)
t[e]()
}
var e, n = [], r = !1;
if ("undefined" != typeof Promise && k(Promise)) {
var i = Promise.resolve()
, o = function(t) {
console.error(t)
};
e = function() {
i.then(t).catch(o),
So && setTimeout(g)
}
} else if ("undefined" == typeof MutationObserver || !k(MutationObserver) && "[object MutationObserverConstructor]" !== MutationObserver.toString())
e = function() {
setTimeout(t, 0)
}
;
else {
var a = 1
, s = new MutationObserver(t)
, l = document.createTextNode(String(a));
s.observe(l, {
characterData: !0
}),
e = function() {
a = (a + 1) % 2,
l.data = String(a)
}
}
return function(t, i) {
var o;
return n.push(function() {
if (t)
try {
t.call(i)
} catch (t) {
S(t, i, "nextTick")
}
else
o && o(i)
}),
r || (r = !0,
e()),
t || "undefined" == typeof Promise ? void 0 : new Promise(function(t, e) {
o = t
}
)
}
}();
Ao = "undefined" != typeof Set && k(Set) ? Set : function() {
function t() {
this.set = Object.create(null)
}
return t.prototype.has = function(t) {
return !0 === this.set[t]
}
,
t.prototype.add = function(t) {
this.set[t] = !0
}
,
t.prototype.clear = function() {
this.set = Object.create(null)
}
,
t
}();
var Do = 0
, Po = function() {
this.id = Do++,
this.subs = []
};
Po.prototype.addSub = function(t) {
this.subs.push(t)
}
,
Po.prototype.removeSub = function(t) {
u(this.subs, t)
}
,
Po.prototype.depend = function() {
Po.target && Po.target.addDep(this)
}
,
Po.prototype.notify = function() {
for (var t = this.subs.slice(), e = 0, n = t.length; n > e; e++)
t[e].update()
}
,
Po.target = null;
var No = []
, Lo = Array.prototype
, Fo = Object.create(Lo);
["push", "pop", "shift", "unshift", "splice", "sort", "reverse"].forEach(function(t) {
var e = Lo[t];
C(Fo, t, function() {
for (var n = arguments, r = arguments.length, i = new Array(r); r--; )
i[r] = n[r];
var o, a = e.apply(this, i), s = this.__ob__;
switch (t) {
case "push":
case "unshift":
o = i;
break;
case "splice":
o = i.slice(2)
}
return o && s.observeArray(o),
s.dep.notify(),
a
})
});
var zo = Object.getOwnPropertyNames(Fo)
, Uo = {
shouldConvert: !0,
isSettingProps: !1
}
, Bo = function(t) {
if (this.value = t,
this.dep = new Po,
this.vmCount = 0,
C(t, "__ob__", this),
Array.isArray(t)) {
(yo ? O : A)(t, Fo, zo),
this.observeArray(t)
} else
this.walk(t)
};
Bo.prototype.walk = function(t) {
for (var e = Object.keys(t), n = 0; n < e.length; n++)
R(t, e[n], t[e[n]])
}
,
Bo.prototype.observeArray = function(t) {
for (var e = 0, n = t.length; n > e; e++)
j(t[e])
}
;
var qo = so.optionMergeStrategies;
qo.el = qo.propsData = function(t, e, n, r) {
return n || uo('option "' + r + '" can only be used during instance creation with the `new` keyword.'),
Qo(t, e)
}
,
qo.data = function(t, e, n) {
return n ? t || e ? function() {
var r = "function" == typeof e ? e.call(n) : e
, i = "function" == typeof t ? t.call(n) : void 0;
return r ? P(r, i) : i
}
: void 0 : e ? "function" != typeof e ? (uo('The "data" option should be a function that returns a per-instance value in component definitions.', n),
t) : t ? function() {
return P(e.call(this), t.call(this))
}
: e : t
}
,
ao.forEach(function(t) {
qo[t] = N
}),
oo.forEach(function(t) {
qo[t + "s"] = L
}),
qo.watch = function(t, e) {
if (!e)
return Object.create(t || null);
if (!t)
return e;
var n = {};
m(n, t);
for (var r in e) {
var i = n[r]
, o = e[r];
i && !Array.isArray(i) && (i = [i]),
n[r] = i ? i.concat(o) : [o]
}
return n
}
,
qo.props = qo.methods = qo.computed = function(t, e) {
if (!e)
return Object.create(t || null);
if (!t)
return e;
var n = Object.create(null);
return m(n, t),
m(n, e),
n
}
;
var Ho, Vo, Qo = function(t, e) {
return void 0 === e ? t : e
}, Zo = /^(String|Number|Boolean|Function|Symbol)$/, Jo = _o && window.performance;
Jo && Jo.mark && Jo.measure && Jo.clearMarks && Jo.clearMeasures && (Ho = function(t) {
return Jo.mark(t)
}
,
Vo = function(t, e, n) {
Jo.measure(t, e, n),
Jo.clearMarks(e),
Jo.clearMarks(n),
Jo.clearMeasures(t)
}
);
var Go, Wo = c("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,require"), Ko = function(t, e) {
uo('Property or method "' + e + '" is not defined on the instance but referenced during render. Make sure to declare reactive data properties in the data option.', t)
}, Xo = "undefined" != typeof Proxy && Proxy.toString().match(/native code/);
if (Xo) {
var Yo = c("stop,prevent,self,ctrl,shift,alt,meta");
so.keyCodes = new Proxy(so.keyCodes,{
set: function(t, e, n) {
return Yo(e) ? (uo("Avoid overwriting built-in modifier in config.keyCodes: ." + e),
!1) : (t[e] = n,
!0)
}
})
}
var ta = {
has: function(t, e) {
var n = e in t
, r = Wo(e) || "_" === e.charAt(0);
return n || r || Ko(t, e),
n || !r
}
}
, ea = {
get: function(t, e) {
return "string" != typeof e || e in t || Ko(t, e),
t[e]
}
};
Go = function(t) {
if (Xo) {
var e = t.$options
, n = e.render && e.render._withStripped ? ea : ta;
t._renderProxy = new Proxy(t,n)
} else
t._renderProxy = t
}
;
var na = function(t, e, n, r, i, o, a) {
this.tag = t,
this.data = e,
this.children = n,
this.text = r,
this.elm = i,
this.ns = void 0,
this.context = o,
this.functionalContext = void 0,
this.key = e && e.key,
this.componentOptions = a,
this.componentInstance = void 0,
this.parent = void 0,
this.raw = !1,
this.isStatic = !1,
this.isRootInsert = !0,
this.isComment = !1,
this.isCloned = !1,
this.isOnce = !1
}
, ra = {
child: {}
};
ra.child.get = function() {
return this.componentInstance
}
,
Object.defineProperties(na.prototype, ra);
var ia, oa = function() {
var t = new na;
return t.text = "",
t.isComment = !0,
t
}, aa = d(function(t) {
var e = "&" === t.charAt(0);
t = e ? t.slice(1) : t;
var n = "~" === t.charAt(0);
t = n ? t.slice(1) : t;
var r = "!" === t.charAt(0);
return t = r ? t.slice(1) : t,
{
name: t,
once: n,
capture: r,
passive: e
}
}), sa = null, la = 100, ca = [], ua = [], pa = {}, da = {}, fa = !1, ha = !1, ma = 0, va = 0, ga = function(t, e, n, r) {
this.vm = t,
t._watchers.push(this),
r ? (this.deep = !!r.deep,
this.user = !!r.user,
this.lazy = !!r.lazy,
this.sync = !!r.sync) : this.deep = this.user = this.lazy = this.sync = !1,
this.cb = n,
this.id = ++va,
this.active = !0,
this.dirty = this.lazy,
this.deps = [],
this.newDeps = [],
this.depIds = new Ao,
this.newDepIds = new Ao,
this.expression = e.toString(),
"function" == typeof e ? this.getter = e : (this.getter = $(e),
this.getter || (this.getter = function() {}
,
uo('Failed watching path: "' + e + '" Watcher only accepts simple dot-delimited paths. For full control, use a function instead.', t))),
this.value = this.lazy ? void 0 : this.get()
};
ga.prototype.get = function() {
T(this);
var t, e = this.vm;
if (this.user)
try {
t = this.getter.call(e, e)
} catch (t) {
S(t, e, 'getter for watcher "' + this.expression + '"')
}
else
t = this.getter.call(e, e);
return this.deep && Rt(t),
I(),
this.cleanupDeps(),
t
}
,
ga.prototype.addDep = function(t) {
var e = t.id;
this.newDepIds.has(e) || (this.newDepIds.add(e),
this.newDeps.push(t),
this.depIds.has(e) || t.addSub(this))
}
,
ga.prototype.cleanupDeps = function() {
for (var t = this, e = this.deps.length; e--; ) {
var n = t.deps[e];
t.newDepIds.has(n.id) || n.removeSub(t)
}
var r = this.depIds;
this.depIds = this.newDepIds,
this.newDepIds = r,
this.newDepIds.clear(),
r = this.deps,
this.deps = this.newDeps,
this.newDeps = r,
this.newDeps.length = 0
}
,
ga.prototype.update = function() {
this.lazy ? this.dirty = !0 : this.sync ? this.run() : jt(this)
}
,
ga.prototype.run = function() {
if (this.active) {
var t = this.get();
if (t !== this.value || i(t) || this.deep) {
var e = this.value;
if (this.value = t,
this.user)
try {
this.cb.call(this.vm, t, e)
} catch (t) {
S(t, this.vm, 'callback for watcher "' + this.expression + '"')
}
else
this.cb.call(this.vm, t, e)
}
}
}
,
ga.prototype.evaluate = function() {
this.value = this.get(),
this.dirty = !1
}
,
ga.prototype.depend = function() {
for (var t = this, e = this.deps.length; e--; )
t.deps[e].depend()
}
,
ga.prototype.teardown = function() {
var t = this;
if (this.active) {
this.vm._isBeingDestroyed || u(this.vm._watchers, this);
for (var e = this.deps.length; e--; )
t.deps[e].removeSub(t);
this.active = !1
}
}
;
var ya = new Ao
, _a = {
enumerable: !0,
configurable: !0,
get: g,
set: g
}
, ba = {
key: 1,
ref: 1,
slot: 1
}
, wa = {
lazy: !0
}
, xa = {
init: function(t, e, n, r) {
if (!t.componentInstance || t.componentInstance._isDestroyed) {
(t.componentInstance = Xt(t, sa, n, r)).$mount(e ? t.elm : void 0, e)
} else if (t.data.keepAlive) {
var i = t;
xa.prepatch(i, i)
}
},
prepatch: function(t, e) {
var n = e.componentOptions;
wt(e.componentInstance = t.componentInstance, n.propsData, n.listeners, e, n.children)
},
insert: function(t) {
var e = t.context
, n = t.componentInstance;
n._isMounted || (n._isMounted = !0,
St(n, "mounted")),
t.data.keepAlive && (e._isMounted ? Ot(n) : Ct(n, !0))
},
destroy: function(t) {
var e = t.componentInstance;
e._isDestroyed || (t.data.keepAlive ? $t(e, !0) : e.$destroy())
}
}
, Ca = Object.keys(xa)
, $a = 1
, Sa = 2
, ka = 0;
ve(we),
Vt(we),
ht(we),
_t(we),
me(we);
var Ta = [String, RegExp]
, Ia = {
name: "keep-alive",
abstract: !0,
props: {
include: Ta,
exclude: Ta
},
created: function() {
this.cache = Object.create(null)
},
destroyed: function() {
var t = this;
for (var e in t.cache)
je(t.cache[e])
},
watch: {
include: function(t) {
Ae(this.cache, this._vnode, function(e) {
return Oe(t, e)
})
},
exclude: function(t) {
Ae(this.cache, this._vnode, function(e) {
return !Oe(t, e)
})
}
},
render: function() {
var t = ct(this.$slots.default)
, e = t && t.componentOptions;
if (e) {
var n = Ie(e);
if (n && (this.include && !Oe(this.include, n) || this.exclude && Oe(this.exclude, n)))
return t;
var r = null == t.key ? e.Ctor.cid + (e.tag ? "::" + e.tag : "") : t.key;
this.cache[r] ? t.componentInstance = this.cache[r].componentInstance : this.cache[r] = t,
t.data.keepAlive = !0
}
return t
}
}
, Oa = {
KeepAlive: Ia
};
Re(we),
Object.defineProperty(we.prototype, "$isServer", {
get: jo
}),
we.version = "2.3.0";
var Aa, ja, Ra, Ea, Ma, Da, Pa, Na, La, Fa = c("style,class"), za = c("input,textarea,option,select"), Ua = function(t, e, n) {
return "value" === n && za(t) && "button" !== e || "selected" === n && "option" === t || "checked" === n && "input" === t || "muted" === n && "video" === t
}, Ba = c("contenteditable,draggable,spellcheck"), qa = c("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,translate,truespeed,typemustmatch,visible"), Ha = "http://www.w3.org/1999/xlink", Va = function(t) {
return ":" === t.charAt(5) && "xlink" === t.slice(0, 5)
}, Qa = function(t) {
return Va(t) ? t.slice(6, t.length) : ""
}, Za = function(t) {
return null == t || !1 === t
}, Ja = {
svg: "http://www.w3.org/2000/svg",
math: "http://www.w3.org/1998/Math/MathML"
}, Ga = c("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template"), Wa = c("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view", !0), Ka = function(t) {
return "pre" === t
}, Xa = function(t) {
return Ga(t) || Wa(t)
}, Ya = Object.create(null), ts = Object.freeze({
createElement: Ue,
createElementNS: Be,
createTextNode: qe,
createComment: He,
insertBefore: Ve,
removeChild: Qe,
appendChild: Ze,
parentNode: Je,
nextSibling: Ge,
tagName: We,
setTextContent: Ke,
setAttribute: Xe
}), es = {
create: function(t, e) {
Ye(e)
},
update: function(t, e) {
t.data.ref !== e.data.ref && (Ye(t, !0),
Ye(e))
},
destroy: function(t) {
Ye(t, !0)
}
}, ns = new na("",{},[]), rs = ["create", "activate", "update", "remove", "destroy"], is = {
create: on,
update: on,
destroy: function(t) {
on(t, ns)
}
}, os = Object.create(null), as = [es, is], ss = {
create: un,
update: un
}, ls = {
create: dn,
update: dn
}, cs = /[\w).+\-_$\]]/, us = "__r", ps = "__c", ds = {
create: Fn,
update: Fn
}, fs = {
create: zn,
update: zn
}, hs = d(function(t) {
var e = {}
, n = /;(?![^(]*\))/g
, r = /:(.+)/;
return t.split(n).forEach(function(t) {
if (t) {
var n = t.split(r);
n.length > 1 && (e[n[0].trim()] = n[1].trim())
}
}),
e
}), ms = /^--/, vs = /\s*!important$/, gs = function(t, e, n) {
if (ms.test(e))
t.style.setProperty(e, n);
else if (vs.test(n))
t.style.setProperty(e, n.replace(vs, ""), "important");
else {
var r = _s(e);
if (Array.isArray(n))
for (var i = 0, o = n.length; o > i; i++)
t.style[r] = n[i];
else
t.style[r] = n
}
}, ys = ["Webkit", "Moz", "ms"], _s = d(function(t) {
if (La = La || document.createElement("div"),
"filter" !== (t = Xi(t)) && t in La.style)
return t;
for (var e = t.charAt(0).toUpperCase() + t.slice(1), n = 0; n < ys.length; n++) {
var r = ys[n] + e;
if (r in La.style)
return r
}
}), bs = {
create: Zn,
update: Zn
}, ws = d(function(t) {
return {
enterClass: t + "-enter",
enterToClass: t + "-enter-to",
enterActiveClass: t + "-enter-active",
leaveClass: t + "-leave",
leaveToClass: t + "-leave-to",
leaveActiveClass: t + "-leave-active"
}
}), xs = _o && !xo, Cs = "transition", $s = "animation", Ss = "transition", ks = "transitionend", Ts = "animation", Is = "animationend";
xs && (void 0 === window.ontransitionend && void 0 !== window.onwebkittransitionend && (Ss = "WebkitTransition",
ks = "webkitTransitionEnd"),
void 0 === window.onanimationend && void 0 !== window.onwebkitanimationend && (Ts = "WebkitAnimation",
Is = "webkitAnimationEnd"));
var Os = _o && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : setTimeout
, As = /\b(transform|all)(,|$)/
, js = _o ? {
create: cr,
activate: cr,
remove: function(t, e) {
!0 !== t.data.show ? or(t, e) : e()
}
} : {}
, Rs = [ss, ls, ds, fs, bs, js]
, Es = Rs.concat(as)
, Ms = rn({
nodeOps: ts,
modules: Es
});
xo && document.addEventListener("selectionchange", function() {
var t = document.activeElement;
t && t.vmodel && mr(t, "input")
});
var Ds = {
inserted: function(t, e, n) {
if ("select" === n.tag) {
var r = function() {
ur(t, e, n.context)
};
r(),
(wo || Co) && setTimeout(r, 0)
} else
("textarea" === n.tag || "text" === t.type || "password" === t.type) && (t._vModifiers = e.modifiers,
e.modifiers.lazy || (t.addEventListener("change", hr),
$o || (t.addEventListener("compositionstart", fr),
t.addEventListener("compositionend", hr)),
xo && (t.vmodel = !0)))
},
componentUpdated: function(t, e, n) {
if ("select" === n.tag) {
ur(t, e, n.context);
(t.multiple ? e.value.some(function(e) {
return pr(e, t.options)
}) : e.value !== e.oldValue && pr(e.value, t.options)) && mr(t, "change")
}
}
}
, Ps = {
bind: function(t, e, n) {
var r = e.value;
n = vr(n);
var i = n.data && n.data.transition
, o = t.__vOriginalDisplay = "none" === t.style.display ? "" : t.style.display;
r && i && !xo ? (n.data.show = !0,
ir(n, function() {
t.style.display = o
})) : t.style.display = r ? o : "none"
},
update: function(t, e, n) {
var r = e.value;
r !== e.oldValue && (n = vr(n),
n.data && n.data.transition && !xo ? (n.data.show = !0,
r ? ir(n, function() {
t.style.display = t.__vOriginalDisplay
}) : or(n, function() {
t.style.display = "none"
})) : t.style.display = r ? t.__vOriginalDisplay : "none")
},
unbind: function(t, e, n, r, i) {
i || (t.style.display = t.__vOriginalDisplay)
}
}
, Ns = {
model: Ds,
show: Ps
}
, Ls = {
name: String,
appear: Boolean,
css: Boolean,
mode: String,
type: String,
enterClass: String,
leaveClass: String,
enterToClass: String,
leaveToClass: String,
enterActiveClass: String,
leaveActiveClass: String,
appearClass: String,
appearActiveClass: String,
appearToClass: String,
duration: [Number, String, Object]
}
, Fs = {
name: "transition",
props: Ls,
abstract: !0,
render: function(t) {
var e = this
, n = this.$slots.default;
if (n && (n = n.filter(function(t) {
return t.tag
}),
n.length)) {
n.length > 1 && uo("<transition> can only be used on a single element. Use <transition-group> for lists.", this.$parent);
var i = this.mode;
i && "in-out" !== i && "out-in" !== i && uo("invalid <transition> mode: " + i, this.$parent);
var o = n[0];
if (br(this.$vnode))
return o;
var a = gr(o);
if (!a)
return o;
if (this._leaving)
return _r(t, o);
var s = "__transition-" + this._uid + "-";
a.key = null == a.key ? s + a.tag : r(a.key) ? 0 === String(a.key).indexOf(s) ? a.key : s + a.key : a.key;
var l = (a.data || (a.data = {})).transition = yr(this)
, c = this._vnode
, u = gr(c);
if (a.data.directives && a.data.directives.some(function(t) {
return "show" === t.name
}) && (a.data.show = !0),
u && u.data && !wr(a, u)) {
var p = u && (u.data.transition = m({}, l));
if ("out-in" === i)
return this._leaving = !0,
et(p, "afterLeave", function() {
e._leaving = !1,
e.$forceUpdate()
}),
_r(t, o);
if ("in-out" === i) {
var d, f = function() {
d()
};
et(l, "afterEnter", f),
et(l, "enterCancelled", f),
et(p, "delayLeave", function(t) {
d = t
})
}
}
return o
}
}
}
, zs = m({
tag: String,
moveClass: String
}, Ls);
delete zs.mode;
var Us = {
props: zs,
render: function(t) {
for (var e = this.tag || this.$vnode.data.tag || "span", n = Object.create(null), r = this.prevChildren = this.children, i = this.$slots.default || [], o = this.children = [], a = yr(this), s = 0; s < i.length; s++) {
var l = i[s];
if (l.tag)
if (null != l.key && 0 !== String(l.key).indexOf("__vlist"))
o.push(l),
n[l.key] = l,
(l.data || (l.data = {})).transition = a;
else {
var c = l.componentOptions
, u = c ? c.Ctor.options.name || c.tag || "" : l.tag;
uo("<transition-group> children must be keyed: <" + u + ">")
}
}
if (r) {
for (var p = [], d = [], f = 0; f < r.length; f++) {
var h = r[f];
h.data.transition = a,
h.data.pos = h.elm.getBoundingClientRect(),
n[h.key] ? p.push(h) : d.push(h)
}
this.kept = t(e, null, p),
this.removed = d
}
return t(e, null, o)
},
beforeUpdate: function() {
this.__patch__(this._vnode, this.kept, !1, !0),
this._vnode = this.kept
},
updated: function() {
var t = this.prevChildren
, e = this.moveClass || (this.name || "v") + "-move";
if (t.length && this.hasMove(t[0].elm, e)) {
t.forEach(xr),
t.forEach(Cr),
t.forEach($r);
document.body.offsetHeight,
t.forEach(function(t) {
if (t.data.moved) {
var n = t.elm
, r = n.style;
Xn(n, e),
r.transform = r.WebkitTransform = r.transitionDuration = "",
n.addEventListener(ks, n._moveCb = function t(r) {
(!r || /transform$/.test(r.propertyName)) && (n.removeEventListener(ks, t),
n._moveCb = null,
Yn(n, e))
}
)
}
})
}
},
methods: {
hasMove: function(t, e) {
if (!xs)
return !1;
if (null != this._hasMove)
return this._hasMove;
var n = t.cloneNode();
t._transitionClasses && t._transitionClasses.forEach(function(t) {
Gn(n, t)
}),
Jn(n, e),
n.style.display = "none",
this.$el.appendChild(n);
var r = er(n);
return this.$el.removeChild(n),
this._hasMove = r.hasTransform
}
}
}
, Bs = {
Transition: Fs,
TransitionGroup: Us
};
we.config.mustUseProp = Ua,
we.config.isReservedTag = Xa,
we.config.isReservedAttr = Fa,
we.config.getTagNamespace = Le,
we.config.isUnknownElement = Fe,
m(we.options.directives, Ns),
m(we.options.components, Bs),
we.prototype.__patch__ = _o ? Ms : g,
we.prototype.$mount = function(t, e) {
return t = t && _o ? ze(t) : void 0,
bt(this, t, e)
}
,
setTimeout(function() {
so.devtools && (Ro ? Ro.emit("init", we) : ko && console[console.info ? "info" : "log"]("Download the Vue Devtools extension for a better development experience:\nhttps://github.com/vuejs/vue-devtools")),
!1 !== so.productionTip && _o && "undefined" != typeof console && console[console.info ? "info" : "log"]("You are running Vue in development mode.\nMake sure to turn on production mode when deploying for production.\nSee more tips at https://vuejs.org/guide/deployment.html")
}, 0);
var qs, Hs = !!_o && Sr("\n", "&#10;"), Vs = c("area,base,br,col,embed,frame,hr,img,input,isindex,keygen,link,meta,param,source,track,wbr"), Qs = c("colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source"), Zs = c("address,article,aside,base,blockquote,body,caption,col,colgroup,dd,details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,title,tr,track"), Js = /([^\s"'<>\/=]+)/, Gs = /(?:=)/, Ws = [/"([^"]*)"+/.source, /'([^']*)'+/.source, /([^\s"'=<>`]+)/.source], Ks = new RegExp("^\\s*" + Js.source + "(?:\\s*(" + Gs.source + ")\\s*(?:" + Ws.join("|") + "))?"), Xs = "[a-zA-Z_][\\w\\-\\.]*", Ys = "((?:" + Xs + "\\:)?" + Xs + ")", tl = new RegExp("^<" + Ys), el = /^\s*(\/?)>/, nl = new RegExp("^<\\/" + Ys + "[^>]*>"), rl = /^<!DOCTYPE [^>]+>/i, il = /^<!--/, ol = /^<!\[/, al = !1;
"x".replace(/x(.)?/g, function(t, e) {
al = "" === e
});
var sl, ll, cl, ul, pl, dl, fl, hl, ml, vl, gl, yl, _l, bl, wl, xl, Cl, $l, Sl = c("script,style,textarea", !0), kl = {}, Tl = {
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&amp;": "&",
"&#10;": "\n"
}, Il = /&(?:lt|gt|quot|amp);/g, Ol = /&(?:lt|gt|quot|amp|#10);/g, Al = /\{\{((?:.|\n)+?)\}\}/g, jl = /[-.*+?^${}()|[\]\/\\]/g, Rl = d(function(t) {
var e = t[0].replace(jl, "\\$&")
, n = t[1].replace(jl, "\\$&");
return new RegExp(e + "((?:.|\\n)+?)" + n,"g")
}), El = /^@|^v-on_/, Ml = /^v-|^@|^:/, Dl = /(.*?)\s+(?:in|of)\s+(.*)/, Pl = /\((\{[^}]*\}|[^,]*),([^,]*)(?:,([^,]*))?\)/, Nl = /:(.*)$/, Ll = /^:|^v-bind_/, Fl = /\.[^.]+/g, zl = d(kr), Ul = /^xmlns:NS\d+/, Bl = /^NS\d+:/, ql = d(Xr), Hl = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/, Vl = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/, Ql = {
esc: 27,
tab: 9,
enter: 13,
space: 32,
up: 38,
left: 37,
right: 39,
down: 40,
delete: [8, 46]
}, Zl = function(t) {
return "if(" + t + ")return null;"
}, Jl = {
stop: "$event.stopPropagation();",
prevent: "$event.preventDefault();",
self: Zl("$event.target !== $event.currentTarget"),
ctrl: Zl("!$event.ctrlKey"),
shift: Zl("!$event.shiftKey"),
alt: Zl("!$event.altKey"),
meta: Zl("!$event.metaKey"),
left: Zl("'button' in $event && $event.button !== 0"),
middle: Zl("'button' in $event && $event.button !== 1"),
right: Zl("'button' in $event && $event.button !== 2")
}, Gl = {
bind: li,
cloak: g
}, Wl = new RegExp("\\b" + "do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,super,throw,while,yield,delete,export,import,return,switch,default,extends,finally,continue,debugger,function,arguments".split(",").join("\\b|\\b") + "\\b"), Kl = new RegExp("\\b" + "delete,typeof,void".split(",").join("\\s*\\([^\\)]*\\)|\\b") + "\\s*\\([^\\)]*\\)"), Xl = /[A-Za-z_$][\w$]*/, Yl = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g, tc = {
staticKeys: ["staticClass"],
transformNode: zi,
genData: Ui
}, ec = {
staticKeys: ["staticStyle"],
transformNode: Bi,
genData: qi
}, nc = [tc, ec], rc = {
model: jn,
text: Hi,
html: Vi
}, ic = {
expectHTML: !0,
modules: nc,
directives: rc,
isPreTag: Ka,
isUnaryTag: Vs,
mustUseProp: Ua,
canBeLeftOpenTag: Qs,
isReservedTag: Xa,
getTagNamespace: Le,
staticKeys: y(nc)
}, oc = Fi(ic), ac = oc.compileToFunctions, sc = d(function(t) {
var e = ze(t);
return e && e.innerHTML
}), lc = we.prototype.$mount;
return we.prototype.$mount = function(t, e) {
if ((t = t && ze(t)) === document.body || t === document.documentElement)
return uo("Do not mount Vue to <html> or <body> - mount to normal elements instead."),
this;
var n = this.$options;
if (!n.render) {
var r = n.template;
if (r)
if ("string" == typeof r)
"#" === r.charAt(0) && ((r = sc(r)) || uo("Template element not found or is empty: " + n.template, this));
else {
if (!r.nodeType)
return uo("invalid template option:" + r, this),
this;
r = r.innerHTML
}
else
t && (r = Qi(t));
if (r) {
so.performance && Ho && Ho("compile");
var i = ac(r, {
shouldDecodeNewlines: Hs,
delimiters: n.delimiters
}, this)
, o = i.render
, a = i.staticRenderFns;
n.render = o,
n.staticRenderFns = a,
so.performance && Ho && (Ho("compile end"),
Vo(this._name + " compile", "compile", "compile end"))
}
}
return lc.call(this, t, e)
}
,
we.compile = ac,
we
}),
function(t, e) {
if ("object" == typeof exports && "object" == typeof module)
module.exports = e();
else if ("function" == typeof define && define.amd)
define([], e);
else {
var n = e();
for (var r in n)
("object" == typeof exports ? exports : t)[r] = n[r]
}
}(this, function() {
return function(t) {
function e(r) {
if (n[r])
return n[r].exports;
var i = n[r] = {
i: r,
l: !1,
exports: {}
};
return t[r].call(i.exports, i, i.exports, e),
i.l = !0,
i.exports
}
var n = {};
return e.m = t,
e.c = n,
e.i = function(t) {
return t
}
,
e.d = function(t, e, n) {
Object.defineProperty(t, e, {
configurable: !1,
enumerable: !0,
get: n
})
}
,
e.n = function(t) {
var n = t && t.__esModule ? function() {
return t.default
}
: function() {
return t
}
;
return e.d(n, "a", n),
n
}
,
e.o = function(t, e) {
return Object.prototype.hasOwnProperty.call(t, e)
}
,
e.p = "",
e(e.s = 14)
}([function(t, e, n) {
"use strict";
function r(t, e) {
return e.length ? r(t[e[0]], e.slice(1)) : t
}
var i = Array.prototype
, o = Object.prototype
, a = (i.slice,
o.toString)
, s = {};
s.isArray = function(t) {
return Array.isArray(t)
}
;
var l = Math.pow(2, 53) - 1;
s.isArrayLike = function(t) {
if ("object" != typeof t || !t)
return !1;
var e = t.length;
return "number" == typeof e && e % 1 == 0 && e >= 0 && e <= l
}
,
s.isObject = function(t) {
var e = typeof t;
return "function" === e || "object" === e && !!t
}
,
s.each = function(t, e) {
var n, r;
if (s.isArray(t))
for (n = 0,
r = t.length; n < r && !1 !== e(t[n], n, t); n++)
;
else
for (n in t)
if (!1 === e(t[n], n, t))
break;
return t
}
,
s.each(["Arguments", "Function", "String", "Number", "Date", "RegExp", "Error"], function(t) {
s["is" + t] = function(e) {
return a.call(e) === "[object " + t + "]"
}
}),
s.toArray = function(t, e) {
e = e || 0;
for (var n = t.length - e, r = new Array(n); n--; )
r[n] = t[n + e];
return r
}
,
s.toNumber = function(t) {
if ("string" != typeof t)
return t;
var e = Number(t);
return isNaN(e) ? t : e
}
,
s.convertArray = function(t) {
if (s.isArray(t))
return t;
if (s.isPlainObject(t)) {
for (var e, n = Object.keys(t), r = n.length, i = new Array(r); r--; )
e = n[r],
i[r] = {
$key: e,
$value: t[e]
};
return i
}
return t || []
}
,
s.getPath = function(t, e) {
return r(t, e.split("."))
}
;
var a = Object.prototype.toString;
s.isPlainObject = function(t) {
return "[object Object]" === a.call(t)
}
,
e.a = s
}
, function(t, e, n) {
"use strict";
var r = n(5)
, i = n(4)
, o = n(6);
n.d(e, "a", function() {
return r.a
}),
n.d(e, "b", function() {
return i.a
}),
n.d(e, "c", function() {
return o.a
})
}
, function(t, e, n) {
"use strict";
var r = n(7)
, i = n(8);
n.d(e, "currency", function() {
return r.a
}),
n.d(e, "pluralize", function() {
return i.a
})
}
, function(t, e, n) {
"use strict";
var r = n(9)
, i = n(13)
, o = n(10)
, a = n(11)
, s = n(12);
n.d(e, "truncate", function() {
return s.a
}),
n.d(e, "capitalize", function() {
return r.a
}),
n.d(e, "uppercase", function() {
return i.a
}),
n.d(e, "lowercase", function() {
return o.a
}),
n.d(e, "placeholder", function() {
return a.a
})
}
, function(t, e, n) {
"use strict";
function r(t, e) {
var t = o.a.convertArray(t);
if (null == e)
return t;
if ("function" == typeof e)
return t.filter(e);
e = ("" + e).toLowerCase();
for (var n, r, a, s, l = 2, c = Array.prototype.concat.apply([], o.a.toArray(arguments, l)), u = [], p = 0, d = t.length; p < d; p++)
if (n = t[p],
a = n && n.$value || n,
s = c.length) {
for (; s--; )
if ("$key" === (r = c[s]) && i(n.$key, e) || i(o.a.getPath(a, r), e)) {
u.push(n);
break
}
} else
i(n, e) && u.push(n);
return u
}
function i(t, e) {
var n;
if (o.a.isPlainObject(t)) {
var r = Object.keys(t);
for (n = r.length; n--; )
if (i(t[r[n]], e))
return !0
} else if (o.a.isArray(t)) {
for (n = t.length; n--; )
if (i(t[n], e))
return !0
} else if (null != t)
return t.toString().toLowerCase().indexOf(e) > -1
}
var o = n(0);
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t, e, n) {
return n = n ? parseInt(n, 10) : 0,
e = i.a.toNumber(e),
"number" == typeof e ? t.slice(n, n + e) : t
}
var i = n(0);
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
function e(t, e, r) {
var o = n[r];
return o && ("$key" !== o && (i.a.isObject(t) && "$value"in t && (t = t.$value),
i.a.isObject(e) && "$value"in e && (e = e.$value)),
t = i.a.isObject(t) ? i.a.getPath(t, o) : t,
e = i.a.isObject(e) ? i.a.getPath(e, o) : e),
t === e ? 0 : t > e ? a : -a
}
var n, r = null;
t = i.a.convertArray(t);
var o = i.a.toArray(arguments, 1)
, a = o[o.length - 1];
"number" == typeof a ? (a = a < 0 ? -1 : 1,
o = o.length > 1 ? o.slice(0, -1) : o) : a = 1;
var s = o[0];
return s ? ("function" == typeof s ? r = function(t, e) {
return s(t, e) * a
}
: (n = Array.prototype.concat.apply([], o),
r = function(t, i, o) {
return o = o || 0,
o >= n.length - 1 ? e(t, i, o) : e(t, i, o) || r(t, i, o + 1)
}
),
t.slice().sort(r)) : t
}
var i = n(0);
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t, e, n) {
var r = /(\d{3})(?=\d)/g;
if (t = parseFloat(t),
!isFinite(t) || !t && 0 !== t)
return "";
e = null != e ? e : "$",
n = null != n ? n : 2;
var i = Math.abs(t).toFixed(n)
, o = n ? i.slice(0, -1 - n) : i
, a = o.length % 3
, s = a > 0 ? o.slice(0, a) + (o.length > 3 ? "," : "") : ""
, l = n ? i.slice(-1 - n) : "";
return (t < 0 ? "-" : "") + e + s + o.slice(a).replace(r, "$1,") + l
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
var e = i.a.toArray(arguments, 1);
return e.length > 1 ? e[t % 10 - 1] || e[e.length - 1] : e[0] + (1 === t ? "" : "s")
}
var i = n(0);
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
return t || 0 === t ? (t = t.toString(),
t.charAt(0).toUpperCase() + t.slice(1)) : ""
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
return t || 0 === t ? t.toString().toLowerCase() : ""
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t, e) {
return void 0 === t || "" === t || null === t ? e : t
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t, e) {
return e = e || 15,
t && "string" == typeof t ? t.length <= e ? t : t.substring(0, e) + "..." : ""
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
return t || 0 === t ? t.toString().toUpperCase() : ""
}
e.a = r
}
, function(t, e, n) {
"use strict";
function r(t) {
i.a.each(o, function(e, n) {
t.filter(n, e)
}),
i.a.each(s, function(e, n) {
t.filter(n, e)
}),
t.mixin({
methods: {
limitBy: a.a,
filterBy: a.b,
orderBy: a.c
}
})
}
var i = n(0)
, o = n(3)
, a = n(1)
, s = n(2);
window.Vue ? Vue.use(r) : t.exports = r
}
])
});
{/* <script src="/arquivos/fascar-app.min.js"></script> */
}
"use strict";
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function colocaNomeEntreOsBanners(e) {
if (document.querySelector(".gallery")) {
e.disconnect();
var t = (document.querySelector(".gallery"),
document.createElement("div"));
t.classList.add("image"),
t.classList.add("image--alt");
var n = document.createElement("h2");
n.innerHTML = "<strong>Estilo</strong> em qualquer momento",
t.appendChild(n)
}
}
function linkVertodas(e) {
if (document.querySelector(".prateleira")) {
e.disconnect();
var t = document.querySelector(".prateleira")
, n = document.createElement("div");
n.classList.add("caixa-top-selecao");
var i = document.querySelector(".prateleira h2");
n.appendChild(i);
var r = document.createElement("a");
r.href = "/137?map=productClusterIds&O=OrderByReleaseDateDESC",
r.textContent = "Ver Todas",
r.classList.add("link-underline"),
n.appendChild(r),
t.insertBefore(n, t.childNodes[0])
}
}
function trocaTextoCasoUsuarioLogado() {
var e = document.querySelector(".botao-entrar");
e && corebiz.profile.isUserLogged(function(t) {
e.textContent = "Entrar"
}, function(e) {
return e
})
}
function TrocaBannerHome() {
if ($(window).width() <= 768) {
var e = $("body.00-home div#app-fascar div.main section.section-products div.shell div#galeria-bottom-1 div#galeria-direito-bottom").html();
$("body.00-home div#app-fascar div.main section.section-products div.shell div#galeria-bottom-1 div#galeria-direito-bottom").remove(),
$("body.00-home div#app-fascar div.main section.section-products div.shell div#galeria-bottom-1").prepend(e)
}
}
function _defineProperty(e, t, n) {
return t in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
function hideAndShowFascarClub() {
$(".productPrice .valor-de").length ? $(".widget-gray").hide() : $(".widget-gray").show()
}
function valueDiscountBoleto() {
var e, t, n = "BL";
$.ajax({
url: "/api/dataentities/" + n + "/search?_fields=desconto,ativo",
type: "GET",
async: !1,
headers: {
Accept: "application/vnd.vtex.ds.v10+json",
"Content-Type": "application/json"
},
success: function(n) {
if (e = n,
e.length > 0) {
for (t = 0; t < e.length; t++)
if (1 == e[t].ativo) {
percentDiscount = e[t].desconto,
$(".value-discount").empty().append(percentDiscount);
break
}
} else
$(".boleto_product").remove()
},
error: function(e) {}
})
}
function valueDiscountAll() {
var e = $(".valor-por.price-best-price").text().split(" ")
, t = e[0];
if (e = parseInt(e[1]),
"R$" == t) {
$(".boleto_product").show(),
percentDiscount = parseInt(percentDiscount);
var n = e * percentDiscount / 100
, i = e - n;
i = i.toFixed(2).toString().replace(".", ","),
$(".value-with-discount").empty().append(i)
} else
$(".boleto_product").hide()
}
function clickDiscountBoleto() {
$(".select.skuList.item-dimension-Cor label, .select.skuList.item-dimension-Tamanho label").click(function() {
setTimeout(function() {
valueDiscountAll()
}, 200)
})
}
function removeOuDaStringParcelamnto() {
var e = ".price-installments span > span"
, t = document.querySelector(e);
t && t.textContent.includes("ou") && (t.textContent = t.textContent.substring(3))
}
function adaptarTextoValorProduto() {
if (document.querySelector(".valor-por")) {
var e = document.querySelector(".price-best-price");
e.textContent.includes("Por: ") && e && e.textContent && (e.textContent = e.textContent.toString().substr(5))
}
}
function abreFechaEspecificacao() {
var e = new MutationObserver(function(t) {
document.querySelector(".campo-personalizado-espec") && (aplicaAcaoEmEspecificacoes(),
e.disconnect())
}
);
e.observe(document, {
childList: !0,
subtree: !0
})
}
function aplicaAcaoEmEspecificacoes() {
$("body").on("click", ".campo-personalizado-espec th", function(e) {
$(e.target.nextElementSibling).fadeToggle("fast")
})
}
function removeSpaceAfterProductName() {
var e = document.getElementById("nome_do_produto");
e && e.nextSibling.remove()
}
function keepTheProductName() {
var e = document.getElementsByClassName("productName")[0];
e && (e.textContent = e.textContent.replace(/-[\w+\W+]+/, ""))
}
function watcherProductName() {
var e = document.getElementsByClassName("productName")[0];
if (e) {
new MutationObserver(function(e) {
return keepTheProductName()
}
).observe(e, {
subtree: !0,
childList: !0,
characterData: !0
})
}
}
function modalSizeGuide() {
var e = document.createElement("div");
e.classList.add("modal-size-guide"),
e.innerHTML = '\n\t\t<header class="modal-size-guide-header">\n\t\t\t<h3>Guia de Tamanhos</h3>\n\t\t\t<span class="modal-size-guide-close">X</span>\n\t\t</header>\n\t\t<article class="modal-size-guide-article">\n\t\t\t<div class="side left-side">\n\t\t\t\t<p>Para encontrar o número adequado para seus pés siga as instruções:</p>\n\t\t\t\t<p>- Calçando meias sociais, tire as medidas de seus dois pés como indicado na ilustração, Isto, pelo tamanho de um poder ser diferente do outro.</p>\n\t\t\t\t<p>- Utilize uma folha em branco e uma régua comum.</p>\n\t\t\t\t<p>- Ao medir, fique em pé, pois o peso do corpo pode influenciar na medição.</p>\n\t\t\t\t<p>- Considere do calcanhar ao final do dedo mais longo para estabelecer o comprimento.</p>\n\t\t\t\t<p>- A referência para a definição do tamanho será o pé com o maior comprimento.</p>\n\t\t\t\t<p>Nota: Se o tamanho do seu pé for intermediário, muito próximo ou equivalente à medida exata, recomendamos a compra de um número maior em função de um possível uso do calçado com meias um pouco mais grossas e da circulação sanguínea que pode causar inchaço nos pés. Da mesma forma, se seu pé é largo ou possui peito alto recomendamos a compra de um número maior. </p>\n\t\t\t</div>\n\t\t\t<div class="side right-side">\n\t\t\t\t<img src="/arquivos/fascar-modal-guia-de-tamanhos.jpg" alt="imagem ilustrativa de guia de tamanhos" />\n\t\t\t</div>\n\t\t\t<div class="total-size">\n\t\t\t\t<img src="/arquivos/fascar-modal-guia-de-tamanhos-regua.jpg" alt="imagem ilustrativa de guia de tamanhos" />\n\t\t\t\t<p>Ficou com alguma dúvida? Contate nosso <a href="/Institucional/atendimento">SAC.</a></p>\n\t\t\t</div>\n\t\t</article>\n\t',
e.getElementsByClassName("modal-size-guide-close")[0].addEventListener("click", closeModalSizeGuide),
document.body.appendChild(e)
}
function openModalSizeGuide() {
document.getElementsByClassName("modal-size-guide")[0].classList.add("modal-size-guide-show")
}
function closeModalSizeGuide() {
document.getElementsByClassName("modal-size-guide")[0].classList.remove("modal-size-guide-show")
}
function palceSizeGuide() {
var e = document.querySelectorAll(".bread-crumb ul li")
, t = ["Hand Made", "Carteira", "Chaveiro", "Conservação", "Pasta", "Meia", "Pulseira"];
if (e && e[1] && e[2] && !t.contains(e[1].textContent) && !t.contains(e[2].textContent)) {
var n = document.querySelector("ul.Tamanho");
if (n) {
var i = document.createElement("p");
i.textContent = "Guia de Tamanhos",
i.classList.add("size-guide"),
i.addEventListener("click", openModalSizeGuide),
n.appendChild(i)
}
}
}
function calculeClubPrice() {
var e = document.getElementsByClassName("valor-por")[0]
, t = document.querySelector("footer.widget__foot");
if (e && t) {
var n = String(parseFloat(.05 * parseFloat(e.textContent.match(/[\d,\.]+/)[0].replace(".", "").replace(",", "."))).toFixed(2)).replace(".", ",").substr(0, 5)
, i = document.createElement("div");
i.classList.add("area-credit-fascar");
var r = document.createElement("span");
r.classList.add("text-credit-fascar"),
r.textContent = "Crédito fascar:";
var o = document.createElement("h3");
o.textContent = "R$ " + n,
i.appendChild(r),
i.appendChild(o),
t.insertBefore(i, t.childNodes[0])
}
}
function setCodOnSku() {
var e = document.querySelector("div.skuReference");
if (e) {
e.textContent = "cód. " + e.textContent;
new MutationObserver(function(t) {
e.textContent.includes("cód. ") || (e.textContent = "cód. " + e.textContent)
}
).observe(e, {
childList: !0
})
}
}
function setFirstOptionSku() {
var e = document.querySelectorAll(".dimension-Cor");
if (!location.search.length && e.length)
try {
e[0].click()
} catch (e) {}
}
function changeTextWarnme() {
var e = document.querySelector(".sku-notifyme-success");
e && (e.textContent = e.textContent.replace("o produto", "seu número").replace("email avisando", "aviso por email"))
}
function preSetFirstSku() {
var e = !1
, t = document.querySelector("ul.Cor");
if (t) {
var n = t.querySelector("label");
if (n) {
var i = n.previousElementSibling;
if (i) {
i.click();
var r = document.querySelector("ul.Tamanho");
if (r) {
var o = r.querySelectorAll("label");
if (forEach(o, function(t) {
t.classList.contains("item_unavailable") || (e = !0)
}),
!e) {
var a = o[0].previousElementSibling;
listenSpec(t, r),
setTimeout(function() {
a.click(),
canSelect = !0
}, 500)
}
}
}
}
}
}
function listenSpec(e, t) {
var n = e.querySelectorAll("label");
if (n) {
forEach(n, function(e) {
e.addEventListener("click", function() {
return selectedSpec.color = !0
})
});
var i = t.querySelectorAll("label");
i && forEach(i, function(e) {
e.addEventListener("click", function() {
return selectedSpec.size = !0
})
})
}
}
function openModalWarnme() {
var e = document.getElementsByClassName("modal-warnme")[0]
, t = document.getElementsByClassName("modal-warnme-background")[0];
t && t && (e.classList.add("active"),
t.classList.add("active"))
}
function closeModalWarnme() {
var e = document.getElementsByClassName("modal-warnme")[0]
, t = document.getElementsByClassName("modal-warnme-background")[0];
t && t && (e.classList.remove("active"),
t.classList.remove("active"))
}
function modalWarnme() {
var e = document.createElement("div");
e.classList.add("modal-warnme-background");
var t = document.createElement("div");
t.classList.add("modal-warnme");
var n = document.createElement("h3");
n.classList.add("modal-warnme-text-title"),
n.textContent = "Aviso";
var i = document.createElement("p");
i.classList.add("modal-warnme-text"),
i.textContent = "Você não selecionou a cor e o tamanho do produto, tem certeza de que são essas opções que deseja ser avisado quando disponível?";
var r = document.createElement("div");
r.classList.add("modal-warnme-content-action");
var o = document.createElement("button");
o.classList.add("modal-warnme-content-action-confirm"),
o.textContent = "Fechar",
o.addEventListener("click", closeModalWarnme),
r.appendChild(o),
t.appendChild(n),
t.appendChild(i),
t.appendChild(r),
document.body.appendChild(e),
document.body.appendChild(t)
}
function listenWarnme() {
var e = document.querySelector(".portal-notify-me-ref form")
, t = document.getElementById("notifymeButtonOK");
if (e && t) {
var n = t.cloneNode(!0);
t.parentNode.replaceChild(n, t),
n.addEventListener("click", function(t) {
if (t.preventDefault(),
!e.notifymeClientName.value)
return void e.notifymeClientName.focus();
if (!e.notifymeClientEmail.value)
return void e.notifymeClientEmail.focus();
if (!selectedSpec.color && !selectedSpec.size)
return openModalWarnme(),
selectedSpec.color = !0,
void (selectedSpec.size = !0);
var n = new FormData;
n.append("notifymeClientName", e.notifymeClientName.value),
n.append("notifymeClientEmail", e.notifymeClientEmail.value),
n.append("notifymeIdSku", e.notifymeIdSku.value);
var i = new XMLHttpRequest;
i.open("POST", e.action),
i.onload = function() {
200 === i.status ? (e.style.display = "none",
document.querySelector(".portal-notify-me-ref fieldset.success").style.display = "block") : (e.style.display = "none",
document.querySelector(".portal-notify-me-ref fieldset.error").style.display = "block")
}
,
i.send(n)
})
}
}
function removeDeFromPricePromo() {
var e = document.getElementsByClassName("valor-de")[0];
e && e.textContent.includes("De: ") && (e.textContent = e.textContent.substring(3))
}
function calcPorcentPromo() {
var e = document.getElementsByClassName("valor-de")[0]
, t = document.getElementsByClassName("valor-por")[0];
if (e && t && !e.querySelector(".calc-porcent-promo") && !e.querySelector(".valor-por-promo")) {
var n = document.createElement("span");
if (n.textContent = e.textContent,
n.classList.add("valor-por-promo"),
e.textContent = "",
e.appendChild(n),
e && t) {
var i = e.textContent.substring(3).replace(",", ".");
i = parseInt(i.substring(0, i.length - 3).replace(".", ""));
var r = t.textContent.substring(3).replace(",", ".");
r = parseInt(r.substring(0, r.length - 3).replace(".", "")),
oldPriceStore = null === oldPriceStore ? i : oldPriceStore,
currentPriceStore = null === currentPriceStore ? r : currentPriceStore;
var o = i - r
, a = o / i * 100;
a = a.toFixed(3),
a = Math.ceil(a);
var s = document.createElement("span");
s.classList.add("calc-porcent-promo"),
s.textContent = a + "%OFF",
setTimeout(function() {
e.appendChild(s)
}, 2e3)
}
}
}
function hideFascarClubWhenPromotion() {
var e = document.getElementsByClassName("product__content-group")[2];
e && (document.querySelector(".valor-por") && !document.getElementsByClassName("calc-porcent-promo")[0] || (e.style.display = "none"))
}
function _toConsumableArray(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 _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function autoAlinhamentoFiiltros() {
if (!(window.innerWidth <= 1024)) {
var e = document.querySelector(".search-multiple-navigator");
if (e) {
var t = e.querySelectorAll("fieldset");
forEach(t, function(e, t) {
("none" === e.style.display || e.classList.contains("filtro_marca")) && e.remove()
})
}
}
}
function mudaTextoFiltroFaixaDePreco() {
var e = document.querySelector(".filtro_faixa-de-preco h5");
e && (e.textContent = "Faixa de Preço")
}
function addShellBreadCrumbHeader() {
var e = document.getElementsByClassName("product__head")[0];
e && e.classList.add("shell")
}
function hideSearchSingleIf() {
var e = document.getElementsByClassName("search-multiple-navigator")[0]
, t = document.getElementsByClassName("search-single-navigator")[0];
e && t && e && t.remove()
}
function initMap(e, t, n) {
var i = document.getElementById("map")
, r = {
center: new google.maps.LatLng(e,t),
zoom: 13,
scrollwheel: !0,
disableDefaultUI: !1,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: !0,
mapTypeControlOptions: {
mapTypeIds: [google.maps.MapTypeId.ROADMAP, "tehgrayz"]
}
}
, i = new google.maps.Map(i,r);
new google.maps.Marker({
position: new google.maps.LatLng(e,t),
map: i,
icon: "/arquivos/fascar-location.png"
})
}
function toggleLista(e) {
forEach(e, function(t) {
t.addEventListener("click", function(t) {
t.target.classList.contains("list-active") ? (t.target.classList.remove("list-active"),
t.target.nextElementSibling.classList.remove("active")) : (closeAll(e),
t.target.classList.add("list-active"),
t.target.nextElementSibling.classList.add("active"))
})
})
}
function closeAll(e) {
forEach(e, function(e) {
e.classList.remove("list-active"),
e.nextElementSibling.classList.remove("active")
})
}
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
function _classCallCheck(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}
!function(e) {
var t = function(e) {
if (e)
return e.toLowerCase().trim().replace(/[áàãâä]/g, "a").replace(/[éèẽêë]/g, "e").replace(/[íìĩîï]/g, "i").replace(/[óòõôö]/g, "o").replace(/[úùũûü]/g, "u").replace(/ç/g, "c").replace(/(\ |_)+/, " ").replace(/(^-+|-+$)/, "").replace(/[^a-z0-9]+/g, "-")
}
, n = function() {
if (e(".vitrine.resultItemsWrapper").length) {
parseInt(e(".searchResultsTime:eq(0) .resultado-busca-numero .value").text()),
parseInt(e(".resultItemsWrapper .prateleira-categoria ul>li").length)
}
}
, i = function() {
this.deleteAllCookies = function() {
var e = document.cookie.split("; ");
for (var t in e)
document.cookie = /^[^=]+/.exec(e[t])[0] + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"
}
,
this.titles = function() {
var t = "Fascar | Loja Online";
if (e("body").hasClass("produto") || e("body").hasClass("especial") || e("body").hasClass("busca") || e("body").hasClass("brand")) {
var n = e("title").text()
, i = n.replace(/fascar/g, t);
e("title").text(i)
} else
e("body").hasClass("outlet") && e("title").text("Outlet - " + t)
}
,
this.homeControl = function() {
return {
init: function() {
e("body").hasClass("home")
}
}
}
,
this.productControl = function() {
return {
init: function() {
e("body").hasClass("produto")
}
}
}
,
this.catalogoControl = function() {
return {
buildItemFilter: function(e) {
if (e)
return '<fieldset class="refino even Fascar filtro_categories"><h5>Categorias</h5><div class="mostrar-filtro">' + e + "</div></fieldset>"
},
buildItem: function(e) {
if (e)
return '<label class="item-category sr_' + t(e.Name) + '"><a href="' + e.Link + '">' + e.Name + "</a></label>"
},
getCategories: function(t) {
var n = "function" == typeof t;
vtxctx.departmentName && e.get("/api/catalog_system/pub/facets/search/" + vtxctx.departmentName.toLowerCase() + "?map=c", function(e) {
var i = e.CategoriesTrees.filter(function(e) {
return e.Name == vtxctx.categoryName
});
n && e.CategoriesTrees && i[0] && t(i[0].Children)
})
},
smartResearch: function() {
e("body").hasClass("catalogo")
},
init: function() {
if (e("body").hasClass("catalogo")) {
var n = this
, i = "";
this.getCategories(function(r) {
r.forEach(function(e) {
i += n.buildItem(e)
}),
e(".toggle-filter").prepend(n.buildItemFilter(i)),
e(".item-category.sr_" + t(vtxctx.categoryName)).addClass("act")
})
}
this.smartResearch()
}
}
}
,
this.cmsControl = function() {
return {
setTitle: function(t) {
t && e("html").find("title").text(t)
},
setDescription: function(t) {
t && e("html").find("meta[name=description]").attr("content", t)
},
init: function() {
e("body").hasClass("sobre-a-fascar") && (this.setTitle("Sobre a Fascar | Loja Online"),
this.setDescription("Conheça nossa história, nossa linha exclusiva de produtos, informações sobre a nossa qualidade, tecnologias especiais e atendimento. Descubra as razões para usar Fascar.")),
e("body").hasClass("nossas-lojas") && (this.setTitle("Nossas Lojas | Loja Online"),
this.setDescription("Encontre aqui todas as lojas Fascar com produtos exclusivos para você.")),
e("body").hasClass("atendimento") && (this.setTitle("Atendimento | Loja Online"),
this.setDescription("Aqui você tem um canal de comunicação direto com a Fascar com atendimento personalizado, seja para esclarecer dúvidas, enviar sugestões ou críticas.")),
e("body").hasClass("politica-de-privacidade") && (this.setTitle("Política de Privacidade | Loja Online"),
this.setDescription("Assegurar alta qualidade em privacidade e segurança para nossos clientes também é um de nossos compromissos. Os dados cadastrais dos clientes Fascar são registrados por nossos sistemas de forma automática e não são vendidos, trocados ou divulgados a terceiros. Mantemos suas informações 100% seguras e em absoluto sigilo. ")),
e("body").hasClass("duvidas-frequentes") && (this.setTitle("Dúvidas Frequentes | Loja Online"),
this.setDescription("Para facilitar e agilizar sua pesquisa e esclarecer suas dúvidas, separamos algumas perguntas que poderão te ajudar.")),
e("body").hasClass("nossas-lojas") && (this.setTitle("Nossas Lojas | Loja Online"),
this.setDescription("Encontre aqui todas as lojas Fascar com produtos exclusivos para você.")),
e("body").hasClass("guia-de-uso-e-conservacao") && (this.setTitle("Guia de Uso e Conservação | Loja Online"),
this.setDescription("Atenção especial e manutenções periódicas são a melhor maneira de garantir a durabilidade e o melhor visual de seus calçados. Confira as dicas que reservamos para você cuidar dos seus produtos.")),
e("body").hasClass("formas-de-entrega-e-frete") && (this.setTitle("Formas de Entrega e Frete | Loja Online"),
this.setDescription("Temos opções de entrega e frete para atender você em todo o Brasil*.")),
e("body").hasClass("formas-de-pagamento") && (this.setTitle("Formas de Pagamento | Loja Online"),
this.setDescription("Confira as opções de pagamento e parcelamento para comprar seu Fascar.")),
e("body").hasClass("politica-de-trocas-e-devolucoes") && (this.setTitle("Política de Trocas e Devoluções | Loja Online"),
this.setDescription("Consulte nossas políticas, termos e condições, e aproveite tranquilo as comodidades."))
}
}
}
,
this.hotsiteControl = function() {
return {
init: function() {
e("body").hasClass("hotsite")
}
}
}
,
this.loginControl = function() {
return {
init: function() {
e("body").hasClass("login")
}
}
}
,
this.buscavazia = function() {
e("body").hasClass("resultado-busca") && e("span.ft").text(savana.getParams("ft"))
}
,
this.initControl = function() {
this.homeControl().init(),
this.productControl().init(),
this.catalogoControl().init(),
this.cmsControl().init(),
this.hotsiteControl().init(),
this.loginControl().init(),
this.buscavazia(),
this.titles()
}
};
corebiz.config({
DEBUG: !0,
namestore: "fascar",
headers: {
Accept: "application/json; charset=utf-8",
"Content-Type": "application/json"
}
}),
e(window).load(function() {
(new i).initControl(),
setTimeout(function() {
n()
}, 1e3)
}),
e(document).ready(function() {
e(".search-multiple-navigator .toggle-filter").find("fieldset").each(function() {
var t = e(this)
, n = t.find("h5").text();
"Detalhes do Produto" == n && t.css("display", "none");
var i = e(this).find(".mostrar-filtro > label");
e.each(i, function() {
var t = e(this)
, n = t.find("input.multi-search-checkbox").val();
if ("Marrom Claro" == n) {
var i = n.toString().replace(" ", "");
t.find("input.multi-search-checkbox").attr("value", i)
}
}),
"Tamanho" == n && e.each(i, function() {
var t = e(this);
t.addClass("boxTam");
var n = t.text()
, i = n.split("(");
t.text(i[0])
})
})
})
}($);
var _createClass = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1,
i.configurable = !0,
"value"in i && (i.writable = !0),
Object.defineProperty(e, i.key, i)
}
}
return function(t, n, i) {
return n && e(t.prototype, n),
i && e(t, i),
t
}
}()
, SeletorCores = function() {
function e(t, n) {
_classCallCheck(this, e),
this._classElementoLabelCor = t,
this._elementoCor = [],
this.width = 50,
this.height = 15,
this.cor = null,
this.aplicaSeletorDeCores()
}
return _createClass(e, [{
key: "pegaElemento",
value: function(e) {
var t = this;
if (document.querySelector(this._classElementoLabelCor)) {
e.disconnect();
var n = document.querySelectorAll(this._classElementoLabelCor);
Array.from(n).map(function(e) {
return t._elementoCor.push(e)
}),
this.criaElementoImagem()
}
}
}, {
key: "encontraElemento",
value: function() {
var e = this
, t = new MutationObserver(function(n) {
e.pegaElemento(t)
}
)
, n = {
subtree: !0,
childList: !0
};
t.observe(document, n)
}
}, {
key: "pegaPathDaImagem",
value: function(e) {
return "/arquivos/" + e.textContent + ".jpg"
}
}, {
key: "aplicaImagemNaLabel",
value: function(e, t) {
e.onload = function() {
t.textContent = "",
t.append(e)
}
,
e.onerror = function() {
return "não tem imagem"
}
}
}, {
key: "criaElementoImagem",
value: function() {
var e = this;
this._elementoCor.map(function(t) {
var n = new Image(e.width,e.height);
n.src = e.pegaPathDaImagem(t),
e.aplicaImagemNaLabel(n, t)
})
}
}, {
key: "aplicaSeletorDeCores",
value: function() {
this.encontraElemento()
}
}]),
e
}()
, _createClass = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1,
i.configurable = !0,
"value"in i && (i.writable = !0),
Object.defineProperty(e, i.key, i)
}
}
return function(t, n, i) {
return n && e(t.prototype, n),
i && e(t, i),
t
}
}()
, FlagPrateleira = function() {
function e(t) {
_classCallCheck(this, e),
this._prateleiras = document.querySelectorAll(t),
this.numeroDeFlagsPermitido = 2,
this.flags = ["Novidade", "New", "NS20-PRE-VENDA", "Hand Made","NS20", "Natal", "Outlet II", "Black Friday"],
this.flags = ["Dupla Face", "Active Air Flow", "Airtech", "Altus", "Cromo", "IZI", "Linha Branca", "Lite", "Tamanho Especial","Tamanho Grande", "Hand Made", "Flexilinea"],
this.elementFlag = []
}
return _createClass(e, [{
key: "verificaSeFlagJaExiste",
value: function(e) {
if (this.elementFlag.length < 1)
return !1;
for (var t = 0; t < this.elementFlag.length; t++)
return this.elementFlag[t].flag == e.flag
}
}, {
key: "criaFlags",
value: function(e) {
var t = document.createElement("span");
t.classList.add("minha-flag"),
t.textContent = e;
var n = {
element: t,
flag: e
};
this.verificaSeFlagJaExiste(n) || this.elementFlag.push(n)
}
}, {
key: "criaAreaFlags",
value: function(e) {
var t = document.createElement("div");
return t.classList.add("minha-area-flags"),
e.map(function(e) {
return t.appendChild(e.element)
}),
t
}
}, {
key: "adicionaFlagsNaPrateleira",
value: function(e, t) {
t.insertBefore(e, t.childNodes[0])
}
}, {
key: "limpaFlags",
value: function() {
this.elementFlag = []
}
}, {
key: "filtrarEAplicarFlagsNaPrateleira",
value: function() {
var e = this
, t = void 0;
Array.from(this._prateleiras).forEach(function(n) {
e.limpaFlags(),
t = 0,
Array.from(n.querySelectorAll(".flag")).forEach(function(n) {
if (e.flags.includes(n.textContent)) {
if (t > e.numeroDeFlagsPermitido)
return;
e.criaFlags(n.textContent),
t++
}
}),
e.adicionaFlagsNaPrateleira(e.criaAreaFlags(e.elementFlag), n)
})
}
}]),
e
}();
$(document).ajaxStop(function() {
setTimeout(function() {
if ($(".flag-prateleira .minha-area-flags").length > 1 && $(".minha-area-flags").remove(),
document.querySelector(".slider__slide")) {
new FlagPrateleira(".slider__slide").filtrarEAplicarFlagsNaPrateleira()
}
if (document.querySelector(".flag-prateleira")) {
new FlagPrateleira(".flag-prateleira").filtrarEAplicarFlagsNaPrateleira()
}
$("#loading").hide()
}, 1e3)
});
var _createClass = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1,
i.configurable = !0,
"value"in i && (i.writable = !0),
Object.defineProperty(e, i.key, i)
}
}
return function(t, n, i) {
return n && e(t.prototype, n),
i && e(t, i),
t
}
}()
, PaginaBusca = function() {
function e() {
_classCallCheck(this, e),
this._menuDepartamento = null,
this._stop = !1
}
return _createClass(e, [{
key: "observador",
value: function(e) {
var t = this
, n = new MutationObserver(function(i) {
if (t._stop)
return void n.disconnect();
e()
}
);
n.observe(document, {
childList: !0,
subtree: !0
})
}
}, {
key: "insereTextoAntesDoResultado",
value: function() {
var e = this;
this.observador(function() {
if (document.querySelector(".menu-departamento")) {
e._stop = !0;
var t = document.querySelector(".menu-departamento")
, n = t.querySelector(".search-single-navigator")
, i = document.createElement("span");
i.textContent = "Produtos encontrados:",
i.classList.add("categorias-encontradas"),
n.insertBefore(i, n.childNodes[0])
}
})
}
}]),
e
}()
, paginaBusca = new PaginaBusca;
paginaBusca.insereTextoAntesDoResultado(),
function(e) {
e(document).ready(function() {
e("#form-submit").mouseup(function() {
e("#neighborhood").val(e("#neighborhood").val().replace(/\//gi, " ").replace(/\\/gi, " ").replace(/\./gi, ""))
}),
e(".form-personal-data-name label, .form-personal-data-surname label, .form-personal-data-cpf label, .form-personal-data-date-of-birth label, .form-contact-data-email label, .form-contact-data-telephone label, .address-form-cep label, .address-form-street-name label, .address-form-number label, .address-form-neighborhood label, .address-form-city label").append('<span class="obr">*</span>'),
e(".form-personal-data-name input, .form-personal-data-surname input, .form-personal-data-cpf input, .form-personal-data-date-of-birth input, .form-contact-data-email input, .form-contact-data-telephone input, .address-form-cep input, .address-form-street-name input, .address-form-number input, .address-form-neighborhood input, .address-form-city input").attr("required", "required"),
e("a#btn-edit-user").on("click", function(t) {
t.preventDefault(),
e("button.btn-link").click(),
e("a#edit-data-link")[0].click()
}),
e("a#btn-edit-address").on("click", function(t) {
t.preventDefault(),
e("button.btn-link").click(),
e("a.address-update")[0].click()
})
})
}($),
$(document).ready(function() {
$("#bx-valor").prepend('\x3c!--avise-me--\x3e<div id="avise-me-vtex" style="display:none;"><a target="_top" class="buy-buttonbuy-button-ref" href="/checkout/cart/add?sku=2000116&amp;qty=1&amp;seller=1&amp;redirect=true&amp;sc=1" style="display: none;">Comprar</a><p class="unavailable-button" style="display:none">Produto Esgotado</p><input type="hidden" class="buy-button-amount" value="1"><div class="portal-notify-me-ref"><div class="notifyme sku-notifyme" style=""><div class="notifyme-title-div" style=""><h3 class="notifymetitle notifyme-title">Avise-Me</h3></div><form action="/no-cache/AviseMe.aspx" style=""><fieldset class="sku-notifyme-form notifyme-form"><p>Para ser avisado da disponibilidade deste Produto, basta preencher os campos abaixo.</p><input class="sku-notifyme-client-name notifyme-client-name" placeholder="Digite seu nome..." size="20" type="text" name="notifymeClientName" id="notifymeClientName" style="display: block;"><input class="sku-notifyme-client-email notifyme-client-email" placeholder="Digite seu e-mail..." size="20" type="text" name="notifymeClientEmail" id="notifymeClientEmail" style="display: block;"><input class="btn-ok sku-notifyme-button-ok notifyme-button-ok" value="ok" type="button" name="notifymeButtonOK" id="notifymeButtonOK" style="display: inline-block;"><input type="hidden" class="sku-notifyme-skuid notifyme-skuid" name="notifymeIdSku" value="2000116" style="display: none;"></fieldset></form><p class="notifyme-loading-message" style="display: none;"><span class="sku-notifyme-loading notifyme-loading">Carregando...</span></p><fieldset class="success" style="display: none;"><label><em><span class="sku-notifyme-success notifyme-success">Cadastrado com sucesso, assim que o produto for disponibilizado você receberá um email avisando.</span></em></label></fieldset><fieldset class="error" style="display: none;"><label><span class="sku-notifyme-error notifyme-error"></span></label></fieldset></div></div></div>\x3c!--avise-me--\x3e'),
$("#btnReferAFriend").dblclick(function() {
$("#div-referAFriend").next("#TB_overlay").show(),
$("#div-referAFriend").next("#TB_overlay").next("#TB_window").show()
}),
$("#TB_closeWindowButton").click(function() {
$("#div-referAFriend").next("#TB_overlay").hide(),
$("#div-referAFriend").next("#TB_overlay").next("#TB_window").hide()
}),
$("#popupCalculoFreteWrapper").click(function() {
$("#calculoFrete").show()
});
var e, t = window.location.pathname;
location.href.substring(0, location.href.lastIndexOf("/") + 1);
if ("" != t) {
var e = t.split("/")[1]
, n = "";
"" != e && null != e || (e = "index.html"),
-1 == e.indexOf(".html") && (e = t.split("/")[2],
n = t.split("/")[1]),
$("#atualizar").click(function() {
return e = $(this).attr("rel"),
"" != e && null != e || (e = "index.html"),
e && $.post("/system/core.php", {
file: e,
dir: n,
action: "ajax"
}, function(e) {
window.location.reload()
}),
!1
})
}
$(".address-update").click(function() {
$("#address-edit").show(),
$("#address-edit").css("opacity", "100")
}),
$("#form-address .btn-link").click(function() {
$("#address-edit").hide()
}),
$("#edit-data-link").click(function() {
$("#editar-perfil").show(),
$("#editar-perfil").css("opacity", "100")
}),
$(".delete").click(function() {
$("#address-remove").show(),
$("#address-remove").css("opacity", "100")
}),
$("#editar-perfil-conteudo .btn-link").click(function() {
$("#editar-perfil").hide(),
$("#editar-perfil").fadeOut()
}),
$("#lnkPubliqueResenha").click(function() {
return $("#publishUserReview .header, #publishUserReview .footer").show(),
!1
}),
$(".close .btn-thickbox").click(function() {
return $("#publishUserReview .header, #publishUserReview .footer").hide(),
!1
}),
$("#newsletterButtonOK").click(function() {
return "Digite seu nome" != $("#newsletterClientName").val() && "Digite seu e-mail" != $("#newsletterClientEmail").val() ? ($("#bx-newslatter .success").show("slow"),
$("#bx-newslatter fieldset").eq(0).hide()) : ($("#bx-newslatter .error").show("slow"),
$("#bx-newslatter fieldset").eq(0).hide()),
!1
}),
$(".glis-thickbox.tb-added").click(function(e) {
return e.preventDefault(),
$("body").append('<div id="TB_overlay" style="position:fixed;z-index:10000;top:0px;left:0px;height:100%;width:100%"></div><div id="TB_window" style="position: fixed; z-index: 10002; display: block; top: 50%; left: 50%; margin-left: -315px; width: 630px; margin-top: -220px;"><div id="TB_title"><div id="TB_ajaxWindowTitle" style="float:left;padding:7px 0 5px 10px;margin-bottom:1px"></div><div id="TB_closeAjaxWindow" style="float:right;padding:7px 10px 5px 0"><a href="#" id="TB_closeWindowButton" title="Fechar">Fechar</a></div></div><div id="TB_ajaxContent" style="width:600px;height:395px;clear:both;overflow:auto;padding:2px 15px 15px 15px"><div id="7264e7a991b54c5f8de67f8b1fd80e42" class="giftlist-insertsku"><span class="glis-title">Adicionar produtos às suas Listas</span><div class="glis-selected"><span class="glis-selected-amount">1</span> produtos selecionados <span class="glis-flash-quantity-added" style="display: none;">+1</span></div><div class="glis-save" style="display: none;"></div><div class="glis-mylist mode-list"><span class="glis-existing-title">Selecionar uma lista</span><ul class="glis-ul"><li class="glis-li version-2 type-4 private active visitor-has-access member-has-access has-image no-product"><a href="javascript:void(0);" id="bt_0c8ef0c73f144ae8a83a6024ca9cd159" class="glis-submit glis-submit-list" rel="6" title="Minha lista de casamento">Minha ista</a></li><li class="glis-li version-2 type-5 private active visitor-has-access member-has-access no-image has-product"><a href="javascript:void(0);" id="bt_45d9c6e28ddd4b9b96adf99a9b66a93b" class="glis-submit glis-submit-list" rel="7" title="Minha lista de desejos">Minha lista de desejos</a></li></ul></div></div></div></div>'),
!1
}),
$("body").on("click", "#TB_closeWindowButton", function(e) {
return e.preventDefault(),
$("#TB_overlay, #TB_window").remove(),
!1
}),
$(".refresh-off").hide(),
$("#giftlistsearchform #giftlistsearchfind").click(function() {
$(".refresh-off").show()
})
}),
function(e) {
e(window).load(function() {
e(".orders").find("link").attr("href", "/"),
e("body").on("click", ".order-header.page-header .order-title", function() {
e(this).parent().parent().find(".order-details").slideToggle()
})
})
}($),
$(window).ready(function() {
if (!$("body").hasClass("account")) {
var e = new MutationObserver(function(t) {
colocaNomeEntreOsBanners(e)
}
)
, t = new MutationObserver(function(e) {
linkVertodas(t)
}
);
if (document.querySelector(".section-products")) {
var n = {
attributes: !0,
childList: !0,
subtree: !0,
characterData: !0
};
e.observe(document.querySelector(".section-products"), n),
t.observe(document.querySelector(".section-products"), n)
}
trocaTextoCasoUsuarioLogado()
}
}),
$(document).ready(function() {
TrocaBannerHome()
}),
function(e, t, n, i) {
function r() {
return d.width() < 768
}
function o(t) {
var n = e(".nav")
, i = (e(".header"),
e(".header").find(".header__content-inner"))
, r = i.find(n).length;
t && !r ? n.clone().appendTo(i) : !t && r && i.find(n).detach()
}
function a(t) {
var n = e(".nav")
, i = "active";
n.find("> ul > li.has-dropdown > a").on("click", function(t) {
e(this).next().hasClass(i) || t.preventDefault(),
n.find(".nav__dropdown").addClass(i)
})
}
function s(t, n) {
n.each(function() {
e(this).css("z-index", t),
t--
})
}
function l(t) {
t.each(function() {
var t = e(this)
, n = t.find("img").attr("src");
t.css("background-image", 'url("' + n + '")')
})
}
function c() {
(e("body").hasClass("catalogo") || e("body").hasClass("produto")) && setInterval(function() {
e(".info-valores").each(function() {
var t = e(".txt-a-partir", this).text()
, n = e(".de-vitrine", this);
"a partir de" == t && n.hide()
})
}, 1e3)
}
function u() {
var t = location.search;
if (t = t.split("="),
"?idSku" == t[0]) {
var n;
for (n = 0; n < skuJson.skus.length; n++) {
if (skuJson.skus[n].sku == t[1]) {
var i = skuJson.skus[n].values[0];
i = i.replace(" ", "-");
e(".group_0 .dimension-Cor." + ("skuespec_Cor_opcao_" + i)).trigger("click");
break
}
}
} else
e(".group_0 .dimension-Cor").eq(0).trigger("click")
}
var d = e(t)
, p = e(n);
Array.prototype.insert = function(e, t) {
this.splice(e, 0, t)
}
,
t.forEach = function(e, t, n) {
for (var i = 0; i < e.length; i++)
t.call(n, e[i], i)
}
,
Array.prototype.forEach || (Array.prototype.forEach = function(e, t) {
for (var n = 0, i = this.length; n < i; ++n)
e.call(t, this[n], n, this)
}
),
e("body").hasClass("catalogo") && e("body").css("overflow-y", "hidden"),
p.ready(function() {
e("body").hasClass("produto") && u();
e(".duvidas-frequentes .grid .f-title-sec").on("click", function() {
e(this).toggleClass("active")
});
e(".nossas-lojas .grid .f-title-sec").on("click", function() {
e(this).toggleClass("active")
});
var i, r;
e(".gallery .box-banner").each(function() {
i = e(this),
r = i.find("img").attr("alt"),
i.find("a").append('<span class="name-banner">' + r + "</span>")
}),
e("li.helperComplement").remove();
var o = "active"
, a = e("body")
, p = e(".nav")
, f = e(".js-link-burger")
, h = e(".fullsize-image")
, m = e(".category")
, v = e(".slider-products .owl-item")
, g = (v.length,
m.find(".category__inner"))
, y = g.length;
l(h),
c(),
e(n).ajaxStop(function() {
c()
}),
m.find("> a").on("click", function(t) {
t.preventDefault(),
e(this).parent().toggleClass(o)
}),
s(y, g),
f.on("click", function(e) {
e.preventDefault(),
a.toggleClass(o)
}),
p.find("a").each(function() {
var t = e(this);
t.next().length && t.parent().addClass("has-dropdown")
}),
d.on("load", function() {
var n = e(".slider")
, i = e(".slider-products")
, r = e(".galeria1");
setTimeout(function() {
e("body").hasClass("catalogo") && e("body").css("overflow-y", "visible"),
e(t).resize(function() {
e(t).width() <= 768 && e(".itens-buscados").insertAfter(".filtro_faixa-de-preco")
}),
e(t).width() <= 768 && e(".itens-buscados").insertAfter(".filtro_faixa-de-preco")
}, 2e3),
setTimeout(function() {
e("body").hasClass("catalogo") && e("body").css("overflow-y", "visible"),
e(t).resize(function() {
e(t).width() <= 768 && e(".itens-buscados").insertAfter(".filtro_faixa-de-preco")
}),
e(t).width() <= 768 && e(".itens-buscados").insertAfter(".filtro_faixa-de-preco")
}, 3e3),
n.find(".slider__slides, .prateleira ul").addClass("owl-carousel").owlCarousel({
items: 1,
autoplay: !0,
animateOut: "fadeOut",
dots: !1,
mouseDrag: !1,
nav: !0,
navText: ["<i class='fa fa-chevron-left'></i>", "<i class='fa fa-chevron-right'></i>"]
}),
r.find(".galeriacarousel").addClass("owl-carousel").owlCarousel(_defineProperty({
items: 1,
autoplay: !0,
loop: !0,
animateOut: "fadeOut",
dots: !1,
nav: !0
}, "animateOut", "fadeOut")),
i.find(".slider__slides, .prateleira ul, .galeria1").addClass("owl-carousel").owlCarousel({
items: 4,
nav: !0,
mouseDrag: !1,
responsive: {
0: {
items: 1
},
768: {
items: 2
},
1024: {
items: 4
}
}
})
}),
e(".intro .slider .slider__clip").css("visibility", "visible"),
e(".navigation-tabs .menu-departamento .search-multiple-navigator").prepend('<div class="actions-filters hidden-md hidden-lg">\n\t <ul class="nav nav-filters">\n\t\t\t\t\t\t <li>\n\t\t\t\t\t\t <a class="oe-facets-remove-all-link btn-mobile-filter" href="javascript: void(0);">\n\t\t\t\t\t\t <span class="link-mobile link-text"><i class="fa fa-filter" aria-hidden="true"></i> Filtrar</span>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t </li>\n\t\t\t\t\t\t <li class="oe-facets-remove-all-item col-xs-6 disabled">\n\t\t\t\t\t\t <a class="oe-facets-remove-all-link btn-clear-filter" href="javascript: void(0);">\n\t\t\t\t\t\t <span class="link-mobile link-text">Limpar filtros</span>\n\t\t\t\t\t\t </a>\n\t\t\t\t\t\t </li>\n\t\t\t\t\t </ul>\n\t\t\t\t</div>'),
e("body").on("click", ".btn-mobile-filter", function(t) {
t.preventDefault(),
e(".toggle-filter").addClass("active")
}),
e("body").on("click", "#btn-close-filters", function(t) {
t.preventDefault(),
e(".toggle-filter").removeClass("active")
}),
e("body").on("click", "#bt-filtrar", function(t) {
t.preventDefault(),
e(".toggle-filter").removeClass("active")
}),
e("a[href='https://goo.gl/kMP0Dd']").attr("href", "https://www.fascar.com.br/acessorios/conservacao/"),
e("body").on("click", "#btn-close-filters", function(t) {
t.preventDefault(),
e(".toggle-filter").removeClass("active")
}),
e("body").on("click", ".btn-clear-filter", function(e) {
e.preventDefault(),
t.location.reload()
}),
e("body").on("click", ".bt-close-modal", function(t) {
e(".modal-home").hide()
}),
e("select#O option:eq(0)").text("Ordenar por"),
setTimeout(function() {
e(".toggle-filter").prepend('<a href="#" id="btn-close-filters" class="hidden-md hidden-lg">X</a>'),
e(".item-dimension-Tamanho input[type=radio]:eq(0)").is(":checked") && e(".item-dimension-Tamanho input[type=radio]:eq(0)").attr("checked", !1),
e(".itens-buscados").insertAfter(".bt-filtro"),
e(".bt-filtro").insertAfter(".itens-buscados"),
e(".multi-search-checkbox").change(function() {
var t = e(this).parent().parent().parent()
, n = t.find(".multi-search-checkbox:checked").length;
t.find(".filter-cont").length || t.children("h5").append('<p class="filter-cont" style="display: inline-block; color: #fff; font-size: 16px;"><span></span></p>'),
n > 0 ? t.find(".filter-cont").text("(" + n + ")") : t.find(".filter-cont").text("")
}),
e(".filtro_faixa-de-preco").append('<a href="#" class="bt-filtro" id="bt-filtrar">FILTRAR</a>'),
e(".filtro_faixa-de-preco").append('<a href="#" class="bt-filtro" id="bt-limpa-filtros">Limpar Tudo</a>')
}, 2e3),
e(".bread-crumb ul").append("<li>" + vtxctx.searchTerm + "</li>"),
setTimeout(function() {
e(".menu-departamento").show()
}, 2e3),
e("body").on("click", ".mostrar-filtro label", function() {
setTimeout(function() {
e(".mostrar-filtro").removeClass("active")
}, 1e3)
}),
e(".formulario-content").submit(function() {
var n;
return n = JSON.stringify({
email: e(".formulario-content .campo-modal-email").val(),
nome: e(".formulario-content .campo-modal-nome").val(),
tamanhoCalcado: e(".campo-modal-numero-calcado").val()
}),
e.ajax({
type: "POST",
url: "/api/dataentities/NW/documents",
data: n,
dataType: "json",
headers: {
accept: "application/json",
"content-type": "application/json"
},
beforeSend: function() {},
success: function(n) {
t.alert("Dados Enviados"),
e(".formulario-content .campo-modal-email").val(""),
e(".formulario-content .campo-modal-nome").val(""),
e(".formulario-content .campo-modal-numero-calcado").val("")
},
error: function() {
t.alert("Erro Enviar Dados")
}
}),
!1
})
}),
d.load(function() {
setTimeout(function() {
e(".bt-filtro").insertAfter(".itens-buscados"),
e("#bt-limpa-filtros").click(function() {
e(".x-remove-item-busca").trigger("click")
}),
e(".modal-guia-tamanho-cinto").click(function() {
e(".modal-size-guide-show").css("display", "block")
}),
e(".modal-size-guide-close").click(function() {
e(".modal-size-guide-show").css("display", "none")
})
}, 1e3)
}),
d.on("load resize", function() {
o(r()),
a(r())
}),
e("body").on("click", "div.content-text .event_click_home", function() {
e("div.show-content-text").fadeToggle("slow"),
e(".event_click_home").toggleClass("active-toggle")
}),
e("body").on("click", "div.content-text .event_click_oculta-conteudo-seo", function() {
e("div.show-content-text").fadeToggle("slow"),
e("a.event_click_home.active-toggle").removeClass("active-toggle")
}),
2 == e("head").find("meta[name='description']").length && e("meta[name='description']:eq(0)").remove(),
2 == e("head").find("title").length && e("title:eq(1)").remove(),
e("body").on("click", "form.form-black span.input-enviar", function() {
e(".form-black").addClass("form-black-border-none");
var t = !1;
if ("" == e("#nameAllIn").val() || "" == e("#emailAllIn").val() || -1 == e("#emailAllIn").val().indexOf("@") || -1 == e("#emailAllIn").val().indexOf(".") || 0 == e("#numberAllIn").length || "" == e("#numberAllIn").val() ? (e("body.black-friday .modal_implementado_black").show(),
e("body.black-friday section.modal_implementado_black .close-modal-black").click(function() {
e("body.black-friday section.modal_implementado_black").hide()
}),
"" == e("#nameAllIn").val() ? (e("#nameAllIn").css({
border: "2px solid #ffb901",
padding: "2px"
}),
t = !0) : e("#nameAllIn").css({
border: "none",
padding: "0"
}),
"" == e("#emailAllIn").val() || -1 != e("#emailAllIn").val().indexOf("@") || -1 != e("#emailAllIn").val().indexOf(".") ? (e("#emailAllIn").css({
border: "2px solid #ffb901",
padding: "2px"
}),
t = !0) : e("#emailAllIn").css({
border: "none",
padding: "0"
}),
0 == e("#numberAllIn").length || "" == e("#numberAllIn").val() || 0 == e("#numberAllIn").val() ? (e("#numberAllIn").css({
border: "2px solid #ffb901",
padding: "2px"
}),
t = !0) : e("#numberAllIn").css({
border: "none",
padding: "0"
})) : (e("body.black-friday .modal_implementado_black-cadastrado").show(),
e("body.black-friday section.modal_implementado_black-cadastrado .close-modal-black").click(function() {
e("body.black-friday section.modal_implementado_black-cadastrado").hide()
}),
e("#nameAllIn").val(""),
e("#emailAllIn").val(""),
e("#numberAllIn").val("")),
t)
return !1
}),
e("body").on("blur", "#nameAllIn, #emailAllIn", function() {
0 == e(this).length || "" == e("#numberAllIn").val() || 0 == e("#numberAllIn").val() ? e(this).css({
border: "2px solid #ffb901",
padding: "2px"
}) : e(this).css({
border: "none"
})
})
}(jQuery, window, document);
var selectedSpec = {
color: !1,
size: !1
}, canSelect = !1, oldPriceStore = null, currentPriceStore = null, percentDiscount;
if ($(document).ready(function() {
new SeletorCores(".dimension-Cor");
abreFechaEspecificacao(),
removeOuDaStringParcelamnto();
var e = new MutationObserver(function(e) {
adaptarTextoValorProduto()
}
);
document.querySelector(".product__content") && e.observe(document.querySelector(".product__content"), {
subtree: !0,
childList: !0,
characterData: !0
}),
removeSpaceAfterProductName(),
palceSizeGuide(),
modalSizeGuide(),
calculeClubPrice(),
setCodOnSku(),
changeTextWarnme(),
listenWarnme(),
modalWarnme(),
removeDeFromPricePromo(),
setTimeout(function() {
calcPorcentPromo()
}, 2e3);
var t = new MutationObserver(function(e) {
removeDeFromPricePromo(),
calcPorcentPromo(),
removeOuDaStringParcelamnto()
}
);
document.querySelector(".product__content-group") && t.observe(document.querySelector(".product__content-group"), {
childList: !0,
subtree: !0
}),
"Cinto" == $(".bread-crumb li.last").text() && $(".size-guide").remove(),
hideFascarClubWhenPromotion(),
$("body").on("click", ".skuList", function() {
setTimeout(function() {
hideAndShowFascarClub()
}, 1e3)
}),
hideAndShowFascarClub()
}),
$(window).load(function() {
valueDiscountBoleto(),
valueDiscountAll(),
clickDiscountBoleto()
}),
$(function() {
$("body").on("DOMSubtreeModified", ".productName", function() {
var e = Number($(".productName").text().slice(-2))
, t = $(".productName").text();
if (e >= 37 && e <= 44) {
var n = t.substring(0, t.length - 2);
$(".productName").text(n)
}
})
}),
document.querySelector("a[data-toggle=modal]")) {
var modal = document.querySelectorAll("a[data-toggle=modal]");
forEach(modal, function(e) {
e.addEventListener("click", function() {
document.querySelector(e.getAttribute("href")).classList.add("mostra-modal")
})
})
}
var _createClass = function() {
function e(e, t) {
for (var n = 0; n < t.length; n++) {
var i = t[n];
i.enumerable = i.enumerable || !1,
i.configurable = !0,
"value"in i && (i.writable = !0),
Object.defineProperty(e, i.key, i)
}
}
return function(t, n, i) {
return n && e(t.prototype, n),
i && e(t, i),
t
}
}()
, FiltrosNoTopo = function() {
function e() {
var t = this;
_classCallCheck(this, e),
$(".search-single-navigator").addClass("search-multiple-navigator").removeClass("search-single-navigator"),
this.multipleFilter = document.getElementsByClassName("search-multiple-navigator")[0] || null,
this.spaceSimulation = null,
this.toggleFilter = null,
this.areaActions = null,
this.orderBy = document.querySelectorAll(".catalogo .sub"),
this.stopObserverSingleNavigator = !1,
this.stopObserverMultipleNavigator = !1,
this.listMenuActivated = [],
this.aplicaDivEmVoltaDosFiltros(),
this.addElementSpaceSimulation(),
this.newOrderBy(),
this.pegaCor();
var n = {
childList: !0,
subtree: !0
};
this._documentObserver = new MutationObserver(function(e) {
t.stopObserverMultipleNavigator || t.aplicaEventoNoFiltroMultipleNavigator(),
t.stopObserverMultipleNavigator && t.stopObserverSingleNavigator && t._documentObserver.disconnect()
}
),
this._documentObserver.observe(document, n)
}
return _createClass(e, [{
key: "aplicaDivEmVoltaDosFiltros",
value: function() {
if (this.multipleFilter) {
var e = this.multipleFilter.querySelectorAll("fieldset")
, t = document.createElement("div");
t.classList.add("toggle-filter"),
forEach(e, function(e) {
t.appendChild(e)
}),
this.multipleFilter.appendChild(t),
this.toggleFilter = t
}
}
}, {
key: "closeSubMenu",
value: function(e) {
this.spaceSimulation.classList.remove("active"),
e.classList.remove("mostrar-filtro", "active"),
this.areaActions.classList.remove("active"),
this.orderBy[0].classList.remove("active"),
this.orderBy[1].classList.remove("active")
}
}, {
key: "eventButtonFilter",
value: function() {
var e = this
, t = document.querySelectorAll(".search-multiple-navigator div fieldset");
forEach(t, function(t) {
t.classList.remove("active"),
t = t.childNodes[2],
e.closeSubMenu(t)
})
}
}, {
key: "eventButtonClear",
value: function() {
var e = []
, t = this.multipleFilter.querySelectorAll(".mostrar-filtro");
forEach(t, function(t) {
e.push.apply(e, _toConsumableArray(t.querySelectorAll(".multi-search-checkbox")))
}),
e.forEach(function(e) {
e.parentNode.classList.contains("sr_selected") && e.parentNode.click(),
e.checked && (e.checked = !e.checked)
}),
$(".search-multiple-navigator div fieldset, .search-multiple-navigator .mostrar-filtro").removeClass("active")
}
}, {
key: "aplicaEventoNoFiltroMultipleNavigator",
value: function() {
var e = this;
if (this.multipleFilter && document.querySelector(".search-multiple-navigator div fieldset h5")) {
this.stopObserverMultipleNavigator = !0;
var t = (this.multipleFilter,
document.querySelectorAll(".search-multiple-navigator div fieldset"));
window.innerWidth > 1 ? ($(".area-actions").toggleClass("active"),
$(".search-multiple-navigator div fieldset").find("h5").next("div").addClass("mostrar-filtro"),
$("body").on("click", ".search-multiple-navigator div fieldset", function(e) {
$(".search-multiple-navigator div fieldset.active").length && !$(this).hasClass("active") && $(".search-multiple-navigator div fieldset, .search-multiple-navigator div fieldset .mostrar-filtro ").removeClass("active"),
$(this).toggleClass("active"),
$(this).find("h5").next("div").toggleClass("active")
}),
$("body").on("click", ".search-multiple-navigator div fieldset label", function(e) {
$(this).addClass("act")
}),
this.addEventAutoCloseMenu()) : (forEach(t, function(t) {
t.addEventListener("click", function(n) {
var i = t.childNodes[2];
i.classList.contains("mostrar-filtro") || (t.classList.add("active"),
i.classList.add("mostrar-filtro"),
e.listMenuActivated.push(t))
})
}),
this.addEventAutoCloseMenu())
}
}
}, {
ke
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment