diff options
Diffstat (limited to 'html/assets/js')
| -rw-r--r-- | html/assets/js/edit-post.js | 612 | ||||
| -rw-r--r-- | html/assets/js/manage-category.js | 287 | ||||
| -rw-r--r-- | html/assets/js/manage-posts.js | 177 | ||||
| -rw-r--r-- | html/assets/js/manage-tags.js | 163 | ||||
| -rw-r--r-- | html/assets/js/post-features.js | 148 | ||||
| -rw-r--r-- | html/assets/js/sliders/slider.js | 42 | ||||
| -rw-r--r-- | html/assets/js/swiper-bundle.min.js | 14 | ||||
| -rw-r--r-- | html/assets/js/wNumb.min.js | 1 | ||||
| -rw-r--r-- | html/assets/js/wiki.js | 27 |
9 files changed, 1414 insertions, 57 deletions
diff --git a/html/assets/js/edit-post.js b/html/assets/js/edit-post.js new file mode 100644 index 0000000..49446ce --- /dev/null +++ b/html/assets/js/edit-post.js @@ -0,0 +1,612 @@ +// Globals +// ----------------------------------------------------------------------------- + +// NOTE: +// Variable `id` is defined before evaluating this script +// id (int) : the id of edited post (or 0 if new post) + +var post; +var categories = [ + // Nope! root can not be a post's category ... { id: 0 , label: 'Ρίζα (root)' } +]; +var tags = []; // array of integers +var files = []; // array of { id:.., title:.., type:.., path:.. } records + +const files_root = 'https://cdn.sklavenitis.co.gr/'; // files root firectory + + + +var pageUrl = new URL(window.location.href); + +// an alternative--id when a post id not exists (needed for file-upload) +// ... consist of a 6-digit date string + random number up to 999 +const yymmdd = new Date().toISOString().slice(2, 10).replaceAll('-',''); +var rnd999 = Math.floor(Math.random() * 1000); +var altID = (id == 0) ? ( yymmdd +'-'+ rnd999.toString() ) : id; + + + + +// Supplamentary functions +// ----------------------------------------------------------------------------- + +// function for sorting an array by 'label' attribute +// --- -- -- - - - +function compare_label (a,b) { + if ( a.label < b.label ) { return -1; } + if ( a.label > b.label ) { return 1; } + return 0; +} + +// return category record by category-id +// --- -- -- - - - +function category_record(id) { + var record = 0; + categories.forEach(el => { if (el.id == id) record = el; }); + + return record; +} + + + + +// Modal HTML Creators +// ----------------------------------------------------------------------------- + +const modal_header = (title) => { + return [ + '<div class="modal-header">', + '<button type="button" class="close" data-dismiss="modal" aria-label="Close">', + '<span aria-hidden="true">×</span>', + '</button>', + '<h4 class="modal-title" id="myModalLabel">', + title, + '</h4>', + '</div>' + ].join('\n'); +} + + +const upload_file_form = () => { + return [ + '<form method="POST" id="file_upload_form" name="upload_file_form">', + + '<div class="modal-body">', + + '<input type="hidden" name="folder" value="'+ altID +'">', + + '<div class="form-group">', + '<label for="title">Τίτλος/Περιγραφή για το Αρχείο</label>', + '<input type="text" class="form-control " value="" name="title" id="title" placeholder="Τίτλος για το Αρχείο" required="">', + '</div>', + + '<div class="row">', + + '<div class="form-group col-md-7">', + '<label class="control-label" for="file">Εισαγωγή Αρχείου</label>', + '<input class="form-control" type="file" id="file" name="file" required="">', + '</div>', + + '<div class="form-group col-md-5">', + '<label class="control-label" for="category_id">Είδος</label>', + '<select class="form-control" id="reference" name="reference" required="">', + '<option"></option>', + '<option value="1">Παραπομπή (εμφανίζεται)</option>', + '<option value="0">Βοηθητικό αρχείο (κρυφό)</option>', + '</select>', + '</div>', + + '</div>', + + '</div>', + + '<div class="modal-footer">', + '<div class="row">', + '<div class="form-actions">', + '<div class="col-lg-3 col-lg-offset-6 col-md-4 col-md-offset-4 col-xs-6">', + '<buton type="button" class="btn btn-default js-modal-close col-xs-12" data-dismiss="modal">', + 'Κλείσιμο', + '</button>', + '</div>', + '<div class="col-lg-3 col-md-4 col-xs-6">', + '<button class="btn btn-success col-xs-12" type="submit">Καταχώριση</button>', + '</div>', + '</div>', + '</div>', + '</div>', + + '</form>' + ].join('\n'); +} + + +const preview_article = (title, intro, body) => { + return [ + '<div class="modal-body">', + '<div class="post">', + + '<h2>'+ title +'</h2>', + + ((intro == '') ? '' : ('<div class="intro">'+ intro +'</div>')), + + '<div class="article-body">', + marked.parse(body, { sanitize: true }), + '</div>', + + '</div>', + '</div>', + '<div class="modal-footer">', + '<div class="row">', + '<div class="form-actions">', + '<div class="col-md-4 col-md-offset-4 col-xs-6 col-xs-offset-3">', + '<buton type="button" class="btn btn-default js-modal-close col-xs-12" data-dismiss="modal">', + 'Κλείσιμο', + '</button>', + '</div>', + '</div>', + '</div>', + '</div>' + ].join('\n'); +} + + +$(document).ready(function() { + + // When document is ready + // ------------------------------------------------------------------------- + + + // inti category (select2) + // ... + $("#category_id").select2({ + placeholder: 'Γονική Κατηγορία', + width: '100%' + }); + + + // init tags (select2) + // ... + $('#tags').select2({ + placeholder: 'Ετικέτες (tags/keywords)', + width: '100%', + tags: true + }); + + + // init editor (tiny MCE) + // tinymce.init({ + // selector: 'form textarea[name=body]', + // language: 'el', + // menubar: true + // }); + // --- -- -- - - - + + + /** preload content + * --- -- -- - - - + * get post + * get categories + * get tags + * update content (form-elements) + */ + if (id) { // if an `id` is given, load post .. then init_form + + $.getJSON( "/wiki/ajax", { action: "get_post", id: id } ) + .done( function (data) { + post = data; // keep post + + // update fields' values + $('input[name=id]').val(post.id); // id + $('input[name=title]').val(post.title); // title + $('textarea[name=intro]').val(post.intro); // intro + $('textarea[name=body]').val(post.body); // body + $('input[name=status]').prop( // status + 'checked', + ((post.status==1)? true : false)) + .trigger('change'); + + $('#post-info').html('Δημιουργία: '+post.creation_date+'<br>Τελευταία Ενημέρωση: '+ post.update_date); + + $('#delete').prop( "disabled", false ); // enable delete button + + // if intro exist, show intro (optinal) field + if ((post.intro != null) && (post.intro != '')) { + $('.optional label[for=intro]').addClass('show'); // unhide section + } + + // parse media files; then draw + if (post.medias_json != null) { + files = JSON.parse(post.medias_json); + $('.optional label[for=media]').addClass('show'); // unhide section + } + draw_files_list(); // then draw the files list + + init_form_values(); // init all (other) values + }); + + } else { // else ... just init_form + $('#delete').prop( "disabled", true ); // disable delete button for new post attempt + // depricated $('select[name=status').val('0').trigger('change'); // pre-selecd unpublished + init_form_values(); + } + + + + /** + * load categories and tags; + * if not a new post (id!=0) update form elemnts with post's values + */ + function init_form_values() { + + $.when( // when loaded posts and categories + + $.getJSON( "/wiki/ajax", { action: "get_categories_array", exclude: '0' } ), + + $.getJSON( "/wiki/ajax", { action: "get_all_tags" } ) + + ).done( function( categories_response, tags_response ) { + + // construct categories data + // --- + Object.keys(categories_response[0]).forEach( key => { + cat = categories_response[0][key]; + categories.push({ + id: cat.rec.id, + label: cat.breadcrumb.replaceAll('\t', ' / ') + }); + }); + categories.sort( compare_label ); // sort categories by breadcrumb + + // construct tags data + // --- + Object.keys(tags_response[0]).forEach( key => { + tag = tags_response[0][key]; + tags.push({ + id: tag.id, + label: tag.name + }); + }); + + // pass categories and tags options onto select2 elements + // --- -- -- - - - + if (id == 0) { + set_parent_options( $('#category_id'), categories ); + set_parent_options( $('#tags'), tags ); + + } else { + // setup category_id options; select post's chosen category-id + set_parent_options( $('#category_id'), categories, post.category_id ); + + // parse selected tags + // --- + var selected_tag_ids = []; + if (post.tags_json != null) { + var selected_tags = JSON.parse(post.tags_json); + selected_tags.forEach( itag => { selected_tag_ids.push(itag.id); }) + } + // setup tags options; select post's chosen tags + set_parent_options( $('#tags'), tags, selected_tag_ids ); + + // ALSO: if tags selectd, show tags field + if (selected_tag_ids.length != 0) { $('.optional label[for=tags]').addClass('show'); } + } + + }); + + } + + + /** set_parent_options() + * + * -> create options for parents <select> + * -> choose selected parent + * + * NOTE: + * the targer <select> should be a select2 control + * + * @param parents (array): array of parents + * @param selected (int): selected parent + */ + function set_parent_options(selector, list, selected_value = false) { + + list.forEach( li => { // attach options into <select> control + selector.append(`<option value="${li.id}">${li.label}</option>`); + }); + + if (selected_value !== false) { // mark selected option(s) + selector.val(selected_value).trigger('change'); + } + else { selector.val(null).trigger('change'); } + } + + + /** draw_files_list + * --- -- -- - - - + */ + function draw_files_list() { + var li_list = []; + var ref_icon, ref_class; + + files.forEach( item => { + // preapre [show|hide]-file as reference + if (item.reference == 1) { + ref_icon = '<i class="fas fa-eye"></i>'; + ref_class = 'btn-default'; + + } else { + ref_icon = '<i class="fas fa-eye-slash"></i>'; + ref_class = 'btn-disabled'; + } + + var copy = [ // copy button + '<button type="button" class="btn btn-xs btn-default js-copy"', + 'data-url="' + item.path + '">', + '<i class="far fa-clone"></i>', + '</button>' + ].join(''); + var ref = [ // show|hide (is_reference) + '<button type="button" class="btn btn-xs '+ ref_class +' js-reference"', + 'data-id="' + item.id + '">', + ref_icon, + '</button>' + ].join(''); + var del = [ // delete button + '<button type="button" class="btn btn-xs btn-danger js-delete"', + 'data-id="' + item.id + '">', + '<i class="fas fa-trash-alt"></i>', + '</button>' + ].join(''); + var option = [ // li html + '<li>', + '<div class="text">' + item.title + '</div>', + '<div class="actions">', + ref, ' ', copy, ' ', del, + '</div>', + '</li>' + ].join(''); + li_list.push(option); // push to li_list + }); + $('#files_list').html( li_list.join('\n') ); + + } + + + + // When form's action-buttons are clicked + // ------------------------------------------------------------------------- + + + // form submit + // --- -- -- - - - + $('.edit-post form').submit( event => { + event.preventDefault(); + + // rearrange tags to old and new ones + // --- + var old_tags = []; + var new_tags = []; + var tags = $('#tags').select2('data'); + tags.forEach( t => { + if (!parseInt(t.id)) { + new_tags.push(t.text); + } else { old_tags.push(t.id); } + }) + + var attachments = []; + // attachments (array) of "`media_id`;`reference`" strings + files.forEach( f => { attachments.push( f.id +';'+ f.reference ) }); + + // prepare data to POST + // --- + var data = { + id: parseInt($('.edit-post form input[name=id]').val()), + title: $('.edit-post form input[name=title]').val(), + category_id: parseInt($('#category_id').select2('data')[0].id), + intro: $('.edit-post form textarea[name=intro]').val(), + body: $('.edit-post form textarea[name=body]').val(), + status: (($('input[name=status]').is(":checked")) ? 1 : 0), + tags: old_tags, + new_tags: new_tags, + media: attachments + }; + + // select action url (add or update) + // --- + var request = '/wiki/ajax?action=' + ((data.id == 0) ? 'add_post' : 'update_post'); + + // send POST (ajax) request + $.post(request, data) + .done(function( data ) { + window.location.href = '/wiki/admin?action=posts'; // seems ok; bach to articles + }); + + }); + + + // go-back (to posts) + // --- -- -- - - - + $('#go-back').click( event => { + window.location.href = '/wiki/admin?action=posts'; + }); + + + // delete + // --- -- -- - - - + $('#delete').click( event => { + // ask before deletion + swal({ + title: 'Είστε βέβαιος;', + html: "Ζητήσατε να διαγραφεί το άρθρο.<br>Παρακαλώ επιβεβαιώστε την διαγραφή.<br>ΠΡΟΣΟΧΗ: Δεν θα έχετε την δυνατότητα αναίρεσης!", + type: 'warning', + showCancelButton: true, + confirmButtonColor: '#3085d6', + cancelButtonColor: '#d33', + cancelButtonText: 'Ακύρωση', + confirmButtonText: 'Ναι, να διαγραφεί', + showLoaderOnConfirm: true, + preConfirm: function() { + return new Promise(function(resolve) { + $.getJSON( "/wiki/ajax", { action: "delete_post", id: id } ) + .done( function (data) { + // return to posts-administration + window.location.href = '/wiki/admin?action=posts'; + }); + }); + }, + allowOutsideClick: false + }).catch(swal.noop); + + }); + + + + // copy url button + // --- -- -- - - - + $('.wiki').on('click', 'button.js-copy', function (e) { + var copytext = ''; // default: copy nothing + + if ($(this).data('id') !== undefined) { + copytext = pageUrl.origin +'/wiki/post?id=' + $(this).data('id'); + } + + if ($(this).data('url') !== undefined) { + copytext = files_root + $(this).data('url'); + } + + navigator.clipboard + .writeText(copytext) + .then(() => { // notify the copy event + $(this).addClass('copied'); + setTimeout( () => { $(this).removeClass('copied'); }, 700); + }) + .catch(() => { + console.log("error on coping text"); + }); + }); + + + + // delete (remove) file button + // --- -- -- - - - + $('.wiki').on('click', 'button.js-delete', function (e) { + var media_id = $(this).data('id'); + + // remove from files array the one with id == media_id + // --- + var temp = []; + files.forEach( it => { if (it.id != media_id) temp.push(it); }); + + files = temp; // re-define files + draw_files_list(); // then re-draw files list + }); + + + + + + // show|hide file as referece button + // --- -- -- - - - + $('.wiki').on('click', 'button.js-reference', function (e) { + var id = $(this).data('id'); + + // toggle reference attribute of item with `id` = id + // --- + var temp = []; + files.forEach( it => { + if (it.id == id) { + it.reference = (it.reference==0) ? 1 : 0; + } + temp.push(it) + }); + + files = temp; // re-define files + draw_files_list(); // then re-draw files list + }); + + + + + + /** When modal show-up + * ------------------------------------------------------------------------- + * ... prepare the manage-category form + * ... update select2 with possible parents + */ + $('#editorModal').on('show.bs.modal', event => { + let button = $(event.relatedTarget); // Button that triggered the modal + let action = button.data('action'); // action + // var modal = $(this); // modal object + + // update modal literature + + switch (action) { + case 'upload_file': + $("#editorModal .modal-content").html( + modal_header('Εισαγωγή Αρχείου') + upload_file_form() + ); + break; + + case 'preview': + let preview = preview_article( + $('.edit-post form input[name=title]').val(), + $('.edit-post form textarea[name=intro]').val(), + $('.edit-post form textarea[name=body]').val() + ); + $("#editorModal .modal-content").html( modal_header('Προεπισκόπηση') + preview); + break; + + default: + // do nothing + } + + }); + + + + /** submit upload file event + * ------------------------------------------------------------------------- + */ + $('#editorModal').on('submit', 'form[name=upload_file_form]', function (event) { + event.preventDefault(); + + // create the FormData object + // --- -- -- - - - + var fd = new FormData(document.getElementById('file_upload_form')); + + // post the form (via ajax) + $.ajax({ + url: '/wiki/ajax?action=file_upload', + type: 'POST', + data: fd, + contentType: false, + processData: false, + dataType: 'json', + success: function(response) { // on success + + if (response.success) { + files.push({ // ... update files array + id: response.id, + title: response.title, + path: response.path, + type: response.type, + reference: $('#reference').val() + }); + draw_files_list(); + + $('#editorModal').modal('hide'); + + } else { + console('File not uploaded'); + } + } + }); + }); + + + // TODO: + // disable links while previewing the article + // OR add a target="_blank" + + +}); + diff --git a/html/assets/js/manage-category.js b/html/assets/js/manage-category.js new file mode 100644 index 0000000..85a4851 --- /dev/null +++ b/html/assets/js/manage-category.js @@ -0,0 +1,287 @@ +// Globals +// ----------------------------------------------------------------------------- +var categories = []; +var table; + + + +// Supplamentary functions +// ----------------------------------------------------------------------------- + +// array.indexOf polyfill +// --- -- -- - - - +if (!Array.prototype.indexOf) +{ + Array.prototype.indexOf = function(elt /*, from*/) + { + var len = this.length >>> 0; + + var from = Number(arguments[1]) || 0; + from = (from < 0) + ? Math.ceil(from) + : Math.floor(from); + if (from < 0) + from += len; + + for (; from < len; from++) + { + if (from in this && + this[from] === elt) + return from; + } + return -1; + }; +} + + +// function for sorting an array by 'breadcrumb' attribute +// --- -- -- - - - +function compare_breadcrumb (a,b) { + if ( a.breadcrumb < b.breadcrumb ) { return -1; } + if ( a.breadcrumb > b.breadcrumb ) { return 1; } + return 0; +} + +// return category record by category-id +// --- -- -- - - - +function category_record(id) { + var record = 0; + categories.forEach(el => { if (el.id == id) record = el; }); + + return record; +} + + +// return children of parent +// --- -- -- - - - +function childs_of_parents(list) { + // if 'list' is integer then make it an one-item list + parents = (Number.isInteger(list)) ? [ list ] : list; + + var childs = []; + + if (parents.length == 0) { return []; } + + parents.forEach( pid => { + categories.forEach( el => { if (el.parent == pid) childs.push(el.id)}); + }); + + var grandchilds = childs_of_parents(childs); + + return childs.concat(grandchilds); +} + + +// create actions html (edit and delete buttons) +// --- -- -- - - - +function create_actions_html(id) { + + var del, edit; + + del = ""; + + edit = [ + '<button type="button" class="btn btn-xs btn-warning"', + 'data-toggle="modal" data-target="#manageCategory"', + 'data-id="'+ id +'">', + '<i class="fas fa-pencil-alt"></i>', + '</button>' + ].join('\n'); + + return edit +' '+ del; +} + + + +$(document).ready(function() { + + // When document is ready + // ------------------------------------------------------------------------- + + + /** init selec2 element (used to specify parent-category) + * --- -- -- - - - + */ + $("#parent_id").select2({ + placeholder: 'Γονική Κατηγορία', + width: '100%', + // dropdownParent: "#manageCategory" // ref: https://github.com/select2/select2-bootstrap-theme/issues/41 + }); + + + /** init_table + * --- -- -- - - - + * get categories + * constuct categories array + * render dataTable + */ + function init_table() { + + // get all categories from server (ajax) + $.getJSON( "/wiki/ajax", { action: "get_categories_array", exclude: '0' } ) + .done(function( json ) { + // then ... + + // reset categories + categories.length = 0; + + // construct (new) categories data + Object.keys(json).forEach( key => { + el = json[key]; + categories.push({ + id: parseInt(el.rec.id), + title: el.rec.title, + breadcrumb: el.breadcrumb.replaceAll('\t', ' / '), + parent: parseInt(el.rec.parent), + actions: create_actions_html(el.rec.id) + }); + }); + + // sort by breadcrumb + categories.sort( compare_breadcrumb ); + + // destroy previous datatable table instances + $('#dt-categories').dataTable().fnClearTable(); + $('#dt-categories').dataTable().fnDestroy(); + + // (re-)create categories datatable + table = $('#dt-categories').DataTable({ + language: { url: '/libs/DataTables/localization/Greek.json' }, + data: categories, + ordering: false, + columns: [ + { data: 'breadcrumb' }, + { data: 'actions' } + ] + }); + + }) + .fail(function( jqxhr, textStatus, error ) { + console.log( "Request Failed (" + error +")" ); + }); + + } + init_table(); // init table on first run + + + + /** When modal show-up + * ------------------------------------------------------------------------- + * ... prepare the manage-category form + * ... update select2 with possible parents + */ + $('#manageCategory').on('show.bs.modal', event => { + var button = $(event.relatedTarget); // Button that triggered the modal + var id = parseInt( button.data('id') ); // category_id from data-id + // var modal = $(this); // modal object + + // update modal literature + // --- + $('#manageCategory .modal-title').html( // modal title + (id) ? 'Ενημέρωση Κατηγορίας' : 'Δημιουργία Κατηγορίας' + ); + $('#manageCategory form input[name=id]').val( id ); // category id (hidden) + $('#manageCategory form input[name=title]').val( // category title + (id) ? category_record(id).title : "" + ); + prepare_parents_element(id); // prepare <select> for parents + }) + + /** prepare_parents_element() + * --- + * @param id (int) : id of selected category + * -> Get all posible parents + * -> call set_parent_options() to render the options + */ + function prepare_parents_element(id) { + var parents = []; + + if (id) { // get all possible parents + + // id-category and subcategories are fobiden parents + var forbiden = childs_of_parents(id); + forbiden.push(id); + + // filter catogories adn prepare parents + categories.forEach( el => { + if (!forbiden.includes(el.id)) { + parents.push({ + id: el.id, + breadcrumb: el.breadcrumb, + }); + } + }); + set_parent_options(parents, category_record(id).parent); + + + } else { // new record; all categories are possible parrents + categories.forEach( el => { + parents.push({ + id: el.id, + breadcrumb: el.breadcrumb, + }); + }) + set_parent_options(parents, -1); + } + } + + /** set_parent_options() + * -> create options for parents <select> + * -> choose selected parent + * @param parents (array): array of parents + * @param selected (int): selected parent + */ + function set_parent_options(parents, selected) { + // sort parents by breadcrumb + parents.sort( compare_breadcrumb ); + + // remove any olded options from select2 + $('#parent_id option').each(function() { $(this).remove(); }); + + // first option is the root category + $('#parent_id').append('<option value="0">Root</option>') + + // add all other parent options + parents.forEach( i => { + $('#parent_id').append(`<option value="${i.id}">${i.breadcrumb}</option>`); + }); + + if (selected == -1) { // new category; remove any parent pre-selection + $('#parent_id').val(null).trigger('change'); + + } else { // category exists; choose selected parent + $('#parent_id').val(selected).trigger('change'); + } + } + + + + + // When form is submited + // ------------------------------------------------------------------------- + + $('#manageCategory form').submit( event => { + event.preventDefault(); + + // prepare data to POST + var data = { + id: parseInt($('#manageCategory form input[name=id]').val()), + title: $('#manageCategory form input[name=title]').val(), + parent_id: parseInt($('#parent_id').select2('data')[0].id) + }; + + // select action url (add or update) + var request = '/wiki/ajax?action=' + ((data.id == 0) ? 'add_category' : 'update_category'); + + // send POST request + $.post(request, data) + .done(function( data ) { + + $('#manageCategory').modal('hide'); // when done, close modal + + init_table(); // reload table of categories + }); + + }); + +}); diff --git a/html/assets/js/manage-posts.js b/html/assets/js/manage-posts.js new file mode 100644 index 0000000..028c773 --- /dev/null +++ b/html/assets/js/manage-posts.js @@ -0,0 +1,177 @@ +// Globals +// ----------------------------------------------------------------------------- +var categories = []; +var posts = []; +var table; + +var pageUrl = new URL(window.location.href); + + +// Supplamentary functions +// ----------------------------------------------------------------------------- + +// function for sorting an array by 'breadcrumb' attribute +// --- -- -- - - - +function compare_breadcrumb (a,b) { + if ( a.breadcrumb < b.breadcrumb ) { return -1; } + if ( a.breadcrumb > b.breadcrumb ) { return 1; } + return 0; +} + +// return category record by category-id +// --- -- -- - - - +function category_record(id) { + var record = 0; + categories.forEach(el => { if (el.id == id) record = el; }); + + return record; +} + +// create actions html (edit and delete buttons) +// --- -- -- - - - +function create_actions_html(id) { + + var copy, edit; + + edit = [ + '<button type="button" class="btn btn-xs btn-warning js-edit"', + 'data-id="'+ id +'">', + '<i class="fas fa-pencil-alt"></i>', + '</button>' + ].join('\n'); + + copy = [ + '<button type="button" class="btn btn-xs btn-dafault js-copy"', + 'data-id="'+ id +'">', + '<i class="far fa-clone"></i>', + '</button>' + ].join('\n'); + + return copy +' '+ edit; +} + + + +$(document).ready(function() { + + // When document is ready + // ------------------------------------------------------------------------- + + /** init_table for 1st time + * --- -- -- - - - + * get posts + categories + * constuct posts + categories array + * render dataTable + */ + // function init_table() { + + $.when( // when loaded posts and categories + + $.getJSON( "/wiki/ajax", { action: "all_posts_props" } ), + + $.getJSON( "/wiki/ajax", { action: "get_categories_array", exclude: '0' } ) + + ).done( function( posts_response, categories_response ) { + + // each response is an array of 3 items: + // [0] => data (array) + // [1] => [success|fail] + // [2] => xhr object + + // construct categories data + Object.keys(categories_response[0]).forEach( key => { + cat = categories_response[0][key]; + categories.push({ + id: cat.rec.id, + breadcrumb: cat.breadcrumb.replaceAll('\t', ' / ') + }); + }); + + // construct posts data + Object.keys(posts_response[0]).forEach( key => { + po = posts_response[0][key]; + posts.push({ + id: po.id, + title: po.title, + category: category_record(po.category_id).breadcrumb, + updated: po.update_date, + status: ((po.status == 1) ? '<i class="fas fa-eye"></i>' : '<i class="fas fa-eye-slash"></i>'), + actions: create_actions_html(po.id) + }); + }); + + // (re-)create categories datatable + table = $('#dt-posts').DataTable({ + language: { url: '/libs/DataTables/localization/Greek.json' }, + data: posts, + order: [[2, 'desc']], + columns: [ + { data: 'title' }, + { data: 'category' }, + { // update date + data: 'updated', + render: { + _: function (data, row, full) { return data; }, + display: function (data, row, full) { return mini_date(data); } + } + }, + { data: 'status' }, + { data: 'actions', width: '64px' } + ], + columnDefs: [{ + 'targets': [3,4], + 'orderable': false + }] + }); + + }); + + + function mini_date(d){ + let yy = d.substring(2,4); // year 2digit + let mo = d.substring(5,7); // month + let dd = d.substring(8,10); // dat + let h = d.substring(11,13); // hour + let m = d.substring(14,16); // minute + return dd +'/'+ mo +'/'+ yy +' '+ h +':'+ m; + } + + + + /** When user ckicks button + * ------------------------------------------------------------------------- + */ + + + /** on(click, .edit-btn) + * --- -- -- - - - + * We need to attach the event handler to some element + * higher up in the DOM tree that will remain present; + * so the handled attached on #dt-posts + * + * get post-id ; load editpost + */ + $('#dt-posts').on('click', 'button.js-edit', function (e) { + + var id = $(this).data('id'); + window.location.href = '/wiki/admin?action=editpost&id=' + id + + }); + + + $('#dt-posts').on('click', 'button.js-copy', function (e) { + var postUrl = pageUrl.origin +'/wiki/post?id=' + $(this).data('id'); + + navigator.clipboard + .writeText(postUrl) + .then(() => { + $(this).addClass('copied'); + setTimeout( () => { $(this).removeClass('copied'); }, 700); + }) + .catch(() => { + console.log("error on coping text"); + }); + }); + + +}); diff --git a/html/assets/js/manage-tags.js b/html/assets/js/manage-tags.js new file mode 100644 index 0000000..c287849 --- /dev/null +++ b/html/assets/js/manage-tags.js @@ -0,0 +1,163 @@ +// Globals +// ----------------------------------------------------------------------------- +var tags = []; +var table; + + + +// Supplamentary functions +// ----------------------------------------------------------------------------- + + + +// return category record by category-id +// --- -- -- - - - +function category_record(id) { + var record = 0; + categories.forEach(el => { if (el.id == id) record = el; }); + + return record; +} + +// create actions html (edit and delete buttons) +// --- -- -- - - - +function create_actions_html(id) { + + var del, edit; + + del = [ + '<button type="button" class="btn btn-xs btn-danger"', + 'data-toggle="modal" data-target="#manageCategory"', + 'data-id="'+ id +'" disabled>', + '<i class="fas fa-times"></i>', + '</button>' + ].join('\n'); + + edit = [ + '<button type="button" class="btn btn-xs btn-warning"', + 'data-toggle="modal" data-target="#manageCategory"', + 'data-id="'+ id +'" disabled>', + '<i class="fas fa-pencil-alt"></i>', + '</button>' + ].join('\n'); + + return edit +' '+ del; +} + + + +$(document).ready(function() { + + // When document is ready + // ------------------------------------------------------------------------- + + + + /** init_table + * --- -- -- - - - + * get categories + * constuct categories array + * render dataTable + */ + function init_table() { + + // get all categories from server (ajax) + $.getJSON( "/wiki/ajax", { action: "tags_stats" } ) + .done(function( json ) { + // then ... + + // reset tags + tags.length = 0; + + // construct tags data + Object.keys(json).forEach( key => { + el = json[key]; + tags.push({ + id: parseInt(el.id), + title: el.name, + counter: parseInt(el.totals), + actions: create_actions_html(el.id) + }); + }); + + // destroy previous datatable table instances + $('#dt-tags').dataTable().fnClearTable(); + $('#dt-tags').dataTable().fnDestroy(); + + // (re-)create categories datatable + table = $('#dt-tags').DataTable({ + language: { url: '/libs/DataTables/localization/Greek.json' }, + data: tags, + order: [[1, 'desc']], + columns: [ + { data: 'title' }, + { data: 'counter' }, + { data: 'actions', width: '64px' } + ], + columnDefs: [{ + 'targets': [2], + 'orderable': false + }] + }); + + }) + .fail(function( jqxhr, textStatus, error ) { + console.log( "Request Failed (" + error +")" ); + }); + + } + init_table(); // init table on first run + + + + /** When modal show-up + * ------------------------------------------------------------------------- + * ... prepare the manage-category form + * ... update select2 with possible parents + */ + $('#manageCategory').on('show.bs.modal', event => { + var button = $(event.relatedTarget); // Button that triggered the modal + var id = parseInt( button.data('id') ); // category_id from data-id + // var modal = $(this); // modal object + + // update modal literature + // --- + $('#manageCategory .modal-title').html( // modal title + (id) ? 'Ενημέρωση Κατηγορίας' : 'Δημιουργία Κατηγορίας' + ); + $('#manageCategory form input[name=id]').val( id ); // category id (hidden) + $('#manageCategory form input[name=title]').val( // category title + (id) ? category_record(id).title : "" + ); + prepare_parents_element(id); // prepare <select> for parents + }) + + + // When form is submited + // ------------------------------------------------------------------------- + + $('#manageCategory form').submit( event => { + event.preventDefault(); + + // prepare data to POST + var data = { + id: parseInt($('#manageCategory form input[name=id]').val()), + title: $('#manageCategory form input[name=title]').val(), + parent_id: parseInt($('#parent_id').select2('data')[0].id) + }; + + // select action url (add or update) + var request = '/wiki/ajax?action=' + ((data.id == 0) ? 'add_category' : 'update_category'); + + // send POST request + $.post(request, data) + .done(function( data ) { + + $('#manageCategory').modal('hide'); // when done, close modal + + init_table(); // reload table of categories + }); + + }); + +}); diff --git a/html/assets/js/post-features.js b/html/assets/js/post-features.js new file mode 100644 index 0000000..ca2928c --- /dev/null +++ b/html/assets/js/post-features.js @@ -0,0 +1,148 @@ +const valid_modals = [ // supported sort-code keys + 'product', + 'store' +]; + + +const symbol_escapes = [ + { esc: '>', chr: '>' }, + { esc: '<', chr: '<' }, + { esc: '&', chr: '&' }, + { esc: '"', chr: '\"' }, + { esc: ''', chr: '\'' }, + { esc: '€', chr: '€' }, + { esc: '©', chr: '©' }, + { esc: '®', chr: '®' } +]; + + +/** inject_codeblocks + * --- -- -- - - - + * + * NOTE: + * a short-code is a mustache block of 3 parametres: + * {{ object = someID ; some label description }} + * ex. `{{product=1507175; Coca Cola Zero}}` + * + * The short-code is parsed to a code-block: + * an `a` modal-toggler link with certain data-attributes (+label), ex: + * `<a class='modal-toggler view-product' data-id='1507175'>Coca Cola Zero</a>` + * + * @param code (string): original content html with short-codes + * @returns (string): html content with code-blocks + */ +function inject_codeblocks(code) { + // isolate all mustache blocks + const regexp = /{{(.*?)}}/g; // regex makes multiple-matching easier + const matches = [...code.matchAll(regexp)]; + // console.log(matches); + + var output = code; // use a copy of (source) code + + matches.forEach( match => { + // parse (every) match + // NOTE: + // match array has 3 items; example: + // match[0] : `{{store=247; Pasalimani Market}}` + // match[1] : `store=247; Pasalimani Market` + // match[3] : the (source) code string + let blockparts = unescaped_str( match[1] ).split(';'); + let main_unit = blockparts[0].replaceAll(' ','').split('='); + let target = main_unit[0].toLowerCase(); + let id = main_unit[1]; + let label = escaped_str(blockparts[1]); + if (valid_modals.includes(target)) { + let codeblock = `<a href="#" data-toggle="modal" data-target="#view-${target}" data-id="${id}" class="modal-toggler js-get_${target}">${label}</a>`; + output = output.replaceAll(match[0], codeblock); + } + }); + + return output; +} + + +// pair of function to escepe/unescape special html symbols +// --- -- -- - - - +function unescaped_str(txt) { + symbol_escapes.forEach( pair => { txt = txt.replaceAll(pair.esc, pair.chr); }) + return txt; +} + +function escaped_str(txt) { + symbol_escapes.forEach( pair => { txt = txt.replaceAll(pair.chr, pair.esc); }) + return txt; +} + + +$(document).ready(function() { + + + /** translate short-codes to code-blocks + * ------------------------------------------------------------------------- + */ + var content = $('.content .article-body').html(); // get code with shorts + $('.content .article-body').html( inject_codeblocks(content) ); // put code with blocks + + + + /** modal listeners + * ------------------------------------------------------------------------- + */ + + // open store modal listener + // --- -- -- - - - + $(document).on('click', '.js-get_store', function (e) { + e.preventDefault(); + var id = $(this).data('id'); // id for requesting content via ajax + + $('#dynamic-content').html(''); + $('#modal-loader').show(); + + $.ajax({ + url: '/libs/modals/modalStore.php', + type: 'POST', + cache: false, + data: 'id=' + id, + dataType: 'html' + }) + .done(function (data) { + $('#dynamic-content').html(''); + $('#dynamic-content').html(data); + $('#modal-loader').hide(); + }) + .fail(function () { + $('#dynamic-content').html('<i class="glyphicon glyphicon-info-sign"></i> Υπήρξε κάποιο πρόβλημα, παρακαλώ προσπαθήστε ξανά.'); + $('#modal-loader').hide(); + }); + }); + + // open product modal listener + // --- + $(document).on('click', '.js-get_product', function (e) { + e.preventDefault(); + var id = $(this).data('id'); // id for requesting content via ajax + + $('#dynamic-product').html(''); + $('#modal-loader').show(); + + $.ajax({ + url: '/products/ajax/get_product_full', + cache: false, + type: 'POST', + data: { id: id }, + dataType: 'html' + }) + .done(function (data) { + $('#dynamic-product').html(''); + $('#dynamic-product').html(data); + $('#modal-loader').hide(); + + }) + .fail(function () { + $('#dynamic-product').html('<i class="glyphicon glyphicon-info-sign"></i> Υπήρξε κάποιο πρόβλημα, παρακαλώ προσπαθήστε ξανά.'); + $('#modal-loader').hide(); + + }); + }); + +});
\ No newline at end of file diff --git a/html/assets/js/sliders/slider.js b/html/assets/js/sliders/slider.js deleted file mode 100644 index a9f5824..0000000 --- a/html/assets/js/sliders/slider.js +++ /dev/null @@ -1,42 +0,0 @@ -// Modules included:
-// 'virtual',
-// 'mousewheel',
-// 'navigation',
-// 'pagination',
-// 'zoom',
-// 'lazy',
-// 'autoplay',
-// 'thumbs',
-// 'manipulation',
-// 'effect-fade',
-
-$$plugins.define('slider', ['swiper-bundle'], function (element, options, Swiper) {
- if (element.childNodes.length == 0) {
- return;
- }
-
- // init Swiper
- const swiper = new Swiper(element, {
- autoHeight: options.autoHeight ? options.autoHeight : false,
- breakpoints: options.breakpoints,
- centerInsufficientSlides: options.centerInsufficientSlides ? options.centerInsufficientSlides : false,
- centeredSlides: options.centeredSlides ? options.centeredSlides : false,
- direction: options.direction ? options.direction : 'horizontal',
- effect: options.effect ? options.effect : 'slide',
- loop: options.loop ? options.loop : false,
- navigation: {
- nextEl: element.querySelector('.swiper-button-next'),
- prevEl: element.querySelector('.swiper-button-prev'),
- },
- pagination: {
- el: element.querySelector('.swiper-pagination'),
- type: 'bullets',
- clickable: 'true'
- },
- slidesPerGroup: options.slidesPerGroup ? options.slidesPerGroup : 1,
- slidesPerView: options.slidesPerView ? options.slidesPerView : 1,
- spaceBetween: options.spaceBetween ? options.spaceBetween : 0,
- speed: options.speed ? options.speed : 800,
- watchSlidesProgress: true
- });
-});
diff --git a/html/assets/js/swiper-bundle.min.js b/html/assets/js/swiper-bundle.min.js deleted file mode 100644 index 3455e5a..0000000 --- a/html/assets/js/swiper-bundle.min.js +++ /dev/null @@ -1,14 +0,0 @@ -/**
- * Swiper 7.2.0
- * Most modern mobile touch slider and framework with hardware accelerated transitions
- * https://swiperjs.com
- *
- * Copyright 2014-2021 Vladimir Kharlampidi
- *
- * Released under the MIT License
- *
- * Released on: November 2, 2021
- */
-
-!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).Swiper=t()}(this,(function(){"use strict";function e(e){return null!==e&&"object"==typeof e&&"constructor"in e&&e.constructor===Object}function t(s={},i={}){Object.keys(i).forEach((a=>{void 0===s[a]?s[a]=i[a]:e(i[a])&&e(s[a])&&Object.keys(i[a]).length>0&&t(s[a],i[a])}))}const s={body:{},addEventListener(){},removeEventListener(){},activeElement:{blur(){},nodeName:""},querySelector:()=>null,querySelectorAll:()=>[],getElementById:()=>null,createEvent:()=>({initEvent(){}}),createElement:()=>({children:[],childNodes:[],style:{},setAttribute(){},getElementsByTagName:()=>[]}),createElementNS:()=>({}),importNode:()=>null,location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""}};function i(){const e="undefined"!=typeof document?document:{};return t(e,s),e}const a={document:s,navigator:{userAgent:""},location:{hash:"",host:"",hostname:"",href:"",origin:"",pathname:"",protocol:"",search:""},history:{replaceState(){},pushState(){},go(){},back(){}},CustomEvent:function(){return this},addEventListener(){},removeEventListener(){},getComputedStyle:()=>({getPropertyValue:()=>""}),Image(){},Date(){},screen:{},setTimeout(){},clearTimeout(){},matchMedia:()=>({}),requestAnimationFrame:e=>"undefined"==typeof setTimeout?(e(),null):setTimeout(e,0),cancelAnimationFrame(e){"undefined"!=typeof setTimeout&&clearTimeout(e)}};function n(){const e="undefined"!=typeof window?window:{};return t(e,a),e}class r extends Array{constructor(e){super(...e||[]),function(e){const t=e.__proto__;Object.defineProperty(e,"__proto__",{get:()=>t,set(e){t.__proto__=e}})}(this)}}function l(e=[]){const t=[];return e.forEach((e=>{Array.isArray(e)?t.push(...l(e)):t.push(e)})),t}function o(e,t){return Array.prototype.filter.call(e,t)}function d(e,t){const s=n(),a=i();let l=[];if(!t&&e instanceof r)return e;if(!e)return new r(l);if("string"==typeof e){const s=e.trim();if(s.indexOf("<")>=0&&s.indexOf(">")>=0){let e="div";0===s.indexOf("<li")&&(e="ul"),0===s.indexOf("<tr")&&(e="tbody"),0!==s.indexOf("<td")&&0!==s.indexOf("<th")||(e="tr"),0===s.indexOf("<tbody")&&(e="table"),0===s.indexOf("<option")&&(e="select");const t=a.createElement(e);t.innerHTML=s;for(let e=0;e<t.childNodes.length;e+=1)l.push(t.childNodes[e])}else l=function(e,t){if("string"!=typeof e)return[e];const s=[],i=t.querySelectorAll(e);for(let e=0;e<i.length;e+=1)s.push(i[e]);return s}(e.trim(),t||a)}else if(e.nodeType||e===s||e===a)l.push(e);else if(Array.isArray(e)){if(e instanceof r)return e;l=e}return new r(function(e){const t=[];for(let s=0;s<e.length;s+=1)-1===t.indexOf(e[s])&&t.push(e[s]);return t}(l))}d.fn=r.prototype;const c={addClass:function(...e){const t=l(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.add(...t)})),this},removeClass:function(...e){const t=l(e.map((e=>e.split(" "))));return this.forEach((e=>{e.classList.remove(...t)})),this},hasClass:function(...e){const t=l(e.map((e=>e.split(" "))));return o(this,(e=>t.filter((t=>e.classList.contains(t))).length>0)).length>0},toggleClass:function(...e){const t=l(e.map((e=>e.split(" "))));this.forEach((e=>{t.forEach((t=>{e.classList.toggle(t)}))}))},attr:function(e,t){if(1===arguments.length&&"string"==typeof e)return this[0]?this[0].getAttribute(e):void 0;for(let s=0;s<this.length;s+=1)if(2===arguments.length)this[s].setAttribute(e,t);else for(const t in e)this[s][t]=e[t],this[s].setAttribute(t,e[t]);return this},removeAttr:function(e){for(let t=0;t<this.length;t+=1)this[t].removeAttribute(e);return this},transform:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transform=e;return this},transition:function(e){for(let t=0;t<this.length;t+=1)this[t].style.transitionDuration="string"!=typeof e?`${e}ms`:e;return this},on:function(...e){let[t,s,i,a]=e;function n(e){const t=e.target;if(!t)return;const a=e.target.dom7EventData||[];if(a.indexOf(e)<0&&a.unshift(e),d(t).is(s))i.apply(t,a);else{const e=d(t).parents();for(let t=0;t<e.length;t+=1)d(e[t]).is(s)&&i.apply(e[t],a)}}function r(e){const t=e&&e.target&&e.target.dom7EventData||[];t.indexOf(e)<0&&t.unshift(e),i.apply(this,t)}"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const l=t.split(" ");let o;for(let e=0;e<this.length;e+=1){const t=this[e];if(s)for(o=0;o<l.length;o+=1){const e=l[o];t.dom7LiveListeners||(t.dom7LiveListeners={}),t.dom7LiveListeners[e]||(t.dom7LiveListeners[e]=[]),t.dom7LiveListeners[e].push({listener:i,proxyListener:n}),t.addEventListener(e,n,a)}else for(o=0;o<l.length;o+=1){const e=l[o];t.dom7Listeners||(t.dom7Listeners={}),t.dom7Listeners[e]||(t.dom7Listeners[e]=[]),t.dom7Listeners[e].push({listener:i,proxyListener:r}),t.addEventListener(e,r,a)}}return this},off:function(...e){let[t,s,i,a]=e;"function"==typeof e[1]&&([t,i,a]=e,s=void 0),a||(a=!1);const n=t.split(" ");for(let e=0;e<n.length;e+=1){const t=n[e];for(let e=0;e<this.length;e+=1){const n=this[e];let r;if(!s&&n.dom7Listeners?r=n.dom7Listeners[t]:s&&n.dom7LiveListeners&&(r=n.dom7LiveListeners[t]),r&&r.length)for(let e=r.length-1;e>=0;e-=1){const s=r[e];i&&s.listener===i||i&&s.listener&&s.listener.dom7proxy&&s.listener.dom7proxy===i?(n.removeEventListener(t,s.proxyListener,a),r.splice(e,1)):i||(n.removeEventListener(t,s.proxyListener,a),r.splice(e,1))}}}return this},trigger:function(...e){const t=n(),s=e[0].split(" "),i=e[1];for(let a=0;a<s.length;a+=1){const n=s[a];for(let s=0;s<this.length;s+=1){const a=this[s];if(t.CustomEvent){const s=new t.CustomEvent(n,{detail:i,bubbles:!0,cancelable:!0});a.dom7EventData=e.filter(((e,t)=>t>0)),a.dispatchEvent(s),a.dom7EventData=[],delete a.dom7EventData}}}return this},transitionEnd:function(e){const t=this;return e&&t.on("transitionend",(function s(i){i.target===this&&(e.call(this,i),t.off("transitionend",s))})),this},outerWidth:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetWidth+parseFloat(e.getPropertyValue("margin-right"))+parseFloat(e.getPropertyValue("margin-left"))}return this[0].offsetWidth}return null},outerHeight:function(e){if(this.length>0){if(e){const e=this.styles();return this[0].offsetHeight+parseFloat(e.getPropertyValue("margin-top"))+parseFloat(e.getPropertyValue("margin-bottom"))}return this[0].offsetHeight}return null},styles:function(){const e=n();return this[0]?e.getComputedStyle(this[0],null):{}},offset:function(){if(this.length>0){const e=n(),t=i(),s=this[0],a=s.getBoundingClientRect(),r=t.body,l=s.clientTop||r.clientTop||0,o=s.clientLeft||r.clientLeft||0,d=s===e?e.scrollY:s.scrollTop,c=s===e?e.scrollX:s.scrollLeft;return{top:a.top+d-l,left:a.left+c-o}}return null},css:function(e,t){const s=n();let i;if(1===arguments.length){if("string"!=typeof e){for(i=0;i<this.length;i+=1)for(const t in e)this[i].style[t]=e[t];return this}if(this[0])return s.getComputedStyle(this[0],null).getPropertyValue(e)}if(2===arguments.length&&"string"==typeof e){for(i=0;i<this.length;i+=1)this[i].style[e]=t;return this}return this},each:function(e){return e?(this.forEach(((t,s)=>{e.apply(t,[t,s])})),this):this},html:function(e){if(void 0===e)return this[0]?this[0].innerHTML:null;for(let t=0;t<this.length;t+=1)this[t].innerHTML=e;return this},text:function(e){if(void 0===e)return this[0]?this[0].textContent.trim():null;for(let t=0;t<this.length;t+=1)this[t].textContent=e;return this},is:function(e){const t=n(),s=i(),a=this[0];let l,o;if(!a||void 0===e)return!1;if("string"==typeof e){if(a.matches)return a.matches(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);for(l=d(e),o=0;o<l.length;o+=1)if(l[o]===a)return!0;return!1}if(e===s)return a===s;if(e===t)return a===t;if(e.nodeType||e instanceof r){for(l=e.nodeType?[e]:e,o=0;o<l.length;o+=1)if(l[o]===a)return!0;return!1}return!1},index:function(){let e,t=this[0];if(t){for(e=0;null!==(t=t.previousSibling);)1===t.nodeType&&(e+=1);return e}},eq:function(e){if(void 0===e)return this;const t=this.length;if(e>t-1)return d([]);if(e<0){const s=t+e;return d(s<0?[]:[this[s]])}return d([this[e]])},append:function(...e){let t;const s=i();for(let i=0;i<e.length;i+=1){t=e[i];for(let e=0;e<this.length;e+=1)if("string"==typeof t){const i=s.createElement("div");for(i.innerHTML=t;i.firstChild;)this[e].appendChild(i.firstChild)}else if(t instanceof r)for(let s=0;s<t.length;s+=1)this[e].appendChild(t[s]);else this[e].appendChild(t)}return this},prepend:function(e){const t=i();let s,a;for(s=0;s<this.length;s+=1)if("string"==typeof e){const i=t.createElement("div");for(i.innerHTML=e,a=i.childNodes.length-1;a>=0;a-=1)this[s].insertBefore(i.childNodes[a],this[s].childNodes[0])}else if(e instanceof r)for(a=0;a<e.length;a+=1)this[s].insertBefore(e[a],this[s].childNodes[0]);else this[s].insertBefore(e,this[s].childNodes[0]);return this},next:function(e){return this.length>0?e?this[0].nextElementSibling&&d(this[0].nextElementSibling).is(e)?d([this[0].nextElementSibling]):d([]):this[0].nextElementSibling?d([this[0].nextElementSibling]):d([]):d([])},nextAll:function(e){const t=[];let s=this[0];if(!s)return d([]);for(;s.nextElementSibling;){const i=s.nextElementSibling;e?d(i).is(e)&&t.push(i):t.push(i),s=i}return d(t)},prev:function(e){if(this.length>0){const t=this[0];return e?t.previousElementSibling&&d(t.previousElementSibling).is(e)?d([t.previousElementSibling]):d([]):t.previousElementSibling?d([t.previousElementSibling]):d([])}return d([])},prevAll:function(e){const t=[];let s=this[0];if(!s)return d([]);for(;s.previousElementSibling;){const i=s.previousElementSibling;e?d(i).is(e)&&t.push(i):t.push(i),s=i}return d(t)},parent:function(e){const t=[];for(let s=0;s<this.length;s+=1)null!==this[s].parentNode&&(e?d(this[s].parentNode).is(e)&&t.push(this[s].parentNode):t.push(this[s].parentNode));return d(t)},parents:function(e){const t=[];for(let s=0;s<this.length;s+=1){let i=this[s].parentNode;for(;i;)e?d(i).is(e)&&t.push(i):t.push(i),i=i.parentNode}return d(t)},closest:function(e){let t=this;return void 0===e?d([]):(t.is(e)||(t=t.parents(e).eq(0)),t)},find:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].querySelectorAll(e);for(let e=0;e<i.length;e+=1)t.push(i[e])}return d(t)},children:function(e){const t=[];for(let s=0;s<this.length;s+=1){const i=this[s].children;for(let s=0;s<i.length;s+=1)e&&!d(i[s]).is(e)||t.push(i[s])}return d(t)},filter:function(e){return d(o(this,e))},remove:function(){for(let e=0;e<this.length;e+=1)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this}};function p(e,t=0){return setTimeout(e,t)}function u(){return Date.now()}function h(e,t="x"){const s=n();let i,a,r;const l=function(e){const t=n();let s;return t.getComputedStyle&&(s=t.getComputedStyle(e,null)),!s&&e.currentStyle&&(s=e.currentStyle),s||(s=e.style),s}(e);return s.WebKitCSSMatrix?(a=l.transform||l.webkitTransform,a.split(",").length>6&&(a=a.split(", ").map((e=>e.replace(",","."))).join(", ")),r=new s.WebKitCSSMatrix("none"===a?"":a)):(r=l.MozTransform||l.OTransform||l.MsTransform||l.msTransform||l.transform||l.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),i=r.toString().split(",")),"x"===t&&(a=s.WebKitCSSMatrix?r.m41:16===i.length?parseFloat(i[12]):parseFloat(i[4])),"y"===t&&(a=s.WebKitCSSMatrix?r.m42:16===i.length?parseFloat(i[13]):parseFloat(i[5])),a||0}function m(e){return"object"==typeof e&&null!==e&&e.constructor&&"Object"===Object.prototype.toString.call(e).slice(8,-1)}function f(...e){const t=Object(e[0]),s=["__proto__","constructor","prototype"];for(let a=1;a<e.length;a+=1){const n=e[a];if(null!=n&&(i=n,!("undefined"!=typeof window&&void 0!==window.HTMLElement?i instanceof HTMLElement:i&&(1===i.nodeType||11===i.nodeType)))){const e=Object.keys(Object(n)).filter((e=>s.indexOf(e)<0));for(let s=0,i=e.length;s<i;s+=1){const i=e[s],a=Object.getOwnPropertyDescriptor(n,i);void 0!==a&&a.enumerable&&(m(t[i])&&m(n[i])?n[i].__swiper__?t[i]=n[i]:f(t[i],n[i]):!m(t[i])&&m(n[i])?(t[i]={},n[i].__swiper__?t[i]=n[i]:f(t[i],n[i])):t[i]=n[i])}}}var i;return t}function g(e,t,s){e.style.setProperty(t,s)}function v({swiper:e,targetPosition:t,side:s}){const i=n(),a=-e.translate;let r,l=null;const o=e.params.speed;e.wrapperEl.style.scrollSnapType="none",i.cancelAnimationFrame(e.cssModeFrameID);const d=t>a?"next":"prev",c=(e,t)=>"next"===d&&e>=t||"prev"===d&&e<=t,p=()=>{r=(new Date).getTime(),null===l&&(l=r);const n=Math.max(Math.min((r-l)/o,1),0),d=.5-Math.cos(n*Math.PI)/2;let u=a+d*(t-a);if(c(u,t)&&(u=t),e.wrapperEl.scrollTo({[s]:u}),c(u,t))return e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.scrollSnapType="",setTimeout((()=>{e.wrapperEl.style.overflow="",e.wrapperEl.scrollTo({[s]:u})})),void i.cancelAnimationFrame(e.cssModeFrameID);e.cssModeFrameID=i.requestAnimationFrame(p)};p()}let w,b,E;function C(){return w||(w=function(){const e=n(),t=i();return{smoothScroll:t.documentElement&&"scrollBehavior"in t.documentElement.style,touch:!!("ontouchstart"in e||e.DocumentTouch&&t instanceof e.DocumentTouch),passiveListener:function(){let t=!1;try{const s=Object.defineProperty({},"passive",{get(){t=!0}});e.addEventListener("testPassiveListener",null,s)}catch(e){}return t}(),gestures:"ongesturestart"in e}}()),w}function x(e={}){return b||(b=function({userAgent:e}={}){const t=C(),s=n(),i=s.navigator.platform,a=e||s.navigator.userAgent,r={ios:!1,android:!1},l=s.screen.width,o=s.screen.height,d=a.match(/(Android);?[\s\/]+([\d.]+)?/);let c=a.match(/(iPad).*OS\s([\d_]+)/);const p=a.match(/(iPod)(.*OS\s([\d_]+))?/),u=!c&&a.match(/(iPhone\sOS|iOS)\s([\d_]+)/),h="Win32"===i;let m="MacIntel"===i;return!c&&m&&t.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${l}x${o}`)>=0&&(c=a.match(/(Version)\/([\d.]+)/),c||(c=[0,1,"13_0_0"]),m=!1),d&&!h&&(r.os="android",r.android=!0),(c||u||p)&&(r.os="ios",r.ios=!0),r}(e)),b}function T(){return E||(E=function(){const e=n();return{isSafari:function(){const t=e.navigator.userAgent.toLowerCase();return t.indexOf("safari")>=0&&t.indexOf("chrome")<0&&t.indexOf("android")<0}(),isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(e.navigator.userAgent)}}()),E}Object.keys(c).forEach((e=>{Object.defineProperty(d.fn,e,{value:c[e],writable:!0})}));var y={on(e,t,s){const i=this;if("function"!=typeof t)return i;const a=s?"unshift":"push";return e.split(" ").forEach((e=>{i.eventsListeners[e]||(i.eventsListeners[e]=[]),i.eventsListeners[e][a](t)})),i},once(e,t,s){const i=this;if("function"!=typeof t)return i;function a(...s){i.off(e,a),a.__emitterProxy&&delete a.__emitterProxy,t.apply(i,s)}return a.__emitterProxy=t,i.on(e,a,s)},onAny(e,t){const s=this;if("function"!=typeof e)return s;const i=t?"unshift":"push";return s.eventsAnyListeners.indexOf(e)<0&&s.eventsAnyListeners[i](e),s},offAny(e){const t=this;if(!t.eventsAnyListeners)return t;const s=t.eventsAnyListeners.indexOf(e);return s>=0&&t.eventsAnyListeners.splice(s,1),t},off(e,t){const s=this;return s.eventsListeners?(e.split(" ").forEach((e=>{void 0===t?s.eventsListeners[e]=[]:s.eventsListeners[e]&&s.eventsListeners[e].forEach(((i,a)=>{(i===t||i.__emitterProxy&&i.__emitterProxy===t)&&s.eventsListeners[e].splice(a,1)}))})),s):s},emit(...e){const t=this;if(!t.eventsListeners)return t;let s,i,a;"string"==typeof e[0]||Array.isArray(e[0])?(s=e[0],i=e.slice(1,e.length),a=t):(s=e[0].events,i=e[0].data,a=e[0].context||t),i.unshift(a);return(Array.isArray(s)?s:s.split(" ")).forEach((e=>{t.eventsAnyListeners&&t.eventsAnyListeners.length&&t.eventsAnyListeners.forEach((t=>{t.apply(a,[e,...i])})),t.eventsListeners&&t.eventsListeners[e]&&t.eventsListeners[e].forEach((e=>{e.apply(a,i)}))})),t}};function S({swiper:e,runCallbacks:t,direction:s,step:i}){const{activeIndex:a,previousIndex:n}=e;let r=s;if(r||(r=a>n?"next":a<n?"prev":"reset"),e.emit(`transition${i}`),t&&a!==n){if("reset"===r)return void e.emit(`slideResetTransition${i}`);e.emit(`slideChangeTransition${i}`),"next"===r?e.emit(`slideNextTransition${i}`):e.emit(`slidePrevTransition${i}`)}}function $(e){const t=this,s=i(),a=n(),r=t.touchEventsData,{params:l,touches:o,enabled:c}=t;if(!c)return;if(t.animating&&l.preventInteractionOnTransition)return;!t.animating&&l.cssMode&&l.loop&&t.loopFix();let p=e;p.originalEvent&&(p=p.originalEvent);let h=d(p.target);if("wrapper"===l.touchEventsTarget&&!h.closest(t.wrapperEl).length)return;if(r.isTouchEvent="touchstart"===p.type,!r.isTouchEvent&&"which"in p&&3===p.which)return;if(!r.isTouchEvent&&"button"in p&&p.button>0)return;if(r.isTouched&&r.isMoved)return;!!l.noSwipingClass&&""!==l.noSwipingClass&&p.target&&p.target.shadowRoot&&e.path&&e.path[0]&&(h=d(e.path[0]));const m=l.noSwipingSelector?l.noSwipingSelector:`.${l.noSwipingClass}`,f=!(!p.target||!p.target.shadowRoot);if(l.noSwiping&&(f?function(e,t=this){return function t(s){return s&&s!==i()&&s!==n()?(s.assignedSlot&&(s=s.assignedSlot),s.closest(e)||t(s.getRootNode().host)):null}(t)}(m,p.target):h.closest(m)[0]))return void(t.allowClick=!0);if(l.swipeHandler&&!h.closest(l.swipeHandler)[0])return;o.currentX="touchstart"===p.type?p.targetTouches[0].pageX:p.pageX,o.currentY="touchstart"===p.type?p.targetTouches[0].pageY:p.pageY;const g=o.currentX,v=o.currentY,w=l.edgeSwipeDetection||l.iOSEdgeSwipeDetection,b=l.edgeSwipeThreshold||l.iOSEdgeSwipeThreshold;if(w&&(g<=b||g>=a.innerWidth-b)){if("prevent"!==w)return;e.preventDefault()}if(Object.assign(r,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),o.startX=g,o.startY=v,r.touchStartTime=u(),t.allowClick=!0,t.updateSize(),t.swipeDirection=void 0,l.threshold>0&&(r.allowThresholdMove=!1),"touchstart"!==p.type){let e=!0;h.is(r.focusableElements)&&(e=!1),s.activeElement&&d(s.activeElement).is(r.focusableElements)&&s.activeElement!==h[0]&&s.activeElement.blur();const i=e&&t.allowTouchMove&&l.touchStartPreventDefault;!l.touchStartForcePreventDefault&&!i||h[0].isContentEditable||p.preventDefault()}t.emit("touchStart",p)}function M(e){const t=i(),s=this,a=s.touchEventsData,{params:n,touches:r,rtlTranslate:l,enabled:o}=s;if(!o)return;let c=e;if(c.originalEvent&&(c=c.originalEvent),!a.isTouched)return void(a.startMoving&&a.isScrolling&&s.emit("touchMoveOpposite",c));if(a.isTouchEvent&&"touchmove"!==c.type)return;const p="touchmove"===c.type&&c.targetTouches&&(c.targetTouches[0]||c.changedTouches[0]),h="touchmove"===c.type?p.pageX:c.pageX,m="touchmove"===c.type?p.pageY:c.pageY;if(c.preventedByNestedSwiper)return r.startX=h,void(r.startY=m);if(!s.allowTouchMove)return s.allowClick=!1,void(a.isTouched&&(Object.assign(r,{startX:h,startY:m,currentX:h,currentY:m}),a.touchStartTime=u()));if(a.isTouchEvent&&n.touchReleaseOnEdges&&!n.loop)if(s.isVertical()){if(m<r.startY&&s.translate<=s.maxTranslate()||m>r.startY&&s.translate>=s.minTranslate())return a.isTouched=!1,void(a.isMoved=!1)}else if(h<r.startX&&s.translate<=s.maxTranslate()||h>r.startX&&s.translate>=s.minTranslate())return;if(a.isTouchEvent&&t.activeElement&&c.target===t.activeElement&&d(c.target).is(a.focusableElements))return a.isMoved=!0,void(s.allowClick=!1);if(a.allowTouchCallbacks&&s.emit("touchMove",c),c.targetTouches&&c.targetTouches.length>1)return;r.currentX=h,r.currentY=m;const f=r.currentX-r.startX,g=r.currentY-r.startY;if(s.params.threshold&&Math.sqrt(f**2+g**2)<s.params.threshold)return;if(void 0===a.isScrolling){let e;s.isHorizontal()&&r.currentY===r.startY||s.isVertical()&&r.currentX===r.startX?a.isScrolling=!1:f*f+g*g>=25&&(e=180*Math.atan2(Math.abs(g),Math.abs(f))/Math.PI,a.isScrolling=s.isHorizontal()?e>n.touchAngle:90-e>n.touchAngle)}if(a.isScrolling&&s.emit("touchMoveOpposite",c),void 0===a.startMoving&&(r.currentX===r.startX&&r.currentY===r.startY||(a.startMoving=!0)),a.isScrolling)return void(a.isTouched=!1);if(!a.startMoving)return;s.allowClick=!1,!n.cssMode&&c.cancelable&&c.preventDefault(),n.touchMoveStopPropagation&&!n.nested&&c.stopPropagation(),a.isMoved||(n.loop&&!n.cssMode&&s.loopFix(),a.startTranslate=s.getTranslate(),s.setTransition(0),s.animating&&s.$wrapperEl.trigger("webkitTransitionEnd transitionend"),a.allowMomentumBounce=!1,!n.grabCursor||!0!==s.allowSlideNext&&!0!==s.allowSlidePrev||s.setGrabCursor(!0),s.emit("sliderFirstMove",c)),s.emit("sliderMove",c),a.isMoved=!0;let v=s.isHorizontal()?f:g;r.diff=v,v*=n.touchRatio,l&&(v=-v),s.swipeDirection=v>0?"prev":"next",a.currentTranslate=v+a.startTranslate;let w=!0,b=n.resistanceRatio;if(n.touchReleaseOnEdges&&(b=0),v>0&&a.currentTranslate>s.minTranslate()?(w=!1,n.resistance&&(a.currentTranslate=s.minTranslate()-1+(-s.minTranslate()+a.startTranslate+v)**b)):v<0&&a.currentTranslate<s.maxTranslate()&&(w=!1,n.resistance&&(a.currentTranslate=s.maxTranslate()+1-(s.maxTranslate()-a.startTranslate-v)**b)),w&&(c.preventedByNestedSwiper=!0),!s.allowSlideNext&&"next"===s.swipeDirection&&a.currentTranslate<a.startTranslate&&(a.currentTranslate=a.startTranslate),!s.allowSlidePrev&&"prev"===s.swipeDirection&&a.currentTranslate>a.startTranslate&&(a.currentTranslate=a.startTranslate),s.allowSlidePrev||s.allowSlideNext||(a.currentTranslate=a.startTranslate),n.threshold>0){if(!(Math.abs(v)>n.threshold||a.allowThresholdMove))return void(a.currentTranslate=a.startTranslate);if(!a.allowThresholdMove)return a.allowThresholdMove=!0,r.startX=r.currentX,r.startY=r.currentY,a.currentTranslate=a.startTranslate,void(r.diff=s.isHorizontal()?r.currentX-r.startX:r.currentY-r.startY)}n.followFinger&&!n.cssMode&&((n.freeMode&&n.freeMode.enabled&&s.freeMode||n.watchSlidesProgress)&&(s.updateActiveIndex(),s.updateSlidesClasses()),s.params.freeMode&&n.freeMode.enabled&&s.freeMode&&s.freeMode.onTouchMove(),s.updateProgress(a.currentTranslate),s.setTranslate(a.currentTranslate))}function P(e){const t=this,s=t.touchEventsData,{params:i,touches:a,rtlTranslate:n,slidesGrid:r,enabled:l}=t;if(!l)return;let o=e;if(o.originalEvent&&(o=o.originalEvent),s.allowTouchCallbacks&&t.emit("touchEnd",o),s.allowTouchCallbacks=!1,!s.isTouched)return s.isMoved&&i.grabCursor&&t.setGrabCursor(!1),s.isMoved=!1,void(s.startMoving=!1);i.grabCursor&&s.isMoved&&s.isTouched&&(!0===t.allowSlideNext||!0===t.allowSlidePrev)&&t.setGrabCursor(!1);const d=u(),c=d-s.touchStartTime;if(t.allowClick&&(t.updateClickedSlide(o),t.emit("tap click",o),c<300&&d-s.lastClickTime<300&&t.emit("doubleTap doubleClick",o)),s.lastClickTime=u(),p((()=>{t.destroyed||(t.allowClick=!0)})),!s.isTouched||!s.isMoved||!t.swipeDirection||0===a.diff||s.currentTranslate===s.startTranslate)return s.isTouched=!1,s.isMoved=!1,void(s.startMoving=!1);let h;if(s.isTouched=!1,s.isMoved=!1,s.startMoving=!1,h=i.followFinger?n?t.translate:-t.translate:-s.currentTranslate,i.cssMode)return;if(t.params.freeMode&&i.freeMode.enabled)return void t.freeMode.onTouchEnd({currentPos:h});let m=0,f=t.slidesSizesGrid[0];for(let e=0;e<r.length;e+=e<i.slidesPerGroupSkip?1:i.slidesPerGroup){const t=e<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==r[e+t]?h>=r[e]&&h<r[e+t]&&(m=e,f=r[e+t]-r[e]):h>=r[e]&&(m=e,f=r[r.length-1]-r[r.length-2])}const g=(h-r[m])/f,v=m<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(c>i.longSwipesMs){if(!i.longSwipes)return void t.slideTo(t.activeIndex);"next"===t.swipeDirection&&(g>=i.longSwipesRatio?t.slideTo(m+v):t.slideTo(m)),"prev"===t.swipeDirection&&(g>1-i.longSwipesRatio?t.slideTo(m+v):t.slideTo(m))}else{if(!i.shortSwipes)return void t.slideTo(t.activeIndex);t.navigation&&(o.target===t.navigation.nextEl||o.target===t.navigation.prevEl)?o.target===t.navigation.nextEl?t.slideTo(m+v):t.slideTo(m):("next"===t.swipeDirection&&t.slideTo(m+v),"prev"===t.swipeDirection&&t.slideTo(m))}}function k(){const e=this,{params:t,el:s}=e;if(s&&0===s.offsetWidth)return;t.breakpoints&&e.setBreakpoint();const{allowSlideNext:i,allowSlidePrev:a,snapGrid:n}=e;e.allowSlideNext=!0,e.allowSlidePrev=!0,e.updateSize(),e.updateSlides(),e.updateSlidesClasses(),("auto"===t.slidesPerView||t.slidesPerView>1)&&e.isEnd&&!e.isBeginning&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),e.autoplay&&e.autoplay.running&&e.autoplay.paused&&e.autoplay.run(),e.allowSlidePrev=a,e.allowSlideNext=i,e.params.watchOverflow&&n!==e.snapGrid&&e.checkOverflow()}function z(e){const t=this;t.enabled&&(t.allowClick||(t.params.preventClicks&&e.preventDefault(),t.params.preventClicksPropagation&&t.animating&&(e.stopPropagation(),e.stopImmediatePropagation())))}function O(){const e=this,{wrapperEl:t,rtlTranslate:s,enabled:i}=e;if(!i)return;let a;e.previousTranslate=e.translate,e.isHorizontal()?e.translate=-t.scrollLeft:e.translate=-t.scrollTop,-0===e.translate&&(e.translate=0),e.updateActiveIndex(),e.updateSlidesClasses();const n=e.maxTranslate()-e.minTranslate();a=0===n?0:(e.translate-e.minTranslate())/n,a!==e.progress&&e.updateProgress(s?-e.translate:e.translate),e.emit("setTranslate",e.translate,!1)}let L=!1;function I(){}const A=(e,t)=>{const s=i(),{params:a,touchEvents:n,el:r,wrapperEl:l,device:o,support:d}=e,c=!!a.nested,p="on"===t?"addEventListener":"removeEventListener",u=t;if(d.touch){const t=!("touchstart"!==n.start||!d.passiveListener||!a.passiveListeners)&&{passive:!0,capture:!1};r[p](n.start,e.onTouchStart,t),r[p](n.move,e.onTouchMove,d.passiveListener?{passive:!1,capture:c}:c),r[p](n.end,e.onTouchEnd,t),n.cancel&&r[p](n.cancel,e.onTouchEnd,t)}else r[p](n.start,e.onTouchStart,!1),s[p](n.move,e.onTouchMove,c),s[p](n.end,e.onTouchEnd,!1);(a.preventClicks||a.preventClicksPropagation)&&r[p]("click",e.onClick,!0),a.cssMode&&l[p]("scroll",e.onScroll),a.updateOnWindowResize?e[u](o.ios||o.android?"resize orientationchange observerUpdate":"resize observerUpdate",k,!0):e[u]("observerUpdate",k,!0)};const D=(e,t)=>e.grid&&t.grid&&t.grid.rows>1;var G={init:!0,direction:"horizontal",touchEventsTarget:"wrapper",initialSlide:0,speed:300,cssMode:!1,updateOnWindowResize:!0,resizeObserver:!0,nested:!1,createElements:!1,enabled:!0,focusableElements:"input, select, option, textarea, button, video, label",width:null,height:null,preventInteractionOnTransition:!1,userAgent:null,url:null,edgeSwipeDetection:!1,edgeSwipeThreshold:20,autoHeight:!1,setWrapperSize:!1,virtualTranslate:!1,effect:"slide",breakpoints:void 0,breakpointsBase:"window",spaceBetween:0,slidesPerView:1,slidesPerGroup:1,slidesPerGroupSkip:0,slidesPerGroupAuto:!1,centeredSlides:!1,centeredSlidesBounds:!1,slidesOffsetBefore:0,slidesOffsetAfter:0,normalizeSlideIndex:!0,centerInsufficientSlides:!1,watchOverflow:!0,roundLengths:!1,touchRatio:1,touchAngle:45,simulateTouch:!0,shortSwipes:!0,longSwipes:!0,longSwipesRatio:.5,longSwipesMs:300,followFinger:!0,allowTouchMove:!0,threshold:0,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,preloadImages:!0,updateOnImagesReady:!0,loop:!1,loopAdditionalSlides:0,loopedSlides:null,loopFillGroupWithBlank:!1,loopPreventsSlide:!0,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideBlankClass:"swiper-slide-invisible-blank",slideActiveClass:"swiper-slide-active",slideDuplicateActiveClass:"swiper-slide-duplicate-active",slideVisibleClass:"swiper-slide-visible",slideDuplicateClass:"swiper-slide-duplicate",slideNextClass:"swiper-slide-next",slideDuplicateNextClass:"swiper-slide-duplicate-next",slidePrevClass:"swiper-slide-prev",slideDuplicatePrevClass:"swiper-slide-duplicate-prev",wrapperClass:"swiper-wrapper",runCallbacksOnInit:!0,_emitClasses:!1};function X(e,t){return function(s={}){const i=Object.keys(s)[0],a=s[i];"object"==typeof a&&null!==a?(["navigation","pagination","scrollbar"].indexOf(i)>=0&&!0===e[i]&&(e[i]={auto:!0}),i in e&&"enabled"in a?(!0===e[i]&&(e[i]={enabled:!0}),"object"!=typeof e[i]||"enabled"in e[i]||(e[i].enabled=!0),e[i]||(e[i]={enabled:!1}),f(t,s)):f(t,s)):f(t,s)}}const Y={eventsEmitter:y,update:{updateSize:function(){const e=this;let t,s;const i=e.$el;t=void 0!==e.params.width&&null!==e.params.width?e.params.width:i[0].clientWidth,s=void 0!==e.params.height&&null!==e.params.height?e.params.height:i[0].clientHeight,0===t&&e.isHorizontal()||0===s&&e.isVertical()||(t=t-parseInt(i.css("padding-left")||0,10)-parseInt(i.css("padding-right")||0,10),s=s-parseInt(i.css("padding-top")||0,10)-parseInt(i.css("padding-bottom")||0,10),Number.isNaN(t)&&(t=0),Number.isNaN(s)&&(s=0),Object.assign(e,{width:t,height:s,size:e.isHorizontal()?t:s}))},updateSlides:function(){const e=this;function t(t){return e.isHorizontal()?t:{width:"height","margin-top":"margin-left","margin-bottom ":"margin-right","margin-left":"margin-top","margin-right":"margin-bottom","padding-left":"padding-top","padding-right":"padding-bottom",marginRight:"marginBottom"}[t]}function s(e,s){return parseFloat(e.getPropertyValue(t(s))||0)}const i=e.params,{$wrapperEl:a,size:n,rtlTranslate:r,wrongRTL:l}=e,o=e.virtual&&i.virtual.enabled,d=o?e.virtual.slides.length:e.slides.length,c=a.children(`.${e.params.slideClass}`),p=o?e.virtual.slides.length:c.length;let u=[];const h=[],m=[];let f=i.slidesOffsetBefore;"function"==typeof f&&(f=i.slidesOffsetBefore.call(e));let v=i.slidesOffsetAfter;"function"==typeof v&&(v=i.slidesOffsetAfter.call(e));const w=e.snapGrid.length,b=e.slidesGrid.length;let E=i.spaceBetween,C=-f,x=0,T=0;if(void 0===n)return;"string"==typeof E&&E.indexOf("%")>=0&&(E=parseFloat(E.replace("%",""))/100*n),e.virtualSize=-E,r?c.css({marginLeft:"",marginBottom:"",marginTop:""}):c.css({marginRight:"",marginBottom:"",marginTop:""}),i.centeredSlides&&i.cssMode&&(g(e.wrapperEl,"--swiper-centered-offset-before",""),g(e.wrapperEl,"--swiper-centered-offset-after",""));const y=i.grid&&i.grid.rows>1&&e.grid;let S;y&&e.grid.initSlides(p);const $="auto"===i.slidesPerView&&i.breakpoints&&Object.keys(i.breakpoints).filter((e=>void 0!==i.breakpoints[e].slidesPerView)).length>0;for(let a=0;a<p;a+=1){S=0;const r=c.eq(a);if(y&&e.grid.updateSlide(a,r,p,t),"none"!==r.css("display")){if("auto"===i.slidesPerView){$&&(c[a].style[t("width")]="");const n=getComputedStyle(r[0]),l=r[0].style.transform,o=r[0].style.webkitTransform;if(l&&(r[0].style.transform="none"),o&&(r[0].style.webkitTransform="none"),i.roundLengths)S=e.isHorizontal()?r.outerWidth(!0):r.outerHeight(!0);else{const e=s(n,"width"),t=s(n,"padding-left"),i=s(n,"padding-right"),a=s(n,"margin-left"),l=s(n,"margin-right"),o=n.getPropertyValue("box-sizing");if(o&&"border-box"===o)S=e+a+l;else{const{clientWidth:s,offsetWidth:n}=r[0];S=e+t+i+a+l+(n-s)}}l&&(r[0].style.transform=l),o&&(r[0].style.webkitTransform=o),i.roundLengths&&(S=Math.floor(S))}else S=(n-(i.slidesPerView-1)*E)/i.slidesPerView,i.roundLengths&&(S=Math.floor(S)),c[a]&&(c[a].style[t("width")]=`${S}px`);c[a]&&(c[a].swiperSlideSize=S),m.push(S),i.centeredSlides?(C=C+S/2+x/2+E,0===x&&0!==a&&(C=C-n/2-E),0===a&&(C=C-n/2-E),Math.abs(C)<.001&&(C=0),i.roundLengths&&(C=Math.floor(C)),T%i.slidesPerGroup==0&&u.push(C),h.push(C)):(i.roundLengths&&(C=Math.floor(C)),(T-Math.min(e.params.slidesPerGroupSkip,T))%e.params.slidesPerGroup==0&&u.push(C),h.push(C),C=C+S+E),e.virtualSize+=S+E,x=S,T+=1}}if(e.virtualSize=Math.max(e.virtualSize,n)+v,r&&l&&("slide"===i.effect||"coverflow"===i.effect)&&a.css({width:`${e.virtualSize+i.spaceBetween}px`}),i.setWrapperSize&&a.css({[t("width")]:`${e.virtualSize+i.spaceBetween}px`}),y&&e.grid.updateWrapperSize(S,u,t),!i.centeredSlides){const t=[];for(let s=0;s<u.length;s+=1){let a=u[s];i.roundLengths&&(a=Math.floor(a)),u[s]<=e.virtualSize-n&&t.push(a)}u=t,Math.floor(e.virtualSize-n)-Math.floor(u[u.length-1])>1&&u.push(e.virtualSize-n)}if(0===u.length&&(u=[0]),0!==i.spaceBetween){const s=e.isHorizontal()&&r?"marginLeft":t("marginRight");c.filter(((e,t)=>!i.cssMode||t!==c.length-1)).css({[s]:`${E}px`})}if(i.centeredSlides&&i.centeredSlidesBounds){let e=0;m.forEach((t=>{e+=t+(i.spaceBetween?i.spaceBetween:0)})),e-=i.spaceBetween;const t=e-n;u=u.map((e=>e<0?-f:e>t?t+v:e))}if(i.centerInsufficientSlides){let e=0;if(m.forEach((t=>{e+=t+(i.spaceBetween?i.spaceBetween:0)})),e-=i.spaceBetween,e<n){const t=(n-e)/2;u.forEach(((e,s)=>{u[s]=e-t})),h.forEach(((e,s)=>{h[s]=e+t}))}}if(Object.assign(e,{slides:c,snapGrid:u,slidesGrid:h,slidesSizesGrid:m}),i.centeredSlides&&i.cssMode&&!i.centeredSlidesBounds){g(e.wrapperEl,"--swiper-centered-offset-before",-u[0]+"px"),g(e.wrapperEl,"--swiper-centered-offset-after",e.size/2-m[m.length-1]/2+"px");const t=-e.snapGrid[0],s=-e.slidesGrid[0];e.snapGrid=e.snapGrid.map((e=>e+t)),e.slidesGrid=e.slidesGrid.map((e=>e+s))}p!==d&&e.emit("slidesLengthChange"),u.length!==w&&(e.params.watchOverflow&&e.checkOverflow(),e.emit("snapGridLengthChange")),h.length!==b&&e.emit("slidesGridLengthChange"),i.watchSlidesProgress&&e.updateSlidesOffset()},updateAutoHeight:function(e){const t=this,s=[],i=t.virtual&&t.params.virtual.enabled;let a,n=0;"number"==typeof e?t.setTransition(e):!0===e&&t.setTransition(t.params.speed);const r=e=>i?t.slides.filter((t=>parseInt(t.getAttribute("data-swiper-slide-index"),10)===e))[0]:t.slides.eq(e)[0];if("auto"!==t.params.slidesPerView&&t.params.slidesPerView>1)if(t.params.centeredSlides)t.visibleSlides.each((e=>{s.push(e)}));else for(a=0;a<Math.ceil(t.params.slidesPerView);a+=1){const e=t.activeIndex+a;if(e>t.slides.length&&!i)break;s.push(r(e))}else s.push(r(t.activeIndex));for(a=0;a<s.length;a+=1)if(void 0!==s[a]){const e=s[a].offsetHeight;n=e>n?e:n}n&&t.$wrapperEl.css("height",`${n}px`)},updateSlidesOffset:function(){const e=this,t=e.slides;for(let s=0;s<t.length;s+=1)t[s].swiperSlideOffset=e.isHorizontal()?t[s].offsetLeft:t[s].offsetTop},updateSlidesProgress:function(e=this&&this.translate||0){const t=this,s=t.params,{slides:i,rtlTranslate:a,snapGrid:n}=t;if(0===i.length)return;void 0===i[0].swiperSlideOffset&&t.updateSlidesOffset();let r=-e;a&&(r=e),i.removeClass(s.slideVisibleClass),t.visibleSlidesIndexes=[],t.visibleSlides=[];for(let e=0;e<i.length;e+=1){const l=i[e];let o=l.swiperSlideOffset;s.cssMode&&s.centeredSlides&&(o-=i[0].swiperSlideOffset);const d=(r+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),c=(r-n[0]+(s.centeredSlides?t.minTranslate():0)-o)/(l.swiperSlideSize+s.spaceBetween),p=-(r-o),u=p+t.slidesSizesGrid[e];(p>=0&&p<t.size-1||u>1&&u<=t.size||p<=0&&u>=t.size)&&(t.visibleSlides.push(l),t.visibleSlidesIndexes.push(e),i.eq(e).addClass(s.slideVisibleClass)),l.progress=a?-d:d,l.originalProgress=a?-c:c}t.visibleSlides=d(t.visibleSlides)},updateProgress:function(e){const t=this;if(void 0===e){const s=t.rtlTranslate?-1:1;e=t&&t.translate&&t.translate*s||0}const s=t.params,i=t.maxTranslate()-t.minTranslate();let{progress:a,isBeginning:n,isEnd:r}=t;const l=n,o=r;0===i?(a=0,n=!0,r=!0):(a=(e-t.minTranslate())/i,n=a<=0,r=a>=1),Object.assign(t,{progress:a,isBeginning:n,isEnd:r}),(s.watchSlidesProgress||s.centeredSlides&&s.autoHeight)&&t.updateSlidesProgress(e),n&&!l&&t.emit("reachBeginning toEdge"),r&&!o&&t.emit("reachEnd toEdge"),(l&&!n||o&&!r)&&t.emit("fromEdge"),t.emit("progress",a)},updateSlidesClasses:function(){const e=this,{slides:t,params:s,$wrapperEl:i,activeIndex:a,realIndex:n}=e,r=e.virtual&&s.virtual.enabled;let l;t.removeClass(`${s.slideActiveClass} ${s.slideNextClass} ${s.slidePrevClass} ${s.slideDuplicateActiveClass} ${s.slideDuplicateNextClass} ${s.slideDuplicatePrevClass}`),l=r?e.$wrapperEl.find(`.${s.slideClass}[data-swiper-slide-index="${a}"]`):t.eq(a),l.addClass(s.slideActiveClass),s.loop&&(l.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${n}"]`).addClass(s.slideDuplicateActiveClass));let o=l.nextAll(`.${s.slideClass}`).eq(0).addClass(s.slideNextClass);s.loop&&0===o.length&&(o=t.eq(0),o.addClass(s.slideNextClass));let d=l.prevAll(`.${s.slideClass}`).eq(0).addClass(s.slidePrevClass);s.loop&&0===d.length&&(d=t.eq(-1),d.addClass(s.slidePrevClass)),s.loop&&(o.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${o.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicateNextClass),d.hasClass(s.slideDuplicateClass)?i.children(`.${s.slideClass}:not(.${s.slideDuplicateClass})[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass):i.children(`.${s.slideClass}.${s.slideDuplicateClass}[data-swiper-slide-index="${d.attr("data-swiper-slide-index")}"]`).addClass(s.slideDuplicatePrevClass)),e.emitSlidesClasses()},updateActiveIndex:function(e){const t=this,s=t.rtlTranslate?t.translate:-t.translate,{slidesGrid:i,snapGrid:a,params:n,activeIndex:r,realIndex:l,snapIndex:o}=t;let d,c=e;if(void 0===c){for(let e=0;e<i.length;e+=1)void 0!==i[e+1]?s>=i[e]&&s<i[e+1]-(i[e+1]-i[e])/2?c=e:s>=i[e]&&s<i[e+1]&&(c=e+1):s>=i[e]&&(c=e);n.normalizeSlideIndex&&(c<0||void 0===c)&&(c=0)}if(a.indexOf(s)>=0)d=a.indexOf(s);else{const e=Math.min(n.slidesPerGroupSkip,c);d=e+Math.floor((c-e)/n.slidesPerGroup)}if(d>=a.length&&(d=a.length-1),c===r)return void(d!==o&&(t.snapIndex=d,t.emit("snapIndexChange")));const p=parseInt(t.slides.eq(c).attr("data-swiper-slide-index")||c,10);Object.assign(t,{snapIndex:d,realIndex:p,previousIndex:r,activeIndex:c}),t.emit("activeIndexChange"),t.emit("snapIndexChange"),l!==p&&t.emit("realIndexChange"),(t.initialized||t.params.runCallbacksOnInit)&&t.emit("slideChange")},updateClickedSlide:function(e){const t=this,s=t.params,i=d(e.target).closest(`.${s.slideClass}`)[0];let a,n=!1;if(i)for(let e=0;e<t.slides.length;e+=1)if(t.slides[e]===i){n=!0,a=e;break}if(!i||!n)return t.clickedSlide=void 0,void(t.clickedIndex=void 0);t.clickedSlide=i,t.virtual&&t.params.virtual.enabled?t.clickedIndex=parseInt(d(i).attr("data-swiper-slide-index"),10):t.clickedIndex=a,s.slideToClickedSlide&&void 0!==t.clickedIndex&&t.clickedIndex!==t.activeIndex&&t.slideToClickedSlide()}},translate:{getTranslate:function(e=(this.isHorizontal()?"x":"y")){const{params:t,rtlTranslate:s,translate:i,$wrapperEl:a}=this;if(t.virtualTranslate)return s?-i:i;if(t.cssMode)return i;let n=h(a[0],e);return s&&(n=-n),n||0},setTranslate:function(e,t){const s=this,{rtlTranslate:i,params:a,$wrapperEl:n,wrapperEl:r,progress:l}=s;let o,d=0,c=0;s.isHorizontal()?d=i?-e:e:c=e,a.roundLengths&&(d=Math.floor(d),c=Math.floor(c)),a.cssMode?r[s.isHorizontal()?"scrollLeft":"scrollTop"]=s.isHorizontal()?-d:-c:a.virtualTranslate||n.transform(`translate3d(${d}px, ${c}px, 0px)`),s.previousTranslate=s.translate,s.translate=s.isHorizontal()?d:c;const p=s.maxTranslate()-s.minTranslate();o=0===p?0:(e-s.minTranslate())/p,o!==l&&s.updateProgress(e),s.emit("setTranslate",s.translate,t)},minTranslate:function(){return-this.snapGrid[0]},maxTranslate:function(){return-this.snapGrid[this.snapGrid.length-1]},translateTo:function(e=0,t=this.params.speed,s=!0,i=!0,a){const n=this,{params:r,wrapperEl:l}=n;if(n.animating&&r.preventInteractionOnTransition)return!1;const o=n.minTranslate(),d=n.maxTranslate();let c;if(c=i&&e>o?o:i&&e<d?d:e,n.updateProgress(c),r.cssMode){const e=n.isHorizontal();if(0===t)l[e?"scrollLeft":"scrollTop"]=-c;else{if(!n.support.smoothScroll)return v({swiper:n,targetPosition:-c,side:e?"left":"top"}),!0;l.scrollTo({[e?"left":"top"]:-c,behavior:"smooth"})}return!0}return 0===t?(n.setTransition(0),n.setTranslate(c),s&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionEnd"))):(n.setTransition(t),n.setTranslate(c),s&&(n.emit("beforeTransitionStart",t,a),n.emit("transitionStart")),n.animating||(n.animating=!0,n.onTranslateToWrapperTransitionEnd||(n.onTranslateToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd),n.onTranslateToWrapperTransitionEnd=null,delete n.onTranslateToWrapperTransitionEnd,s&&n.emit("transitionEnd"))}),n.$wrapperEl[0].addEventListener("transitionend",n.onTranslateToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(e,t){const s=this;s.params.cssMode||s.$wrapperEl.transition(e),s.emit("setTransition",e,t)},transitionStart:function(e=!0,t){const s=this,{params:i}=s;i.cssMode||(i.autoHeight&&s.updateAutoHeight(),S({swiper:s,runCallbacks:e,direction:t,step:"Start"}))},transitionEnd:function(e=!0,t){const s=this,{params:i}=s;s.animating=!1,i.cssMode||(s.setTransition(0),S({swiper:s,runCallbacks:e,direction:t,step:"End"}))}},slide:{slideTo:function(e=0,t=this.params.speed,s=!0,i,a){if("number"!=typeof e&&"string"!=typeof e)throw new Error(`The 'index' argument cannot have type other than 'number' or 'string'. [${typeof e}] given.`);if("string"==typeof e){const t=parseInt(e,10);if(!isFinite(t))throw new Error(`The passed-in 'index' (string) couldn't be converted to 'number'. [${e}] given.`);e=t}const n=this;let r=e;r<0&&(r=0);const{params:l,snapGrid:o,slidesGrid:d,previousIndex:c,activeIndex:p,rtlTranslate:u,wrapperEl:h,enabled:m}=n;if(n.animating&&l.preventInteractionOnTransition||!m&&!i&&!a)return!1;const f=Math.min(n.params.slidesPerGroupSkip,r);let g=f+Math.floor((r-f)/n.params.slidesPerGroup);g>=o.length&&(g=o.length-1),(p||l.initialSlide||0)===(c||0)&&s&&n.emit("beforeSlideChangeStart");const w=-o[g];if(n.updateProgress(w),l.normalizeSlideIndex)for(let e=0;e<d.length;e+=1){const t=-Math.floor(100*w),s=Math.floor(100*d[e]),i=Math.floor(100*d[e+1]);void 0!==d[e+1]?t>=s&&t<i-(i-s)/2?r=e:t>=s&&t<i&&(r=e+1):t>=s&&(r=e)}if(n.initialized&&r!==p){if(!n.allowSlideNext&&w<n.translate&&w<n.minTranslate())return!1;if(!n.allowSlidePrev&&w>n.translate&&w>n.maxTranslate()&&(p||0)!==r)return!1}let b;if(b=r>p?"next":r<p?"prev":"reset",u&&-w===n.translate||!u&&w===n.translate)return n.updateActiveIndex(r),l.autoHeight&&n.updateAutoHeight(),n.updateSlidesClasses(),"slide"!==l.effect&&n.setTranslate(w),"reset"!==b&&(n.transitionStart(s,b),n.transitionEnd(s,b)),!1;if(l.cssMode){const e=n.isHorizontal(),s=u?w:-w;if(0===t){const t=n.virtual&&n.params.virtual.enabled;t&&(n.wrapperEl.style.scrollSnapType="none",n._immediateVirtual=!0),h[e?"scrollLeft":"scrollTop"]=s,t&&requestAnimationFrame((()=>{n.wrapperEl.style.scrollSnapType="",n._swiperImmediateVirtual=!1}))}else{if(!n.support.smoothScroll)return v({swiper:n,targetPosition:s,side:e?"left":"top"}),!0;h.scrollTo({[e?"left":"top"]:s,behavior:"smooth"})}return!0}return 0===t?(n.setTransition(0),n.setTranslate(w),n.updateActiveIndex(r),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,i),n.transitionStart(s,b),n.transitionEnd(s,b)):(n.setTransition(t),n.setTranslate(w),n.updateActiveIndex(r),n.updateSlidesClasses(),n.emit("beforeTransitionStart",t,i),n.transitionStart(s,b),n.animating||(n.animating=!0,n.onSlideToWrapperTransitionEnd||(n.onSlideToWrapperTransitionEnd=function(e){n&&!n.destroyed&&e.target===this&&(n.$wrapperEl[0].removeEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].removeEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd),n.onSlideToWrapperTransitionEnd=null,delete n.onSlideToWrapperTransitionEnd,n.transitionEnd(s,b))}),n.$wrapperEl[0].addEventListener("transitionend",n.onSlideToWrapperTransitionEnd),n.$wrapperEl[0].addEventListener("webkitTransitionEnd",n.onSlideToWrapperTransitionEnd))),!0},slideToLoop:function(e=0,t=this.params.speed,s=!0,i){const a=this;let n=e;return a.params.loop&&(n+=a.loopedSlides),a.slideTo(n,t,s,i)},slideNext:function(e=this.params.speed,t=!0,s){const i=this,{animating:a,enabled:n,params:r}=i;if(!n)return i;let l=r.slidesPerGroup;"auto"===r.slidesPerView&&1===r.slidesPerGroup&&r.slidesPerGroupAuto&&(l=Math.max(i.slidesPerViewDynamic("current",!0),1));const o=i.activeIndex<r.slidesPerGroupSkip?1:l;if(r.loop){if(a&&r.loopPreventsSlide)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}return i.slideTo(i.activeIndex+o,e,t,s)},slidePrev:function(e=this.params.speed,t=!0,s){const i=this,{params:a,animating:n,snapGrid:r,slidesGrid:l,rtlTranslate:o,enabled:d}=i;if(!d)return i;if(a.loop){if(n&&a.loopPreventsSlide)return!1;i.loopFix(),i._clientLeft=i.$wrapperEl[0].clientLeft}function c(e){return e<0?-Math.floor(Math.abs(e)):Math.floor(e)}const p=c(o?i.translate:-i.translate),u=r.map((e=>c(e)));let h=r[u.indexOf(p)-1];if(void 0===h&&a.cssMode){let e;r.forEach(((t,s)=>{p>=t&&(e=s)})),void 0!==e&&(h=r[e>0?e-1:e])}let m=0;return void 0!==h&&(m=l.indexOf(h),m<0&&(m=i.activeIndex-1),"auto"===a.slidesPerView&&1===a.slidesPerGroup&&a.slidesPerGroupAuto&&(m=m-i.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.slideTo(m,e,t,s)},slideReset:function(e=this.params.speed,t=!0,s){return this.slideTo(this.activeIndex,e,t,s)},slideToClosest:function(e=this.params.speed,t=!0,s,i=.5){const a=this;let n=a.activeIndex;const r=Math.min(a.params.slidesPerGroupSkip,n),l=r+Math.floor((n-r)/a.params.slidesPerGroup),o=a.rtlTranslate?a.translate:-a.translate;if(o>=a.snapGrid[l]){const e=a.snapGrid[l];o-e>(a.snapGrid[l+1]-e)*i&&(n+=a.params.slidesPerGroup)}else{const e=a.snapGrid[l-1];o-e<=(a.snapGrid[l]-e)*i&&(n-=a.params.slidesPerGroup)}return n=Math.max(n,0),n=Math.min(n,a.slidesGrid.length-1),a.slideTo(n,e,t,s)},slideToClickedSlide:function(){const e=this,{params:t,$wrapperEl:s}=e,i="auto"===t.slidesPerView?e.slidesPerViewDynamic():t.slidesPerView;let a,n=e.clickedIndex;if(t.loop){if(e.animating)return;a=parseInt(d(e.clickedSlide).attr("data-swiper-slide-index"),10),t.centeredSlides?n<e.loopedSlides-i/2||n>e.slides.length-e.loopedSlides+i/2?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),p((()=>{e.slideTo(n)}))):e.slideTo(n):n>e.slides.length-i?(e.loopFix(),n=s.children(`.${t.slideClass}[data-swiper-slide-index="${a}"]:not(.${t.slideDuplicateClass})`).eq(0).index(),p((()=>{e.slideTo(n)}))):e.slideTo(n)}else e.slideTo(n)}},loop:{loopCreate:function(){const e=this,t=i(),{params:s,$wrapperEl:a}=e,n=d(a.children()[0].parentNode);n.children(`.${s.slideClass}.${s.slideDuplicateClass}`).remove();let r=n.children(`.${s.slideClass}`);if(s.loopFillGroupWithBlank){const e=s.slidesPerGroup-r.length%s.slidesPerGroup;if(e!==s.slidesPerGroup){for(let i=0;i<e;i+=1){const e=d(t.createElement("div")).addClass(`${s.slideClass} ${s.slideBlankClass}`);n.append(e)}r=n.children(`.${s.slideClass}`)}}"auto"!==s.slidesPerView||s.loopedSlides||(s.loopedSlides=r.length),e.loopedSlides=Math.ceil(parseFloat(s.loopedSlides||s.slidesPerView,10)),e.loopedSlides+=s.loopAdditionalSlides,e.loopedSlides>r.length&&(e.loopedSlides=r.length);const l=[],o=[];r.each(((t,s)=>{const i=d(t);s<e.loopedSlides&&o.push(t),s<r.length&&s>=r.length-e.loopedSlides&&l.push(t),i.attr("data-swiper-slide-index",s)}));for(let e=0;e<o.length;e+=1)n.append(d(o[e].cloneNode(!0)).addClass(s.slideDuplicateClass));for(let e=l.length-1;e>=0;e-=1)n.prepend(d(l[e].cloneNode(!0)).addClass(s.slideDuplicateClass))},loopFix:function(){const e=this;e.emit("beforeLoopFix");const{activeIndex:t,slides:s,loopedSlides:i,allowSlidePrev:a,allowSlideNext:n,snapGrid:r,rtlTranslate:l}=e;let o;e.allowSlidePrev=!0,e.allowSlideNext=!0;const d=-r[t]-e.getTranslate();if(t<i){o=s.length-3*i+t,o+=i;e.slideTo(o,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)}else if(t>=s.length-i){o=-s.length+t+i,o+=i;e.slideTo(o,0,!1,!0)&&0!==d&&e.setTranslate((l?-e.translate:e.translate)-d)}e.allowSlidePrev=a,e.allowSlideNext=n,e.emit("loopFix")},loopDestroy:function(){const{$wrapperEl:e,params:t,slides:s}=this;e.children(`.${t.slideClass}.${t.slideDuplicateClass},.${t.slideClass}.${t.slideBlankClass}`).remove(),s.removeAttr("data-swiper-slide-index")}},grabCursor:{setGrabCursor:function(e){const t=this;if(t.support.touch||!t.params.simulateTouch||t.params.watchOverflow&&t.isLocked||t.params.cssMode)return;const s="container"===t.params.touchEventsTarget?t.el:t.wrapperEl;s.style.cursor="move",s.style.cursor=e?"-webkit-grabbing":"-webkit-grab",s.style.cursor=e?"-moz-grabbin":"-moz-grab",s.style.cursor=e?"grabbing":"grab"},unsetGrabCursor:function(){const e=this;e.support.touch||e.params.watchOverflow&&e.isLocked||e.params.cssMode||(e["container"===e.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="")}},events:{attachEvents:function(){const e=this,t=i(),{params:s,support:a}=e;e.onTouchStart=$.bind(e),e.onTouchMove=M.bind(e),e.onTouchEnd=P.bind(e),s.cssMode&&(e.onScroll=O.bind(e)),e.onClick=z.bind(e),a.touch&&!L&&(t.addEventListener("touchstart",I),L=!0),A(e,"on")},detachEvents:function(){A(this,"off")}},breakpoints:{setBreakpoint:function(){const e=this,{activeIndex:t,initialized:s,loopedSlides:i=0,params:a,$el:n}=e,r=a.breakpoints;if(!r||r&&0===Object.keys(r).length)return;const l=e.getBreakpoint(r,e.params.breakpointsBase,e.el);if(!l||e.currentBreakpoint===l)return;const o=(l in r?r[l]:void 0)||e.originalParams,d=D(e,a),c=D(e,o),p=a.enabled;d&&!c?(n.removeClass(`${a.containerModifierClass}grid ${a.containerModifierClass}grid-column`),e.emitContainerClasses()):!d&&c&&(n.addClass(`${a.containerModifierClass}grid`),(o.grid.fill&&"column"===o.grid.fill||!o.grid.fill&&"column"===a.grid.fill)&&n.addClass(`${a.containerModifierClass}grid-column`),e.emitContainerClasses());const u=o.direction&&o.direction!==a.direction,h=a.loop&&(o.slidesPerView!==a.slidesPerView||u);u&&s&&e.changeDirection(),f(e.params,o);const m=e.params.enabled;Object.assign(e,{allowTouchMove:e.params.allowTouchMove,allowSlideNext:e.params.allowSlideNext,allowSlidePrev:e.params.allowSlidePrev}),p&&!m?e.disable():!p&&m&&e.enable(),e.currentBreakpoint=l,e.emit("_beforeBreakpoint",o),h&&s&&(e.loopDestroy(),e.loopCreate(),e.updateSlides(),e.slideTo(t-i+e.loopedSlides,0,!1)),e.emit("breakpoint",o)},getBreakpoint:function(e,t="window",s){if(!e||"container"===t&&!s)return;let i=!1;const a=n(),r="window"===t?a.innerHeight:s.clientHeight,l=Object.keys(e).map((e=>{if("string"==typeof e&&0===e.indexOf("@")){const t=parseFloat(e.substr(1));return{value:r*t,point:e}}return{value:e,point:e}}));l.sort(((e,t)=>parseInt(e.value,10)-parseInt(t.value,10)));for(let e=0;e<l.length;e+=1){const{point:n,value:r}=l[e];"window"===t?a.matchMedia(`(min-width: ${r}px)`).matches&&(i=n):r<=s.clientWidth&&(i=n)}return i||"max"}},checkOverflow:{checkOverflow:function(){const e=this,{isLocked:t,params:s}=e,{slidesOffsetBefore:i}=s;if(i){const t=e.slides.length-1,s=e.slidesGrid[t]+e.slidesSizesGrid[t]+2*i;e.isLocked=e.size>s}else e.isLocked=1===e.snapGrid.length;!0===s.allowSlideNext&&(e.allowSlideNext=!e.isLocked),!0===s.allowSlidePrev&&(e.allowSlidePrev=!e.isLocked),t&&t!==e.isLocked&&(e.isEnd=!1),t!==e.isLocked&&e.emit(e.isLocked?"lock":"unlock")}},classes:{addClasses:function(){const e=this,{classNames:t,params:s,rtl:i,$el:a,device:n,support:r}=e,l=function(e,t){const s=[];return e.forEach((e=>{"object"==typeof e?Object.keys(e).forEach((i=>{e[i]&&s.push(t+i)})):"string"==typeof e&&s.push(t+e)})),s}(["initialized",s.direction,{"pointer-events":!r.touch},{"free-mode":e.params.freeMode&&s.freeMode.enabled},{autoheight:s.autoHeight},{rtl:i},{grid:s.grid&&s.grid.rows>1},{"grid-column":s.grid&&s.grid.rows>1&&"column"===s.grid.fill},{android:n.android},{ios:n.ios},{"css-mode":s.cssMode},{centered:s.cssMode&&s.centeredSlides}],s.containerModifierClass);t.push(...l),a.addClass([...t].join(" ")),e.emitContainerClasses()},removeClasses:function(){const{$el:e,classNames:t}=this;e.removeClass(t.join(" ")),this.emitContainerClasses()}},images:{loadImage:function(e,t,s,i,a,r){const l=n();let o;function c(){r&&r()}d(e).parent("picture")[0]||e.complete&&a?c():t?(o=new l.Image,o.onload=c,o.onerror=c,i&&(o.sizes=i),s&&(o.srcset=s),t&&(o.src=t)):c()},preloadImages:function(){const e=this;function t(){null!=e&&e&&!e.destroyed&&(void 0!==e.imagesLoaded&&(e.imagesLoaded+=1),e.imagesLoaded===e.imagesToLoad.length&&(e.params.updateOnImagesReady&&e.update(),e.emit("imagesReady")))}e.imagesToLoad=e.$el.find("img");for(let s=0;s<e.imagesToLoad.length;s+=1){const i=e.imagesToLoad[s];e.loadImage(i,i.currentSrc||i.getAttribute("src"),i.srcset||i.getAttribute("srcset"),i.sizes||i.getAttribute("sizes"),!0,t)}}}},N={};class B{constructor(...e){let t,s;if(1===e.length&&e[0].constructor&&"Object"===Object.prototype.toString.call(e[0]).slice(8,-1)?s=e[0]:[t,s]=e,s||(s={}),s=f({},s),t&&!s.el&&(s.el=t),s.el&&d(s.el).length>1){const e=[];return d(s.el).each((t=>{const i=f({},s,{el:t});e.push(new B(i))})),e}const i=this;i.__swiper__=!0,i.support=C(),i.device=x({userAgent:s.userAgent}),i.browser=T(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],s.modules&&Array.isArray(s.modules)&&i.modules.push(...s.modules);const a={};i.modules.forEach((e=>{e({swiper:i,extendParams:X(s,a),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})}));const n=f({},G,a);return i.params=f({},n,N,s),i.originalParams=f({},i.params),i.passedParams=f({},s),i.params&&i.params.on&&Object.keys(i.params.on).forEach((e=>{i.on(e,i.params.on[e])})),i.params&&i.params.onAny&&i.onAny(i.params.onAny),i.$=d,Object.assign(i,{enabled:i.params.enabled,el:t,classNames:[],slides:d(),slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===i.params.direction,isVertical:()=>"vertical"===i.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,touchEvents:function(){const e=["touchstart","touchmove","touchend","touchcancel"],t=["pointerdown","pointermove","pointerup"];return i.touchEventsTouch={start:e[0],move:e[1],end:e[2],cancel:e[3]},i.touchEventsDesktop={start:t[0],move:t[1],end:t[2]},i.support.touch||!i.params.simulateTouch?i.touchEventsTouch:i.touchEventsDesktop}(),touchEventsData:{isTouched:void 0,isMoved:void 0,allowTouchCallbacks:void 0,touchStartTime:void 0,isScrolling:void 0,currentTranslate:void 0,startTranslate:void 0,allowThresholdMove:void 0,focusableElements:i.params.focusableElements,lastClickTime:u(),clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,isTouchEvent:void 0,startMoving:void 0},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}enable(){const e=this;e.enabled||(e.enabled=!0,e.params.grabCursor&&e.setGrabCursor(),e.emit("enable"))}disable(){const e=this;e.enabled&&(e.enabled=!1,e.params.grabCursor&&e.unsetGrabCursor(),e.emit("disable"))}setProgress(e,t){const s=this;e=Math.min(Math.max(e,0),1);const i=s.minTranslate(),a=(s.maxTranslate()-i)*e+i;s.translateTo(a,void 0===t?0:t),s.updateActiveIndex(),s.updateSlidesClasses()}emitContainerClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=e.el.className.split(" ").filter((t=>0===t.indexOf("swiper")||0===t.indexOf(e.params.containerModifierClass)));e.emit("_containerClasses",t.join(" "))}getSlideClasses(e){const t=this;return e.className.split(" ").filter((e=>0===e.indexOf("swiper-slide")||0===e.indexOf(t.params.slideClass))).join(" ")}emitSlidesClasses(){const e=this;if(!e.params._emitClasses||!e.el)return;const t=[];e.slides.each((s=>{const i=e.getSlideClasses(s);t.push({slideEl:s,classNames:i}),e.emit("_slideClass",s,i)})),e.emit("_slideClasses",t)}slidesPerViewDynamic(e="current",t=!1){const{params:s,slides:i,slidesGrid:a,slidesSizesGrid:n,size:r,activeIndex:l}=this;let o=1;if(s.centeredSlides){let e,t=i[l].swiperSlideSize;for(let s=l+1;s<i.length;s+=1)i[s]&&!e&&(t+=i[s].swiperSlideSize,o+=1,t>r&&(e=!0));for(let s=l-1;s>=0;s-=1)i[s]&&!e&&(t+=i[s].swiperSlideSize,o+=1,t>r&&(e=!0))}else if("current"===e)for(let e=l+1;e<i.length;e+=1){(t?a[e]+n[e]-a[l]<r:a[e]-a[l]<r)&&(o+=1)}else for(let e=l-1;e>=0;e-=1){a[l]-a[e]<r&&(o+=1)}return o}update(){const e=this;if(!e||e.destroyed)return;const{snapGrid:t,params:s}=e;function i(){const t=e.rtlTranslate?-1*e.translate:e.translate,s=Math.min(Math.max(t,e.maxTranslate()),e.minTranslate());e.setTranslate(s),e.updateActiveIndex(),e.updateSlidesClasses()}let a;s.breakpoints&&e.setBreakpoint(),e.updateSize(),e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.params.freeMode&&e.params.freeMode.enabled?(i(),e.params.autoHeight&&e.updateAutoHeight()):(a=("auto"===e.params.slidesPerView||e.params.slidesPerView>1)&&e.isEnd&&!e.params.centeredSlides?e.slideTo(e.slides.length-1,0,!1,!0):e.slideTo(e.activeIndex,0,!1,!0),a||i()),s.watchOverflow&&t!==e.snapGrid&&e.checkOverflow(),e.emit("update")}changeDirection(e,t=!0){const s=this,i=s.params.direction;return e||(e="horizontal"===i?"vertical":"horizontal"),e===i||"horizontal"!==e&&"vertical"!==e||(s.$el.removeClass(`${s.params.containerModifierClass}${i}`).addClass(`${s.params.containerModifierClass}${e}`),s.emitContainerClasses(),s.params.direction=e,s.slides.each((t=>{"vertical"===e?t.style.width="":t.style.height=""})),s.emit("changeDirection"),t&&s.update()),s}mount(e){const t=this;if(t.mounted)return!0;const s=d(e||t.params.el);if(!(e=s[0]))return!1;e.swiper=t;const a=()=>`.${(t.params.wrapperClass||"").trim().split(" ").join(".")}`;let n=(()=>{if(e&&e.shadowRoot&&e.shadowRoot.querySelector){const t=d(e.shadowRoot.querySelector(a()));return t.children=e=>s.children(e),t}return s.children(a())})();if(0===n.length&&t.params.createElements){const e=i().createElement("div");n=d(e),e.className=t.params.wrapperClass,s.append(e),s.children(`.${t.params.slideClass}`).each((e=>{n.append(e)}))}return Object.assign(t,{$el:s,el:e,$wrapperEl:n,wrapperEl:n[0],mounted:!0,rtl:"rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction"),rtlTranslate:"horizontal"===t.params.direction&&("rtl"===e.dir.toLowerCase()||"rtl"===s.css("direction")),wrongRTL:"-webkit-box"===n.css("display")}),!0}init(e){const t=this;if(t.initialized)return t;return!1===t.mount(e)||(t.emit("beforeInit"),t.params.breakpoints&&t.setBreakpoint(),t.addClasses(),t.params.loop&&t.loopCreate(),t.updateSize(),t.updateSlides(),t.params.watchOverflow&&t.checkOverflow(),t.params.grabCursor&&t.enabled&&t.setGrabCursor(),t.params.preloadImages&&t.preloadImages(),t.params.loop?t.slideTo(t.params.initialSlide+t.loopedSlides,0,t.params.runCallbacksOnInit,!1,!0):t.slideTo(t.params.initialSlide,0,t.params.runCallbacksOnInit,!1,!0),t.attachEvents(),t.initialized=!0,t.emit("init"),t.emit("afterInit")),t}destroy(e=!0,t=!0){const s=this,{params:i,$el:a,$wrapperEl:n,slides:r}=s;return void 0===s.params||s.destroyed||(s.emit("beforeDestroy"),s.initialized=!1,s.detachEvents(),i.loop&&s.loopDestroy(),t&&(s.removeClasses(),a.removeAttr("style"),n.removeAttr("style"),r&&r.length&&r.removeClass([i.slideVisibleClass,i.slideActiveClass,i.slideNextClass,i.slidePrevClass].join(" ")).removeAttr("style").removeAttr("data-swiper-slide-index")),s.emit("destroy"),Object.keys(s.eventsListeners).forEach((e=>{s.off(e)})),!1!==e&&(s.$el[0].swiper=null,function(e){const t=e;Object.keys(t).forEach((e=>{try{t[e]=null}catch(e){}try{delete t[e]}catch(e){}}))}(s)),s.destroyed=!0),null}static extendDefaults(e){f(N,e)}static get extendedDefaults(){return N}static get defaults(){return G}static installModule(e){B.prototype.__modules__||(B.prototype.__modules__=[]);const t=B.prototype.__modules__;"function"==typeof e&&t.indexOf(e)<0&&t.push(e)}static use(e){return Array.isArray(e)?(e.forEach((e=>B.installModule(e))),B):(B.installModule(e),B)}}function W(e,t,s,a){const n=i();return e.params.createElements&&Object.keys(a).forEach((i=>{if(!s[i]&&!0===s.auto){let r=e.$el.children(`.${a[i]}`)[0];r||(r=n.createElement("div"),r.className=a[i],e.$el.append(r)),s[i]=r,t[i]=r}})),s}function _(e=""){return`.${e.trim().replace(/([\.:!\/])/g,"\\$1").replace(/ /g,".")}`}function j(e){const t=this,{$wrapperEl:s,params:i}=t;if(i.loop&&t.loopDestroy(),"object"==typeof e&&"length"in e)for(let t=0;t<e.length;t+=1)e[t]&&s.append(e[t]);else s.append(e);i.loop&&t.loopCreate(),i.observer||t.update()}function H(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;s.loop&&t.loopDestroy();let n=a+1;if("object"==typeof e&&"length"in e){for(let t=0;t<e.length;t+=1)e[t]&&i.prepend(e[t]);n=a+e.length}else i.prepend(e);s.loop&&t.loopCreate(),s.observer||t.update(),t.slideTo(n,0,!1)}function F(e,t){const s=this,{$wrapperEl:i,params:a,activeIndex:n}=s;let r=n;a.loop&&(r-=s.loopedSlides,s.loopDestroy(),s.slides=i.children(`.${a.slideClass}`));const l=s.slides.length;if(e<=0)return void s.prependSlide(t);if(e>=l)return void s.appendSlide(t);let o=r>e?r+1:r;const d=[];for(let t=l-1;t>=e;t-=1){const e=s.slides.eq(t);e.remove(),d.unshift(e)}if("object"==typeof t&&"length"in t){for(let e=0;e<t.length;e+=1)t[e]&&i.append(t[e]);o=r>e?r+t.length:r}else i.append(t);for(let e=0;e<d.length;e+=1)i.append(d[e]);a.loop&&s.loopCreate(),a.observer||s.update(),a.loop?s.slideTo(o+s.loopedSlides,0,!1):s.slideTo(o,0,!1)}function V(e){const t=this,{params:s,$wrapperEl:i,activeIndex:a}=t;let n=a;s.loop&&(n-=t.loopedSlides,t.loopDestroy(),t.slides=i.children(`.${s.slideClass}`));let r,l=n;if("object"==typeof e&&"length"in e){for(let s=0;s<e.length;s+=1)r=e[s],t.slides[r]&&t.slides.eq(r).remove(),r<l&&(l-=1);l=Math.max(l,0)}else r=e,t.slides[r]&&t.slides.eq(r).remove(),r<l&&(l-=1),l=Math.max(l,0);s.loop&&t.loopCreate(),s.observer||t.update(),s.loop?t.slideTo(l+t.loopedSlides,0,!1):t.slideTo(l,0,!1)}function q(){const e=this,t=[];for(let s=0;s<e.slides.length;s+=1)t.push(s);e.removeSlide(t)}function R(e,t){return e.transformEl?t.find(e.transformEl).css({"backface-visibility":"hidden","-webkit-backface-visibility":"hidden"}):t}Object.keys(Y).forEach((e=>{Object.keys(Y[e]).forEach((t=>{B.prototype[t]=Y[e][t]}))})),B.use([function({swiper:e,on:t,emit:s}){const i=n();let a=null;const r=()=>{e&&!e.destroyed&&e.initialized&&(s("beforeResize"),s("resize"))},l=()=>{e&&!e.destroyed&&e.initialized&&s("orientationchange")};t("init",(()=>{e.params.resizeObserver&&void 0!==i.ResizeObserver?e&&!e.destroyed&&e.initialized&&(a=new ResizeObserver((t=>{const{width:s,height:i}=e;let a=s,n=i;t.forEach((({contentBoxSize:t,contentRect:s,target:i})=>{i&&i!==e.el||(a=s?s.width:(t[0]||t).inlineSize,n=s?s.height:(t[0]||t).blockSize)})),a===s&&n===i||r()})),a.observe(e.el)):(i.addEventListener("resize",r),i.addEventListener("orientationchange",l))})),t("destroy",(()=>{a&&a.unobserve&&e.el&&(a.unobserve(e.el),a=null),i.removeEventListener("resize",r),i.removeEventListener("orientationchange",l)}))},function({swiper:e,extendParams:t,on:s,emit:i}){const a=[],r=n(),l=(e,t={})=>{const s=new(r.MutationObserver||r.WebkitMutationObserver)((e=>{if(1===e.length)return void i("observerUpdate",e[0]);const t=function(){i("observerUpdate",e[0])};r.requestAnimationFrame?r.requestAnimationFrame(t):r.setTimeout(t,0)}));s.observe(e,{attributes:void 0===t.attributes||t.attributes,childList:void 0===t.childList||t.childList,characterData:void 0===t.characterData||t.characterData}),a.push(s)};t({observer:!1,observeParents:!1,observeSlideChildren:!1}),s("init",(()=>{if(e.params.observer){if(e.params.observeParents){const t=e.$el.parents();for(let e=0;e<t.length;e+=1)l(t[e])}l(e.$el[0],{childList:e.params.observeSlideChildren}),l(e.$wrapperEl[0],{attributes:!1})}})),s("destroy",(()=>{a.forEach((e=>{e.disconnect()})),a.splice(0,a.length)}))}]);const U=[function({swiper:e,extendParams:t,on:s}){let i;function a(t,s){const i=e.params.virtual;if(i.cache&&e.virtual.cache[s])return e.virtual.cache[s];const a=i.renderSlide?d(i.renderSlide.call(e,t,s)):d(`<div class="${e.params.slideClass}" data-swiper-slide-index="${s}">${t}</div>`);return a.attr("data-swiper-slide-index")||a.attr("data-swiper-slide-index",s),i.cache&&(e.virtual.cache[s]=a),a}function n(t){const{slidesPerView:s,slidesPerGroup:i,centeredSlides:n}=e.params,{addSlidesBefore:r,addSlidesAfter:l}=e.params.virtual,{from:o,to:d,slides:c,slidesGrid:p,offset:u}=e.virtual;e.params.cssMode||e.updateActiveIndex();const h=e.activeIndex||0;let m,f,g;m=e.rtlTranslate?"right":e.isHorizontal()?"left":"top",n?(f=Math.floor(s/2)+i+l,g=Math.floor(s/2)+i+r):(f=s+(i-1)+l,g=i+r);const v=Math.max((h||0)-g,0),w=Math.min((h||0)+f,c.length-1),b=(e.slidesGrid[v]||0)-(e.slidesGrid[0]||0);function E(){e.updateSlides(),e.updateProgress(),e.updateSlidesClasses(),e.lazy&&e.params.lazy.enabled&&e.lazy.load()}if(Object.assign(e.virtual,{from:v,to:w,offset:b,slidesGrid:e.slidesGrid}),o===v&&d===w&&!t)return e.slidesGrid!==p&&b!==u&&e.slides.css(m,`${b}px`),void e.updateProgress();if(e.params.virtual.renderExternal)return e.params.virtual.renderExternal.call(e,{offset:b,from:v,to:w,slides:function(){const e=[];for(let t=v;t<=w;t+=1)e.push(c[t]);return e}()}),void(e.params.virtual.renderExternalUpdate&&E());const C=[],x=[];if(t)e.$wrapperEl.find(`.${e.params.slideClass}`).remove();else for(let t=o;t<=d;t+=1)(t<v||t>w)&&e.$wrapperEl.find(`.${e.params.slideClass}[data-swiper-slide-index="${t}"]`).remove();for(let e=0;e<c.length;e+=1)e>=v&&e<=w&&(void 0===d||t?x.push(e):(e>d&&x.push(e),e<o&&C.push(e)));x.forEach((t=>{e.$wrapperEl.append(a(c[t],t))})),C.sort(((e,t)=>t-e)).forEach((t=>{e.$wrapperEl.prepend(a(c[t],t))})),e.$wrapperEl.children(".swiper-slide").css(m,`${b}px`),E()}t({virtual:{enabled:!1,slides:[],cache:!0,renderSlide:null,renderExternal:null,renderExternalUpdate:!0,addSlidesBefore:0,addSlidesAfter:0}}),e.virtual={cache:{},from:void 0,to:void 0,slides:[],offset:0,slidesGrid:[]},s("beforeInit",(()=>{e.params.virtual.enabled&&(e.virtual.slides=e.params.virtual.slides,e.classNames.push(`${e.params.containerModifierClass}virtual`),e.params.watchSlidesProgress=!0,e.originalParams.watchSlidesProgress=!0,e.params.initialSlide||n())})),s("setTranslate",(()=>{e.params.virtual.enabled&&(e.params.cssMode&&!e._immediateVirtual?(clearTimeout(i),i=setTimeout((()=>{n()}),100)):n())})),s("init update resize",(()=>{e.params.virtual.enabled&&e.params.cssMode&&g(e.wrapperEl,"--swiper-virtual-size",`${e.virtualSize}px`)})),Object.assign(e.virtual,{appendSlide:function(t){if("object"==typeof t&&"length"in t)for(let s=0;s<t.length;s+=1)t[s]&&e.virtual.slides.push(t[s]);else e.virtual.slides.push(t);n(!0)},prependSlide:function(t){const s=e.activeIndex;let i=s+1,a=1;if(Array.isArray(t)){for(let s=0;s<t.length;s+=1)t[s]&&e.virtual.slides.unshift(t[s]);i=s+t.length,a=t.length}else e.virtual.slides.unshift(t);if(e.params.virtual.cache){const t=e.virtual.cache,s={};Object.keys(t).forEach((e=>{const i=t[e],n=i.attr("data-swiper-slide-index");n&&i.attr("data-swiper-slide-index",parseInt(n,10)+a),s[parseInt(e,10)+a]=i})),e.virtual.cache=s}n(!0),e.slideTo(i,0)},removeSlide:function(t){if(null==t)return;let s=e.activeIndex;if(Array.isArray(t))for(let i=t.length-1;i>=0;i-=1)e.virtual.slides.splice(t[i],1),e.params.virtual.cache&&delete e.virtual.cache[t[i]],t[i]<s&&(s-=1),s=Math.max(s,0);else e.virtual.slides.splice(t,1),e.params.virtual.cache&&delete e.virtual.cache[t],t<s&&(s-=1),s=Math.max(s,0);n(!0),e.slideTo(s,0)},removeAllSlides:function(){e.virtual.slides=[],e.params.virtual.cache&&(e.virtual.cache={}),n(!0),e.slideTo(0,0)},update:n})},function({swiper:e,extendParams:t,on:s,emit:i}){const a=n();let r;t({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null}}),e.mousewheel={enabled:!1};let l,o=u();const c=[];function h(){e.enabled&&(e.mouseEntered=!0)}function m(){e.enabled&&(e.mouseEntered=!1)}function f(t){return!(e.params.mousewheel.thresholdDelta&&t.delta<e.params.mousewheel.thresholdDelta)&&(!(e.params.mousewheel.thresholdTime&&u()-o<e.params.mousewheel.thresholdTime)&&(t.delta>=6&&u()-o<60||(t.direction<0?e.isEnd&&!e.params.loop||e.animating||(e.slideNext(),i("scroll",t.raw)):e.isBeginning&&!e.params.loop||e.animating||(e.slidePrev(),i("scroll",t.raw)),o=(new a.Date).getTime(),!1)))}function g(t){let s=t,a=!0;if(!e.enabled)return;const n=e.params.mousewheel;e.params.cssMode&&s.preventDefault();let o=e.$el;if("container"!==e.params.mousewheel.eventsTarget&&(o=d(e.params.mousewheel.eventsTarget)),!e.mouseEntered&&!o[0].contains(s.target)&&!n.releaseOnEdges)return!0;s.originalEvent&&(s=s.originalEvent);let h=0;const m=e.rtlTranslate?-1:1,g=function(e){let t=0,s=0,i=0,a=0;return"detail"in e&&(s=e.detail),"wheelDelta"in e&&(s=-e.wheelDelta/120),"wheelDeltaY"in e&&(s=-e.wheelDeltaY/120),"wheelDeltaX"in e&&(t=-e.wheelDeltaX/120),"axis"in e&&e.axis===e.HORIZONTAL_AXIS&&(t=s,s=0),i=10*t,a=10*s,"deltaY"in e&&(a=e.deltaY),"deltaX"in e&&(i=e.deltaX),e.shiftKey&&!i&&(i=a,a=0),(i||a)&&e.deltaMode&&(1===e.deltaMode?(i*=40,a*=40):(i*=800,a*=800)),i&&!t&&(t=i<1?-1:1),a&&!s&&(s=a<1?-1:1),{spinX:t,spinY:s,pixelX:i,pixelY:a}}(s);if(n.forceToAxis)if(e.isHorizontal()){if(!(Math.abs(g.pixelX)>Math.abs(g.pixelY)))return!0;h=-g.pixelX*m}else{if(!(Math.abs(g.pixelY)>Math.abs(g.pixelX)))return!0;h=-g.pixelY}else h=Math.abs(g.pixelX)>Math.abs(g.pixelY)?-g.pixelX*m:-g.pixelY;if(0===h)return!0;n.invert&&(h=-h);let v=e.getTranslate()+h*n.sensitivity;if(v>=e.minTranslate()&&(v=e.minTranslate()),v<=e.maxTranslate()&&(v=e.maxTranslate()),a=!!e.params.loop||!(v===e.minTranslate()||v===e.maxTranslate()),a&&e.params.nested&&s.stopPropagation(),e.params.freeMode&&e.params.freeMode.enabled){const t={time:u(),delta:Math.abs(h),direction:Math.sign(h)},a=l&&t.time<l.time+500&&t.delta<=l.delta&&t.direction===l.direction;if(!a){l=void 0,e.params.loop&&e.loopFix();let o=e.getTranslate()+h*n.sensitivity;const d=e.isBeginning,u=e.isEnd;if(o>=e.minTranslate()&&(o=e.minTranslate()),o<=e.maxTranslate()&&(o=e.maxTranslate()),e.setTransition(0),e.setTranslate(o),e.updateProgress(),e.updateActiveIndex(),e.updateSlidesClasses(),(!d&&e.isBeginning||!u&&e.isEnd)&&e.updateSlidesClasses(),e.params.freeMode.sticky){clearTimeout(r),r=void 0,c.length>=15&&c.shift();const s=c.length?c[c.length-1]:void 0,i=c[0];if(c.push(t),s&&(t.delta>s.delta||t.direction!==s.direction))c.splice(0);else if(c.length>=15&&t.time-i.time<500&&i.delta-t.delta>=1&&t.delta<=6){const s=h>0?.8:.2;l=t,c.splice(0),r=p((()=>{e.slideToClosest(e.params.speed,!0,void 0,s)}),0)}r||(r=p((()=>{l=t,c.splice(0),e.slideToClosest(e.params.speed,!0,void 0,.5)}),500))}if(a||i("scroll",s),e.params.autoplay&&e.params.autoplayDisableOnInteraction&&e.autoplay.stop(),o===e.minTranslate()||o===e.maxTranslate())return!0}}else{const s={time:u(),delta:Math.abs(h),direction:Math.sign(h),raw:t};c.length>=2&&c.shift();const i=c.length?c[c.length-1]:void 0;if(c.push(s),i?(s.direction!==i.direction||s.delta>i.delta||s.time>i.time+150)&&f(s):f(s),function(t){const s=e.params.mousewheel;if(t.direction<0){if(e.isEnd&&!e.params.loop&&s.releaseOnEdges)return!0}else if(e.isBeginning&&!e.params.loop&&s.releaseOnEdges)return!0;return!1}(s))return!0}return s.preventDefault?s.preventDefault():s.returnValue=!1,!1}function v(t){let s=e.$el;"container"!==e.params.mousewheel.eventsTarget&&(s=d(e.params.mousewheel.eventsTarget)),s[t]("mouseenter",h),s[t]("mouseleave",m),s[t]("wheel",g)}function w(){return e.params.cssMode?(e.wrapperEl.removeEventListener("wheel",g),!0):!e.mousewheel.enabled&&(v("on"),e.mousewheel.enabled=!0,!0)}function b(){return e.params.cssMode?(e.wrapperEl.addEventListener(event,g),!0):!!e.mousewheel.enabled&&(v("off"),e.mousewheel.enabled=!1,!0)}s("init",(()=>{!e.params.mousewheel.enabled&&e.params.cssMode&&b(),e.params.mousewheel.enabled&&w()})),s("destroy",(()=>{e.params.cssMode&&w(),e.mousewheel.enabled&&b()})),Object.assign(e.mousewheel,{enable:w,disable:b})},function({swiper:e,extendParams:t,on:s,emit:i}){function a(t){let s;return t&&(s=d(t),e.params.uniqueNavElements&&"string"==typeof t&&s.length>1&&1===e.$el.find(t).length&&(s=e.$el.find(t))),s}function n(t,s){const i=e.params.navigation;t&&t.length>0&&(t[s?"addClass":"removeClass"](i.disabledClass),t[0]&&"BUTTON"===t[0].tagName&&(t[0].disabled=s),e.params.watchOverflow&&e.enabled&&t[e.isLocked?"addClass":"removeClass"](i.lockClass))}function r(){if(e.params.loop)return;const{$nextEl:t,$prevEl:s}=e.navigation;n(s,e.isBeginning),n(t,e.isEnd)}function l(t){t.preventDefault(),e.isBeginning&&!e.params.loop||e.slidePrev()}function o(t){t.preventDefault(),e.isEnd&&!e.params.loop||e.slideNext()}function c(){const t=e.params.navigation;if(e.params.navigation=W(e,e.originalParams.navigation,e.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!t.nextEl&&!t.prevEl)return;const s=a(t.nextEl),i=a(t.prevEl);s&&s.length>0&&s.on("click",o),i&&i.length>0&&i.on("click",l),Object.assign(e.navigation,{$nextEl:s,nextEl:s&&s[0],$prevEl:i,prevEl:i&&i[0]}),e.enabled||(s&&s.addClass(t.lockClass),i&&i.addClass(t.lockClass))}function p(){const{$nextEl:t,$prevEl:s}=e.navigation;t&&t.length&&(t.off("click",o),t.removeClass(e.params.navigation.disabledClass)),s&&s.length&&(s.off("click",l),s.removeClass(e.params.navigation.disabledClass))}t({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock"}}),e.navigation={nextEl:null,$nextEl:null,prevEl:null,$prevEl:null},s("init",(()=>{c(),r()})),s("toEdge fromEdge lock unlock",(()=>{r()})),s("destroy",(()=>{p()})),s("enable disable",(()=>{const{$nextEl:t,$prevEl:s}=e.navigation;t&&t[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass),s&&s[e.enabled?"removeClass":"addClass"](e.params.navigation.lockClass)})),s("click",((t,s)=>{const{$nextEl:a,$prevEl:n}=e.navigation,r=s.target;if(e.params.navigation.hideOnClick&&!d(r).is(n)&&!d(r).is(a)){if(e.pagination&&e.params.pagination&&e.params.pagination.clickable&&(e.pagination.el===r||e.pagination.el.contains(r)))return;let t;a?t=a.hasClass(e.params.navigation.hiddenClass):n&&(t=n.hasClass(e.params.navigation.hiddenClass)),i(!0===t?"navigationShow":"navigationHide"),a&&a.toggleClass(e.params.navigation.hiddenClass),n&&n.toggleClass(e.params.navigation.hiddenClass)}})),Object.assign(e.navigation,{update:r,init:c,destroy:p})},function({swiper:e,extendParams:t,on:s,emit:i}){const a="swiper-pagination";let n;t({pagination:{el:null,bulletElement:"span",clickable:!1,hideOnClick:!1,renderBullet:null,renderProgressbar:null,renderFraction:null,renderCustom:null,progressbarOpposite:!1,type:"bullets",dynamicBullets:!1,dynamicMainBullets:1,formatFractionCurrent:e=>e,formatFractionTotal:e=>e,bulletClass:`${a}-bullet`,bulletActiveClass:`${a}-bullet-active`,modifierClass:`${a}-`,currentClass:`${a}-current`,totalClass:`${a}-total`,hiddenClass:`${a}-hidden`,progressbarFillClass:`${a}-progressbar-fill`,progressbarOppositeClass:`${a}-progressbar-opposite`,clickableClass:`${a}-clickable`,lockClass:`${a}-lock`,horizontalClass:`${a}-horizontal`,verticalClass:`${a}-vertical`}}),e.pagination={el:null,$el:null,bullets:[]};let r=0;function l(){return!e.params.pagination.el||!e.pagination.el||!e.pagination.$el||0===e.pagination.$el.length}function o(t,s){const{bulletActiveClass:i}=e.params.pagination;t[s]().addClass(`${i}-${s}`)[s]().addClass(`${i}-${s}-${s}`)}function c(){const t=e.rtl,s=e.params.pagination;if(l())return;const a=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,c=e.pagination.$el;let p;const u=e.params.loop?Math.ceil((a-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;if(e.params.loop?(p=Math.ceil((e.activeIndex-e.loopedSlides)/e.params.slidesPerGroup),p>a-1-2*e.loopedSlides&&(p-=a-2*e.loopedSlides),p>u-1&&(p-=u),p<0&&"bullets"!==e.params.paginationType&&(p=u+p)):p=void 0!==e.snapIndex?e.snapIndex:e.activeIndex||0,"bullets"===s.type&&e.pagination.bullets&&e.pagination.bullets.length>0){const i=e.pagination.bullets;let a,l,u;if(s.dynamicBullets&&(n=i.eq(0)[e.isHorizontal()?"outerWidth":"outerHeight"](!0),c.css(e.isHorizontal()?"width":"height",n*(s.dynamicMainBullets+4)+"px"),s.dynamicMainBullets>1&&void 0!==e.previousIndex&&(r+=p-e.previousIndex,r>s.dynamicMainBullets-1?r=s.dynamicMainBullets-1:r<0&&(r=0)),a=p-r,l=a+(Math.min(i.length,s.dynamicMainBullets)-1),u=(l+a)/2),i.removeClass(["","-next","-next-next","-prev","-prev-prev","-main"].map((e=>`${s.bulletActiveClass}${e}`)).join(" ")),c.length>1)i.each((e=>{const t=d(e),i=t.index();i===p&&t.addClass(s.bulletActiveClass),s.dynamicBullets&&(i>=a&&i<=l&&t.addClass(`${s.bulletActiveClass}-main`),i===a&&o(t,"prev"),i===l&&o(t,"next"))}));else{const t=i.eq(p),n=t.index();if(t.addClass(s.bulletActiveClass),s.dynamicBullets){const t=i.eq(a),r=i.eq(l);for(let e=a;e<=l;e+=1)i.eq(e).addClass(`${s.bulletActiveClass}-main`);if(e.params.loop)if(n>=i.length-s.dynamicMainBullets){for(let e=s.dynamicMainBullets;e>=0;e-=1)i.eq(i.length-e).addClass(`${s.bulletActiveClass}-main`);i.eq(i.length-s.dynamicMainBullets-1).addClass(`${s.bulletActiveClass}-prev`)}else o(t,"prev"),o(r,"next");else o(t,"prev"),o(r,"next")}}if(s.dynamicBullets){const a=Math.min(i.length,s.dynamicMainBullets+4),r=(n*a-n)/2-u*n,l=t?"right":"left";i.css(e.isHorizontal()?l:"top",`${r}px`)}}if("fraction"===s.type&&(c.find(_(s.currentClass)).text(s.formatFractionCurrent(p+1)),c.find(_(s.totalClass)).text(s.formatFractionTotal(u))),"progressbar"===s.type){let t;t=s.progressbarOpposite?e.isHorizontal()?"vertical":"horizontal":e.isHorizontal()?"horizontal":"vertical";const i=(p+1)/u;let a=1,n=1;"horizontal"===t?a=i:n=i,c.find(_(s.progressbarFillClass)).transform(`translate3d(0,0,0) scaleX(${a}) scaleY(${n})`).transition(e.params.speed)}"custom"===s.type&&s.renderCustom?(c.html(s.renderCustom(e,p+1,u)),i("paginationRender",c[0])):i("paginationUpdate",c[0]),e.params.watchOverflow&&e.enabled&&c[e.isLocked?"addClass":"removeClass"](s.lockClass)}function p(){const t=e.params.pagination;if(l())return;const s=e.virtual&&e.params.virtual.enabled?e.virtual.slides.length:e.slides.length,a=e.pagination.$el;let n="";if("bullets"===t.type){let i=e.params.loop?Math.ceil((s-2*e.loopedSlides)/e.params.slidesPerGroup):e.snapGrid.length;e.params.freeMode&&e.params.freeMode.enabled&&!e.params.loop&&i>s&&(i=s);for(let s=0;s<i;s+=1)t.renderBullet?n+=t.renderBullet.call(e,s,t.bulletClass):n+=`<${t.bulletElement} class="${t.bulletClass}"></${t.bulletElement}>`;a.html(n),e.pagination.bullets=a.find(_(t.bulletClass))}"fraction"===t.type&&(n=t.renderFraction?t.renderFraction.call(e,t.currentClass,t.totalClass):`<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`,a.html(n)),"progressbar"===t.type&&(n=t.renderProgressbar?t.renderProgressbar.call(e,t.progressbarFillClass):`<span class="${t.progressbarFillClass}"></span>`,a.html(n)),"custom"!==t.type&&i("paginationRender",e.pagination.$el[0])}function u(){e.params.pagination=W(e,e.originalParams.pagination,e.params.pagination,{el:"swiper-pagination"});const t=e.params.pagination;if(!t.el)return;let s=d(t.el);0!==s.length&&(e.params.uniqueNavElements&&"string"==typeof t.el&&s.length>1&&(s=e.$el.find(t.el),s.length>1&&(s=s.filter((t=>d(t).parents(".swiper")[0]===e.el)))),"bullets"===t.type&&t.clickable&&s.addClass(t.clickableClass),s.addClass(t.modifierClass+t.type),s.addClass(t.modifierClass+e.params.direction),"bullets"===t.type&&t.dynamicBullets&&(s.addClass(`${t.modifierClass}${t.type}-dynamic`),r=0,t.dynamicMainBullets<1&&(t.dynamicMainBullets=1)),"progressbar"===t.type&&t.progressbarOpposite&&s.addClass(t.progressbarOppositeClass),t.clickable&&s.on("click",_(t.bulletClass),(function(t){t.preventDefault();let s=d(this).index()*e.params.slidesPerGroup;e.params.loop&&(s+=e.loopedSlides),e.slideTo(s)})),Object.assign(e.pagination,{$el:s,el:s[0]}),e.enabled||s.addClass(t.lockClass))}function h(){const t=e.params.pagination;if(l())return;const s=e.pagination.$el;s.removeClass(t.hiddenClass),s.removeClass(t.modifierClass+t.type),s.removeClass(t.modifierClass+e.params.direction),e.pagination.bullets&&e.pagination.bullets.removeClass&&e.pagination.bullets.removeClass(t.bulletActiveClass),t.clickable&&s.off("click",_(t.bulletClass))}s("init",(()=>{u(),p(),c()})),s("activeIndexChange",(()=>{(e.params.loop||void 0===e.snapIndex)&&c()})),s("snapIndexChange",(()=>{e.params.loop||c()})),s("slidesLengthChange",(()=>{e.params.loop&&(p(),c())})),s("snapGridLengthChange",(()=>{e.params.loop||(p(),c())})),s("destroy",(()=>{h()})),s("enable disable",(()=>{const{$el:t}=e.pagination;t&&t[e.enabled?"removeClass":"addClass"](e.params.pagination.lockClass)})),s("lock unlock",(()=>{c()})),s("click",((t,s)=>{const a=s.target,{$el:n}=e.pagination;if(e.params.pagination.el&&e.params.pagination.hideOnClick&&n.length>0&&!d(a).hasClass(e.params.pagination.bulletClass)){if(e.navigation&&(e.navigation.nextEl&&a===e.navigation.nextEl||e.navigation.prevEl&&a===e.navigation.prevEl))return;const t=n.hasClass(e.params.pagination.hiddenClass);i(!0===t?"paginationShow":"paginationHide"),n.toggleClass(e.params.pagination.hiddenClass)}})),Object.assign(e.pagination,{render:p,update:c,init:u,destroy:h})},function({swiper:e,extendParams:t,on:s,emit:i}){const a=n();t({zoom:{enabled:!1,maxRatio:3,minRatio:1,toggle:!0,containerClass:"swiper-zoom-container",zoomedSlideClass:"swiper-slide-zoomed"}}),e.zoom={enabled:!1};let r,l,o,c=1,p=!1;const u={$slideEl:void 0,slideWidth:void 0,slideHeight:void 0,$imageEl:void 0,$imageWrapEl:void 0,maxRatio:3},m={isTouched:void 0,isMoved:void 0,currentX:void 0,currentY:void 0,minX:void 0,minY:void 0,maxX:void 0,maxY:void 0,width:void 0,height:void 0,startX:void 0,startY:void 0,touchesStart:{},touchesCurrent:{}},f={x:void 0,y:void 0,prevPositionX:void 0,prevPositionY:void 0,prevTime:void 0};let g=1;function v(e){if(e.targetTouches.length<2)return 1;const t=e.targetTouches[0].pageX,s=e.targetTouches[0].pageY,i=e.targetTouches[1].pageX,a=e.targetTouches[1].pageY;return Math.sqrt((i-t)**2+(a-s)**2)}function w(t){const s=e.support,i=e.params.zoom;if(l=!1,o=!1,!s.gestures){if("touchstart"!==t.type||"touchstart"===t.type&&t.targetTouches.length<2)return;l=!0,u.scaleStart=v(t)}u.$slideEl&&u.$slideEl.length||(u.$slideEl=d(t.target).closest(`.${e.params.slideClass}`),0===u.$slideEl.length&&(u.$slideEl=e.slides.eq(e.activeIndex)),u.$imageEl=u.$slideEl.find(`.${i.containerClass}`).eq(0).find("img, svg, canvas, picture, .swiper-zoom-target"),u.$imageWrapEl=u.$imageEl.parent(`.${i.containerClass}`),u.maxRatio=u.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,0!==u.$imageWrapEl.length)?(u.$imageEl&&u.$imageEl.transition(0),p=!0):u.$imageEl=void 0}function b(t){const s=e.support,i=e.params.zoom,a=e.zoom;if(!s.gestures){if("touchmove"!==t.type||"touchmove"===t.type&&t.targetTouches.length<2)return;o=!0,u.scaleMove=v(t)}u.$imageEl&&0!==u.$imageEl.length?(s.gestures?a.scale=t.scale*c:a.scale=u.scaleMove/u.scaleStart*c,a.scale>u.maxRatio&&(a.scale=u.maxRatio-1+(a.scale-u.maxRatio+1)**.5),a.scale<i.minRatio&&(a.scale=i.minRatio+1-(i.minRatio-a.scale+1)**.5),u.$imageEl.transform(`translate3d(0,0,0) scale(${a.scale})`)):"gesturechange"===t.type&&w(t)}function E(t){const s=e.device,i=e.support,a=e.params.zoom,n=e.zoom;if(!i.gestures){if(!l||!o)return;if("touchend"!==t.type||"touchend"===t.type&&t.changedTouches.length<2&&!s.android)return;l=!1,o=!1}u.$imageEl&&0!==u.$imageEl.length&&(n.scale=Math.max(Math.min(n.scale,u.maxRatio),a.minRatio),u.$imageEl.transition(e.params.speed).transform(`translate3d(0,0,0) scale(${n.scale})`),c=n.scale,p=!1,1===n.scale&&(u.$slideEl=void 0))}function C(t){const s=e.zoom;if(!u.$imageEl||0===u.$imageEl.length)return;if(e.allowClick=!1,!m.isTouched||!u.$slideEl)return;m.isMoved||(m.width=u.$imageEl[0].offsetWidth,m.height=u.$imageEl[0].offsetHeight,m.startX=h(u.$imageWrapEl[0],"x")||0,m.startY=h(u.$imageWrapEl[0],"y")||0,u.slideWidth=u.$slideEl[0].offsetWidth,u.slideHeight=u.$slideEl[0].offsetHeight,u.$imageWrapEl.transition(0));const i=m.width*s.scale,a=m.height*s.scale;if(!(i<u.slideWidth&&a<u.slideHeight)){if(m.minX=Math.min(u.slideWidth/2-i/2,0),m.maxX=-m.minX,m.minY=Math.min(u.slideHeight/2-a/2,0),m.maxY=-m.minY,m.touchesCurrent.x="touchmove"===t.type?t.targetTouches[0].pageX:t.pageX,m.touchesCurrent.y="touchmove"===t.type?t.targetTouches[0].pageY:t.pageY,!m.isMoved&&!p){if(e.isHorizontal()&&(Math.floor(m.minX)===Math.floor(m.startX)&&m.touchesCurrent.x<m.touchesStart.x||Math.floor(m.maxX)===Math.floor(m.startX)&&m.touchesCurrent.x>m.touchesStart.x))return void(m.isTouched=!1);if(!e.isHorizontal()&&(Math.floor(m.minY)===Math.floor(m.startY)&&m.touchesCurrent.y<m.touchesStart.y||Math.floor(m.maxY)===Math.floor(m.startY)&&m.touchesCurrent.y>m.touchesStart.y))return void(m.isTouched=!1)}t.cancelable&&t.preventDefault(),t.stopPropagation(),m.isMoved=!0,m.currentX=m.touchesCurrent.x-m.touchesStart.x+m.startX,m.currentY=m.touchesCurrent.y-m.touchesStart.y+m.startY,m.currentX<m.minX&&(m.currentX=m.minX+1-(m.minX-m.currentX+1)**.8),m.currentX>m.maxX&&(m.currentX=m.maxX-1+(m.currentX-m.maxX+1)**.8),m.currentY<m.minY&&(m.currentY=m.minY+1-(m.minY-m.currentY+1)**.8),m.currentY>m.maxY&&(m.currentY=m.maxY-1+(m.currentY-m.maxY+1)**.8),f.prevPositionX||(f.prevPositionX=m.touchesCurrent.x),f.prevPositionY||(f.prevPositionY=m.touchesCurrent.y),f.prevTime||(f.prevTime=Date.now()),f.x=(m.touchesCurrent.x-f.prevPositionX)/(Date.now()-f.prevTime)/2,f.y=(m.touchesCurrent.y-f.prevPositionY)/(Date.now()-f.prevTime)/2,Math.abs(m.touchesCurrent.x-f.prevPositionX)<2&&(f.x=0),Math.abs(m.touchesCurrent.y-f.prevPositionY)<2&&(f.y=0),f.prevPositionX=m.touchesCurrent.x,f.prevPositionY=m.touchesCurrent.y,f.prevTime=Date.now(),u.$imageWrapEl.transform(`translate3d(${m.currentX}px, ${m.currentY}px,0)`)}}function x(){const t=e.zoom;u.$slideEl&&e.previousIndex!==e.activeIndex&&(u.$imageEl&&u.$imageEl.transform("translate3d(0,0,0) scale(1)"),u.$imageWrapEl&&u.$imageWrapEl.transform("translate3d(0,0,0)"),t.scale=1,c=1,u.$slideEl=void 0,u.$imageEl=void 0,u.$imageWrapEl=void 0)}function T(t){const s=e.zoom,i=e.params.zoom;if(u.$slideEl||(t&&t.target&&(u.$slideEl=d(t.target).closest(`.${e.params.slideClass}`)),u.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?u.$slideEl=e.$wrapperEl.children(`.${e.params.slideActiveClass}`):u.$slideEl=e.slides.eq(e.activeIndex)),u.$imageEl=u.$slideEl.find(`.${i.containerClass}`).eq(0).find("img, svg, canvas, picture, .swiper-zoom-target"),u.$imageWrapEl=u.$imageEl.parent(`.${i.containerClass}`)),!u.$imageEl||0===u.$imageEl.length||!u.$imageWrapEl||0===u.$imageWrapEl.length)return;let n,r,l,o,p,h,f,g,v,w,b,E,C,x,T,y,S,$;e.params.cssMode&&(e.wrapperEl.style.overflow="hidden",e.wrapperEl.style.touchAction="none"),u.$slideEl.addClass(`${i.zoomedSlideClass}`),void 0===m.touchesStart.x&&t?(n="touchend"===t.type?t.changedTouches[0].pageX:t.pageX,r="touchend"===t.type?t.changedTouches[0].pageY:t.pageY):(n=m.touchesStart.x,r=m.touchesStart.y),s.scale=u.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,c=u.$imageWrapEl.attr("data-swiper-zoom")||i.maxRatio,t?(S=u.$slideEl[0].offsetWidth,$=u.$slideEl[0].offsetHeight,l=u.$slideEl.offset().left+a.scrollX,o=u.$slideEl.offset().top+a.scrollY,p=l+S/2-n,h=o+$/2-r,v=u.$imageEl[0].offsetWidth,w=u.$imageEl[0].offsetHeight,b=v*s.scale,E=w*s.scale,C=Math.min(S/2-b/2,0),x=Math.min($/2-E/2,0),T=-C,y=-x,f=p*s.scale,g=h*s.scale,f<C&&(f=C),f>T&&(f=T),g<x&&(g=x),g>y&&(g=y)):(f=0,g=0),u.$imageWrapEl.transition(300).transform(`translate3d(${f}px, ${g}px,0)`),u.$imageEl.transition(300).transform(`translate3d(0,0,0) scale(${s.scale})`)}function y(){const t=e.zoom,s=e.params.zoom;u.$slideEl||(e.params.virtual&&e.params.virtual.enabled&&e.virtual?u.$slideEl=e.$wrapperEl.children(`.${e.params.slideActiveClass}`):u.$slideEl=e.slides.eq(e.activeIndex),u.$imageEl=u.$slideEl.find(`.${s.containerClass}`).eq(0).find("img, svg, canvas, picture, .swiper-zoom-target"),u.$imageWrapEl=u.$imageEl.parent(`.${s.containerClass}`)),u.$imageEl&&0!==u.$imageEl.length&&u.$imageWrapEl&&0!==u.$imageWrapEl.length&&(e.params.cssMode&&(e.wrapperEl.style.overflow="",e.wrapperEl.style.touchAction=""),t.scale=1,c=1,u.$imageWrapEl.transition(300).transform("translate3d(0,0,0)"),u.$imageEl.transition(300).transform("translate3d(0,0,0) scale(1)"),u.$slideEl.removeClass(`${s.zoomedSlideClass}`),u.$slideEl=void 0)}function S(t){const s=e.zoom;s.scale&&1!==s.scale?y():T(t)}function $(){const t=e.support;return{passiveListener:!("touchstart"!==e.touchEvents.start||!t.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1},activeListenerWithCapture:!t.passiveListener||{passive:!1,capture:!0}}}function M(){return`.${e.params.slideClass}`}function P(t){const{passiveListener:s}=$(),i=M();e.$wrapperEl[t]("gesturestart",i,w,s),e.$wrapperEl[t]("gesturechange",i,b,s),e.$wrapperEl[t]("gestureend",i,E,s)}function k(){r||(r=!0,P("on"))}function z(){r&&(r=!1,P("off"))}function O(){const t=e.zoom;if(t.enabled)return;t.enabled=!0;const s=e.support,{passiveListener:i,activeListenerWithCapture:a}=$(),n=M();s.gestures?(e.$wrapperEl.on(e.touchEvents.start,k,i),e.$wrapperEl.on(e.touchEvents.end,z,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.on(e.touchEvents.start,n,w,i),e.$wrapperEl.on(e.touchEvents.move,n,b,a),e.$wrapperEl.on(e.touchEvents.end,n,E,i),e.touchEvents.cancel&&e.$wrapperEl.on(e.touchEvents.cancel,n,E,i)),e.$wrapperEl.on(e.touchEvents.move,`.${e.params.zoom.containerClass}`,C,a)}function L(){const t=e.zoom;if(!t.enabled)return;const s=e.support;t.enabled=!1;const{passiveListener:i,activeListenerWithCapture:a}=$(),n=M();s.gestures?(e.$wrapperEl.off(e.touchEvents.start,k,i),e.$wrapperEl.off(e.touchEvents.end,z,i)):"touchstart"===e.touchEvents.start&&(e.$wrapperEl.off(e.touchEvents.start,n,w,i),e.$wrapperEl.off(e.touchEvents.move,n,b,a),e.$wrapperEl.off(e.touchEvents.end,n,E,i),e.touchEvents.cancel&&e.$wrapperEl.off(e.touchEvents.cancel,n,E,i)),e.$wrapperEl.off(e.touchEvents.move,`.${e.params.zoom.containerClass}`,C,a)}Object.defineProperty(e.zoom,"scale",{get:()=>g,set(e){if(g!==e){const t=u.$imageEl?u.$imageEl[0]:void 0,s=u.$slideEl?u.$slideEl[0]:void 0;i("zoomChange",e,t,s)}g=e}}),s("init",(()=>{e.params.zoom.enabled&&O()})),s("destroy",(()=>{L()})),s("touchStart",((t,s)=>{e.zoom.enabled&&function(t){const s=e.device;u.$imageEl&&0!==u.$imageEl.length&&(m.isTouched||(s.android&&t.cancelable&&t.preventDefault(),m.isTouched=!0,m.touchesStart.x="touchstart"===t.type?t.targetTouches[0].pageX:t.pageX,m.touchesStart.y="touchstart"===t.type?t.targetTouches[0].pageY:t.pageY))}(s)})),s("touchEnd",((t,s)=>{e.zoom.enabled&&function(){const t=e.zoom;if(!u.$imageEl||0===u.$imageEl.length)return;if(!m.isTouched||!m.isMoved)return m.isTouched=!1,void(m.isMoved=!1);m.isTouched=!1,m.isMoved=!1;let s=300,i=300;const a=f.x*s,n=m.currentX+a,r=f.y*i,l=m.currentY+r;0!==f.x&&(s=Math.abs((n-m.currentX)/f.x)),0!==f.y&&(i=Math.abs((l-m.currentY)/f.y));const o=Math.max(s,i);m.currentX=n,m.currentY=l;const d=m.width*t.scale,c=m.height*t.scale;m.minX=Math.min(u.slideWidth/2-d/2,0),m.maxX=-m.minX,m.minY=Math.min(u.slideHeight/2-c/2,0),m.maxY=-m.minY,m.currentX=Math.max(Math.min(m.currentX,m.maxX),m.minX),m.currentY=Math.max(Math.min(m.currentY,m.maxY),m.minY),u.$imageWrapEl.transition(o).transform(`translate3d(${m.currentX}px, ${m.currentY}px,0)`)}()})),s("doubleTap",((t,s)=>{!e.animating&&e.params.zoom.enabled&&e.zoom.enabled&&e.params.zoom.toggle&&S(s)})),s("transitionEnd",(()=>{e.zoom.enabled&&e.params.zoom.enabled&&x()})),s("slideChange",(()=>{e.zoom.enabled&&e.params.zoom.enabled&&e.params.cssMode&&x()})),Object.assign(e.zoom,{enable:O,disable:L,in:T,out:y,toggle:S})},function({swiper:e,extendParams:t,on:s,emit:i}){t({lazy:{checkInView:!1,enabled:!1,loadPrevNext:!1,loadPrevNextAmount:1,loadOnTransitionStart:!1,scrollingElement:"",elementClass:"swiper-lazy",loadingClass:"swiper-lazy-loading",loadedClass:"swiper-lazy-loaded",preloaderClass:"swiper-lazy-preloader"}}),e.lazy={};let a=!1,r=!1;function l(t,s=!0){const a=e.params.lazy;if(void 0===t)return;if(0===e.slides.length)return;const n=e.virtual&&e.params.virtual.enabled?e.$wrapperEl.children(`.${e.params.slideClass}[data-swiper-slide-index="${t}"]`):e.slides.eq(t),r=n.find(`.${a.elementClass}:not(.${a.loadedClass}):not(.${a.loadingClass})`);!n.hasClass(a.elementClass)||n.hasClass(a.loadedClass)||n.hasClass(a.loadingClass)||r.push(n[0]),0!==r.length&&r.each((t=>{const r=d(t);r.addClass(a.loadingClass);const o=r.attr("data-background"),c=r.attr("data-src"),p=r.attr("data-srcset"),u=r.attr("data-sizes"),h=r.parent("picture");e.loadImage(r[0],c||o,p,u,!1,(()=>{if(null!=e&&e&&(!e||e.params)&&!e.destroyed){if(o?(r.css("background-image",`url("${o}")`),r.removeAttr("data-background")):(p&&(r.attr("srcset",p),r.removeAttr("data-srcset")),u&&(r.attr("sizes",u),r.removeAttr("data-sizes")),h.length&&h.children("source").each((e=>{const t=d(e);t.attr("data-srcset")&&(t.attr("srcset",t.attr("data-srcset")),t.removeAttr("data-srcset"))})),c&&(r.attr("src",c),r.removeAttr("data-src"))),r.addClass(a.loadedClass).removeClass(a.loadingClass),n.find(`.${a.preloaderClass}`).remove(),e.params.loop&&s){const t=n.attr("data-swiper-slide-index");if(n.hasClass(e.params.slideDuplicateClass)){l(e.$wrapperEl.children(`[data-swiper-slide-index="${t}"]:not(.${e.params.slideDuplicateClass})`).index(),!1)}else{l(e.$wrapperEl.children(`.${e.params.slideDuplicateClass}[data-swiper-slide-index="${t}"]`).index(),!1)}}i("lazyImageReady",n[0],r[0]),e.params.autoHeight&&e.updateAutoHeight()}})),i("lazyImageLoad",n[0],r[0])}))}function o(){const{$wrapperEl:t,params:s,slides:i,activeIndex:a}=e,n=e.virtual&&s.virtual.enabled,o=s.lazy;let c=s.slidesPerView;function p(e){if(n){if(t.children(`.${s.slideClass}[data-swiper-slide-index="${e}"]`).length)return!0}else if(i[e])return!0;return!1}function u(e){return n?d(e).attr("data-swiper-slide-index"):d(e).index()}if("auto"===c&&(c=0),r||(r=!0),e.params.watchSlidesProgress)t.children(`.${s.slideVisibleClass}`).each((e=>{l(n?d(e).attr("data-swiper-slide-index"):d(e).index())}));else if(c>1)for(let e=a;e<a+c;e+=1)p(e)&&l(e);else l(a);if(o.loadPrevNext)if(c>1||o.loadPrevNextAmount&&o.loadPrevNextAmount>1){const e=o.loadPrevNextAmount,t=c,s=Math.min(a+t+Math.max(e,t),i.length),n=Math.max(a-Math.max(t,e),0);for(let e=a+c;e<s;e+=1)p(e)&&l(e);for(let e=n;e<a;e+=1)p(e)&&l(e)}else{const e=t.children(`.${s.slideNextClass}`);e.length>0&&l(u(e));const i=t.children(`.${s.slidePrevClass}`);i.length>0&&l(u(i))}}function c(){const t=n();if(!e||e.destroyed)return;const s=e.params.lazy.scrollingElement?d(e.params.lazy.scrollingElement):d(t),i=s[0]===t,r=i?t.innerWidth:s[0].offsetWidth,l=i?t.innerHeight:s[0].offsetHeight,p=e.$el.offset(),{rtlTranslate:u}=e;let h=!1;u&&(p.left-=e.$el[0].scrollLeft);const m=[[p.left,p.top],[p.left+e.width,p.top],[p.left,p.top+e.height],[p.left+e.width,p.top+e.height]];for(let e=0;e<m.length;e+=1){const t=m[e];if(t[0]>=0&&t[0]<=r&&t[1]>=0&&t[1]<=l){if(0===t[0]&&0===t[1])continue;h=!0}}const f=!("touchstart"!==e.touchEvents.start||!e.support.passiveListener||!e.params.passiveListeners)&&{passive:!0,capture:!1};h?(o(),s.off("scroll",c,f)):a||(a=!0,s.on("scroll",c,f))}s("beforeInit",(()=>{e.params.lazy.enabled&&e.params.preloadImages&&(e.params.preloadImages=!1)})),s("init",(()=>{e.params.lazy.enabled&&(e.params.lazy.checkInView?c():o())})),s("scroll",(()=>{e.params.freeMode&&e.params.freeMode.enabled&&!e.params.freeMode.sticky&&o()})),s("scrollbarDragMove resize _freeModeNoMomentumRelease",(()=>{e.params.lazy.enabled&&(e.params.lazy.checkInView?c():o())})),s("transitionStart",(()=>{e.params.lazy.enabled&&(e.params.lazy.loadOnTransitionStart||!e.params.lazy.loadOnTransitionStart&&!r)&&(e.params.lazy.checkInView?c():o())})),s("transitionEnd",(()=>{e.params.lazy.enabled&&!e.params.lazy.loadOnTransitionStart&&(e.params.lazy.checkInView?c():o())})),s("slideChange",(()=>{const{lazy:t,cssMode:s,watchSlidesProgress:i,touchReleaseOnEdges:a,resistanceRatio:n}=e.params;t.enabled&&(s||i&&(a||0===n))&&o()})),Object.assign(e.lazy,{load:o,loadInSlide:l})},function({swiper:e,extendParams:t,on:s,emit:a}){let n;function r(){const t=e.slides.eq(e.activeIndex);let s=e.params.autoplay.delay;t.attr("data-swiper-autoplay")&&(s=t.attr("data-swiper-autoplay")||e.params.autoplay.delay),clearTimeout(n),n=p((()=>{let t;e.params.autoplay.reverseDirection?e.params.loop?(e.loopFix(),t=e.slidePrev(e.params.speed,!0,!0),a("autoplay")):e.isBeginning?e.params.autoplay.stopOnLastSlide?o():(t=e.slideTo(e.slides.length-1,e.params.speed,!0,!0),a("autoplay")):(t=e.slidePrev(e.params.speed,!0,!0),a("autoplay")):e.params.loop?(e.loopFix(),t=e.slideNext(e.params.speed,!0,!0),a("autoplay")):e.isEnd?e.params.autoplay.stopOnLastSlide?o():(t=e.slideTo(0,e.params.speed,!0,!0),a("autoplay")):(t=e.slideNext(e.params.speed,!0,!0),a("autoplay")),(e.params.cssMode&&e.autoplay.running||!1===t)&&r()}),s)}function l(){return void 0===n&&(!e.autoplay.running&&(e.autoplay.running=!0,a("autoplayStart"),r(),!0))}function o(){return!!e.autoplay.running&&(void 0!==n&&(n&&(clearTimeout(n),n=void 0),e.autoplay.running=!1,a("autoplayStop"),!0))}function d(t){e.autoplay.running&&(e.autoplay.paused||(n&&clearTimeout(n),e.autoplay.paused=!0,0!==t&&e.params.autoplay.waitForTransition?["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].addEventListener(t,u)})):(e.autoplay.paused=!1,r())))}function c(){const t=i();"hidden"===t.visibilityState&&e.autoplay.running&&d(),"visible"===t.visibilityState&&e.autoplay.paused&&(r(),e.autoplay.paused=!1)}function u(t){e&&!e.destroyed&&e.$wrapperEl&&t.target===e.$wrapperEl[0]&&(["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,u)})),e.autoplay.paused=!1,e.autoplay.running?r():o())}function h(){e.params.autoplay.disableOnInteraction?o():d(),["transitionend","webkitTransitionEnd"].forEach((t=>{e.$wrapperEl[0].removeEventListener(t,u)}))}function m(){e.params.autoplay.disableOnInteraction||(e.autoplay.paused=!1,r())}e.autoplay={running:!1,paused:!1},t({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}}),s("init",(()=>{if(e.params.autoplay.enabled){l();i().addEventListener("visibilitychange",c),e.params.autoplay.pauseOnMouseEnter&&(e.$el.on("mouseenter",h),e.$el.on("mouseleave",m))}})),s("beforeTransitionStart",((t,s,i)=>{e.autoplay.running&&(i||!e.params.autoplay.disableOnInteraction?e.autoplay.pause(s):o())})),s("sliderFirstMove",(()=>{e.autoplay.running&&(e.params.autoplay.disableOnInteraction?o():d())})),s("touchEnd",(()=>{e.params.cssMode&&e.autoplay.paused&&!e.params.autoplay.disableOnInteraction&&r()})),s("destroy",(()=>{e.$el.off("mouseenter",h),e.$el.off("mouseleave",m),e.autoplay.running&&o();i().removeEventListener("visibilitychange",c)})),Object.assign(e.autoplay,{pause:d,run:r,start:l,stop:o})},function({swiper:e,extendParams:t,on:s}){t({thumbs:{swiper:null,multipleActiveThumbs:!0,autoScrollOffset:0,slideThumbActiveClass:"swiper-slide-thumb-active",thumbsContainerClass:"swiper-thumbs"}});let i=!1,a=!1;function n(){const t=e.thumbs.swiper;if(!t)return;const s=t.clickedIndex,i=t.clickedSlide;if(i&&d(i).hasClass(e.params.thumbs.slideThumbActiveClass))return;if(null==s)return;let a;if(a=t.params.loop?parseInt(d(t.clickedSlide).attr("data-swiper-slide-index"),10):s,e.params.loop){let t=e.activeIndex;e.slides.eq(t).hasClass(e.params.slideDuplicateClass)&&(e.loopFix(),e._clientLeft=e.$wrapperEl[0].clientLeft,t=e.activeIndex);const s=e.slides.eq(t).prevAll(`[data-swiper-slide-index="${a}"]`).eq(0).index(),i=e.slides.eq(t).nextAll(`[data-swiper-slide-index="${a}"]`).eq(0).index();a=void 0===s?i:void 0===i?s:i-t<t-s?i:s}e.slideTo(a)}function r(){const{thumbs:t}=e.params;if(i)return!1;i=!0;const s=e.constructor;if(t.swiper instanceof s)e.thumbs.swiper=t.swiper,Object.assign(e.thumbs.swiper.originalParams,{watchSlidesProgress:!0,slideToClickedSlide:!1}),Object.assign(e.thumbs.swiper.params,{watchSlidesProgress:!0,slideToClickedSlide:!1});else if(m(t.swiper)){const i=Object.assign({},t.swiper);Object.assign(i,{watchSlidesProgress:!0,slideToClickedSlide:!1}),e.thumbs.swiper=new s(i),a=!0}return e.thumbs.swiper.$el.addClass(e.params.thumbs.thumbsContainerClass),e.thumbs.swiper.on("tap",n),!0}function l(t){const s=e.thumbs.swiper;if(!s)return;const i="auto"===s.params.slidesPerView?s.slidesPerViewDynamic():s.params.slidesPerView,a=e.params.thumbs.autoScrollOffset,n=a&&!s.params.loop;if(e.realIndex!==s.realIndex||n){let r,l,o=s.activeIndex;if(s.params.loop){s.slides.eq(o).hasClass(s.params.slideDuplicateClass)&&(s.loopFix(),s._clientLeft=s.$wrapperEl[0].clientLeft,o=s.activeIndex);const t=s.slides.eq(o).prevAll(`[data-swiper-slide-index="${e.realIndex}"]`).eq(0).index(),i=s.slides.eq(o).nextAll(`[data-swiper-slide-index="${e.realIndex}"]`).eq(0).index();r=void 0===t?i:void 0===i?t:i-o==o-t?s.params.slidesPerGroup>1?i:o:i-o<o-t?i:t,l=e.activeIndex>e.previousIndex?"next":"prev"}else r=e.realIndex,l=r>e.previousIndex?"next":"prev";n&&(r+="next"===l?a:-1*a),s.visibleSlidesIndexes&&s.visibleSlidesIndexes.indexOf(r)<0&&(s.params.centeredSlides?r=r>o?r-Math.floor(i/2)+1:r+Math.floor(i/2)-1:r>o&&s.params.slidesPerGroup,s.slideTo(r,t?0:void 0))}let r=1;const l=e.params.thumbs.slideThumbActiveClass;if(e.params.slidesPerView>1&&!e.params.centeredSlides&&(r=e.params.slidesPerView),e.params.thumbs.multipleActiveThumbs||(r=1),r=Math.floor(r),s.slides.removeClass(l),s.params.loop||s.params.virtual&&s.params.virtual.enabled)for(let t=0;t<r;t+=1)s.$wrapperEl.children(`[data-swiper-slide-index="${e.realIndex+t}"]`).addClass(l);else for(let t=0;t<r;t+=1)s.slides.eq(e.realIndex+t).addClass(l)}e.thumbs={swiper:null},s("beforeInit",(()=>{const{thumbs:t}=e.params;t&&t.swiper&&(r(),l(!0))})),s("slideChange update resize observerUpdate",(()=>{e.thumbs.swiper&&l()})),s("setTransition",((t,s)=>{const i=e.thumbs.swiper;i&&i.setTransition(s)})),s("beforeDestroy",(()=>{const t=e.thumbs.swiper;t&&a&&t&&t.destroy()})),Object.assign(e.thumbs,{init:r,update:l})},function({swiper:e}){Object.assign(e,{appendSlide:j.bind(e),prependSlide:H.bind(e),addSlide:F.bind(e),removeSlide:V.bind(e),removeAllSlides:q.bind(e)})},function({swiper:e,extendParams:t,on:s}){t({fadeEffect:{crossFade:!1,transformEl:null}}),function(e){const{effect:t,swiper:s,on:i,setTranslate:a,setTransition:n,overwriteParams:r,perspective:l}=e;i("beforeInit",(()=>{if(s.params.effect!==t)return;s.classNames.push(`${s.params.containerModifierClass}${t}`),l&&l()&&s.classNames.push(`${s.params.containerModifierClass}3d`);const e=r?r():{};Object.assign(s.params,e),Object.assign(s.originalParams,e)})),i("setTranslate",(()=>{s.params.effect===t&&a()})),i("setTransition",((e,i)=>{s.params.effect===t&&n(i)}))}({effect:"fade",swiper:e,on:s,setTranslate:()=>{const{slides:t}=e,s=e.params.fadeEffect;for(let i=0;i<t.length;i+=1){const t=e.slides.eq(i);let a=-t[0].swiperSlideOffset;e.params.virtualTranslate||(a-=e.translate);let n=0;e.isHorizontal()||(n=a,a=0);const r=e.params.fadeEffect.crossFade?Math.max(1-Math.abs(t[0].progress),0):1+Math.min(Math.max(t[0].progress,-1),0);R(s,t).css({opacity:r}).transform(`translate3d(${a}px, ${n}px, 0px)`)}},setTransition:t=>{const{transformEl:s}=e.params.fadeEffect;(s?e.slides.find(s):e.slides).transition(t),function({swiper:e,duration:t,transformEl:s,allSlides:i}){const{slides:a,activeIndex:n,$wrapperEl:r}=e;if(e.params.virtualTranslate&&0!==t){let t,l=!1;t=i?s?a.find(s):a:s?a.eq(n).find(s):a.eq(n),t.transitionEnd((()=>{if(l)return;if(!e||e.destroyed)return;l=!0,e.animating=!1;const t=["webkitTransitionEnd","transitionend"];for(let e=0;e<t.length;e+=1)r.trigger(t[e])}))}}({swiper:e,duration:t,transformEl:s,allSlides:!0})},overwriteParams:()=>({slidesPerView:1,slidesPerGroup:1,watchSlidesProgress:!0,spaceBetween:0,virtualTranslate:!e.params.cssMode})})}];return B.use(U),B}));
-//# sourceMappingURL=swiper-bundle.min.js.map
\ No newline at end of file diff --git a/html/assets/js/wNumb.min.js b/html/assets/js/wNumb.min.js deleted file mode 100644 index bb8f177..0000000 --- a/html/assets/js/wNumb.min.js +++ /dev/null @@ -1 +0,0 @@ -!function(e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():window.wNumb=e()}(function(){"use strict";var o=["decimals","thousand","mark","prefix","suffix","encoder","decoder","negativeBefore","negative","edit","undo"];function w(e){return e.split("").reverse().join("")}function h(e,t){return e.substring(0,t.length)===t}function f(e,t,n){if((e[t]||e[n])&&e[t]===e[n])throw new Error(t)}function x(e){return"number"==typeof e&&isFinite(e)}function n(e,t,n,r,i,o,f,u,s,c,a,p){var d,l,h,g=p,v="",m="";return o&&(p=o(p)),!!x(p)&&(!1!==e&&0===parseFloat(p.toFixed(e))&&(p=0),p<0&&(d=!0,p=Math.abs(p)),!1!==e&&(p=function(e,t){return e=e.toString().split("e"),(+((e=(e=Math.round(+(e[0]+"e"+(e[1]?+e[1]+t:t)))).toString().split("e"))[0]+"e"+(e[1]?e[1]-t:-t))).toFixed(t)}(p,e)),-1!==(p=p.toString()).indexOf(".")?(h=(l=p.split("."))[0],n&&(v=n+l[1])):h=p,t&&(h=w((h=w(h).match(/.{1,3}/g)).join(w(t)))),d&&u&&(m+=u),r&&(m+=r),d&&s&&(m+=s),m+=h,m+=v,i&&(m+=i),c&&(m=c(m,g)),m)}function r(e,t,n,r,i,o,f,u,s,c,a,p){var d,l="";return a&&(p=a(p)),!(!p||"string"!=typeof p)&&(u&&h(p,u)&&(p=p.replace(u,""),d=!0),r&&h(p,r)&&(p=p.replace(r,"")),s&&h(p,s)&&(p=p.replace(s,""),d=!0),i&&function(e,t){return e.slice(-1*t.length)===t}(p,i)&&(p=p.slice(0,-1*i.length)),t&&(p=p.split(t).join("")),n&&(p=p.replace(n,".")),d&&(l+="-"),""!==(l=(l+=p).replace(/[^0-9\.\-.]/g,""))&&(l=Number(l),f&&(l=f(l)),!!x(l)&&l))}function i(e,t,n){var r,i=[];for(r=0;r<o.length;r+=1)i.push(e[o[r]]);return i.push(n),t.apply("",i)}return function e(t){if(!(this instanceof e))return new e(t);"object"==typeof t&&(t=function(e){var t,n,r,i={};for(void 0===e.suffix&&(e.suffix=e.postfix),t=0;t<o.length;t+=1)if(void 0===(r=e[n=o[t]]))"negative"!==n||i.negativeBefore?"mark"===n&&"."!==i.thousand?i[n]=".":i[n]=!1:i[n]="-";else if("decimals"===n){if(!(0<=r&&r<8))throw new Error(n);i[n]=r}else if("encoder"===n||"decoder"===n||"edit"===n||"undo"===n){if("function"!=typeof r)throw new Error(n);i[n]=r}else{if("string"!=typeof r)throw new Error(n);i[n]=r}return f(i,"mark","thousand"),f(i,"prefix","negative"),f(i,"prefix","negativeBefore"),i}(t),this.to=function(e){return i(t,n,e)},this.from=function(e){return i(t,r,e)})}});
\ No newline at end of file diff --git a/html/assets/js/wiki.js b/html/assets/js/wiki.js new file mode 100644 index 0000000..b1947f8 --- /dev/null +++ b/html/assets/js/wiki.js @@ -0,0 +1,27 @@ +$(document).ready(function() { + + + /** Categories Menu Toggler + * ------------------------------------------------------------------------- + */ + $('.toggler').click(function(e) { + e.preventDefault(); + + // inner div (contains children of this category) + var inner = $(this).parent().parent().find("ul.inner").first(); + + // toggle 'show' class on/off + if (inner.hasClass('show')) { + inner.removeClass('show'); + inner.slideUp(350); + $(this).html("+"); + } else { + inner.addClass('show'); + inner.slideDown(350); + $(this).html("–"); + } + }); + + + +}); |
