diff --git a/i18n/id/about.html b/i18n/id/about.html new file mode 100644 index 0000000..d146d1b --- /dev/null +++ b/i18n/id/about.html @@ -0,0 +1,24 @@ +

Ini adalah alat yang mempermudah penggunaan ulang gambar dari Wikipedia dan arsip media bebas pakai dari Wikimedia Commons.

+

Harap diperhatikan: Versi bahasa Indonesia dari Generator Atribusi saat ini didasarkan pada terjemahan yang hampir sama persis dari potongan teks bahasa Inggris awal, yang disusun dengan mempertimbangkan hak cipta Jerman. Khususnya bagian yang menjelaskan konsep-konsep hukum yang mungkin dengan situasi hukum hak cipta di negara lain.

+

Dalam banyak kasus, gambar di Wikipedia dan media bebas pakai Wikimedia Commons dilindungi oleh hak cipta. Namun sebagian besar telah diliris di bawah lisensi bebas oleh pemegang haknya, terutama di bawah lisensi Creative Commons. Beberapa bahkan bebas dari hak apapun, dalam domain publik. Lisensi bebas memfasilitasi penggunaan ulang yang mudah selama persyaratan lisensi masing-masing dihormati. Izin tambahan dari pemegang hak cipta tidak diperlukan. Alat ini dirancang untuk membantu mematuhi persyaratan lisensi dan menyederhakan penggunaan konten berlisensi bebas. Alat ini secara otomatis mengumpulkan semua informasi lisensi yang relevan ke dalam apa yang disebut pemberitahuan lisensi yang harus dipublikasikan atau ditampilkan sedekat mungkin dengan gambar (tergantung pada jenis publikasi, pemberitahuan lisensi juga dapat ditempatkan pada posisi umum lainnya, semisal di dalam kredit akhir video). Alat ini akan memandu Anda memalui dialog singkat dan mengumpulkan semua informasi yang relevan untuk menghasilkan pemberitahuan lisensi yang tepat untuk kasus penggunaan Anda. Setelah menjawab beberapa pertanyaan, Anda dapat dengan cepat dan mudah menyalin pemberitahuan lisensi dalam berbagai format dan menempelkannya ke dalam publikasi Anda. Saat ini, alat ini mencakup penggunaan ulang dalam karya digital dan karya cetak, sebagai bentuk penggunaan yang sering dilakukan. Penggunaan lain (semisal pameran, siaran, pertunjukan langsung) masih belum dipertimbangkan untuk saat ini

+

Kami mengucapkan terima kasih kepada Dr. Till Jaeger, pengacara speliasis hak cipta dan hukum media (JBB Rechtsanwälte di Berlin) atas dukungannya yang luar biasa

+

Lisensi apa saja yang didukung?

+

Alat ini mendukung gambar dari Wikipedia dan media bebas pakai Wikimedia Commons yang dirilis di bawah lisensi Creative Commons. Lisensi berikut ini, termasuk versi portingnya, didukung:

+ +

Alat ini didesain untuk memfasilitasi penggunaan ulang gambar tertentu yang dilindungi hak cipta secara patuh. Namun demikian, alat ini tidak akan pernah bisa mencakup semua kasus penggunaan dan karakteristik, dan karenanya tidak dapat menggantikan nasihat hukum yang berkualitas dari seorang pengacara.

diff --git a/i18n/id/feedback.html b/i18n/id/feedback.html new file mode 100644 index 0000000..85f6068 --- /dev/null +++ b/i18n/id/feedback.html @@ -0,0 +1,3 @@ +

Saya menemukan bug!

+

Harap beri tahu kami jika ada sesuatu yang tidak bekerja sebagaimana mestinya atau dapat diperbaiki

+

Semua jenis umpan balik akan diterima dengan senang hati.

diff --git a/i18n/id/i18n.json b/i18n/id/i18n.json new file mode 100644 index 0000000..c2edf5f --- /dev/null +++ b/i18n/id/i18n.json @@ -0,0 +1,123 @@ +{ + "index": { + "title": "Generator Atribusi", + "description": "Informasi lisensi untuk gambar dari Wikipedia dan Wikimedia Commons", + "no-script": "Javascript harus diaktifkan untuk menggunakan halaman ini.", + "how-it-works-1": "Masukkan alamat dari gambar Wikimedia Commons atau artikel Wikipedia untuk memulai alat ini.", + "how-it-works-2": "Jawab pertanyaan tentang penggunaan yang dimaksudkan untuk membuat pemberitahuan lisensi yang bener.", + "how-it-works-3": "Baca cara menggunakan pemberitahuan lisensi.", + "how-it-works-4": "Salin pemberitahuan lisensi yang dihasilkan dan masukkan ke dalam publikasi Anda untuk menggunakan gambar dengan benar.", + "how-it-works": "Bagaimana cara kerjanya?", + "input-placeholder": "Alamat web dari gambar Wikimedia Commons atau artikel Wikipedia.", + "go-button": "Ayo!", + "feedback-name": "Nama", + "feedback-response-email": "Alamat surel", + "feedback-body": "Umpan balik", + "feedback-submit": "Kirim", + "feedback-thanks": "Terima kasih atas umpan balik Anda!", + "feedback": "Umpan balik", + "about": "Tentang", + "legal": "Kebijakan Jejak dan Privasi", + "legal-tracking-switch": "Hapus centang untuk berhenti melacak kunjungan Anda.", + "legal-hosting": "Alat ini dihosting di Wikimedia Labs. Baca ketentuan penggunaan di https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Penggunaan pribadi murni (tanpa publikasi) dan pengecualian serta batasan hak cipta lainnya" + }, + "error": { + "generic": "Terjadi kesalahan yang tidak terduga. Maaf", + "mediatype-unsupported": "Sayangnya, jenis media ini tidak didukung oleh alat ini saat ini. Maaf.", + "licence-unsupported": "Sayangnya, jenis lisensi yang terdeteksi tidak didukung oleh alat alat saat ini. Maaf.", + "url-invalid": "Alamat situs yang Anda berikan tidak dapat diproses. Maaf", + "licence-not-recognized": "Sayangnya, format informasi lisensi yang disimpan untuk gambar ini tidak didukung oleh alat ini saat ini. Maaf.", + "send-feedback": "Ada Sesuatu yang tidak berfungsi. Silakan coba lagi.", + "feedback-generic": "Ada Sesuatu yang tidak berfungsi. Silakan coba lagi.", + "feedback-blank-fields": "Harap isi semua kolom pada formulir umpan balik.", + "no-images-found": "Artikel Wikipedia ini tidak mengandung gambar apa pun.", + "no-wiki-url": "Pada saat ini, Generator Atribusi hanya dapat gambar dari Wikipedia dan Wikimedia Commons.", + "invalid-email-format": "Alamat surel yang diberikan tidak sesuai dengan format yang valid.", + "no-cc-licence": "File ini tidak dilisensikan di bawah Creative Commons." + }, + "info-box": { + "private-use": "Untuk sebagian besar penggunaan yang murni pribadi, Anda tidak memerlukan pemberitahuan lisensi.", + "private-use-more-link": "→ PELAJARI LEBIH LANJUT.", + "dont-show-again": "Jangan tampilkan pesan ini lagi.", + "understood-and-close": "Mengerti dan tutup.", + "ported-licence": "Lisensi Creative Commons tertentu diterbikan dengan edisi khusus untuk negara tertentu, yang disebut “ported licenses”. Gambar yang Anda minta pemberitahuan lisensinya, diterbikan dengan lisensi porting tersebut. Alat ini tidak bisa memeriksa apakah persyaratan lisensi dari lisensi Creative Commons khusus negara ini sama dengan versi dalam bahasa Indonesia. Namun, Anda masih dapat membuat lisensi dengan alat ini. Untuk memastikannya, kami sarankan untuk memeriksa persyaratan lisensi versi khusus negara ini. Selain itu, pemberitahuan lisensi harus dalam bahasa yang sesuai dengan konteksnya agar dapat memenuhi fungsinya sepenuhnya." + }, + "dialogue": { + "public-domain-picture": "Gambar ini setelah diunggah, dinyatakan sebagai domain publik, jadi Anda tidak memerlukan pemberitahuan lisensi untuk gambar ini.", + "no-attribution-needed": "Tidak perlu pemberitahuan lisensi", + "more-information": "informasi lebih lanjut", + "adjust-attribution-for-usage": "Menyesuaikan pemberitahuan lisensi dengan kasus penggunaan", + "adjust-legal-notice-for-usage": "Menyesuaikan pemberitahuan hukum dengna kasus penggunaan", + "public-domain-text": "

Menurut rincian yang terdeteksi, gambar ini bebas dari hak cipta dan dapat digunakan tanpa persyaratan lisensi apapun, bahkan tanpa menyebutkan pengarang atau lisensinya.

Namun demikian, menurut hukum hak cipta Jerman, seorang pengarang selalu memiliki beberapa hak yang tidak dapat dibatalkan untuk setiap karya. Oleh karena itu, kami menyarankan untuk tidak mengklaim kepengarangan gambar secara salah atau menggunakan gambar dengan cara yang dianggap berbahaya bagi reputasi pengarang. Selain itu, disarankan untuk memberi tahu pengguna lain tentang status domain publik gambar ini.

Di beberapa negara (termasuk Jerman), secara terartur ada klaim untuk perlindungan reproduksi fotografi karya dalam domain publik. Hal ini berlaku untuk foto patung dan karya tiga dimensi lainnya, serta foto lukisan. Adalah tanggung jawab pengguna untuk mengklarifikasi apakah mereka terpengaruh saat menggunakan gambar yang bersangkutan./p>", + "force-pd-attribution": "Tetap buat pemberitahuan hak", + "type-of-use-headline": "Bagaimana Anda ingin menggunakan gambar tersebut?", + "author-headline": "Siapa nama (atau nama-nama) penulis atau pemegang hak cipta?", + "compilation-headline": "Bagaimana Anda ingin mempublikasikan gambar?", + "editing-headline": "Apakah Anda ingin menggunakan gambar dalam bentuk yang sudah dimodifikasi?", + "change-headline": "Apa yang Anda modifikasi?", + "change-pd-headline": "Bagian mana dari gambar yang akan dimodifikasi?", + "creator-headline": "Bagaimana Anda ingin modifikasi Anda dikaitkan dengan diri Anda sendiri?", + "licence-headline": "Di bawah lisensi mana Anda ingin mempublikasikan gambar yang telah dimodifikasi?", + "done-headline": "Selamat!", + "answer-print": "Dalam kontes, di mana Anda tidak dapat menggunakan tautan (misalnya produk cetak, kumpulan slide).", + "answer-online": "Daring.", + "author-label": "Harap isi informasi dan sebutkan juga setiap atribusi kepada pihak lain (seperti “disponsori oleh X” atau “diterbitkan oleh Y”) jika ada:", + "next": "Selanjutkan", + "answer-no-author": "Tidak ada informasi yang tersedia mengenai hal ini.", + "answer-compilation": "Dikombinasikan dengan karya-karya lain.", + "answer-no-compilation": "Dengan dirinya sendiri.", + "answer-edited": "Iya.", + "answer-not-edited": "Tidak, saya ingin menggunakan gambar dalam bentuk aslinya yang belum dimodifikasi.", + "author-question-mark": "Ini untuk nama yang diatribusikan atau nama samaran dari penulis atau pemegang hak. Informasi harus dinyatakan persis seperti yang ditentukan di sumbernya, termasuk © dan/atau tahun.", + "change-question-mark": "Info singkat seperti “kutipan” atau “warna” sudah cukup memadai.", + "compilation-question-mark": "Silakan pilih opsi ini jika menurut Anda, publikasi gambar Anda bersama dengan karya lain (karena pemilihan dan pengaturannya) sebagai koleksi merupakan suatu ciptaan intelektual tersendiri, yaitu, koleksi tersebut, karena keasliannya, merupakan suatu ciptaan di luar karya-karya yang terdapat di dalamnya. Misalnya, hal ini dapat terjadi jika Anda membuat buku foto atau koleksi foto terbaik dari gambar-gambar tertentu. Situasinya berbeda jika Anda membuat remix, seperti kolase beberapa gambar, yang pada umumnya tidak akan menghasilkan koleksi, tetapi merupakan adaptasi gambar yang digunakan untuk itu.", + "editing-question-mark": "Semua perubahan pada gambar yang mengubah kesan pada penikmatnya (seperti pemotongan, pewarnaan, pengubahan ukuran secara drastis, dll.) membuat hasilnya merupakan adaptasi dalam pengertian hukum. Sebaliknya, mengubah format file gambar atau mendigitalkannya, tidak menghasilkan adaptasi, karena gambar dan kesan yang diberikannya tetap sama.", + "licence-question-mark": "Alat ini hanya menawarkan lisensi yang kompatibel dengan lisensi Creative Commons yang dilampirkan pada karya asli.", + "creator-question-mark": "Mohon sebutkan nama lengkap Anda, jika memungkinkan. Nama samaran, nama panggilan, atau “anonim” juga dapat digunakan.", + "same-licence": "Lisensi yang sama dengan karya aslinya.", + "licence-text": "Teks lisensi", + "download-image-link": "Unduh gambar", + "file-page-link": "Alamat web gambar di Wikimedia Commons", + "done": "Selesai", + "typeOfUse": "Jenis penggunaan", + "author": "Penulis", + "compilation": "Koleksi", + "editing": "Adaptasi", + "change": "Perubahan", + "creator": "Pencipta", + "licence": "Lisensi", + "back-to-top": "Periksa gambar lain", + "force-pd-attribution": "Tetap buat pemberitahuan hukum", + "pd-attribution-hint": "ditandai sebagai domain publik", + "check-details": "detail lebih lanjut tentang", + "here": "disini", + "mark-as-pd": "ditandai sebagai domain publik" + }, + "evaluation": { + "by": "oleh", + "edited": "dimodifikasi", + "done-text": "Anda telah menjawab semua pertanyaan. Anda siap untuk menggunakan pemberitahuan lisensi yang benar.", + "done-text-legal-notice": "Anda telah menjawab semua pertanyaan. Anda siap untuk menggunakan pemberitahuan hukum yang benar.", + "your-attribution": "Pemberitahuan lisensi Anda", + "your-legal-notice": "Pemberitahuan hukum Anda", + "copy": "salin", + "do-print-text": "Anda harus menunjukkan informasi ini sedekat mungkin dengan gambar (misalnya, tepat di bawahnya). Bagaimanapun, pemirsa harus dapat menemukan informasi tersebut dengan mudah. Jika Anda memiliki buku atau majalah, atribusi juga dapat ditempatkan di dalam cetakan atau di lokasi standar lainnya, selama orang dapat dengan mudah mengidentifikasi gambar yang menjadi milik setiap informasi atribusi (misalnya, dengan memberikan nomor halaman).", + "do-online-text": "Harap diperhatikan, bahwa pemberitahuan lisensi mencakup tautan, yang harus disertakan di mana pun Anda menggunakan pemberitahuan lisensi. Anda harus menampilkan informasi ini sedekat mungkin dengan gambar (misalnya, tepat di bawahnya). Bagaimanapun juga, pemirsa harus dapat menemukan informasi tersebut dengan mudah. Untuk memudahkan Anda, alat ini menyediakan atribusi termasuk semua tautan dalam format teks biasa dan sebagai cuplikan html. Dengan cara ini, Anda dapat mentransfernya langsung ke dalam kode sumber halaman web Anda.", + "do-compilation-text": "Jika pemegang lisensi meminta Anda untuk tidak mempublikasikan nama mereka, judul karya atau informasi lainnya, sebutkan tautan lisensinya saja. Alat ini menyediakannya dengan tombol di bawah ini. Penulis/pemegang hak dimaksudkan untuk dapat memutuskan sendiri, apakah nama mereka atau judul gambar dipublikasikan atau tidak jika gambar tersebut merupakan bagian dari koleksi yang tidak ingin mereka kaitkan.", + "dont-terms-of-use-headline": "Jangan memaksakan kondisi lebih lanjut", + "dont-terms-of-use-text": "Anda tidak diizinkan untuk memaksakan ketentuan lebih lanjut mengenai gambar, yang dapat membatasi hak yang diberikan melalui lisensi Creative Commons (misalnya, tidak melarang distribusi konten halaman web tertentu, selama gambar berlisensi CC tidak secara eksplisit dikecualikan dari larangan ini).", + "dont-sublicences-headline": "Tidak diperbolehkan melakukan sublisensi", + "dont-sublicences-text": "Anda tidak diizinkan untuk mensublisensikan karya tersebut. Itu berarti, bahwa Anda tidak diizinkan untuk menyatakan diri Anda sebagai pemberi lisensi. Hanya jika Anda memodifikasi gambar tersebut, Anda dapat menjadi pemberi lisensi (dan hanya terbatas pada modifikasi Anda, bukan pada gambar aslinya). Orang lain yang nantinya akan menerima foto tersebut dari Anda, menerima penawaran lisensi Creative Commons langsung dari pemberi lisensi gambar asli dan bukan dari Anda sebagai pengirim.", + "dont-cc-licence-headline": "Pemberitahuan hukum yang berlaku", + "dont-cc-licence-text": "Jika Anda menemukan pemberitahuan lisensi Creative Commons atau batasan tanggung jawab, Anda tidak diizinkan untuk mengubahnya.", + "dont-technical-protection-headline": "Jangan menerapkan upaya perlindungan teknis apa pun", + "dont-technical-protection-text": "Anda tidak diizinkan untuk memaksakan tindakan perlindungan teknis apa pun terkait gambar, yang dapat membatasi hak-hak yang berasal dari lisensi Creative Commons (misalnya, mekanisme perlindungan penggandaan yang membatasi pencetakan file PDF).", + "dont-rightholder-connection-headline": "Tidak ada koneksi khusus ke pemegang hak", + "dont-rightholder-connection-text": "Anda tidak diperkenankan untuk menggunakan gambar dengan cara yang dapat dianggap mengindikasikan bahwa pemegang hak atau pihak-pihak atribusi yang disebutkan memberikan hak kepada Anda dalam suatu transaksi individual atau mendukung penggunaan gambar secara spesifik oleh Anda.", + "show-licence-text": "Lihat teks lisensi selengkapnya", + "show-cc-zero-text": "Lihat teks lengkap dari pernyataan rilis", + "anonymous": "anonim", + "copy-hint": "Salin teks yang ditandai" + } +} diff --git a/i18n/id/legal.html b/i18n/id/legal.html new file mode 100644 index 0000000..c2c9143 --- /dev/null +++ b/i18n/id/legal.html @@ -0,0 +1,25 @@ +

+ Wikimedia Deutschland – Gesellschaft zur Förderung Freien Wissens e. V. +
Tempelhofer Ufer 23/24 +
10963 Berlin +
E-Mail: info@wikimedia.de +
Situs web: https://wikimedia.de +
Telepon: +49 (0)30-577 11 62-0 +
Fax: +49 (0)30-577 11 62-99 +

+

+ Direktur Eksekutif: Dr. Christian Humborg +
Terdaftar dalam daftar asosiasi di pengadilan distrik Berlin-Charlottenburg, VR 23855. Penanggung jawab kontent sesuai dengan § 55 Abs. 2 RStV: Dr. Christian Humborg (Alamat lihat di atas). +

+

+ Kode sumber lengkap dari Generator Atribusi tersedia di bawah Lisensi Publik Umum GNU(GPL v3). Kode sumber tersedia di GitHub, dimana kode sumber dapat dilihat, diunduh, dimodifikasi, dan dipublikasikan ulang. Semua teks alat ini tersedia di bawah Creative Commons Attribution - ShareAlike 4.0 International license dan dapat digunakan kembali, dimodifikasi, dan dipublikasikan ulang dengan tunduk pada ketentuan-ketentuan dalam lisensi tersebut +

+

+ Kebijakan Privasi +

+

+ Di wikimedia.de Anda akan menemukan semua informasi tentang apa yang terjadi pada data pribadi Anda ketika Anda mengunjungi situs web ini atau situs web Wikimedia Deutschland lainnya. +

+ diff --git a/i18n/id/private-use.html b/i18n/id/private-use.html new file mode 100644 index 0000000..b0c1c21 --- /dev/null +++ b/i18n/id/private-use.html @@ -0,0 +1,13 @@ +

Alat bantu ini membantu Anda menghasilkan pemberitahuan lisensi yang benar untuk gambar berlisensi bebas. Pemberitahuan +lisensi tersebut diperlukan jika Anda ingin menerbitkan ulang atau menggunakan kembali gambar berlisensi bebas dengan +cara yang menurut undang-undang hak cipta memerlukan izin dari pemegang hak cipta. Publikasi dalam arti hukum terjadi +misalnya ketika memposting gambar di blog Anda atau di jejaring sosial serta menggunakan gambar dalam karya cetak yang +dimaksudkan untuk disebarluaskan kepada publik. Jika Anda berniat untuk menggunakan gambar dalam konteks yang murni +pribadi di antara keluarga dan teman-teman Anda, Anda tidak terikat oleh ketentuan apa pun yang diberlakukan oleh +persyaratan lisensi. Dengan demikian, pemberitahuan lisensi tidak diperlukan. Namun demikian, kami menyarankan untuk +tetap memberikan pemberitahuan lisensi karena akan sangat sulit bagi orang yang bukan pengacara untuk menilai +batas-batas penggunaan yang murni bersifat pribadi. Penggunaan pribadi, dalam arti yang umum, misalnya mengirimkan +gambar melalui email kepada teman Anda atau menggunakan gambar cetak untuk tujuan dekorasi di rumah Anda sendiri. +

+

Pengecualian hukum lebih lanjut terhadap persyaratan ketat untuk mendapatkan izin dari pemegang hak cipta berlaku untuk penggunaan kembali dalam lingkup publikasi ilmiah atau sebagai kutipan. Dalam kasus seperti itu, Anda bebas memilih apakah Anda hanya ingin mematuhi persyaratan hukum (misalnya persyaratan standar untuk menyebutkan sumber kutipan) atau dengan ketentuan lisensi Creative Commons.

diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..5550491 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2453 @@ +{ + "name": "attribution-generator", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "attribution-generator", + "version": "1.0.0", + "license": "GPL-3.0", + "dependencies": { + "bootstrap": "^3.3.5", + "clipboard": "^1.5.5", + "cookie": "^0.2.3", + "gsap": "^3.10.4", + "handlebars": "^4.0.3", + "jquery": "^3.0.0", + "justifiedGallery": "git+https://github.com/miromannino/Justified-Gallery.git#60d253d6963750db2507571612ae0c2d7c2f970d", + "node-polyglot": "^0.4.3", + "piwik": "^1.0.4", + "require-globify": "^1.3.0", + "scrollmagic": "^2.0.5", + "zeroclipboard": "^2.2.0" + }, + "devDependencies": { + "browserify": "^17.0.0", + "hbsfy": "^2.4.1", + "qunitjs": "^1.19.0", + "uglify-js": "^2.4.24", + "watchify": "^4.0.0" + } + }, + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "dependencies": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "node_modules/acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/align-text": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/align-text/-/align-text-0.1.4.tgz", + "integrity": "sha512-GrTZLRpmp6wIC2ztrWW9MjjTgSKccffgFagbNDOX95/dcjEcYZibYTeaOntySQLcdw1ztBoFkviiUvTMbb9MYg==", + "dev": true, + "dependencies": { + "kind-of": "^3.0.2", + "longest": "^1.0.1", + "repeat-string": "^1.5.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/asn1.js": { + "version": "4.10.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.10.1.tgz", + "integrity": "sha512-p32cOF5q0Zqs9uBiONKYLm6BClCoBCM5O9JfeUSlnQLBTxYdTK+pW+nXflm8UkKd2UYlEbYz5qEi0JuZR9ckSw==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/asn1.js/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/assert": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.1.tgz", + "integrity": "sha512-zzw1uCAgLbsKwBfFc8CX78DDg+xZeBksSO3vwVIDDN5i94eOrPsSSyiVhmsSABFDM/OcpE2aagCat9dnWQLG1A==", + "dev": true, + "dependencies": { + "object.assign": "^4.1.4", + "util": "^0.10.4" + } + }, + "node_modules/assert/node_modules/inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", + "dev": true + }, + "node_modules/assert/node_modules/util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "dependencies": { + "inherits": "2.0.3" + } + }, + "node_modules/available-typed-arrays": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.7.tgz", + "integrity": "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==", + "dev": true, + "dependencies": { + "possible-typed-array-names": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/binary-extensions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", + "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/bn.js": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.1.tgz", + "integrity": "sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==", + "dev": true + }, + "node_modules/bootstrap": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", + "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", + "engines": { + "node": ">=6" + } + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==", + "dev": true + }, + "node_modules/browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "dependencies": { + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "JSONStream": "^1.0.3", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + }, + "bin": { + "browser-pack": "bin/cmd.js" + } + }, + "node_modules/browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "dev": true, + "dependencies": { + "resolve": "^1.17.0" + } + }, + "node_modules/browserify": { + "version": "17.0.0", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-17.0.0.tgz", + "integrity": "sha512-SaHqzhku9v/j6XsQMRxPyBrSP3gnwmE27gLJYZgMT2GeK3J0+0toN+MnuNYDfHwVGQfLiMZ7KSNSIXHemy905w==", + "dev": true, + "dependencies": { + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^2.0.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.1", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^3.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.2.1", + "JSONStream": "^1.0.3", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.2.3", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "^1.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum-object": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^3.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.12.0", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "browserify": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "dependencies": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "dependencies": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "node_modules/browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/browserify-rsa": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", + "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", + "dev": true, + "dependencies": { + "bn.js": "^5.0.0", + "randombytes": "^2.0.1" + } + }, + "node_modules/browserify-sign": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.3.tgz", + "integrity": "sha512-JWCZW6SKhfhjJxO8Tyiiy+XYB7cqd2S5/+WeYHsKdNKFlCBhKbblba1A/HN/90YwtxKc8tCErjffZl++UNmGiw==", + "dev": true, + "dependencies": { + "bn.js": "^5.2.1", + "browserify-rsa": "^4.1.0", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.5", + "hash-base": "~3.0", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.7", + "readable-stream": "^2.3.8", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.12" + } + }, + "node_modules/browserify-transform-tools": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/browserify-transform-tools/-/browserify-transform-tools-1.7.0.tgz", + "integrity": "sha512-D4/vMGx4ILHI/+Qokdo2x7cxPJqy7uXt0zugOBbDvnCcrQL9/WrgK71GJgrNHF/L4XLErA4cMGlTVmc2sICRnA==", + "dependencies": { + "falafel": "^2.0.0", + "through": "^2.3.7" + } + }, + "node_modules/browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "dependencies": { + "pako": "~1.0.5" + } + }, + "node_modules/buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "dependencies": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==", + "dev": true + }, + "node_modules/builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==", + "dev": true + }, + "node_modules/cached-path-relative": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.1.0.tgz", + "integrity": "sha512-WF0LihfemtesFcJgO7xfOoOcnWzY/QHR4qeDqV44jPU3HTI54+LnfXK3SA27AVVGCdZFgjjFFaqUA9Jx7dMJZA==", + "dev": true + }, + "node_modules/call-bind": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", + "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "set-function-length": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/camelcase": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-1.2.1.tgz", + "integrity": "sha512-wzLkDa4K/mzI1OSITC+DUyjgIl/ETNHE9QvYgy6J6Jvqyyz4C0Xfd+lQhb19sX2jMpZV4IssUn0VDVmglV+s4g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/center-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/center-align/-/center-align-0.1.3.tgz", + "integrity": "sha512-Baz3aNe2gd2LP2qk5U+sDk/m4oSuwSDcBfayTCTBoWpfIGO5XFxPmjILQII4NGiZjD6DoDI6kf7gKaxkf7s3VQ==", + "dev": true, + "dependencies": { + "align-text": "^0.1.3", + "lazy-cache": "^1.0.3" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "node_modules/clipboard": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-1.7.1.tgz", + "integrity": "sha512-smkaRaIQsrnKN1F3wd1/vY9Q+DeR4L8ZCXKeHCFC2j8RZuSBbuImcLdnIO4GTxmzJxQuDGNKkyfpGoPW7Ua5bQ==", + "dependencies": { + "good-listener": "^1.2.2", + "select": "^1.1.2", + "tiny-emitter": "^2.0.0" + } + }, + "node_modules/cliui": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-2.1.0.tgz", + "integrity": "sha512-GIOYRizG+TGoc7Wgc1LiOTLare95R3mzKgoln+Q/lE4ceiYH19gUpl0l0Ffq4lJDEf3FxujMe6IBfOCs7pfqNA==", + "dev": true, + "dependencies": { + "center-align": "^0.1.1", + "right-align": "^0.1.1", + "wordwrap": "0.0.2" + } + }, + "node_modules/cliui/node_modules/wordwrap": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.2.tgz", + "integrity": "sha512-xSBsCeh+g+dinoBv3GAOWM4LcVVO68wLXRanibtBSdUvkGWQRGeE9P7IwU9EmDDi4jA6L44lz15CGMwdw9N5+Q==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha512-UlxQ9Vw0b/Bt/KYwCFqdEwsQ1eL8d1gibiFb7lxQJFdvTgc2hIZi6ugsg+kyhzhPV+QEpUiEIwInIAIrgoEkrg==", + "dev": true, + "dependencies": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "engines": [ + "node >= 0.8" + ], + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "node_modules/constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha512-Y8L5rp6jo+g9VEPgvqNfEopjTR4OTYct8lXlS8iVQdmnjDvbdbzYe9rjtFCB9egC86JoNCU61WRY+ScjkZpnIg==", + "dev": true + }, + "node_modules/cookie": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.2.4.tgz", + "integrity": "sha512-wQLxYCPiulwnfcvEZHF8YVj6cxvkpOBFgN1nL3Ukgh+D1+4A1SUKHdxR7h+T9kcuC54mFWoeZdnLT7ZeIC9Emw==", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true + }, + "node_modules/create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + } + }, + "node_modules/create-ecdh/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "node_modules/create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "dependencies": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "node_modules/crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "dependencies": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + }, + "engines": { + "node": "*" + } + }, + "node_modules/dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", + "dev": true + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/define-data-property": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.4.tgz", + "integrity": "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/define-properties": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz", + "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.0.1", + "has-property-descriptors": "^1.0.0", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/defined": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.1.tgz", + "integrity": "sha512-hsBd2qSVCRE+5PmNdHt1uzyrFu5d3RwmFDKzyNZMFq/EwDNJF7Ee5+D5oEKF0hU6LhtoUF1macFvOe4AskQC1Q==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/delegate": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + }, + "node_modules/deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "dev": true, + "dependencies": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + }, + "bin": { + "deps-sort": "bin/cmd.js" + } + }, + "node_modules/des.js": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.1.0.tgz", + "integrity": "sha512-r17GxjhUCjSRy8aiJpr8/UadFIzMzJGexI3Nmz4ADi9LYSFx4gTBp80+NaX/YsXWWLhpZ7v/v/ubEc/bCNfKwg==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "node_modules/detective": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.1.tgz", + "integrity": "sha512-v9XE1zRnz1wRtgurGu0Bs8uHKFSTdteYZNbIPFVhUZ39L/S79ppMpdmVOZAnoz1jfEFodc48n6MX483Xo3t1yw==", + "dev": true, + "dependencies": { + "acorn-node": "^1.8.2", + "defined": "^1.0.0", + "minimist": "^1.2.6" + }, + "bin": { + "detective": "bin/detective.js" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + } + }, + "node_modules/diffie-hellman/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true, + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + } + }, + "node_modules/duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha512-asLFVfWWtJ90ZyOUHMqk7/S2w2guQKxUI2itj3d92ADHhxUSbCMGi1f1cBcJ7xM1To+pE/Khbwo1yuNbMEPKeA==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/elliptic": { + "version": "6.5.5", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.5.tgz", + "integrity": "sha512-7EjbcmUm17NQFu4Pmgmq2olYMj8nwMnpcddByChSUjArp8F5DQWcIcpriwO4ZToLNAJig0yiyjswfyGNje/ixw==", + "dev": true, + "dependencies": { + "bn.js": "^4.11.9", + "brorand": "^1.1.0", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.1", + "inherits": "^2.0.4", + "minimalistic-assert": "^1.0.1", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/elliptic/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/es-define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", + "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true, + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "dependencies": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "node_modules/falafel": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/falafel/-/falafel-2.2.5.tgz", + "integrity": "sha512-HuC1qF9iTnHDnML9YZAdCDQwT0yKl/U55K4XSUXqGAA2GLoafFgWRqdAbhWJxXaYD4pyoVxAJ8wH670jMpI9DQ==", + "dependencies": { + "acorn": "^7.1.1", + "isarray": "^2.0.1" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/falafel/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" + }, + "node_modules/fast-safe-stringify": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", + "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", + "dev": true + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/for-each": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", + "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==", + "dev": true, + "dependencies": { + "is-callable": "^1.1.3" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", + "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "dev": true, + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "has-proto": "^1.0.1", + "has-symbols": "^1.0.3", + "hasown": "^2.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/good-listener": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", + "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", + "dependencies": { + "delegate": "^3.1.2" + } + }, + "node_modules/gopd": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", + "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "dev": true, + "dependencies": { + "get-intrinsic": "^1.1.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/gsap": { + "version": "3.12.5", + "resolved": "https://registry.npmjs.org/gsap/-/gsap-3.12.5.tgz", + "integrity": "sha512-srBfnk4n+Oe/ZnMIOXt3gT605BX9x5+rh/prT2F1SsNJsU1XuMiP0E2aptW481OnonOGACZWBqseH5Z7csHxhQ==" + }, + "node_modules/handlebars": { + "version": "4.7.8", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", + "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/handlebars/node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/handlebars/node_modules/uglify-js": { + "version": "3.17.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", + "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-property-descriptors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.2.tgz", + "integrity": "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==", + "dev": true, + "dependencies": { + "es-define-property": "^1.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-proto": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", + "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", + "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/hash-base": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.0.4.tgz", + "integrity": "sha512-EeeoJKjTyt868liAlVmcv2ZsUfGHlE3Q+BICOXcZiwN3osr5Q/zFGYmTJpoIzuaSTAwndFy+GqhEwlU4L3j4Ow==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "node_modules/hasown": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", + "integrity": "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/hbsfy": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/hbsfy/-/hbsfy-2.8.1.tgz", + "integrity": "sha512-NHn+bc1FI+TTZzFkpw+0JetPDzxRGiYBNMb3eSDO9J0rZE/SU6tm9QAc3JT9wblYOQWnGvzPENE+x+xDxlATeQ==", + "deprecated": "This package is not maintained anymore and does not receive security updates", + "dev": true, + "dependencies": { + "through": "~2.3.4", + "xtend": "~3.0.0" + } + }, + "node_modules/hbsfy/node_modules/xtend": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", + "integrity": "sha512-sp/sT9OALMjRW1fKDlPeuSZlDQpkqReA0pyJukniWbTGoEKefHxhGJynE3PNhUMlcM8qWIjPwecwCw4LArS5Eg==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==", + "dev": true, + "dependencies": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "node_modules/htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha512-eVcrzgbR4tim7c7soKQKtxa/kQM4TzjnlU83rcZ9bHU6t31ehfV7SktN6McWgwPWg+JYMA/O3qpGxBvFq1z2Jg==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/httpreq": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/httpreq/-/httpreq-0.4.24.tgz", + "integrity": "sha512-jY/7ABOVh2WEqDPKYRnMOd4qwH8jYP+oT646Uci8Nx5M6Zi0kO0jo9JKLTSjJ0eaisSUL6zR4JdRiRRPP+kV8Q==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==", + "dev": true + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "node_modules/inline-source-map": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.3.tgz", + "integrity": "sha512-1aVsPEsJWMJq/pdMU61CDlm1URcW702MTB4w9/zUjMus6H/Py8o7g68Pr9D4I6QluWGt/KdmswuRhaA05xVR1w==", + "dev": true, + "dependencies": { + "source-map": "~0.5.3" + } + }, + "node_modules/insert-module-globals": { + "version": "7.2.1", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.1.tgz", + "integrity": "sha512-ufS5Qq9RZN+Bu899eA9QCAYThY+gGW7oRkmb0vC93Vlyu/CFGcH0OYPEjVkDXA5FEbTt1+VWzdoOD3Ny9N+8tg==", + "dev": true, + "dependencies": { + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "JSONStream": "^1.0.3", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + } + }, + "node_modules/is-arguments": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "node_modules/is-callable": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz", + "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-core-module": { + "version": "2.13.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", + "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "dev": true, + "dependencies": { + "hasown": "^2.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-generator-function": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", + "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", + "dev": true, + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-typed-array": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.13.tgz", + "integrity": "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw==", + "dev": true, + "dependencies": { + "which-typed-array": "^1.1.14" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true + }, + "node_modules/jquery": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ] + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/justifiedGallery": { + "version": "3.6.0", + "resolved": "git+ssh://git@github.com/miromannino/Justified-Gallery.git#60d253d6963750db2507571612ae0c2d7c2f970d", + "integrity": "sha512-tMnWUwj/siBnKDaZE2zBYTTSQZQUw2qLlpAzE/imEg/V3U+TNecqyI4cJEniYOjKX/gU9cpGuneaJZ6YYeMJ9w==", + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==", + "dev": true, + "dependencies": { + "is-buffer": "^1.1.5" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, + "node_modules/lazy-cache": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz", + "integrity": "sha512-RE2g0b5VGZsOCFOCgP7omTRYFqydmZkBwl5oNnQ1lDYC57uyO9KqNnNVxT7COSHTxrRCWVcAVOcbjk+tvh/rgQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha512-eDn9kqrAmVUC1wmZvlQ6Uhde44n+tXpqPrN8olQJbttgh0oKclk+SF54P47VEGE9CEiMeRwAP8BaM7UHvBkz2A==", + "dev": true + }, + "node_modules/longest": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/longest/-/longest-1.0.1.tgz", + "integrity": "sha512-k+yt5n3l48JU4k8ftnKG6V7u32wyH2NfKzeMto9F/QRE0amxy/LayxwlvjjkZEIzqR+19IrtFO8p5kB9QaYUFg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "dependencies": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "bin": { + "miller-rabin": "bin/miller-rabin" + } + }, + "node_modules/miller-rabin/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "node_modules/minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "node_modules/module-deps": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", + "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", + "dev": true, + "dependencies": { + "browser-resolve": "^2.0.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "JSONStream": "^1.0.3", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "bin": { + "module-deps": "bin/cmd.js" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==" + }, + "node_modules/node-polyglot": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/node-polyglot/-/node-polyglot-0.4.5.tgz", + "integrity": "sha512-yONQbhQPgHJQ2S0AxHATTe5+PS8LdZnXSJfg0GyjsXJX0g1K9Q1yX9dEW7VpbZ+5VtuKzfckNkKySeOKddvi/w==" + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/object-inspect": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", + "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.assign": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", + "has-symbols": "^1.0.3", + "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==", + "dev": true + }, + "node_modules/outpipe": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/outpipe/-/outpipe-1.1.1.tgz", + "integrity": "sha512-BnNY/RwnDrkmQdUa9U+OfN/Y7AWmKuUPCCd+hbRclZnnANvYpO72zp/a6Q4n829hPbdqEac31XCcsvlEvb+rtA==", + "dev": true, + "dependencies": { + "shell-quote": "^1.4.2" + } + }, + "node_modules/pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "node_modules/parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha512-mXKF3xkoUt5td2DoxpLmtOmZvko9VfFpwRwkKDHSNvgmpLAeBo18YDhcPbBzJq+QLCHMbGOfzia2cX4U+0v9Mg==", + "dev": true, + "dependencies": { + "path-platform": "~0.11.15" + } + }, + "node_modules/parse-asn1": { + "version": "5.1.7", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.7.tgz", + "integrity": "sha512-CTM5kuWR3sx9IFamcl5ErfPl6ea/N8IYwiJ+vpeB2g+1iknv7zBl5uPwbMbRVznRVbrNY6lGuDoE5b30grmbqg==", + "dev": true, + "dependencies": { + "asn1.js": "^4.10.1", + "browserify-aes": "^1.2.0", + "evp_bytestokey": "^1.0.3", + "hash-base": "~3.0", + "pbkdf2": "^3.1.2", + "safe-buffer": "^5.2.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/path-browserify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", + "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", + "dev": true + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha512-Y30dB6rab1A/nfEKsZxmr01nUotHX0c/ZiIAsCTatEe1CmS5Pm5He7fZ195bPT7RdquoaL8lLxFCMQi/bS7IJg==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/pbkdf2": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", + "dev": true, + "dependencies": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + }, + "engines": { + "node": ">=0.12" + } + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/piwik": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/piwik/-/piwik-1.0.9.tgz", + "integrity": "sha512-jLt3bb7FXT0kFhimPP4XOf1DD1XgNW0wTQjxIHsGEmGiALAN5NpH7HNMx9iT7bTHLi8EMcvJUkjrp7FJEfNY0Q==", + "dependencies": { + "httpreq": "^0.4.24" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/possible-typed-array-names": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/possible-typed-array-names/-/possible-typed-array-names-1.0.0.tgz", + "integrity": "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q==", + "dev": true, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "node_modules/public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "dependencies": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "node_modules/public-encrypt/node_modules/bn.js": { + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", + "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", + "dev": true + }, + "node_modules/punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==", + "dev": true + }, + "node_modules/qs": { + "version": "6.12.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.12.0.tgz", + "integrity": "sha512-trVZiI6RMOkO476zLGaBIzszOdFPnCCXHPG9kn0yuS1uz6xdVxPfZdB3vUig9pxPFDM9BRAgz/YUIVQ1/vuiUg==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.6" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/qunitjs": { + "version": "1.23.1", + "resolved": "https://registry.npmjs.org/qunitjs/-/qunitjs-1.23.1.tgz", + "integrity": "sha512-HxmbULxwG6wmQ9no6RJVk2/g2O4uycAN1K00VDD6nowUHyDd8NzG6ESm4WOUJ5Mrty44QQl6+NHAalYvi/pakw==", + "dev": true + }, + "node_modules/randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "dependencies": { + "safe-buffer": "^5.1.0" + } + }, + "node_modules/randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "dependencies": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "node_modules/read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha512-3ALe0bjBVZtkdWKIcThYpQCLbBMd/+Tbh2CDSrAIDO3UsZ4Xs+tnyjv2MjCOMMgBG+AsUOeuP1cgtY1INISc8w==", + "dev": true, + "dependencies": { + "readable-stream": "^2.0.2" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "node_modules/readable-stream/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==", + "dev": true, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/require-globify": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/require-globify/-/require-globify-1.4.1.tgz", + "integrity": "sha512-ddYqhgOEQJ6roA46AeT5GXiZHEJWKyjeV17K7GPRY/poFYR5dE/ZHXnpRGrXwuMj26qfyV73HMLwvuRCBj6PFw==", + "dependencies": { + "browserify-transform-tools": "^1.6.0", + "glob": "^7.0.5" + } + }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/right-align": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/right-align/-/right-align-0.1.3.tgz", + "integrity": "sha512-yqINtL/G7vs2v+dFIZmFUDbnVyFUJFKd6gK22Kgo6R4jfJGFtisKyncWDDULgjfqf4ASQuIQyjJ7XZ+3aWpsAg==", + "dev": true, + "dependencies": { + "align-text": "^0.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "dependencies": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/scrollmagic": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/scrollmagic/-/scrollmagic-2.0.8.tgz", + "integrity": "sha512-UYXEGBPVLziovXl3FjHGkY9c4UXKUKopIdXwWR2JapWxCo0U345wYegi7rcsv5vHf/ktc1bSNWy4QRFiV+Yccw==", + "engines": { + "node": ">=0.10.x" + } + }, + "node_modules/select": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" + }, + "node_modules/set-function-length": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.2.tgz", + "integrity": "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==", + "dev": true, + "dependencies": { + "define-data-property": "^1.1.4", + "es-errors": "^1.3.0", + "function-bind": "^1.1.2", + "get-intrinsic": "^1.2.4", + "gopd": "^1.0.1", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + }, + "bin": { + "sha.js": "bin.js" + } + }, + "node_modules/shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "dev": true, + "dependencies": { + "fast-safe-stringify": "^2.0.7" + } + }, + "node_modules/shell-quote": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz", + "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "object-inspect": "^1.13.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stream-browserify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", + "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", + "dev": true, + "dependencies": { + "inherits": "~2.0.4", + "readable-stream": "^3.5.0" + } + }, + "node_modules/stream-browserify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha512-3PnJbYgS56AeWgtKF5jtJRT6uFJe56Z0Hc5Ngg/6sI6rIt8iiMBTa9cvdyFfpMQjaVHr8dusbNeFGIIonxOvKw==", + "dev": true, + "dependencies": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "node_modules/stream-http": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.2.0.tgz", + "integrity": "sha512-Oq1bLqisTyK3TSCXpPbT4sdeYNdmyZJv1LxpEm2vu1ZhK89kSE5YXwZc3cWk0MagGaKriBh9mCFbVGtO+vY29A==", + "dev": true, + "dependencies": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + } + }, + "node_modules/stream-http/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "dev": true, + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha512-RIrIdRY0X1xojthNcVtgT9sjpOGagEUKpZdgBUi054OEPFo282yg+zE+t1Rj3+RqKq2xStL7uUHhY+AjbC4BXg==", + "dev": true, + "dependencies": { + "minimist": "^1.1.0" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "dependencies": { + "acorn-node": "^1.2.0" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==" + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha512-PIxwAupJZiYU4JmVZYwXp9FKsHMXb5h0ZEFyuXTAn8WLHOlcij+FEcbrvDsom1o5dr1YggEtFbECvGCW2sT53Q==", + "dev": true, + "dependencies": { + "process": "~0.11.0" + }, + "engines": { + "node": ">=0.6.0" + } + }, + "node_modules/tiny-emitter": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true + }, + "node_modules/uglify-js": { + "version": "2.8.29", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.8.29.tgz", + "integrity": "sha512-qLq/4y2pjcU3vhlhseXGGJ7VbFO4pBANu0kwl8VCa9KEI0V8VfZIx2Fy3w01iSTA/pGwKZSmu/+I4etLNDdt5w==", + "dev": true, + "dependencies": { + "source-map": "~0.5.1", + "yargs": "~3.10.0" + }, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + }, + "optionalDependencies": { + "uglify-to-browserify": "~1.0.0" + } + }, + "node_modules/uglify-to-browserify": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz", + "integrity": "sha512-vb2s1lYx2xBtUgy+ta+b2J/GLVUR+wmpINwHePmPRhOsIVCG2wDzKJ0n14GslH1BifsqVzSOwQhRaCAsZ/nI4Q==", + "dev": true, + "optional": true + }, + "node_modules/umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true, + "bin": { + "umd": "bin/cli.js" + } + }, + "node_modules/undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "dev": true, + "dependencies": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + }, + "bin": { + "undeclared-identifiers": "bin.js" + } + }, + "node_modules/url": { + "version": "0.11.3", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.3.tgz", + "integrity": "sha512-6hxOLGfZASQK/cijlZnZJTq8OXAkt/3YGfQX45vvMYXpZoo8NdWZcY73K108Jf759lS1Bv/8wXnHDTSz17dSRw==", + "dev": true, + "dependencies": { + "punycode": "^1.4.1", + "qs": "^6.11.2" + } + }, + "node_modules/util": { + "version": "0.12.5", + "resolved": "https://registry.npmjs.org/util/-/util-0.12.5.tgz", + "integrity": "sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "is-arguments": "^1.0.4", + "is-generator-function": "^1.0.7", + "is-typed-array": "^1.1.3", + "which-typed-array": "^1.1.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "node_modules/watchify": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/watchify/-/watchify-4.0.0.tgz", + "integrity": "sha512-2Z04dxwoOeNxa11qzWumBTgSAohTC0+ScuY7XMenPnH+W2lhTcpEOJP4g2EIG/SWeLadPk47x++Yh+8BqPM/lA==", + "dev": true, + "dependencies": { + "anymatch": "^3.1.0", + "browserify": "^17.0.0", + "chokidar": "^3.4.0", + "defined": "^1.0.0", + "outpipe": "^1.1.0", + "through2": "^4.0.2", + "xtend": "^4.0.2" + }, + "bin": { + "watchify": "bin/cmd.js" + }, + "engines": { + "node": ">= 8.10.0" + } + }, + "node_modules/watchify/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/watchify/node_modules/through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "dependencies": { + "readable-stream": "3" + } + }, + "node_modules/which-typed-array": { + "version": "1.1.15", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", + "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "dev": true, + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-tostringtag": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/window-size": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.0.tgz", + "integrity": "sha512-1pTPQDKTdd61ozlKGNCjhNRd+KPmgLSGa3mZTHoOliaGcESD8G1PXhh7c1fgiPjVbNVfgy2Faw4BI8/m0cC8Mg==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, + "node_modules/yargs": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.10.0.tgz", + "integrity": "sha512-QFzUah88GAGy9lyDKGBqZdkYApt63rCXYBGYnEP4xDJPXNqXXnBDACnbrXnViV6jRSqAePwrATi2i8mfYm4L1A==", + "dev": true, + "dependencies": { + "camelcase": "^1.0.2", + "cliui": "^2.1.0", + "decamelize": "^1.0.0", + "window-size": "0.1.0" + } + }, + "node_modules/zeroclipboard": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/zeroclipboard/-/zeroclipboard-2.3.0.tgz", + "integrity": "sha512-1rsCahjnYDEtoIgI7DrxOo/k8jLK2L/CytqC5JbRyTjOKl4DLRt4/3jRkAZRgW/sxWbYeSoZs5ZXuM9DbGKxVw==" + } + } +} diff --git a/tests/tests.bundle.js b/tests/tests.bundle.js new file mode 100644 index 0000000..ba440da --- /dev/null +++ b/tests/tests.bundle.js @@ -0,0 +1,47011 @@ +(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;ihttps://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use abrufen.", + "private-use": "Rein private Nutzung (ohne Veröffentlichung) und andere Ausnahmen" + }, + "error": { + "generic": "Ein unvorhergesehener Fehler ist aufgetreten.", + "mediatype-unsupported": "Dieser Medientyp wird vom Lizenzhinweisgenerator momentan leider nicht unterstützt.", + "licence-unsupported": "Leider wird die ermittelte Lizenz des Bildes von dieser Anwendung nicht unterstützt.", + "url-invalid": "Die angegebene Internetadresse konnte nicht verarbeitet werden.", + "licence-not-recognized": "Leider wird das Format der Lizenzangabe zu diesem Bild derzeit noch nicht unterstützt.", + "send-feedback": "Beim Senden ist etwas schiefgelaufen. Bitte versuchen Sie es erneut.", + "feedback-generic": "Beim Senden der Nachricht ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.", + "feedback-blank-fields": "Alle Felder des Feedback-Formulars müssen ausgefüllt werden.", + "no-images-found": "Dieser Wikipedia Artikel enthält keine Bilder.", + "no-wiki-url": "Der Lizenzhinweisgenerator kann derzeit nur Links zu Wikipedia oder Wikimedia Commons verarbeiten.", + "invalid-email-format": "Die angebene Email Adresse entspricht nicht dem gültigen Format.", + "no-cc-licence": "Diese Datei steht nicht unter einer Creative-Commons-Lizenz." + }, + "info-box": { + "private-use": "Die Angabe eines Lizenzhinweises ist bei rein privaten Nutzungen meist nicht nötig.", + "private-use-more-link": "→ MEHR ERFAHREN", + "dont-show-again": "Hinweis nicht mehr anzeigen", + "understood-and-close": "Verstanden und schließen", + "ported-licence": "Bestimmte Creative-Commons-Lizenzen wurden in speziell angepassten Ländervarianten herausgebracht, als so genannte portierte Lizenzen. Das von Ihnen abgefragte Bild wurde unter einer solchen portierten Lizenz veröffentlicht. Es wurde nicht geprüft, ob die Lizenzpflichten dieser Ländervariante der deutschen Sprachversion entsprechen. Sie können den Lizenzhinweis natürlich dennoch mit dieser Anwendung erstellen. Um ganz sicherzugehen, empfehlen wir Ihnen aber, die Lizenzpflichten anhand des Lizenztextes zu überprüfen. Der Lizenzhinweis muss außerdem an die Sprache des Nutzungskontextes angepasst werden, um seine Funktion vollständig erfüllen zu können." + }, + "dialogue": { + "public-domain-picture": "Dieses Bild wurde beim Upload als gemeinfrei gekennzeichnet, sodass kein Lizenzhinweis erforderlich ist.", + "no-attribution-needed": "Kein Lizenzhinweis nötig", + "more-information": "weitere Informationen", + "adjust-attribution-for-usage": "Lizenzhinweis an die Nutzung anpassen", + "adjust-legal-notice-for-usage": "Rechtehinweis an die Nutzung anpassen", + "public-domain-text": "

Dieses Bild ist nach den ermittelten Details frei von Urheberrechten und kann daher genutzt werden, ohne dass Lizenzpflichten einzuhalten sind, also auch ohne, dass Hinweise auf den Urheber oder eine Lizenz gemacht werden müssten.

Nach deutschem Urheberrecht behält ein Urheber allerdings immer einen nicht verzichtbaren Kern an Rechten. Wir raten deshalb davon ab, sich die Urheberschaft an dem Bild anzumaßen oder es in einer Weise zu verwenden, die den Ruf des Urhebers schädigen kann. Es ist außerdem sinnvoll und für andere Nachnutzende hilfreich, zumindest einen Hinweis auf den gemeinfreien Status des Bildes zu geben.

In einigen Ländern (darunter auch Deutschland) werden regelmäßig Ansprüche auf einen Lichtbildschutz fotografischer Reproduktionen gemeinfreier Werke erhoben, und zwar sowohl bei Abbildungen von Plastiken und anderen dreidimensionalen Werken als auch bei Abbildungen von Gemälden. Es liegt in der Verantwortung der Weiternutzenden, abzuklären, ob sie dort, wo das jeweilige Bild verwendet werden soll, von solchen Ansprüchen betroffen sein könnten.

", + "force-pd-attribution": "Trotzdem Rechtehinweis erstellen", + "type-of-use-headline": "Wie möchten Sie das Bild nutzen?", + "author-headline": "Wie lautet der Name bzw. die Namen des Ursprungsautors oder der Rechteinhaber?", + "compilation-headline": "Wie möchten Sie das Bild veröffentlichen?", + "editing-headline": "Möchten Sie das Bild in bearbeiteter Form verwenden?", + "change-headline": "Was genau wird am Bild verändert?", + "change-pd-headline": "Wenn Sie möchten, können Sie Ihre Änderungen kenntlich machen. Was genau wird am Bild verändert?", + "creator-headline": "Wie möchten Sie als Urheber oder Urheberin Ihrer Änderungen genannt werden?", + "licence-headline": "Unter welcher Lizenz sollen Ihre Veränderungen veröffentlicht werden?", + "done-headline": "Gratulation!", + "answer-print": "In einem Medium, das Betrachtern keine Hyperlinks bietet (z.B. Druckerzeugnis, Foliensatz).", + "answer-online": "Online.", + "author-label": "Bitte tragen Sie die Informationen hier ein und geben Sie auch, wenn vorhanden, Zuschreibungen an Dritte (z.B. „sponsored by X“ oder „herausgegeben durch Y“) mit in das Textfeld ein:", + "next": "Weiter", + "answer-no-author": "Es wurden keine Informationen dazu gefunden.", + "answer-compilation": "Zusammen mit anderen Werken.", + "answer-no-compilation": "Einzeln.", + "answer-edited": "Ja.", + "answer-not-edited": "Nein, ich möchte das Bild in seiner ursprünglichen Erscheinungsform nutzen.", + "author-question-mark": "Dies ist der beim Bild angegebene Name oder das Pseudonym des Urhebers bzw. der Urheber oder Rechteinhaber. Die Angaben sind in exakt der vorgefundenen Form vollständig in das untere Feld einzufügen, sofern vorhanden einschließlich © und/oder Jahreszahl.", + "change-question-mark": "Es reicht eine Kurzangabe wie „Ausschnitt“ oder „Kolorierung“.", + "compilation-question-mark": "Bitte wählen Sie diese Option, wenn Sie der Ansicht sind, dass Ihre Veröffentlichung des Bildes zusammen mit anderen Werken aufgrund von Auswahl und Anordnung der einzelnen Elemente eine eigene geistige Schöpfung, also ein eigenständiges Werk darstellt. Dies ist beispielsweise der Fall, wenn Sie das Bild eines von mehreren in einem Bildband oder oder einer Best-of-Zusammenstellung veröffentlichen wollen. Anders ist es bei einem Remix, etwa einer Collage aus mehreren Bildern. Das Ergebnis wird meist kein Sammelwerk, sondern eine Bearbeitung aller zusammen gemischten Bilder darstellen.", + "editing-question-mark": "Sämtliche Änderungen, die Sie an dem Bild vornehmen und die den Eindruck des Bildes auf Betrachter verändern, sind Bearbeitungen (z.B. Zuschneiden oder Einfärben eines Bildes). Änderungen des Dateiformats oder Digitalisierungen sind dagegen keine Bearbeitungen, da hier das Bild und sein Eindruck auf Betrachter an sich unverändert bleibt.", + "licence-question-mark": "Es werden nur Lizenzen zur Auswahl angeboten, die mit der ursprünglichen Creative-Commons-Lizenz kompatibel sind.", + "creator-question-mark": "Bitte geben Sie möglichst Ihren vollständigen Namen an. Ein Pseudonym, Nickname oder „anonym“ ist auch möglich.", + "same-licence": "Unter derselben Lizenz wie das ursprüngliche Werk.", + "licence-text": "Lizenztext", + "download-image-link": "Bild herunterladen", + "file-page-link": "Internetadresse des Bildes auf Wikimedia Commons", + "done": "Fertig", + "typeOfUse": "Nutzungsart", + "author": "Autor", + "compilation": "Sammelwerk", + "editing": "Bearbeitung", + "change": "Veränderungen", + "creator": "Urheber", + "licence": "Lizenz", + "back-to-top": "Weiteres Bild prüfen", + "pd-attribution-hint": "als gemeinfrei gekennzeichnet", + "check-details": "Details auf", + "here": "hier", + "mark-as-pd": "als gemeinfrei markieren" + }, + "evaluation": { + "by": "von", + "edited": "bearbeitet", + "done-text": "Sie haben alle Fragen beantwortet und können den Lizenzhinweis jetzt verwenden.", + "done-text-legal-notice": "Sie haben alle Fragen beantwortet und können den Rechtehinweis jetzt verwenden.", + "your-attribution": "Ihr Lizenzhinweis", + "your-legal-notice": "Ihr Rechtehinweis", + "copy": "Kopieren", + "do-print-text": "Die angezeigten Informationen sollten Sie nach Möglichkeit in unmittelbarer Nähe zum Bild zeigen (z.B. unmittelbar unter dem Bild). Auf jeden Fall müssen Betrachter des Bildes die Informationen leicht finden können. Bei Büchern und Zeitschriften können die Informationen auch in einem Impressum oder anderer üblicher Stelle stehen, wenn dabei eindeutig die Zuordnung zu dem jeweiligen Bild erkennbar ist (z.B. durch Angabe der Seitenzahl).", + "do-online-text": "Bitte beachten Sie, dass der Lizenzhinweis Verlinkungen enthält, die zwingend mit übernommen werden müssen, wenn Sie den Lizenzhinweis verwenden möchten. Die angezeigten Informationen sollten Sie nach Möglichkeit in unmittelbarer Nähe zum Bild zeigen (z.B. unmittelbar unter dem Bild). Auf jeden Fall müssen Betrachter des Bildes die Informationen leicht finden können. Zwecks unkomplizierter Übernahme wird Ihnen der Lizenzhinweis hier auch als Plaintext inklusive aller Verlinkungen und als HTML-Text zur Verfügung gestellt. So kann er unmittelbar in den Quelltext Ihrer Website übernommen werden.", + "do-compilation-text": "Sollte Ihnen der Lizenzgeber mitgeteilt haben, dass Sie seinen Namen, Werktitel oder sonstige Hinweise auf ihn nicht veröffentlichen sollen, geben Sie bitte lediglich den Link zur Lizenz an. Diesen können Sie über den untenstehenden Button aufrufen. Der Urheber bzw. Rechteinhaber soll die Möglichkeit haben, zu entscheiden, ob er mit Name und Titel genannt werden möchte oder nicht, wenn sein Bild in einem Sammelwerk verwendet wird, mit dem er vielleicht insgesamt nicht in Verbindung gebracht werden möchte.", + "dont-terms-of-use-headline": "Keine zusätzlichen Bedingungen aufstellen", + "dont-terms-of-use-text": "Sie dürfen in Bezug auf das Bild keine zusätzlichen Bedingungen aufstellen, die die Nachnutzungsrechte aus der Creative-Commons-Lizenz beschränken (z.B. allgemeine Weitergabeverbote für die Inhalte auf einer Webseite, wenn diese Verbote die CC-lizenzierten Bilder nicht explizit ausnehmen).", + "dont-sublicences-headline": "Keine Unterlizenzierung erlaubt", + "dont-sublicences-text": "Sie dürfen keine Unterlizenzen an dem Werk erteilen. Dies bedeutet, dass Sie hinsichtlich des Bildes nicht selbst als Lizenzgeber auftreten dürfen. Lediglich wenn sie das Bild bearbeiten, können Sie selbst Lizenzgeber werden (und das auch nur hinsichtlich ihres schöpferischen Beitrags, nicht hinsichtlich des Ursprungsbildes). Spätere Nachnutzer, die das Bild über Sie erhalten, erhalten ihrerseits die Creative-Commons-Lizenz wieder direkt vom Rechteinhaber des Ursprungsbildes und nicht über Sie als Weitergebenden.", + "dont-cc-licence-headline": "Bereits vorgefundene rechtliche Hinweise", + "dont-cc-licence-text": "Sofern Sie beim Bild Hinweise auf eine Creative-Commons-Lizenz und/oder auf einen Haftungsausschluss vorfinden, dürfen diese Hinweise nicht geändert oder entfernt werden.", + "dont-technical-protection-headline": "Keine technischen Schutzmaßnahmen", + "dont-technical-protection-text": "Sie dürfen in Bezug auf das Bild keine technischen Schutzmaßnahmen verwenden, die den Nutzer bei der Ausübung von Rechten, die sich für ihn aus der Creative-Commons-Lizenz ergeben, behindern können (z.B. Kopierschutztechnik, die den Ausdruck eines PDF verhindert).", + "dont-rightholder-connection-headline": "Keine Sonderverbindung zum Rechteinhaber", + "dont-rightholder-connection-text": "Sie dürfen durch die Art und Weise, wie sie das Bild nutzen, nicht den Eindruck erwecken, dass Ihnen die Nutzung vom Rechteinhaber oder zu einem vom Rechteinhaber benannten Zuschreibungsempfänger individuell gestattet wurde und/oder dass der Rechteinhaber damit auf sonstige Weise Ihre Nutzung bewusst gutheißen wolle.", + "show-licence-text": "Vollständigen Lizenztext ansehen", + "show-cc-zero-text": "Vollständigen Text der Freigaberklärung anzeigen", + "anonymous": "anonym", + "copy-hint": "Kopieren Sie jetzt den markierten Text" + } +} + +},{}],2:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Attribution Generator", + "description": "License information for images from Wikipedia and Wikimedia Commons", + "no-script": "You need Javascript enabled to use this page.", + "how-it-works-1": "Insert a web address of a Wikimedia Commons image or a Wikipedia article to start the tool.", + "how-it-works-2": "Answer the questions about the intended use to create a correct license notice.", + "how-it-works-3": "Read how to use the license notice.", + "how-it-works-4": "Copy the generated license notice and insert it into your publication to use the image correctly.", + "how-it-works": "How does it work?", + "input-placeholder": "Web address of a Wikimedia Commons image or a Wikipedia article.", + "go-button": "Let’s go!", + "feedback-name": "Name", + "feedback-response-email": "E-Mail Address", + "feedback-body": "Feedback", + "feedback-submit": "Send", + "feedback-thanks": "Thank you for your feedback!", + "feedback": "Feedback", + "about": "About", + "legal": "Imprint and Privacy Policy", + "legal-tracking-switch": "Remove the checkmark to stop tracking your visit.", + "legal-hosting": "This tool is hosted on Wikimedia Labs. Read the Terms of Use on https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Purely private use (without publication) and other exceptions and limitations of copyright" + }, + "error": { + "generic": "An unforeseen error happened. Sorry.", + "mediatype-unsupported": "Unfortunately, this media type is not supported by the tool at the moment. Sorry.", + "licence-unsupported": "Unfortunately, the detected license type is not supported by the tool at the moment. Sorry.", + "url-invalid": "The web address you provided could not be processed. Sorry.", + "licence-not-recognized": "Unfortunately, the format of the license information stored for this image is not supported by the tool at the moment. Sorry.", + "send-feedback": "Something did not work. Please try again.", + "feedback-generic": "Something did not work. Please try again.", + "feedback-blank-fields": "Please fill in all the fields of the feedback form.", + "no-images-found": "This Wikipedia article does not contain any images.", + "no-wiki-url": "At this moment, the Attribution Generator can only process pictures from Wikipedia or Wikimedia Commons.", + "invalid-email-format": "The given e-mail address does not match the valid format.", + "no-cc-licence": "This file is not licensed under a Creative Commons license." + }, + "info-box": { + "private-use": "For most purely private uses, you do not need a license notice.", + "private-use-more-link": "→ LEARN MORE", + "dont-show-again": "Don’t show this message again.", + "understood-and-close": "Understood and close.", + "ported-licence": "Certain Creative Commons licenses were published with country-specific editions, so-called “ported licenses”. The image you were asking a license notice for, was published with such a ported license. The tool is not able to check whether the license requirements of this country-specific Creative Commons license are equal to the version in English language. However, you can still generate a license notice attribution with this tool. To be entirely sure, we recommend to check the license requirements of this country-specific version. Additionally, the license notice has to be in the language of its context to fulfill its function completely." + }, + "dialogue": { + "public-domain-picture": "This image upon upload was marked as being in the public domain, so you do not need a license notice for it.", + "no-attribution-needed": "No license notice needed", + "more-information": "further information", + "adjust-attribution-for-usage": "Adapt the license notice to the use case", + "adjust-legal-notice-for-usage": "Adapt the legal notice to the use case", + "public-domain-text": "

According to the details that were detected, this image is free of copyright and can be used without any license requirements, so even withouth mentioning any author or license.

However, under German copyright law, an author always retains some unwaivable rights to every work. We therefore recommend to not falsely claim the authorship of the image nor to use the image in a way that could be regarded harmful to the author’s reputation. It is, furthermore, recommendable to inform other users about the public domain status of this image.

In some countries (including Germany) there are regularly claims for the protection of photographic reproductions of works in the public domain. This applies both to pictures of sculptures and other three-dimensional works as well as photos of paintings. It is the responsibility of reusers to clarify whether they are affected when using the respective picture.

", + "force-pd-attribution": "Generate rights notice anyway", + "type-of-use-headline": "How do you want to use the image?", + "author-headline": "What is the name (or the names) of the author or the copyright holder?", + "compilation-headline": "How do you want to publish the image?", + "editing-headline": "Do you want to use the image in a modified form?", + "change-headline": "What did you modify?", + "change-pd-headline": "Which part of the image will be modified?", + "creator-headline": "How do you want your modifications to be attributed to yourself?", + "licence-headline": "Under which license would you like to publish the modified image?", + "done-headline": "Congratulations!", + "answer-print": "In a context, where you cannot use hyperlinks (e. g. print products, set of slides).", + "answer-online": "Online.", + "author-label": "Please fill in the information and also state any attributions to further parties (like “sponsored by X” or “published by Y”) if applicable:", + "next": "Next", + "answer-no-author": "No information available on this.", + "answer-compilation": "Combined with other works.", + "answer-no-compilation": "On its own.", + "answer-edited": "Yes.", + "answer-not-edited": "No, I want to use the image in its original unmodified form.", + "author-question-mark": "This is for the attributed name(s) or pseudonym(s) of the author(s) or rightsholders. Information has to be stated exactly as it is found at the source, including © and/or year.", + "change-question-mark": "A short info like “Excerpt” or “Coloration” is sufficient.", + "compilation-question-mark": "Please choose this option if you think that your publication of the image together with other works (because of the selection and arrangement) as a collection is an intellectual creation in itself, i.e. the collection, due to its originality, is a work of authorship beyond the works contained in it. That could, for example, be the case if you create a photo book or a best-of-collection of certain images. The situation is different if you create a remix, like a collage of several images, which in most cases will not result in a collection, but in an adaptation of the images used for it.", + "editing-question-mark": "All changes of the image that alter its impression on its viewers (like clipping, coloring, drastic re-sizing etc.) make the result an adaptation in the legal sense. In contrast, changing the image’s file format or digitizing it does not result in adaptations because the image and the impression it gives remain the same.", + "licence-question-mark": "The tool only offers licenses which are compatible with the Creative Commons license attached to the original work.", + "creator-question-mark": "Please state, if possible, your full name. A pseudonym, a nickname or “anonymous” is possible as well.", + "same-licence": "Same license as the original work.", + "licence-text": "License text", + "download-image-link": "Download the image", + "file-page-link": "Web address of the image on Wikimedia Commons", + "done": "Done", + "typeOfUse": "Type of use", + "author": "Author", + "compilation": "Collection", + "editing": "Adaptation", + "change": "Changes", + "creator": "Creator", + "licence": "License", + "back-to-top": "Check another image", + "force-pd-attribution": "Create a legal notice anyway", + "pd-attribution-hint": "marked as public domain", + "check-details": "more details on", + "here": "here", + "mark-as-pd": "mark as public domain" + }, + "evaluation": { + "by": "by", + "edited": "modified", + "done-text": "You have answered all questions. You are ready to use the correct license notice.", + "done-text-legal-notice": "You have answered all questions. You can now use the correct legal notice.", + "your-attribution": "Your license notice", + "your-legal-notice": "Your legal notice", + "copy": "Copy", + "do-print-text": "You should show this information as close to the image as resonably possible (e.g. directly below it). In any case, viewers must be able to find the information easily. If you have a book or magazine, the attributions could also be placed in the imprint or at another standard location, as long as one can easily identify the image each attribution info belongs to (e.g. by providing the page number).", + "do-online-text": "Please note, that the license notice includes hyperlinks, which have to be included wherever you make use of the license notice. You should show this information as close to the image as resonably possible (e.g. directly below it). In any case, viewers must be able to find the information easily. To make it easier for you, the tool provides the attribution including all hyperlinks in plain text format and as an html snippet. This way, you can transfer it directly into the source code of your webpage.", + "do-compilation-text": "If the license holder asked you not to publish their name, the title of the work or any other information, please state the license’s hyperlink only. The tool provides it with the button below. The authors / rightsholders are meant to be able to decide by themselves, whether their names or the image titles are published or not in case the images are part of a collection they don’t want to be associated with.", + "dont-terms-of-use-headline": "Do not impose any further conditions", + "dont-terms-of-use-text": "You are not allowed to impose any further conditions regarding the image, which might restrict the rights granted through the Creative Commons license (e.g. no prohibiting the distribution of the contents of a specific webpage, as long as the CC-licensed images are not explicitly excepted from this ban).", + "dont-sublicences-headline": "No sublicensing allowed", + "dont-sublicences-text": "You are not allowed to sublicense the work. That means, that you are not allowed to state yourself as the licensor. Only if you modify the image you can become a licensor (and only limited to your modifications, not regarding to the original image). Others who will later receive the photo from you, receive their Creative Commons license offer directly from the licensor of the original image and not from you as the transmitter.", + "dont-cc-licence-headline": "Existing legal notices", + "dont-cc-licence-text": "If you find any Creative Commons license notices or limitations of liability, you are not allowed to change these.", + "dont-technical-protection-headline": "Do not impose any technical protection measures", + "dont-technical-protection-text": "You are not allowed to impose any technical protection measures regarding the image, which might restrict rights that flow from the Creative Commons license (e.g. copy protection mechanisms that restrict the printing of a PDF file).", + "dont-rightholder-connection-headline": "No special connection to the rightsholder", + "dont-rightholder-connection-text": "You are not allowed to use the image in a way that could be perceived as indicating that the rightsholder or any attribution parties mentioned granted rights to you in an individual transaction or otherwise endorse your specific use of the image.", + "show-licence-text": "See the full license text", + "show-cc-zero-text": "See the full text of the release statement", + "anonymous": "anonymous", + "copy-hint": "Copy the marked text" + } +} + +},{}],3:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Generador de Atribución", + "description": "Información de la licencia para imágenes de Wikipedia y Wikimedia Commons", + "no-script": "Necesitas tener Javascript activado para usar esta página.", + "how-it-works-1": "Insertar la dirección web de una imagen de Wikimedia Commons o de un artículo de Wikipedia para iniciar la herramienta.", + "how-it-works-2": "Responde a las preguntas sobre su uso previsto para crear un aviso de licencia correcto.", + "how-it-works-3": "Lee cómo usar el aviso de licencia.", + "how-it-works-4": "Copia el aviso de licencia generado e insértalo en tu publicación para utilizar la imagen correctamente.", + "how-it-works": "¿Cómo funciona?", + "input-placeholder": "Dirección web de una imagen de Wikimedia Commons o de un artículo de Wikipedia.", + "go-button": "¡Empecemos!", + "feedback-name": "Nombre", + "feedback-response-email": "Dirección de correo electrónico", + "feedback-body": "Feedback", + "feedback-submit": "Enviar", + "feedback-thanks": "¡Gracias por tus comentarios!", + "feedback": "Feedback", + "about": "Acerca de", + "legal": "Política de privacidad", + "legal-tracking-switch": "Desactivar la marca de verificación para detener el seguimiento de tu visita.", + "legal-hosting": "Esta herramienta está alojada en Wikimedia Labs. Lee los términos de uso en https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Uso puramente privado (sin publicación) y otras excepciones y limitaciones a los derechos de autor" + }, + "error": { + "generic": "Ha ocurrido un error imprevisto. Lo sentimos.", + "mediatype-unsupported": "Desafortunadamente este tipo de archivo multimedia no es soportado por la herramienta en este momento. Lo sentimos.", + "licence-unsupported": "Desafortunamente el tipo de licencia detectado no es soportado por la herramienta en este momento. Lo sentimos.", + "url-invalid": "La dirección web que has proporcionado no se ha podido procesar. Lo sentimos.", + "licence-not-recognized": "Desafortunadamente el formato de la información de la licencia almacenada para esta imagen no es soportado por la herramienta en este momento. Lo sentimos.", + "send-feedback": "Algo no ha funcionado correctamente. Por favor, inténtalo de nuevo.", + "feedback-generic": "Algo no ha funcionado correctamente. Por favor, inténtalo de nuevo", + "feedback-blank-fields": "Por favor, rellena todos los campos del formulario de feedback.", + "no-images-found": "Esta página de Wikipedia no contiene ninguna imagen.", + "no-wiki-url": "En estos momentos el Generador de Atribución solo puede procesar imágenes de Wikipedia y Wikimedia Commons.", + "invalid-email-format": "La dirección de correo electrónico especificada no coincide con el formato válido.", + "no-cc-licence": "Este archivo no está bajo una licencia de Creative Commons." + }, + "info-box": { + "private-use": "Para los usos puramente privados, no necesitas el aviso de licencia.", + "private-use-more-link": "→ APRENDER MÁS", + "dont-show-again": "No mostrar este mensaje de nuevo.", + "understood-and-close": "Entedido y cerrar.", + "ported-licence": "Algunas licencias Creative Commons fueron publicadas con ediciones específicas por país, llamadas «ported license». La imagen que solicitas fue publicada con una licencia «ported». La herramienta no está capacitada para comprobar si los requisitos de la licencia Creative Commons de este país en concreto son iguales que los de la versión en inglés. Sin embargo, todavía puedes generar el aviso de licencia de atribución con esta herramienta. Para estar totalmente seguros recomendamos comprobar los requisitos de la versión específica del país para la misma. Adicionalmente, el aviso de licencia tiene que estar en el idioma de su contexto para completar su función íntegramente." + }, + "dialogue": { + "public-domain-picture": "Esta imagen fue marcada como dominio público cuando se subió, por lo que no necesitas un aviso de licencia.", + "no-attribution-needed": "No se necesita un aviso de licencia", + "more-information": "más información", + "adjust-attribution-for-usage": "Adaptar el aviso de licencia para el caso de uso", + "adjust-legal-notice-for-usage": "Adaptar el aviso derechos para el caso de uso", + "public-domain-text": "

De acuerdo a los detalles que fueron detectados, esta imagen está libre de derechos de autor y puede ser utilizada sin ningún requisito de licencia e incluso sin mencionar ningún autor ni licencia.

Sin embargo, bajo la ley alemana de derechos de autor, un autor siempre conserva algunos derechos irrenunciables en cada uno de sus trabajos. Por este motivo, recomendamos no reclamar falsamente la autoría de la imagen ni usarla de cualquier manera que podría considerarse perjudicial para la reputación del autor. Además, es recomendable informar a otros usuarios sobre el estatus de dominio público de esta imagen.

En algunos países (incluido Alemania) hay regularmente reclamaciones para la protección de reproducciones fotográficas de trabajos en dominio público. Esto se aplica a ambos, imágenes de esculturas y otras obras tridimensionales, así como fotografías de pinturas. Es responsabilidad de los reutilizadores aclarar si esto les afecta cuando utilizan la respectiva imagen.

", + "type-of-use-headline": "¿Cómo quieres utilizar la imagen?", + "author-headline": "¿Cuál es el nombre (o nombres) del autor o del titular de sus derechos?", + "compilation-headline": "¿Cómo quieres publicar la imagen?", + "editing-headline": "¿Quieres utilizar una versión modificada de la imagen?", + "change-headline": "¿Qué modificaste?", + "change-pd-headline": "¿Qué parte de la imagen será modificada?", + "creator-headline": "¿Cómo quieres que se atribuyan tus modificaciones?", + "licence-headline": "¿Bajo qué licencia te gustaría publicar la imagen modificada?", + "done-headline": "¡Enhorabuena!", + "answer-print": "En un contexto en el que no puedes utilizar hipervínculos (p. ej. materiales impresos, conjunto de diapositivas).", + "answer-online": "En línea.", + "author-label": "Por favor, rellena la información y declara cualquier atribución a otras partes (como «patrocinado por X» o «publicado por Y») si es aplicable:", + "next": "Siguiente", + "answer-no-author": "No hay información disponible.", + "answer-compilation": "Combinada con otras obras.", + "answer-no-compilation": "Sola.", + "answer-edited": "Sí.", + "answer-not-edited": "No, quiero utilizar la imagen en su versión original sin modificar.", + "author-question-mark": "Esto es para los nombres o pseudónimos atribuidos al autor o autores, o del titular de los derechos de autor. La información tiene que indicarse de la misma manera que se encontró en la fuente, incluyendo © y el año.", + "change-question-mark": "Proporcionar información breve, como un «Extracto» o la «Coloración», será suficiente.", + "compilation-question-mark": "Por favor, elige esta opción si piensas que la publicación de esta imagen junto con otras obras (debido a su selección y disposición) en forma de colección de obras es una creación intelectual en sí misma, p. ej. la nueva obra, debido a su originalidad, es una obra digna de protección por derechos de autor de forma adicional a las obras que contiene. Por ejemplo, se podría dar este caso si creas un libro de fotografías o una recopilación de «mejores imágenes». La situación es diferente si creas un «remix», como un collage de varias imágenes, que en la mayoría de los casos no resultará en una colección, pero sí en una obra compuesta o una adaptación de las imágenes usadas para ello.", + "editing-question-mark": "Todos los cambios de la imagen que alteran su impacto en los espectadores (tales como recortes, coloración, cambios de tamaño drásticos, etc.) convierten el resultado en una adaptación, en el sentido legal. En cambio, modificar el formato de la imagen o digitalizarla no crea una adaptación porque la imagen y el impacto, o impresión que da, se mantiene igual.", + "licence-question-mark": "La herramienta solo ofrece licencias que son compatibles con la licencia Creative Commons que corresponde a la obra original.", + "creator-question-mark": "Por favor, indica tu nombre completo si es posible. También es posible indicar un pseudónimo, apodo o indicar «anónimo».", + "same-licence": "La misma licencia que la obra original", + "licence-text": "Texto de la licencia", + "download-image-link": "Descargar la imagen", + "file-page-link": "Dirección web de la imagen en Wikimedia Commons", + "done": "Hecho", + "typeOfUse": "Tipo de uso", + "author": "Autor", + "compilation": "Colección", + "editing": "Adaptación", + "change": "Cambios", + "creator": "Creador", + "licence": "Licencia", + "back-to-top": "Comprobar otra imagen", + "force-pd-attribution": "Crear un aviso legal de todos modos", + "pd-attribution-hint": "marcado como dominio público", + "check-details": "para más detalles véase", + "here": "aquí", + "mark-as-pd": "marcar como dominio público" + }, + "evaluation": { + "by": "por", + "edited": "modificado", + "done-text": "Has respondido a todas las preguntas. Estás listo/a para utilizar el aviso de licencia correcto.", + "done-text-legal-notice": "Has respondido a todas las preguntas. Ya puedes utilizar el aviso legal correcto.", + "your-attribution": "Tu aviso de licencia", + "your-legal-notice": "Tu aviso legal", + "copy": "Copiar", + "do-print-text": "Deberías mostrar esta información lo más cerca posible, razonablemente, de la imagen (p. ej. debajo de la misma). En cualquier caso, quienes vean la imagen deben ser capaces de encontrar la información fácilmente. Si tienes un libro o una revista, las atribuciones también podrían colocarse en la página de imprenta o en otra ubicación estandar, siempre que se pueda identificar fácilmente la información de atribución de cada imagen (p. ej. aportando el número de página).", + "do-online-text": "Tenga en cuenta que el aviso de licencia incluye hipervínculos que deben incluirse siempre que hagas uso del aviso de licencia. Deberías mostrar esta información lo más cerca, posible, razonablemente, de la imagen (p. ej. debajo de la misma). En cualquier caso, quienes vean la imagen deben ser capaces de encontrar la información fácilmente. Si tienes un libro o una revista, las atribuciones también podrían colocarse en la página de imprenta o en otra ubicación estandar, siempre que se pueda identificar fácilmente la información de atribución de cada imagen (p. ej. aportando el número de página). Para que te sea más fácil, la herramienta proporciona la atribución incluyendo todos los hipervínculos en formato de texto sin formato así como un fragmento HTML. De esta forma, puedes transferirlo directamente al código fuente de su página web.", + "do-compilation-text": "Si el titular de la licencia pide que no publiques su nombre, el título de la obra o cualquier otra información, por favor, mantén solamente el hipervínculo. La herramienta aporta el hipervínculo con el botón indicado abajo. Los autores o titulares de los derechos pueden decidir por ellos mismos, si sus nombres o el título de las imágenes se publiquen o no en el caso de que las imágenes formen parte de una colección con la que no quieren que se les asocie.", + "dont-terms-of-use-headline": "No impongas más condiciones", + "dont-terms-of-use-text": "No estás autorizado a imponer más condiciones respecto del uso de la imagen, que podría restringir los derechos concedidos por la licencia Creative Commons (p. ej. no se permite prohibir la distribución de contenidos de una determinada página web, siempre y cuando las imágenes con licencia CC no estén explícitamente exentas de esta prohibición).", + "dont-sublicences-headline": "No se permite sublicenciar.", + "dont-sublicences-text": "No estás autorizado para sublicenciar la obra. Esto significa que no estás autorizado a establecerte como el licenciante de esta obra. Solo te conviertes en licenciante si modificaste la imagen (y esto, solo con respecto a tus modificaciones, y no a la imagen original). Quienes reciban la foto, a través de ti, recibirán la licencia Creative Commons ofrecida directamente del licenciante de la imagen original y no de ti, como transmisor.", + "dont-cc-licence-headline": "Avisos legales vigentes", + "dont-cc-licence-text": "Si encuentras cualquier otro aviso de licencia Creative Commons o limitaciones de responsabilidad, no estás autorizado a cambiarlos.", + "dont-technical-protection-headline": "No impongas ninguna medida técnica de protección", + "dont-technical-protection-text": "No estás autorizado a imponer ninguna medida técnica de protección a la imagen, ya que puede restringir los derechos que se derivan de la licencia Creative Commons (p. ej. los mecanismos de protección contra copia restringen la impresión de un archivo PDF).", + "dont-rightholder-connection-headline": "Ninguna conexión especial con el titular de los derechos", + "dont-rightholder-connection-text": "No estás autorizado a utilizar esta imagen de un modo que podría ser percibido como indicador de que el titular de los derechos o cualquier otra persona reconocidas mencionadas, te conceden derechos en una transacción independiente o de cualquier otra manera respaldan tu uso específico de la imagen. ", + "show-licence-text": "Ver el texto completo de la licencia", + "show-cc-zero-text": "Mostrar el texto completo de la declaración de liberación", + "anonymous": "anónimo", + "copy-hint": "Copiar el texto marcado" + } +} + +},{}],4:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Generator Atribusi", + "description": "Informasi lisensi untuk gambar dari Wikipedia dan Wikimedia Commons", + "no-script": "Javascript harus diaktifkan untuk menggunakan halaman ini.", + "how-it-works-1": "Masukkan alamat dari gambar Wikimedia Commons atau artikel Wikipedia untuk memulai alat ini.", + "how-it-works-2": "Jawab pertanyaan tentang penggunaan yang dimaksudkan untuk membuat pemberitahuan lisensi yang bener.", + "how-it-works-3": "Baca cara menggunakan pemberitahuan lisensi.", + "how-it-works-4": "Salin pemberitahuan lisensi yang dihasilkan dan masukkan ke dalam publikasi Anda untuk menggunakan gambar dengan benar.", + "how-it-works": "Bagaimana cara kerjanya?", + "input-placeholder": "Alamat web dari gambar Wikimedia Commons atau artikel Wikipedia.", + "go-button": "Ayo!", + "feedback-name": "Nama", + "feedback-response-email": "Alamat surel", + "feedback-body": "Umpan balik", + "feedback-submit": "Kirim", + "feedback-thanks": "Terima kasih atas umpan balik Anda!", + "feedback": "Umpan balik", + "about": "Tentang", + "legal": "Kebijakan Jejak dan Privasi", + "legal-tracking-switch": "Hapus centang untuk berhenti melacak kunjungan Anda.", + "legal-hosting": "Alat ini dihosting di Wikimedia Labs. Baca ketentuan penggunaan di https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Penggunaan pribadi murni (tanpa publikasi) dan pengecualian serta batasan hak cipta lainnya" + }, + "error": { + "generic": "Terjadi kesalahan yang tidak terduga. Maaf", + "mediatype-unsupported": "Sayangnya, jenis media ini tidak didukung oleh alat ini saat ini. Maaf.", + "licence-unsupported": "Sayangnya, jenis lisensi yang terdeteksi tidak didukung oleh alat alat saat ini. Maaf.", + "url-invalid": "Alamat situs yang Anda berikan tidak dapat diproses. Maaf", + "licence-not-recognized": "Sayangnya, format informasi lisensi yang disimpan untuk gambar ini tidak didukung oleh alat ini saat ini. Maaf.", + "send-feedback": "Ada Sesuatu yang tidak berfungsi. Silakan coba lagi.", + "feedback-generic": "Ada Sesuatu yang tidak berfungsi. Silakan coba lagi.", + "feedback-blank-fields": "Harap isi semua kolom pada formulir umpan balik.", + "no-images-found": "Artikel Wikipedia ini tidak mengandung gambar apa pun.", + "no-wiki-url": "Pada saat ini, Generator Atribusi hanya dapat gambar dari Wikipedia dan Wikimedia Commons.", + "invalid-email-format": "Alamat surel yang diberikan tidak sesuai dengan format yang valid.", + "no-cc-licence": "File ini tidak dilisensikan di bawah Creative Commons." + }, + "info-box": { + "private-use": "Untuk sebagian besar penggunaan yang murni pribadi, Anda tidak memerlukan pemberitahuan lisensi.", + "private-use-more-link": "→ PELAJARI LEBIH LANJUT.", + "dont-show-again": "Jangan tampilkan pesan ini lagi.", + "understood-and-close": "Mengerti dan tutup.", + "ported-licence": "Lisensi Creative Commons tertentu diterbikan dengan edisi khusus untuk negara tertentu, yang disebut “ported licenses”. Gambar yang Anda minta pemberitahuan lisensinya, diterbikan dengan lisensi porting tersebut. Alat ini tidak bisa memeriksa apakah persyaratan lisensi dari lisensi Creative Commons khusus negara ini sama dengan versi dalam bahasa Indonesia. Namun, Anda masih dapat membuat lisensi dengan alat ini. Untuk memastikannya, kami sarankan untuk memeriksa persyaratan lisensi versi khusus negara ini. Selain itu, pemberitahuan lisensi harus dalam bahasa yang sesuai dengan konteksnya agar dapat memenuhi fungsinya sepenuhnya." + }, + "dialogue": { + "public-domain-picture": "Gambar ini setelah diunggah, dinyatakan sebagai domain publik, jadi Anda tidak memerlukan pemberitahuan lisensi untuk gambar ini.", + "no-attribution-needed": "Tidak perlu pemberitahuan lisensi", + "more-information": "informasi lebih lanjut", + "adjust-attribution-for-usage": "Menyesuaikan pemberitahuan lisensi dengan kasus penggunaan", + "adjust-legal-notice-for-usage": "Menyesuaikan pemberitahuan hukum dengna kasus penggunaan", + "public-domain-text": "

Menurut rincian yang terdeteksi, gambar ini bebas dari hak cipta dan dapat digunakan tanpa persyaratan lisensi apapun, bahkan tanpa menyebutkan pengarang atau lisensinya.

Namun demikian, menurut hukum hak cipta Jerman, seorang pengarang selalu memiliki beberapa hak yang tidak dapat dibatalkan untuk setiap karya. Oleh karena itu, kami menyarankan untuk tidak mengklaim kepengarangan gambar secara salah atau menggunakan gambar dengan cara yang dianggap berbahaya bagi reputasi pengarang. Selain itu, disarankan untuk memberi tahu pengguna lain tentang status domain publik gambar ini.

Di beberapa negara (termasuk Jerman), secara terartur ada klaim untuk perlindungan reproduksi fotografi karya dalam domain publik. Hal ini berlaku untuk foto patung dan karya tiga dimensi lainnya, serta foto lukisan. Adalah tanggung jawab pengguna untuk mengklarifikasi apakah mereka terpengaruh saat menggunakan gambar yang bersangkutan./p>", + "force-pd-attribution": "Tetap buat pemberitahuan hak", + "type-of-use-headline": "Bagaimana Anda ingin menggunakan gambar tersebut?", + "author-headline": "Siapa nama (atau nama-nama) penulis atau pemegang hak cipta?", + "compilation-headline": "Bagaimana Anda ingin mempublikasikan gambar?", + "editing-headline": "Apakah Anda ingin menggunakan gambar dalam bentuk yang sudah dimodifikasi?", + "change-headline": "Apa yang Anda modifikasi?", + "change-pd-headline": "Bagian mana dari gambar yang akan dimodifikasi?", + "creator-headline": "Bagaimana Anda ingin modifikasi Anda dikaitkan dengan diri Anda sendiri?", + "licence-headline": "Di bawah lisensi mana Anda ingin mempublikasikan gambar yang telah dimodifikasi?", + "done-headline": "Selamat!", + "answer-print": "Dalam kontes, di mana Anda tidak dapat menggunakan tautan (misalnya produk cetak, kumpulan slide).", + "answer-online": "Daring.", + "author-label": "Harap isi informasi dan sebutkan juga setiap atribusi kepada pihak lain (seperti “disponsori oleh X” atau “diterbitkan oleh Y”) jika ada:", + "next": "Selanjutkan", + "answer-no-author": "Tidak ada informasi yang tersedia mengenai hal ini.", + "answer-compilation": "Dikombinasikan dengan karya-karya lain.", + "answer-no-compilation": "Dengan dirinya sendiri.", + "answer-edited": "Iya.", + "answer-not-edited": "Tidak, saya ingin menggunakan gambar dalam bentuk aslinya yang belum dimodifikasi.", + "author-question-mark": "Ini untuk nama yang diatribusikan atau nama samaran dari penulis atau pemegang hak. Informasi harus dinyatakan persis seperti yang ditentukan di sumbernya, termasuk © dan/atau tahun.", + "change-question-mark": "Info singkat seperti “kutipan” atau “warna” sudah cukup memadai.", + "compilation-question-mark": "Silakan pilih opsi ini jika menurut Anda, publikasi gambar Anda bersama dengan karya lain (karena pemilihan dan pengaturannya) sebagai koleksi merupakan suatu ciptaan intelektual tersendiri, yaitu, koleksi tersebut, karena keasliannya, merupakan suatu ciptaan di luar karya-karya yang terdapat di dalamnya. Misalnya, hal ini dapat terjadi jika Anda membuat buku foto atau koleksi foto terbaik dari gambar-gambar tertentu. Situasinya berbeda jika Anda membuat remix, seperti kolase beberapa gambar, yang pada umumnya tidak akan menghasilkan koleksi, tetapi merupakan adaptasi gambar yang digunakan untuk itu.", + "editing-question-mark": "Semua perubahan pada gambar yang mengubah kesan pada penikmatnya (seperti pemotongan, pewarnaan, pengubahan ukuran secara drastis, dll.) membuat hasilnya merupakan adaptasi dalam pengertian hukum. Sebaliknya, mengubah format file gambar atau mendigitalkannya, tidak menghasilkan adaptasi, karena gambar dan kesan yang diberikannya tetap sama.", + "licence-question-mark": "Alat ini hanya menawarkan lisensi yang kompatibel dengan lisensi Creative Commons yang dilampirkan pada karya asli.", + "creator-question-mark": "Mohon sebutkan nama lengkap Anda, jika memungkinkan. Nama samaran, nama panggilan, atau “anonim” juga dapat digunakan.", + "same-licence": "Lisensi yang sama dengan karya aslinya.", + "licence-text": "Teks lisensi", + "download-image-link": "Unduh gambar", + "file-page-link": "Alamat web gambar di Wikimedia Commons", + "done": "Selesai", + "typeOfUse": "Jenis penggunaan", + "author": "Penulis", + "compilation": "Koleksi", + "editing": "Adaptasi", + "change": "Perubahan", + "creator": "Pencipta", + "licence": "Lisensi", + "back-to-top": "Periksa gambar lain", + "force-pd-attribution": "Tetap buat pemberitahuan hukum", + "pd-attribution-hint": "ditandai sebagai domain publik", + "check-details": "detail lebih lanjut tentang", + "here": "disini", + "mark-as-pd": "ditandai sebagai domain publik" + }, + "evaluation": { + "by": "oleh", + "edited": "dimodifikasi", + "done-text": "Anda telah menjawab semua pertanyaan. Anda siap untuk menggunakan pemberitahuan lisensi yang benar.", + "done-text-legal-notice": "Anda telah menjawab semua pertanyaan. Anda siap untuk menggunakan pemberitahuan hukum yang benar.", + "your-attribution": "Pemberitahuan lisensi Anda", + "your-legal-notice": "Pemberitahuan hukum Anda", + "copy": "salin", + "do-print-text": "Anda harus menunjukkan informasi ini sedekat mungkin dengan gambar (misalnya, tepat di bawahnya). Bagaimanapun, pemirsa harus dapat menemukan informasi tersebut dengan mudah. Jika Anda memiliki buku atau majalah, atribusi juga dapat ditempatkan di dalam cetakan atau di lokasi standar lainnya, selama orang dapat dengan mudah mengidentifikasi gambar yang menjadi milik setiap informasi atribusi (misalnya, dengan memberikan nomor halaman).", + "do-online-text": "Harap diperhatikan, bahwa pemberitahuan lisensi mencakup tautan, yang harus disertakan di mana pun Anda menggunakan pemberitahuan lisensi. Anda harus menampilkan informasi ini sedekat mungkin dengan gambar (misalnya, tepat di bawahnya). Bagaimanapun juga, pemirsa harus dapat menemukan informasi tersebut dengan mudah. Untuk memudahkan Anda, alat ini menyediakan atribusi termasuk semua tautan dalam format teks biasa dan sebagai cuplikan html. Dengan cara ini, Anda dapat mentransfernya langsung ke dalam kode sumber halaman web Anda.", + "do-compilation-text": "Jika pemegang lisensi meminta Anda untuk tidak mempublikasikan nama mereka, judul karya atau informasi lainnya, sebutkan tautan lisensinya saja. Alat ini menyediakannya dengan tombol di bawah ini. Penulis/pemegang hak dimaksudkan untuk dapat memutuskan sendiri, apakah nama mereka atau judul gambar dipublikasikan atau tidak jika gambar tersebut merupakan bagian dari koleksi yang tidak ingin mereka kaitkan.", + "dont-terms-of-use-headline": "Jangan memaksakan kondisi lebih lanjut", + "dont-terms-of-use-text": "Anda tidak diizinkan untuk memaksakan ketentuan lebih lanjut mengenai gambar, yang dapat membatasi hak yang diberikan melalui lisensi Creative Commons (misalnya, tidak melarang distribusi konten halaman web tertentu, selama gambar berlisensi CC tidak secara eksplisit dikecualikan dari larangan ini).", + "dont-sublicences-headline": "Tidak diperbolehkan melakukan sublisensi", + "dont-sublicences-text": "Anda tidak diizinkan untuk mensublisensikan karya tersebut. Itu berarti, bahwa Anda tidak diizinkan untuk menyatakan diri Anda sebagai pemberi lisensi. Hanya jika Anda memodifikasi gambar tersebut, Anda dapat menjadi pemberi lisensi (dan hanya terbatas pada modifikasi Anda, bukan pada gambar aslinya). Orang lain yang nantinya akan menerima foto tersebut dari Anda, menerima penawaran lisensi Creative Commons langsung dari pemberi lisensi gambar asli dan bukan dari Anda sebagai pengirim.", + "dont-cc-licence-headline": "Pemberitahuan hukum yang berlaku", + "dont-cc-licence-text": "Jika Anda menemukan pemberitahuan lisensi Creative Commons atau batasan tanggung jawab, Anda tidak diizinkan untuk mengubahnya.", + "dont-technical-protection-headline": "Jangan menerapkan upaya perlindungan teknis apa pun", + "dont-technical-protection-text": "Anda tidak diizinkan untuk memaksakan tindakan perlindungan teknis apa pun terkait gambar, yang dapat membatasi hak-hak yang berasal dari lisensi Creative Commons (misalnya, mekanisme perlindungan penggandaan yang membatasi pencetakan file PDF).", + "dont-rightholder-connection-headline": "Tidak ada koneksi khusus ke pemegang hak", + "dont-rightholder-connection-text": "Anda tidak diperkenankan untuk menggunakan gambar dengan cara yang dapat dianggap mengindikasikan bahwa pemegang hak atau pihak-pihak atribusi yang disebutkan memberikan hak kepada Anda dalam suatu transaksi individual atau mendukung penggunaan gambar secara spesifik oleh Anda.", + "show-licence-text": "Lihat teks lisensi selengkapnya", + "show-cc-zero-text": "Lihat teks lengkap dari pernyataan rilis", + "anonymous": "anonim", + "copy-hint": "Salin teks yang ditandai" + } +} + +},{}],5:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Generator atrybucji", + "description": "Notka licencyjna dla obrazów z Wikipedii i Wikimedia Commons", + "no-script": "Aby korzystać z tej strony, musisz włączyć obsługę Javascriptu.", + "how-it-works-1": "Aby rozpocząć korzystanie z narzędzia, podaj adres WWW artykułu na Wikipedii lub obrazu z Wikimedia Commons.", + "how-it-works-2": "Odpowiedz na pytania, w jaki sposób zamierzesz korzystać z grafiki. Pozwoli to na przygotownie odpowiedniej noty licencyjnej.", + "how-it-works-3": "Przeczytaj co zrobić z notką licencyjną.", + "how-it-works-4": "Skopiuj wygenerowany tekst i umieść go w swojej publikacji, aby poprawnie korzystać z grafiki.", + "how-it-works": "Jak to działa?", + "input-placeholder": "Adres WWW artykułu na Wikipedii lub obrazu z Wikimedia Commons.", + "go-button": "Zaczynamy!", + "feedback-name": "Imię", + "feedback-response-email": "Adres e-mail", + "feedback-body": "Opinia", + "feedback-submit": "Wyślij", + "feedback-thanks": "Dziękujemy za Twoją opinię!", + "feedback": "Opinia", + "about": "O narzędziu", + "legal": "Kontakt i polityka prywatności", + "legal-tracking-switch": "Odznacz to pole, by zatrzymać śledzenie Twojej wizyty na stronie.", + "legal-hosting": "To narzędzie jest hostowane w chmurze Wikimedia Cloud Services. Przeczytaj Zasady użytkowania na https://wikitech.wikimedia.org/wiki/Wikitech:Cloud_Services_Terms_of_use.", + "private-use": "Użytek prywatny (bez publikacji) i inne wyjątki od prawa autorskiego" + }, + "error": { + "generic": "Wystąpił nieznany błąd. Przepraszamy.", + "mediatype-unsupported": "Niestety, ten format pliku multimedialnego jest nieobsługiwany w tej chwili. Przepraszamy.", + "licence-unsupported": "Niestety, wykryta licencja nie jest w tej chwili obsługiwana. Przepraszamy.", + "url-invalid": "Podany adres WWW nie może być przetworzony. Przepraszamy.", + "licence-not-recognized": "Niestety, format informacji licencyjnych, skojarzonych z obrazem, nie jest w tej chwili obsługiwany. Przepraszamy.", + "send-feedback": "Coś nie zadziałało. Spróbuj jeszcze raz.", + "feedback-generic": "Coś nie zadziałało. Spróbuj jeszcze raz.", + "feedback-blank-fields": "Wypełnij wszystkie pola formularza opinii.", + "no-images-found": "Wskazany artykuł Wikipedii nie zawiera obrazów.", + "no-wiki-url": "Generator atrybucji obsługuje jedynie grafiki z Wikipedii i Wikimedia Commons", + "invalid-email-format": "Podany adres e-mail ma niepoprawny format.", + "no-cc-licence": "Narzędzie obsługuje wyłącznie pliki na licencji Creative Commons. Wskazana grafika jest udostępniona na innej licencji.", + "response-unexpected": "Nieoczekiwana odpowiedź serwera. Przepraszamy." + }, + "info-box": { + "private-use": "Jeśli zamierzasz wykorzystać grafikę do celów prywatnych, zazwyczaj nie potrzebujesz noty licencyjnej.", + "private-use-more-link": "→ DOWIEDZ SIĘ WIĘCEJ", + "dont-show-again": "Nie pokazuj ponownie.", + "understood-and-close": "Rozumiem. Zamknij.", + "ported-licence": "Pewne licencje Create Commons miały wersje lokalizowane dla poszczególnych państw (z ang. „ported licenses”). Jedną z takich licencji jest objęte zdjęcie, które wybrałeś(-aś). Niniejsze narzędzie nie jest w stanie sprawdzić, czy wymogi tej licencji są identyczne jak wersji międzynarodowej. Mimo to, nadal możesz wygenerować notkę licencyjną dla tej grafiki. Dla absolutnej pewności, zalecamy sprawdzenie wymagań licencji. Ponadto, aby notka mogła spełniać swoją funkcję, powinna ona być w języku takim, jak jej otoczenie." + }, + "dialogue": { + "public-domain-picture": "To zdjęcie zostało oznaczone jako znajdujące się w domenie publicznej. Wobec tego, nie potrzebujesz dla niego żadnej notki.", + "no-attribution-needed": "Notka licencyjna nie jest potrzebna", + "more-information": "Więcej informacji", + "adjust-attribution-for-usage": "Dostosuj notę licencyjną do przypadku użycia", + "adjust-legal-notice-for-usage": "Dostosuj notę prawną do przypadku użycia", + "public-domain-text": "

Wykryliśmy, że to zdjęcie nie jest objęte prawem autorskim i może być wykorzystywane bez żadnych ograniczeń licencyjnych, nawet bez wspomnienia autora czy licencji.

Jednakże, zgodnie z prawem autorskim w Niemczech, autor zawsze zachowuje pewne niezbywalne prawa do każdej swojej pracy. Z tego powodu odradzamy czynienie fałszywych twierdzeń o autorstwie tego obrazu. Nie zalecamy również używać go w taki sposób, który mógłby narazić reputację autora na szwank. Warto poinformować inne osoby o przynależności tego utworu do domeny publicznej.

W niektórych państwach (na przykład w Niemczech) regularnie zdarzają się roszczenia o ochronę reprodukcji fotograficznych prac, które znajdują się w domenie publicznej. Dotyczy to zdjęć rzeźb i innych dzieł trójwymiarowych, a także fotografii obrazów. Na użytkownikach pracy spoczywa odpowiedzialność, by upewnić się, że mogą korzystać z odpowiednich grafik.

", + "type-of-use-headline": "Jak chcesz korzystać z tej grafiki?", + "author-headline": "Kto jest autorem lub właścicielem praw autorskich?", + "compilation-headline": "Jak chcesz opublikować ten obraz?", + "editing-headline": "Czy zamierzasz wykorzystać tę grafikę w zmienionej formie?", + "change-headline": "Co zostało zmienione?", + "change-pd-headline": "Jaka część obrazu zostanie zmieniona?", + "creator-headline": "Jak chcesz być podpisany(-a) jako autor(-ka) zmian?", + "licence-headline": "Pod jaką licencją chcesz udostępnić zmodyfikowany obraz?", + "done-headline": "Gotowe!", + "answer-print": "W formie, w której nie jest możliwe zastosowanie hiperłączy (np. prace drukowane, prezentacje)", + "answer-online": "W internecie", + "author-label": "Podaj informację i umieść również atrybucję stron trzecich, jeśli to konieczne (np. „sponsorowane przez X” czy „opublikowane przez Y”)", + "next": "Dalej", + "answer-no-author": "Informacja niedostępna.", + "answer-compilation": "W połączeniu z innymi pracami", + "answer-no-compilation": "Samodzielnie", + "answer-edited": "Tak", + "answer-not-edited": "Nie, chcę użyć tej grafiki bez modyfikacji", + "author-question-mark": "Tutaj należy podać imię, nazwę lub pseudonim autora/autorów lub właścicieli praw autorskich do pracy. Tę informację należy podać dokładnie tak, jak widnieje w źródle, włącznie z © i/lub rokiem.", + "change-question-mark": "Krótkie stwierdzenia jak „kadrowanie” lub „koloryzacja” są wystarczające.", + "compilation-question-mark": "Wybierz tę opcję, jeśli uważasz, że Twoja publikacja grafiki razem z innymi jest sama w sobie utworem, ze względu na swoją oryginalność. Taka sytuacja zachodzi na przykład, gdy tworzysz album lub kolekcję najlepszych obrazów na dany temat. Stworzenie remiksu lub kolażu z kilku zdjęć jest ich adaptacją i nie tworzy nowego utworu w sensie prawa autorskiego.", + "editing-question-mark": "Wszystkie zmiany obrazu, które zmieniają jego percepcję (jak kadrowanie, koloryzacja, znaczna zmiana rozmiarów itp.) powodują powstanie adaptacji w sensie prawnym. Z drugiej strony, zmiana formatu pliku lub digitalizacja nie są adaptacjami, bo wygląd grafiki jest niezmieniony.", + "licence-question-mark": "To narzędzie oferuje jedynie licencje zgodne z tą, która obejmowała pracę pierwotną.", + "creator-question-mark": "Podaj, jeśli to możliwe, swoje imię i nazwisko. Pseudonim, nick albo „anonimowy” również mogą zostać użyte.", + "same-licence": "Taka sama licencja jak w oryginalnej pracy", + "licence-text": "Tekst licencji", + "download-image-link": "Pobierz obraz", + "file-page-link": "Zobacz grafikę w Wikimedia Commons", + "done": "Gotowe", + "typeOfUse": "Sposób użycia", + "author": "Autor", + "compilation": "Kompilacja", + "editing": "Adaptacja", + "change": "Zmiany", + "creator": "Modyfikujący", + "licence": "Licencja", + "back-to-top": "Kolejny obraz", + "force-pd-attribution": "Utwórz notkę mimo wszystko", + "pd-attribution-hint": "oznaczony jako w domenie publicznej", + "check-details": "więcej szczegółów na", + "here": "tutaj", + "mark-as-pd": "oznacz jako w domenie publicznej" + }, + "evaluation": { + "by": "przez", + "edited": "edytowany", + "done-text": "To już wszystkie pytania. Możesz użyć odpowiedniej dla siebie notki licencyjnej.", + "done-text-legal-notice": "To już wszystkie pytania. Możesz użyć odpowiedniej dla siebie noty prawnej.", + "your-attribution": "Twoja nota licencyjna", + "your-legal-notice": "Twoja nota prawna", + "copy": "Skopiuj", + "do-print-text": "Umieść tę informację tak blisko grafiki jak to w rozsądny sposób możliwe (np. tuż pod obrazkiem). W każdym razie, oglądający musi być w stanie łatwo to miejsce znaleźć. Jeśli wykorzystujesz tę grafikę w magazynie lub książce, atrybucję możez umieścić również w spisie źródeł ilustracji bądź innym standardowym miejscu, pod warunkem, że da się łatwo określić, która grafika jest przez tę notkę opisywana (np. za pomocą numeru strony).", + "do-online-text": "Zwróć uwagę, że notka licencyjna zawiera hiperłącza, które muszą pozostać zachowane, kiedy jej używasz. Umieść tę informację tak blisko grafiki jak to w rozsądny sposób możliwe (np. tuż pod obrazkiem). W każdym razie, oglądający musi być w stanie łatwo to miejsce znaleźć. Dla ułatwienia, wygenerowaliśmy dla Ciebie tekst atrybucji zarówno w formie czystego tekstu, jak i kodu HTML, który możesz skopiować na swoją stronę internetową.", + "do-compilation-text": "Jeżeli dysponent praw poprosił Cię, by nie umieszczać jego nazwiska, tytułu pracy lub innych informacji, umieść sam link do licencji. Możesz do tego wykorzystać przycisk poniżej. Właściciele praw autorskich mogą decydować, które elementy podpisu powinny być uwzględniane w przypadku tworzenia z ich prac kolekcji, z którą nie chcą być wiązani.", + "dont-terms-of-use-headline": "Nie nakładaj dodatkowych warunków", + "dont-terms-of-use-text": "Nie masz prawa nakładać żadnych dodatkowych warunków dotyczących obrazu, które mogłyby ograniczyć swobody, wynikające z licencji Creative Commons (np. nie możesz zabronić ponownego wykorzystania treści z konkretnej strony internetowej, jeśli jawnie nie wyłączysz z tego ograniczenia prac na licencjach CC).", + "dont-sublicences-headline": "Zakaz sublicencjonowania", + "dont-sublicences-text": "Nie możesz udzielać sublicencji na pracę. To znaczy, nie możesz występować w roli licencjodawcy. Możesz się nim stać jedynie kiedy zmodyfikujesz utwór – wtedy możesz udzielać licencji wyłącznie na swoje zmiany. Osoby, które dostaną zdjęcie od Ciebie, otrzymują licencję Creative Commons wprost od pierwotnego autora, bez Twojego udziału.", + "dont-cc-licence-headline": "Istniejące noty prawne", + "dont-cc-licence-text": "Jeśli trafisz na noty licencyjne Creative Commons lub na wyłączenia odpowiedzialności, nie możesz ich zmieniać.", + "dont-technical-protection-headline": "Nie nakładaj technicznych środków ochronnych", + "dont-technical-protection-text": "Nie możesz wprowadzać do dzieła żadnych technicznych środków, które mogłyby przeciwdziałać korzystaniu z praw, wynikających z właściwej licencji Creative Commons (np. mechanizmu, który zablokuje drukowanie pliku PDF).", + "dont-rightholder-connection-headline": "Brak szczególnych powiązań z dysponentem praw", + "dont-rightholder-connection-text": "Nie możesz wykorzystywać obrazu w sposób, który sugerowałby, że właściciel praw autorkich albo inna strona przyznała Ci prawa w sposób indywidualny lub w inny sposób poparła konkretny sposób wykorzystania grafiki.", + "show-licence-text": "Zobacz pełny tekst licencji", + "show-cc-zero-text": "Zobacz pełny tekst oświadczenia o uwolnieniu", + "anonymous": "anonimowy", + "copy-hint": "Skopiuj zaznaczony tekst" + } +} + +},{}],6:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Gerador de Atribuição", + "description": "Informação da licença para imagens da Wikipédia e Wikimedia Commons", + "no-script": "Precisa de ter o Javascript ativado para usar esta página.", + "how-it-works-1": "Insira o endereço Web de uma imagem da Wikimedia Commons ou de um artigo da Wikipédia para iniciar a ferramenta.", + "how-it-works-2": "Responda às perguntas sobre a utilização pretendida, para criar um aviso de licença correto.", + "how-it-works-3": "Leia como usar o aviso de licença.", + "how-it-works-4": "Copie o aviso de licença gerado e insira-o na sua publicação para usar a imagem corretamente.", + "how-it-works": "Como funciona?", + "input-placeholder": "Endereço Web de uma imagem da Wikimedia Commons ou de um artigo da Wikipédia.", + "go-button": "Vamos começar!", + "feedback-name": "Nome", + "feedback-response-email": "Endereço de e-mail", + "feedback-body": "Feedback", + "feedback-submit": "Enviar", + "feedback-thanks": "Obrigado pelo seu comentário!", + "feedback": "Comentário", + "about": "Sobre", + "legal": "Política de privacidade", + "legal-tracking-switch": "Remova a marca de verificação para parar o rastreamento da sua visita.", + "legal-hosting": "Esta ferramenta está hospedada no Wikimedia Labs. Leia os Termos de Uso em https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Uso puramente privado (sem publicação) e outras exceções e limitações ao direito de autor" + }, + "error": { + "generic": "Ocorreu um erro imprevisto. Pedimos desculpa.", + "mediatype-unsupported": "Infelizmente, este tipo de arquivo multimédia não é suportado pela ferramenta neste momento. Pedimos desculpa.", + "licence-unsupported": "Infelizmente, o tipo de licença detectado não é suportado pela ferramenta neste momento. Pedimos desculpa.", + "url-invalid": "O endereço Web que você forneceu não pôde ser processado. Pedimos desculpa.", + "licence-not-recognized": "Infelizmente, o formato da informação da licença armazenada para esta imagem não é suportado pela ferramenta neste momento. Pedimos desculpa.", + "send-feedback": "Algo não funcionou corretamente. Tente novamente.", + "feedback-generic": "Algo não funcionou corretamente. Tente novamente", + "feedback-blank-fields": "Por favor, preencha todos os campos do formulário de feedback.", + "no-images-found": "Esta página da Wikipedia não contém nenhuma imagem.", + "no-wiki-url": "O site referenciado não é uma página da Wikimedia.", + "invalid-email-format": "O endereço de e-mail especificado não corresponde ao formato válido.", + "no-cc-licence": "Este arquivo não está sob uma licença Creative Commons." + }, + "info-box": { + "private-use": "Para a maioria dos usos puramente privados, você não necessita de um aviso de licença.", + "private-use-more-link": "→ SABER MAIS", + "dont-show-again": "Não mostrar esta mensagem novamente.", + "understood-and-close": "Entendido e fechar.", + "ported-licence": "Algumas licenças Creative Commons foram publicadas com edições específicas por país, denominadas «licenças adaptadas». A imagem para a qual você solicitou um aviso de licença foi publicada com uma dessas licenças adaptadas. A ferramenta não consegue verificar se os requisitos da versão da licença Creative Commons específica deste país são os mesmos que os da versão em língua inglesa. No entanto, você ainda pode gerar o aviso de atribuição da licença com esta ferramenta. Para ser totalmente seguro, recomendamos que verifique os requisitos da licença da versão específica deste país. Adicionalmente, o aviso de licença deve estar na linguagem do seu contexto para cumprir totalmente com a sua função." + }, + "dialogue": { + "public-domain-picture": "Esta imagem, quando foi carregada, foi marcada como estando no domínio público, pelo que você não precisa de um aviso de licença para a mesma.", + "no-attribution-needed": "Não é necessário qualquer aviso de licença", + "more-information": "mais informação", + "adjust-attribution-for-usage": "Adapte o aviso de licença para o seu caso de utilização", + "adjust-legal-notice-for-usage": "Adaptar el aviso direitos para el caso de uso", + "public-domain-text": "

De acordo com os detalhes que foram detectados, esta imagem está livre de direitos de autor e pode ser usada sem estar sujeita a quaisquer requisitos de licenciamento, portanto mesmo sem mencionar nenhum autor ou licença.

No entanto, de acordo com a lei de direito de autor alemã, um autor conserva sempre alguns direitos inalienáveis sobre as suas obras. Por este motivo, recomendamos que não reivindique falsamente a autoria da imagem e que não a utilize de qualquer forma que possa ser considerada prejudicial à reputação do autor. Além disso, é aconselhável informar outros utilizadores sobre o estatuto de domínio público desta imagem.

Em alguns países (incluindo a Alemanha), há reivindicações regulares para a proteção de reproduções fotográficas de obras em domínio público. Tal aplica-se tanto a fotografias de esculturas e outras obras tridimensionais, como a fotografias de pinturas. É da responsabilidade dos reutilizadores esclarecer se são afectados quando usam a respectiva imagem.

", + "type-of-use-headline": "Como é que quer utilizar a imagem?", + "author-headline": "Qual é o nome (ou nomes) do autor ou do titular dos direitos de autor?", + "compilation-headline": "Como é que quer publicar a imagem?", + "editing-headline": "Quer usar uma versão modificada da imagem?", + "change-headline": "O que é que você modificou?", + "change-pd-headline": "Se desejar, você pode marcar suas mudanças. O que exatamente é alterado na imagem?", + "creator-headline": "Como é que quer que lhe sejam atribuídas as suas modificações?", + "licence-headline": "Sob que licença quer publicar a imagem modificada?", + "done-headline": "Parabéns!", + "answer-print": "Num contexto onde você não pode usar hiperligações (p. ex. materiais impressos, conjunto de slides).", + "answer-online": "Online.", + "author-label": "Por favor, preencha as informações e declare qualquer atribuição a outras partes (como «patrocinado por X» ou «publicado por Y»), se aplicável:", + "next": "Seguinte", + "answer-no-author": "Não há informação disponível sobre isto.", + "answer-compilation": "Combinado com outras obras.", + "answer-no-compilation": "Por si só.", + "answer-edited": "Sim.", + "answer-not-edited": "Não, eu quero usar a imagem na sua versão original sem modificações.", + "author-question-mark": "Isto é para o(s) nome(s) ou pseudónimo(s) atribuídos ao(s) autor(es) ou aos titulares de direitos de autor. A informação deve ser indicada exatamente da mesma forma que foi encontrada na fonte, incluindo © e/ou o ano.", + "change-question-mark": "É suficiente uma informação breve, como «Resumo» ou «Coloração».", + "compilation-question-mark": "Por favor, escolha esta opção se considera que a publicação desta imagem juntamente com outras obras (devido à sua seleção e disposição) como uma coleção de obras é, em si, uma criação intelectual, p. ex. a coleção, devido à sua originalidade, é uma obra para além das obras nela contidas. Tal pode, por exemplo, ser o caso se você criar um livro de fotos ou uma coleção de «as melhores imagens». A situação será diferente se você criar um «remix», como uma colagem de várias imagens, que na maioria dos casos não resultará numa coleção, mas sim numa adaptação das imagens usadas para tal.", + "editing-question-mark": "Todas as alterações da imagem que alteram a impressão suscitada pela imagem naqueles que a visualizam (como cortes, coloração, mudanças drásticas de tamanho, etc.) fazem com que o resultado seja considerado uma adaptação, no sentido jurídico. Por outro lado, modificar o formato da imagem ou digitalizá-la não cria uma adaptação porque a imagem e a impressão que ela suscita é a mesma.", + "licence-question-mark": "A ferramenta só oferece licenças que sejam compatíveis com a licença Creative Commons colocada na obra original.", + "creator-question-mark": "Por favor indique, caso seja possível, o seu nome completo. Um pseudónimo, alcunha ou «anónimo» também é possível.", + "same-licence": "A mesma licença que a obra original.", + "licence-text": "Texto da licença ", + "download-image-link": "Descarregue a imagem", + "file-page-link": "Endereço Web da imagem na Wikimedia Commons", + "done": "Feito", + "typeOfUse": "Tipo de uso", + "author": "Autor", + "compilation": "Coleção", + "editing": "Adaptação", + "change": "Alterações", + "creator": "Criador", + "licence": "Licença", + "back-to-top": "Verifique outra foto", + "force-pd-attribution": "No entanto, crie um aviso de direitos", + "pd-attribution-hint": "marcado como domínio público", + "check-details": "para mais detalhes, veja", + "here": "aqui", + "mark-as-pd": "marca como domínio público" + }, + "evaluation": { + "by": "por", + "edited": "modificado", + "done-text": "Você respondeu a todas as perguntas. Você está pronto para usar o aviso de licença correto.", + "done-text-legal-notice": "Você respondeu todas as perguntas. Você está pronto para usar o aviso direitos correto.", + "your-attribution": "O seu aviso de licença", + "your-legal-notice": "Seu aviso legal", + "copy": "Copiar", + "do-print-text": "Você deve mostrar esta informação tão perto quanto razoavelmente possível da imagem (p. ex., diretamente abaixo da mesma). De qualquer modo, aqueles que visualizam a imagem devem poder encontrar a informação com facilidade. Se você tem um livro ou uma revista, as atribuições também podem ser colocadas na página de impressão ou noutra localização standard, desde que se possa facilmente identificar a imagem a que cada informação de atribuição pertence (p. ex., fornecendo o número da página).", + "do-online-text": "Por favor note que o aviso de licença inclui hiperligações, os quais têm de ser incluídos sempre que você faça uso do aviso de licença. Você deve mostrar essa informação tão perto quanto razoavelmente possível da imagem (p. ex., diretamente abaixo da mesma). De qualquer modo, aqueles que visualizam a imagem devem poder encontrar a informação com facilidade. Para tornar este processo mais fácil para você, a ferramenta fornece-lhe a atribuição, incluindo todos os hiperligações em formato de texto simples e como um fragmento HTML. Desta forma, você pode transferi-lo diretamente para o código-fonte da sua página Web.", + "do-compilation-text": "Se o titular da licença solicitar que você não publique o nome do titular, o título da obra ou qualquer outra informação, por favor indique apenas a hiperligação. A ferramenta fornece a hiperligação com o botão infra. É suposto que os autores / titulares dos direitos tenham a possibilidade de decidir por si mesmos se os seus nomes ou os títulos das imagens são publicados ou não caso as imagens façam parte de uma coleção com a qual eles não querem ser associados.", + "dont-terms-of-use-headline": "Não imponha mais condições", + "dont-terms-of-use-text": "Você não está autorizado a impor quaisquer condições adicionais relativamente à imagem, que possam restringir os direitos concedidos através da licença Creative Commons (p. ex., não proibir a distribuição de conteúdo de uma determinada página Web, desde que as imagens licenciadas com CC não estejam explicitamente excluídas dessa proibição).", + "dont-sublicences-headline": "Não são permitidas sublicenças", + "dont-sublicences-text": "Você não está autorizado a sublicenciar a obra. Isso significa que você não está autorizado a apresentar-se como licenciante. Você só poderá tornar-se num licenciante se modificar a imagem (e apenas em relação às suas modificações, não em relação à imagem original). Aqueles que receberem a foto através de si, receberão a licença Creative Commons diretamente do licenciante da imagem original e não de você, como transmissor.", + "dont-cc-licence-headline": "Avisos jurídicos existentes", + "dont-cc-licence-text": "Se você encontrar qualquer outro aviso de licença Creative Commons ou limitações de responsabilidade, você não está autorizado a alterá-los.", + "dont-technical-protection-headline": "Não imponha nenhuma medida de proteção tecnológica", + "dont-technical-protection-text": "Você não está autorizado a impor nenhuma medida de proteção tecnológica relativamente à imagem, que possa restringir os direitos que derivam da licença Creative Commons (p. ex. mecanismos de proteção contra cópia que restringem a impressão de um ficheiro PDF).", + "dont-rightholder-connection-headline": "Nenhuma conexão especial com o titular dos direitos", + "dont-rightholder-connection-text": "Você não está autorizado a usar esta imagem de um modo que possa ser entendido como indicando que o titular dos direitos ou qualquer outra pessoa mencionada na atribuição lhe concedeu direitos numa transação independente ou, de outra forma, suporta o seu uso específico da imagem.", + "show-licence-text": "Veja o texto completo da licença", + "show-cc-zero-text": "Exibir o texto completo da declaração de lançamento", + "anonymous": "anónimo", + "copy-hint": "Copie o texto marcado" + } +} + +},{}],7:[function(require,module,exports){ +module.exports={ + "index": { + "title": "Генератор атрибуції", + "description": "Інформація про ліцензію для зображень з Вікіпедії та Вікісховища", + "no-script": "Для використання цієї сторінки Вам потрібно ввімкнути Javascript.", + "how-it-works-1": "Вставте веб-адресу зображення у Вікісховищі чи статті Вікіпедії для запуску інструменту.", + "how-it-works-2": "Дайте відповідь на запитання про свої наміри щодо використання для створення правильного вказання ліцензії.", + "how-it-works-3": "Прочитайте, як вказувати ліцензії.", + "how-it-works-4": "Скопіюйте згенероване вказання ліцензії та вставте його до своєї публікації для правильного використання зображення.", + "how-it-works": "Як це працює?", + "input-placeholder": "Веб-адреса зображення у Вікісховищі чи статті Вікіпедії.", + "go-button": "Розпочнімо!", + "feedback-name": "Ім'я", + "feedback-response-email": "Адреса ел. пошти", + "feedback-body": "Відгук", + "feedback-submit": "Надіслати", + "feedback-thanks": "Дякуємо за Ваш відгук!", + "feedback": "Відгук", + "about": "Про", + "legal": "Дані та Політика конфіденційності", + "legal-tracking-switch": "Зніміть відмітку для припинення відстеження Вашого відвідування.", + "legal-hosting": "Цей інструмент розміщено на Вікімедіа Лабс. Прочитайте Умови використання на https://wikitech.wikimedia.org/wiki/Wikitech:Labs_Terms_of_use.", + "private-use": "Суто приватне використання (без публікації) та інші винятки й обмеження щодо авторських прав" + }, + "error": { + "generic": "Сталася непередбачувана помилка. Вибачте.", + "mediatype-unsupported": "На жаль, цей тип медіа наразі не підтримується інструментом. Перепрошуємо.", + "licence-unsupported": "На жаль, виявлений тип ліцензії наразі не підтримується інструментом. Перепрошуємо.", + "url-invalid": "Зазначена Вами веб-адреса не може бути оброблена. Перепрошуємо.", + "licence-not-recognized": "На жаль, формат, у якому ліцензійна інформація зберігається для цього зображення, наразі не підтримується інструментом. Перепрошуємо.", + "send-feedback": "Щось не спрацювало. Будь ласка, спробуйте знову.", + "feedback-generic": "Щось не спрацювало. Будь ласка, спробуйте знову.", + "feedback-blank-fields": "Будь ласка, заповніть усі поля форми відгуку.", + "no-images-found": "У цій статті Вікіпедії немає жодних зображень.", + "no-wiki-url": "На сьогодні Генератор атрибуції може працювати лише із зображеннями з Вікіпедії або Вікісховища.", + "invalid-email-format": "Вказана e-mail адреса має недійсний формат.", + "no-cc-licence": "Цей файл не ліцензований під ліцензією Creative Commons license." + }, + "info-box": { + "private-use": "Для більшості приватних використань Вам не потрібно вказувати ліцензію.", + "private-use-more-link": "→ ДІЗНАТИСЯ БІЛЬШЕ", + "dont-show-again": "Не показувати це повідомлення знову.", + "understood-and-close": "Зрозуміло, закрити.", + "ported-licence": "Деякі ліцензії Creative Commons було опубліковано в редакціях для певних країн, так званих «адаптованих ліцензіях». Зображення, для якого Ви запитували вказання ліцензії, опубліковане з такою адаптованою ліцензією. Інструмент не може перевірити, чи ліцензійні вимоги цієї ліцензії Creative Commons для окремої країни еквівалентні англомовній версії. Однак Ви все одно можете згенерувати повідомлення-атрибуцію про ліцензію цим інструментом. Щоб бути повністю певними, ми радимо перевірити вимоги цієї версії ліцензії для країни. Додатково це вказання ліцензії повинне бути мовою її вмісту, щоб виконувати свою функцію повністю." + }, + "dialogue": { + "public-domain-picture": "При завантаженні це зображення було позначене як таке, що перебуває у суспільному надбанні, тож Вам не потрібно вказувати ліцензію.", + "no-attribution-needed": "Вказання ліцензії не потрібне", + "more-information": "більше інформації", + "adjust-attribution-for-usage": "Адаптувати вказання ліцензії до випадку використання", + "adjust-legal-notice-for-usage": "Адаптувати правове повідомлення до цього випадку використання", + "public-domain-text": "

Згідно з виявленими даними, це зображення не захищене авторським правом, і його можна використовувати без жодних ліцензійних вимог, навіть без згадування автора або ліцензії.

Однак згідно з законодавством Німеччини про авторське право, за автором завжди залишаються деякі невідкличні права на кожен твір. Тому ми рекомендуємо не заявляти неправдиво про своє авторство зображення і не використовувати зображення у спосіб, який можна оцінити як шкідливий для репутації автора. Також бажано поінформувати інших користувачів про те, що дане зображення перебуває у суспільному надбанні.

", + "force-pd-attribution": "Все одно згенерувати загальне повідомлення", + "type-of-use-headline": "Як Ви хочете використати це зображення?", + "author-headline": "Яке ім'я (імена) автора чи власника авторських прав?", + "compilation-headline": "Як Ви хочете опублікувати це зображення?", + "editing-headline": "Чи хочете Ви використовувати зображення у зміненій формі?", + "change-headline": "Що Ви змінили?", + "change-pd-headline": "Яку частину зображення буде змінено?", + "creator-headline": "Як Ви хочете вказати власне авторство зроблених змін?", + "licence-headline": "Під якою ліцензією Ви хочете опублікувати змінене зображення?", + "done-headline": "Вітаємо!", + "answer-print": "У контексті, де не можна використати гіперпосилання (наприклад, друкована продукція, слайди).", + "answer-online": "Онлайн.", + "author-label": "Будь ласка, заповніть інформацію і вкажіть також будь-які інші сторони (на зразок «за сприяння X» або «опубліковано Y»), якщо потрібно:", + "next": "Далі", + "answer-no-author": "Немає такої інформації.", + "answer-compilation": "Поєднано з іншими творами.", + "answer-no-compilation": "Як є.", + "answer-edited": "Так.", + "answer-not-edited": "Ні, я хочу використати зображення у його оригінальному незміненому вигляді.", + "author-question-mark": "Це поле для імен(і) чи псевдоніма(-ів) автора(-ів) чи власника(-ів) авторських прав. Інформацію треба подати точно так само, як було в джерелі, включно з © та/або роком.", + "change-question-mark": "Достатньо короткої вказівки: «вирізка», «забарвлення» тощо.", + "compilation-question-mark": "Будь ласка, оберіть цей варіант, якщо Ви вважаєте, що Ваша публікація цього зображення разом з іншими творами (внаслідок вибірки і впорядкування) як збірка сама по собі є інтелектуальним твором, тобто збірка, завдяки своїй оригінальності, є авторським твором не залежно від творів, з яких вона складається. Наприклад, це може бути тоді, коли Ви створили фотокнигу або вибірку найкращих зображень певного виду. Це не стосується випадків, коли Ви створюєте ремікс у вигляді колажу з кількох фото, що у більшості випадків є не вибіркою, а адаптацією використаних для нього зображень.", + "editing-question-mark": "Усі зміни зображення, що змінюють його сприйняття глядачами (обрізання, зафарбування, значна зміна розміру тощо) роблять результат адаптацією у її правовому значенні. На відміну від цього, зміна формату файлу або оцифрування не є адаптацією, оскільки зображення та враження від нього залишаються ті ж самі.", + "licence-question-mark": "Інструмент пропонує лише ті ліцензії, які сумісні з ліцензією Creative Commons оригінального твору.", + "creator-question-mark": "Будь ласка, вкажіть, за можливості, своє повне ім'я. Це також може бути псевдонім, нік або «анонім».", + "same-licence": "Та ж ліцензія, що й в оригінального твору.", + "licence-text": "Текст ліцензії", + "download-image-link": "Завантажити зображення", + "file-page-link": "Веб-адреса зображення у Вікісховищі", + "done": "Готово", + "typeOfUse": "Тип використання", + "author": "Автор", + "compilation": "Збірка", + "editing": "Адаптація", + "change": "Зміни", + "creator": "Творець", + "licence": "Ліцензія", + "back-to-top": "Перевірити інше зображення", + "force-pd-attribution": "Все одно створити правове повідомлення", + "pd-attribution-hint": "позначено як суспільне надбання", + "check-details": "більше деталей на", + "here": "тут", + "mark-as-pd": "позначити суспільним надбанням" + }, + "evaluation": { + "by": "автор", + "edited": "модифіковано", + "done-text": "Ви відповіли на усі запитання. Ви готові використати правильне вказання ліцензії.", + "done-text-legal-notice": "Ви відповіли на усі запитання. Тепер Ви можете скористатися коректним правовим повідомленням.", + "your-attribution": "Ваше вказання ліцензії", + "your-legal-notice": "Ваше правове повідомлення", + "copy": "Копіювати", + "do-print-text": "Ви маєте подати цю інформацію якомога ближче до зображення (наприклад, одразу під ним). У будь-якому разі, глядачі повинні мати змогу легко знайти інформацію. Якщо у Вас книжка чи журнал, атрибуцію можна також подавати у даних чи іншому стандартному місці, головне, щоб можна було легко співвіднести кожне зображення з його атрибуцією (наприклад, за номерами сторінок).", + "do-online-text": "Будь ласка, зверніть увагу, що вказання ліцензії містить гіперпосилання які мають бути включені, де б не розміщували вказання ліцензії. Ви маєете розмістити цю інформацію якомога ближче до зображення, наскільки це можливо (наприклад, прямо під ним). У будь-якому разі, глядачі повинні мати змогу легко знайти інформацію. Щоб Вам було легше, інструмент дає атрибуцію, включаючи усі гіперпосилання у форматі простого тексту і як уривок html. Так Ви можете просто вставити його у вихідний код Вашої веб-сторінки.", + "do-compilation-text": "Якщо власник(-ця) ліцензії попросив Вас не вказувати їхнє ім'я, назву твору чи якусь іншу інформацію, будь ласка, вкажіть лише гіперпосилання ліцензії. Інструмент дає його за кнопкою нижче. Передбачається, що автори/правовласники можуть самостійно вирішувати, чи публікуються їхні імена або назви творів, якщо зображення є частиною збірки, з якою вони не хочуть бути пов'язуваними.", + "dont-terms-of-use-headline": "Не накладайте інших умов", + "dont-terms-of-use-text": "Ви не можете накладати додаткових умов щодо цього зображення, що можуть обмежити права, надалі ліцензією Creative Commons (наприклад, не допускається заборона розповсюдження вмісту певної веб-сторінки, якщо не вказано чітко, що зображення, ліцензовані під CC, є винятком з такої заборони).", + "dont-sublicences-headline": "Не дозволяється субліцензування", + "dont-sublicences-text": "Ви не можете субліцензувати твір. Це означає, що Ви не можете вказувати себе як власника ліцензії. Лише якщо Ви змінюєте зображення, Ви можете стати власником ліцензії (і лише в частині Ваших змін, а не оригінального зобарежння). Інші люди, що отримають від Вас фото, отримують дозвіл на його використання згідно з ліцензією Creative Commons напряму від власника ліцензії оригінального зображення, а не від Вас, як посередника.", + "dont-cc-licence-headline": "Наявні правові повідомлення", + "dont-cc-licence-text": "Якщо Ви бачите будь-яке вказання ліцензії Creative Commons, обмеження чи зобов'язання, Ви не можете їх змінити.", + "dont-technical-protection-headline": "Не застосовуйте жодних засобів технічного захисту", + "dont-technical-protection-text": "Ви не можете застосовувати жодних засобів технічного захисту щодо зображення, які можуть обмежити права, що випливають з ліцензії Creative Commons (наприклад, механізми захисту від копіювання, що забороняють друк PDF-файлу).", + "dont-rightholder-connection-headline": "Жодного особливого зв'язку з правовласником", + "dont-rightholder-connection-text": "Ви не можете використовувати це зображення у такий спосіб, що може бути сприйнято, наче правовласник чи будь-хто із атрибутованих сторін надали Вам права в індивідуальному порядку чи іншим чином схвалили конретно Ваш випадок використання зображення.", + "show-licence-text": "Див. повний текст ліцензії", + "show-cc-zero-text": "Див. повний текст передання у суспільне надбання", + "anonymous": "анонім", + "copy-hint": "Копіювати виділений текст" + } +} + +},{}],8:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ +'use strict'; + +var $ = require( 'jquery' ), + config = require( '../config.json' ), + ImageInfo = require( './ImageInfo' ), + WikiAssetPage = require( './WikiAssetPage' ), + ApplicationError = require( './ApplicationError' ); + +/** + * Commons API Handler. + * @constructor + * + * @param {string} defaultUrl + * + * @throws {Error} if a required parameter is omitted. + */ +var Api = function( defaultUrl ) { + if( !defaultUrl ) { + throw new Error( 'A required parameter has been omitted' ); + } + this._defaultUrl = defaultUrl; +}; + +$.extend( Api.prototype, { + /** + * Default API URL. + * @type {string} + */ + _defaultUrl: null, + + /** + * Returns the API's default URL. + * @return {string} + */ + getDefaultUrl: function() { + return this._defaultUrl; + }, + + /** + * Generates an Asset object for a specific filename. + * + * @param {string} prefixedFilename + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {Asset} + * Rejected parameters: + * - {ApplicationError} + */ + getAsset: function( prefixedFilename, wikiUrl ) { + var self = this, + deferred = $.Deferred(); + + this._getMetaData( prefixedFilename, wikiUrl ) + .done( function( metaData ) { + + self._getPageContent( prefixedFilename, wikiUrl ) + .done( function( $dom ) { + + self._getPageTemplates( prefixedFilename, wikiUrl ) + .done( function( templates ) { + var assetPage = new WikiAssetPage( + prefixedFilename, metaData.mediatype, $dom, templates, self, wikiUrl + ); + + deferred.resolve( assetPage.getAsset() ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves the asset page content of a specific file. + * + * @param {string} prefixedFilename + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {jQuery} Page content DOM + * Rejected parameters: + * - {ApplicationError} + */ + _getPageContent: function( prefixedFilename, wikiUrl ) { + var deferred = $.Deferred(); + + this._getResultsFromApi( prefixedFilename, 'revisions', wikiUrl, { + rvprop: 'content', + rvparse: 1 + } ) + .done( function( page ) { + if( !page.revisions || page.revisions.length === 0 || !page.revisions[ 0 ][ '*' ] ) { + deferred.reject( new ApplicationError( 'revision-invalid' ) ); + return; + } + + deferred.resolve( $( '
' ).html( page.revisions[ 0 ][ '*' ] ) ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves the Wikipage templates used on a specific file's description page. + * + * @param {string} prefixedFilename + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string[]} + * Rejected parameters: + * - {ApplicationError} + */ + _getPageTemplates: function( prefixedFilename, wikiUrl ) { + var deferred = $.Deferred(); + + this._getResultsFromApi( prefixedFilename, 'templates', wikiUrl, { + tlnamespace: 10, + tllimit: 100 + }, 'tlcontinue' ) + .done( function( page ) { + if( !page.templates ) { + deferred.reject( new ApplicationError( 'templates-missing' ) ); + return; + } + + var templates = []; + $.each( page.templates, function( i, template ) { + templates.push( template.title.replace( /^[^:]+:/, '' ) ); + } ); + + deferred.resolve( templates ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves image information for a specific file according to a specific image size. + * + * @param {string} prefixedFilename + * @param {number} size + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {ImageInfo} + * Rejected parameters: + * - {ApplicationError} + */ + getImageInfo: function( prefixedFilename, size, wikiUrl ) { + var deferred = $.Deferred(); + + this._getResultsFromApi( prefixedFilename, 'imageinfo', wikiUrl, { + iiprop: 'url|size', + iiurlwidth: size, + iiurlheight: size + } ) + .done( function( page ) { + if( !page.imageinfo || page.imageinfo[ 0 ].length === 0 ) { + deferred.reject( new ApplicationError( 'imageinfo-missing' ) ); + return; + } + deferred.resolve( ImageInfo.newFromMediaWikiImageInfoJson( page.imageinfo[ 0 ] ) ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves a file's meta data. + * + * @param {string} prefixedFilename + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise: + * Resolved parameters: + * - {Object} + * Rejected parameters: + * - {ApplicationError} + */ + _getMetaData: function( prefixedFilename, wikiUrl ) { + var deferred = $.Deferred(); + + this._getResultsFromApi( prefixedFilename, 'imageinfo', wikiUrl, { + iiprop: 'mediatype|url', + iilimit: 1 + } ) + .done( function( page ) { + if( !page.imageinfo ) { + deferred.resolve( 'unknown' ); + return; + } + + if( page.imageinfo.length > 0 ) { + var metaData = page.imageinfo[ 0 ]; + if( metaData.mediatype ) { + metaData.mediatype = metaData.mediatype.toLowerCase(); + } + deferred.resolve( metaData ); + return; + } + + deferred.reject( new ApplicationError( 'mediatype-missing' ) ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred; + }, + + /** + * Checks a specific Wikipedia page for images returning the image info for each image used on + * the page. If the page itself is a description page of an image, the resolved promise + * transmits the title the function was called with. The resolved promise's second parameter is + * the original wiki URL or the full asset URL if the asset is not stored on the local Wiki. + * + * @param {string} title + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {ImageInfo[]|string} + * - {string} + * Rejected parameters: + * - {ApplicationError} + */ + getWikipediaPageImageInfo: function( title, wikiUrl ) { + var self = this, + deferred = $.Deferred(); + + this._getMetaData( title, wikiUrl ) + .done( function( metaData ) { + if( typeof metaData === 'object' && metaData.mediatype ) { + deferred.resolve( title, metaData.url ); + return; + } + + self._getWikipediaPageImages( title, wikiUrl ) + .done( function( imageTitles ) { + self._getWikipediaImageInfos( imageTitles, wikiUrl ) + .done( function( imageUrls ) { + deferred.resolve( imageUrls, wikiUrl ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves the titles of the images used on an specific Wikipedia page. + * + * @param {string} title + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string[]} + * Rejected parameters: + * - {ApplicationError} + */ + _getWikipediaPageImages: function( title, wikiUrl ) { + var deferred = $.Deferred(); + + var params = { + imlimit: 100, + titles: title, + format: 'json' + }; + + this._getResultsFromApi( title, 'images', wikiUrl, params, 'imcontinue' ) + .done( function( page ) { + if( page.images === undefined || page.images.length === 0 ) { + deferred.reject( new ApplicationError( 'no-images-found' ) ); + return; + } + var imageTitles = []; + + for( var i = 0; i < page.images.length; i++ ) { + imageTitles.push( page.images[ i ].title ); + } + + deferred.resolve( imageTitles ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves image info for a list of images used on a specific Wikipedia. + * + * @param {string[]} imageTitles + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {ImageInfo[]} + * Rejected parameters: + * - {ApplicationError} + */ + _getWikipediaImageInfos: function( imageTitles, wikiUrl ) { + var deferred = $.Deferred(); + + if( imageTitles.length === 0 ) { + deferred.resolve( [] ); + return deferred.promise(); + } + + this._getImageInfoBatch( imageTitles, wikiUrl, new $.Deferred(), [] ) + .done( function( imageInfos ) { + deferred.resolve( imageInfos ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Retrieves image info for a batch of (max 50) images. Continues with another batch if more images has been + * passed in. + * + * @param {string[]} titles + * @param {string} wikiUrl + * @param {Object} deferred jQuery Deferred object instance shared by consecutive queries + * @param {ImageInfo[]} imageInfos image info data collected by previous queries + * @return {Object} jQuery Promise + * Resolved parameters: + * - {ImageInfo[]} + * Rejected parameters: + * - {ApplicationError} + */ + _getImageInfoBatch: function( titles, wikiUrl, deferred, imageInfos ) { + var params = { + iiprop: 'url', + iilimit: 1, + iiurlheight: 300 + }, + self = this, + titleLimit = 50, + titleSubset = titles.slice( 0, Math.min( titleLimit, titles.length ) ); + + this._getResultsFromApi( titleSubset, 'imageinfo', wikiUrl, params ) + .done( function( pages ) { + if( !$.isArray( pages ) ) { + pages = [ pages ]; + } + + $.each( pages, function( index, page ) { + imageInfos.push( ImageInfo.newFromMediaWikiImageInfoJson( page.imageinfo[ 0 ] ) ); + } ); + + if( titles.length > titleLimit ) { + return self._getImageInfoBatch( titles.slice( titleSubset.length ), wikiUrl, deferred, imageInfos ); + } + + deferred.resolve( imageInfos ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Issues a call to the Commons API or a Wikipedia API querying for a specific property of a + * file, and returns an array of Page data.. + * + * @param {string|string[]} title Page title(s) + * @param {string} property + * @param {string} [wikiUrl] + * @param {Object} [params] API request parameter overwrites or additional parameters. + * @param {string|null} continuationParam name of the continuation parameter used in API requests and responses, or null if no continuation required + * @return {Object} jQuery Promise + * Resolved parameters: + * - {Object[]} + * Rejected parameters: + * - {ApplicationError} + */ + _getResultsFromApi: function( title, property, wikiUrl, params, continuationParam ) { + var deferred = $.Deferred(), + queryParams = $.extend( { + action: 'query', + prop: property, + titles: $.isArray( title ) ? title.join( '|' ) : title, + format: 'json' + }, params ); + this._query( wikiUrl, queryParams, continuationParam, 0, new $.Deferred(), [] ) + .done( function( results ) { + deferred.resolve( results ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + }, + + /** + * Returns a page title for a given page ID. + * + * @param {string} pageId + * @param {string} [wikiUrl] + * @returns {Object} jQuery Promise + * Resolved parameters: + * - {string} + * Rejected parameters: + * - {ApplicationError} + */ + getTitleFromPageId: function( pageId, wikiUrl ) { + var deferred = $.Deferred(), + queryParams = { + action: 'query', + pageids: pageId, + format: 'json' + }; + + this._query( wikiUrl, queryParams, null, 0, new $.Deferred(), [] ) + .done( function( page ) { + deferred.resolve( page.title ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Send a query to Commons or Wikipedia API, and returns an array of page data. + * Performs multiple queries if contination parameter is provided, and size of API response requires continuation. + * + * @param {string|string[]} wikiUrl + * @param {string} params API request parameters + * @param {string|null} continuationParam name of the continuation parameter used in API requests and responses, or null if no continuation required + * @param {int|null} continuationCount number of API calls already done for the query, or null if no continuation required + * @param {Object} deferred jQuery Deferred object instance shared by consecutive queries (in case of continuation) + * @param {Array} results data collected by previous queries (in case of continuation) + * @returns {Object} jQuery Promise + * Resolved parameters: + * - {Object[]} + * Rejected parameters: + * - {ApplicationError} + */ + _query: function( wikiUrl, params, continuationParam, continuationCount, deferred, results ) { + var ajaxOptions = { + url: ( wikiUrl || this._defaultUrl ) + 'w/api.php', + crossDomain: true, + dataType: 'jsonp', + data: params, + timeout: 5000 + }, + self = this; + + $.ajax( ajaxOptions ) + .done( function( response ) { + if( response.query === undefined || response.query.pages === undefined ) { + deferred.reject( new ApplicationError( 'response-unexpected' ) ); + return; + } + + var pages = [], + errorCode; + + $.each( response.query.pages, function( id, page ) { + var isSharedImage = params['prop'] === 'imageinfo' && page.imagerepository === 'shared'; + + if( page.missing !== undefined && !isSharedImage ) { + errorCode = 'url-invalid'; + } else if( page.invalid !== undefined ) { + errorCode = 'page-invalid'; + } else { + pages.push( page ); + } + + } ); + + pages = self._mergeResultArrays( results, pages ); + continuationCount++; + + if( self._continuationNeeded( response, continuationParam, continuationCount ) ) { + params[continuationParam] = response.continue[continuationParam]; + return self._query( wikiUrl, params, continuationParam, continuationCount, deferred, pages ); + } + + if( pages.length === 1 ) { + deferred.resolve( pages[ 0 ] ); + } else if( pages.length > 0 ) { + deferred.resolve( pages ); + } else if( errorCode ) { + deferred.reject( new ApplicationError( errorCode ) ); + } else { + deferred.reject( new ApplicationError( 'response-corrupted' ) ); + } + } ) + .fail( function() { + // Since there is no error handling for jsonp requests, the error is a timeout in any + // and it does not make any sense to analyze the jqXHR object. + deferred.reject( new ApplicationError( 'generic-error' ) ); + } ); + + return deferred.promise(); + }, + + /** + * Checks if continuation queries are required + * + * @param {Array} response API response + * @param {string|null} continuationParam name of the continuation parameter used in API requests and responses, or null if no continuation required + * @param {int|null} continuationCount number of API calls already done for the query, or null if no continuation required + * @returns {boolean} + */ + _continuationNeeded: function( response, continuationParam, continuationCount ) { + return continuationParam !== undefined && response.continue !== undefined && response.continue[continuationParam] !== undefined + && continuationCount < config.apiContinuationLimit; + }, + + /** + * Merges results collected by two API queries + * + * @param {Array} a + * @param {Array} b + * @returns {Array} + */ + _mergeResultArrays: function( a, b ) { + var pageIds = $.map( a, function( x ) { return x.pageid; } ), + merged = $.extend( [], a ), + self = this; + $.each( b, function( i, page ) { + var index = pageIds.indexOf( page.pageid ); + if( index > -1 ) { + merged[index] = self._mergePageData( merged[index], page ); + } else { + merged.push( page ); + } + } ); + return merged; + }, + + /** + * Merges page data collected by two API queries. Array values of the same property are concatenated, other properties + * remain unchanged + * + * @param {Array} data current page data + * @param {Array} moarData page data to be added + * @returns {Array} + */ + _mergePageData: function( data, moarData ) { + $.each( moarData, function( i, prop ) { + if( Array.isArray( prop ) ) { + data[i] = data[i].concat( prop ); + } + } ); + return data; + } + +} ); + +module.exports = Api; + +},{"../config.json":54,"./ApplicationError":9,"./ImageInfo":18,"./WikiAssetPage":26,"jquery":138}],9:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ +'use strict'; + +var $ = require( 'jquery' ), + Messages = require( './Messages' ); + +/** + * Application Error + * @constructor + * + * @param {string} code + * + * @throws {Error} if a required parameter is not defined properly. + */ +var ApplicationError = function( code ) { + if( !code || typeof code !== 'string' ) { + throw new Error( 'Required parameters are nor properly defined' ); + } + + this._code = code; +}; + +$.extend( ApplicationError.prototype, { + /** + * @param {string} + */ + _code: null, + + /** + * Returns the error's localized message. + * + * @return {string} + */ + getMessage: function() { + return Messages.t( 'error.' + this._code ); + }, + + /** + * Returns the error's code. + * + * @return {string} + */ + getCode: function() { + return this._code; + } + +} ); + +module.exports = ApplicationError; + +},{"./Messages":24,"jquery":138}],10:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var $ = require( 'jquery' ); + +/** + * Represents an asset. + * @constructor + * + * @param {string} url + * @param {string} mediaType + * @param {Licence|null} [licence] + * @param {string|null} [title] + * @param {Author[]|null} [authors] + * @param {string} [url] + * @param {jQuery|null} [$attribution] + * @param {Api|null} [api] + * + * @throws {Error} if a required parameter is not defined. + */ +var Asset = function( filename, mediaType, licence, title, authors, url, $attribution, api ) { + if( typeof filename !== 'string' || typeof mediaType !== 'string' ) { + throw new Error( 'No proper initialization parameters specified' ); + } + + this._filename = filename; + this._mediaType = mediaType; + this._licence = licence || null; + this._title = title || ''; + this._url = url || null; + this._authors = authors || []; + this._$attribution = $attribution || null; + this._api = api || null; + + this._imageInfo = {}; +}; + +$.extend( Asset.prototype, { + /** + * @type {string} + */ + _filename: null, + + /** + * @type {string} + */ + _mediaType: null, + + /** + * @type {Licence|null} + */ + _licence: null, + + /** + * @type {string} + */ + _title: null, + + /** + * @type {Author[]} + */ + _authors: null, + + /** + * @type {string} + */ + _url: null, + + /** + * @type {jQuery|null} + */ + _$attribution: null, + + /** + * @type {Api} + */ + _api: null, + + /** + * @type {Object} + */ + _imageInfo: null, + + /** + * @return {string} + */ + getFilename: function() { + return this._filename; + }, + + /** + * @return {string} + */ + getMediaType: function() { + return this._mediaType; + }, + + /** + * @param {Licence} licence + */ + setLicence: function( licence ) { + this._licence = licence; + }, + + /** + * @return {Licence|null} + */ + getLicence: function() { + return this._licence; + }, + + /** + * @param {string} title + * + * @throws {Error} if the title is not of type "string". + */ + setTitle: function( title ) { + if( typeof title !== 'string' ) { + throw new Error( 'title needs to be a string' ); + } + this._title = title; + }, + + /** + * @return {string} + */ + getTitle: function() { + return this._title; + }, + + /** + * @param {string|null} url + * + * @throws {Error} if the URL is not specified properly. + */ + setUrl: function( url ) { + if( typeof url !== 'string' && url !== null ) { + throw new Error( 'URL needs to be a string or null' ); + } + this._url = url; + }, + + /** + * @return {string|null} + */ + getUrl: function() { + if( this._url === null ) { + return null; + } + + return this._url.indexOf( 'http' ) === 0 ? this._url : 'http://' + this._url; + }, + + /** + * @param {Author[]} authors + */ + setAuthors: function( authors ) { + this._authors = authors; + }, + + /** + * @param {options} [options] + * @return {Author[]|string} + */ + getAuthors: function( options ) { + options = options || {}; + + if( options.format !== 'string' ) { + return this._authors; + } + + var authors = []; + $.each( this._authors, function( index, author ) { + authors.push( author.getText() ); + } ); + + return authors.join( '; ' ); + }, + + /** + * @return {jQuery} + */ + getAttribution: function() { + return this._$attribution ? this._$attribution.clone() : null; + }, + + /** + * Retrieves the asset's image information. + * + * @param {number} imageSize + * @return {Object} jQuery Promise + * Resolve parameters: + * - {Object} Image information received from the API + * Rejected parameters: + * - {AjaxError} + */ + getImageInfo: function( imageSize ) { + var self = this, + deferred = $.Deferred(); + + if( this._imageInfo[ imageSize ] ) { + deferred.resolve( this._imageInfo[ imageSize ] ); + } else { + this._api.getImageInfo( this._filename, imageSize, this._wikiUrl ) + .done( function( imageInfo ) { + self._imageInfo[ imageSize ] = imageInfo; + deferred.resolve( imageInfo ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } + + return deferred.promise(); + }, + + /** + * Checks if the asset object equals another asset object. + * + * @param {Asset} asset + * @return {boolean} + */ + equals: function( asset ) { + var authors = asset.getAuthors(); + + if( authors.length !== this._authors.length ) { + return false; + } + + for( var i = 0; i < this._authors.length; i++ ) { + if( authors[ i ].getText() !== this._authors[ i ].getText() ) { + return false; + } + } + + var haveLicences = asset.getLicence() && this.getLicence(), + sameLicence = !haveLicences || asset.getLicence().getId() === this.getLicence().getId(); + + return asset.getFilename() === this.getFilename() + && asset.getTitle() === this.getTitle() + && asset.getUrl() === this.getUrl() + && sameLicence; + }, + + /** + * Clones the asset. + * + * @return {Asset} + */ + clone: function() { + return new Asset( + this._filename, + this._mediaType, + this._licence, + this._title, + this._authors, + this._url, + this._$attribution, + this._api + ); + } +} ); + +module.exports = Asset; + +},{"jquery":138}],11:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + Dialogue = require( './Dialogue' ), + DialogueStep = require( './DialogueStep' ), + ChangeStep = require( './ChangeStep' ), + LicenceStep = require( './LicenceStep' ); + +/** + * @param {string|null} author + * @constructor + */ +var AttributionDialogue = function( asset ) { + Dialogue.call( this ); + this._asset = asset; +}; + +$.extend( AttributionDialogue.prototype, Dialogue.prototype, { + /** + * @type {Asset} + */ + _asset: null, + + getAsset: function() { + return this._asset; + }, + + setStep: function( n ) { + Dialogue.prototype.setStep.call( this, n ); + if( this._hasAuthor() && n < 4 || n < 3 ) { + this._removeEditingSteps(); + } + }, + + _hasAuthor: function() { + return this._asset.getAuthors().length === 0; + }, + + init: function() { + this.addStep( new DialogueStep( 'typeOfUse', require( './templates/TypeOfUseStep.handlebars' ) ) ); + if( this._hasAuthor() ) { + this.addStep( new DialogueStep( 'author', require( './templates/AuthorStep.handlebars' ) ) ); + } + this.addStep( new DialogueStep( 'compilation', require( './templates/CompilationStep.handlebars' ) ) ); + this.addStep( new DialogueStep( 'editing', require( './templates/EditingStep.handlebars' ) ) ); + }, + + completeStep: function( step ) { + Dialogue.prototype.completeStep.call( this, step ); + + var data = step.getData(); + if( step.getName() === 'editing' && data[ 'edited' ] === 'true' ) { + this._addEditingSteps(); + } + }, + + _removeEditingSteps: function() { + if( this._steps.length > 4 ) { + this._steps.pop(); + this._steps.pop(); + this._steps.pop(); + } + }, + + _addEditingSteps: function() { + var licence = this._asset.getLicence(); + this.addStep( new ChangeStep( licence ) ); + this.addStep( new DialogueStep( 'creator', require( './templates/CreatorStep.handlebars' ) ) ); + this.addStep( new LicenceStep( licence ) ); + } +} ); + +module.exports = AttributionDialogue; + +},{"./ChangeStep":14,"./Dialogue":15,"./DialogueStep":17,"./LicenceStep":22,"./templates/AuthorStep.handlebars":28,"./templates/CompilationStep.handlebars":30,"./templates/CreatorStep.handlebars":31,"./templates/EditingStep.handlebars":36,"./templates/TypeOfUseStep.handlebars":44,"jquery":138}],12:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var $ = require( 'jquery' ); + +/** + * Represents a Commons author. + * + * @param {jQuery} $author + * @constructor + */ +var Author = function( $author ) { + this._$author = $author; +}; + +$.extend( Author.prototype, { + /** + * @type {jQuery} + */ + _$author: null, + + /** + * @return {jQuery} + */ + getHtml: function() { + return this._$author.clone(); + }, + + /** + * @return {string} + */ + getText: function() { + return $.trim( this._$author.text() ); + } + +} ); + +module.exports = Author; + +},{"jquery":138}],13:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ); +var Messages = require( './Messages' ); + +var BackToTopButton = function( content ) { +}; + +$.extend( BackToTopButton.prototype, { + /** + * Renders information about the usage not requiring attributing the author, + * if the asset has been licenced under appropriate licence, or starts the dialogue otherwise. + * + * @param {jQuery} $screen + */ + render: function( $screen ) { + var $btn = $( '' + ); + $btn.bind( 'click', function() { + $( ':input', '#file-form' ) + .not( ':button, :submit, :reset, :hidden' ) + .val( '' ) + .removeAttr( 'checked' ) + .removeAttr( 'selected' ); + + $( 'html, body' ).animate( { + scrollTop: 0 + }, 500 ); + setTimeout( function() { + $( '#results-screen' ).hide(); + $( '.dialogue-screen' ).remove(); + }, 500 ); + } ); + $btn.addClass( 'float-right' ); + return $btn; + } + } ); + +module.exports = BackToTopButton; + +},{"./Messages":24,"jquery":138}],14:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + DialogueStep = require( './DialogueStep' ), + ChangeStepView = require( './views/ChangeStepView' ); + +var ChangeStep = function( licence ) { + this._name = 'change'; + this._view = new ChangeStepView( licence ); +}; + +$.extend( ChangeStep.prototype, DialogueStep.prototype ); + +module.exports = ChangeStep; + +},{"./DialogueStep":17,"./views/ChangeStepView":46,"jquery":138}],15:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + Tracking = require( '../tracking.js' ); + +var Dialogue = function() { + this._steps = []; + this._data = {}; + this._currentStep = 0; + this._tracking = new Tracking(); +}; + +$.extend( Dialogue.prototype, { + /** + * @type {DialogueStep[]} + */ + _steps: null, + + /** + * @type {Object} + */ + _data: null, + + /** + * @type {int} + */ + _currentStep: null, + + /** + * @param {DialogueStep} step + */ + addStep: function( step ) { + step.setDialogue( this ); + this._steps.push( step ); + }, + + /** + * @param {int} n + */ + setStep: function( n ) { + this._currentStep = n; + }, + + /** + * @param {DialogueStep} step + */ + completeStep: function( step ) { + var self = this; + + this._data[ step.getName() ] = step.getData(); + this._currentStep++; + + self._tracking.trackEvent( 'Progress', 'Step', step.getName() ); + if( !self.currentStep() ) { + self._tracking.trackEvent( 'Progress', 'Done' ); + } + }, + + /** + * @returns {Object} + */ + getData: function() { + return this._data; + }, + + /** + * @returns {DialogueStep} + */ + currentStep: function() { + return this._steps[ this._currentStep ]; + }, + + /** + * @returns {int} + */ + currentStepIndex: function() { + return this._currentStep; + }, + + getSteps: function() { + return this._steps; + } +} ); + +module.exports = Dialogue; + +},{"../tracking.js":55,"jquery":138}],16:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + LicenceStore = require( './LicenceStore' ), + config = require( '../config.json' ), + licences = new LicenceStore( require( './LICENCES' ), config.portedLicences ), + Messages = require( './Messages' ); + +/** + * @param {Asset} asset + * @param {{}} data - the dialogue result data + * @constructor + */ +var DialogueEvaluation = function( asset, data ) { + this._asset = asset; + this._data = data; +}; + +$.extend( DialogueEvaluation.prototype, { + /** + * @type {Asset} + */ + _asset: null, + + /** + * @type {{}} + */ + _data: {}, + + _getResult: function( step, field ) { + return this._data[ step ] && this._data[ step ][ field ]; + }, + + _unknownAuthor: function() { + return this._getResult( 'author', 'no-author' ) === 'true' || this._getResult( 'author', 'author' ); + }, + + _unknownAuthorName: function() { + return this._getResult( 'author', 'author' ) || Messages.t( 'evaluation.anonymous' ); + }, + + _getAuthor: function() { + if( this._unknownAuthor() ) { + return this._unknownAuthorName(); + } + + return this._asset.getAuthors().map( function( author ) { + return typeof author === 'string' ? author : author.getText(); + } ).join( ', ' ); + }, + + _getHtmlAuthor: function() { + var self = this; + if( this._unknownAuthor() ) { + return this._unknownAuthorName(); + } + + return this._asset.getAuthors().map( function( author ) { + return typeof author === 'string' ? author : self._getAuthorWithLink( author ); + } ).join( ', ' ); + }, + + _getAuthorWithLink: function( $author ) { + var self = this, + $container = $( '
' ).append( $author.getHtml() ); + $container.find( 'a' ).each( function() { + var $link = $( this ); + $( this ).replaceWith( self._makeLink( $link.attr( 'href' ), $link.text() ) ); + } ); + return $container.html(); + }, + + _makeLink: function( target, text, isLicense ) { + if( isLicense ) { + return '' + text + ''; + } + return '' + text + ''; + }, + + _getHtmlTitle: function() { + return this._makeLink( this._asset.getUrl(), this._asset.getTitle() ); + }, + + _getHtmlLicence: function() { + var url = this.getAttributionLicence().getUrl(); + if( url ) { + return this._makeLink( this.getAttributionLicence().getUrl(), this.getAttributionLicence().getName(), true ); + } else { + return this.getAttributionLicence().getName(); + } + }, + + getAttributionLicence: function() { + return this._getResult( 'editing', 'edited' ) === 'true' && this._getResult( 'licence', 'licence' ) !== 'original' ? + licences.getLicence( this._getResult( 'licence', 'licence' ) ) + : this._asset.getLicence(); + }, + + _getEditingAttribution: function() { + var change, creator, attribution; + if( this._getResult( 'editing', 'edited' ) !== 'true' ) { + return ''; + } + + change = this._getResult( 'change', 'change' ); + creator = this._getResult( 'creator', 'name' ); + attribution = change || Messages.t( 'evaluation.edited' ); + if( creator ) { + attribution += ' ' + Messages.t( 'evaluation.by' ) + ' ' + creator; + } + return attribution; + }, + + _getAuthorAttribution: function() { + var attributionText = this._asset.getAttribution() && this._asset.getAttribution().text().trim(), + notEmpty = attributionText && attributionText.length > 0; + + if( this.isPrint() ) { + return notEmpty && attributionText; + } + return notEmpty && ( $( '
' ).append( this._asset.getAttribution() ).html() || attributionText ); + }, + + _getPrintAttribution: function() { + var attribution = ( this._getAuthorAttribution() || this._getAuthor() ) + ' ' + + '(' + this._asset.getUrl() + ')'; + var licence = this._asset.getLicence(); + if( !licence.isInGroup( 'cc4' ) ) { + attribution += ', „' + this._asset.getTitle() + '“'; + } + var editingAttribution = this._getEditingAttribution(); + if( editingAttribution ) { + attribution += ', ' + editingAttribution; + } + + var url = this.getAttributionLicence().getUrl(); + if( url ) { + attribution += ', '; + if( !editingAttribution && licence.isPublicDomain() ) { + attribution += Messages.t( 'dialogue.pd-attribution-hint' ) + + ', ' + Messages.t( 'dialogue.check-details' ) + + ' Wikimedia Commons: '; + } + attribution += url; + } + + return attribution; + }, + + _getHtmlAttribution: function() { + var attributionLink; + var licence = this.getAttributionLicence(); + var editingAttribution = this._getEditingAttribution(); + + if( !editingAttribution && licence.isPublicDomain() ) { + attributionLink = ', ' + Messages.t( 'dialogue.pd-attribution-hint' ); + if( licence.getUrl() ) { + attributionLink += ', ' + Messages.t( 'dialogue.check-details' ) + ' ' + + this._makeLink( licence.getUrl(), 'Wikimedia Commons' ); + } + } else { + attributionLink = ', ' + this._getHtmlLicence(); + } + + if( editingAttribution ) { + editingAttribution = ', ' + editingAttribution; + } + + return ( this._getAuthorAttribution() || this._getHtmlAuthor() ) + ', ' + + this._getHtmlTitle() + + editingAttribution + + attributionLink; + }, + + _getAttributionAsTextWithLinks: function() { + var urlSnippet = ''; + var url = this.getAttributionLicence().getUrl(); + if( url ) { + urlSnippet = ', ' + url; + } + var editingAttribution = this._getEditingAttribution(); + if( editingAttribution ) { + editingAttribution = ', ' + editingAttribution; + } + return ( this._getAuthorAttribution() || this._getAuthor() ) + ' ' + + '(' + this._asset.getUrl() + '), ' + + '„' + this._asset.getTitle() + '“' + + editingAttribution + + urlSnippet; + }, + + getAttribution: function() { + if( this.isPrint() ) { + return this._getPrintAttribution(); + } + + return this._getHtmlAttribution(); + }, + + getPlainTextAttribution: function() { + if( this.isPrint() || !this._asset.getLicence().isInGroup( 'cc4' ) ) { + return this._getPrintAttribution(); + } + return this._getAttributionAsTextWithLinks(); + }, + + /** + * Returns a list of the DOs and DONTs + * @returns {{dos: Array, donts: Array}} + */ + getDosAndDonts: function() { + var dos = [], + donts = [ 'terms-of-use', 'sublicences', 'cc-licence', 'technical-protection', 'rightholder-connection' ]; + + dos.push( this._getResult( 'typeOfUse', 'type' ) ); + if( this._getResult( 'compilation', 'compilation' ) === 'true' ) { + dos.push( 'compilation' ); + } + if( this._asset.getLicence().isInGroup( 'cc1' ) || this._asset.getLicence().isInGroup( 'cc2' ) ) { + donts.pop(); + } + + return { dos: dos, donts: donts }; + }, + + isPrint: function() { + return this._getResult( 'typeOfUse', 'type' ) === 'print'; + } +} ); + +module.exports = DialogueEvaluation; + +},{"../config.json":54,"./LICENCES":20,"./LicenceStore":23,"./Messages":24,"jquery":138}],17:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + DialogueStepView = require( './views/DialogueStepView' ); + +/** + * @param {string} name + * @param {Handlebars} template + * @param {boolean} isPublicDomain + * @constructor + */ +var DialogueStep = function( name, template ) { + this._name = name; + this._view = new DialogueStepView( template ); +}; + +$.extend( DialogueStep.prototype, { + /** + * @type {string} + */ + _name: null, + + /** + * @type {Dialogue} + */ + _dialogue: null, + + /** + * @type {Object} + */ + _data: null, + + /** + * @type {DialogueStepView} + */ + _view: null, + + /** + * @param {Dialogue} dialogue + */ + setDialogue: function( dialogue ) { + this._dialogue = dialogue; + }, + + getName: function() { + return this._name; + }, + + /** + * @param {Object} data - data collected from the dialogue step's form + */ + complete: function( data ) { + this._data = data; + this._dialogue.completeStep( this ); + }, + + /** + * @returns {Object} + */ + getData: function() { + return this._data; + }, + + /** + * @returns {jQuery} + */ + render: function() { + return this._view.render(); + } +} ); + +module.exports = DialogueStep; + +},{"./views/DialogueStepView":49,"jquery":138}],18:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var $ = require( 'jquery' ); + +/** + * Standardized container for image information. + * @constructor + * + * @param {string} url + * @param {string} descriptionUrl + * @param {int} size The image's size in bytes + * @param {Object} [thumbnail] + */ +var ImageInfo = function( url, descriptionUrl, size, thumbnail ) { + if( !url || !descriptionUrl ) { + throw new Error( 'Required parameters are not specified correctly' ); + } + this._url = url; + this._descriptionUrl = descriptionUrl; + this._size = size; + this._thumbnail = thumbnail || null; +}; + +$.extend( ImageInfo.prototype, { + /** + * @type {string} + */ + _url: null, + + /** + * @type {string} + */ + _descriptionUrl: null, + + /** + * The image's size in bytes + * @type {int} + */ + _size: null, + + /** + * @type {Object|null} + */ + _thumbnail: null, + + /** + * @return {string} + */ + getUrl: function() { + return this._url; + }, + + /** + * @return {int} + */ + getSize: function() { + return this._size; + }, + + /** + * @return {string} + */ + getPrettySize: function() { + var sizeOf = function( a,b,c,d,e ) { + return ( b = Math, c = b.log, d = 1024, e = c( a ) / c( d ) | 0, a / b.pow( d, e ) ).toFixed( 2 ) + + ' ' + ( e ? 'KMGTPEZY'[--e] + 'B' : 'Bytes' ); + }; + return sizeOf( this._size ); + }, + + /** + * @return {string} + */ + getDescriptionUrl: function() { + return this._descriptionUrl; + }, + + /** + * @return {Object|null} + */ + getThumbnail: function() { + return this._thumbnail; + } +} ); + +/** + * Instantiates a new ImageInfo object using the "imageinfo" JSON object returned by the MediaWiki + * API. + * + * @param {Object} imageinfo + * @return {ImageInfo} + */ +ImageInfo.newFromMediaWikiImageInfoJson = function( imageinfo ) { + return new ImageInfo( + imageinfo.url, + imageinfo.descriptionurl, + imageinfo.size, + { + url: imageinfo.thumburl || null, + width: imageinfo.thumbwidth || null, + height: imageinfo.thumbheight || null + } + ); +}; + +module.exports = ImageInfo; + +},{"jquery":138}],19:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ +'use strict'; + +var $ = require( 'jquery' ), + ApplicationError = require( './ApplicationError' ); + +/** + * Returns a filename by analyzing input. + * @constructor + * + * @param {Api} api + * + * @throws {Error} if required parameters have not been specified properly. + */ +var InputHandler = function( api ) { + if( !api ) { + throw new Error( 'Improper specification of required parameters' ); + } + this._api = api; +}; + +$.extend( InputHandler.prototype, { + /** + * @type {Api} + */ + _api: null, + + /** + * Tries to retrieve a filename evaluating the input parameter. If the referred Wikipedia page + * does not refer to an asset itself, the promise will contain ImageInfo objects for all images + * on that Wikipedia page instead of an asset filename. + * + * @param {string} input + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string|ImageInfo[]} + * [- {string} wikiUrl] + * Rejected parameters: + * - {ApplicationError} + */ + getFilename: function( input ) { + var deferred = $.Deferred(); + + if( typeof input === 'string' ) { + return this._evaluate( input ); + } else { + deferred.reject( new ApplicationError( 'input-invalid' ) ); + } + + return deferred.promise(); + }, + + /** + * Evaluates an URL an extracts the filename (MediaWiki title) from it, if the URL refers to a + * specific file. If the URL corresponds to a Wikipedia page, file info objects for the images + * used on the page are returned in the promise object. + * If no Wikimedia URL is detected, the resolved promise's parameter is the original input + * string. + * + * @param url + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string|ImageInfo[]} + * [- {string} wikiUrl] + * Rejected parameters: + * - {ApplicationError} + */ + _evaluate: function( url ) { + var deferred = $.Deferred(); + + if( this._isWikiUrl( url ) ) { + return this._getWikipediaPageImagesFileInfo( url ); + } else { + deferred.reject( new ApplicationError( 'no-wiki-url' ) ); + } + + return deferred.promise(); + }, + + /** + * @param {string} url + * @return {boolean} + */ + _isWikiUrl: function( url ) { + return url.indexOf( '.wikipedia.org/w' ) !== -1 + || ( + url.indexOf( 'upload.wikimedia.org/wikipedia/' ) !== -1 && url.indexOf( '/wikipedia/commons/' ) === -1 + ) + || url.indexOf( 'wikimedia.org/' ) !== -1; + }, + + /** + * Extracts a prefixed filename (MediaWiki page title) out of an URL string. + * + * @param {string} url + * @param {string} [wikiUrl] + * @param {boolean} [forcePrefix] + * Default: true + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string} + * Rejected parameters: + * - {ApplicationError} + */ + _extractPageTitle: function( url, wikiUrl, forcePrefix ) { + var deferred = $.Deferred(); + + if( forcePrefix === undefined ) { + forcePrefix = true; + } + + this._extractFilename( url, wikiUrl ) + .done( function( filename ) { + var prefixedFilename = decodeURIComponent( filename ); + if( prefixedFilename.indexOf( ':' ) === -1 && forcePrefix ) { + prefixedFilename = 'File:' + prefixedFilename; + } + + deferred.resolve( prefixedFilename ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + + return deferred.promise(); + }, + + /** + * Extracts filename or mediawiki page title + * + * @param {string} url + * @param {string} [wikiUrl] + * @return {Object} jQuery Promise + * Resolved parameters: + * - {string} + * Rejected parameters: + * - {ApplicationError} + */ + _extractFilename: function( url, wikiUrl ) { + var deferred = $.Deferred(), + key, + keyLoc, + matches, + segments, + pageId; + + if( url.indexOf( 'curid=' ) !== -1 ) { + matches = url.match( /curid=([^&=]+)/i ); + pageId = matches[ 1 ]; + this._api.getTitleFromPageId( pageId, wikiUrl ) + .done( function( title ) { + deferred.resolve( title ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + } + + if( url.indexOf( 'title=' ) !== -1 ) { + matches = url.match( /title=([^&]+)/i ); + deferred.resolve( matches[ 1 ] ); + return deferred.promise(); + } + url = url.replace( /\?.+$/, '' ); + + key = '#mediaviewer/'; + keyLoc = url.indexOf( key ); + + if( keyLoc !== -1 ) { + deferred.resolve( url.substr( keyLoc + key.length ) ); + return deferred.promise(); + } + + key = '#/media/'; + keyLoc = url.indexOf( key ); + + if( keyLoc !== -1 ) { + deferred.resolve( url.substr( keyLoc + key.length ) ); + return deferred.promise(); + } + + key = 'wiki/'; + keyLoc = url.indexOf( key ); + + if( keyLoc !== -1 ) { + deferred.resolve( url.substr( keyLoc + key.length ) ); + return deferred.promise(); + } + + segments = url.split( '/' ); + if( $.inArray( 'thumb', segments ) !== -1 ) { + deferred.resolve( segments[ segments.length - 2 ] ); + } else { + deferred.resolve( segments[ segments.length - 1 ] ); + } + + return deferred.promise(); + }, + + /** + * Splits a URL into the base URL of a Wiki and the asset title. + * + * @param {string} url + * @return {Object} jQuery Promise + * Resolved parameters: + * - {Object} Contains keys wikiUrl and title + * Rejected parameters: + * - {ApplicationError} + */ + _splitUrl: function( url ) { + var deferred = $.Deferred(), + regExp0 = /upload.wikimedia\.org\/wikipedia\/([-a-z]{2,})\//i, + regExp1 = /([-a-z]{2,})(\.m)?\.wikipedia\.org\//i, + regExp2 = /\/wikipedia\/([^/]+)\//, + matches, + wikiUrl; + + if( url.indexOf( 'commons.wikimedia.org/' ) !== -1 || url.indexOf( 'commons.m.wikimedia.org/' ) !== -1 ) { + wikiUrl = 'https://commons.wikimedia.org/'; + this._extractPageTitle( url ) + .done( function( title ) { + deferred.resolve( { + wikiUrl: wikiUrl, + title: title + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + } + + if( regExp0.test( url ) ) { + matches = url.match( regExp0 ); + var domain = ( matches[ 1 ] === 'commons' ) ? 'wikimedia' : 'wikipedia'; + wikiUrl = 'https://' + matches[ 1 ] + '.' + domain + '.org/'; + this._extractPageTitle( url ) + .done( function( title ) { + deferred.resolve( { + wikiUrl: wikiUrl, + title: title + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + } + + if( regExp1.test( url ) ) { + matches = url.match( regExp1 ); + wikiUrl = 'https://' + matches[ 1 ] + '.wikipedia.org/'; + + this._extractPageTitle( url, wikiUrl, false ) + .done( function( title ) { + deferred.resolve( { + wikiUrl: wikiUrl, + title: title + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + } + + if( regExp2.test( url ) ) { + matches = url.match( regExp2 ); + wikiUrl = 'https://' + matches[ 1 ] + '.wikipedia.org/'; + this._extractPageTitle( url ) + .done( function( title ) { + deferred.resolve( { + wikiUrl: wikiUrl, + title: title + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + return deferred.promise(); + } + + deferred.reject( new ApplicationError( 'url-invalid' ) ); + + return deferred.promise(); + }, + + /** + * Retrieves file info for all images used on a specific Wikipedia page. If the page is an + * image description page, the promise will transmit the prefixed filename (MediaWiki page + * title). + * + * @param {string} url + * @return {Object} jQuery Promise + * Resolved parameters: + * - {ImageInfo[]|string} + * - {string} wikiUrl + * Rejected parameters: + * - {ApplicationError} + */ + _getWikipediaPageImagesFileInfo: function( url ) { + var self = this, + deferred = $.Deferred(); + + this._splitUrl( url ) + .done( function( urlInfo ) { + var wikiUrl = urlInfo.wikiUrl; + self._api.getWikipediaPageImageInfo( decodeURI( urlInfo.title ), wikiUrl ) + .done( function( prefixedFilenameOrImageInfos, url ) { + // Overwrite initial information if the asset is not stored in the local Wiki: + self._splitUrl( url ) + .done( function( evaluatedUrlInfo ) { + if( evaluatedUrlInfo.wikiUrl !== wikiUrl ) { + deferred.resolve( evaluatedUrlInfo.title, evaluatedUrlInfo.wikiUrl ); + } else { + deferred.resolve( prefixedFilenameOrImageInfos, wikiUrl ); + } + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } ) + .fail( function( error ) { + deferred.reject( error ); + } ); + } ) + .fail( function() { + deferred.reject( new ApplicationError( 'url-invalid' ) ); + } ); + + return deferred.promise(); + } +} ); + +module.exports = InputHandler; + +},{"./ApplicationError":9,"jquery":138}],20:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var Licence = require( './Licence' ); + +/** + * Array of licences. The licence will be detected by order: If an asset features multiple licences, + * only the first one featured in this list will be detected. + * @type {Licence[]} - sorted by restrictiveness + */ +module.exports = [ + new Licence( 'cc-by-sa-4.0', [ 'cc', 'cc4' ], [], 'CC BY-SA 4.0', /^(Bild-)?CC-BY-SA(-|\/)4.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by-sa/4.0/legalcode' ), + new Licence( 'cc-by-sa-3.0-de', [ 'cc', 'cc3' ], [ 'cc-by-sa-3.0', 'cc-by-sa-4.0' ], 'CC BY-SA 3.0 DE', /^(Bild-)?CC-BY-SA(-|\/)3.0(-|\/)DE/i, 'https://creativecommons.org/licenses/by-sa/3.0/de/legalcode' ), + new Licence( 'cc-by-sa-3.0', [ 'cc', 'cc3' ], [ 'cc-by-sa-3.0-de', 'cc-by-sa-4.0' ], 'CC BY-SA 3.0', /^(Bild-)?CC-BY-SA(-|\/)3.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by-sa/3.0/legalcode' ), + new Licence( 'cc-by-sa-3.0-ported', [ 'cc', 'cc3', 'ported' ], [], 'CC BY-SA 3.0', /^(Bild-)?CC-BY-SA(-|\/)3.0-\w+$/i, 'https://creativecommons.org/licenses/by-sa/3.0/legalcode' ), + new Licence( 'cc-by-sa-2.5', [ 'cc', 'cc2.5' ], [ 'cc-by-sa-3.0-de', 'cc-by-sa-3.0', 'cc-by-sa-4.0' ], 'CC BY-SA 2.5', /^(Bild-)?CC-BY-SA(-|\/)2.5(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by-sa/2.5/legalcode' ), + new Licence( 'cc-by-sa-2.5-ported', [ 'cc', 'cc2.5', 'ported' ], [], 'CC BY-SA 2.5', /^(Bild-)?CC-BY-SA(-|\/)2.5-\w+$/i, 'https://creativecommons.org/licenses/by-sa/2.5/legalcode' ), + new Licence( 'cc-by-sa-2.0-de', [ 'cc', 'cc2', 'cc2de' ], [ 'cc-by-sa-2.0', 'cc-by-sa-2.5', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0', 'cc-by-sa-4.0' ], 'CC BY-SA 2.0 DE', /^(Bild-)?CC-BY-SA(-|\/)2.0(-|\/)DE/i, 'https://creativecommons.org/licenses/by-sa/2.0/de/legalcode' ), + new Licence( 'cc-by-sa-2.0', [ 'cc', 'cc2' ], [ 'cc-by-sa-2.0-de', 'cc-by-sa-2.5', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0', 'cc-by-sa-4.0' ], 'CC BY-SA 2.0', /^(Bild-)?CC-BY-SA(-|\/)2.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by-sa/2.0/legalcode' ), + new Licence( 'cc-by-sa-2.0-ported', [ 'cc', 'cc2', 'ported' ], [], 'CC BY-SA 2.0', /^(Bild-)?CC-BY-SA(-|\/)2.0-\w+$/i, 'https://creativecommons.org/licenses/by-sa/2.0/legalcode/' ), + new Licence( 'cc-by-sa-1.0', [ 'cc', 'cc1' ], [ 'cc-by-sa-2.0', 'cc-by-sa-2.0-de', 'cc-by-sa-2.5', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0', 'cc-by-sa-4.0' ], 'CC BY-SA 1.0', /^(Bild-)?CC-BY-SA((-|\/)1.0(([^\-]+.+|-migrated)*)?)?$/i, 'https://creativecommons.org/licenses/by-sa/1.0/legalcode' ), + new Licence( 'cc-by-sa-1.0-ported', [ 'cc', 'cc1', 'ported' ], [], 'CC BY-SA 1.0', /^(Bild-)?CC-BY-SA((-|\/)1.0)?-\w+$/i, 'https://creativecommons.org/licenses/by-sa/1.0/legalcode' ), + + new Licence( 'cc-by-4.0', [ 'cc', 'cc4', 'ccby' ], [ 'cc-by-sa-4.0' ], 'CC BY 4.0', /^CC-BY-4.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by/4.0/legalcode' ), + new Licence( 'cc-by-3.0-de', [ 'cc', 'cc3', 'ccby' ], [ 'cc-by-3.0', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0' ], 'CC BY 3.0 DE', /^CC-BY(-|\/)3.0(-|\/)DE/i, 'https://creativecommons.org/licenses/by/3.0/de/legalcode' ), + new Licence( 'cc-by-3.0', [ 'cc', 'cc3', 'ccby' ], [ 'cc-by-3.0-de', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0' ], 'CC BY 3.0', /^CC-BY-3.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by/3.0/legalcode' ), + new Licence( 'cc-by-3.0-ported', [ 'cc', 'cc3', 'ccby', 'ported' ], [], 'CC BY 3.0', /^CC-BY-3.0-\w+$/i, 'https://creativecommons.org/licenses/by/3.0/legalcode' ), + new Licence( 'cc-by-2.5', [ 'cc', 'cc2.5', 'ccby' ], [ 'cc-by-3.0-de', 'cc-by-3.0', 'cc-by-4.0', 'cc-by-sa-2.5', 'cc-by-sa-3.0-de', 'cc-by-sa-3.0' ], 'CC BY 2.5', /^CC-BY-2.5(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by/2.5/legalcode' ), + new Licence( 'cc-by-2.5-ported', [ 'cc', 'cc2.5', 'ccby', 'ported' ], [], 'CC BY 2.5', /^CC-BY-2.5-\w+$/i, 'https://creativecommons.org/licenses/by/2.5/legalcode' ), + new Licence( 'cc-by-2.0-de', [ 'cc', 'cc2', 'cc2de', 'ccby' ], [ 'cc-by-2.0', 'cc-by-2.5', 'cc-by-3.0-de', 'cc-by-3.0', 'cc-by-sa-2.0-de', 'cc-by-sa-2.0' ], 'CC BY 2.0 DE', /^CC-BY(-|\/)2.0(-|\/)DE/i, 'https://creativecommons.org/licenses/by/2.0/de/legalcode' ), + new Licence( 'cc-by-2.0', [ 'cc', 'cc2', 'ccby' ], [ 'cc-by-2.0-de', 'cc-by-2.5', 'cc-by-3.0-de', 'cc-by-3.0', 'cc-by-4.0', 'cc-by-sa-2.0-de', 'cc-by-sa-2.0' ], 'CC BY 2.0', /^CC-BY-2.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by/2.0/legalcode' ), + new Licence( 'cc-by-2.0-ported', [ 'cc', 'cc2', 'ccby', 'ported' ], [], 'CC BY 2.0', /^CC-BY-2.0-\w+$/i, 'https://creativecommons.org/licenses/by/2.0/legalcode' ), + new Licence( 'cc-by-1.0', [ 'cc', 'cc1', 'ccby' ], [ 'cc-by-2.0-de', 'cc-by-2.0', 'cc-by-2.5', 'cc-by-3.0-de', 'cc-by-3.0', 'cc-by-sa-1.0' ], 'CC BY 1.0', /^CC-BY-1.0(([^\-]+.+|-migrated)*)?$/i, 'https://creativecommons.org/licenses/by/1.0/legalcode' ), + new Licence( 'cc-by-1.0-ported', [ 'cc', 'cc1', 'ccby', 'ported' ], [], 'CC BY 1.0', /^CC-BY-1.0-\w+$/i, 'https://creativecommons.org/licenses/by/1.0/legalcode' ), + + new Licence( 'cc', [ 'unsupported' ], [], 'CC', /CC-BY/i ), + + new Licence( 'cc-zero', [ 'cc', 'cc0' ], ['cc-by-4.0', 'cc-by-sa-4.0'], 'CC0 1.0', /^(cc-zero|Bild-CC-0)/i, 'https://creativecommons.org/publicdomain/zero/1.0/legalcode' ), + new Licence( 'PD-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-1923' ), + new Licence( 'PD-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-1996' ), + new Licence( 'PD-AB-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AB-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-AB-exempt' ), + new Licence( 'PD-Acid', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Acid/, 'https://commons.wikimedia.org/wiki/Template:PD-Acid' ), + new Licence( 'PD-Afghanistan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Afghanistan/, 'https://commons.wikimedia.org/wiki/Template:PD-Afghanistan' ), + new Licence( 'PD-AIGA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AIGA/, 'https://commons.wikimedia.org/wiki/Template:PD-AIGA' ), + new Licence( 'PD-Albania', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Albania/, 'https://commons.wikimedia.org/wiki/Template:PD-Albania' ), + new Licence( 'PD-Albania-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Albania-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Albania-exempt' ), + new Licence( 'PD-Algeria', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Algeria/, 'https://commons.wikimedia.org/wiki/Template:PD-Algeria' ), + new Licence( 'PD-Algeria-photo-except', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Algeria-photo-except/, 'https://commons.wikimedia.org/wiki/Template:PD-Algeria-photo-except' ), + new Licence( 'PD-AM-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AM-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-AM-exempt' ), + new Licence( 'PD-ancient-script', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ancient-script/, 'https://commons.wikimedia.org/wiki/Template:PD-ancient-script' ), + new Licence( 'PD-Andorra-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Andorra-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Andorra-exempt' ), + new Licence( 'PD-Angola', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Angola/, 'https://commons.wikimedia.org/wiki/Template:PD-Angola' ), + new Licence( 'PD-animal', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-animal/, 'https://commons.wikimedia.org/wiki/Template:PD-animal' ), + new Licence( 'PD-anon-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-anon-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-anon-1923' ), + new Licence( 'PD-anon-50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-anon-50/, 'https://commons.wikimedia.org/wiki/Template:PD-anon-50' ), + new Licence( 'PD-anon-70', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-anon-70/, 'https://commons.wikimedia.org/wiki/Template:PD-anon-70' ), + new Licence( 'PD-anon-70-EU', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-anon-70-EU/, 'https://commons.wikimedia.org/wiki/Template:PD-anon-70-EU' ), + new Licence( 'PD-anon-auto-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-anon-auto-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-anon-auto-1996' ), + new Licence( 'PD-Antigua and Barbuda', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Antigua and Barbuda/, 'https://commons.wikimedia.org/wiki/Template:PD-Antigua and Barbuda' ), + new Licence( 'PD-AR-Anonymous', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Anonymous/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Anonymous' ), + new Licence( 'PD-AR-Deputies', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Deputies/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Deputies' ), + new Licence( 'PD-AR-Gov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Gov/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Gov' ), + new Licence( 'PD-AR-Movie', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Movie/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Movie' ), + new Licence( 'PD-AR-Music', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Music/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Music' ), + new Licence( 'PD-AR-Photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Photo/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Photo' ), + new Licence( 'PD-AR-Signs', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AR-Signs/, 'https://commons.wikimedia.org/wiki/Template:PD-AR-Signs' ), + new Licence( 'PD-Archivesnormandie', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Archivesnormandie/, 'https://commons.wikimedia.org/wiki/Template:PD-Archivesnormandie' ), + new Licence( 'PD-ARHI-RM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ARHI-RM/, 'https://commons.wikimedia.org/wiki/Template:PD-ARHI-RM' ), + new Licence( 'PD-Armenia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Armenia/, 'https://commons.wikimedia.org/wiki/Template:PD-Armenia' ), + new Licence( 'PD-Art-YorckProject', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Art-YorckProject/, 'https://commons.wikimedia.org/wiki/Template:PD-Art-YorckProject' ), + new Licence( 'PD-Australia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Australia/, 'https://commons.wikimedia.org/wiki/Template:PD-Australia' ), + new Licence( 'PD-Australia-currency', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Australia-currency/, 'https://commons.wikimedia.org/wiki/Template:PD-Australia-currency' ), + new Licence( 'PD-Austria', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Austria/, 'https://commons.wikimedia.org/wiki/Template:PD-Austria' ), + new Licence( 'PD-Austria-1932', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Austria-1932/, 'https://commons.wikimedia.org/wiki/Template:PD-Austria-1932' ), + new Licence( 'PD-Austria-survey', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Austria-survey/, 'https://commons.wikimedia.org/wiki/Template:PD-Austria-survey' ), + new Licence( 'PD-AustrianGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AustrianGov/, 'https://commons.wikimedia.org/wiki/Template:PD-AustrianGov' ), + new Licence( 'PD-author', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-author/, 'https://commons.wikimedia.org/wiki/Template:PD-author' ), + new Licence( 'PD-AWM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AWM/, 'https://commons.wikimedia.org/wiki/Template:PD-AWM' ), + new Licence( 'PD-AZ-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-AZ-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-AZ-exempt' ), + new Licence( 'PD-Azerbaijan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Azerbaijan/, 'https://commons.wikimedia.org/wiki/Template:PD-Azerbaijan' ), + new Licence( 'PD-B-road-sign', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-B-road-sign/, 'https://commons.wikimedia.org/wiki/Template:PD-B-road-sign' ), + new Licence( 'PD-Bahamas-anonymous', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bahamas-anonymous/, 'https://commons.wikimedia.org/wiki/Template:PD-Bahamas-anonymous' ), + new Licence( 'PD-Bahrain', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bahrain/, 'https://commons.wikimedia.org/wiki/Template:PD-Bahrain' ), + new Licence( 'PD-Bangladesh', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bangladesh/, 'https://commons.wikimedia.org/wiki/Template:PD-Bangladesh' ), + new Licence( 'PD-Barbados', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Barbados/, 'https://commons.wikimedia.org/wiki/Template:PD-Barbados' ), + new Licence( 'PD-because', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-because/, 'https://commons.wikimedia.org/wiki/Template:PD-because' ), + new Licence( 'PD-Belarus', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Belarus/, 'https://commons.wikimedia.org/wiki/Template:PD-Belarus' ), + new Licence( 'PD-Belgium-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Belgium-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Belgium-exempt' ), + new Licence( 'PD-Belize', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Belize/, 'https://commons.wikimedia.org/wiki/Template:PD-Belize' ), + new Licence( 'PD-Benin', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Benin/, 'https://commons.wikimedia.org/wiki/Template:PD-Benin' ), + new Licence( 'PD-BG-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BG-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-BG-exempt' ), + new Licence( 'PD-BH-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BH-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-BH-exempt' ), + new Licence( 'PD-Bhutan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bhutan/, 'https://commons.wikimedia.org/wiki/Template:PD-Bhutan' ), + new Licence( 'PD-Bishop', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bishop/, 'https://commons.wikimedia.org/wiki/Template:PD-Bishop' ), + new Licence( 'PD-BNF', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BNF/, 'https://commons.wikimedia.org/wiki/Template:PD-BNF' ), + new Licence( 'PD-Bolivia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bolivia/, 'https://commons.wikimedia.org/wiki/Template:PD-Bolivia' ), + new Licence( 'PD-Bosnia and Herzegovina', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Bosnia and Herzegovina/, 'https://commons.wikimedia.org/wiki/Template:PD-Bosnia and Herzegovina' ), + new Licence( 'PD-Botswana', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Botswana/, 'https://commons.wikimedia.org/wiki/Template:PD-Botswana' ), + new Licence( 'PD-BR-1937', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BR-1937/, 'https://commons.wikimedia.org/wiki/Template:PD-BR-1937' ), + new Licence( 'PD-BR-URAAanon', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BR-URAAanon/, 'https://commons.wikimedia.org/wiki/Template:PD-BR-URAAanon' ), + new Licence( 'PD-BR-URAAwriter', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BR-URAAwriter/, 'https://commons.wikimedia.org/wiki/Template:PD-BR-URAAwriter' ), + new Licence( 'PD-Brazil-media', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Brazil-media/, 'https://commons.wikimedia.org/wiki/Template:PD-Brazil-media' ), + new Licence( 'PD-BrazilGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BrazilGov/, 'https://commons.wikimedia.org/wiki/Template:PD-BrazilGov' ), + new Licence( 'PD-Brunei', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Brunei/, 'https://commons.wikimedia.org/wiki/Template:PD-Brunei' ), + new Licence( 'PD-BulgarianGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BulgarianGov/, 'https://commons.wikimedia.org/wiki/Template:PD-BulgarianGov' ), + new Licence( 'PD-Burkina Faso', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Burkina Faso/, 'https://commons.wikimedia.org/wiki/Template:PD-Burkina Faso' ), + new Licence( 'PD-Burundi', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Burundi/, 'https://commons.wikimedia.org/wiki/Template:PD-Burundi' ), + new Licence( 'PD-BW', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BW/, 'https://commons.wikimedia.org/wiki/Template:PD-BW' ), + new Licence( 'PD-BY-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-BY-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-BY-exempt' ), + new Licence( 'PD-CAGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-CAGov/, 'https://commons.wikimedia.org/wiki/Template:PD-CAGov' ), + new Licence( 'PD-Cambodia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Cambodia/, 'https://commons.wikimedia.org/wiki/Template:PD-Cambodia' ), + new Licence( 'PD-CambodiaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-CambodiaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-CambodiaGov' ), + new Licence( 'PD-Cameroon', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Cameroon/, 'https://commons.wikimedia.org/wiki/Template:PD-Cameroon' ), + new Licence( 'PD-Canada', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Canada/, 'https://commons.wikimedia.org/wiki/Template:PD-Canada' ), + new Licence( 'PD-Canada-anon', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Canada-anon/, 'https://commons.wikimedia.org/wiki/Template:PD-Canada-anon' ), + new Licence( 'PD-Canada-creator', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Canada-creator/, 'https://commons.wikimedia.org/wiki/Template:PD-Canada-creator' ), + new Licence( 'PD-Canada-Crown', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Canada-Crown/, 'https://commons.wikimedia.org/wiki/Template:PD-Canada-Crown' ), + new Licence( 'PD-Canada-stamp', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Canada-stamp/, 'https://commons.wikimedia.org/wiki/Template:PD-Canada-stamp' ), + new Licence( 'PD-Central African Republic', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Central African Republic/, 'https://commons.wikimedia.org/wiki/Template:PD-Central African Republic' ), + new Licence( 'PD-Chad', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Chad/, 'https://commons.wikimedia.org/wiki/Template:PD-Chad' ), + new Licence( 'PD-chem', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-chem/, 'https://commons.wikimedia.org/wiki/Template:PD-chem' ), + new Licence( 'PD-Chile', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Chile/, 'https://commons.wikimedia.org/wiki/Template:PD-Chile' ), + new Licence( 'PD-China', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-China/, 'https://commons.wikimedia.org/wiki/Template:PD-China' ), + new Licence( 'PD-China-film', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-China-film/, 'https://commons.wikimedia.org/wiki/Template:PD-China-film' ), + new Licence( 'PD-Coa-Finland', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Finland/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Finland' ), + new Licence( 'PD-Coa-Germany', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Germany/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Germany' ), + new Licence( 'PD-Coa-Germany-b1945', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Germany-b1945/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Germany-b1945' ), + new Licence( 'PD-Coa-Hungary', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Hungary/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Hungary' ), + new Licence( 'PD-Coa-Mexico', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Mexico/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Mexico' ), + new Licence( 'PD-Coa-Norway', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Norway/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Norway' ), + new Licence( 'PD-Coa-Switzerland', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Coa-Switzerland/, 'https://commons.wikimedia.org/wiki/Template:PD-Coa-Switzerland' ), + new Licence( 'PD-Colombia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Colombia/, 'https://commons.wikimedia.org/wiki/Template:PD-Colombia' ), + new Licence( 'PD-Comoros', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Comoros/, 'https://commons.wikimedia.org/wiki/Template:PD-Comoros' ), + new Licence( 'PD-Cook Islands', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Cook Islands/, 'https://commons.wikimedia.org/wiki/Template:PD-Cook Islands' ), + new Licence( 'PD-copyright holder', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-copyright holder/, 'https://commons.wikimedia.org/wiki/Template:PD-copyright holder' ), + new Licence( 'PD-Costa Rica', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Costa Rica/, 'https://commons.wikimedia.org/wiki/Template:PD-Costa Rica' ), + new Licence( 'PD-Cote d\'Ivoire', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Cote d\'Ivoire/, 'https://commons.wikimedia.org/wiki/Template:PD-Cote d\'Ivoire' ), + new Licence( 'PD-Croatia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Croatia/, 'https://commons.wikimedia.org/wiki/Template:PD-Croatia' ), + new Licence( 'PD-Croatia-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Croatia-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Croatia-exempt' ), + new Licence( 'PD-CSIRO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-CSIRO/, 'https://commons.wikimedia.org/wiki/Template:PD-CSIRO' ), + new Licence( 'PD-CSPAN', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-CSPAN/, 'https://commons.wikimedia.org/wiki/Template:PD-CSPAN' ), + new Licence( 'PD-Cuba', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Cuba/, 'https://commons.wikimedia.org/wiki/Template:PD-Cuba' ), + new Licence( 'PD-CzechGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-CzechGov/, 'https://commons.wikimedia.org/wiki/Template:PD-CzechGov' ), + new Licence( 'PD-DBZ stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-DBZ stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-DBZ stamps' ), + new Licence( 'PD-Democratic Republic of the Congo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Democratic Republic of the Congo/, 'https://commons.wikimedia.org/wiki/Template:PD-Democratic Republic of the Congo' ), + new Licence( 'PD-Denmark', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Denmark/, 'https://commons.wikimedia.org/wiki/Template:PD-Denmark' ), + new Licence( 'PD-Denmark50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Denmark50/, 'https://commons.wikimedia.org/wiki/Template:PD-Denmark50' ), + new Licence( 'PD-DenmarkGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-DenmarkGov/, 'https://commons.wikimedia.org/wiki/Template:PD-DenmarkGov' ), + new Licence( 'PD-Deutsche Bundespost Berlin stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Deutsche Bundespost Berlin stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-Deutsche Bundespost Berlin stamps' ), + new Licence( 'PD-Deutsche Bundespost stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Deutsche Bundespost stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-Deutsche Bundespost stamps' ), + new Licence( 'PD-Directory-Germany', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Directory-Germany/, 'https://commons.wikimedia.org/wiki/Template:PD-Directory-Germany' ), + new Licence( 'PD-Djibouti', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Djibouti/, 'https://commons.wikimedia.org/wiki/Template:PD-Djibouti' ), + new Licence( 'PD-Dominica', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Dominica/, 'https://commons.wikimedia.org/wiki/Template:PD-Dominica' ), + new Licence( 'PD-DPRKGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-DPRKGov/, 'https://commons.wikimedia.org/wiki/Template:PD-DPRKGov' ), + new Licence( 'PD-DPRKOld', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-DPRKOld/, 'https://commons.wikimedia.org/wiki/Template:PD-DPRKOld' ), + new Licence( 'PD-EC-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EC-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-EC-exempt' ), + new Licence( 'PD-EdictGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EdictGov/, 'https://commons.wikimedia.org/wiki/Template:PD-EdictGov' ), + new Licence( 'PD-Edison Records', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Edison Records/, 'https://commons.wikimedia.org/wiki/Template:PD-Edison Records' ), + new Licence( 'PD-EE-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EE-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-EE-exempt' ), + new Licence( 'PD-EEA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EEA/, 'https://commons.wikimedia.org/wiki/Template:PD-EEA' ), + new Licence( 'PD-Egypt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Egypt/, 'https://commons.wikimedia.org/wiki/Template:PD-Egypt' ), + new Licence( 'PD-Egypt-folklore', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Egypt-folklore/, 'https://commons.wikimedia.org/wiki/Template:PD-Egypt-folklore' ), + new Licence( 'PD-Egypt-official', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Egypt-official/, 'https://commons.wikimedia.org/wiki/Template:PD-Egypt-official' ), + new Licence( 'PD-Egypt-stamp', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Egypt-stamp/, 'https://commons.wikimedia.org/wiki/Template:PD-Egypt-stamp' ), + new Licence( 'PD-Empire of China Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Empire of China Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-Empire of China Government Gazette' ), + new Licence( 'PD-Eritrea', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Eritrea/, 'https://commons.wikimedia.org/wiki/Template:PD-Eritrea' ), + new Licence( 'PD-Estonia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Estonia/, 'https://commons.wikimedia.org/wiki/Template:PD-Estonia' ), + new Licence( 'PD-Ethiopia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Ethiopia/, 'https://commons.wikimedia.org/wiki/Template:PD-Ethiopia' ), + new Licence( 'PD-EU-audio', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EU-audio/, 'https://commons.wikimedia.org/wiki/Template:PD-EU-audio' ), + new Licence( 'PD-EU-no author disclosure', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EU-no author disclosure/, 'https://commons.wikimedia.org/wiki/Template:PD-EU-no author disclosure' ), + new Licence( 'PD-EU-unpublished', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EU-unpublished/, 'https://commons.wikimedia.org/wiki/Template:PD-EU-unpublished' ), + new Licence( 'PD-EUGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-EUGov/, 'https://commons.wikimedia.org/wiki/Template:PD-EUGov' ), + new Licence( 'PD-Faroe Islands50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Faroe Islands50/, 'https://commons.wikimedia.org/wiki/Template:PD-Faroe Islands50' ), + new Licence( 'PD-Fiji', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Fiji/, 'https://commons.wikimedia.org/wiki/Template:PD-Fiji' ), + new Licence( 'PD-Finland', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Finland/, 'https://commons.wikimedia.org/wiki/Template:PD-Finland' ), + new Licence( 'PD-Finland50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Finland50/, 'https://commons.wikimedia.org/wiki/Template:PD-Finland50' ), + new Licence( 'PD-FinlandGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-FinlandGov/, 'https://commons.wikimedia.org/wiki/Template:PD-FinlandGov' ), + new Licence( 'PD-FinlandStamp', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-FinlandStamp/, 'https://commons.wikimedia.org/wiki/Template:PD-FinlandStamp' ), + new Licence( 'PD-flag-50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-flag-50/, 'https://commons.wikimedia.org/wiki/Template:PD-flag-50' ), + new Licence( 'PD-Flag-Germany', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Flag-Germany/, 'https://commons.wikimedia.org/wiki/Template:PD-Flag-Germany' ), + new Licence( 'PD-FLGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-FLGov/, 'https://commons.wikimedia.org/wiki/Template:PD-FLGov' ), + new Licence( 'PD-font', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-font/, 'https://commons.wikimedia.org/wiki/Template:PD-font' ), + new Licence( 'PD-France', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-France/, 'https://commons.wikimedia.org/wiki/Template:PD-France' ), + new Licence( 'PD-GallicaScan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GallicaScan/, 'https://commons.wikimedia.org/wiki/Template:PD-GallicaScan' ), + new Licence( 'PD-Gambia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Gambia/, 'https://commons.wikimedia.org/wiki/Template:PD-Gambia' ), + new Licence( 'PD-GDR stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GDR stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-GDR stamps' ), + new Licence( 'PD-GE-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GE-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-GE-exempt' ), + new Licence( 'PD-Georgia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Georgia/, 'https://commons.wikimedia.org/wiki/Template:PD-Georgia' ), + new Licence( 'PD-German Empire stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-German Empire stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-German Empire stamps' ), + new Licence( 'PD-German logos', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-German logos/, 'https://commons.wikimedia.org/wiki/Template:PD-German logos' ), + new Licence( 'PD-German stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-German stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-German stamps' ), + new Licence( 'PD-GermanGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GermanGov/, 'https://commons.wikimedia.org/wiki/Template:PD-GermanGov' ), + new Licence( 'PD-GermanGov-currency', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GermanGov-currency/, 'https://commons.wikimedia.org/wiki/Template:PD-GermanGov-currency' ), + new Licence( 'PD-Germany-§134', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Germany-§134/, 'https://commons.wikimedia.org/wiki/Template:PD-Germany-§134' ), + new Licence( 'PD-Germany-§134-KUG', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Germany-§134-KUG/, 'https://commons.wikimedia.org/wiki/Template:PD-Germany-§134-KUG' ), + new Licence( 'PD-GHAGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GHAGov/, 'https://commons.wikimedia.org/wiki/Template:PD-GHAGov' ), + new Licence( 'PD-Ghana', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Ghana/, 'https://commons.wikimedia.org/wiki/Template:PD-Ghana' ), + new Licence( 'PD-GreekGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GreekGov/, 'https://commons.wikimedia.org/wiki/Template:PD-GreekGov' ), + new Licence( 'PD-GreekGov-HellenicNavy', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-GreekGov-HellenicNavy/, 'https://commons.wikimedia.org/wiki/Template:PD-GreekGov-HellenicNavy' ), + new Licence( 'PD-Grenada', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Grenada/, 'https://commons.wikimedia.org/wiki/Template:PD-Grenada' ), + new Licence( 'PD-Guinea-Bissau', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Guinea-Bissau/, 'https://commons.wikimedia.org/wiki/Template:PD-Guinea-Bissau' ), + new Licence( 'PD-Gutenberg', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Gutenberg/, 'https://commons.wikimedia.org/wiki/Template:PD-Gutenberg' ), + new Licence( 'PD-Guyana', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Guyana/, 'https://commons.wikimedia.org/wiki/Template:PD-Guyana' ), + new Licence( 'PD-Haiti', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Haiti/, 'https://commons.wikimedia.org/wiki/Template:PD-Haiti' ), + new Licence( 'PD-heirs', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-heirs/, 'https://commons.wikimedia.org/wiki/Template:PD-heirs' ), + new Licence( 'PD-HK', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-HK/, 'https://commons.wikimedia.org/wiki/Template:PD-HK' ), + new Licence( 'PD-HK-factsheet', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-HK-factsheet/, 'https://commons.wikimedia.org/wiki/Template:PD-HK-factsheet' ), + new Licence( 'PD-HK-PR', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-HK-PR/, 'https://commons.wikimedia.org/wiki/Template:PD-HK-PR' ), + new Licence( 'PD-HU-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-HU-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-HU-exempt' ), + new Licence( 'PD-HU-unknown', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-HU-unknown/, 'https://commons.wikimedia.org/wiki/Template:PD-HU-unknown' ), + new Licence( 'PD-Hubble', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Hubble/, 'https://commons.wikimedia.org/wiki/Template:PD-Hubble' ), + new Licence( 'PD-Hungary', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Hungary/, 'https://commons.wikimedia.org/wiki/Template:PD-Hungary' ), + new Licence( 'PD-Iceland50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Iceland50/, 'https://commons.wikimedia.org/wiki/Template:PD-Iceland50' ), + new Licence( 'PD-IcelandGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IcelandGov/, 'https://commons.wikimedia.org/wiki/Template:PD-IcelandGov' ), + new Licence( 'PD-IDGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IDGov/, 'https://commons.wikimedia.org/wiki/Template:PD-IDGov' ), + new Licence( 'PD-IDNoCopyright', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IDNoCopyright/, 'https://commons.wikimedia.org/wiki/Template:PD-IDNoCopyright' ), + new Licence( 'PD-IDOld-Art29', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IDOld-Art29/, 'https://commons.wikimedia.org/wiki/Template:PD-IDOld-Art29' ), + new Licence( 'PD-IDOld-Art30', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IDOld-Art30/, 'https://commons.wikimedia.org/wiki/Template:PD-IDOld-Art30' ), + new Licence( 'PD-imf.org', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-imf.org/, 'https://commons.wikimedia.org/wiki/Template:PD-imf.org' ), + new Licence( 'PD-India', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-India/, 'https://commons.wikimedia.org/wiki/Template:PD-India' ), + new Licence( 'PD-India-photo-1958', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-India-photo-1958/, 'https://commons.wikimedia.org/wiki/Template:PD-India-photo-1958' ), + new Licence( 'PD-India-URAA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-India-URAA/, 'https://commons.wikimedia.org/wiki/Template:PD-India-URAA' ), + new Licence( 'PD-ineligible', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ineligible/, 'https://commons.wikimedia.org/wiki/Template:PD-ineligible' ), + new Licence( 'PD-Iran', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Iran/, 'https://commons.wikimedia.org/wiki/Template:PD-Iran' ), + new Licence( 'PD-Iraq', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Iraq/, 'https://commons.wikimedia.org/wiki/Template:PD-Iraq' ), + new Licence( 'PD-IrishGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IrishGov/, 'https://commons.wikimedia.org/wiki/Template:PD-IrishGov' ), + new Licence( 'PD-IS-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IS-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-IS-exempt' ), + new Licence( 'PD-Israel', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Israel/, 'https://commons.wikimedia.org/wiki/Template:PD-Israel' ), + new Licence( 'PD-IsraelGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-IsraelGov/, 'https://commons.wikimedia.org/wiki/Template:PD-IsraelGov' ), + new Licence( 'PD-Italy', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Italy/, 'https://commons.wikimedia.org/wiki/Template:PD-Italy' ), + new Licence( 'PD-Italy-audio', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Italy-audio/, 'https://commons.wikimedia.org/wiki/Template:PD-Italy-audio' ), + new Licence( 'PD-Italy-EdictGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Italy-EdictGov/, 'https://commons.wikimedia.org/wiki/Template:PD-Italy-EdictGov' ), + new Licence( 'PD-Jamaica', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Jamaica/, 'https://commons.wikimedia.org/wiki/Template:PD-Jamaica' ), + new Licence( 'PD-Japan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan' ), + new Licence( 'PD-Japan-audio', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan-audio/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan-audio' ), + new Licence( 'PD-Japan-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan-exempt' ), + new Licence( 'PD-Japan-film', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan-film/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan-film' ), + new Licence( 'PD-Japan-oldphoto', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan-oldphoto/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan-oldphoto' ), + new Licence( 'PD-Japan-organization', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Japan-organization/, 'https://commons.wikimedia.org/wiki/Template:PD-Japan-organization' ), + new Licence( 'PD-Jordan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Jordan/, 'https://commons.wikimedia.org/wiki/Template:PD-Jordan' ), + new Licence( 'PD-JordanU', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-JordanU/, 'https://commons.wikimedia.org/wiki/Template:PD-JordanU' ), + new Licence( 'PD-JORF', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-JORF/, 'https://commons.wikimedia.org/wiki/Template:PD-JORF' ), + new Licence( 'PD-JORF-nor-conso', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-JORF-nor-conso/, 'https://commons.wikimedia.org/wiki/Template:PD-JORF-nor-conso' ), + new Licence( 'PD-Kansallisarkisto', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Kansallisarkisto/, 'https://commons.wikimedia.org/wiki/Template:PD-Kansallisarkisto' ), + new Licence( 'PD-Kenya', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Kenya/, 'https://commons.wikimedia.org/wiki/Template:PD-Kenya' ), + new Licence( 'PD-KenyaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-KenyaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-KenyaGov' ), + new Licence( 'PD-KG-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-KG-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-KG-exempt' ), + new Licence( 'PD-Kiribati', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Kiribati/, 'https://commons.wikimedia.org/wiki/Template:PD-Kiribati' ), + new Licence( 'PD-KoreaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-KoreaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-KoreaGov' ), + new Licence( 'PD-Kosovo-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Kosovo-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Kosovo-exempt' ), + new Licence( 'PD-KosovoGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-KosovoGov/, 'https://commons.wikimedia.org/wiki/Template:PD-KosovoGov' ), + new Licence( 'PD-Kuwait', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Kuwait/, 'https://commons.wikimedia.org/wiki/Template:PD-Kuwait' ), + new Licence( 'PD-KZ-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-KZ-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-KZ-exempt' ), + new Licence( 'PD-La Moncloa', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-La Moncloa/, 'https://commons.wikimedia.org/wiki/Template:PD-La Moncloa' ), + new Licence( 'PD-LACMA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-LACMA/, 'https://commons.wikimedia.org/wiki/Template:PD-LACMA' ), + new Licence( 'PD-Laos', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Laos/, 'https://commons.wikimedia.org/wiki/Template:PD-Laos' ), + new Licence( 'PD-Lebanon', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Lebanon/, 'https://commons.wikimedia.org/wiki/Template:PD-Lebanon' ), + new Licence( 'PD-Lebanon-Photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Lebanon-Photo/, 'https://commons.wikimedia.org/wiki/Template:PD-Lebanon-Photo' ), + new Licence( 'PD-Liberia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Liberia/, 'https://commons.wikimedia.org/wiki/Template:PD-Liberia' ), + new Licence( 'PD-Libya', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Libya/, 'https://commons.wikimedia.org/wiki/Template:PD-Libya' ), + new Licence( 'PD-Liechtenstein', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Liechtenstein/, 'https://commons.wikimedia.org/wiki/Template:PD-Liechtenstein' ), + new Licence( 'PD-link', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-link/, 'https://commons.wikimedia.org/wiki/Template:PD-link' ), + new Licence( 'PD-LN', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-LN/, 'https://commons.wikimedia.org/wiki/Template:PD-LN' ), + new Licence( 'PD-LT-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-LT-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-LT-exempt' ), + new Licence( 'PD-LV-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-LV-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-LV-exempt' ), + new Licence( 'PD-MacaoGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MacaoGov/, 'https://commons.wikimedia.org/wiki/Template:PD-MacaoGov' ), + new Licence( 'PD-MacaoGov-text', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MacaoGov-text/, 'https://commons.wikimedia.org/wiki/Template:PD-MacaoGov-text' ), + new Licence( 'PD-Macedonia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Macedonia/, 'https://commons.wikimedia.org/wiki/Template:PD-Macedonia' ), + new Licence( 'PD-Macedonia-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Macedonia-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Macedonia-exempt' ), + new Licence( 'PD-Madagascar', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Madagascar/, 'https://commons.wikimedia.org/wiki/Template:PD-Madagascar' ), + new Licence( 'PD-MAGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MAGov/, 'https://commons.wikimedia.org/wiki/Template:PD-MAGov' ), + new Licence( 'PD-Malawi', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Malawi/, 'https://commons.wikimedia.org/wiki/Template:PD-Malawi' ), + new Licence( 'PD-Malaysia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Malaysia/, 'https://commons.wikimedia.org/wiki/Template:PD-Malaysia' ), + new Licence( 'PD-Maldives', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Maldives/, 'https://commons.wikimedia.org/wiki/Template:PD-Maldives' ), + new Licence( 'PD-Mali', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mali/, 'https://commons.wikimedia.org/wiki/Template:PD-Mali' ), + new Licence( 'PD-Manchukuo-stamps', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Manchukuo-stamps/, 'https://commons.wikimedia.org/wiki/Template:PD-Manchukuo-stamps' ), + new Licence( 'PD-MapLibrary', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MapLibrary/, 'https://commons.wikimedia.org/wiki/Template:PD-MapLibrary' ), + new Licence( 'PD-Mauritania', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mauritania/, 'https://commons.wikimedia.org/wiki/Template:PD-Mauritania' ), + new Licence( 'PD-Mauritius', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mauritius/, 'https://commons.wikimedia.org/wiki/Template:PD-Mauritius' ), + new Licence( 'PD-MD-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MD-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-MD-exempt' ), + new Licence( 'PD-medical', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-medical/, 'https://commons.wikimedia.org/wiki/Template:PD-medical' ), + new Licence( 'PD-Mexico', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mexico/, 'https://commons.wikimedia.org/wiki/Template:PD-Mexico' ), + new Licence( 'PD-Mexico-NIP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mexico-NIP/, 'https://commons.wikimedia.org/wiki/Template:PD-Mexico-NIP' ), + new Licence( 'PD-MH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MH/, 'https://commons.wikimedia.org/wiki/Template:PD-MH' ), + new Licence( 'PD-Micronesia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Micronesia/, 'https://commons.wikimedia.org/wiki/Template:PD-Micronesia' ), + new Licence( 'PD-MNEGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MNEGov/, 'https://commons.wikimedia.org/wiki/Template:PD-MNEGov' ), + new Licence( 'PD-MO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO/, 'https://commons.wikimedia.org/wiki/Template:PD-MO' ), + new Licence( 'PD-MO-old-art', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO-old-art/, 'https://commons.wikimedia.org/wiki/Template:PD-MO-old-art' ), + new Licence( 'PD-MO-old-audiovisual', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO-old-audiovisual/, 'https://commons.wikimedia.org/wiki/Template:PD-MO-old-audiovisual' ), + new Licence( 'PD-MO-old-broadcast', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO-old-broadcast/, 'https://commons.wikimedia.org/wiki/Template:PD-MO-old-broadcast' ), + new Licence( 'PD-MO-old-media', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO-old-media/, 'https://commons.wikimedia.org/wiki/Template:PD-MO-old-media' ), + new Licence( 'PD-MO-old-photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MO-old-photo/, 'https://commons.wikimedia.org/wiki/Template:PD-MO-old-photo' ), + new Licence( 'PD-ModernMarvels', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ModernMarvels/, 'https://commons.wikimedia.org/wiki/Template:PD-ModernMarvels' ), + new Licence( 'PD-Moldova', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Moldova/, 'https://commons.wikimedia.org/wiki/Template:PD-Moldova' ), + new Licence( 'PD-money-CZ', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-money-CZ/, 'https://commons.wikimedia.org/wiki/Template:PD-money-CZ' ), + new Licence( 'PD-Mongolia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mongolia/, 'https://commons.wikimedia.org/wiki/Template:PD-Mongolia' ), + new Licence( 'PD-Mongolia-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mongolia-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Mongolia-exempt' ), + new Licence( 'PD-Montenegro', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Montenegro/, 'https://commons.wikimedia.org/wiki/Template:PD-Montenegro' ), + new Licence( 'PD-Morocco', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Morocco/, 'https://commons.wikimedia.org/wiki/Template:PD-Morocco' ), + new Licence( 'PD-Mozambique', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Mozambique/, 'https://commons.wikimedia.org/wiki/Template:PD-Mozambique' ), + new Licence( 'PD-music-ineligible', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-music-ineligible/, 'https://commons.wikimedia.org/wiki/Template:PD-music-ineligible' ), + new Licence( 'PD-MUTCD-AK', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-AK/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-AK' ), + new Licence( 'PD-MUTCD-AZ', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-AZ/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-AZ' ), + new Licence( 'PD-MUTCD-CA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-CA/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-CA' ), + new Licence( 'PD-MUTCD-CO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-CO/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-CO' ), + new Licence( 'PD-MUTCD-ID', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-ID/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-ID' ), + new Licence( 'PD-MUTCD-IL', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-IL/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-IL' ), + new Licence( 'PD-MUTCD-IN', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-IN/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-IN' ), + new Licence( 'PD-MUTCD-MA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-MA/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-MA' ), + new Licence( 'PD-MUTCD-MI', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-MI/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-MI' ), + new Licence( 'PD-MUTCD-MN', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-MN/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-MN' ), + new Licence( 'PD-MUTCD-MO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-MO/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-MO' ), + new Licence( 'PD-MUTCD-NC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-NC/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-NC' ), + new Licence( 'PD-MUTCD-NE', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-NE/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-NE' ), + new Licence( 'PD-MUTCD-NY', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-NY/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-NY' ), + new Licence( 'PD-MUTCD-OH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-OH/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-OH' ), + new Licence( 'PD-MUTCD-OR', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-OR/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-OR' ), + new Licence( 'PD-MUTCD-PA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-PA/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-PA' ), + new Licence( 'PD-MUTCD-SC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-SC/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-SC' ), + new Licence( 'PD-MUTCD-TX', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-TX/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-TX' ), + new Licence( 'PD-MUTCD-UT', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-UT/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-UT' ), + new Licence( 'PD-MUTCD-VA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-VA/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-VA' ), + new Licence( 'PD-MUTCD-WA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-WA/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-WA' ), + new Licence( 'PD-MUTCD-WI', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MUTCD-WI/, 'https://commons.wikimedia.org/wiki/Template:PD-MUTCD-WI' ), + new Licence( 'PD-MX-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-MX-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-MX-exempt' ), + new Licence( 'PD-Myanmar', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Myanmar/, 'https://commons.wikimedia.org/wiki/Template:PD-Myanmar' ), + new Licence( 'PD-Namibia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Namibia/, 'https://commons.wikimedia.org/wiki/Template:PD-Namibia' ), + new Licence( 'PD-NamibiaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NamibiaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-NamibiaGov' ), + new Licence( 'PD-Nauru', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Nauru/, 'https://commons.wikimedia.org/wiki/Template:PD-Nauru' ), + new Licence( 'PD-Nepal', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Nepal/, 'https://commons.wikimedia.org/wiki/Template:PD-Nepal' ), + new Licence( 'PD-Netherlands Antilles', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Netherlands Antilles/, 'https://commons.wikimedia.org/wiki/Template:PD-Netherlands Antilles' ), + new Licence( 'PD-New Zealand', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-New Zealand/, 'https://commons.wikimedia.org/wiki/Template:PD-New Zealand' ), + new Licence( 'PD-NI-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NI-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-NI-exempt' ), + new Licence( 'PD-Niger', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Niger/, 'https://commons.wikimedia.org/wiki/Template:PD-Niger' ), + new Licence( 'PD-Nigeria', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Nigeria/, 'https://commons.wikimedia.org/wiki/Template:PD-Nigeria' ), + new Licence( 'PD-Niue', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Niue/, 'https://commons.wikimedia.org/wiki/Template:PD-Niue' ), + new Licence( 'PD-NKR-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NKR-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-NKR-exempt' ), + new Licence( 'PD-NL-gemeentevlag', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NL-gemeentevlag/, 'https://commons.wikimedia.org/wiki/Template:PD-NL-gemeentevlag' ), + new Licence( 'PD-NL-gemeentewapen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NL-gemeentewapen/, 'https://commons.wikimedia.org/wiki/Template:PD-NL-gemeentewapen' ), + new Licence( 'PD-NL-verkeersbord', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NL-verkeersbord/, 'https://commons.wikimedia.org/wiki/Template:PD-NL-verkeersbord' ), + new Licence( 'PD-NL-water transport sign', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NL-water transport sign/, 'https://commons.wikimedia.org/wiki/Template:PD-NL-water transport sign' ), + new Licence( 'PD-North Korea', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-North Korea/, 'https://commons.wikimedia.org/wiki/Template:PD-North Korea' ), + new Licence( 'PD-Norway-record', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Norway-record/, 'https://commons.wikimedia.org/wiki/Template:PD-Norway-record' ), + new Licence( 'PD-Norway50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Norway50/, 'https://commons.wikimedia.org/wiki/Template:PD-Norway50' ), + new Licence( 'PD-Norway70', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Norway70/, 'https://commons.wikimedia.org/wiki/Template:PD-Norway70' ), + new Licence( 'PD-NorwayGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NorwayGov/, 'https://commons.wikimedia.org/wiki/Template:PD-NorwayGov' ), + new Licence( 'PD-NWS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-NWS/, 'https://commons.wikimedia.org/wiki/Template:PD-NWS' ), + new Licence( 'PD-ODFW', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ODFW/, 'https://commons.wikimedia.org/wiki/Template:PD-ODFW' ), + new Licence( 'PD-OK-LSBPD', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-OK-LSBPD/, 'https://commons.wikimedia.org/wiki/Template:PD-OK-LSBPD' ), + new Licence( 'PD-old', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old/, 'https://commons.wikimedia.org/wiki/Template:PD-old' ), + new Licence( 'PD-old-100', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-100/, 'https://commons.wikimedia.org/wiki/Template:PD-old-100' ), + new Licence( 'PD-old-100-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-100-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-100-1923' ), + new Licence( 'PD-old-100-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-100-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-100-1996' ), + new Licence( 'PD-old-50', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-50/, 'https://commons.wikimedia.org/wiki/Template:PD-old-50' ), + new Licence( 'PD-old-50-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-50-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-50-1923' ), + new Licence( 'PD-old-50-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-50-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-50-1996' ), + new Licence( 'PD-old-60-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-60-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-60-1923' ), + new Licence( 'PD-old-60-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-60-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-60-1996' ), + new Licence( 'PD-old-70', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-70/, 'https://commons.wikimedia.org/wiki/Template:PD-old-70' ), + new Licence( 'PD-old-70-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-70-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-70-1923' ), + new Licence( 'PD-old-70-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-70-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-70-1996' ), + new Licence( 'PD-old-75', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-75/, 'https://commons.wikimedia.org/wiki/Template:PD-old-75' ), + new Licence( 'PD-old-75-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-75-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-75-1923' ), + new Licence( 'PD-old-75-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-75-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-75-1996' ), + new Licence( 'PD-old-80', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-80/, 'https://commons.wikimedia.org/wiki/Template:PD-old-80' ), + new Licence( 'PD-old-80-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-80-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-80-1923' ), + new Licence( 'PD-old-80-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-80-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-80-1996' ), + new Licence( 'PD-old-90', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-90/, 'https://commons.wikimedia.org/wiki/Template:PD-old-90' ), + new Licence( 'PD-old-90-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-90-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-90-1923' ), + new Licence( 'PD-old-90-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-90-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-90-1996' ), + new Licence( 'PD-old-auto-1923', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-auto-1923/, 'https://commons.wikimedia.org/wiki/Template:PD-old-auto-1923' ), + new Licence( 'PD-old-auto-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-auto-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-old-auto-1996' ), + new Licence( 'PD-old-auto-unpublished', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-auto-unpublished/, 'https://commons.wikimedia.org/wiki/Template:PD-old-auto-unpublished' ), + new Licence( 'PD-old-Edition', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-old-Edition/, 'https://commons.wikimedia.org/wiki/Template:PD-old-Edition' ), + new Licence( 'PD-Ottoman Empire', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Ottoman Empire/, 'https://commons.wikimedia.org/wiki/Template:PD-Ottoman Empire' ), + new Licence( 'PD-Pakistan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Pakistan/, 'https://commons.wikimedia.org/wiki/Template:PD-Pakistan' ), + new Licence( 'PD-Palau', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Palau/, 'https://commons.wikimedia.org/wiki/Template:PD-Palau' ), + new Licence( 'PD-Panama', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Panama/, 'https://commons.wikimedia.org/wiki/Template:PD-Panama' ), + new Licence( 'PD-Papua New Guinea', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Papua New Guinea/, 'https://commons.wikimedia.org/wiki/Template:PD-Papua New Guinea' ), + new Licence( 'PD-Paraguay', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Paraguay/, 'https://commons.wikimedia.org/wiki/Template:PD-Paraguay' ), + new Licence( 'PD-PCL-portraits', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PCL-portraits/, 'https://commons.wikimedia.org/wiki/Template:PD-PCL-portraits' ), + new Licence( 'PD-PDFnet', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PDFnet/, 'https://commons.wikimedia.org/wiki/Template:PD-PDFnet' ), + new Licence( 'PD-Philippines', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Philippines/, 'https://commons.wikimedia.org/wiki/Template:PD-Philippines' ), + new Licence( 'PD-PhilippinesGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PhilippinesGov/, 'https://commons.wikimedia.org/wiki/Template:PD-PhilippinesGov' ), + new Licence( 'PD-PhilippinesPubDoc', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PhilippinesPubDoc/, 'https://commons.wikimedia.org/wiki/Template:PD-PhilippinesPubDoc' ), + new Licence( 'PD-PMR-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PMR-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-PMR-exempt' ), + new Licence( 'PD-Polish', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Polish/, 'https://commons.wikimedia.org/wiki/Template:PD-Polish' ), + new Licence( 'PD-Polishsymbol', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Polishsymbol/, 'https://commons.wikimedia.org/wiki/Template:PD-Polishsymbol' ), + new Licence( 'PD-Portugal-URAA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Portugal-URAA/, 'https://commons.wikimedia.org/wiki/Template:PD-Portugal-URAA' ), + new Licence( 'PD-PRC-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRC-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-PRC-exempt' ), + new Licence( 'PD-PRC-GB mandatory standard', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRC-GB mandatory standard/, 'https://commons.wikimedia.org/wiki/Template:PD-PRC-GB mandatory standard' ), + new Licence( 'PD-PRC-Road Traffic Markings', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRC-Road Traffic Markings/, 'https://commons.wikimedia.org/wiki/Template:PD-PRC-Road Traffic Markings' ), + new Licence( 'PD-PRC-Road Traffic Signs', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRC-Road Traffic Signs/, 'https://commons.wikimedia.org/wiki/Template:PD-PRC-Road Traffic Signs' ), + new Licence( 'PD-PRGov-OfficialPortraits', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRGov-OfficialPortraits/, 'https://commons.wikimedia.org/wiki/Template:PD-PRGov-OfficialPortraits' ), + new Licence( 'PD-PRGov-PRSHP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-PRGov-PRSHP/, 'https://commons.wikimedia.org/wiki/Template:PD-PRGov-PRSHP' ), + new Licence( 'PD-Raita', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Raita/, 'https://commons.wikimedia.org/wiki/Template:PD-Raita' ), + new Licence( 'PD-Republic of the Congo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Republic of the Congo/, 'https://commons.wikimedia.org/wiki/Template:PD-Republic of the Congo' ), + new Licence( 'PD-retouched-user', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-retouched-user/, 'https://commons.wikimedia.org/wiki/Template:PD-retouched-user' ), + new Licence( 'PD-retouched-user-w', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-retouched-user-w/, 'https://commons.wikimedia.org/wiki/Template:PD-retouched-user-w' ), + new Licence( 'PD-RO-1956', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RO-1956/, 'https://commons.wikimedia.org/wiki/Template:PD-RO-1956' ), + new Licence( 'PD-RO-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RO-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-RO-exempt' ), + new Licence( 'PD-RO-photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RO-photo/, 'https://commons.wikimedia.org/wiki/Template:PD-RO-photo' ), + new Licence( 'PD-ROC-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-exempt' ), + new Licence( 'PD-ROC-Generalissimo Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Generalissimo Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Generalissimo Government Gazette' ), + new Licence( 'PD-ROC-Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Government Gazette' ), + new Licence( 'PD-ROC-Military Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Military Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Military Government Gazette' ), + new Licence( 'PD-ROC-National Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-National Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-National Government Gazette' ), + new Licence( 'PD-ROC-official', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-official/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-official' ), + new Licence( 'PD-ROC-oldphoto', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-oldphoto/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-oldphoto' ), + new Licence( 'PD-ROC-Presidential Office Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Presidential Office Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Presidential Office Gazette' ), + new Licence( 'PD-ROC-Provisional Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Provisional Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Provisional Gazette' ), + new Licence( 'PD-ROC-Provisional Government Gazette', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Provisional Government Gazette/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Provisional Government Gazette' ), + new Licence( 'PD-ROC-Traffic Markings', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Traffic Markings/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Traffic Markings' ), + new Licence( 'PD-ROC-Traffic Signs', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ROC-Traffic Signs/, 'https://commons.wikimedia.org/wiki/Template:PD-ROC-Traffic Signs' ), + new Licence( 'PD-Romania', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Romania/, 'https://commons.wikimedia.org/wiki/Template:PD-Romania' ), + new Licence( 'PD-RU-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RU-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-RU-exempt' ), + new Licence( 'PD-RU-trivial-securitycam', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RU-trivial-securitycam/, 'https://commons.wikimedia.org/wiki/Template:PD-RU-trivial-securitycam' ), + new Licence( 'PD-RusEmpire', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-RusEmpire/, 'https://commons.wikimedia.org/wiki/Template:PD-RusEmpire' ), + new Licence( 'PD-Russia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Russia/, 'https://commons.wikimedia.org/wiki/Template:PD-Russia' ), + new Licence( 'PD-Rwanda', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Rwanda/, 'https://commons.wikimedia.org/wiki/Template:PD-Rwanda' ), + new Licence( 'PD-SabuCat', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SabuCat/, 'https://commons.wikimedia.org/wiki/Template:PD-SabuCat' ), + new Licence( 'PD-SAGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SAGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SAGov' ), + new Licence( 'PD-Saint Kitts and Nevis', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Saint Kitts and Nevis/, 'https://commons.wikimedia.org/wiki/Template:PD-Saint Kitts and Nevis' ), + new Licence( 'PD-Saint Lucia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Saint Lucia/, 'https://commons.wikimedia.org/wiki/Template:PD-Saint Lucia' ), + new Licence( 'PD-Samoa', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Samoa/, 'https://commons.wikimedia.org/wiki/Template:PD-Samoa' ), + new Licence( 'PD-San Marino', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-San Marino/, 'https://commons.wikimedia.org/wiki/Template:PD-San Marino' ), + new Licence( 'PD-SanMarino', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SanMarino/, 'https://commons.wikimedia.org/wiki/Template:PD-SanMarino' ), + new Licence( 'PD-SanMarino\/en', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SanMarino\/en/, 'https://commons.wikimedia.org/wiki/Template:PD-SanMarino\/en' ), + new Licence( 'PD-Sao Tome and Principe', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sao Tome and Principe/, 'https://commons.wikimedia.org/wiki/Template:PD-Sao Tome and Principe' ), + new Licence( 'PD-Saudi Arabia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Saudi Arabia/, 'https://commons.wikimedia.org/wiki/Template:PD-Saudi Arabia' ), + new Licence( 'PD-SCGGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SCGGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SCGGov' ), + new Licence( 'PD-script', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-script/, 'https://commons.wikimedia.org/wiki/Template:PD-script' ), + new Licence( 'PD-SDASM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SDASM/, 'https://commons.wikimedia.org/wiki/Template:PD-SDASM' ), + new Licence( 'PD-Seal-Germany', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Seal-Germany/, 'https://commons.wikimedia.org/wiki/Template:PD-Seal-Germany' ), + new Licence( 'PD-self', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-self/, 'https://commons.wikimedia.org/wiki/Template:PD-self' ), + new Licence( 'PD-Senegal', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Senegal/, 'https://commons.wikimedia.org/wiki/Template:PD-Senegal' ), + new Licence( 'PD-Serbia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Serbia/, 'https://commons.wikimedia.org/wiki/Template:PD-Serbia' ), + new Licence( 'PD-SerbiaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SerbiaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SerbiaGov' ), + new Licence( 'PD-Seychelles', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Seychelles/, 'https://commons.wikimedia.org/wiki/Template:PD-Seychelles' ), + new Licence( 'PD-SFJ', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SFJ/, 'https://commons.wikimedia.org/wiki/Template:PD-SFJ' ), + new Licence( 'PD-SG-artisticwork', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-artisticwork/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-artisticwork' ), + new Licence( 'PD-SG-broadcast', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-broadcast/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-broadcast' ), + new Licence( 'PD-SG-edition', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-edition/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-edition' ), + new Licence( 'PD-SG-film', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-film/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-film' ), + new Licence( 'PD-SG-lifetimepub', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-lifetimepub/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-lifetimepub' ), + new Licence( 'PD-SG-photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-photo/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-photo' ), + new Licence( 'PD-SG-posthumouspub', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-posthumouspub/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-posthumouspub' ), + new Licence( 'PD-SG-soundrec', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-soundrec/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-soundrec' ), + new Licence( 'PD-SG-unknownauthor', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SG-unknownauthor/, 'https://commons.wikimedia.org/wiki/Template:PD-SG-unknownauthor' ), + new Licence( 'PD-shape', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-shape/, 'https://commons.wikimedia.org/wiki/Template:PD-shape' ), + new Licence( 'PD-signature', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-signature/, 'https://commons.wikimedia.org/wiki/Template:PD-signature' ), + new Licence( 'PD-Sjöfartsverket', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sjöfartsverket/, 'https://commons.wikimedia.org/wiki/Template:PD-Sjöfartsverket' ), + new Licence( 'PD-SLNC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SLNC/, 'https://commons.wikimedia.org/wiki/Template:PD-SLNC' ), + new Licence( 'PD-SlovakGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SlovakGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SlovakGov' ), + new Licence( 'PD-SloveneGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SloveneGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SloveneGov' ), + new Licence( 'PD-Slovenia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Slovenia/, 'https://commons.wikimedia.org/wiki/Template:PD-Slovenia' ), + new Licence( 'PD-Slovenia-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Slovenia-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Slovenia-exempt' ), + new Licence( 'PD-Slovenia-exempt\/en', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Slovenia-exempt\/en/, 'https://commons.wikimedia.org/wiki/Template:PD-Slovenia-exempt\/en' ), + new Licence( 'PD-Somalia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Somalia/, 'https://commons.wikimedia.org/wiki/Template:PD-Somalia' ), + new Licence( 'PD-South Korea', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-South Korea/, 'https://commons.wikimedia.org/wiki/Template:PD-South Korea' ), + new Licence( 'PD-South-Africa', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-South-Africa/, 'https://commons.wikimedia.org/wiki/Template:PD-South-Africa' ), + new Licence( 'PD-South-Africa-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-South-Africa-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-South-Africa-exempt' ), + new Licence( 'PD-SpanishGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-SpanishGov/, 'https://commons.wikimedia.org/wiki/Template:PD-SpanishGov' ), + new Licence( 'PD-Sri Lanka', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sri Lanka/, 'https://commons.wikimedia.org/wiki/Template:PD-Sri Lanka' ), + new Licence( 'PD-Statens vegvesen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Statens vegvesen/, 'https://commons.wikimedia.org/wiki/Template:PD-Statens vegvesen' ), + new Licence( 'PD-STFP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-STFP/, 'https://commons.wikimedia.org/wiki/Template:PD-STFP' ), + new Licence( 'PD-StVZVO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-StVZVO/, 'https://commons.wikimedia.org/wiki/Template:PD-StVZVO' ), + new Licence( 'PD-Sudan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sudan/, 'https://commons.wikimedia.org/wiki/Template:PD-Sudan' ), + new Licence( 'PD-Sudan-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sudan-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Sudan-exempt' ), + new Licence( 'PD-Sudan-Photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sudan-Photo/, 'https://commons.wikimedia.org/wiki/Template:PD-Sudan-Photo' ), + new Licence( 'PD-Suomen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Suomen/, 'https://commons.wikimedia.org/wiki/Template:PD-Suomen' ), + new Licence( 'PD-Sweden-photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sweden-photo/, 'https://commons.wikimedia.org/wiki/Template:PD-Sweden-photo' ), + new Licence( 'PD-Sweden-URL9', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Sweden-URL9/, 'https://commons.wikimedia.org/wiki/Template:PD-Sweden-URL9' ), + new Licence( 'PD-Swiss National Bank', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Swiss National Bank/, 'https://commons.wikimedia.org/wiki/Template:PD-Swiss National Bank' ), + new Licence( 'PD-Switzerland-mapdata', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Switzerland-mapdata/, 'https://commons.wikimedia.org/wiki/Template:PD-Switzerland-mapdata' ), + new Licence( 'PD-Switzerland-official', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Switzerland-official/, 'https://commons.wikimedia.org/wiki/Template:PD-Switzerland-official' ), + new Licence( 'PD-Switzerland-old-unknown', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Switzerland-old-unknown/, 'https://commons.wikimedia.org/wiki/Template:PD-Switzerland-old-unknown' ), + new Licence( 'PD-Switzerland-photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Switzerland-photo/, 'https://commons.wikimedia.org/wiki/Template:PD-Switzerland-photo' ), + new Licence( 'PD-Syria', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Syria/, 'https://commons.wikimedia.org/wiki/Template:PD-Syria' ), + new Licence( 'PD-Taiwan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Taiwan/, 'https://commons.wikimedia.org/wiki/Template:PD-Taiwan' ), + new Licence( 'PD-Tanzania', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Tanzania/, 'https://commons.wikimedia.org/wiki/Template:PD-Tanzania' ), + new Licence( 'PD-text', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-text/, 'https://commons.wikimedia.org/wiki/Template:PD-text' ), + new Licence( 'PD-textlogo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-textlogo/, 'https://commons.wikimedia.org/wiki/Template:PD-textlogo' ), + new Licence( 'PD-TH-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-TH-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-TH-exempt' ), + new Licence( 'PD-Thailand', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Thailand/, 'https://commons.wikimedia.org/wiki/Template:PD-Thailand' ), + new Licence( 'PD-THW', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-THW/, 'https://commons.wikimedia.org/wiki/Template:PD-THW' ), + new Licence( 'PD-TJ-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-TJ-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-TJ-exempt' ), + new Licence( 'PD-TK-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-TK-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-TK-exempt' ), + new Licence( 'PD-Togo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Togo/, 'https://commons.wikimedia.org/wiki/Template:PD-Togo' ), + new Licence( 'PD-Tonga', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Tonga/, 'https://commons.wikimedia.org/wiki/Template:PD-Tonga' ), + new Licence( 'PD-TR-currency', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-TR-currency/, 'https://commons.wikimedia.org/wiki/Template:PD-TR-currency' ), + new Licence( 'PD-traditional', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-traditional/, 'https://commons.wikimedia.org/wiki/Template:PD-traditional' ), + new Licence( 'PD-Transportstyrelsen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Transportstyrelsen/, 'https://commons.wikimedia.org/wiki/Template:PD-Transportstyrelsen' ), + new Licence( 'PD-Trinidad and Tobago', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Trinidad and Tobago/, 'https://commons.wikimedia.org/wiki/Template:PD-Trinidad and Tobago' ), + new Licence( 'PD-Tunisia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Tunisia/, 'https://commons.wikimedia.org/wiki/Template:PD-Tunisia' ), + new Licence( 'PD-Turkey', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Turkey/, 'https://commons.wikimedia.org/wiki/Template:PD-Turkey' ), + new Licence( 'PD-Tuvalu', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Tuvalu/, 'https://commons.wikimedia.org/wiki/Template:PD-Tuvalu' ), + new Licence( 'PD-UA-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UA-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-UA-exempt' ), + new Licence( 'PD-UAexMilitary', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UAexMilitary/, 'https://commons.wikimedia.org/wiki/Template:PD-UAexMilitary' ), + new Licence( 'PD-UAGov-Award', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UAGov-Award/, 'https://commons.wikimedia.org/wiki/Template:PD-UAGov-Award' ), + new Licence( 'PD-UAGov-Money', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UAGov-Money/, 'https://commons.wikimedia.org/wiki/Template:PD-UAGov-Money' ), + new Licence( 'PD-UAGovDoc', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UAGovDoc/, 'https://commons.wikimedia.org/wiki/Template:PD-UAGovDoc' ), + new Licence( 'PD-Uganda', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Uganda/, 'https://commons.wikimedia.org/wiki/Template:PD-Uganda' ), + new Licence( 'PD-UK-posthumous-non-photo-1996', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UK-posthumous-non-photo-1996/, 'https://commons.wikimedia.org/wiki/Template:PD-UK-posthumous-non-photo-1996' ), + new Licence( 'PD-UK-unknown', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UK-unknown/, 'https://commons.wikimedia.org/wiki/Template:PD-UK-unknown' ), + new Licence( 'PD-UKGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UKGov/, 'https://commons.wikimedia.org/wiki/Template:PD-UKGov' ), + new Licence( 'PD-Ukraine', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Ukraine/, 'https://commons.wikimedia.org/wiki/Template:PD-Ukraine' ), + new Licence( 'PD-Ukraine-pre2001', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Ukraine-pre2001/, 'https://commons.wikimedia.org/wiki/Template:PD-Ukraine-pre2001' ), + new Licence( 'PD-UN-doc', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UN-doc/, 'https://commons.wikimedia.org/wiki/Template:PD-UN-doc' ), + new Licence( 'PD-UN-map', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UN-map/, 'https://commons.wikimedia.org/wiki/Template:PD-UN-map' ), + new Licence( 'PD-Unicode', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Unicode/, 'https://commons.wikimedia.org/wiki/Template:PD-Unicode' ), + new Licence( 'PD-United Arab Emirates', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-United Arab Emirates/, 'https://commons.wikimedia.org/wiki/Template:PD-United Arab Emirates' ), + new Licence( 'PD-United Arab Emirates photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-United Arab Emirates photo/, 'https://commons.wikimedia.org/wiki/Template:PD-United Arab Emirates photo' ), + new Licence( 'PD-United Arab Emirates stamp', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-United Arab Emirates stamp/, 'https://commons.wikimedia.org/wiki/Template:PD-United Arab Emirates stamp' ), + new Licence( 'PD-University-of-Wisconsin-Archives', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-University-of-Wisconsin-Archives/, 'https://commons.wikimedia.org/wiki/Template:PD-University-of-Wisconsin-Archives' ), + new Licence( 'PD-URAA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-URAA/, 'https://commons.wikimedia.org/wiki/Template:PD-URAA' ), + new Licence( 'PD-URAA-noformalities-unrestored', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-URAA-noformalities-unrestored/, 'https://commons.wikimedia.org/wiki/Template:PD-URAA-noformalities-unrestored' ), + new Licence( 'PD-URAA-Simul', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-URAA-Simul/, 'https://commons.wikimedia.org/wiki/Template:PD-URAA-Simul' ), + new Licence( 'PD-URB-RM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-URB-RM/, 'https://commons.wikimedia.org/wiki/Template:PD-URB-RM' ), + new Licence( 'PD-Uruguay', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Uruguay/, 'https://commons.wikimedia.org/wiki/Template:PD-Uruguay' ), + new Licence( 'PD-Uruguay-anon', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Uruguay-anon/, 'https://commons.wikimedia.org/wiki/Template:PD-Uruguay-anon' ), + new Licence( 'PD-US', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US/, 'https://commons.wikimedia.org/wiki/Template:PD-US' ), + new Licence( 'PD-US-1978-89', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-1978-89/, 'https://commons.wikimedia.org/wiki/Template:PD-US-1978-89' ), + new Licence( 'PD-US-architecture', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-architecture/, 'https://commons.wikimedia.org/wiki/Template:PD-US-architecture' ), + new Licence( 'PD-US-Codes-and-Standards-as-Statutory-Law', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-Codes-and-Standards-as-Statutory-Law/, 'https://commons.wikimedia.org/wiki/Template:PD-US-Codes-and-Standards-as-Statutory-Law' ), + new Licence( 'PD-US-defective notice', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-defective notice/, 'https://commons.wikimedia.org/wiki/Template:PD-US-defective notice' ), + new Licence( 'PD-US-GovEdict', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-GovEdict/, 'https://commons.wikimedia.org/wiki/Template:PD-US-GovEdict' ), + new Licence( 'PD-US-Longines', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-Longines/, 'https://commons.wikimedia.org/wiki/Template:PD-US-Longines' ), + new Licence( 'PD-US-no notice', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-no notice/, 'https://commons.wikimedia.org/wiki/Template:PD-US-no notice' ), + new Licence( 'PD-US-no notice-UN', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-no notice-UN/, 'https://commons.wikimedia.org/wiki/Template:PD-US-no notice-UN' ), + new Licence( 'PD-US-not renewed', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-not renewed/, 'https://commons.wikimedia.org/wiki/Template:PD-US-not renewed' ), + new Licence( 'PD-US-patent', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-patent/, 'https://commons.wikimedia.org/wiki/Template:PD-US-patent' ), + new Licence( 'PD-US-patent-no notice', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-patent-no notice/, 'https://commons.wikimedia.org/wiki/Template:PD-US-patent-no notice' ), + new Licence( 'PD-US-record', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-record/, 'https://commons.wikimedia.org/wiki/Template:PD-US-record' ), + new Licence( 'PD-US-unpublished', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-US-unpublished/, 'https://commons.wikimedia.org/wiki/Template:PD-US-unpublished' ), + new Licence( 'PD-USCG', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USCG/, 'https://commons.wikimedia.org/wiki/Template:PD-USCG' ), + new Licence( 'PD-user', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-user/, 'https://commons.wikimedia.org/wiki/Template:PD-user' ), + new Licence( 'PD-user-at-project', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-user-at-project/, 'https://commons.wikimedia.org/wiki/Template:PD-user-at-project' ), + new Licence( 'PD-user-w', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-user-w/, 'https://commons.wikimedia.org/wiki/Template:PD-user-w' ), + new Licence( 'PD-USGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov' ), + new Licence( 'PD-USGov-ARM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-ARM/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-ARM' ), + new Licence( 'PD-USGov-Atlas', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Atlas/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Atlas' ), + new Licence( 'PD-USGov-AVO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-AVO/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-AVO' ), + new Licence( 'PD-USGov-Award', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Award/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Award' ), + new Licence( 'PD-USGov-BBG', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-BBG/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-BBG' ), + new Licence( 'PD-USGov-BLM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-BLM/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-BLM' ), + new Licence( 'PD-USGov-CIA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-CIA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-CIA' ), + new Licence( 'PD-USGov-CIA-WF', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-CIA-WF/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-CIA-WF' ), + new Licence( 'PD-USGov-Congress', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Congress/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Congress' ), + new Licence( 'PD-USGov-Congress-AOC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Congress-AOC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Congress-AOC' ), + new Licence( 'PD-USGov-DEA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DEA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DEA' ), + new Licence( 'PD-USGov-DHS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DHS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DHS' ), + new Licence( 'PD-USGov-DHS-TSA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DHS-TSA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DHS-TSA' ), + new Licence( 'PD-USGov-DIA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DIA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DIA' ), + new Licence( 'PD-USGov-DOC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOC' ), + new Licence( 'PD-USGov-DOC-Census', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOC-Census/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOC-Census' ), + new Licence( 'PD-USGov-DOE', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOE/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOE' ), + new Licence( 'PD-USGov-DOJ', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOJ/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOJ' ), + new Licence( 'PD-USGov-DOL', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOL/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOL' ), + new Licence( 'PD-USGov-DOS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOS' ), + new Licence( 'PD-USGov-DOT', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DOT/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DOT' ), + new Licence( 'PD-USGov-DVA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-DVA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-DVA' ), + new Licence( 'PD-USGov-ED', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-ED/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-ED' ), + new Licence( 'PD-USGov-EEOC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-EEOC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-EEOC' ), + new Licence( 'PD-USGov-EPA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-EPA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-EPA' ), + new Licence( 'PD-USGov-FAA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FAA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FAA' ), + new Licence( 'PD-USGov-FBI', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FBI/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FBI' ), + new Licence( 'PD-USGov-FCC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FCC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FCC' ), + new Licence( 'PD-USGov-FDA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FDA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FDA' ), + new Licence( 'PD-USGov-Federal Reserve', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Federal Reserve/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Federal Reserve' ), + new Licence( 'PD-USGov-FEMA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FEMA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FEMA' ), + new Licence( 'PD-USGov-FSA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FSA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FSA' ), + new Licence( 'PD-USGov-FTC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FTC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FTC' ), + new Licence( 'PD-USGov-FWS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-FWS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-FWS' ), + new Licence( 'PD-USGov-GAO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-GAO/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-GAO' ), + new Licence( 'PD-USGov-GSA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-GSA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-GSA' ), + new Licence( 'PD-USGov-HHS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS' ), + new Licence( 'PD-USGov-HHS-CDC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS-CDC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS-CDC' ), + new Licence( 'PD-USGov-HHS-IHS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS-IHS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS-IHS' ), + new Licence( 'PD-USGov-HHS-NHLBI', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS-NHLBI/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS-NHLBI' ), + new Licence( 'PD-USGov-HHS-NIH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS-NIH/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS-NIH' ), + new Licence( 'PD-USGov-HHS-NTP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HHS-NTP/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HHS-NTP' ), + new Licence( 'PD-USGov-HUD', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-HUD/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-HUD' ), + new Licence( 'PD-USGov-Interior', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior' ), + new Licence( 'PD-USGov-Interior-BOEMRE', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior-BOEMRE/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior-BOEMRE' ), + new Licence( 'PD-USGov-Interior-MMS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior-MMS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior-MMS' ), + new Licence( 'PD-USGov-Interior-USBR', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior-USBR/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior-USBR' ), + new Licence( 'PD-USGov-Interior-USGS-Minerals', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior-USGS-Minerals/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior-USGS-Minerals' ), + new Licence( 'PD-USGov-Interior-USGS-NBII', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Interior-USGS-NBII/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Interior-USGS-NBII' ), + new Licence( 'PD-USGov-Judiciary', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Judiciary/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Judiciary' ), + new Licence( 'PD-USGov-Military', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military' ), + new Licence( 'PD-USGov-Military award', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military award/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military award' ), + new Licence( 'PD-USGov-Military-Air Force', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Air Force/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Air Force' ), + new Licence( 'PD-USGov-Military-Air National Guard', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Air National Guard/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Air National Guard' ), + new Licence( 'PD-USGov-Military-Army', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Army/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Army' ), + new Licence( 'PD-USGov-Military-Army-USACE', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Army-USACE/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Army-USACE' ), + new Licence( 'PD-USGov-Military-Army-USACMH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Army-USACMH/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Army-USACMH' ), + new Licence( 'PD-USGov-Military-Army-USAIOH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Army-USAIOH/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Army-USAIOH' ), + new Licence( 'PD-USGov-Military-Badge', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Badge/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Badge' ), + new Licence( 'PD-USGov-Military-DARPA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-DARPA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-DARPA' ), + new Licence( 'PD-USGov-Military-DIA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-DIA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-DIA' ), + new Licence( 'PD-USGov-Military-DVIC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-DVIC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-DVIC' ), + new Licence( 'PD-USGov-Military-Marines', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Marines/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Marines' ), + new Licence( 'PD-USGov-Military-MDA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-MDA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-MDA' ), + new Licence( 'PD-USGov-Military-National Guard', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-National Guard/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-National Guard' ), + new Licence( 'PD-USGov-Military-Navy', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-Navy/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-Navy' ), + new Licence( 'PD-USGov-Military-NGA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Military-NGA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Military-NGA' ), + new Licence( 'PD-USGov-money', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-money/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-money' ), + new Licence( 'PD-USGov-MUTCD', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-MUTCD/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-MUTCD' ), + new Licence( 'PD-USGov-NASA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NASA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NASA' ), + new Licence( 'PD-USGov-NASA-AP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NASA-AP/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NASA-AP' ), + new Licence( 'PD-USGov-NASA-SRTM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NASA-SRTM/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NASA-SRTM' ), + new Licence( 'PD-USGov-NCBI-scienceprimer', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NCBI-scienceprimer/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NCBI-scienceprimer' ), + new Licence( 'PD-USGov-NEH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NEH/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NEH' ), + new Licence( 'PD-USGov-NIH', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NIH/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NIH' ), + new Licence( 'PD-USGov-NIH-NIAID', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NIH-NIAID/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NIH-NIAID' ), + new Licence( 'PD-USGov-NIST', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NIST/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NIST' ), + new Licence( 'PD-USGov-NOAA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NOAA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NOAA' ), + new Licence( 'PD-USGov-NOAA-GLERL', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NOAA-GLERL/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NOAA-GLERL' ), + new Licence( 'PD-USGov-NPS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NPS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NPS' ), + new Licence( 'PD-USGov-NRC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NRC/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NRC' ), + new Licence( 'PD-USGov-NRO', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NRO/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NRO' ), + new Licence( 'PD-USGov-NSA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NSA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NSA' ), + new Licence( 'PD-USGov-NSF', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NSF/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NSF' ), + new Licence( 'PD-USGov-NTSB', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-NTSB/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-NTSB' ), + new Licence( 'PD-USGov-OSS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-OSS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-OSS' ), + new Licence( 'PD-USGov-OSTP', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-OSTP/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-OSTP' ), + new Licence( 'PD-USGov-PHS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-PHS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-PHS' ), + new Licence( 'PD-USGov-POTUS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-POTUS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-POTUS' ), + new Licence( 'PD-USGov-SI', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-SI/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-SI' ), + new Licence( 'PD-USGov-SSA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-SSA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-SSA' ), + new Licence( 'PD-USGov-Treasury', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-Treasury/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-Treasury' ), + new Licence( 'PD-USGov-TVA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-TVA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-TVA' ), + new Licence( 'PD-USGov-USAID', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USAID/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USAID' ), + new Licence( 'PD-USGov-USDA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA' ), + new Licence( 'PD-USGov-USDA-ARS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-ARS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-ARS' ), + new Licence( 'PD-USGov-USDA-FS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-FS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-FS' ), + new Licence( 'PD-USGov-USDA-NAL', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-NAL/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-NAL' ), + new Licence( 'PD-USGov-USDA-NAL-Pomological-Watercolors', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-NAL-Pomological-Watercolors/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-NAL-Pomological-Watercolors' ), + new Licence( 'PD-USGov-USDA-NRCS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-NRCS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-NRCS' ), + new Licence( 'PD-USGov-USDA-NRCS-Gallery', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USDA-NRCS-Gallery/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USDA-NRCS-Gallery' ), + new Licence( 'PD-USGov-USGS', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USGS/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USGS' ), + new Licence( 'PD-USGov-USIA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USIA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USIA' ), + new Licence( 'PD-USGov-USTR', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-USTR/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-USTR' ), + new Licence( 'PD-USGov-VOA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-VOA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-VOA' ), + new Licence( 'PD-USGov-WPA', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-USGov-WPA/, 'https://commons.wikimedia.org/wiki/Template:PD-USGov-WPA' ), + new Licence( 'PD-UWASH-FMIB', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UWASH-FMIB/, 'https://commons.wikimedia.org/wiki/Template:PD-UWASH-FMIB' ), + new Licence( 'PD-UZ-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-UZ-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-UZ-exempt' ), + new Licence( 'PD-Uzbekistan', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Uzbekistan/, 'https://commons.wikimedia.org/wiki/Template:PD-Uzbekistan' ), + new Licence( 'PD-Vanuatu', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Vanuatu/, 'https://commons.wikimedia.org/wiki/Template:PD-Vanuatu' ), + new Licence( 'PD-VE-Photo', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-VE-Photo/, 'https://commons.wikimedia.org/wiki/Template:PD-VE-Photo' ), + new Licence( 'PD-VE-Pic', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-VE-Pic/, 'https://commons.wikimedia.org/wiki/Template:PD-VE-Pic' ), + new Licence( 'PD-Vegagerdin', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Vegagerdin/, 'https://commons.wikimedia.org/wiki/Template:PD-Vegagerdin' ), + new Licence( 'PD-Venezuela', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Venezuela/, 'https://commons.wikimedia.org/wiki/Template:PD-Venezuela' ), + new Licence( 'PD-VenezuelaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-VenezuelaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-VenezuelaGov' ), + new Licence( 'PD-Vietnam', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Vietnam/, 'https://commons.wikimedia.org/wiki/Template:PD-Vietnam' ), + new Licence( 'PD-VietnamGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-VietnamGov/, 'https://commons.wikimedia.org/wiki/Template:PD-VietnamGov' ), + new Licence( 'PD-Vlaams-gemeentewapen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Vlaams-gemeentewapen/, 'https://commons.wikimedia.org/wiki/Template:PD-Vlaams-gemeentewapen' ), + new Licence( 'PD-Vlaamse-gemeentevlag', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Vlaamse-gemeentevlag/, 'https://commons.wikimedia.org/wiki/Template:PD-Vlaamse-gemeentevlag' ), + new Licence( 'PD-VzKat', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-VzKat/, 'https://commons.wikimedia.org/wiki/Template:PD-VzKat' ), + new Licence( 'PD-Wikinews', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Wikinews/, 'https://commons.wikimedia.org/wiki/Template:PD-Wikinews' ), + new Licence( 'PD-WorldWind', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-WorldWind/, 'https://commons.wikimedia.org/wiki/Template:PD-WorldWind' ), + new Licence( 'PD-WSMRM', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-WSMRM/, 'https://commons.wikimedia.org/wiki/Template:PD-WSMRM' ), + new Licence( 'PD-WSRC', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-WSRC/, 'https://commons.wikimedia.org/wiki/Template:PD-WSRC' ), + new Licence( 'PD-Yemen', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Yemen/, 'https://commons.wikimedia.org/wiki/Template:PD-Yemen' ), + new Licence( 'PD-Yemen-exempt', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Yemen-exempt/, 'https://commons.wikimedia.org/wiki/Template:PD-Yemen-exempt' ), + new Licence( 'PD-Yugoslavia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Yugoslavia/, 'https://commons.wikimedia.org/wiki/Template:PD-Yugoslavia' ), + new Licence( 'PD-YugoslaviaGov', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-YugoslaviaGov/, 'https://commons.wikimedia.org/wiki/Template:PD-YugoslaviaGov' ), + new Licence( 'PD-Zambia', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Zambia/, 'https://commons.wikimedia.org/wiki/Template:PD-Zambia' ), + new Licence( 'PD-Zimbabwe', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-Zimbabwe/, 'https://commons.wikimedia.org/wiki/Template:PD-Zimbabwe' ), + new Licence( 'PD-ZW-currency', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /PD-ZW-currency/, 'https://commons.wikimedia.org/wiki/Template:PD-ZW-currency' ), + new Licence( 'SIA-no known copyright restrictions', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /SIA-no known copyright restrictions/, 'https://commons.wikimedia.org/wiki/Template:SIA-no known copyright restrictions' ), + new Licence( 'WSM no known restrictions', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /WSM no known restrictions/, 'https://commons.wikimedia.org/wiki/Template:WSM no known restrictions' ), + new Licence( 'Library of Congress-no known copyright restrictions', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /Library of Congress-no known copyright restrictions/, 'https://commons.wikimedia.org/wiki/Template:Library of Congress-no known copyright restrictions' ), + new Licence( 'Cc-pd', ['pd'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /Cc-pd/, 'https://commons.wikimedia.org/wiki/Template:Cc-pd' ), + new Licence( 'Cc-zero', ['pd', 'cc-zero'], ['cc-by-4.0', 'cc-by-sa-4.0'], 'CC-0', /Cc-zero/, 'https://creativecommons.org/publicdomain/zero/1.0' ), + new Licence( 'PD', [ 'pd' ], ['cc-by-4.0', 'cc-by-sa-4.0'], 'Public Domain', /^(Bild-)?(PD|Public domain|Copyrighted free use)\b/i ), + + new Licence( 'unknown', [ 'unknown' ], [], 'Unknown', '', '' ) +]; + +},{"./Licence":21}],21:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ +'use strict'; + +var $ = require( 'jquery' ); + +/** + * Represents a licence. + * @constructor + * + * @param {string} id + * A licence id to be used as internal identifier. For consistency, is should + * match the template name on Commons. In addition, the HTML file in the "licences" folder + * containing the licence's legal code should be named with the id. + * @param {string[]} groups + * Groups the licence belongs to. Groups are just plain string identifiers allowing to check + * whether a licence belongs to a certain group instead of having to loop through all the + * licences. + * @param {string|RegExp} name + * The licence name how it should be displayed. May be a regular + * expression to generate an "abstract" licence object that may itself be used to generate a + * proper licence using Licence.newFromAbstract(). + * @param {RegExp|string|Object} [regExp] + * Regular expression used for detecting the licence + * analyzing the asset's Commons categories. If omitted, the name will be used for exact + * matching. + * @param {string|Object} [url] + * The url to the licence. + * @param {Object} [options] + * Default options overwrites: + * - {string} outputTemplate: Text template specifying the actual text output of the licence + * information. {{name}} is replaced with the licence name + * + * @throws {Error} if no proper parameters are specified. + * @throws {Error} when trying to instantiate an "abstract" licence with an additional regExp. + */ +var Licence = function( id, groups, compatibleLicences, name, regExp, url, options ) { + if( !id || !groups || !name || typeof compatibleLicences !== 'object' ) { + throw new Error( 'Improper specification of required parameters' ); + } + + this._id = id; + this._groups = groups; + this._compatibleLicences = compatibleLicences; + + if( $.isPlainObject( regExp ) ) { + options = regExp; + url = options; + options = undefined; + } else if( $.isPlainObject( url ) ) { + options = url; + url = undefined; + } + + if( name instanceof RegExp && regExp instanceof RegExp ) { + throw new Error( 'Trying to instantiate an abstract licence with an exact matching' ); + } + + if( name instanceof RegExp ) { + this._regExp = name; + } else if( typeof name === 'string' ) { + this._name = name; + } else { + throw new Error( 'Name needs to be specified' ); + } + + if( regExp instanceof RegExp ) { + this._regExp = regExp; + } else { + this._regExp = new RegExp( '^' + id, 'i' ); + } + + this._url = url || null; + + $.extend( this._options, ( options || {} ) ); +}; + +$.extend( Licence.prototype, { + /** + * Identifier for internal use. + * @type {string} + */ + _id: null, + + /** + * Licence group identifiers. + * @type {string[]} + */ + _groups: null, + + /** + * Identifiers of compatible licences. + * @type {string[]} + */ + _compatibleLicences: null, + + /** + * @type {Object} + */ + _options: { + 'outputTemplate': 'released under {{name}}' + }, + + /** + * @type {string|null} + */ + _name: null, + + /** + * @type {RegExp} + */ + _regExp: null, + + /** + * @type {string|null} + */ + _url: null, + + /** + * @return {boolean} + */ + isAbstract: function() { + return !this._name; + }, + + /** + * Checks whether a string matches the licence definition. + * + * @param {string} string + * @return {boolean} + */ + match: function( string ) { + return this._regExp.test( string ); + }, + + /** + * @return {string} + */ + getId: function() { + return this._id; + }, + + /** + * Checks whether the licence belongs to a specific licence group. + * + * @param {string} groupId + * @return {boolean} + */ + isInGroup: function( groupId ) { + for( var i = 0; i < this._groups.length; i++ ) { + if( this._groups[ i ] === groupId ) { + return true; + } + } + return false; + }, + + getCompatibleLicenceIds: function() { + return this._compatibleLicences; + }, + + /** + * @return {string|null} + */ + getName: function() { + return this._name; + }, + + /** + * @return {RegExp} + */ + getRegExp: function() { + return this._regExp; + }, + + /** + * @return {string|null} + */ + getUrl: function() { + return this._url; + }, + + /** + * @return {Array} + */ + getGroups: function() { + return this._groups; + }, + + /** + * Returns the id of the licence's unported equivalent e.g. 'cc-by-3.0' for 'cc-by-3.0-ported' + * + * @returns {string} + */ + getUnportedVersionId: function() { + return this.getId().slice( 0, -7 ); + }, + + /** + * @return {boolean} + */ + isPublicDomain: function() { + return this._groups && typeof this._groups.includes !== 'undefined' && this._groups.includes( 'pd' ); + } + +} ); + +/** + * Instantiates a Licence object from an abstract Licence using a specified text string. + * + * @param {Licence} abstractLicence + * @param {string} rawText + * @return {Licence} + */ +Licence.newFromAbstract = function( abstractLicence, rawText ) { + var url = rawText.replace( abstractLicence.getRegExp(), abstractLicence.getUrl() ); + return new Licence( rawText, url ); +}; + +module.exports = Licence; + +},{"jquery":138}],22:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + DialogueStep = require( './DialogueStep' ), + LicenceStore = require( './LicenceStore' ), + config = require( '../config.json' ), + licences = new LicenceStore( require( './LICENCES' ), config.portedLicences ), + LicenceStepView = require( './views/LicenceStepView' ); + +var LicenceStep = function( licence ) { + this._name = 'licence'; + if( licence.isInGroup( 'ported' ) && !licence.isInGroup( 'knownPorted' ) ) { + licence = licences.getLicence( licence.getUnportedVersionId() ); + } + this._view = new LicenceStepView( licence, licences.findCompatibilities( licence.getId() ) ); +}; + +$.extend( LicenceStep.prototype, DialogueStep.prototype ); + +module.exports = LicenceStep; + +},{"../config.json":54,"./DialogueStep":17,"./LICENCES":20,"./LicenceStore":23,"./views/LicenceStepView":51,"jquery":138}],23:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var $ = require( 'jquery' ), + Licence = require( './Licence' ); + +/** + * Licence store storing a list of licences. + * @constructor + * + * @param {Licence[]} licences + * @param {Object} portedLicences - map of lowercase licence names to URLs + */ +var LicenceStore = function( licences, portedLicences ) { + this._licences = []; + this._portedLicences = portedLicences; + + licences = licences || []; + + for( var i = 0; i < licences.length; i++ ) { + this.appendLicence( licences[ i ] ); + } +}; + +$.extend( LicenceStore.prototype, { + /** + * @type {Licence[]} + */ + _licences: null, + + /** + * @type {Object} + */ + _portedLicences: null, + + /** + * Returns all stored licences. + * + * @return {Licence[]} + */ + getLicences: function() { + return this._licences; + }, + + /** + * Appends a licence to the store. + * + * @param {Licence} licence + * + * @throws {Error} if parameter is not a proper Licence object. + */ + appendLicence: function( licence ) { + if( !( licence instanceof Licence ) ) { + throw new Error( 'Licence is not a proper Licence object' ); + } + this._licences.push( licence ); + }, + + /** + * Returns a licence by id. + * + * @param {string} id + * @return {Licence|null} + */ + getLicence: function( id ) { + for( var i = 0; i < this._licences.length; i++ ) { + if( this._licences[ i ].getId() === id ) { + return this._licences[ i ]; + } + } + return null; + }, + + /** + * Returns a licence by trying to match on one string or on one string our of a list of strings. + * + * @param {string|string[]} strings + * @return {Licence|null} + */ + detectLicence: function( strings ) { + if( typeof strings === 'string' ) { + strings = [ strings ]; + } + + var detectedLicences = [], + i, + j; + + for( i = 0; i < strings.length; i++ ) { + var string = strings[ i ]; + + for( j = 0; j < this._licences.length; j++ ) { + var licence = this._licences[ j ]; + + if( licence.match( string ) ) { + if( licence.isAbstract() ) { + licence = Licence.newFromAbstract( licence, string ); + } else if( this._isKnownPortedLicence( licence, string ) ) { + licence = this._buildKnownPortedLicence( licence, string ); + } + detectedLicences.push( licence ); + } + } + } + + if( detectedLicences.length === 0 ) { + return null; + } else if( detectedLicences.length === 1 ) { + return detectedLicences[ 0 ]; + } + + // Return the first licence according to the order the licences are stored: + for( i = 0; i < this._licences.length; i++ ) { + for( j = 0; j < detectedLicences.length; j++ ) { + if( this._licences[ i ].getId() === detectedLicences[ j ].getId() ) { + return detectedLicences[ j ]; + } + } + } + + return null; + }, + + /** + * @param {Licence} licence + * @param {string} licenceString + */ + _isKnownPortedLicence: function( licence, licenceString ) { + return licence.isInGroup( 'ported' ) && this._getUrlFromPortedLicenceName( licenceString ); + }, + + /** + * @param {Licence} licence + * @param {string} licenceString + */ + _buildKnownPortedLicence: function( licence, licenceString ) { + var name = licenceString + .toUpperCase() + .split( '-' ) + .join( ' ' ) + .replace( 'BY SA', 'BY-SA' ); + + return new Licence( + licence.getId(), // keep the generic ID so that it is detected as a valid licence in LicenceStore + licence.getGroups().concat( [ 'knownPorted' ] ), + [], + name, + null, + this._getUrlFromPortedLicenceName( licenceString ) + ); + }, + + /** + * @param {string} licenceString + */ + _getUrlFromPortedLicenceName: function( licenceString ) { + return this._portedLicences[ licenceString.toLowerCase() ]; + }, + + /** + * Finds a list of compatible licences for a given licence ID + * @param licence + * @return {Licence[]} + */ + findCompatibilities: function( licence ) { + var self = this; + + return this.getLicence( licence ).getCompatibleLicenceIds().map( function( id ) { + return self.getLicence( id ); + } ); + } +} ); + +module.exports = LicenceStore; + +},{"./Licence":21,"jquery":138}],24:[function(require,module,exports){ +'use strict'; + +// Load all i18n.json files available +require('../../i18n/de/i18n.json');require('../../i18n/en/i18n.json');require('../../i18n/es/i18n.json');require('../../i18n/id/i18n.json');require('../../i18n/pl/i18n.json');require('../../i18n/pt/i18n.json');require('../../i18n/uk/i18n.json'); + +var Polyglot = require( 'node-polyglot' ), + i18n; + +var getParam = function getUrlParameter( sParam ) { + var sPageURL = decodeURIComponent( window.location.search.substring( 1 ) ), + sURLVariables = sPageURL.split( '&' ), + sParameterName, + i; + + for( i = 0; i < sURLVariables.length; i++ ) { + sParameterName = sURLVariables[i].split( '=' ); + + if( sParameterName[0] === sParam ) { + return sParameterName[1] === undefined ? true : sParameterName[1]; + } + } +}; + +var lang = getParam( 'lang' ); +if( lang === undefined ) { + lang = 'de'; +} + +try { + i18n = require( '../../i18n/' + lang + '/i18n.json' ); +} catch( e ) { + i18n = require( '../../i18n/de/i18n.json' ); +} + +module.exports = new Polyglot( { phrases: i18n } ); + +},{"../../i18n/de/i18n.json":1,"../../i18n/en/i18n.json":2,"../../i18n/es/i18n.json":3,"../../i18n/id/i18n.json":4,"../../i18n/pl/i18n.json":5,"../../i18n/pt/i18n.json":6,"../../i18n/uk/i18n.json":7,"node-polyglot":139}],25:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ +/* jshint strict: false */ + +var $ = require( 'jquery' ), + Asset = require( './Asset' ); + +/** + * Represents an asset. + * @constructor + * + * @param {string} url + * @param {string} mediaType + * @param {Licence|null} [licence] + * @param {string|null} [title] + * @param {Author[]|null} [authors] + * @param {string} [url] + * @param {jQuery|null} [$attribution] + * @param {Api|null} [api] + * @param {string} [wikiUrl] + * + * @throws {Error} if a required parameter is not defined. + */ +var WikiAsset = function( filename, + mediaType, + licence, + title, + authors, + url, + $attribution, + api, + wikiUrl ) { + Asset.call( this, filename, mediaType, licence, title, authors, url, $attribution, api ); + this._wikiUrl = wikiUrl || null; +}; + +$.extend( WikiAsset.prototype, Asset.prototype, { + + /** + * @type {string} + */ + _wikiUrl: null, + + /** + * @see Asset.getFilename + * + * @return {string} + */ + getFilename: function() { + return this._filename.replace( /^[^:]+:/, '' ); + }, + + /** + * @return {string} + */ + getWikiUrl: function() { + return this._wikiUrl; + }, + + /** + * @see Asset.getUrl + * + * @return {string} + */ + getUrl: function() { + var url = ( this._wikiUrl || this._api.getDefaultUrl() ) + 'wiki/' + this._filename; + return url.indexOf( 'http' ) === 0 ? url : 'https://' + url; + }, + + /** + * @see Asset.equals + * + * @param {Asset} asset + * @return {boolean} + */ + equals: function( asset ) { + return this.inherited( arguments ) && asset.getWikiUrl() === this.getWikiUrl(); + }, + + /** + * Clones the asset. + * + * @return {WikiAsset} + */ + clone: function() { + return new WikiAsset( + this._filename, + this._mediaType, + this._licence, + this._title, + this._authors, + this._url, + this._$attribution, + this._api, + this._wikiUrl + ); + } +} ); + +module.exports = WikiAsset; + +},{"./Asset":10,"jquery":138}],26:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author snater.com < wikimedia@snater.com > + */ + +'use strict'; + +var $ = require( 'jquery' ), + Author = require( './Author' ), + WikiAsset = require( './WikiAsset' ), + LicenceStore = require( './LicenceStore' ), + config = require( '../config.json' ), + licenceStore = new LicenceStore( require( './LICENCES' ), config.portedLicences ); + +/** + * Represents a Commons asset page. + * @constructor + * + * @param {string} prefixedFilename + * @param {string} mediaType + * @param {jQuery} $dom + * @param {string[]} templates + * @param {Api} api + * @param {string} [wikiUrl] + * + * @throws {Error} if a required parameter is not specified. + */ +var WikiAssetPage = function( prefixedFilename, + mediaType, + $dom, + templates, + api, + wikiUrl ) { + if( !prefixedFilename || !mediaType || !$dom || !templates || !api ) { + throw new Error( 'Unable to instantiate object' ); + } + this._prefixedFilename = prefixedFilename; + this._mediaType = mediaType; + this._$dom = $dom; + this._templates = templates; + this._api = api; + this._wikiUrl = wikiUrl || api.getDefaultUrl(); +}; + +$.extend( WikiAssetPage.prototype, { + /** + * The page's filename. + * @type {string} + */ + _prefixedFilename: null, + + /** + * The asset's media type. + * @type {string} + */ + _mediaType: null, + + /** + * @type {string} + */ + _wikiUrl: null, + + /** + * The page content DOM. + * @type {jQuery} + */ + _$dom: null, + + /** + * The page's templates. + * @type {string[]} + */ + _templates: null, + + /** + * @type {Api} + */ + _api: null, + + /** + * @type {WikiAsset} + */ + _asset: null, + + /** + * Returns the asset represented by the page. + * + * @return {WikiAsset} + */ + getAsset: function() { + if( !this._asset ) { + this._asset = new WikiAsset( + this._prefixedFilename, + this._mediaType, + this._detectLicence( this._templates ), + this._prefixedFilename + .replace( /^[^:]+:/, '' ) + .replace( /\.[^.]+$/, '' ) + .replace( /_/g, ' ' ), + this._scrapeAuthors(), + null, + this._scrapeAttribution(), + this._api, + this._wikiUrl + ); + } + return this._asset; + }, + + _detectLicence: function() { + return licenceStore.detectLicence( this._templates ); + }, + + /** + * Extracts contents of a summary field + * + * @param {jQuery} $node + * @return {jQuery} + */ + _scrapeSummaryField: function( $node ) { + var $field = this._sanitizeUrls( $node.contents() ); + + $field = this._flattenVcardDivs( $field ); + + // Remove useless wrapping nodes: + if( $field.length === 1 ) { + var nodeName = $field.get( 0 ).nodeName; + + if( nodeName !== 'A' && nodeName !== '#text' ) { + $field = $field.contents(); + } + } + + // Remove "talk" link: + $field.each( function( i ) { + var $node = $( this ); + if( this.nodeName === 'A' && $node.text() === 'talk' ) { + $field = $field + .not( $field.eq( i + 1 ) ) + .not( $node ) + .not( $field.eq( i - 1 ) ); + } + } ); + + $field = this._removeUnwantedHtmlTags( $field ); + $field = this._removeUnwantedWhiteSpace( $field ); + + return this._trimNodeList( $field ); + }, + + /** + * Extracts the author(s) from the DOM. + * + * @return {Author[]} + */ + _scrapeAuthors: function() { + var $td = this._$dom.find( '#fileinfotpl_aut' ).next(); + return $td.length === 0 ? [] : [ new Author( this._scrapeSummaryField( $td ) ) ]; + }, + + _flattenVcardDivs: function( $nodes ) { + var $container = $( '
' ).append( $nodes.clone() ); + $container.find( 'div.vcard' ).each( function() { + var $creator = $( this ).find( 'span#creator' ); + $( this ).html( $creator.html() ); + } ); + return $container.contents(); + }, + + _removeUnwantedHtmlTags: function( $nodes ) { + var $container = $( '
' ).append( $nodes.clone() ); + $container.find( '*:not(a)' ).contents().unwrap(); + return $container.contents(); + }, + + _removeUnwantedWhiteSpace: function( $nodes ) { + var $container = $( '
' ).append( $nodes.clone() ); + return $( '
' ).html( + $.trim( $container.html().replace( ' ', ' ' ).replace( /\s+/g, ' ' ) ) + ).contents(); + }, + + /** + * Sanitizes every link node with the specified jQuery wrapped nodes. + * + * @param {jQuery} $nodes + * @return {jQuery} + */ + _sanitizeUrls: function( $nodes ) { + var $clonedNodes = $nodes.clone(), + $container = $( '
' ).append( $clonedNodes ); + + $container.find( 'a' ).each( function() { + var $node = $( this ), + href = $node.attr( 'href' ), + attrsToRemove = []; + + if( href.indexOf( '/w/index.php?title=User:' ) === 0 ) { + href = href.replace( + /^\/w\/index\.php\?title\=([^&]+).*$/, + 'https://commons.wikimedia.org/wiki/$1' + ); + } else if( href.indexOf( '/wiki/User:' ) === 0 ) { + href = 'https://commons.wikimedia.org' + href; + } else if( href.indexOf( '//' ) === 0 ) { + href = 'https:' + href; + } + + $node.attr( 'href', href ); + $.each( $node.get( 0 ).attributes, function( i, attr ) { + if( attr.name === 'href' ) { + return; + } + attrsToRemove.push( attr.name ); + } ); + $.each( attrsToRemove, function( i, attr ) { + $node.removeAttr( attr ); + } ); + } ); + + return $container.contents(); + }, + + /** + * Removes edge nodes if they contain white space. + * + * @param {jQuery} $nodes + * @return {jQuery} + */ + _trimNodeList: function( $nodes ) { + if( $nodes.length === 0 ) { + return $nodes; + } + if( $.trim( $nodes.eq( 0 ).text() ) === '' ) { + $nodes = $nodes.not( $nodes.eq( 0 ) ); + } + + while( $.trim( $nodes.eq( $nodes.length - 1 ).text() ) === '' ) { + $nodes = $nodes.not( $nodes.eq( $nodes.length - 1 ) ); + } + + return $nodes; + }, + + /** + * Extracts the attribution notice from the licence template DOM. + * + * @return {jQuery|null} + */ + _scrapeAttributionFromLicenceTpl: function() { + var $attribution = this._$dom.find( '.licensetpl_attr' ).first(); + + if( $attribution.length === 0 ) { + return null; + } + + var $clonedAttribution = $attribution.contents().clone(); + + return this._trimNodeList( this._sanitizeUrls( $clonedAttribution ) ); + }, + + /** + * Scrapes the attribution from its summary table field. + * + * @returns {jQuery} + */ + _scrapeAttributionSummaryField: function() { + var $td = this._$dom.find( '.commons-file-information-table td:first-child:contains(Attribution)' ).next(); + return $td.length === 0 ? null : this._scrapeSummaryField( $td ); + }, + + _scrapeAttribution: function() { + return this._scrapeAttributionFromLicenceTpl() || this._scrapeAttributionSummaryField(); + } + +} ); + +module.exports = WikiAssetPage; + +},{"../config.json":54,"./Author":12,"./LICENCES":20,"./LicenceStore":23,"./WikiAsset":25,"jquery":138}],27:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data) { + return " \r\n \r\n \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n

" + + alias4(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":2,"column":5},"end":{"line":2,"column":14}}}) : helper))) + + "

\r\n
\r\n
\r\n " + + ((stack1 = ((helper = (helper = lookupProperty(helpers,"attribution") || (depth0 != null ? lookupProperty(depth0,"attribution") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"attribution","hash":{},"data":data,"loc":{"start":{"line":5,"column":3},"end":{"line":5,"column":20}}}) : helper))) != null ? stack1 : "") + + "\r\n
\r\n
\r\n " + + ((stack1 = ((helper = (helper = lookupProperty(helpers,"plainTextAttribution") || (depth0 != null ? lookupProperty(depth0,"plainTextAttribution") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"plainTextAttribution","hash":{},"data":data,"loc":{"start":{"line":8,"column":3},"end":{"line":8,"column":29}}}) : helper))) != null ? stack1 : "") + + "\r\n
\r\n
\r\n " + + alias4((lookupProperty(helpers,"removeTarget")||(depth0 && lookupProperty(depth0,"removeTarget"))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,"attribution") : depth0),{"name":"removeTarget","hash":{},"data":data,"loc":{"start":{"line":11,"column":3},"end":{"line":11,"column":31}}})) + + "\r\n
\r\n
\r\n
\r\n" + + ((stack1 = lookupProperty(helpers,"unless").call(alias1,(depth0 != null ? lookupProperty(depth0,"isPrint") : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":15,"column":2},"end":{"line":19,"column":13}}})) != null ? stack1 : "") + + "\r\n \r\n
\r\n
\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],28:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.author-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":43}}})) + + "\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"author-qm"},"data":data,"indent":"\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n\r\n
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.author-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":3},"end":{"line":9,"column":48}}})) + + "\r\n
\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n

" + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.author-label",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":15,"column":6},"end":{"line":15,"column":43}}})) + + "

\r\n\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":11,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":13,"column":1},"end":{"line":28,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],29:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n " + + alias3(((helper = (helper = lookupProperty(helpers,"headline") || (depth0 != null ? lookupProperty(depth0,"headline") : depth0)) != null ? helper : alias2),(typeof helper === "function" ? helper.call(alias1,{"name":"headline","hash":{},"data":data,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":15}}}) : helper))) + + "\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"qm-change"},"data":data,"indent":"\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n\r\n
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.change-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":3},"end":{"line":9,"column":48}}})) + + "\r\n
\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n
\r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":11,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":13,"column":1},"end":{"line":19,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],30:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"dialogue.compilation-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":47}}})) + + "\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"qm-compilation"},"data":data,"indent":"\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.compilation-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":16,"column":5},"end":{"line":16,"column":55}}})) + + "\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":6,"column":1},"end":{"line":27,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],31:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.creator-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":44}}})) + + "\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"qm-creator"},"data":data,"indent":"\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n\r\n
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.creator-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":3},"end":{"line":9,"column":49}}})) + + "\r\n
\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n \r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":11,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":13,"column":1},"end":{"line":17,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],32:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data) { + return "
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n" + + ((stack1 = lookupProperty(helpers,"unless").call(depth0 != null ? depth0 : (container.nullContext || {}),(depth0 != null ? lookupProperty(depth0,"noProgressBar") : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}})) != null ? stack1 : "") + + "\r\n
\r\n
\r\n\r\n
\r\n

\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"title"),depth0,{"name":"title","data":data,"indent":"\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "

\r\n
\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"content"),depth0,{"name":"content","data":data,"indent":"\t\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n
\r\n"; +},"usePartial":true,"useData":true}); + +},{"hbsfy/runtime":133}],33:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n\r\n
\r\n
\r\n " + + container.escapeExpression(((helper = (helper = lookupProperty(helpers,"title") || (depth0 != null ? lookupProperty(depth0,"title") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"title","hash":{},"data":data,"loc":{"start":{"line":5,"column":7},"end":{"line":5,"column":16}}}) : helper))) + + "\r\n
\r\n\r\n" + + ((stack1 = ((helper = (helper = lookupProperty(helpers,"imagePreview") || (depth0 != null ? lookupProperty(depth0,"imagePreview") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"imagePreview","hash":{},"data":data,"loc":{"start":{"line":8,"column":0},"end":{"line":8,"column":18}}}) : helper))) != null ? stack1 : "") + + "\r\n\r\n
\r\n
\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],34:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"dialogue.done-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":40}}})) + + "\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + container.escapeExpression(((helper = (helper = lookupProperty(helpers,"text") || (depth0 != null ? lookupProperty(depth0,"text") : depth0)) != null ? helper : container.hooks.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : (container.nullContext || {}),{"name":"text","hash":{},"data":data,"loc":{"start":{"line":7,"column":2},"end":{"line":7,"column":10}}}) : helper))) + + "\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":6,"column":1},"end":{"line":8,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],35:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "

" + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":7},"end":{"line":9,"column":25}}})) + + "

\r\n"; +},"3":function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n

\r\n \r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,"headline") : depth0),{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":24,"column":36},"end":{"line":24,"column":63}}})) + + "\r\n

\r\n

\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,(depth0 != null ? lookupProperty(depth0,"text") : depth0),{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":27,"column":6},"end":{"line":27,"column":29}}})) + + "\r\n

\r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"dos") : depth0),{"name":"each","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":8,"column":3},"end":{"line":10,"column":12}}})) != null ? stack1 : "") + + "
\r\n
\r\n\r\n
\r\n
\r\n
\r\n \r\n
\r\n\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias1,(depth0 != null ? lookupProperty(depth0,"donts") : depth0),{"name":"each","hash":{},"fn":container.program(3, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":20,"column":3},"end":{"line":30,"column":12}}})) != null ? stack1 : "") + + "
\r\n
\r\n
\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],36:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.editing-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":44}}})) + + "\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"qm-editing"},"data":data,"indent":"\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n\r\n
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.editing-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":3},"end":{"line":9,"column":49}}})) + + "\r\n
\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":11,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":13,"column":1},"end":{"line":29,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],37:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", alias4=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],38:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data) { + return " \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, helper, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3="function", lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n" + + ((stack1 = lookupProperty(helpers,"unless").call(alias1,(depth0 != null ? lookupProperty(depth0,"noCloseButton") : depth0),{"name":"unless","hash":{},"fn":container.program(1, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}})) != null ? stack1 : "") + + "\r\n
\r\n " + + ((stack1 = ((helper = (helper = lookupProperty(helpers,"content") || (depth0 != null ? lookupProperty(depth0,"content") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"content","hash":{},"data":data,"loc":{"start":{"line":7,"column":2},"end":{"line":7,"column":15}}}) : helper))) != null ? stack1 : "") + + "\r\n
\r\n\r\n
\r\n " + + ((stack1 = ((helper = (helper = lookupProperty(helpers,"buttons") || (depth0 != null ? lookupProperty(depth0,"buttons") : depth0)) != null ? helper : alias2),(typeof helper === alias3 ? helper.call(alias1,{"name":"buttons","hash":{},"data":data,"loc":{"start":{"line":11,"column":2},"end":{"line":11,"column":15}}}) : helper))) != null ? stack1 : "") + + "\r\n
\r\n\r\n
\r\n
\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],39:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.licence-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":4,"column":3},"end":{"line":4,"column":44}}})) + + "\r\n" + + ((stack1 = container.invokePartial(lookupProperty(partials,"questionMark"),depth0,{"name":"questionMark","hash":{"target":"qm-licence"},"data":data,"indent":"\t\t\t","helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : "") + + "
\r\n\r\n
\r\n " + + alias3((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||alias2).call(alias1,"dialogue.licence-question-mark",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":9,"column":3},"end":{"line":9,"column":49}}})) + + "\r\n
\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, alias1=container.lambda, alias2=container.escapeExpression, alias3=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
\r\n
\r\n \r\n
\r\n\r\n" + + ((stack1 = lookupProperty(helpers,"each").call(alias3,(depth0 != null ? lookupProperty(depth0,"compatibles") : depth0),{"name":"each","hash":{},"fn":container.program(5, data, 0),"inverse":container.noop,"data":data,"loc":{"start":{"line":24,"column":3},"end":{"line":31,"column":12}}})) != null ? stack1 : "") + + "
\r\n"; +},"5":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":11,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":13,"column":1},"end":{"line":33,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],40:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var alias1=container.lambda, alias2=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],41:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data) { + var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
  • \r\n
    \r\n " + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(alias1,(depth0 != null ? lookupProperty(depth0,"name") : depth0),{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":5,"column":15},"end":{"line":5,"column":38}}})) + + "\r\n
  • \r\n"; +},"2":function(container,depth0,helpers,partials,data) { + return "sub"; +},"4":function(container,depth0,helpers,partials,data) { + return "active"; +},"6":function(container,depth0,helpers,partials,data) { + return "completed"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],42:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"dialogue.public-domain-picture",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":48}}})) + + "\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
    \r\n " + + ((stack1 = (lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"dialogue.public-domain-text",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":8,"column":3},"end":{"line":8,"column":48}}})) != null ? stack1 : "") + + "\r\n
    \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","hash":{"noProgressBar":1},"fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":6,"column":1},"end":{"line":10,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],43:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) { + var helper, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"useData":true}); + +},{"hbsfy/runtime":133}],44:[function(require,module,exports){ +// hbsfy compiled Handlebars template +var HandlebarsCompiler = require('hbsfy/runtime'); +module.exports = HandlebarsCompiler.template({"1":function(container,depth0,helpers,partials,data,blockParams,depths) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "\r\n"; +},"2":function(container,depth0,helpers,partials,data) { + var lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return " " + + container.escapeExpression((lookupProperty(helpers,"translate")||(depth0 && lookupProperty(depth0,"translate"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"dialogue.type-of-use-headline",{"name":"translate","hash":{},"data":data,"loc":{"start":{"line":3,"column":2},"end":{"line":3,"column":47}}})) + + "\r\n"; +},"4":function(container,depth0,helpers,partials,data) { + var alias1=depth0 != null ? depth0 : (container.nullContext || {}), alias2=container.hooks.helperMissing, alias3=container.escapeExpression, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return "
    \r\n
    \r\n \r\n
    \r\n\r\n
    \r\n \r\n
    \r\n
    \r\n"; +},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) { + var stack1, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + return ((stack1 = container.invokePartial(lookupProperty(partials,"dialogueBubble"),depth0,{"name":"dialogueBubble","fn":container.program(1, data, 0, blockParams, depths),"inverse":container.noop,"data":data,"helpers":helpers,"partials":partials,"decorators":container.decorators})) != null ? stack1 : ""); +},"1_d": function(fn, props, container, depth0, data, blockParams, depths) { + + var decorators = container.decorators, lookupProperty = container.lookupProperty || function(parent, propertyName) { + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return parent[propertyName]; + } + return undefined + }; + + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(2, data, 0, blockParams, depths),"inverse":container.noop,"args":["title"],"data":data,"loc":{"start":{"line":2,"column":1},"end":{"line":4,"column":12}}}) || fn; + fn = lookupProperty(decorators,"inline")(fn,props,container,{"name":"inline","hash":{},"fn":container.program(4, data, 0, blockParams, depths),"inverse":container.noop,"args":["content"],"data":data,"loc":{"start":{"line":6,"column":1},"end":{"line":22,"column":12}}}) || fn; + return fn; + } + +,"useDecorators":true,"usePartial":true,"useData":true,"useDepths":true}); + +},{"hbsfy/runtime":133}],45:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + AttributionDialogue = require( '../AttributionDialogue' ), + DialogueEvaluation = require( '../DialogueEvaluation' ), + DialogueEvaluationView = require( './DialogueEvaluationView' ), + InfoBoxView = require( './InfoBoxView' ), + Messages = require( '../Messages' ), + ProgressBarView = require( './ProgressBarView' ); + +var AttributionDialogueView = function( asset ) { + this._dialogue = new AttributionDialogue( asset ); + this._dialogue.init(); + + this._progressBar = new ProgressBarView( this._dialogue, this ); + + this._privateUseBox = new InfoBoxView( + 'private-use', + Messages.t( 'info-box.private-use' ) + + '' + Messages.t( 'info-box.private-use-more-link' ) + '', + '' + ); + + this._portedLicenceBox = new InfoBoxView( + 'ported-licence', + Messages.t( 'info-box.ported-licence' ), + '' + ); +}; + +$.extend( AttributionDialogueView.prototype, { + /** + * @type {InfoBox} + */ + _privateUseBox: null, + + /** + * @type {InfoBox} + */ + _portedLicenceBox: null, + + /** + * @type {AttributionDialogue} + */ + _dialogue: null, + + /** + * @type {ProgressBarView} + */ + _progressBar: null, + + /** + * @type {jQuery} + */ + _$html: $( '
    ' ), + + /** + * Turns a $form.serializeArray return value into an object + * @param {Object[]} formValues + * @returns {{}} + * @private + */ + _formValuesToObj: function( formValues ) { + var form = {}; + $.each( formValues, function() { + form[ this.name ] = this.value; + } ); + + return form; + }, + + _submit: function( e, $dialogue ) { + var self = this; + + this._dialogue.currentStep().complete( this._formValuesToObj( + $dialogue.find( 'form' ).serializeArray() + ) ); + $dialogue.find( '.animated-content' ).animate( { opacity: 0 }, 500, function() { + self.render( $dialogue ); + $dialogue.find( '.animated-content' ).animate( { opacity: 1 }, 500 ); + } ); + e.preventDefault(); + }, + + _nextStepOrDone: function() { + if( this._dialogue.currentStep() ) { + return this._dialogue.currentStep().render(); + } + + return new DialogueEvaluationView( new DialogueEvaluation( + this._dialogue.getAsset(), + this._dialogue.getData() + ) ).render(); + }, + + _toggleQuestionMark: function( e ) { + $( this ).toggleClass( 'active' ); + $( '#' + $( this ).data( 'target' ) ).slideToggle(); + + e.preventDefault(); + }, + + /** + * Adjusts the height of the dialogue and the position of the green triangle according to the progress + * + * @param {jQuery} $content + * @private + */ + _alignDialogueBubbleAndProgressBar: function( $content ) { + var progressIndex = $content.find( '.ag-progress-bar li' ).index( $content.find( '.ag-progress-bar .active' ) ), + $triangle = $content.find( '.triangle' ), + $bubble = $content.find( '.bubble-content' ); + + $triangle.css( 'margin-top', ( 12 + progressIndex * 21 ) + 'px' ); + $bubble.css( 'min-height', ( 27 + 18 + progressIndex * 21 ) + 'px' ); + }, + + updateContent: function() { + this.render( this._$html ); + }, + + /** + * @param {jQuery} $dialogue + */ + render: function( $dialogue ) { + var $content = this._nextStepOrDone(), + self = this, + $infoBox = $( '#info-box' ); + + this._$html = $dialogue; + + $infoBox.html( this._privateUseBox.render() ); + if( this._dialogue.getAsset().getLicence().isInGroup( 'ported' ) ) { + $infoBox.append( this._portedLicenceBox.render() ); + } + + $content.find( '.immediate-submit input:checkbox' ).click( function() { + $( this ).closest( 'form' ).submit(); + } ); + $content.find( 'form' ).submit( function( e ) { + if( !self._validateForm( $( e.target ) ) ) { + e.preventDefault(); + return false; + } + self._submit( e, $dialogue ); + } ); + $content.find( '.question-mark' ).click( this._toggleQuestionMark ); + + $content.find( '.ag-progress-bar' ).html( this._progressBar.render() ); + this._alignDialogueBubbleAndProgressBar( $content ); + + $dialogue.html( $content ); + $content.find( 'input:text' ).focus(); + }, + + _validateForm: function( $form ) { + return !$form.hasClass( 'author-step' ) || this._validateAuthorStepForm( $form ); + }, + + _validateAuthorStepForm: function( $form ) { + return $form.find( 'input:checkbox[name="no-author"]' ).is( ':checked' ) || $form.find( 'input:text[name="author"]' ).val(); + } + +} ); + +module.exports = AttributionDialogueView; + +},{"../AttributionDialogue":11,"../DialogueEvaluation":16,"../Messages":24,"./DialogueEvaluationView":47,"./InfoBoxView":50,"./ProgressBarView":52,"jquery":138}],46:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + template = require( '../templates/ChangeStep.handlebars' ), + Messages = require( '../Messages' ); + +var ChangeStepView = function( licence ) { + this._licence = licence; +}; + +$.extend( ChangeStepView.prototype, { + render: function() { + var headline; + if( !this._licence.isPublicDomain() ) { + headline = Messages.t( 'dialogue.change-headline' ); + } else { + headline = Messages.t( 'dialogue.change-pd-headline' ); + } + return $( template( { + headline: headline + } ) ); + } +} ); + +module.exports = ChangeStepView; + +},{"../Messages":24,"../templates/ChangeStep.handlebars":29,"jquery":138}],47:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + doneTemplate = require( '../templates/Done.handlebars' ), + dosAndDontsTemplate = require( '../templates/DosAndDonts.handlebars' ), + attributionTemplate = require( '../templates/Attribution.handlebars' ), + ZeroClipboard = require( 'zeroclipboard' ), + Clipboard = require( 'clipboard' ), + Messages = require( '../Messages' ), + Tracking = require( '../../tracking.js' ), + BackToTopButton = require( '../BackToTopButton' ), + moreInformationTemplate = require( '../templates/MoreInformation.handlebars' ); + +ZeroClipboard.config( { swfPath: '//cdnjs.cloudflare.com/ajax/libs/zeroclipboard/2.2.0/ZeroClipboard.swf' } ); + +/** + * @param {DialogueEvaluation} evaluation + * @constructor + */ +var DialogueEvaluationView = function( evaluation ) { + this._evaluation = evaluation; + this._tracking = new Tracking(); +}; + +$.extend( DialogueEvaluationView.prototype, { + /** + * @type {DialogueEvaluation} + */ + _evaluation: null, + + _showDont: function( e ) { + $( this ).parent().siblings( '.dont-text' ).slideToggle(); + + e.preventDefault(); + }, + + _showAttribution: function( e ) { + $( '.final-attribution .attribution-box div' ).hide(); + $( $( this ).data( 'target' ) ).show(); + $( '.final-attribution .show-attribution' ).removeClass( 'active' ); + $( this ).addClass( 'active' ); + + e.preventDefault(); + }, + + _attributionText: function() { + return $( '.attribution-box > div:visible' ).text().trim(); + }, + + _copyAttribution: function( event, $button ) { + event.clipboardData.setData( 'text/plain', this._attributionText() ); + this._blinkCopyButton( $button ); + }, + + _blinkCopyButton: function( $button ) { + $button.addClass( 'flash' ); + window.setTimeout( function() { + $button.removeClass( 'flash' ); + }, 800 ); + }, + + _hasFlash: function() { + var hasFlash = false; + try { + var swf = new ActiveXObject( 'ShockwaveFlash.ShockwaveFlash' ); // jshint ignore:line + if( swf ) { + hasFlash = true; + } + } catch( e ) { + if( navigator.mimeTypes + && navigator.mimeTypes[ 'application/x-shockwave-flash' ] !== undefined + && navigator.mimeTypes[ 'application/x-shockwave-flash' ].enabledPlugin ) { + hasFlash = true; + } + } + + return hasFlash; + }, + + _initIECopy: function( $button ) { + var self = this; + + $button.click( function( e ) { + window.clipboardData.setData( 'Text', self._attributionText() ); + self._blinkCopyButton( $button ); + + e.preventDefault(); + self._tracking.trackEvent( 'Button', 'CopyAttribution' ); + } ); + }, + + _initFlashCopy: function( $button ) { + var self = this, + clipboard = new ZeroClipboard( $button ); + + clipboard.on( 'copy', function( e ) { + self._tracking.trackEvent( 'Button', 'CopyAttribution' ); + self._copyAttribution( e, $button ); + } ); + }, + + _initJSCopy: function( $button ) { + var self = this, + clipboard = new Clipboard( '#' + $button.attr( 'id' ), { + target: function() { + self._tracking.trackEvent( 'Button', 'CopyAttribution' ); + return $( '.attribution-box > div:visible' )[ 0 ]; + } + } ); + + clipboard.on( 'error', function() { + $button + .tooltip( { + title: Messages.t( 'evaluation.copy-hint' ), + trigger: 'manual' + } ) + .tooltip( 'show' ); + + setTimeout( function() { + $button.tooltip( 'hide' ); + }, 3000 ); + } ); + clipboard.on( 'success', function( e ) { + self._blinkCopyButton( $button ); + e.clearSelection(); + } ); + }, + + _initCopyButton: function( $button ) { + if( window.clipboardData ) { // IE + this._initIECopy( $button ); + } else if( this._hasFlash() ) { // flash + this._initFlashCopy( $button ); + } else { // JS with hint when copying fails + this._initJSCopy( $button ); + } + }, + + render: function() { + var $html = $( '
    ' ), + dosAndDonts = this._evaluation.getDosAndDonts(), + isPd = this._evaluation.getAttributionLicence().isPublicDomain(), + licenceGroups = this._evaluation.getAttributionLicence().getGroups(), + doneText, + title; + + if( isPd ) { + doneText = Messages.t( 'evaluation.done-text-legal-notice' ); + } else { + doneText = Messages.t( 'evaluation.done-text' ); + } + + $html.append( doneTemplate( { + text: doneText + } ) ); + if( isPd ) { + title = Messages.t( 'evaluation.your-legal-notice' ); + } else { + title = Messages.t( 'evaluation.your-attribution' ); + } + + $html.append( attributionTemplate( { + title: title, + attribution: this._evaluation.getAttribution(), + plainTextAttribution: this._evaluation.getPlainTextAttribution(), + isPrint: this._evaluation.isPrint() + } ) ); + + if( !isPd ) { + $html.append( dosAndDontsTemplate( { + dos: dosAndDonts.dos.map( function( d ) { + return 'evaluation.do-' + d + '-text'; + } ), + donts: dosAndDonts.donts.map( function( dont ) { + return { + headline: 'evaluation.dont-' + dont + '-headline', + text: 'evaluation.dont-' + dont + '-text' + }; + } ) + } ) ); + } + $html.append( '
    ' ); + + var isZero = typeof licenceGroups.includes !== 'undefined' && + licenceGroups.includes( 'cc-zero' ); + var $licenseLink = ''; + if( !isPd || isZero ) { + var licenceText; + if( isZero ) { + licenceText = Messages.t( 'evaluation.show-cc-zero-text' ); + } else { + licenceText = Messages.t( 'evaluation.show-licence-text' ); + } + $licenseLink = moreInformationTemplate( { + target: this._evaluation.getAttributionLicence().getUrl(), + content: licenceText + + ' (' + this._evaluation.getAttributionLicence().getName() + ')' + } ); + } + + $html.append( $( '
    ' ) + .append( $licenseLink ) + .append( new BackToTopButton().render() ) + ); + $html.append( '
    ' ); + + $html.find( '.show-attribution' ).click( this._showAttribution ); + $html.find( '.show-dont' ).click( this._showDont ); + + this._initCopyButton( $html.find( '#copy-attribution' ) ); + + return $html.contents(); + } +} ); + +module.exports = DialogueEvaluationView; + +},{"../../tracking.js":55,"../BackToTopButton":13,"../Messages":24,"../templates/Attribution.handlebars":27,"../templates/Done.handlebars":34,"../templates/DosAndDonts.handlebars":35,"../templates/MoreInformation.handlebars":40,"clipboard":65,"jquery":138,"zeroclipboard":182}],48:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + template = require( '../templates/DialogueScreen.handlebars' ), + imagePreviewTemplate = require( '../templates/ImagePreview.handlebars' ), + PublicDomainDialogueView = require( './PublicDomainDialogueView' ), + AttributionDialogueView = require( './AttributionDialogueView' ), + Messages = require( '../Messages' ); + +var DialogueView = function( imageInfo, asset ) { + this._imageInfo = imageInfo; + this._asset = asset; +}; + +$.extend( DialogueView.prototype, { + /** + * @type {ImageInfo} + */ + _imageInfo: null, + + /** + * @type {Asset} + */ + _asset: null, + + _renderImagePreview: function() { + return imagePreviewTemplate( { + url: this._imageInfo.getUrl(), + size: this._imageInfo.getPrettySize(), + thumbUrl: this._imageInfo.getThumbnail().url, + imageWidth: this._imageInfo.getThumbnail().width, + filePageUrl: this._asset.getUrl() + } ); + }, + + /** + * Renders information about the usage not requiring attributing the author, + * if the asset has been licenced under appropriate licence, or starts the dialogue otherwise. + * + * @param {jQuery} $screen + * @param {boolean} $forceAttribution + */ + render: function( $screen, forceAttribution ) { + var title, dialogue; + + if( !forceAttribution && this._noAttributionNeeded( this._asset.getLicence() ) ) { + title = Messages.t( 'dialogue.no-attribution-needed' ); + dialogue = new PublicDomainDialogueView( this ); + } else { + if( this._asset.getLicence().isPublicDomain() ) { + title = Messages.t( 'dialogue.adjust-legal-notice-for-usage' ); + } else { + title = Messages.t( 'dialogue.adjust-attribution-for-usage' ); + } + dialogue = new AttributionDialogueView( this._asset ); + } + + $screen.html( template( { + title: title, + imagePreview: this._renderImagePreview() + } ) ); + dialogue.render( $screen.find( '.dialogue' ) ); + }, + + /** + * Checks if the licence does not oblige to provide the attribution + * + * @param {Licence} licence + */ + _noAttributionNeeded: function( licence ) { + return licence.isInGroup( 'pd' ) || licence.isInGroup( 'cc0' ); + } + +} ); + +module.exports = DialogueView; + +},{"../Messages":24,"../templates/DialogueScreen.handlebars":33,"../templates/ImagePreview.handlebars":37,"./AttributionDialogueView":45,"./PublicDomainDialogueView":53,"jquery":138}],49:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ); + +/** + * @param {Function} template + * @constructor + */ +var DialogueStepView = function( template ) { + this._template = template; +}; + +$.extend( DialogueStepView.prototype, { + /** + * @type {Function} + */ + _template: null, + + render: function() { + return $( this._template() ); + } +} ); + +module.exports = DialogueStepView; + +},{"jquery":138}],50:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + infoBox = require( '../templates/InfoBox.handlebars' ), + cookie = require( 'cookie' ); + +var InfoBoxView = function( name, text, buttons ) { + this._name = name; + this._text = text; + this._buttons = buttons; + this._dismissed = cookie.parse( document.cookie )[ this._name ] === 'hide'; +}; + +$.extend( InfoBoxView.prototype, { + _name: '', + _text: '', + _buttons: '', + _dimissed: false, + + _dontShowAgain: function() { + document.cookie = cookie.serialize( + this._name, + 'hide', + { expires: this._nextYear() } + ); + }, + + _nextYear: function() { + var date = new Date(); + date.setFullYear( date.getFullYear() + 1 ); + return date; + }, + + render: function() { + if( this._dismissed ) { + return ''; + } + + var $box = $( infoBox( { content: this._text, buttons: this._buttons, noCloseButton: this._name === 'ported-licence' } ) ), + self = this; + + $box.find( '.close-info' ).click( function( e ) { + $( this ).parents( '.info-box' ).slideUp(); + self._dismissed = true; + e.preventDefault(); + } ); + $box.find( '.hide-forever' ).click( $.proxy( this._dontShowAgain, this ) ); + + return $box; + } +} ); + +module.exports = InfoBoxView; + +},{"../templates/InfoBox.handlebars":38,"cookie":66,"jquery":138}],51:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + template = require( '../templates/LicenceStep.handlebars' ), + LicenceStore = require( '../LicenceStore' ), + config = require( '../../config.json' ), + licences = new LicenceStore( require( '../LICENCES' ), config.portedLicences ), + Messages = require( '../Messages' ); + +var LicenceStepView = function( original, compatibles ) { + this._original = original; + this._compatibles = compatibles; +}; + +$.extend( LicenceStepView.prototype, { + render: function() { + var title, name, url, defaultId; + if( this._original.isPublicDomain() ) { + var cc0Licence = licences.getLicence( 'cc-zero' ); + defaultId = cc0Licence.getId(); + title = Messages.t( 'dialogue.mark-as-pd' ); + name = cc0Licence.getName(); + url = cc0Licence.getUrl(); + } else { + defaultId = 'original'; + title = Messages.t( 'dialogue.same-licence' ); + name = this._original.getName(); + url = this._original.getUrl(); + } + + return $( template( { + defaultChoice: { title: title, name: name, url: url, id: defaultId }, + compatibles: this._compatibles + }, { + allowedProtoMethods: { + getName: true, + getUrl: true, + getId: true + } + } ) ); + } +} ); + +module.exports = LicenceStepView; + +},{"../../config.json":54,"../LICENCES":20,"../LicenceStore":23,"../Messages":24,"../templates/LicenceStep.handlebars":39,"jquery":138}],52:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + template = require( '../templates/ProgressBar.handlebars' ); + +var ProgressBarView = function( dialogue, dialogueView ) { + this._dialogue = dialogue; + this._dialogueView = dialogueView; + this._initialized = false; +}; + +$.extend( ProgressBarView.prototype, { + /** + * @type {AttributionDialogue} + */ + _dialogue: null, + + /** + * @type {AttributionDialogueView} + */ + _dialogueView: null, + + /** + * @type {boolean} + */ + _initialized: false, + + _backBuffer: false, + + _setBackBuffer: function() { + this._backBuffer = true; + window.history.pushState( 'step-back', '', '' ); + }, + + /** + * @param {int} n + * @private + */ + _backToStep: function( n ) { + if( n < 0 || n >= this._dialogue.currentStepIndex() ) { + return; + } + + this._dialogue.setStep( n ); + this._dialogueView.updateContent(); + }, + + render: function() { + var steps = this._dialogue.getSteps() + .concat( [ { + getName: function() { + return 'done'; + } + } ] ), + activeStep = steps.indexOf( this._dialogue.currentStep() ), + $html = $( template( { + steps: steps.map( function( step, i, allSteps ) { + var lastStepIndex = allSteps.length - 1; + activeStep = activeStep === -1 ? lastStepIndex : activeStep; + + return { + name: 'dialogue.' + step.getName(), + isSubstep: i !== lastStepIndex && allSteps.length > 5 && i >= lastStepIndex - 3, + isActive: i === activeStep, + isCompleted: i < activeStep + }; + } ) + } ) ), + self = this; + + $html.find( 'li a' ).click( function( e ) { + self._backToStep( $html.find( 'li a' ).index( $( this ) ) ); + e.preventDefault(); + } ); + + if( window.history && this._dialogue.currentStepIndex() > 0 ) { + if( !this._backBuffer ) { + this._setBackBuffer(); + } + + if( !this._initialized ) { + this._initialized = true; + + $( window ).on( 'popstate', function() { + self._backBuffer = false; + self._backToStep( self._dialogue.currentStepIndex() - 1 ); + } ); + } + } + + return $html; + } +} ); + +module.exports = ProgressBarView; + +},{"../templates/ProgressBar.handlebars":41,"jquery":138}],53:[function(require,module,exports){ +'use strict'; + +var $ = require( 'jquery' ), + publicDomainTemplate = require( '../templates/PublicDomain.handlebars' ), + Messages = require( '../Messages' ), + // buttonTemplate = require( '../templates/SmallButton.handlebars' ), + moreInfomationTemplate = require( '../templates/MoreInformation.handlebars' ), + BackToTopButton = require( '../BackToTopButton' ); + +var PublicDomainDialogueView = function( parentDialogue ) { + this._parentDialogue = parentDialogue; +}; + +$.extend( PublicDomainDialogueView.prototype, { + _renderPublicLicenceDialogue: function() { + return publicDomainTemplate(); + }, + + _showPublicDomainInformation: function() { + var $bottomBar = $( '
    ' ); + $bottomBar.append( moreInfomationTemplate( { + content: Messages.t( 'dialogue.more-information' ), + target: 'https://wiki.creativecommons.org/wiki/Public_domain' + } ) ); + $bottomBar.append( new BackToTopButton().render() ); + + return $bottomBar; + }, + _showForceAttribution: function() { + var $forceAttributionBox = $( '
    ' ); + + var parentDialogue = this._parentDialogue; + + $forceAttributionBox.bind( 'click', function() { + // Remove children from current dialogue screen element + var $dialogueScreen = $( '.dialogue-screen' ); + $dialogueScreen.empty(); + // render parent dialogue again with forceAttribution set to true + parentDialogue.render( $dialogueScreen, true ); + } ); + + $forceAttributionBox.append( Messages.t( 'dialogue.force-pd-attribution' ) ); + return $forceAttributionBox; + }, + + /** + * Renders information about Public Domain Licence if the picture was under PD or starts the dialogue + * + * @param {jQuery} $dialogue + */ + render: function( $dialogue ) { + var $publicLicenceDialogue = $( this._renderPublicLicenceDialogue() ); + $publicLicenceDialogue.append( this._showForceAttribution() ); + $dialogue.html( $publicLicenceDialogue ) + .append( '
    ' ) + .append( this._showPublicDomainInformation() ); + } +} ); + +module.exports = PublicDomainDialogueView; + +},{"../BackToTopButton":13,"../Messages":24,"../templates/MoreInformation.handlebars":40,"../templates/PublicDomain.handlebars":42,"jquery":138}],54:[function(require,module,exports){ +module.exports={ + "apiContinuationLimit": 10, + "supportedMediaTypes": ["bitmap", "drawing"], + "piwikDir": "/piwik/", + "piwikSiteId": 1, + "portedLicences": { + "cc-by-1.0-fi": "https://creativecommons.org/licenses/by/1.0/fi/deed.en", + "cc-by-1.0-il": "https://creativecommons.org/licenses/by/1.0/il/deed.en", + "cc-by-1.0-nl": "https://creativecommons.org/licenses/by/1.0/nl/deed.en", + "cc-by-2.0-at": "https://creativecommons.org/licenses/by/2.0/at/deed.en", + "cc-by-2.0-au": "https://creativecommons.org/licenses/by/2.0/au/deed.en", + "cc-by-2.0-be": "https://creativecommons.org/licenses/by/2.0/be/deed.en", + "cc-by-2.0-br": "https://creativecommons.org/licenses/by/2.0/br/deed.en", + "cc-by-2.0-ca": "https://creativecommons.org/licenses/by/2.0/ca/deed.en", + "cc-by-2.0-cl": "https://creativecommons.org/licenses/by/2.0/cl/deed.en", + "cc-by-2.0-de": "https://creativecommons.org/licenses/by/2.0/de/deed.en", + "cc-by-2.0-es": "https://creativecommons.org/licenses/by/2.0/es/deed.en", + "cc-by-2.0-fr": "https://creativecommons.org/licenses/by/2.0/fr/deed.en", + "cc-by-2.0-hr": "https://creativecommons.org/licenses/by/2.0/hr/deed.en", + "cc-by-2.0-it": "https://creativecommons.org/licenses/by/2.0/it/deed.en", + "cc-by-2.0-jp": "https://creativecommons.org/licenses/by/2.0/jp/deed.en", + "cc-by-2.0-kr": "https://creativecommons.org/licenses/by/2.0/kr/deed.en", + "cc-by-2.0-nl": "https://creativecommons.org/licenses/by/2.0/nl/deed.en", + "cc-by-2.0-pl": "https://creativecommons.org/licenses/by/2.0/pl/deed.en", + "cc-by-2.0-tw": "https://creativecommons.org/licenses/by/2.0/tw/deed.en", + "cc-by-2.0-uk": "https://creativecommons.org/licenses/by/2.0/uk/deed.en", + "cc-by-2.0-za": "https://creativecommons.org/licenses/by/2.0/za/deed.en", + "cc-by-2.1-au": "https://creativecommons.org/licenses/by/2.1/au/deed.en", + "cc-by-2.1-es": "https://creativecommons.org/licenses/by/2.1/es/deed.en", + "cc-by-2.1-jp": "https://creativecommons.org/licenses/by/2.1/jp/deed.en", + "cc-by-2.5-ar": "https://creativecommons.org/licenses/by/2.5/ar/deed.en", + "cc-by-2.5-au": "https://creativecommons.org/licenses/by/2.5/au/deed.en", + "cc-by-2.5-bg": "https://creativecommons.org/licenses/by/2.5/bg/deed.en", + "cc-by-2.5-br": "https://creativecommons.org/licenses/by/2.5/br/deed.en", + "cc-by-2.5-ca": "https://creativecommons.org/licenses/by/2.5/ca/deed.en", + "cc-by-2.5-ch": "https://creativecommons.org/licenses/by/2.5/ch/deed.en", + "cc-by-2.5-cn": "https://creativecommons.org/licenses/by/2.5/cn/deed.en", + "cc-by-2.5-co": "https://creativecommons.org/licenses/by/2.5/co/deed.en", + "cc-by-2.5-dk": "https://creativecommons.org/licenses/by/2.5/dk/deed.en", + "cc-by-2.5-es": "https://creativecommons.org/licenses/by/2.5/es/deed.en", + "cc-by-2.5-hr": "https://creativecommons.org/licenses/by/2.5/hr/deed.en", + "cc-by-2.5-hu": "https://creativecommons.org/licenses/by/2.5/hu/deed.en", + "cc-by-2.5-il": "https://creativecommons.org/licenses/by/2.5/il/deed.en", + "cc-by-2.5-in": "https://creativecommons.org/licenses/by/2.5/in/deed.en", + "cc-by-2.5-it": "https://creativecommons.org/licenses/by/2.5/it/deed.en", + "cc-by-2.5-mk": "https://creativecommons.org/licenses/by/2.5/mk/deed.en", + "cc-by-2.5-mt": "https://creativecommons.org/licenses/by/2.5/mt/deed.en", + "cc-by-2.5-mx": "https://creativecommons.org/licenses/by/2.5/mx/deed.en", + "cc-by-2.5-my": "https://creativecommons.org/licenses/by/2.5/my/deed.en", + "cc-by-2.5-nl": "https://creativecommons.org/licenses/by/2.5/nl/deed.en", + "cc-by-2.5-pe": "https://creativecommons.org/licenses/by/2.5/pe/deed.en", + "cc-by-2.5-pl": "https://creativecommons.org/licenses/by/2.5/pl/deed.en", + "cc-by-2.5-pt": "https://creativecommons.org/licenses/by/2.5/pt/deed.en", + "cc-by-2.5-scotland": "https://creativecommons.org/licenses/by/2.5/scotland/deed.en", + "cc-by-2.5-se": "https://creativecommons.org/licenses/by/2.5/se/deed.en", + "cc-by-2.5-si": "https://creativecommons.org/licenses/by/2.5/si/deed.en", + "cc-by-2.5-tw": "https://creativecommons.org/licenses/by/2.5/tw/deed.en", + "cc-by-2.5-za": "https://creativecommons.org/licenses/by/2.5/za/deed.en", + "cc-by-3.0-at": "https://creativecommons.org/licenses/by/3.0/at/deed.en", + "cc-by-3.0-au": "https://creativecommons.org/licenses/by/3.0/au/deed.en", + "cc-by-3.0-bg": "https://creativecommons.org/", + "cc-by-3.0-br": "https://creativecommons.org/licenses/by/3.0/br/deed.en", + "cc-by-3.0-ch": "https://creativecommons.org/licenses/by/3.0/ch/deed.en", + "cc-by-3.0-cl": "https://creativecommons.org/licenses/by/3.0/cl/deed.en", + "cc-by-3.0-cn": "https://creativecommons.org/licenses/by/3.0/cn/deed.en", + "cc-by-3.0-cr": "https://creativecommons.org/licenses/by/3.0/cr/deed.en", + "cc-by-3.0-cz": "https://creativecommons.org/licenses/by/3.0/cz/deed.en", + "cc-by-3.0-de": "https://creativecommons.org/licenses/by/3.0/de/deed.en", + "cc-by-3.0-ec": "https://creativecommons.org/licenses/by/3.0/ec/deed.en", + "cc-by-3.0-ee": "https://creativecommons.org/licenses/by/3.0/ee/deed.en", + "cc-by-3.0-eg": "https://creativecommons.org/licenses/by/3.0/eg/deed.en", + "cc-by-3.0-es": "https://creativecommons.org/licenses/by/3.0/es/deed.en", + "cc-by-3.0-fr": "https://creativecommons.org/licenses/by/3.0/fr/deed.en", + "cc-by-3.0-gr": "https://creativecommons.org/licenses/by/3.0/gr/deed.en", + "cc-by-3.0-gt": "https://creativecommons.org/licenses/by/3.0/gt/deed.en", + "cc-by-3.0-hk": "https://creativecommons.org/licenses/by/3.0/hk/deed.en", + "cc-by-3.0-hr": "https://creativecommons.org/licenses/by/3.0/hr/deed.en", + "cc-by-3.0-ie": "https://creativecommons.org/licenses/by/3.0/ie/deed.en", + "cc-by-3.0-igo": "https://creativecommons.org/licenses/by/3.0/igo/deed.en", + "cc-by-3.0-it": "https://creativecommons.org/licenses/by/3.0/it/deed.en", + "cc-by-3.0-lu": "https://creativecommons.org/licenses/by/3.0/lu/deed.en", + "cc-by-3.0-nl": "https://creativecommons.org/licenses/by/3.0/nl/deed.en", + "cc-by-3.0-no": "https://creativecommons.org/licenses/by/3.0/no/deed.en", + "cc-by-3.0-nz": "https://creativecommons.org/licenses/by/3.0/nz/deed.en", + "cc-by-3.0-ph": "https://creativecommons.org/licenses/by/3.0/ph/deed.en", + "cc-by-3.0-pl": "https://creativecommons.org/licenses/by/3.0/pl/deed.en", + "cc-by-3.0-pr": "https://creativecommons.org/licenses/by/3.0/pr/deed.en", + "cc-by-3.0-pt": "https://creativecommons.org/licenses/by/3.0/pt/deed.en", + "cc-by-3.0-ro": "https://creativecommons.org/licenses/by/3.0/ro/deed.en", + "cc-by-3.0-rs": "https://creativecommons.org/licenses/by/3.0/rs/deed.en", + "cc-by-3.0-sg": "https://creativecommons.org/licenses/by/3.0/sg/deed.en", + "cc-by-3.0-th": "https://creativecommons.org/licenses/by/3.0/th/deed.en", + "cc-by-3.0-tw": "https://creativecommons.org/licenses/by/3.0/tw/deed.en", + "cc-by-3.0-ug": "https://creativecommons.org/licenses/by/3.0/ug/deed.en", + "cc-by-3.0-us": "https://creativecommons.org/licenses/by/3.0/us/deed.en", + "cc-by-3.0-vn": "https://creativecommons.org/licenses/by/3.0/vn/deed.en", + "cc-by-3.0-za": "https://creativecommons.org/", + "cc-by-sa-1.0-fi": "https://creativecommons.org/licenses/by-sa/1.0/fi/deed.en", + "cc-by-sa-1.0-il": "https://creativecommons.org/licenses/by-sa/1.0/il/deed.en", + "cc-by-sa-1.0-nl": "https://creativecommons.org/licenses/by-sa/1.0/nl/deed.en", + "cc-by-sa-2.0-at": "https://creativecommons.org/licenses/by-sa/2.0/at/deed.en", + "cc-by-sa-2.0-au": "https://creativecommons.org/licenses/by-sa/2.0/au/deed.en", + "cc-by-sa-2.0-be": "https://creativecommons.org/licenses/by-sa/2.0/be/deed.en", + "cc-by-sa-2.0-br": "https://creativecommons.org/licenses/by-sa/2.0/br/deed.en", + "cc-by-sa-2.0-ca": "https://creativecommons.org/licenses/by-sa/2.0/ca/deed.en", + "cc-by-sa-2.0-cl": "https://creativecommons.org/licenses/by-sa/2.0/cl/deed.en", + "cc-by-sa-2.0-de": "https://creativecommons.org/licenses/by-sa/2.0/de/deed.en", + "cc-by-sa-2.0-es": "https://creativecommons.org/licenses/by-sa/2.0/es/deed.en", + "cc-by-sa-2.0-fr": "https://creativecommons.org/licenses/by-sa/2.0/fr/deed.en", + "cc-by-sa-2.0-hr": "https://creativecommons.org/licenses/by-sa/2.0/hr/deed.en", + "cc-by-sa-2.0-it": "https://creativecommons.org/licenses/by-sa/2.0/it/deed.en", + "cc-by-sa-2.0-jp": "https://creativecommons.org/licenses/by-sa/2.0/jp/deed.en", + "cc-by-sa-2.0-kr": "https://creativecommons.org/licenses/by-sa/2.0/kr/deed.en", + "cc-by-sa-2.0-nl": "https://creativecommons.org/licenses/by-sa/2.0/nl/deed.en", + "cc-by-sa-2.0-pl": "https://creativecommons.org/licenses/by-sa/2.0/pl/deed.en", + "cc-by-sa-2.0-tw": "https://creativecommons.org/licenses/by-sa/2.0/tw/deed.en", + "cc-by-sa-2.0-uk": "https://creativecommons.org/licenses/by-sa/2.0/uk/deed.en", + "cc-by-sa-2.0-za": "https://creativecommons.org/licenses/by-sa/2.0/za/deed.en", + "cc-by-sa-2.1-au": "https://creativecommons.org/licenses/by-sa/2.1/au/deed.en", + "cc-by-sa-2.1-es": "https://creativecommons.org/licenses/by-sa/2.1/es/deed.en", + "cc-by-sa-2.1-jp": "https://creativecommons.org/licenses/by-sa/2.1/jp/deed.en", + "cc-by-sa-2.5-ar": "https://creativecommons.org/licenses/by-sa/2.5/ar/deed.en", + "cc-by-sa-2.5-au": "https://creativecommons.org/licenses/by-sa/2.5/au/deed.en", + "cc-by-sa-2.5-bg": "https://creativecommons.org/licenses/by-sa/2.5/bg/deed.en", + "cc-by-sa-2.5-br": "https://creativecommons.org/licenses/by-sa/2.5/br/deed.en", + "cc-by-sa-2.5-ca": "https://creativecommons.org/licenses/by-sa/2.5/ca/deed.en", + "cc-by-sa-2.5-ch": "https://creativecommons.org/licenses/by-sa/2.5/ch/deed.en", + "cc-by-sa-2.5-cn": "https://creativecommons.org/licenses/by-sa/2.5/cn/deed.en", + "cc-by-sa-2.5-co": "https://creativecommons.org/licenses/by-sa/2.5/co/deed.en", + "cc-by-sa-2.5-dk": "https://creativecommons.org/licenses/by-sa/2.5/dk/deed.en", + "cc-by-sa-2.5-es": "https://creativecommons.org/licenses/by-sa/2.5/es/deed.en", + "cc-by-sa-2.5-hr": "https://creativecommons.org/licenses/by-sa/2.5/hr/deed.en", + "cc-by-sa-2.5-hu": "https://creativecommons.org/licenses/by-sa/2.5/hu/deed.en", + "cc-by-sa-2.5-il": "https://creativecommons.org/licenses/by-sa/2.5/il/deed.en", + "cc-by-sa-2.5-in": "https://creativecommons.org/licenses/by-sa/2.5/in/deed.en", + "cc-by-sa-2.5-it": "https://creativecommons.org/licenses/by-sa/2.5/it/deed.en", + "cc-by-sa-2.5-mk": "https://creativecommons.org/licenses/by-sa/2.5/mk/deed.en", + "cc-by-sa-2.5-mt": "https://creativecommons.org/licenses/by-sa/2.5/mt/deed.en", + "cc-by-sa-2.5-mx": "https://creativecommons.org/licenses/by-sa/2.5/mx/deed.en", + "cc-by-sa-2.5-my": "https://creativecommons.org/licenses/by-sa/2.5/my/deed.en", + "cc-by-sa-2.5-nl": "https://creativecommons.org/licenses/by-sa/2.5/nl/deed.en", + "cc-by-sa-2.5-pe": "https://creativecommons.org/licenses/by-sa/2.5/pe/deed.en", + "cc-by-sa-2.5-pl": "https://creativecommons.org/licenses/by-sa/2.5/pl/deed.en", + "cc-by-sa-2.5-pt": "https://creativecommons.org/licenses/by-sa/2.5/pt/deed.en", + "cc-by-sa-2.5-scotland": "https://creativecommons.org/licenses/by-sa/2.5/scotland/deed.en", + "cc-by-sa-2.5-se": "https://creativecommons.org/licenses/by-sa/2.5/se/deed.en", + "cc-by-sa-2.5-si": "https://creativecommons.org/licenses/by-sa/2.5/si/deed.en", + "cc-by-sa-2.5-tw": "https://creativecommons.org/licenses/by-sa/2.5/tw/deed.en", + "cc-by-sa-2.5-za": "https://creativecommons.org/licenses/by-sa/2.5/za/deed.en", + "cc-by-sa-3.0-at": "https://creativecommons.org/licenses/by-sa/3.0/at/deed.en", + "cc-by-sa-3.0-au": "https://creativecommons.org/licenses/by-sa/3.0/au/deed.en", + "cc-by-sa-3.0-bg": "https://creativecommons.org/", + "cc-by-sa-3.0-bn": "https://creativecommons.org/", + "cc-by-sa-3.0-br": "https://creativecommons.org/licenses/by-sa/3.0/br/deed.en", + "cc-by-sa-3.0-ch": "https://creativecommons.org/licenses/by-sa/3.0/ch/deed.en", + "cc-by-sa-3.0-cl": "https://creativecommons.org/licenses/by-sa/3.0/cl/deed.en", + "cc-by-sa-3.0-cn": "https://creativecommons.org/licenses/by-sa/3.0/cn/deed.en", + "cc-by-sa-3.0-cr": "https://creativecommons.org/licenses/by-sa/3.0/cr/deed.en", + "cc-by-sa-3.0-cz": "https://creativecommons.org/licenses/by-sa/3.0/cz/deed.en", + "cc-by-sa-3.0-de": "https://creativecommons.org/licenses/by-sa/3.0/de/deed.en", + "cc-by-sa-3.0-ec": "https://creativecommons.org/licenses/by-sa/3.0/ec/deed.en", + "cc-by-sa-3.0-ee": "https://creativecommons.org/licenses/by-sa/3.0/ee/deed.en", + "cc-by-sa-3.0-eg": "https://creativecommons.org/licenses/by-sa/3.0/eg/deed.en", + "cc-by-sa-3.0-es": "https://creativecommons.org/licenses/by-sa/3.0/es/deed.en", + "cc-by-sa-3.0-fr": "https://creativecommons.org/licenses/by-sa/3.0/fr/deed.en", + "cc-by-sa-3.0-gr": "https://creativecommons.org/licenses/by-sa/3.0/gr/deed.en", + "cc-by-sa-3.0-gt": "https://creativecommons.org/licenses/by-sa/3.0/gt/deed.en", + "cc-by-sa-3.0-heirs": "https://creativecommons.org/licenses/by-sa/3.0/deed.en", + "cc-by-sa-3.0-hk": "https://creativecommons.org/licenses/by-sa/3.0/hk/deed.en", + "cc-by-sa-3.0-hr": "https://creativecommons.org/licenses/by-sa/3.0/hr/deed.en", + "cc-by-sa-3.0-ie": "https://creativecommons.org/licenses/by-sa/3.0/ie/deed.en", + "cc-by-sa-3.0-igo": "https://creativecommons.org/licenses/by-sa/3.0/igo/deed.en", + "cc-by-sa-3.0-in": "https://creativecommons.org/", + "cc-by-sa-3.0-it": "https://creativecommons.org/licenses/by-sa/3.0/it/deed.en", + "cc-by-sa-3.0-lu": "https://creativecommons.org/licenses/by-sa/3.0/lu/deed.en", + "cc-by-sa-3.0-nl": "https://creativecommons.org/licenses/by-sa/3.0/nl/deed.en", + "cc-by-sa-3.0-no": "https://creativecommons.org/licenses/by-sa/3.0/no/deed.en", + "cc-by-sa-3.0-nz": "https://creativecommons.org/licenses/by-sa/3.0/nz/deed.en", + "cc-by-sa-3.0-ph": "https://creativecommons.org/licenses/by-sa/3.0/ph/deed.en", + "cc-by-sa-3.0-pl": "https://creativecommons.org/licenses/by-sa/3.0/pl/deed.en", + "cc-by-sa-3.0-pr": "https://creativecommons.org/licenses/by-sa/3.0/pr/deed.en", + "cc-by-sa-3.0-pt": "https://creativecommons.org/licenses/by-sa/3.0/pt/deed.en", + "cc-by-sa-3.0-ro": "https://creativecommons.org/licenses/by-sa/3.0/ro/deed.en", + "cc-by-sa-3.0-rs": "https://creativecommons.org/licenses/by-sa/3.0/rs/deed.en", + "cc-by-sa-3.0-sg": "https://creativecommons.org/licenses/by-sa/3.0/sg/deed.en", + "cc-by-sa-3.0-th": "https://creativecommons.org/licenses/by-sa/3.0/th/deed.en", + "cc-by-sa-3.0-tw": "https://creativecommons.org/licenses/by-sa/3.0/tw/deed.en", + "cc-by-sa-3.0-ug": "https://creativecommons.org/licenses/by-sa/3.0/ug/deed.en", + "cc-by-sa-3.0-us": "https://creativecommons.org/licenses/by-sa/3.0/us/deed.en", + "cc-by-sa-3.0-vn": "https://creativecommons.org/licenses/by-sa/3.0/vn/deed.en", + "cc-by-sa-3.0-za": "https://creativecommons.org/" + } +} + +},{}],55:[function(require,module,exports){ +/** + * @licence GNU GPL v3 + * @author Addshore + */ +'use strict'; + +var $ = require( 'jquery' ), + cookie = require( 'cookie' ), + config = require( './config.json' ), + piwikUrl = 'https://' + window.location.host + config.piwikDir, + piwik = require( 'piwik' ).setup( piwikUrl ); + +/** + * Tracking Handler. + * @constructor + */ +var Tracking = function() { + this._cookieName = 'filereuseuser'; + // 1 day + this._cookieExpiryDays = 60 * 24; + this._piwikSiteId = config.piwikSiteId; +}; + +$.extend( Tracking.prototype, { + + /** + * @type {string} + */ + _cookieName: null, + + /** + * @type {int} + */ + _cookieExpiryDays: null, + + /** + * @type {int} + */ + _piwikSiteId: null, + + /** + * Track an event to piwik if allowed by the user + * @param category + * @param action + * @param name + * @param value + */ + trackEvent: function( category, action, name, value ) { + if( !this.shouldTrack() ) { + return; + } + + var vars = { + idsite: this._piwikSiteId, + rec: 1, + url: window.location.href, + _id: this._getUserId(), + // jscs:disable + e_c: category, + e_a: action + // jscs:enable + }; + if( typeof name !== 'undefined' ) { + // jscs:disable + vars.e_n = name; + // jscs:enable + } + if( typeof value !== 'undefined' ) { + // jscs:disable + vars.e_v = value; + // jscs:enable + } + + piwik.track( + vars, + function( err, data ) { + if( err ) { + console.log( err ); + } + } + ); + }, + + /** + * Track a pageload to piwik if allowed by the user + * @param pageName + */ + trackPageLoad: function( pageName ) { + if( !this.shouldTrack() ) { + return; + } + piwik.track( + { + idsite: this._piwikSiteId, + rec: 1, + url: window.location.href, + // jscs:disable + action_name: pageName, + // jscs:enable + _id: this._getUserId() + }, + function( err, data ) { + if( err ) { + console.log( err ); + } + } + ); + }, + + /** + * @returns {Date} + * @private + */ + _getCookieExpiryDate: function( expiryDays ) { + var now = new Date(); + var time = now.getTime(); + // 3 months + var expireTime = time + ( expiryDays * 60000 ); + now.setTime( expireTime ); + return now; + }, + + /** + * @returns {*} + * @private + */ + _getCookie: function( cookieName ) { + var value = '; ' + document.cookie; + var parts = value.split( '; ' + cookieName + '=' ); + if( parts.length === 2 ) { + return parts.pop().split( ';' ).shift(); + } + return null; + }, + + /** + * @private + */ + _setUserIdCookie: function( userId ) { + document.cookie = cookie.serialize( + this._cookieName, + userId, + { 'expires': this._getCookieExpiryDate( this._cookieExpiryDays ) } + ); + }, + + /** + * @returns {string} + * @private + */ + _getUserId: function() { + var userId = this._getCookie( this._cookieName ); + if( userId !== null ) { + return userId; + } else { + userId = this._getFreshUserId(); + this._setUserIdCookie( userId ); + return userId; + } + }, + + /** + * @returns {string} + * @private + */ + _getFreshUserId: function() { + return Math.round( Math.pow( 36, 16 + 1 ) - Math.random() * Math.pow( 36, 16 ) ).toString( 36 ).slice( 1 ); + }, + + /** + * Set a cookie showing this user does not want to be tracked + */ + setDoNotTrackCookie: function() { + document.cookie = cookie.serialize( + this._cookieName + '_notrack', + 'notrack', + { 'expires': this._getCookieExpiryDate( 365 ) } + ); + }, + + /** + * Unset a cookie showing that this user now wants to be tracked again + */ + removeDoNotTrackCookie: function() { + document.cookie = cookie.serialize( + this._cookieName + '_notrack', + 'notrack', + { 'expires': this._getCookieExpiryDate( -365 ) } + ); + }, + + /** + * Check if we should track the current user + * @returns {boolean} + */ + shouldTrack: function() { + var noTrack = this._getCookie( this._cookieName + '_notrack' ); + return ( noTrack === null ); + } + +} ); + +module.exports = Tracking; + +},{"./config.json":54,"cookie":66,"jquery":138,"piwik":142}],56:[function(require,module,exports){ +'use strict'; + +var Handlebars = require( 'hbsfy/runtime' ), + Messages = require( './app/Messages' ); + +Handlebars.registerHelper( 'translate', function( s ) { + return Messages.t( s ); +} ); + +Handlebars.registerHelper( 'removeTarget', function( s ) { + return s.replace( /\s+target="_blank"/g, '' ); +} ); + +Handlebars.registerPartial( 'dialogueBubble', require( './app/templates/Dialogue.handlebars' ) ); +Handlebars.registerPartial( 'questionMark', require( './app/templates/QuestionMark.handlebars' ) ); + +},{"./app/Messages":24,"./app/templates/Dialogue.handlebars":32,"./app/templates/QuestionMark.handlebars":43,"hbsfy/runtime":133}],57:[function(require,module,exports){ +'use strict' + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength))) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + +},{}],58:[function(require,module,exports){ + +},{}],59:[function(require,module,exports){ +arguments[4][58][0].apply(exports,arguments) +},{"dup":58}],60:[function(require,module,exports){ +(function (Buffer){(function (){ +/*! + * The buffer module from node.js, for the browser. + * + * @author Feross Aboukhadijeh + * @license MIT + */ +/* eslint-disable no-proto */ + +'use strict' + +var base64 = require('base64-js') +var ieee754 = require('ieee754') + +exports.Buffer = Buffer +exports.SlowBuffer = SlowBuffer +exports.INSPECT_MAX_BYTES = 50 + +var K_MAX_LENGTH = 0x7fffffff +exports.kMaxLength = K_MAX_LENGTH + +/** + * If `Buffer.TYPED_ARRAY_SUPPORT`: + * === true Use Uint8Array implementation (fastest) + * === false Print warning and recommend using `buffer` v4.x which has an Object + * implementation (most compatible, even IE6) + * + * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, + * Opera 11.6+, iOS 4.2+. + * + * We report that the browser does not support typed arrays if the are not subclassable + * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support + * for __proto__ and has a buggy typed array implementation. + */ +Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport() + +if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && + typeof console.error === 'function') { + console.error( + 'This browser lacks typed array (Uint8Array) support which is required by ' + + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.' + ) +} + +function typedArraySupport () { + // Can typed array instances can be augmented? + try { + var arr = new Uint8Array(1) + arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } } + return arr.foo() === 42 + } catch (e) { + return false + } +} + +Object.defineProperty(Buffer.prototype, 'parent', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.buffer + } +}) + +Object.defineProperty(Buffer.prototype, 'offset', { + enumerable: true, + get: function () { + if (!Buffer.isBuffer(this)) return undefined + return this.byteOffset + } +}) + +function createBuffer (length) { + if (length > K_MAX_LENGTH) { + throw new RangeError('The value "' + length + '" is invalid for option "size"') + } + // Return an augmented `Uint8Array` instance + var buf = new Uint8Array(length) + buf.__proto__ = Buffer.prototype + return buf +} + +/** + * The Buffer constructor returns instances of `Uint8Array` that have their + * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of + * `Uint8Array`, so the returned instances will have all the node `Buffer` methods + * and the `Uint8Array` methods. Square bracket notation works as expected -- it + * returns a single octet. + * + * The `Uint8Array` prototype remains unmodified. + */ + +function Buffer (arg, encodingOrOffset, length) { + // Common case. + if (typeof arg === 'number') { + if (typeof encodingOrOffset === 'string') { + throw new TypeError( + 'The "string" argument must be of type string. Received type number' + ) + } + return allocUnsafe(arg) + } + return from(arg, encodingOrOffset, length) +} + +// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97 +if (typeof Symbol !== 'undefined' && Symbol.species != null && + Buffer[Symbol.species] === Buffer) { + Object.defineProperty(Buffer, Symbol.species, { + value: null, + configurable: true, + enumerable: false, + writable: false + }) +} + +Buffer.poolSize = 8192 // not used by this implementation + +function from (value, encodingOrOffset, length) { + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } + + if (ArrayBuffer.isView(value)) { + return fromArrayLike(value) + } + + if (value == null) { + throw TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) + } + + if (isInstance(value, ArrayBuffer) || + (value && isInstance(value.buffer, ArrayBuffer))) { + return fromArrayBuffer(value, encodingOrOffset, length) + } + + if (typeof value === 'number') { + throw new TypeError( + 'The "value" argument must not be of type number. Received type number' + ) + } + + var valueOf = value.valueOf && value.valueOf() + if (valueOf != null && valueOf !== value) { + return Buffer.from(valueOf, encodingOrOffset, length) + } + + var b = fromObject(value) + if (b) return b + + if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && + typeof value[Symbol.toPrimitive] === 'function') { + return Buffer.from( + value[Symbol.toPrimitive]('string'), encodingOrOffset, length + ) + } + + throw new TypeError( + 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + + 'or Array-like Object. Received type ' + (typeof value) + ) +} + +/** + * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError + * if value is a number. + * Buffer.from(str[, encoding]) + * Buffer.from(array) + * Buffer.from(buffer) + * Buffer.from(arrayBuffer[, byteOffset[, length]]) + **/ +Buffer.from = function (value, encodingOrOffset, length) { + return from(value, encodingOrOffset, length) +} + +// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: +// https://github.com/feross/buffer/pull/148 +Buffer.prototype.__proto__ = Uint8Array.prototype +Buffer.__proto__ = Uint8Array + +function assertSize (size) { + if (typeof size !== 'number') { + throw new TypeError('"size" argument must be of type number') + } else if (size < 0) { + throw new RangeError('The value "' + size + '" is invalid for option "size"') + } +} + +function alloc (size, fill, encoding) { + assertSize(size) + if (size <= 0) { + return createBuffer(size) + } + if (fill !== undefined) { + // Only pay attention to encoding if it's a string. This + // prevents accidentally sending in a number that would + // be interpretted as a start offset. + return typeof encoding === 'string' + ? createBuffer(size).fill(fill, encoding) + : createBuffer(size).fill(fill) + } + return createBuffer(size) +} + +/** + * Creates a new filled Buffer instance. + * alloc(size[, fill[, encoding]]) + **/ +Buffer.alloc = function (size, fill, encoding) { + return alloc(size, fill, encoding) +} + +function allocUnsafe (size) { + assertSize(size) + return createBuffer(size < 0 ? 0 : checked(size) | 0) +} + +/** + * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. + * */ +Buffer.allocUnsafe = function (size) { + return allocUnsafe(size) +} +/** + * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. + */ +Buffer.allocUnsafeSlow = function (size) { + return allocUnsafe(size) +} + +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } + + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + + var length = byteLength(string, encoding) | 0 + var buf = createBuffer(length) + + var actual = buf.write(string, encoding) + + if (actual !== length) { + // Writing a hex string, for example, that contains invalid characters will + // cause everything after the first invalid character to be ignored. (e.g. + // 'abxxcd' will be treated as 'ab') + buf = buf.slice(0, actual) + } + + return buf +} + +function fromArrayLike (array) { + var length = array.length < 0 ? 0 : checked(array.length) | 0 + var buf = createBuffer(length) + for (var i = 0; i < length; i += 1) { + buf[i] = array[i] & 255 + } + return buf +} + +function fromArrayBuffer (array, byteOffset, length) { + if (byteOffset < 0 || array.byteLength < byteOffset) { + throw new RangeError('"offset" is outside of buffer bounds') + } + + if (array.byteLength < byteOffset + (length || 0)) { + throw new RangeError('"length" is outside of buffer bounds') + } + + var buf + if (byteOffset === undefined && length === undefined) { + buf = new Uint8Array(array) + } else if (length === undefined) { + buf = new Uint8Array(array, byteOffset) + } else { + buf = new Uint8Array(array, byteOffset, length) + } + + // Return an augmented `Uint8Array` instance + buf.__proto__ = Buffer.prototype + return buf +} + +function fromObject (obj) { + if (Buffer.isBuffer(obj)) { + var len = checked(obj.length) | 0 + var buf = createBuffer(len) + + if (buf.length === 0) { + return buf + } + + obj.copy(buf, 0, 0, len) + return buf + } + + if (obj.length !== undefined) { + if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { + return createBuffer(0) + } + return fromArrayLike(obj) + } + + if (obj.type === 'Buffer' && Array.isArray(obj.data)) { + return fromArrayLike(obj.data) + } +} + +function checked (length) { + // Note: cannot use `length < K_MAX_LENGTH` here because that fails when + // length is NaN (which is otherwise coerced to zero.) + if (length >= K_MAX_LENGTH) { + throw new RangeError('Attempt to allocate Buffer larger than maximum ' + + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes') + } + return length | 0 +} + +function SlowBuffer (length) { + if (+length != length) { // eslint-disable-line eqeqeq + length = 0 + } + return Buffer.alloc(+length) +} + +Buffer.isBuffer = function isBuffer (b) { + return b != null && b._isBuffer === true && + b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false +} + +Buffer.compare = function compare (a, b) { + if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength) + if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength) + if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { + throw new TypeError( + 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' + ) + } + + if (a === b) return 0 + + var x = a.length + var y = b.length + + for (var i = 0, len = Math.min(x, y); i < len; ++i) { + if (a[i] !== b[i]) { + x = a[i] + y = b[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +Buffer.isEncoding = function isEncoding (encoding) { + switch (String(encoding).toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'latin1': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return true + default: + return false + } +} + +Buffer.concat = function concat (list, length) { + if (!Array.isArray(list)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + + if (list.length === 0) { + return Buffer.alloc(0) + } + + var i + if (length === undefined) { + length = 0 + for (i = 0; i < list.length; ++i) { + length += list[i].length + } + } + + var buffer = Buffer.allocUnsafe(length) + var pos = 0 + for (i = 0; i < list.length; ++i) { + var buf = list[i] + if (isInstance(buf, Uint8Array)) { + buf = Buffer.from(buf) + } + if (!Buffer.isBuffer(buf)) { + throw new TypeError('"list" argument must be an Array of Buffers') + } + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +function byteLength (string, encoding) { + if (Buffer.isBuffer(string)) { + return string.length + } + if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { + return string.byteLength + } + if (typeof string !== 'string') { + throw new TypeError( + 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + + 'Received type ' + typeof string + ) + } + + var len = string.length + var mustMatch = (arguments.length > 2 && arguments[2] === true) + if (!mustMatch && len === 0) return 0 + + // Use a for loop to avoid recursion + var loweredCase = false + for (;;) { + switch (encoding) { + case 'ascii': + case 'latin1': + case 'binary': + return len + case 'utf8': + case 'utf-8': + return utf8ToBytes(string).length + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return len * 2 + case 'hex': + return len >>> 1 + case 'base64': + return base64ToBytes(string).length + default: + if (loweredCase) { + return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8 + } + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} +Buffer.byteLength = byteLength + +function slowToString (encoding, start, end) { + var loweredCase = false + + // No need to verify that "this.length <= MAX_UINT32" since it's a read-only + // property of a typed array. + + // This behaves neither like String nor Uint8Array in that we set start/end + // to their upper/lower bounds if the value passed is out of range. + // undefined is handled specially as per ECMA-262 6th Edition, + // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. + if (start === undefined || start < 0) { + start = 0 + } + // Return early if start > this.length. Done here to prevent potential uint32 + // coercion fail below. + if (start > this.length) { + return '' + } + + if (end === undefined || end > this.length) { + end = this.length + } + + if (end <= 0) { + return '' + } + + // Force coersion to uint32. This will also coerce falsey/NaN values to 0. + end >>>= 0 + start >>>= 0 + + if (end <= start) { + return '' + } + + if (!encoding) encoding = 'utf8' + + while (true) { + switch (encoding) { + case 'hex': + return hexSlice(this, start, end) + + case 'utf8': + case 'utf-8': + return utf8Slice(this, start, end) + + case 'ascii': + return asciiSlice(this, start, end) + + case 'latin1': + case 'binary': + return latin1Slice(this, start, end) + + case 'base64': + return base64Slice(this, start, end) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return utf16leSlice(this, start, end) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = (encoding + '').toLowerCase() + loweredCase = true + } + } +} + +// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) +// to detect a Buffer instance. It's not possible to use `instanceof Buffer` +// reliably in a browserify context because there could be multiple different +// copies of the 'buffer' package in use. This method works even for Buffer +// instances that were created from another copy of the `buffer` package. +// See: https://github.com/feross/buffer/issues/154 +Buffer.prototype._isBuffer = true + +function swap (b, n, m) { + var i = b[n] + b[n] = b[m] + b[m] = i +} + +Buffer.prototype.swap16 = function swap16 () { + var len = this.length + if (len % 2 !== 0) { + throw new RangeError('Buffer size must be a multiple of 16-bits') + } + for (var i = 0; i < len; i += 2) { + swap(this, i, i + 1) + } + return this +} + +Buffer.prototype.swap32 = function swap32 () { + var len = this.length + if (len % 4 !== 0) { + throw new RangeError('Buffer size must be a multiple of 32-bits') + } + for (var i = 0; i < len; i += 4) { + swap(this, i, i + 3) + swap(this, i + 1, i + 2) + } + return this +} + +Buffer.prototype.swap64 = function swap64 () { + var len = this.length + if (len % 8 !== 0) { + throw new RangeError('Buffer size must be a multiple of 64-bits') + } + for (var i = 0; i < len; i += 8) { + swap(this, i, i + 7) + swap(this, i + 1, i + 6) + swap(this, i + 2, i + 5) + swap(this, i + 3, i + 4) + } + return this +} + +Buffer.prototype.toString = function toString () { + var length = this.length + if (length === 0) return '' + if (arguments.length === 0) return utf8Slice(this, 0, length) + return slowToString.apply(this, arguments) +} + +Buffer.prototype.toLocaleString = Buffer.prototype.toString + +Buffer.prototype.equals = function equals (b) { + if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer') + if (this === b) return true + return Buffer.compare(this, b) === 0 +} + +Buffer.prototype.inspect = function inspect () { + var str = '' + var max = exports.INSPECT_MAX_BYTES + str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim() + if (this.length > max) str += ' ... ' + return '' +} + +Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) { + if (isInstance(target, Uint8Array)) { + target = Buffer.from(target, target.offset, target.byteLength) + } + if (!Buffer.isBuffer(target)) { + throw new TypeError( + 'The "target" argument must be one of type Buffer or Uint8Array. ' + + 'Received type ' + (typeof target) + ) + } + + if (start === undefined) { + start = 0 + } + if (end === undefined) { + end = target ? target.length : 0 + } + if (thisStart === undefined) { + thisStart = 0 + } + if (thisEnd === undefined) { + thisEnd = this.length + } + + if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { + throw new RangeError('out of range index') + } + + if (thisStart >= thisEnd && start >= end) { + return 0 + } + if (thisStart >= thisEnd) { + return -1 + } + if (start >= end) { + return 1 + } + + start >>>= 0 + end >>>= 0 + thisStart >>>= 0 + thisEnd >>>= 0 + + if (this === target) return 0 + + var x = thisEnd - thisStart + var y = end - start + var len = Math.min(x, y) + + var thisCopy = this.slice(thisStart, thisEnd) + var targetCopy = target.slice(start, end) + + for (var i = 0; i < len; ++i) { + if (thisCopy[i] !== targetCopy[i]) { + x = thisCopy[i] + y = targetCopy[i] + break + } + } + + if (x < y) return -1 + if (y < x) return 1 + return 0 +} + +// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, +// OR the last index of `val` in `buffer` at offset <= `byteOffset`. +// +// Arguments: +// - buffer - a Buffer to search +// - val - a string, Buffer, or number +// - byteOffset - an index into `buffer`; will be clamped to an int32 +// - encoding - an optional encoding, relevant is val is a string +// - dir - true for indexOf, false for lastIndexOf +function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) { + // Empty buffer means no match + if (buffer.length === 0) return -1 + + // Normalize byteOffset + if (typeof byteOffset === 'string') { + encoding = byteOffset + byteOffset = 0 + } else if (byteOffset > 0x7fffffff) { + byteOffset = 0x7fffffff + } else if (byteOffset < -0x80000000) { + byteOffset = -0x80000000 + } + byteOffset = +byteOffset // Coerce to Number. + if (numberIsNaN(byteOffset)) { + // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer + byteOffset = dir ? 0 : (buffer.length - 1) + } + + // Normalize byteOffset: negative offsets start from the end of the buffer + if (byteOffset < 0) byteOffset = buffer.length + byteOffset + if (byteOffset >= buffer.length) { + if (dir) return -1 + else byteOffset = buffer.length - 1 + } else if (byteOffset < 0) { + if (dir) byteOffset = 0 + else return -1 + } + + // Normalize val + if (typeof val === 'string') { + val = Buffer.from(val, encoding) + } + + // Finally, search either indexOf (if dir is true) or lastIndexOf + if (Buffer.isBuffer(val)) { + // Special case: looking for empty string/buffer always fails + if (val.length === 0) { + return -1 + } + return arrayIndexOf(buffer, val, byteOffset, encoding, dir) + } else if (typeof val === 'number') { + val = val & 0xFF // Search for a byte value [0-255] + if (typeof Uint8Array.prototype.indexOf === 'function') { + if (dir) { + return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset) + } else { + return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset) + } + } + return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir) + } + + throw new TypeError('val must be string, number or Buffer') +} + +function arrayIndexOf (arr, val, byteOffset, encoding, dir) { + var indexSize = 1 + var arrLength = arr.length + var valLength = val.length + + if (encoding !== undefined) { + encoding = String(encoding).toLowerCase() + if (encoding === 'ucs2' || encoding === 'ucs-2' || + encoding === 'utf16le' || encoding === 'utf-16le') { + if (arr.length < 2 || val.length < 2) { + return -1 + } + indexSize = 2 + arrLength /= 2 + valLength /= 2 + byteOffset /= 2 + } + } + + function read (buf, i) { + if (indexSize === 1) { + return buf[i] + } else { + return buf.readUInt16BE(i * indexSize) + } + } + + var i + if (dir) { + var foundIndex = -1 + for (i = byteOffset; i < arrLength; i++) { + if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { + if (foundIndex === -1) foundIndex = i + if (i - foundIndex + 1 === valLength) return foundIndex * indexSize + } else { + if (foundIndex !== -1) i -= i - foundIndex + foundIndex = -1 + } + } + } else { + if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength + for (i = byteOffset; i >= 0; i--) { + var found = true + for (var j = 0; j < valLength; j++) { + if (read(arr, i + j) !== read(val, j)) { + found = false + break + } + } + if (found) return i + } + } + + return -1 +} + +Buffer.prototype.includes = function includes (val, byteOffset, encoding) { + return this.indexOf(val, byteOffset, encoding) !== -1 +} + +Buffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, true) +} + +Buffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) { + return bidirectionalIndexOf(this, val, byteOffset, encoding, false) +} + +function hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + var strLen = string.length + + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; ++i) { + var parsed = parseInt(string.substr(i * 2, 2), 16) + if (numberIsNaN(parsed)) return i + buf[offset + i] = parsed + } + return i +} + +function utf8Write (buf, string, offset, length) { + return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length) +} + +function asciiWrite (buf, string, offset, length) { + return blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function latin1Write (buf, string, offset, length) { + return asciiWrite(buf, string, offset, length) +} + +function base64Write (buf, string, offset, length) { + return blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function ucs2Write (buf, string, offset, length) { + return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length) +} + +Buffer.prototype.write = function write (string, offset, length, encoding) { + // Buffer#write(string) + if (offset === undefined) { + encoding = 'utf8' + length = this.length + offset = 0 + // Buffer#write(string, encoding) + } else if (length === undefined && typeof offset === 'string') { + encoding = offset + length = this.length + offset = 0 + // Buffer#write(string, offset[, length][, encoding]) + } else if (isFinite(offset)) { + offset = offset >>> 0 + if (isFinite(length)) { + length = length >>> 0 + if (encoding === undefined) encoding = 'utf8' + } else { + encoding = length + length = undefined + } + } else { + throw new Error( + 'Buffer.write(string, encoding, offset[, length]) is no longer supported' + ) + } + + var remaining = this.length - offset + if (length === undefined || length > remaining) length = remaining + + if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) { + throw new RangeError('Attempt to write outside buffer bounds') + } + + if (!encoding) encoding = 'utf8' + + var loweredCase = false + for (;;) { + switch (encoding) { + case 'hex': + return hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return utf8Write(this, string, offset, length) + + case 'ascii': + return asciiWrite(this, string, offset, length) + + case 'latin1': + case 'binary': + return latin1Write(this, string, offset, length) + + case 'base64': + // Warning: maxLength not taken into account in base64Write + return base64Write(this, string, offset, length) + + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return ucs2Write(this, string, offset, length) + + default: + if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding) + encoding = ('' + encoding).toLowerCase() + loweredCase = true + } + } +} + +Buffer.prototype.toJSON = function toJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +function base64Slice (buf, start, end) { + if (start === 0 && end === buf.length) { + return base64.fromByteArray(buf) + } else { + return base64.fromByteArray(buf.slice(start, end)) + } +} + +function utf8Slice (buf, start, end) { + end = Math.min(buf.length, end) + var res = [] + + var i = start + while (i < end) { + var firstByte = buf[i] + var codePoint = null + var bytesPerSequence = (firstByte > 0xEF) ? 4 + : (firstByte > 0xDF) ? 3 + : (firstByte > 0xBF) ? 2 + : 1 + + if (i + bytesPerSequence <= end) { + var secondByte, thirdByte, fourthByte, tempCodePoint + + switch (bytesPerSequence) { + case 1: + if (firstByte < 0x80) { + codePoint = firstByte + } + break + case 2: + secondByte = buf[i + 1] + if ((secondByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F) + if (tempCodePoint > 0x7F) { + codePoint = tempCodePoint + } + } + break + case 3: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F) + if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { + codePoint = tempCodePoint + } + } + break + case 4: + secondByte = buf[i + 1] + thirdByte = buf[i + 2] + fourthByte = buf[i + 3] + if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { + tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F) + if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { + codePoint = tempCodePoint + } + } + } + } + + if (codePoint === null) { + // we did not generate a valid codePoint so insert a + // replacement char (U+FFFD) and advance only 1 byte + codePoint = 0xFFFD + bytesPerSequence = 1 + } else if (codePoint > 0xFFFF) { + // encode to utf16 (surrogate pair dance) + codePoint -= 0x10000 + res.push(codePoint >>> 10 & 0x3FF | 0xD800) + codePoint = 0xDC00 | codePoint & 0x3FF + } + + res.push(codePoint) + i += bytesPerSequence + } + + return decodeCodePointsArray(res) +} + +// Based on http://stackoverflow.com/a/22747272/680742, the browser with +// the lowest limit is Chrome, with 0x10000 args. +// We go 1 magnitude less, for safety +var MAX_ARGUMENTS_LENGTH = 0x1000 + +function decodeCodePointsArray (codePoints) { + var len = codePoints.length + if (len <= MAX_ARGUMENTS_LENGTH) { + return String.fromCharCode.apply(String, codePoints) // avoid extra slice() + } + + // Decode in chunks to avoid "call stack size exceeded". + var res = '' + var i = 0 + while (i < len) { + res += String.fromCharCode.apply( + String, + codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH) + ) + } + return res +} + +function asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i] & 0x7F) + } + return ret +} + +function latin1Slice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; ++i) { + ret += String.fromCharCode(buf[i]) + } + return ret +} + +function hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; ++i) { + out += toHex(buf[i]) + } + return out +} + +function utf16leSlice (buf, start, end) { + var bytes = buf.slice(start, end) + var res = '' + for (var i = 0; i < bytes.length; i += 2) { + res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256)) + } + return res +} + +Buffer.prototype.slice = function slice (start, end) { + var len = this.length + start = ~~start + end = end === undefined ? len : ~~end + + if (start < 0) { + start += len + if (start < 0) start = 0 + } else if (start > len) { + start = len + } + + if (end < 0) { + end += len + if (end < 0) end = 0 + } else if (end > len) { + end = len + } + + if (end < start) end = start + + var newBuf = this.subarray(start, end) + // Return an augmented `Uint8Array` instance + newBuf.__proto__ = Buffer.prototype + return newBuf +} + +/* + * Need to make sure that buffer isn't trying to write out of bounds. + */ +function checkOffset (offset, ext, length) { + if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint') + if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length') +} + +Buffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + + return val +} + +Buffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + checkOffset(offset, byteLength, this.length) + } + + var val = this[offset + --byteLength] + var mul = 1 + while (byteLength > 0 && (mul *= 0x100)) { + val += this[offset + --byteLength] * mul + } + + return val +} + +Buffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + return this[offset] +} + +Buffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return this[offset] | (this[offset + 1] << 8) +} + +Buffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + return (this[offset] << 8) | this[offset + 1] +} + +Buffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return ((this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16)) + + (this[offset + 3] * 0x1000000) +} + +Buffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] * 0x1000000) + + ((this[offset + 1] << 16) | + (this[offset + 2] << 8) | + this[offset + 3]) +} + +Buffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var val = this[offset] + var mul = 1 + var i = 0 + while (++i < byteLength && (mul *= 0x100)) { + val += this[offset + i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) { + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) checkOffset(offset, byteLength, this.length) + + var i = byteLength + var mul = 1 + var val = this[offset + --i] + while (i > 0 && (mul *= 0x100)) { + val += this[offset + --i] * mul + } + mul *= 0x80 + + if (val >= mul) val -= Math.pow(2, 8 * byteLength) + + return val +} + +Buffer.prototype.readInt8 = function readInt8 (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 1, this.length) + if (!(this[offset] & 0x80)) return (this[offset]) + return ((0xff - this[offset] + 1) * -1) +} + +Buffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset] | (this[offset + 1] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 2, this.length) + var val = this[offset + 1] | (this[offset] << 8) + return (val & 0x8000) ? val | 0xFFFF0000 : val +} + +Buffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset]) | + (this[offset + 1] << 8) | + (this[offset + 2] << 16) | + (this[offset + 3] << 24) +} + +Buffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + + return (this[offset] << 24) | + (this[offset + 1] << 16) | + (this[offset + 2] << 8) | + (this[offset + 3]) +} + +Buffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, true, 23, 4) +} + +Buffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 4, this.length) + return ieee754.read(this, offset, false, 23, 4) +} + +Buffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, true, 52, 8) +} + +Buffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) { + offset = offset >>> 0 + if (!noAssert) checkOffset(offset, 8, this.length) + return ieee754.read(this, offset, false, 52, 8) +} + +function checkInt (buf, value, offset, ext, max, min) { + if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance') + if (value > max || value < min) throw new RangeError('"value" argument is out of bounds') + if (offset + ext > buf.length) throw new RangeError('Index out of range') +} + +Buffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var mul = 1 + var i = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + byteLength = byteLength >>> 0 + if (!noAssert) { + var maxBytes = Math.pow(2, 8 * byteLength) - 1 + checkInt(this, value, offset, byteLength, maxBytes, 0) + } + + var i = byteLength - 1 + var mul = 1 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + this[offset + i] = (value / mul) & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0) + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset + 3] = (value >>> 24) + this[offset + 2] = (value >>> 16) + this[offset + 1] = (value >>> 8) + this[offset] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0) + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +Buffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = 0 + var mul = 1 + var sub = 0 + this[offset] = value & 0xFF + while (++i < byteLength && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + var limit = Math.pow(2, (8 * byteLength) - 1) + + checkInt(this, value, offset, byteLength, limit - 1, -limit) + } + + var i = byteLength - 1 + var mul = 1 + var sub = 0 + this[offset + i] = value & 0xFF + while (--i >= 0 && (mul *= 0x100)) { + if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { + sub = 1 + } + this[offset + i] = ((value / mul) >> 0) - sub & 0xFF + } + + return offset + byteLength +} + +Buffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80) + if (value < 0) value = 0xff + value + 1 + this[offset] = (value & 0xff) + return offset + 1 +} + +Buffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + return offset + 2 +} + +Buffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000) + this[offset] = (value >>> 8) + this[offset + 1] = (value & 0xff) + return offset + 2 +} + +Buffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + this[offset] = (value & 0xff) + this[offset + 1] = (value >>> 8) + this[offset + 2] = (value >>> 16) + this[offset + 3] = (value >>> 24) + return offset + 4 +} + +Buffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000) + if (value < 0) value = 0xffffffff + value + 1 + this[offset] = (value >>> 24) + this[offset + 1] = (value >>> 16) + this[offset + 2] = (value >>> 8) + this[offset + 3] = (value & 0xff) + return offset + 4 +} + +function checkIEEE754 (buf, value, offset, ext, max, min) { + if (offset + ext > buf.length) throw new RangeError('Index out of range') + if (offset < 0) throw new RangeError('Index out of range') +} + +function writeFloat (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + ieee754.write(buf, value, offset, littleEndian, 23, 4) + return offset + 4 +} + +Buffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) { + return writeFloat(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) { + return writeFloat(this, value, offset, false, noAssert) +} + +function writeDouble (buf, value, offset, littleEndian, noAssert) { + value = +value + offset = offset >>> 0 + if (!noAssert) { + checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + ieee754.write(buf, value, offset, littleEndian, 52, 8) + return offset + 8 +} + +Buffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) { + return writeDouble(this, value, offset, true, noAssert) +} + +Buffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) { + return writeDouble(this, value, offset, false, noAssert) +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +Buffer.prototype.copy = function copy (target, targetStart, start, end) { + if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer') + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (targetStart >= target.length) targetStart = target.length + if (!targetStart) targetStart = 0 + if (end > 0 && end < start) end = start + + // Copy 0 bytes; we're done + if (end === start) return 0 + if (target.length === 0 || this.length === 0) return 0 + + // Fatal error conditions + if (targetStart < 0) { + throw new RangeError('targetStart out of bounds') + } + if (start < 0 || start >= this.length) throw new RangeError('Index out of range') + if (end < 0) throw new RangeError('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) end = this.length + if (target.length - targetStart < end - start) { + end = target.length - targetStart + start + } + + var len = end - start + + if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { + // Use built-in when available, missing from IE11 + this.copyWithin(targetStart, start, end) + } else if (this === target && start < targetStart && targetStart < end) { + // descending copy from end + for (var i = len - 1; i >= 0; --i) { + target[i + targetStart] = this[i + start] + } + } else { + Uint8Array.prototype.set.call( + target, + this.subarray(start, end), + targetStart + ) + } + + return len +} + +// Usage: +// buffer.fill(number[, offset[, end]]) +// buffer.fill(buffer[, offset[, end]]) +// buffer.fill(string[, offset[, end]][, encoding]) +Buffer.prototype.fill = function fill (val, start, end, encoding) { + // Handle string cases: + if (typeof val === 'string') { + if (typeof start === 'string') { + encoding = start + start = 0 + end = this.length + } else if (typeof end === 'string') { + encoding = end + end = this.length + } + if (encoding !== undefined && typeof encoding !== 'string') { + throw new TypeError('encoding must be a string') + } + if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { + throw new TypeError('Unknown encoding: ' + encoding) + } + if (val.length === 1) { + var code = val.charCodeAt(0) + if ((encoding === 'utf8' && code < 128) || + encoding === 'latin1') { + // Fast path: If `val` fits into a single byte, use that numeric value. + val = code + } + } + } else if (typeof val === 'number') { + val = val & 255 + } + + // Invalid ranges are not set to a default, so can range check early. + if (start < 0 || this.length < start || this.length < end) { + throw new RangeError('Out of range index') + } + + if (end <= start) { + return this + } + + start = start >>> 0 + end = end === undefined ? this.length : end >>> 0 + + if (!val) val = 0 + + var i + if (typeof val === 'number') { + for (i = start; i < end; ++i) { + this[i] = val + } + } else { + var bytes = Buffer.isBuffer(val) + ? val + : Buffer.from(val, encoding) + var len = bytes.length + if (len === 0) { + throw new TypeError('The value "' + val + + '" is invalid for argument "value"') + } + for (i = 0; i < end - start; ++i) { + this[i + start] = bytes[i % len] + } + } + + return this +} + +// HELPER FUNCTIONS +// ================ + +var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g + +function base64clean (str) { + // Node takes equal signs as end of the Base64 encoding + str = str.split('=')[0] + // Node strips out invalid characters like \n and \t from the string, base64-js does not + str = str.trim().replace(INVALID_BASE64_RE, '') + // Node converts strings with length < 2 to '' + if (str.length < 2) return '' + // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not + while (str.length % 4 !== 0) { + str = str + '=' + } + return str +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (string, units) { + units = units || Infinity + var codePoint + var length = string.length + var leadSurrogate = null + var bytes = [] + + for (var i = 0; i < length; ++i) { + codePoint = string.charCodeAt(i) + + // is surrogate component + if (codePoint > 0xD7FF && codePoint < 0xE000) { + // last char was a lead + if (!leadSurrogate) { + // no lead yet + if (codePoint > 0xDBFF) { + // unexpected trail + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } else if (i + 1 === length) { + // unpaired lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + continue + } + + // valid lead + leadSurrogate = codePoint + + continue + } + + // 2 leads in a row + if (codePoint < 0xDC00) { + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + leadSurrogate = codePoint + continue + } + + // valid surrogate pair + codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000 + } else if (leadSurrogate) { + // valid bmp char, but last char was a lead + if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD) + } + + leadSurrogate = null + + // encode utf8 + if (codePoint < 0x80) { + if ((units -= 1) < 0) break + bytes.push(codePoint) + } else if (codePoint < 0x800) { + if ((units -= 2) < 0) break + bytes.push( + codePoint >> 0x6 | 0xC0, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x10000) { + if ((units -= 3) < 0) break + bytes.push( + codePoint >> 0xC | 0xE0, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else if (codePoint < 0x110000) { + if ((units -= 4) < 0) break + bytes.push( + codePoint >> 0x12 | 0xF0, + codePoint >> 0xC & 0x3F | 0x80, + codePoint >> 0x6 & 0x3F | 0x80, + codePoint & 0x3F | 0x80 + ) + } else { + throw new Error('Invalid code point') + } + } + + return bytes +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + return byteArray +} + +function utf16leToBytes (str, units) { + var c, hi, lo + var byteArray = [] + for (var i = 0; i < str.length; ++i) { + if ((units -= 2) < 0) break + + c = str.charCodeAt(i) + hi = c >> 8 + lo = c % 256 + byteArray.push(lo) + byteArray.push(hi) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(base64clean(str)) +} + +function blitBuffer (src, dst, offset, length) { + for (var i = 0; i < length; ++i) { + if ((i + offset >= dst.length) || (i >= src.length)) break + dst[i + offset] = src[i] + } + return i +} + +// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass +// the `instanceof` check but they should be treated as of that type. +// See: https://github.com/feross/buffer/issues/166 +function isInstance (obj, type) { + return obj instanceof type || + (obj != null && obj.constructor != null && obj.constructor.name != null && + obj.constructor.name === type.name) +} +function numberIsNaN (obj) { + // For IE11 support + return obj !== obj // eslint-disable-line no-self-compare +} + +}).call(this)}).call(this,require("buffer").Buffer) +},{"base64-js":57,"buffer":60,"ieee754":136}],61:[function(require,module,exports){ +module.exports = { + "100": "Continue", + "101": "Switching Protocols", + "102": "Processing", + "200": "OK", + "201": "Created", + "202": "Accepted", + "203": "Non-Authoritative Information", + "204": "No Content", + "205": "Reset Content", + "206": "Partial Content", + "207": "Multi-Status", + "208": "Already Reported", + "226": "IM Used", + "300": "Multiple Choices", + "301": "Moved Permanently", + "302": "Found", + "303": "See Other", + "304": "Not Modified", + "305": "Use Proxy", + "307": "Temporary Redirect", + "308": "Permanent Redirect", + "400": "Bad Request", + "401": "Unauthorized", + "402": "Payment Required", + "403": "Forbidden", + "404": "Not Found", + "405": "Method Not Allowed", + "406": "Not Acceptable", + "407": "Proxy Authentication Required", + "408": "Request Timeout", + "409": "Conflict", + "410": "Gone", + "411": "Length Required", + "412": "Precondition Failed", + "413": "Payload Too Large", + "414": "URI Too Long", + "415": "Unsupported Media Type", + "416": "Range Not Satisfiable", + "417": "Expectation Failed", + "418": "I'm a teapot", + "421": "Misdirected Request", + "422": "Unprocessable Entity", + "423": "Locked", + "424": "Failed Dependency", + "425": "Unordered Collection", + "426": "Upgrade Required", + "428": "Precondition Required", + "429": "Too Many Requests", + "431": "Request Header Fields Too Large", + "451": "Unavailable For Legal Reasons", + "500": "Internal Server Error", + "501": "Not Implemented", + "502": "Bad Gateway", + "503": "Service Unavailable", + "504": "Gateway Timeout", + "505": "HTTP Version Not Supported", + "506": "Variant Also Negotiates", + "507": "Insufficient Storage", + "508": "Loop Detected", + "509": "Bandwidth Limit Exceeded", + "510": "Not Extended", + "511": "Network Authentication Required" +} + +},{}],62:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var callBind = require('./'); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + +},{"./":63,"get-intrinsic":81}],63:[function(require,module,exports){ +'use strict'; + +var bind = require('function-bind'); +var GetIntrinsic = require('get-intrinsic'); +var setFunctionLength = require('set-function-length'); + +var $TypeError = require('es-errors/type'); +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $defineProperty = require('es-define-property'); +var $max = GetIntrinsic('%Math.max%'); + +module.exports = function callBind(originalFunction) { + if (typeof originalFunction !== 'function') { + throw new $TypeError('a function is required'); + } + var func = $reflectApply(bind, $call, arguments); + return setFunctionLength( + func, + 1 + $max(0, originalFunction.length - (arguments.length - 1)), + true + ); +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + +},{"es-define-property":70,"es-errors/type":76,"function-bind":80,"get-intrinsic":81,"set-function-length":156}],64:[function(require,module,exports){ +(function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', 'select'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('select')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.select); + global.clipboardAction = mod.exports; + } +})(this, function (module, _select) { + 'use strict'; + + var _select2 = _interopRequireDefault(_select); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + var ClipboardAction = function () { + /** + * @param {Object} options + */ + function ClipboardAction(options) { + _classCallCheck(this, ClipboardAction); + + this.resolveOptions(options); + this.initSelection(); + } + + /** + * Defines base properties passed from constructor. + * @param {Object} options + */ + + + _createClass(ClipboardAction, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = options.action; + this.container = options.container; + this.emitter = options.emitter; + this.target = options.target; + this.text = options.text; + this.trigger = options.trigger; + + this.selectedText = ''; + } + }, { + key: 'initSelection', + value: function initSelection() { + if (this.text) { + this.selectFake(); + } else if (this.target) { + this.selectTarget(); + } + } + }, { + key: 'selectFake', + value: function selectFake() { + var _this = this; + + var isRTL = document.documentElement.getAttribute('dir') == 'rtl'; + + this.removeFake(); + + this.fakeHandlerCallback = function () { + return _this.removeFake(); + }; + this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true; + + this.fakeElem = document.createElement('textarea'); + // Prevent zooming on iOS + this.fakeElem.style.fontSize = '12pt'; + // Reset box model + this.fakeElem.style.border = '0'; + this.fakeElem.style.padding = '0'; + this.fakeElem.style.margin = '0'; + // Move element out of screen horizontally + this.fakeElem.style.position = 'absolute'; + this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px'; + // Move element to the same position vertically + var yPosition = window.pageYOffset || document.documentElement.scrollTop; + this.fakeElem.style.top = yPosition + 'px'; + + this.fakeElem.setAttribute('readonly', ''); + this.fakeElem.value = this.text; + + this.container.appendChild(this.fakeElem); + + this.selectedText = (0, _select2.default)(this.fakeElem); + this.copyText(); + } + }, { + key: 'removeFake', + value: function removeFake() { + if (this.fakeHandler) { + this.container.removeEventListener('click', this.fakeHandlerCallback); + this.fakeHandler = null; + this.fakeHandlerCallback = null; + } + + if (this.fakeElem) { + this.container.removeChild(this.fakeElem); + this.fakeElem = null; + } + } + }, { + key: 'selectTarget', + value: function selectTarget() { + this.selectedText = (0, _select2.default)(this.target); + this.copyText(); + } + }, { + key: 'copyText', + value: function copyText() { + var succeeded = void 0; + + try { + succeeded = document.execCommand(this.action); + } catch (err) { + succeeded = false; + } + + this.handleResult(succeeded); + } + }, { + key: 'handleResult', + value: function handleResult(succeeded) { + this.emitter.emit(succeeded ? 'success' : 'error', { + action: this.action, + text: this.selectedText, + trigger: this.trigger, + clearSelection: this.clearSelection.bind(this) + }); + } + }, { + key: 'clearSelection', + value: function clearSelection() { + if (this.trigger) { + this.trigger.focus(); + } + + window.getSelection().removeAllRanges(); + } + }, { + key: 'destroy', + value: function destroy() { + this.removeFake(); + } + }, { + key: 'action', + set: function set() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy'; + + this._action = action; + + if (this._action !== 'copy' && this._action !== 'cut') { + throw new Error('Invalid "action" value, use either "copy" or "cut"'); + } + }, + get: function get() { + return this._action; + } + }, { + key: 'target', + set: function set(target) { + if (target !== undefined) { + if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) { + if (this.action === 'copy' && target.hasAttribute('disabled')) { + throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute'); + } + + if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) { + throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes'); + } + + this._target = target; + } else { + throw new Error('Invalid "target" value, use a valid Element'); + } + } + }, + get: function get() { + return this._target; + } + }]); + + return ClipboardAction; + }(); + + module.exports = ClipboardAction; +}); +},{"select":155}],65:[function(require,module,exports){ +(function (global, factory) { + if (typeof define === "function" && define.amd) { + define(['module', './clipboard-action', 'tiny-emitter', 'good-listener'], factory); + } else if (typeof exports !== "undefined") { + factory(module, require('./clipboard-action'), require('tiny-emitter'), require('good-listener')); + } else { + var mod = { + exports: {} + }; + factory(mod, global.clipboardAction, global.tinyEmitter, global.goodListener); + global.clipboard = mod.exports; + } +})(this, function (module, _clipboardAction, _tinyEmitter, _goodListener) { + 'use strict'; + + var _clipboardAction2 = _interopRequireDefault(_clipboardAction); + + var _tinyEmitter2 = _interopRequireDefault(_tinyEmitter); + + var _goodListener2 = _interopRequireDefault(_goodListener); + + function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + default: obj + }; + } + + var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { + return typeof obj; + } : function (obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + + var _createClass = function () { + function defineProperties(target, props) { + for (var i = 0; i < props.length; i++) { + var descriptor = props[i]; + descriptor.enumerable = descriptor.enumerable || false; + descriptor.configurable = true; + if ("value" in descriptor) descriptor.writable = true; + Object.defineProperty(target, descriptor.key, descriptor); + } + } + + return function (Constructor, protoProps, staticProps) { + if (protoProps) defineProperties(Constructor.prototype, protoProps); + if (staticProps) defineProperties(Constructor, staticProps); + return Constructor; + }; + }(); + + function _possibleConstructorReturn(self, call) { + if (!self) { + throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); + } + + return call && (typeof call === "object" || typeof call === "function") ? call : self; + } + + function _inherits(subClass, superClass) { + if (typeof superClass !== "function" && superClass !== null) { + throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); + } + + subClass.prototype = Object.create(superClass && superClass.prototype, { + constructor: { + value: subClass, + enumerable: false, + writable: true, + configurable: true + } + }); + if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; + } + + var Clipboard = function (_Emitter) { + _inherits(Clipboard, _Emitter); + + /** + * @param {String|HTMLElement|HTMLCollection|NodeList} trigger + * @param {Object} options + */ + function Clipboard(trigger, options) { + _classCallCheck(this, Clipboard); + + var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this)); + + _this.resolveOptions(options); + _this.listenClick(trigger); + return _this; + } + + /** + * Defines if attributes would be resolved using internal setter functions + * or custom functions that were passed in the constructor. + * @param {Object} options + */ + + + _createClass(Clipboard, [{ + key: 'resolveOptions', + value: function resolveOptions() { + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.action = typeof options.action === 'function' ? options.action : this.defaultAction; + this.target = typeof options.target === 'function' ? options.target : this.defaultTarget; + this.text = typeof options.text === 'function' ? options.text : this.defaultText; + this.container = _typeof(options.container) === 'object' ? options.container : document.body; + } + }, { + key: 'listenClick', + value: function listenClick(trigger) { + var _this2 = this; + + this.listener = (0, _goodListener2.default)(trigger, 'click', function (e) { + return _this2.onClick(e); + }); + } + }, { + key: 'onClick', + value: function onClick(e) { + var trigger = e.delegateTarget || e.currentTarget; + + if (this.clipboardAction) { + this.clipboardAction = null; + } + + this.clipboardAction = new _clipboardAction2.default({ + action: this.action(trigger), + target: this.target(trigger), + text: this.text(trigger), + container: this.container, + trigger: trigger, + emitter: this + }); + } + }, { + key: 'defaultAction', + value: function defaultAction(trigger) { + return getAttributeValue('action', trigger); + } + }, { + key: 'defaultTarget', + value: function defaultTarget(trigger) { + var selector = getAttributeValue('target', trigger); + + if (selector) { + return document.querySelector(selector); + } + } + }, { + key: 'defaultText', + value: function defaultText(trigger) { + return getAttributeValue('text', trigger); + } + }, { + key: 'destroy', + value: function destroy() { + this.listener.destroy(); + + if (this.clipboardAction) { + this.clipboardAction.destroy(); + this.clipboardAction = null; + } + } + }], [{ + key: 'isSupported', + value: function isSupported() { + var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut']; + + var actions = typeof action === 'string' ? [action] : action; + var support = !!document.queryCommandSupported; + + actions.forEach(function (action) { + support = support && !!document.queryCommandSupported(action); + }); + + return support; + } + }]); + + return Clipboard; + }(_tinyEmitter2.default); + + /** + * Helper function to retrieve attribute value. + * @param {String} suffix + * @param {Element} element + */ + function getAttributeValue(suffix, element) { + var attribute = 'data-clipboard-' + suffix; + + if (!element.hasAttribute(attribute)) { + return; + } + + return element.getAttribute(attribute); + } + + module.exports = Clipboard; +}); +},{"./clipboard-action":64,"good-listener":83,"tiny-emitter":178}],66:[function(require,module,exports){ +/*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */ + +'use strict'; + +/** + * Module exports. + * @public + */ + +exports.parse = parse; +exports.serialize = serialize; + +/** + * Module variables. + * @private + */ + +var decode = decodeURIComponent; +var encode = encodeURIComponent; +var pairSplitRegExp = /; */; + +/** + * RegExp to match field-content in RFC 7230 sec 3.2 + * + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + * obs-text = %x80-FF + */ + +var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; + +/** + * Parse a cookie header. + * + * Parse the given cookie header string into an object + * The object has the various cookies as keys(names) => values + * + * @param {string} str + * @param {object} [options] + * @return {object} + * @public + */ + +function parse(str, options) { + if (typeof str !== 'string') { + throw new TypeError('argument str must be a string'); + } + + var obj = {} + var opt = options || {}; + var pairs = str.split(pairSplitRegExp); + var dec = opt.decode || decode; + + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + var eq_idx = pair.indexOf('='); + + // skip things that don't look like key=value + if (eq_idx < 0) { + continue; + } + + var key = pair.substr(0, eq_idx).trim() + var val = pair.substr(++eq_idx, pair.length).trim(); + + // quoted values + if ('"' == val[0]) { + val = val.slice(1, -1); + } + + // only assign once + if (undefined == obj[key]) { + obj[key] = tryDecode(val, dec); + } + } + + return obj; +} + +/** + * Serialize data into a cookie header. + * + * Serialize the a name value pair into a cookie string suitable for + * http headers. An optional options object specified cookie parameters. + * + * serialize('foo', 'bar', { httpOnly: true }) + * => "foo=bar; httpOnly" + * + * @param {string} name + * @param {string} val + * @param {object} [options] + * @return {string} + * @public + */ + +function serialize(name, val, options) { + var opt = options || {}; + var enc = opt.encode || encode; + + if (!fieldContentRegExp.test(name)) { + throw new TypeError('argument name is invalid'); + } + + var value = enc(val); + + if (value && !fieldContentRegExp.test(value)) { + throw new TypeError('argument val is invalid'); + } + + var str = name + '=' + value; + + if (null != opt.maxAge) { + var maxAge = opt.maxAge - 0; + if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); + str += '; Max-Age=' + Math.floor(maxAge); + } + + if (opt.domain) { + if (!fieldContentRegExp.test(opt.domain)) { + throw new TypeError('option domain is invalid'); + } + + str += '; Domain=' + opt.domain; + } + + if (opt.path) { + if (!fieldContentRegExp.test(opt.path)) { + throw new TypeError('option path is invalid'); + } + + str += '; Path=' + opt.path; + } + + if (opt.expires) { + str += '; Expires=' + opt.expires.toUTCString(); + } + + if (opt.httpOnly) { + str += '; HttpOnly'; + } + + if (opt.secure) { + str += '; Secure'; + } + + if (opt.firstPartyOnly) { + str += '; First-Party-Only'; + } + + return str; +} + +/** + * Try decoding a string using a decoding function. + * + * @param {string} str + * @param {function} decode + * @private + */ + +function tryDecode(str, decode) { + try { + return decode(str); + } catch (e) { + return str; + } +} + +},{}],67:[function(require,module,exports){ +'use strict'; + +var $defineProperty = require('es-define-property'); + +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); + +var gopd = require('gopd'); + +/** @type {import('.')} */ +module.exports = function defineDataProperty( + obj, + property, + value +) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new $TypeError('`obj` must be an object or a function`'); + } + if (typeof property !== 'string' && typeof property !== 'symbol') { + throw new $TypeError('`property` must be a string or a symbol`'); + } + if (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) { + throw new $TypeError('`nonEnumerable`, if provided, must be a boolean or null'); + } + if (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) { + throw new $TypeError('`nonWritable`, if provided, must be a boolean or null'); + } + if (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) { + throw new $TypeError('`nonConfigurable`, if provided, must be a boolean or null'); + } + if (arguments.length > 6 && typeof arguments[6] !== 'boolean') { + throw new $TypeError('`loose`, if provided, must be a boolean'); + } + + var nonEnumerable = arguments.length > 3 ? arguments[3] : null; + var nonWritable = arguments.length > 4 ? arguments[4] : null; + var nonConfigurable = arguments.length > 5 ? arguments[5] : null; + var loose = arguments.length > 6 ? arguments[6] : false; + + /* @type {false | TypedPropertyDescriptor} */ + var desc = !!gopd && gopd(obj, property); + + if ($defineProperty) { + $defineProperty(obj, property, { + configurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable, + enumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable, + value: value, + writable: nonWritable === null && desc ? desc.writable : !nonWritable + }); + } else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) { + // must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable + obj[property] = value; // eslint-disable-line no-param-reassign + } else { + throw new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.'); + } +}; + +},{"es-define-property":70,"es-errors/syntax":75,"es-errors/type":76,"gopd":84}],68:[function(require,module,exports){ +var DOCUMENT_NODE_TYPE = 9; + +/** + * A polyfill for Element.matches() + */ +if (typeof Element !== 'undefined' && !Element.prototype.matches) { + var proto = Element.prototype; + + proto.matches = proto.matchesSelector || + proto.mozMatchesSelector || + proto.msMatchesSelector || + proto.oMatchesSelector || + proto.webkitMatchesSelector; +} + +/** + * Finds the closest parent that matches a selector. + * + * @param {Element} element + * @param {String} selector + * @return {Function} + */ +function closest (element, selector) { + while (element && element.nodeType !== DOCUMENT_NODE_TYPE) { + if (typeof element.matches === 'function' && + element.matches(selector)) { + return element; + } + element = element.parentNode; + } +} + +module.exports = closest; + +},{}],69:[function(require,module,exports){ +var closest = require('./closest'); + +/** + * Delegates event to a selector. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function _delegate(element, selector, type, callback, useCapture) { + var listenerFn = listener.apply(this, arguments); + + element.addEventListener(type, listenerFn, useCapture); + + return { + destroy: function() { + element.removeEventListener(type, listenerFn, useCapture); + } + } +} + +/** + * Delegates event to a selector. + * + * @param {Element|String|Array} [elements] + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @param {Boolean} useCapture + * @return {Object} + */ +function delegate(elements, selector, type, callback, useCapture) { + // Handle the regular Element usage + if (typeof elements.addEventListener === 'function') { + return _delegate.apply(null, arguments); + } + + // Handle Element-less usage, it defaults to global delegation + if (typeof type === 'function') { + // Use `document` as the first parameter, then apply arguments + // This is a short way to .unshift `arguments` without running into deoptimizations + return _delegate.bind(null, document).apply(null, arguments); + } + + // Handle Selector-based usage + if (typeof elements === 'string') { + elements = document.querySelectorAll(elements); + } + + // Handle Array-like based usage + return Array.prototype.map.call(elements, function (element) { + return _delegate(element, selector, type, callback, useCapture); + }); +} + +/** + * Finds closest match and invokes callback. + * + * @param {Element} element + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Function} + */ +function listener(element, selector, type, callback) { + return function(e) { + e.delegateTarget = closest(e.target, selector); + + if (e.delegateTarget) { + callback.call(element, e); + } + } +} + +module.exports = delegate; + +},{"./closest":68}],70:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +/** @type {import('.')} */ +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false; +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = false; + } +} + +module.exports = $defineProperty; + +},{"get-intrinsic":81}],71:[function(require,module,exports){ +'use strict'; + +/** @type {import('./eval')} */ +module.exports = EvalError; + +},{}],72:[function(require,module,exports){ +'use strict'; + +/** @type {import('.')} */ +module.exports = Error; + +},{}],73:[function(require,module,exports){ +'use strict'; + +/** @type {import('./range')} */ +module.exports = RangeError; + +},{}],74:[function(require,module,exports){ +'use strict'; + +/** @type {import('./ref')} */ +module.exports = ReferenceError; + +},{}],75:[function(require,module,exports){ +'use strict'; + +/** @type {import('./syntax')} */ +module.exports = SyntaxError; + +},{}],76:[function(require,module,exports){ +'use strict'; + +/** @type {import('./type')} */ +module.exports = TypeError; + +},{}],77:[function(require,module,exports){ +'use strict'; + +/** @type {import('./uri')} */ +module.exports = URIError; + +},{}],78:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + +'use strict'; + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + +},{}],79:[function(require,module,exports){ +'use strict'; + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var toStr = Object.prototype.toString; +var max = Math.max; +var funcType = '[object Function]'; + +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slicy(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + concatty(args, arguments) + ); + if (Object(result) === result) { + return result; + } + return this; + } + return target.apply( + that, + concatty(args, arguments) + ); + + }; + + var boundLength = max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs[i] = '$' + i; + } + + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + +},{}],80:[function(require,module,exports){ +'use strict'; + +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; + +},{"./implementation":79}],81:[function(require,module,exports){ +'use strict'; + +var undefined; + +var $Error = require('es-errors'); +var $EvalError = require('es-errors/eval'); +var $RangeError = require('es-errors/range'); +var $ReferenceError = require('es-errors/ref'); +var $SyntaxError = require('es-errors/syntax'); +var $TypeError = require('es-errors/type'); +var $URIError = require('es-errors/uri'); + +var $Function = Function; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = require('has-symbols')(); +var hasProto = require('has-proto')(); + +var getProto = Object.getPrototypeOf || ( + hasProto + ? function (x) { return x.__proto__; } // eslint-disable-line no-proto + : null +); + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + __proto__: null, + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array, + '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': $Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': $EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': $RangeError, + '%ReferenceError%': $ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': $URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +if (getProto) { + try { + null.error; // eslint-disable-line no-unused-expressions + } catch (e) { + // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229 + var errorProto = getProto(getProto(e)); + INTRINSICS['%Error.prototype%'] = errorProto; + } +} + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen && getProto) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + __proto__: null, + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = require('function-bind'); +var hasOwn = require('hasown'); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + +},{"es-errors":72,"es-errors/eval":71,"es-errors/range":73,"es-errors/ref":74,"es-errors/syntax":75,"es-errors/type":76,"es-errors/uri":77,"function-bind":80,"has-proto":129,"has-symbols":130,"hasown":132}],82:[function(require,module,exports){ +/** + * Check if argument is a HTML element. + * + * @param {Object} value + * @return {Boolean} + */ +exports.node = function(value) { + return value !== undefined + && value instanceof HTMLElement + && value.nodeType === 1; +}; + +/** + * Check if argument is a list of HTML elements. + * + * @param {Object} value + * @return {Boolean} + */ +exports.nodeList = function(value) { + var type = Object.prototype.toString.call(value); + + return value !== undefined + && (type === '[object NodeList]' || type === '[object HTMLCollection]') + && ('length' in value) + && (value.length === 0 || exports.node(value[0])); +}; + +/** + * Check if argument is a string. + * + * @param {Object} value + * @return {Boolean} + */ +exports.string = function(value) { + return typeof value === 'string' + || value instanceof String; +}; + +/** + * Check if argument is a function. + * + * @param {Object} value + * @return {Boolean} + */ +exports.fn = function(value) { + var type = Object.prototype.toString.call(value); + + return type === '[object Function]'; +}; + +},{}],83:[function(require,module,exports){ +var is = require('./is'); +var delegate = require('delegate'); + +/** + * Validates all params and calls the right + * listener function based on its target type. + * + * @param {String|HTMLElement|HTMLCollection|NodeList} target + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listen(target, type, callback) { + if (!target && !type && !callback) { + throw new Error('Missing required arguments'); + } + + if (!is.string(type)) { + throw new TypeError('Second argument must be a String'); + } + + if (!is.fn(callback)) { + throw new TypeError('Third argument must be a Function'); + } + + if (is.node(target)) { + return listenNode(target, type, callback); + } + else if (is.nodeList(target)) { + return listenNodeList(target, type, callback); + } + else if (is.string(target)) { + return listenSelector(target, type, callback); + } + else { + throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList'); + } +} + +/** + * Adds an event listener to a HTML element + * and returns a remove listener function. + * + * @param {HTMLElement} node + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNode(node, type, callback) { + node.addEventListener(type, callback); + + return { + destroy: function() { + node.removeEventListener(type, callback); + } + } +} + +/** + * Add an event listener to a list of HTML elements + * and returns a remove listener function. + * + * @param {NodeList|HTMLCollection} nodeList + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenNodeList(nodeList, type, callback) { + Array.prototype.forEach.call(nodeList, function(node) { + node.addEventListener(type, callback); + }); + + return { + destroy: function() { + Array.prototype.forEach.call(nodeList, function(node) { + node.removeEventListener(type, callback); + }); + } + } +} + +/** + * Add an event listener to a selector + * and returns a remove listener function. + * + * @param {String} selector + * @param {String} type + * @param {Function} callback + * @return {Object} + */ +function listenSelector(selector, type, callback) { + return delegate(document.body, selector, type, callback); +} + +module.exports = listen; + +},{"./is":82,"delegate":69}],84:[function(require,module,exports){ +'use strict'; + +var GetIntrinsic = require('get-intrinsic'); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + +},{"get-intrinsic":81}],85:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _handlebarsRuntime = require('./handlebars.runtime'); + +var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime); + +// Compiler imports + +var _handlebarsCompilerAst = require('./handlebars/compiler/ast'); + +var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst); + +var _handlebarsCompilerBase = require('./handlebars/compiler/base'); + +var _handlebarsCompilerCompiler = require('./handlebars/compiler/compiler'); + +var _handlebarsCompilerJavascriptCompiler = require('./handlebars/compiler/javascript-compiler'); + +var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler); + +var _handlebarsCompilerVisitor = require('./handlebars/compiler/visitor'); + +var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor); + +var _handlebarsNoConflict = require('./handlebars/no-conflict'); + +var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + +var _create = _handlebarsRuntime2['default'].create; +function create() { + var hb = _create(); + + hb.compile = function (input, options) { + return _handlebarsCompilerCompiler.compile(input, options, hb); + }; + hb.precompile = function (input, options) { + return _handlebarsCompilerCompiler.precompile(input, options, hb); + }; + + hb.AST = _handlebarsCompilerAst2['default']; + hb.Compiler = _handlebarsCompilerCompiler.Compiler; + hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2['default']; + hb.Parser = _handlebarsCompilerBase.parser; + hb.parse = _handlebarsCompilerBase.parse; + hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing; + + return hb; +} + +var inst = create(); +inst.create = create; + +_handlebarsNoConflict2['default'](inst); + +inst.Visitor = _handlebarsCompilerVisitor2['default']; + +inst['default'] = inst; + +exports['default'] = inst; +module.exports = exports['default']; + + +},{"./handlebars.runtime":86,"./handlebars/compiler/ast":88,"./handlebars/compiler/base":89,"./handlebars/compiler/compiler":91,"./handlebars/compiler/javascript-compiler":93,"./handlebars/compiler/visitor":95,"./handlebars/no-conflict":112}],86:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _handlebarsBase = require('./handlebars/base'); + +var base = _interopRequireWildcard(_handlebarsBase); + +// Each of these augment the Handlebars object. No need to setup here. +// (This is done to easily share code between commonjs and browse envs) + +var _handlebarsSafeString = require('./handlebars/safe-string'); + +var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString); + +var _handlebarsException = require('./handlebars/exception'); + +var _handlebarsException2 = _interopRequireDefault(_handlebarsException); + +var _handlebarsUtils = require('./handlebars/utils'); + +var Utils = _interopRequireWildcard(_handlebarsUtils); + +var _handlebarsRuntime = require('./handlebars/runtime'); + +var runtime = _interopRequireWildcard(_handlebarsRuntime); + +var _handlebarsNoConflict = require('./handlebars/no-conflict'); + +var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict); + +// For compatibility and usage outside of module systems, make the Handlebars object a namespace +function create() { + var hb = new base.HandlebarsEnvironment(); + + Utils.extend(hb, base); + hb.SafeString = _handlebarsSafeString2['default']; + hb.Exception = _handlebarsException2['default']; + hb.Utils = Utils; + hb.escapeExpression = Utils.escapeExpression; + + hb.VM = runtime; + hb.template = function (spec) { + return runtime.template(spec, hb); + }; + + return hb; +} + +var inst = create(); +inst.create = create; + +_handlebarsNoConflict2['default'](inst); + +inst['default'] = inst; + +exports['default'] = inst; +module.exports = exports['default']; + + +},{"./handlebars/base":87,"./handlebars/exception":99,"./handlebars/no-conflict":112,"./handlebars/runtime":113,"./handlebars/safe-string":114,"./handlebars/utils":115}],87:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.HandlebarsEnvironment = HandlebarsEnvironment; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('./utils'); + +var _exception = require('./exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _helpers = require('./helpers'); + +var _decorators = require('./decorators'); + +var _logger = require('./logger'); + +var _logger2 = _interopRequireDefault(_logger); + +var _internalProtoAccess = require('./internal/proto-access'); + +var VERSION = '4.7.8'; +exports.VERSION = VERSION; +var COMPILER_REVISION = 8; +exports.COMPILER_REVISION = COMPILER_REVISION; +var LAST_COMPATIBLE_COMPILER_REVISION = 7; + +exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION; +var REVISION_CHANGES = { + 1: '<= 1.0.rc.2', // 1.0.rc.2 is actually rev2 but doesn't report it + 2: '== 1.0.0-rc.3', + 3: '== 1.0.0-rc.4', + 4: '== 1.x.x', + 5: '== 2.0.0-alpha.x', + 6: '>= 2.0.0-beta.1', + 7: '>= 4.0.0 <4.3.0', + 8: '>= 4.3.0' +}; + +exports.REVISION_CHANGES = REVISION_CHANGES; +var objectType = '[object Object]'; + +function HandlebarsEnvironment(helpers, partials, decorators) { + this.helpers = helpers || {}; + this.partials = partials || {}; + this.decorators = decorators || {}; + + _helpers.registerDefaultHelpers(this); + _decorators.registerDefaultDecorators(this); +} + +HandlebarsEnvironment.prototype = { + constructor: HandlebarsEnvironment, + + logger: _logger2['default'], + log: _logger2['default'].log, + + registerHelper: function registerHelper(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple helpers'); + } + _utils.extend(this.helpers, name); + } else { + this.helpers[name] = fn; + } + }, + unregisterHelper: function unregisterHelper(name) { + delete this.helpers[name]; + }, + + registerPartial: function registerPartial(name, partial) { + if (_utils.toString.call(name) === objectType) { + _utils.extend(this.partials, name); + } else { + if (typeof partial === 'undefined') { + throw new _exception2['default']('Attempting to register a partial called "' + name + '" as undefined'); + } + this.partials[name] = partial; + } + }, + unregisterPartial: function unregisterPartial(name) { + delete this.partials[name]; + }, + + registerDecorator: function registerDecorator(name, fn) { + if (_utils.toString.call(name) === objectType) { + if (fn) { + throw new _exception2['default']('Arg not supported with multiple decorators'); + } + _utils.extend(this.decorators, name); + } else { + this.decorators[name] = fn; + } + }, + unregisterDecorator: function unregisterDecorator(name) { + delete this.decorators[name]; + }, + /** + * Reset the memory of illegal property accesses that have already been logged. + * @deprecated should only be used in handlebars test-cases + */ + resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() { + _internalProtoAccess.resetLoggedProperties(); + } +}; + +var log = _logger2['default'].log; + +exports.log = log; +exports.createFrame = _utils.createFrame; +exports.logger = _logger2['default']; + + +},{"./decorators":97,"./exception":99,"./helpers":100,"./internal/proto-access":109,"./logger":111,"./utils":115}],88:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +var AST = { + // Public API used to evaluate derived attributes regarding AST nodes + helpers: { + // a mustache is definitely a helper if: + // * it is an eligible helper, and + // * it has at least one parameter or hash segment + helperExpression: function helperExpression(node) { + return node.type === 'SubExpression' || (node.type === 'MustacheStatement' || node.type === 'BlockStatement') && !!(node.params && node.params.length || node.hash); + }, + + scopedId: function scopedId(path) { + return (/^\.|this\b/.test(path.original) + ); + }, + + // an ID is simple if it only has one part, and that part is not + // `..` or `this`. + simpleId: function simpleId(path) { + return path.parts.length === 1 && !AST.helpers.scopedId(path) && !path.depth; + } + } +}; + +// Must be exported as an object rather than the root of the module as the jison lexer +// must modify the object to operate properly. +exports['default'] = AST; +module.exports = exports['default']; + + +},{}],89:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.parseWithoutProcessing = parseWithoutProcessing; +exports.parse = parse; +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _parser = require('./parser'); + +var _parser2 = _interopRequireDefault(_parser); + +var _whitespaceControl = require('./whitespace-control'); + +var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl); + +var _helpers = require('./helpers'); + +var Helpers = _interopRequireWildcard(_helpers); + +var _utils = require('../utils'); + +exports.parser = _parser2['default']; + +var yy = {}; +_utils.extend(yy, Helpers); + +function parseWithoutProcessing(input, options) { + // Just return if an already-compiled AST was passed in. + if (input.type === 'Program') { + return input; + } + + _parser2['default'].yy = yy; + + // Altering the shared object here, but this is ok as parser is a sync operation + yy.locInfo = function (locInfo) { + return new yy.SourceLocation(options && options.srcName, locInfo); + }; + + var ast = _parser2['default'].parse(input); + + return ast; +} + +function parse(input, options) { + var ast = parseWithoutProcessing(input, options); + var strip = new _whitespaceControl2['default'](options); + + return strip.accept(ast); +} + + +},{"../utils":115,"./helpers":92,"./parser":94,"./whitespace-control":96}],90:[function(require,module,exports){ +/* global define, require */ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +var SourceNode = undefined; + +try { + /* istanbul ignore next */ + if (typeof define !== 'function' || !define.amd) { + // We don't support this in AMD environments. For these environments, we assume that + // they are running on the browser and thus have no need for the source-map library. + var SourceMap = require('source-map'); + SourceNode = SourceMap.SourceNode; + } +} catch (err) {} +/* NOP */ + +/* istanbul ignore if: tested but not covered in istanbul due to dist build */ +if (!SourceNode) { + SourceNode = function (line, column, srcFile, chunks) { + this.src = ''; + if (chunks) { + this.add(chunks); + } + }; + /* istanbul ignore next */ + SourceNode.prototype = { + add: function add(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src += chunks; + }, + prepend: function prepend(chunks) { + if (_utils.isArray(chunks)) { + chunks = chunks.join(''); + } + this.src = chunks + this.src; + }, + toStringWithSourceMap: function toStringWithSourceMap() { + return { code: this.toString() }; + }, + toString: function toString() { + return this.src; + } + }; +} + +function castChunk(chunk, codeGen, loc) { + if (_utils.isArray(chunk)) { + var ret = []; + + for (var i = 0, len = chunk.length; i < len; i++) { + ret.push(codeGen.wrap(chunk[i], loc)); + } + return ret; + } else if (typeof chunk === 'boolean' || typeof chunk === 'number') { + // Handle primitives that the SourceNode will throw up on + return chunk + ''; + } + return chunk; +} + +function CodeGen(srcFile) { + this.srcFile = srcFile; + this.source = []; +} + +CodeGen.prototype = { + isEmpty: function isEmpty() { + return !this.source.length; + }, + prepend: function prepend(source, loc) { + this.source.unshift(this.wrap(source, loc)); + }, + push: function push(source, loc) { + this.source.push(this.wrap(source, loc)); + }, + + merge: function merge() { + var source = this.empty(); + this.each(function (line) { + source.add([' ', line, '\n']); + }); + return source; + }, + + each: function each(iter) { + for (var i = 0, len = this.source.length; i < len; i++) { + iter(this.source[i]); + } + }, + + empty: function empty() { + var loc = this.currentLocation || { start: {} }; + return new SourceNode(loc.start.line, loc.start.column, this.srcFile); + }, + wrap: function wrap(chunk) { + var loc = arguments.length <= 1 || arguments[1] === undefined ? this.currentLocation || { start: {} } : arguments[1]; + + if (chunk instanceof SourceNode) { + return chunk; + } + + chunk = castChunk(chunk, this, loc); + + return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk); + }, + + functionCall: function functionCall(fn, type, params) { + params = this.generateList(params); + return this.wrap([fn, type ? '.' + type + '(' : '(', params, ')']); + }, + + quotedString: function quotedString(str) { + return '"' + (str + '').replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/\u2028/g, '\\u2028') // Per Ecma-262 7.3 + 7.8.4 + .replace(/\u2029/g, '\\u2029') + '"'; + }, + + objectLiteral: function objectLiteral(obj) { + // istanbul ignore next + + var _this = this; + + var pairs = []; + + Object.keys(obj).forEach(function (key) { + var value = castChunk(obj[key], _this); + if (value !== 'undefined') { + pairs.push([_this.quotedString(key), ':', value]); + } + }); + + var ret = this.generateList(pairs); + ret.prepend('{'); + ret.add('}'); + return ret; + }, + + generateList: function generateList(entries) { + var ret = this.empty(); + + for (var i = 0, len = entries.length; i < len; i++) { + if (i) { + ret.add(','); + } + + ret.add(castChunk(entries[i], this)); + } + + return ret; + }, + + generateArray: function generateArray(entries) { + var ret = this.generateList(entries); + ret.prepend('['); + ret.add(']'); + + return ret; + } +}; + +exports['default'] = CodeGen; +module.exports = exports['default']; + + +},{"../utils":115,"source-map":126}],91:[function(require,module,exports){ +/* eslint-disable new-cap */ + +'use strict'; + +exports.__esModule = true; +exports.Compiler = Compiler; +exports.precompile = precompile; +exports.compile = compile; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _utils = require('../utils'); + +var _ast = require('./ast'); + +var _ast2 = _interopRequireDefault(_ast); + +var slice = [].slice; + +function Compiler() {} + +// the foundHelper register will disambiguate helper lookup from finding a +// function in a context. This is necessary for mustache compatibility, which +// requires that context functions in blocks are evaluated by blockHelperMissing, +// and then proceed as if the resulting value was provided to blockHelperMissing. + +Compiler.prototype = { + compiler: Compiler, + + equals: function equals(other) { + var len = this.opcodes.length; + if (other.opcodes.length !== len) { + return false; + } + + for (var i = 0; i < len; i++) { + var opcode = this.opcodes[i], + otherOpcode = other.opcodes[i]; + if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) { + return false; + } + } + + // We know that length is the same between the two arrays because they are directly tied + // to the opcode behavior above. + len = this.children.length; + for (var i = 0; i < len; i++) { + if (!this.children[i].equals(other.children[i])) { + return false; + } + } + + return true; + }, + + guid: 0, + + compile: function compile(program, options) { + this.sourceNode = []; + this.opcodes = []; + this.children = []; + this.options = options; + this.stringParams = options.stringParams; + this.trackIds = options.trackIds; + + options.blockParams = options.blockParams || []; + + options.knownHelpers = _utils.extend(Object.create(null), { + helperMissing: true, + blockHelperMissing: true, + each: true, + 'if': true, + unless: true, + 'with': true, + log: true, + lookup: true + }, options.knownHelpers); + + return this.accept(program); + }, + + compileProgram: function compileProgram(program) { + var childCompiler = new this.compiler(), + // eslint-disable-line new-cap + result = childCompiler.compile(program, this.options), + guid = this.guid++; + + this.usePartial = this.usePartial || result.usePartial; + + this.children[guid] = result; + this.useDepths = this.useDepths || result.useDepths; + + return guid; + }, + + accept: function accept(node) { + /* istanbul ignore next: Sanity code */ + if (!this[node.type]) { + throw new _exception2['default']('Unknown type: ' + node.type, node); + } + + this.sourceNode.unshift(node); + var ret = this[node.type](node); + this.sourceNode.shift(); + return ret; + }, + + Program: function Program(program) { + this.options.blockParams.unshift(program.blockParams); + + var body = program.body, + bodyLength = body.length; + for (var i = 0; i < bodyLength; i++) { + this.accept(body[i]); + } + + this.options.blockParams.shift(); + + this.isSimple = bodyLength === 1; + this.blockParams = program.blockParams ? program.blockParams.length : 0; + + return this; + }, + + BlockStatement: function BlockStatement(block) { + transformLiteralToPath(block); + + var program = block.program, + inverse = block.inverse; + + program = program && this.compileProgram(program); + inverse = inverse && this.compileProgram(inverse); + + var type = this.classifySexpr(block); + + if (type === 'helper') { + this.helperSexpr(block, program, inverse); + } else if (type === 'simple') { + this.simpleSexpr(block); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('blockValue', block.path.original); + } else { + this.ambiguousSexpr(block, program, inverse); + + // now that the simple mustache is resolved, we need to + // evaluate it by executing `blockHelperMissing` + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + this.opcode('emptyHash'); + this.opcode('ambiguousBlockValue'); + } + + this.opcode('append'); + }, + + DecoratorBlock: function DecoratorBlock(decorator) { + var program = decorator.program && this.compileProgram(decorator.program); + var params = this.setupFullMustacheParams(decorator, program, undefined), + path = decorator.path; + + this.useDecorators = true; + this.opcode('registerDecorator', params.length, path.original); + }, + + PartialStatement: function PartialStatement(partial) { + this.usePartial = true; + + var program = partial.program; + if (program) { + program = this.compileProgram(partial.program); + } + + var params = partial.params; + if (params.length > 1) { + throw new _exception2['default']('Unsupported number of partial arguments: ' + params.length, partial); + } else if (!params.length) { + if (this.options.explicitPartialContext) { + this.opcode('pushLiteral', 'undefined'); + } else { + params.push({ type: 'PathExpression', parts: [], depth: 0 }); + } + } + + var partialName = partial.name.original, + isDynamic = partial.name.type === 'SubExpression'; + if (isDynamic) { + this.accept(partial.name); + } + + this.setupFullMustacheParams(partial, program, undefined, true); + + var indent = partial.indent || ''; + if (this.options.preventIndent && indent) { + this.opcode('appendContent', indent); + indent = ''; + } + + this.opcode('invokePartial', isDynamic, partialName, indent); + this.opcode('append'); + }, + PartialBlockStatement: function PartialBlockStatement(partialBlock) { + this.PartialStatement(partialBlock); + }, + + MustacheStatement: function MustacheStatement(mustache) { + this.SubExpression(mustache); + + if (mustache.escaped && !this.options.noEscape) { + this.opcode('appendEscaped'); + } else { + this.opcode('append'); + } + }, + Decorator: function Decorator(decorator) { + this.DecoratorBlock(decorator); + }, + + ContentStatement: function ContentStatement(content) { + if (content.value) { + this.opcode('appendContent', content.value); + } + }, + + CommentStatement: function CommentStatement() {}, + + SubExpression: function SubExpression(sexpr) { + transformLiteralToPath(sexpr); + var type = this.classifySexpr(sexpr); + + if (type === 'simple') { + this.simpleSexpr(sexpr); + } else if (type === 'helper') { + this.helperSexpr(sexpr); + } else { + this.ambiguousSexpr(sexpr); + } + }, + ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) { + var path = sexpr.path, + name = path.parts[0], + isBlock = program != null || inverse != null; + + this.opcode('getContext', path.depth); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + path.strict = true; + this.accept(path); + + this.opcode('invokeAmbiguous', name, isBlock); + }, + + simpleSexpr: function simpleSexpr(sexpr) { + var path = sexpr.path; + path.strict = true; + this.accept(path); + this.opcode('resolvePossibleLambda'); + }, + + helperSexpr: function helperSexpr(sexpr, program, inverse) { + var params = this.setupFullMustacheParams(sexpr, program, inverse), + path = sexpr.path, + name = path.parts[0]; + + if (this.options.knownHelpers[name]) { + this.opcode('invokeKnownHelper', params.length, name); + } else if (this.options.knownHelpersOnly) { + throw new _exception2['default']('You specified knownHelpersOnly, but used the unknown helper ' + name, sexpr); + } else { + path.strict = true; + path.falsy = true; + + this.accept(path); + this.opcode('invokeHelper', params.length, path.original, _ast2['default'].helpers.simpleId(path)); + } + }, + + PathExpression: function PathExpression(path) { + this.addDepth(path.depth); + this.opcode('getContext', path.depth); + + var name = path.parts[0], + scoped = _ast2['default'].helpers.scopedId(path), + blockParamId = !path.depth && !scoped && this.blockParamIndex(name); + + if (blockParamId) { + this.opcode('lookupBlockParam', blockParamId, path.parts); + } else if (!name) { + // Context reference, i.e. `{{foo .}}` or `{{foo ..}}` + this.opcode('pushContext'); + } else if (path.data) { + this.options.data = true; + this.opcode('lookupData', path.depth, path.parts, path.strict); + } else { + this.opcode('lookupOnContext', path.parts, path.falsy, path.strict, scoped); + } + }, + + StringLiteral: function StringLiteral(string) { + this.opcode('pushString', string.value); + }, + + NumberLiteral: function NumberLiteral(number) { + this.opcode('pushLiteral', number.value); + }, + + BooleanLiteral: function BooleanLiteral(bool) { + this.opcode('pushLiteral', bool.value); + }, + + UndefinedLiteral: function UndefinedLiteral() { + this.opcode('pushLiteral', 'undefined'); + }, + + NullLiteral: function NullLiteral() { + this.opcode('pushLiteral', 'null'); + }, + + Hash: function Hash(hash) { + var pairs = hash.pairs, + i = 0, + l = pairs.length; + + this.opcode('pushHash'); + + for (; i < l; i++) { + this.pushParam(pairs[i].value); + } + while (i--) { + this.opcode('assignToHash', pairs[i].key); + } + this.opcode('popHash'); + }, + + // HELPERS + opcode: function opcode(name) { + this.opcodes.push({ + opcode: name, + args: slice.call(arguments, 1), + loc: this.sourceNode[0].loc + }); + }, + + addDepth: function addDepth(depth) { + if (!depth) { + return; + } + + this.useDepths = true; + }, + + classifySexpr: function classifySexpr(sexpr) { + var isSimple = _ast2['default'].helpers.simpleId(sexpr.path); + + var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]); + + // a mustache is an eligible helper if: + // * its id is simple (a single part, not `this` or `..`) + var isHelper = !isBlockParam && _ast2['default'].helpers.helperExpression(sexpr); + + // if a mustache is an eligible helper but not a definite + // helper, it is ambiguous, and will be resolved in a later + // pass or at runtime. + var isEligible = !isBlockParam && (isHelper || isSimple); + + // if ambiguous, we can possibly resolve the ambiguity now + // An eligible helper is one that does not have a complex path, i.e. `this.foo`, `../foo` etc. + if (isEligible && !isHelper) { + var _name = sexpr.path.parts[0], + options = this.options; + if (options.knownHelpers[_name]) { + isHelper = true; + } else if (options.knownHelpersOnly) { + isEligible = false; + } + } + + if (isHelper) { + return 'helper'; + } else if (isEligible) { + return 'ambiguous'; + } else { + return 'simple'; + } + }, + + pushParams: function pushParams(params) { + for (var i = 0, l = params.length; i < l; i++) { + this.pushParam(params[i]); + } + }, + + pushParam: function pushParam(val) { + var value = val.value != null ? val.value : val.original || ''; + + if (this.stringParams) { + if (value.replace) { + value = value.replace(/^(\.?\.\/)*/g, '').replace(/\//g, '.'); + } + + if (val.depth) { + this.addDepth(val.depth); + } + this.opcode('getContext', val.depth || 0); + this.opcode('pushStringParam', value, val.type); + + if (val.type === 'SubExpression') { + // SubExpressions get evaluated and passed in + // in string params mode. + this.accept(val); + } + } else { + if (this.trackIds) { + var blockParamIndex = undefined; + if (val.parts && !_ast2['default'].helpers.scopedId(val) && !val.depth) { + blockParamIndex = this.blockParamIndex(val.parts[0]); + } + if (blockParamIndex) { + var blockParamChild = val.parts.slice(1).join('.'); + this.opcode('pushId', 'BlockParam', blockParamIndex, blockParamChild); + } else { + value = val.original || value; + if (value.replace) { + value = value.replace(/^this(?:\.|$)/, '').replace(/^\.\//, '').replace(/^\.$/, ''); + } + + this.opcode('pushId', val.type, value); + } + } + this.accept(val); + } + }, + + setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) { + var params = sexpr.params; + this.pushParams(params); + + this.opcode('pushProgram', program); + this.opcode('pushProgram', inverse); + + if (sexpr.hash) { + this.accept(sexpr.hash); + } else { + this.opcode('emptyHash', omitEmpty); + } + + return params; + }, + + blockParamIndex: function blockParamIndex(name) { + for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) { + var blockParams = this.options.blockParams[depth], + param = blockParams && _utils.indexOf(blockParams, name); + if (blockParams && param >= 0) { + return [depth, param]; + } + } + } +}; + +function precompile(input, options, env) { + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.precompile. You passed ' + input); + } + + options = options || {}; + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options); + return new env.JavaScriptCompiler().compile(environment, options); +} + +function compile(input, options, env) { + if (options === undefined) options = {}; + + if (input == null || typeof input !== 'string' && input.type !== 'Program') { + throw new _exception2['default']('You must pass a string or Handlebars AST to Handlebars.compile. You passed ' + input); + } + + options = _utils.extend({}, options); + if (!('data' in options)) { + options.data = true; + } + if (options.compat) { + options.useDepths = true; + } + + var compiled = undefined; + + function compileInput() { + var ast = env.parse(input, options), + environment = new env.Compiler().compile(ast, options), + templateSpec = new env.JavaScriptCompiler().compile(environment, options, undefined, true); + return env.template(templateSpec); + } + + // Template is only compiled on first use and cached after that point. + function ret(context, execOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled.call(this, context, execOptions); + } + ret._setup = function (setupOptions) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._setup(setupOptions); + }; + ret._child = function (i, data, blockParams, depths) { + if (!compiled) { + compiled = compileInput(); + } + return compiled._child(i, data, blockParams, depths); + }; + return ret; +} + +function argEquals(a, b) { + if (a === b) { + return true; + } + + if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) { + for (var i = 0; i < a.length; i++) { + if (!argEquals(a[i], b[i])) { + return false; + } + } + return true; + } +} + +function transformLiteralToPath(sexpr) { + if (!sexpr.path.parts) { + var literal = sexpr.path; + // Casting to string here to make false and 0 literal values play nicely with the rest + // of the system. + sexpr.path = { + type: 'PathExpression', + data: false, + depth: 0, + parts: [literal.original + ''], + original: literal.original + '', + loc: literal.loc + }; + } +} + + +},{"../exception":99,"../utils":115,"./ast":88}],92:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.SourceLocation = SourceLocation; +exports.id = id; +exports.stripFlags = stripFlags; +exports.stripComment = stripComment; +exports.preparePath = preparePath; +exports.prepareMustache = prepareMustache; +exports.prepareRawBlock = prepareRawBlock; +exports.prepareBlock = prepareBlock; +exports.prepareProgram = prepareProgram; +exports.preparePartialBlock = preparePartialBlock; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +function validateClose(open, close) { + close = close.path ? close.path.original : close; + + if (open.path.original !== close) { + var errorNode = { loc: open.path.loc }; + + throw new _exception2['default'](open.path.original + " doesn't match " + close, errorNode); + } +} + +function SourceLocation(source, locInfo) { + this.source = source; + this.start = { + line: locInfo.first_line, + column: locInfo.first_column + }; + this.end = { + line: locInfo.last_line, + column: locInfo.last_column + }; +} + +function id(token) { + if (/^\[.*\]$/.test(token)) { + return token.substring(1, token.length - 1); + } else { + return token; + } +} + +function stripFlags(open, close) { + return { + open: open.charAt(2) === '~', + close: close.charAt(close.length - 3) === '~' + }; +} + +function stripComment(comment) { + return comment.replace(/^\{\{~?!-?-?/, '').replace(/-?-?~?\}\}$/, ''); +} + +function preparePath(data, parts, loc) { + loc = this.locInfo(loc); + + var original = data ? '@' : '', + dig = [], + depth = 0; + + for (var i = 0, l = parts.length; i < l; i++) { + var part = parts[i].part, + + // If we have [] syntax then we do not treat path references as operators, + // i.e. foo.[this] resolves to approximately context.foo['this'] + isLiteral = parts[i].original !== part; + original += (parts[i].separator || '') + part; + + if (!isLiteral && (part === '..' || part === '.' || part === 'this')) { + if (dig.length > 0) { + throw new _exception2['default']('Invalid path: ' + original, { loc: loc }); + } else if (part === '..') { + depth++; + } + } else { + dig.push(part); + } + } + + return { + type: 'PathExpression', + data: data, + depth: depth, + parts: dig, + original: original, + loc: loc + }; +} + +function prepareMustache(path, params, hash, open, strip, locInfo) { + // Must use charAt to support IE pre-10 + var escapeFlag = open.charAt(3) || open.charAt(2), + escaped = escapeFlag !== '{' && escapeFlag !== '&'; + + var decorator = /\*/.test(open); + return { + type: decorator ? 'Decorator' : 'MustacheStatement', + path: path, + params: params, + hash: hash, + escaped: escaped, + strip: strip, + loc: this.locInfo(locInfo) + }; +} + +function prepareRawBlock(openRawBlock, contents, close, locInfo) { + validateClose(openRawBlock, close); + + locInfo = this.locInfo(locInfo); + var program = { + type: 'Program', + body: contents, + strip: {}, + loc: locInfo + }; + + return { + type: 'BlockStatement', + path: openRawBlock.path, + params: openRawBlock.params, + hash: openRawBlock.hash, + program: program, + openStrip: {}, + inverseStrip: {}, + closeStrip: {}, + loc: locInfo + }; +} + +function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) { + if (close && close.path) { + validateClose(openBlock, close); + } + + var decorator = /\*/.test(openBlock.open); + + program.blockParams = openBlock.blockParams; + + var inverse = undefined, + inverseStrip = undefined; + + if (inverseAndProgram) { + if (decorator) { + throw new _exception2['default']('Unexpected inverse block on decorator', inverseAndProgram); + } + + if (inverseAndProgram.chain) { + inverseAndProgram.program.body[0].closeStrip = close.strip; + } + + inverseStrip = inverseAndProgram.strip; + inverse = inverseAndProgram.program; + } + + if (inverted) { + inverted = inverse; + inverse = program; + program = inverted; + } + + return { + type: decorator ? 'DecoratorBlock' : 'BlockStatement', + path: openBlock.path, + params: openBlock.params, + hash: openBlock.hash, + program: program, + inverse: inverse, + openStrip: openBlock.strip, + inverseStrip: inverseStrip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} + +function prepareProgram(statements, loc) { + if (!loc && statements.length) { + var firstLoc = statements[0].loc, + lastLoc = statements[statements.length - 1].loc; + + /* istanbul ignore else */ + if (firstLoc && lastLoc) { + loc = { + source: firstLoc.source, + start: { + line: firstLoc.start.line, + column: firstLoc.start.column + }, + end: { + line: lastLoc.end.line, + column: lastLoc.end.column + } + }; + } + } + + return { + type: 'Program', + body: statements, + strip: {}, + loc: loc + }; +} + +function preparePartialBlock(open, program, close, locInfo) { + validateClose(open, close); + + return { + type: 'PartialBlockStatement', + name: open.path, + params: open.params, + hash: open.hash, + program: program, + openStrip: open.strip, + closeStrip: close && close.strip, + loc: this.locInfo(locInfo) + }; +} + + +},{"../exception":99}],93:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _base = require('../base'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _utils = require('../utils'); + +var _codeGen = require('./code-gen'); + +var _codeGen2 = _interopRequireDefault(_codeGen); + +function Literal(value) { + this.value = value; +} + +function JavaScriptCompiler() {} + +JavaScriptCompiler.prototype = { + // PUBLIC API: You can override these methods in a subclass to provide + // alternative compiled forms for name lookup and buffering semantics + nameLookup: function nameLookup(parent, name /*, type */) { + return this.internalNameLookup(parent, name); + }, + depthedLookup: function depthedLookup(name) { + return [this.aliasable('container.lookup'), '(depths, ', JSON.stringify(name), ')']; + }, + + compilerInfo: function compilerInfo() { + var revision = _base.COMPILER_REVISION, + versions = _base.REVISION_CHANGES[revision]; + return [revision, versions]; + }, + + appendToBuffer: function appendToBuffer(source, location, explicit) { + // Force a source as this simplifies the merge logic. + if (!_utils.isArray(source)) { + source = [source]; + } + source = this.source.wrap(source, location); + + if (this.environment.isSimple) { + return ['return ', source, ';']; + } else if (explicit) { + // This is a case where the buffer operation occurs as a child of another + // construct, generally braces. We have to explicitly output these buffer + // operations to ensure that the emitted code goes in the correct location. + return ['buffer += ', source, ';']; + } else { + source.appendToBuffer = true; + return source; + } + }, + + initializeBuffer: function initializeBuffer() { + return this.quotedString(''); + }, + // END PUBLIC API + internalNameLookup: function internalNameLookup(parent, name) { + this.lookupPropertyFunctionIsUsed = true; + return ['lookupProperty(', parent, ',', JSON.stringify(name), ')']; + }, + + lookupPropertyFunctionIsUsed: false, + + compile: function compile(environment, options, context, asObject) { + this.environment = environment; + this.options = options; + this.stringParams = this.options.stringParams; + this.trackIds = this.options.trackIds; + this.precompile = !asObject; + + this.name = this.environment.name; + this.isChild = !!context; + this.context = context || { + decorators: [], + programs: [], + environments: [] + }; + + this.preamble(); + + this.stackSlot = 0; + this.stackVars = []; + this.aliases = {}; + this.registers = { list: [] }; + this.hashes = []; + this.compileStack = []; + this.inlineStack = []; + this.blockParams = []; + + this.compileChildren(environment, options); + + this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat; + this.useBlockParams = this.useBlockParams || environment.useBlockParams; + + var opcodes = environment.opcodes, + opcode = undefined, + firstLoc = undefined, + i = undefined, + l = undefined; + + for (i = 0, l = opcodes.length; i < l; i++) { + opcode = opcodes[i]; + + this.source.currentLocation = opcode.loc; + firstLoc = firstLoc || opcode.loc; + this[opcode.opcode].apply(this, opcode.args); + } + + // Flush any trailing content that might be pending. + this.source.currentLocation = firstLoc; + this.pushSource(''); + + /* istanbul ignore next */ + if (this.stackSlot || this.inlineStack.length || this.compileStack.length) { + throw new _exception2['default']('Compile completed with content left on stack'); + } + + if (!this.decorators.isEmpty()) { + this.useDecorators = true; + + this.decorators.prepend(['var decorators = container.decorators, ', this.lookupPropertyFunctionVarDeclaration(), ';\n']); + this.decorators.push('return fn;'); + + if (asObject) { + this.decorators = Function.apply(this, ['fn', 'props', 'container', 'depth0', 'data', 'blockParams', 'depths', this.decorators.merge()]); + } else { + this.decorators.prepend('function(fn, props, container, depth0, data, blockParams, depths) {\n'); + this.decorators.push('}\n'); + this.decorators = this.decorators.merge(); + } + } else { + this.decorators = undefined; + } + + var fn = this.createFunctionContext(asObject); + if (!this.isChild) { + var ret = { + compiler: this.compilerInfo(), + main: fn + }; + + if (this.decorators) { + ret.main_d = this.decorators; // eslint-disable-line camelcase + ret.useDecorators = true; + } + + var _context = this.context; + var programs = _context.programs; + var decorators = _context.decorators; + + for (i = 0, l = programs.length; i < l; i++) { + if (programs[i]) { + ret[i] = programs[i]; + if (decorators[i]) { + ret[i + '_d'] = decorators[i]; + ret.useDecorators = true; + } + } + } + + if (this.environment.usePartial) { + ret.usePartial = true; + } + if (this.options.data) { + ret.useData = true; + } + if (this.useDepths) { + ret.useDepths = true; + } + if (this.useBlockParams) { + ret.useBlockParams = true; + } + if (this.options.compat) { + ret.compat = true; + } + + if (!asObject) { + ret.compiler = JSON.stringify(ret.compiler); + + this.source.currentLocation = { start: { line: 1, column: 0 } }; + ret = this.objectLiteral(ret); + + if (options.srcName) { + ret = ret.toStringWithSourceMap({ file: options.destName }); + ret.map = ret.map && ret.map.toString(); + } else { + ret = ret.toString(); + } + } else { + ret.compilerOptions = this.options; + } + + return ret; + } else { + return fn; + } + }, + + preamble: function preamble() { + // track the last context pushed into place to allow skipping the + // getContext opcode when it would be a noop + this.lastContext = 0; + this.source = new _codeGen2['default'](this.options.srcName); + this.decorators = new _codeGen2['default'](this.options.srcName); + }, + + createFunctionContext: function createFunctionContext(asObject) { + // istanbul ignore next + + var _this = this; + + var varDeclarations = ''; + + var locals = this.stackVars.concat(this.registers.list); + if (locals.length > 0) { + varDeclarations += ', ' + locals.join(', '); + } + + // Generate minimizer alias mappings + // + // When using true SourceNodes, this will update all references to the given alias + // as the source nodes are reused in situ. For the non-source node compilation mode, + // aliases will not be used, but this case is already being run on the client and + // we aren't concern about minimizing the template size. + var aliasCount = 0; + Object.keys(this.aliases).forEach(function (alias) { + var node = _this.aliases[alias]; + if (node.children && node.referenceCount > 1) { + varDeclarations += ', alias' + ++aliasCount + '=' + alias; + node.children[0] = 'alias' + aliasCount; + } + }); + + if (this.lookupPropertyFunctionIsUsed) { + varDeclarations += ', ' + this.lookupPropertyFunctionVarDeclaration(); + } + + var params = ['container', 'depth0', 'helpers', 'partials', 'data']; + + if (this.useBlockParams || this.useDepths) { + params.push('blockParams'); + } + if (this.useDepths) { + params.push('depths'); + } + + // Perform a second pass over the output to merge content when possible + var source = this.mergeSource(varDeclarations); + + if (asObject) { + params.push(source); + + return Function.apply(this, params); + } else { + return this.source.wrap(['function(', params.join(','), ') {\n ', source, '}']); + } + }, + mergeSource: function mergeSource(varDeclarations) { + var isSimple = this.environment.isSimple, + appendOnly = !this.forceBuffer, + appendFirst = undefined, + sourceSeen = undefined, + bufferStart = undefined, + bufferEnd = undefined; + this.source.each(function (line) { + if (line.appendToBuffer) { + if (bufferStart) { + line.prepend(' + '); + } else { + bufferStart = line; + } + bufferEnd = line; + } else { + if (bufferStart) { + if (!sourceSeen) { + appendFirst = true; + } else { + bufferStart.prepend('buffer += '); + } + bufferEnd.add(';'); + bufferStart = bufferEnd = undefined; + } + + sourceSeen = true; + if (!isSimple) { + appendOnly = false; + } + } + }); + + if (appendOnly) { + if (bufferStart) { + bufferStart.prepend('return '); + bufferEnd.add(';'); + } else if (!sourceSeen) { + this.source.push('return "";'); + } + } else { + varDeclarations += ', buffer = ' + (appendFirst ? '' : this.initializeBuffer()); + + if (bufferStart) { + bufferStart.prepend('return buffer + '); + bufferEnd.add(';'); + } else { + this.source.push('return buffer;'); + } + } + + if (varDeclarations) { + this.source.prepend('var ' + varDeclarations.substring(2) + (appendFirst ? '' : ';\n')); + } + + return this.source.merge(); + }, + + lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() { + return '\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n '.trim(); + }, + + // [blockValue] + // + // On stack, before: hash, inverse, program, value + // On stack, after: return value of blockHelperMissing + // + // The purpose of this opcode is to take a block of the form + // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and + // replace it on the stack with the result of properly + // invoking blockHelperMissing. + blockValue: function blockValue(name) { + var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs(name, 0, params); + + var blockName = this.popStack(); + params.splice(1, 0, blockName); + + this.push(this.source.functionCall(blockHelperMissing, 'call', params)); + }, + + // [ambiguousBlockValue] + // + // On stack, before: hash, inverse, program, value + // Compiler value, before: lastHelper=value of last found helper, if any + // On stack, after, if no lastHelper: same as [blockValue] + // On stack, after, if lastHelper: value + ambiguousBlockValue: function ambiguousBlockValue() { + // We're being a bit cheeky and reusing the options value from the prior exec + var blockHelperMissing = this.aliasable('container.hooks.blockHelperMissing'), + params = [this.contextName(0)]; + this.setupHelperArgs('', 0, params, true); + + this.flushInline(); + + var current = this.topStack(); + params.splice(1, 0, current); + + this.pushSource(['if (!', this.lastHelper, ') { ', current, ' = ', this.source.functionCall(blockHelperMissing, 'call', params), '}']); + }, + + // [appendContent] + // + // On stack, before: ... + // On stack, after: ... + // + // Appends the string value of `content` to the current buffer + appendContent: function appendContent(content) { + if (this.pendingContent) { + content = this.pendingContent + content; + } else { + this.pendingLocation = this.source.currentLocation; + } + + this.pendingContent = content; + }, + + // [append] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Coerces `value` to a String and appends it to the current buffer. + // + // If `value` is truthy, or 0, it is coerced into a string and appended + // Otherwise, the empty string is appended + append: function append() { + if (this.isInline()) { + this.replaceStack(function (current) { + return [' != null ? ', current, ' : ""']; + }); + + this.pushSource(this.appendToBuffer(this.popStack())); + } else { + var local = this.popStack(); + this.pushSource(['if (', local, ' != null) { ', this.appendToBuffer(local, undefined, true), ' }']); + if (this.environment.isSimple) { + this.pushSource(['else { ', this.appendToBuffer("''", undefined, true), ' }']); + } + } + }, + + // [appendEscaped] + // + // On stack, before: value, ... + // On stack, after: ... + // + // Escape `value` and append it to the buffer + appendEscaped: function appendEscaped() { + this.pushSource(this.appendToBuffer([this.aliasable('container.escapeExpression'), '(', this.popStack(), ')'])); + }, + + // [getContext] + // + // On stack, before: ... + // On stack, after: ... + // Compiler value, after: lastContext=depth + // + // Set the value of the `lastContext` compiler value to the depth + getContext: function getContext(depth) { + this.lastContext = depth; + }, + + // [pushContext] + // + // On stack, before: ... + // On stack, after: currentContext, ... + // + // Pushes the value of the current context onto the stack. + pushContext: function pushContext() { + this.pushStackLiteral(this.contextName(this.lastContext)); + }, + + // [lookupOnContext] + // + // On stack, before: ... + // On stack, after: currentContext[name], ... + // + // Looks up the value of `name` on the current context and pushes + // it onto the stack. + lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) { + var i = 0; + + if (!scoped && this.options.compat && !this.lastContext) { + // The depthed query is expected to handle the undefined logic for the root level that + // is implemented below, so we evaluate that directly in compat mode + this.push(this.depthedLookup(parts[i++])); + } else { + this.pushContext(); + } + + this.resolvePath('context', parts, i, falsy, strict); + }, + + // [lookupBlockParam] + // + // On stack, before: ... + // On stack, after: blockParam[name], ... + // + // Looks up the value of `parts` on the given block param and pushes + // it onto the stack. + lookupBlockParam: function lookupBlockParam(blockParamId, parts) { + this.useBlockParams = true; + + this.push(['blockParams[', blockParamId[0], '][', blockParamId[1], ']']); + this.resolvePath('context', parts, 1); + }, + + // [lookupData] + // + // On stack, before: ... + // On stack, after: data, ... + // + // Push the data lookup operator + lookupData: function lookupData(depth, parts, strict) { + if (!depth) { + this.pushStackLiteral('data'); + } else { + this.pushStackLiteral('container.data(data, ' + depth + ')'); + } + + this.resolvePath('data', parts, 0, true, strict); + }, + + resolvePath: function resolvePath(type, parts, i, falsy, strict) { + // istanbul ignore next + + var _this2 = this; + + if (this.options.strict || this.options.assumeObjects) { + this.push(strictLookup(this.options.strict && strict, this, parts, i, type)); + return; + } + + var len = parts.length; + for (; i < len; i++) { + /* eslint-disable no-loop-func */ + this.replaceStack(function (current) { + var lookup = _this2.nameLookup(current, parts[i], type); + // We want to ensure that zero and false are handled properly if the context (falsy flag) + // needs to have the special handling for these values. + if (!falsy) { + return [' != null ? ', lookup, ' : ', current]; + } else { + // Otherwise we can use generic falsy handling + return [' && ', lookup]; + } + }); + /* eslint-enable no-loop-func */ + } + }, + + // [resolvePossibleLambda] + // + // On stack, before: value, ... + // On stack, after: resolved value, ... + // + // If the `value` is a lambda, replace it on the stack by + // the return value of the lambda + resolvePossibleLambda: function resolvePossibleLambda() { + this.push([this.aliasable('container.lambda'), '(', this.popStack(), ', ', this.contextName(0), ')']); + }, + + // [pushStringParam] + // + // On stack, before: ... + // On stack, after: string, currentContext, ... + // + // This opcode is designed for use in string mode, which + // provides the string value of a parameter along with its + // depth rather than resolving it immediately. + pushStringParam: function pushStringParam(string, type) { + this.pushContext(); + this.pushString(type); + + // If it's a subexpression, the string result + // will be pushed after this opcode. + if (type !== 'SubExpression') { + if (typeof string === 'string') { + this.pushString(string); + } else { + this.pushStackLiteral(string); + } + } + }, + + emptyHash: function emptyHash(omitEmpty) { + if (this.trackIds) { + this.push('{}'); // hashIds + } + if (this.stringParams) { + this.push('{}'); // hashContexts + this.push('{}'); // hashTypes + } + this.pushStackLiteral(omitEmpty ? 'undefined' : '{}'); + }, + pushHash: function pushHash() { + if (this.hash) { + this.hashes.push(this.hash); + } + this.hash = { values: {}, types: [], contexts: [], ids: [] }; + }, + popHash: function popHash() { + var hash = this.hash; + this.hash = this.hashes.pop(); + + if (this.trackIds) { + this.push(this.objectLiteral(hash.ids)); + } + if (this.stringParams) { + this.push(this.objectLiteral(hash.contexts)); + this.push(this.objectLiteral(hash.types)); + } + + this.push(this.objectLiteral(hash.values)); + }, + + // [pushString] + // + // On stack, before: ... + // On stack, after: quotedString(string), ... + // + // Push a quoted version of `string` onto the stack + pushString: function pushString(string) { + this.pushStackLiteral(this.quotedString(string)); + }, + + // [pushLiteral] + // + // On stack, before: ... + // On stack, after: value, ... + // + // Pushes a value onto the stack. This operation prevents + // the compiler from creating a temporary variable to hold + // it. + pushLiteral: function pushLiteral(value) { + this.pushStackLiteral(value); + }, + + // [pushProgram] + // + // On stack, before: ... + // On stack, after: program(guid), ... + // + // Push a program expression onto the stack. This takes + // a compile-time guid and converts it into a runtime-accessible + // expression. + pushProgram: function pushProgram(guid) { + if (guid != null) { + this.pushStackLiteral(this.programExpression(guid)); + } else { + this.pushStackLiteral(null); + } + }, + + // [registerDecorator] + // + // On stack, before: hash, program, params..., ... + // On stack, after: ... + // + // Pops off the decorator's parameters, invokes the decorator, + // and inserts the decorator into the decorators list. + registerDecorator: function registerDecorator(paramSize, name) { + var foundDecorator = this.nameLookup('decorators', name, 'decorator'), + options = this.setupHelperArgs(name, paramSize); + + this.decorators.push(['fn = ', this.decorators.functionCall(foundDecorator, '', ['fn', 'props', 'container', options]), ' || fn;']); + }, + + // [invokeHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // Pops off the helper's parameters, invokes the helper, + // and pushes the helper's return value onto the stack. + // + // If the helper is not found, `helperMissing` is called. + invokeHelper: function invokeHelper(paramSize, name, isSimple) { + var nonHelper = this.popStack(), + helper = this.setupHelper(paramSize, name); + + var possibleFunctionCalls = []; + + if (isSimple) { + // direct call to helper + possibleFunctionCalls.push(helper.name); + } + // call a function from the input object + possibleFunctionCalls.push(nonHelper); + if (!this.options.strict) { + possibleFunctionCalls.push(this.aliasable('container.hooks.helperMissing')); + } + + var functionLookupCode = ['(', this.itemsSeparatedBy(possibleFunctionCalls, '||'), ')']; + var functionCall = this.source.functionCall(functionLookupCode, 'call', helper.callParams); + this.push(functionCall); + }, + + itemsSeparatedBy: function itemsSeparatedBy(items, separator) { + var result = []; + result.push(items[0]); + for (var i = 1; i < items.length; i++) { + result.push(separator, items[i]); + } + return result; + }, + // [invokeKnownHelper] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of helper invocation + // + // This operation is used when the helper is known to exist, + // so a `helperMissing` fallback is not required. + invokeKnownHelper: function invokeKnownHelper(paramSize, name) { + var helper = this.setupHelper(paramSize, name); + this.push(this.source.functionCall(helper.name, 'call', helper.callParams)); + }, + + // [invokeAmbiguous] + // + // On stack, before: hash, inverse, program, params..., ... + // On stack, after: result of disambiguation + // + // This operation is used when an expression like `{{foo}}` + // is provided, but we don't know at compile-time whether it + // is a helper or a path. + // + // This operation emits more code than the other options, + // and can be avoided by passing the `knownHelpers` and + // `knownHelpersOnly` flags at compile-time. + invokeAmbiguous: function invokeAmbiguous(name, helperCall) { + this.useRegister('helper'); + + var nonHelper = this.popStack(); + + this.emptyHash(); + var helper = this.setupHelper(0, name, helperCall); + + var helperName = this.lastHelper = this.nameLookup('helpers', name, 'helper'); + + var lookup = ['(', '(helper = ', helperName, ' || ', nonHelper, ')']; + if (!this.options.strict) { + lookup[0] = '(helper = '; + lookup.push(' != null ? helper : ', this.aliasable('container.hooks.helperMissing')); + } + + this.push(['(', lookup, helper.paramsInit ? ['),(', helper.paramsInit] : [], '),', '(typeof helper === ', this.aliasable('"function"'), ' ? ', this.source.functionCall('helper', 'call', helper.callParams), ' : helper))']); + }, + + // [invokePartial] + // + // On stack, before: context, ... + // On stack after: result of partial invocation + // + // This operation pops off a context, invokes a partial with that context, + // and pushes the result of the invocation back. + invokePartial: function invokePartial(isDynamic, name, indent) { + var params = [], + options = this.setupParams(name, 1, params); + + if (isDynamic) { + name = this.popStack(); + delete options.name; + } + + if (indent) { + options.indent = JSON.stringify(indent); + } + options.helpers = 'helpers'; + options.partials = 'partials'; + options.decorators = 'container.decorators'; + + if (!isDynamic) { + params.unshift(this.nameLookup('partials', name, 'partial')); + } else { + params.unshift(name); + } + + if (this.options.compat) { + options.depths = 'depths'; + } + options = this.objectLiteral(options); + params.push(options); + + this.push(this.source.functionCall('container.invokePartial', '', params)); + }, + + // [assignToHash] + // + // On stack, before: value, ..., hash, ... + // On stack, after: ..., hash, ... + // + // Pops a value off the stack and assigns it to the current hash + assignToHash: function assignToHash(key) { + var value = this.popStack(), + context = undefined, + type = undefined, + id = undefined; + + if (this.trackIds) { + id = this.popStack(); + } + if (this.stringParams) { + type = this.popStack(); + context = this.popStack(); + } + + var hash = this.hash; + if (context) { + hash.contexts[key] = context; + } + if (type) { + hash.types[key] = type; + } + if (id) { + hash.ids[key] = id; + } + hash.values[key] = value; + }, + + pushId: function pushId(type, name, child) { + if (type === 'BlockParam') { + this.pushStackLiteral('blockParams[' + name[0] + '].path[' + name[1] + ']' + (child ? ' + ' + JSON.stringify('.' + child) : '')); + } else if (type === 'PathExpression') { + this.pushString(name); + } else if (type === 'SubExpression') { + this.pushStackLiteral('true'); + } else { + this.pushStackLiteral('null'); + } + }, + + // HELPERS + + compiler: JavaScriptCompiler, + + compileChildren: function compileChildren(environment, options) { + var children = environment.children, + child = undefined, + compiler = undefined; + + for (var i = 0, l = children.length; i < l; i++) { + child = children[i]; + compiler = new this.compiler(); // eslint-disable-line new-cap + + var existing = this.matchExistingProgram(child); + + if (existing == null) { + this.context.programs.push(''); // Placeholder to prevent name conflicts for nested children + var index = this.context.programs.length; + child.index = index; + child.name = 'program' + index; + this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile); + this.context.decorators[index] = compiler.decorators; + this.context.environments[index] = child; + + this.useDepths = this.useDepths || compiler.useDepths; + this.useBlockParams = this.useBlockParams || compiler.useBlockParams; + child.useDepths = this.useDepths; + child.useBlockParams = this.useBlockParams; + } else { + child.index = existing.index; + child.name = 'program' + existing.index; + + this.useDepths = this.useDepths || existing.useDepths; + this.useBlockParams = this.useBlockParams || existing.useBlockParams; + } + } + }, + matchExistingProgram: function matchExistingProgram(child) { + for (var i = 0, len = this.context.environments.length; i < len; i++) { + var environment = this.context.environments[i]; + if (environment && environment.equals(child)) { + return environment; + } + } + }, + + programExpression: function programExpression(guid) { + var child = this.environment.children[guid], + programParams = [child.index, 'data', child.blockParams]; + + if (this.useBlockParams || this.useDepths) { + programParams.push('blockParams'); + } + if (this.useDepths) { + programParams.push('depths'); + } + + return 'container.program(' + programParams.join(', ') + ')'; + }, + + useRegister: function useRegister(name) { + if (!this.registers[name]) { + this.registers[name] = true; + this.registers.list.push(name); + } + }, + + push: function push(expr) { + if (!(expr instanceof Literal)) { + expr = this.source.wrap(expr); + } + + this.inlineStack.push(expr); + return expr; + }, + + pushStackLiteral: function pushStackLiteral(item) { + this.push(new Literal(item)); + }, + + pushSource: function pushSource(source) { + if (this.pendingContent) { + this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation)); + this.pendingContent = undefined; + } + + if (source) { + this.source.push(source); + } + }, + + replaceStack: function replaceStack(callback) { + var prefix = ['('], + stack = undefined, + createdStack = undefined, + usedLiteral = undefined; + + /* istanbul ignore next */ + if (!this.isInline()) { + throw new _exception2['default']('replaceStack on non-inline'); + } + + // We want to merge the inline statement into the replacement statement via ',' + var top = this.popStack(true); + + if (top instanceof Literal) { + // Literals do not need to be inlined + stack = [top.value]; + prefix = ['(', stack]; + usedLiteral = true; + } else { + // Get or create the current stack name for use by the inline + createdStack = true; + var _name = this.incrStack(); + + prefix = ['((', this.push(_name), ' = ', top, ')']; + stack = this.topStack(); + } + + var item = callback.call(this, stack); + + if (!usedLiteral) { + this.popStack(); + } + if (createdStack) { + this.stackSlot--; + } + this.push(prefix.concat(item, ')')); + }, + + incrStack: function incrStack() { + this.stackSlot++; + if (this.stackSlot > this.stackVars.length) { + this.stackVars.push('stack' + this.stackSlot); + } + return this.topStackName(); + }, + topStackName: function topStackName() { + return 'stack' + this.stackSlot; + }, + flushInline: function flushInline() { + var inlineStack = this.inlineStack; + this.inlineStack = []; + for (var i = 0, len = inlineStack.length; i < len; i++) { + var entry = inlineStack[i]; + /* istanbul ignore if */ + if (entry instanceof Literal) { + this.compileStack.push(entry); + } else { + var stack = this.incrStack(); + this.pushSource([stack, ' = ', entry, ';']); + this.compileStack.push(stack); + } + } + }, + isInline: function isInline() { + return this.inlineStack.length; + }, + + popStack: function popStack(wrapped) { + var inline = this.isInline(), + item = (inline ? this.inlineStack : this.compileStack).pop(); + + if (!wrapped && item instanceof Literal) { + return item.value; + } else { + if (!inline) { + /* istanbul ignore next */ + if (!this.stackSlot) { + throw new _exception2['default']('Invalid stack pop'); + } + this.stackSlot--; + } + return item; + } + }, + + topStack: function topStack() { + var stack = this.isInline() ? this.inlineStack : this.compileStack, + item = stack[stack.length - 1]; + + /* istanbul ignore if */ + if (item instanceof Literal) { + return item.value; + } else { + return item; + } + }, + + contextName: function contextName(context) { + if (this.useDepths && context) { + return 'depths[' + context + ']'; + } else { + return 'depth' + context; + } + }, + + quotedString: function quotedString(str) { + return this.source.quotedString(str); + }, + + objectLiteral: function objectLiteral(obj) { + return this.source.objectLiteral(obj); + }, + + aliasable: function aliasable(name) { + var ret = this.aliases[name]; + if (ret) { + ret.referenceCount++; + return ret; + } + + ret = this.aliases[name] = this.source.wrap(name); + ret.aliasable = true; + ret.referenceCount = 1; + + return ret; + }, + + setupHelper: function setupHelper(paramSize, name, blockHelper) { + var params = [], + paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper); + var foundHelper = this.nameLookup('helpers', name, 'helper'), + callContext = this.aliasable(this.contextName(0) + ' != null ? ' + this.contextName(0) + ' : (container.nullContext || {})'); + + return { + params: params, + paramsInit: paramsInit, + name: foundHelper, + callParams: [callContext].concat(params) + }; + }, + + setupParams: function setupParams(helper, paramSize, params) { + var options = {}, + contexts = [], + types = [], + ids = [], + objectArgs = !params, + param = undefined; + + if (objectArgs) { + params = []; + } + + options.name = this.quotedString(helper); + options.hash = this.popStack(); + + if (this.trackIds) { + options.hashIds = this.popStack(); + } + if (this.stringParams) { + options.hashTypes = this.popStack(); + options.hashContexts = this.popStack(); + } + + var inverse = this.popStack(), + program = this.popStack(); + + // Avoid setting fn and inverse if neither are set. This allows + // helpers to do a check for `if (options.fn)` + if (program || inverse) { + options.fn = program || 'container.noop'; + options.inverse = inverse || 'container.noop'; + } + + // The parameters go on to the stack in order (making sure that they are evaluated in order) + // so we need to pop them off the stack in reverse order + var i = paramSize; + while (i--) { + param = this.popStack(); + params[i] = param; + + if (this.trackIds) { + ids[i] = this.popStack(); + } + if (this.stringParams) { + types[i] = this.popStack(); + contexts[i] = this.popStack(); + } + } + + if (objectArgs) { + options.args = this.source.generateArray(params); + } + + if (this.trackIds) { + options.ids = this.source.generateArray(ids); + } + if (this.stringParams) { + options.types = this.source.generateArray(types); + options.contexts = this.source.generateArray(contexts); + } + + if (this.options.data) { + options.data = 'data'; + } + if (this.useBlockParams) { + options.blockParams = 'blockParams'; + } + return options; + }, + + setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) { + var options = this.setupParams(helper, paramSize, params); + options.loc = JSON.stringify(this.source.currentLocation); + options = this.objectLiteral(options); + if (useRegister) { + this.useRegister('options'); + params.push('options'); + return ['options=', options]; + } else if (params) { + params.push(options); + return ''; + } else { + return options; + } + } +}; + +(function () { + var reservedWords = ('break else new var' + ' case finally return void' + ' catch for switch while' + ' continue function this with' + ' default if throw' + ' delete in try' + ' do instanceof typeof' + ' abstract enum int short' + ' boolean export interface static' + ' byte extends long super' + ' char final native synchronized' + ' class float package throws' + ' const goto private transient' + ' debugger implements protected volatile' + ' double import public let yield await' + ' null true false').split(' '); + + var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {}; + + for (var i = 0, l = reservedWords.length; i < l; i++) { + compilerWords[reservedWords[i]] = true; + } +})(); + +/** + * @deprecated May be removed in the next major version + */ +JavaScriptCompiler.isValidJavaScriptVariableName = function (name) { + return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name); +}; + +function strictLookup(requireTerminal, compiler, parts, i, type) { + var stack = compiler.popStack(), + len = parts.length; + if (requireTerminal) { + len--; + } + + for (; i < len; i++) { + stack = compiler.nameLookup(stack, parts[i], type); + } + + if (requireTerminal) { + return [compiler.aliasable('container.strict'), '(', stack, ', ', compiler.quotedString(parts[i]), ', ', JSON.stringify(compiler.source.currentLocation), ' )']; + } else { + return stack; + } +} + +exports['default'] = JavaScriptCompiler; +module.exports = exports['default']; + + +},{"../base":87,"../exception":99,"../utils":115,"./code-gen":90}],94:[function(require,module,exports){ +// File ignored in coverage tests via setting in .istanbul.yml +/* Jison generated parser */ +"use strict"; + +exports.__esModule = true; +var handlebars = (function () { + var parser = { trace: function trace() {}, + yy: {}, + symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 }, + terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" }, + productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) { + + var $0 = $$.length - 1; + switch (yystate) { + case 1: + return $$[$0 - 1]; + break; + case 2: + this.$ = yy.prepareProgram($$[$0]); + break; + case 3: + this.$ = $$[$0]; + break; + case 4: + this.$ = $$[$0]; + break; + case 5: + this.$ = $$[$0]; + break; + case 6: + this.$ = $$[$0]; + break; + case 7: + this.$ = $$[$0]; + break; + case 8: + this.$ = $$[$0]; + break; + case 9: + this.$ = { + type: 'CommentStatement', + value: yy.stripComment($$[$0]), + strip: yy.stripFlags($$[$0], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 10: + this.$ = { + type: 'ContentStatement', + original: $$[$0], + value: $$[$0], + loc: yy.locInfo(this._$) + }; + + break; + case 11: + this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 12: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] }; + break; + case 13: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$); + break; + case 14: + this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$); + break; + case 15: + this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 16: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 17: + this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) }; + break; + case 18: + this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] }; + break; + case 19: + var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), + program = yy.prepareProgram([inverse], $$[$0 - 1].loc); + program.chained = true; + + this.$ = { strip: $$[$0 - 2].strip, program: program, chain: true }; + + break; + case 20: + this.$ = $$[$0]; + break; + case 21: + this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) }; + break; + case 22: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 23: + this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$); + break; + case 24: + this.$ = { + type: 'PartialStatement', + name: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + indent: '', + strip: yy.stripFlags($$[$0 - 4], $$[$0]), + loc: yy.locInfo(this._$) + }; + + break; + case 25: + this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$); + break; + case 26: + this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) }; + break; + case 27: + this.$ = $$[$0]; + break; + case 28: + this.$ = $$[$0]; + break; + case 29: + this.$ = { + type: 'SubExpression', + path: $$[$0 - 3], + params: $$[$0 - 2], + hash: $$[$0 - 1], + loc: yy.locInfo(this._$) + }; + + break; + case 30: + this.$ = { type: 'Hash', pairs: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 31: + this.$ = { type: 'HashPair', key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 32: + this.$ = yy.id($$[$0 - 1]); + break; + case 33: + this.$ = $$[$0]; + break; + case 34: + this.$ = $$[$0]; + break; + case 35: + this.$ = { type: 'StringLiteral', value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) }; + break; + case 36: + this.$ = { type: 'NumberLiteral', value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) }; + break; + case 37: + this.$ = { type: 'BooleanLiteral', value: $$[$0] === 'true', original: $$[$0] === 'true', loc: yy.locInfo(this._$) }; + break; + case 38: + this.$ = { type: 'UndefinedLiteral', original: undefined, value: undefined, loc: yy.locInfo(this._$) }; + break; + case 39: + this.$ = { type: 'NullLiteral', original: null, value: null, loc: yy.locInfo(this._$) }; + break; + case 40: + this.$ = $$[$0]; + break; + case 41: + this.$ = $$[$0]; + break; + case 42: + this.$ = yy.preparePath(true, $$[$0], this._$); + break; + case 43: + this.$ = yy.preparePath(false, $$[$0], this._$); + break; + case 44: + $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });this.$ = $$[$0 - 2]; + break; + case 45: + this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }]; + break; + case 46: + this.$ = []; + break; + case 47: + $$[$0 - 1].push($$[$0]); + break; + case 48: + this.$ = []; + break; + case 49: + $$[$0 - 1].push($$[$0]); + break; + case 50: + this.$ = []; + break; + case 51: + $$[$0 - 1].push($$[$0]); + break; + case 58: + this.$ = []; + break; + case 59: + $$[$0 - 1].push($$[$0]); + break; + case 64: + this.$ = []; + break; + case 65: + $$[$0 - 1].push($$[$0]); + break; + case 70: + this.$ = []; + break; + case 71: + $$[$0 - 1].push($$[$0]); + break; + case 78: + this.$ = []; + break; + case 79: + $$[$0 - 1].push($$[$0]); + break; + case 82: + this.$ = []; + break; + case 83: + $$[$0 - 1].push($$[$0]); + break; + case 86: + this.$ = []; + break; + case 87: + $$[$0 - 1].push($$[$0]); + break; + case 90: + this.$ = []; + break; + case 91: + $$[$0 - 1].push($$[$0]); + break; + case 94: + this.$ = []; + break; + case 95: + $$[$0 - 1].push($$[$0]); + break; + case 98: + this.$ = [$$[$0]]; + break; + case 99: + $$[$0 - 1].push($$[$0]); + break; + case 100: + this.$ = [$$[$0]]; + break; + case 101: + $$[$0 - 1].push($$[$0]); + break; + } + }, + table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }], + defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] }, + parseError: function parseError(str, hash) { + throw new Error(str); + }, + parse: function parse(input) { + var self = this, + stack = [0], + vstack = [null], + lstack = [], + table = this.table, + yytext = "", + yylineno = 0, + yyleng = 0, + recovering = 0, + TERROR = 2, + EOF = 1; + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {}; + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError; + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || 1; + if (typeof token !== "number") { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, + preErrorSymbol, + state, + action, + a, + r, + yyval = {}, + p, + len, + newState, + expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == "undefined") { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === "undefined" || !action.length || !action[0]) { + var errStr = ""; + if (!recovering) { + expected = []; + for (p in table[state]) if (this.terminals_[p] && p > 2) { + expected.push("'" + this.terminals_[p] + "'"); + } + if (this.lexer.showPosition) { + errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; + } else { + errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'"); + } + this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected }); + } + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) recovering--; + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column }; + if (ranges) { + yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; + } + r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); + if (typeof r !== "undefined") { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; + } + }; + /* Jison generated lexer */ + var lexer = (function () { + var lexer = { EOF: 1, + parseError: function parseError(str, hash) { + if (this.yy.parser) { + this.yy.parser.parseError(str, hash); + } else { + throw new Error(str); + } + }, + setInput: function setInput(input) { + this._input = input; + this._more = this._less = this.done = false; + this.yylineno = this.yyleng = 0; + this.yytext = this.matched = this.match = ''; + this.conditionStack = ['INITIAL']; + this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 }; + if (this.options.ranges) this.yylloc.range = [0, 0]; + this.offset = 0; + return this; + }, + input: function input() { + var ch = this._input[0]; + this.yytext += ch; + this.yyleng++; + this.offset++; + this.match += ch; + this.matched += ch; + var lines = ch.match(/(?:\r\n?|\n).*/g); + if (lines) { + this.yylineno++; + this.yylloc.last_line++; + } else { + this.yylloc.last_column++; + } + if (this.options.ranges) this.yylloc.range[1]++; + + this._input = this._input.slice(1); + return ch; + }, + unput: function unput(ch) { + var len = ch.length; + var lines = ch.split(/(?:\r\n?|\n)/g); + + this._input = ch + this._input; + this.yytext = this.yytext.substr(0, this.yytext.length - len - 1); + //this.yyleng -= len; + this.offset -= len; + var oldLines = this.match.split(/(?:\r\n?|\n)/g); + this.match = this.match.substr(0, this.match.length - 1); + this.matched = this.matched.substr(0, this.matched.length - 1); + + if (lines.length - 1) this.yylineno -= lines.length - 1; + var r = this.yylloc.range; + + this.yylloc = { first_line: this.yylloc.first_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.first_column, + last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len + }; + + if (this.options.ranges) { + this.yylloc.range = [r[0], r[0] + this.yyleng - len]; + } + return this; + }, + more: function more() { + this._more = true; + return this; + }, + less: function less(n) { + this.unput(this.match.slice(n)); + }, + pastInput: function pastInput() { + var past = this.matched.substr(0, this.matched.length - this.match.length); + return (past.length > 20 ? '...' : '') + past.substr(-20).replace(/\n/g, ""); + }, + upcomingInput: function upcomingInput() { + var next = this.match; + if (next.length < 20) { + next += this._input.substr(0, 20 - next.length); + } + return (next.substr(0, 20) + (next.length > 20 ? '...' : '')).replace(/\n/g, ""); + }, + showPosition: function showPosition() { + var pre = this.pastInput(); + var c = new Array(pre.length + 1).join("-"); + return pre + this.upcomingInput() + "\n" + c + "^"; + }, + next: function next() { + if (this.done) { + return this.EOF; + } + if (!this._input) this.done = true; + + var token, match, tempMatch, index, col, lines; + if (!this._more) { + this.yytext = ''; + this.match = ''; + } + var rules = this._currentRules(); + for (var i = 0; i < rules.length; i++) { + tempMatch = this._input.match(this.rules[rules[i]]); + if (tempMatch && (!match || tempMatch[0].length > match[0].length)) { + match = tempMatch; + index = i; + if (!this.options.flex) break; + } + } + if (match) { + lines = match[0].match(/(?:\r\n?|\n).*/g); + if (lines) this.yylineno += lines.length; + this.yylloc = { first_line: this.yylloc.last_line, + last_line: this.yylineno + 1, + first_column: this.yylloc.last_column, + last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length }; + this.yytext += match[0]; + this.match += match[0]; + this.matches = match; + this.yyleng = this.yytext.length; + if (this.options.ranges) { + this.yylloc.range = [this.offset, this.offset += this.yyleng]; + } + this._more = false; + this._input = this._input.slice(match[0].length); + this.matched += match[0]; + token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]); + if (this.done && this._input) this.done = false; + if (token) return token;else return; + } + if (this._input === "") { + return this.EOF; + } else { + return this.parseError('Lexical error on line ' + (this.yylineno + 1) + '. Unrecognized text.\n' + this.showPosition(), { text: "", token: null, line: this.yylineno }); + } + }, + lex: function lex() { + var r = this.next(); + if (typeof r !== 'undefined') { + return r; + } else { + return this.lex(); + } + }, + begin: function begin(condition) { + this.conditionStack.push(condition); + }, + popState: function popState() { + return this.conditionStack.pop(); + }, + _currentRules: function _currentRules() { + return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules; + }, + topState: function topState() { + return this.conditionStack[this.conditionStack.length - 2]; + }, + pushState: function begin(condition) { + this.begin(condition); + } }; + lexer.options = {}; + lexer.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) { + + function strip(start, end) { + return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start); + } + + var YYSTATE = YY_START; + switch ($avoiding_name_collisions) { + case 0: + if (yy_.yytext.slice(-2) === "\\\\") { + strip(0, 1); + this.begin("mu"); + } else if (yy_.yytext.slice(-1) === "\\") { + strip(0, 1); + this.begin("emu"); + } else { + this.begin("mu"); + } + if (yy_.yytext) return 15; + + break; + case 1: + return 15; + break; + case 2: + this.popState(); + return 15; + + break; + case 3: + this.begin('raw');return 15; + break; + case 4: + this.popState(); + // Should be using `this.topState()` below, but it currently + // returns the second top instead of the first top. Opened an + // issue about it at https://github.com/zaach/jison/issues/291 + if (this.conditionStack[this.conditionStack.length - 1] === 'raw') { + return 15; + } else { + strip(5, 9); + return 'END_RAW_BLOCK'; + } + + break; + case 5: + return 15; + break; + case 6: + this.popState(); + return 14; + + break; + case 7: + return 65; + break; + case 8: + return 68; + break; + case 9: + return 19; + break; + case 10: + this.popState(); + this.begin('raw'); + return 23; + + break; + case 11: + return 55; + break; + case 12: + return 60; + break; + case 13: + return 29; + break; + case 14: + return 47; + break; + case 15: + this.popState();return 44; + break; + case 16: + this.popState();return 44; + break; + case 17: + return 34; + break; + case 18: + return 39; + break; + case 19: + return 51; + break; + case 20: + return 48; + break; + case 21: + this.unput(yy_.yytext); + this.popState(); + this.begin('com'); + + break; + case 22: + this.popState(); + return 14; + + break; + case 23: + return 48; + break; + case 24: + return 73; + break; + case 25: + return 72; + break; + case 26: + return 72; + break; + case 27: + return 87; + break; + case 28: + // ignore whitespace + break; + case 29: + this.popState();return 54; + break; + case 30: + this.popState();return 33; + break; + case 31: + yy_.yytext = strip(1, 2).replace(/\\"/g, '"');return 80; + break; + case 32: + yy_.yytext = strip(1, 2).replace(/\\'/g, "'");return 80; + break; + case 33: + return 85; + break; + case 34: + return 82; + break; + case 35: + return 82; + break; + case 36: + return 83; + break; + case 37: + return 84; + break; + case 38: + return 81; + break; + case 39: + return 75; + break; + case 40: + return 77; + break; + case 41: + return 72; + break; + case 42: + yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');return 72; + break; + case 43: + return 'INVALID'; + break; + case 44: + return 5; + break; + } + }; + lexer.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/]; + lexer.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } }; + return lexer; + })(); + parser.lexer = lexer; + function Parser() { + this.yy = {}; + }Parser.prototype = parser;parser.Parser = Parser; + return new Parser(); +})();exports["default"] = handlebars; +module.exports = exports["default"]; + + +},{}],95:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +function Visitor() { + this.parents = []; +} + +Visitor.prototype = { + constructor: Visitor, + mutating: false, + + // Visits a given value. If mutating, will replace the value if necessary. + acceptKey: function acceptKey(node, name) { + var value = this.accept(node[name]); + if (this.mutating) { + // Hacky sanity check: This may have a few false positives for type for the helper + // methods but will generally do the right thing without a lot of overhead. + if (value && !Visitor.prototype[value.type]) { + throw new _exception2['default']('Unexpected node type "' + value.type + '" found when accepting ' + name + ' on ' + node.type); + } + node[name] = value; + } + }, + + // Performs an accept operation with added sanity check to ensure + // required keys are not removed. + acceptRequired: function acceptRequired(node, name) { + this.acceptKey(node, name); + + if (!node[name]) { + throw new _exception2['default'](node.type + ' requires ' + name); + } + }, + + // Traverses a given array. If mutating, empty respnses will be removed + // for child elements. + acceptArray: function acceptArray(array) { + for (var i = 0, l = array.length; i < l; i++) { + this.acceptKey(array, i); + + if (!array[i]) { + array.splice(i, 1); + i--; + l--; + } + } + }, + + accept: function accept(object) { + if (!object) { + return; + } + + /* istanbul ignore next: Sanity code */ + if (!this[object.type]) { + throw new _exception2['default']('Unknown type: ' + object.type, object); + } + + if (this.current) { + this.parents.unshift(this.current); + } + this.current = object; + + var ret = this[object.type](object); + + this.current = this.parents.shift(); + + if (!this.mutating || ret) { + return ret; + } else if (ret !== false) { + return object; + } + }, + + Program: function Program(program) { + this.acceptArray(program.body); + }, + + MustacheStatement: visitSubExpression, + Decorator: visitSubExpression, + + BlockStatement: visitBlock, + DecoratorBlock: visitBlock, + + PartialStatement: visitPartial, + PartialBlockStatement: function PartialBlockStatement(partial) { + visitPartial.call(this, partial); + + this.acceptKey(partial, 'program'); + }, + + ContentStatement: function ContentStatement() /* content */{}, + CommentStatement: function CommentStatement() /* comment */{}, + + SubExpression: visitSubExpression, + + PathExpression: function PathExpression() /* path */{}, + + StringLiteral: function StringLiteral() /* string */{}, + NumberLiteral: function NumberLiteral() /* number */{}, + BooleanLiteral: function BooleanLiteral() /* bool */{}, + UndefinedLiteral: function UndefinedLiteral() /* literal */{}, + NullLiteral: function NullLiteral() /* literal */{}, + + Hash: function Hash(hash) { + this.acceptArray(hash.pairs); + }, + HashPair: function HashPair(pair) { + this.acceptRequired(pair, 'value'); + } +}; + +function visitSubExpression(mustache) { + this.acceptRequired(mustache, 'path'); + this.acceptArray(mustache.params); + this.acceptKey(mustache, 'hash'); +} +function visitBlock(block) { + visitSubExpression.call(this, block); + + this.acceptKey(block, 'program'); + this.acceptKey(block, 'inverse'); +} +function visitPartial(partial) { + this.acceptRequired(partial, 'name'); + this.acceptArray(partial.params); + this.acceptKey(partial, 'hash'); +} + +exports['default'] = Visitor; +module.exports = exports['default']; + + +},{"../exception":99}],96:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _visitor = require('./visitor'); + +var _visitor2 = _interopRequireDefault(_visitor); + +function WhitespaceControl() { + var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + + this.options = options; +} +WhitespaceControl.prototype = new _visitor2['default'](); + +WhitespaceControl.prototype.Program = function (program) { + var doStandalone = !this.options.ignoreStandalone; + + var isRoot = !this.isRootSeen; + this.isRootSeen = true; + + var body = program.body; + for (var i = 0, l = body.length; i < l; i++) { + var current = body[i], + strip = this.accept(current); + + if (!strip) { + continue; + } + + var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), + _isNextWhitespace = isNextWhitespace(body, i, isRoot), + openStandalone = strip.openStandalone && _isPrevWhitespace, + closeStandalone = strip.closeStandalone && _isNextWhitespace, + inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace; + + if (strip.close) { + omitRight(body, i, true); + } + if (strip.open) { + omitLeft(body, i, true); + } + + if (doStandalone && inlineStandalone) { + omitRight(body, i); + + if (omitLeft(body, i)) { + // If we are on a standalone node, save the indent info for partials + if (current.type === 'PartialStatement') { + // Pull out the whitespace from the final line + current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1]; + } + } + } + if (doStandalone && openStandalone) { + omitRight((current.program || current.inverse).body); + + // Strip out the previous content node if it's whitespace only + omitLeft(body, i); + } + if (doStandalone && closeStandalone) { + // Always strip the next node + omitRight(body, i); + + omitLeft((current.inverse || current.program).body); + } + } + + return program; +}; + +WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function (block) { + this.accept(block.program); + this.accept(block.inverse); + + // Find the inverse program that is involed with whitespace stripping. + var program = block.program || block.inverse, + inverse = block.program && block.inverse, + firstInverse = inverse, + lastInverse = inverse; + + if (inverse && inverse.chained) { + firstInverse = inverse.body[0].program; + + // Walk the inverse chain to find the last inverse that is actually in the chain. + while (lastInverse.chained) { + lastInverse = lastInverse.body[lastInverse.body.length - 1].program; + } + } + + var strip = { + open: block.openStrip.open, + close: block.closeStrip.close, + + // Determine the standalone candiacy. Basically flag our content as being possibly standalone + // so our parent can determine if we actually are standalone + openStandalone: isNextWhitespace(program.body), + closeStandalone: isPrevWhitespace((firstInverse || program).body) + }; + + if (block.openStrip.close) { + omitRight(program.body, null, true); + } + + if (inverse) { + var inverseStrip = block.inverseStrip; + + if (inverseStrip.open) { + omitLeft(program.body, null, true); + } + + if (inverseStrip.close) { + omitRight(firstInverse.body, null, true); + } + if (block.closeStrip.open) { + omitLeft(lastInverse.body, null, true); + } + + // Find standalone else statments + if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) { + omitLeft(program.body); + omitRight(firstInverse.body); + } + } else if (block.closeStrip.open) { + omitLeft(program.body, null, true); + } + + return strip; +}; + +WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function (mustache) { + return mustache.strip; +}; + +WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function (node) { + /* istanbul ignore next */ + var strip = node.strip || {}; + return { + inlineStandalone: true, + open: strip.open, + close: strip.close + }; +}; + +function isPrevWhitespace(body, i, isRoot) { + if (i === undefined) { + i = body.length; + } + + // Nodes that end with newlines are considered whitespace (but are special + // cased for strip operations) + var prev = body[i - 1], + sibling = body[i - 2]; + if (!prev) { + return isRoot; + } + + if (prev.type === 'ContentStatement') { + return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original); + } +} +function isNextWhitespace(body, i, isRoot) { + if (i === undefined) { + i = -1; + } + + var next = body[i + 1], + sibling = body[i + 2]; + if (!next) { + return isRoot; + } + + if (next.type === 'ContentStatement') { + return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original); + } +} + +// Marks the node to the right of the position as omitted. +// I.e. {{foo}}' ' will mark the ' ' node as omitted. +// +// If i is undefined, then the first child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitRight(body, i, multiple) { + var current = body[i == null ? 0 : i + 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.rightStripped) { + return; + } + + var original = current.value; + current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, ''); + current.rightStripped = current.value !== original; +} + +// Marks the node to the left of the position as omitted. +// I.e. ' '{{foo}} will mark the ' ' node as omitted. +// +// If i is undefined then the last child will be marked as such. +// +// If mulitple is truthy then all whitespace will be stripped out until non-whitespace +// content is met. +function omitLeft(body, i, multiple) { + var current = body[i == null ? body.length - 1 : i - 1]; + if (!current || current.type !== 'ContentStatement' || !multiple && current.leftStripped) { + return; + } + + // We omit the last node if it's whitespace only and not preceded by a non-content node. + var original = current.value; + current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, ''); + current.leftStripped = current.value !== original; + return current.leftStripped; +} + +exports['default'] = WhitespaceControl; +module.exports = exports['default']; + + +},{"./visitor":95}],97:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.registerDefaultDecorators = registerDefaultDecorators; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _decoratorsInline = require('./decorators/inline'); + +var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline); + +function registerDefaultDecorators(instance) { + _decoratorsInline2['default'](instance); +} + + +},{"./decorators/inline":98}],98:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerDecorator('inline', function (fn, props, container, options) { + var ret = fn; + if (!props.partials) { + props.partials = {}; + ret = function (context, options) { + // Create a new partials stack frame prior to exec. + var original = container.partials; + container.partials = _utils.extend({}, original, props.partials); + var ret = fn(context, options); + container.partials = original; + return ret; + }; + } + + props.partials[options.args[0]] = options.fn; + + return ret; + }); +}; + +module.exports = exports['default']; + + +},{"../utils":115}],99:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +var errorProps = ['description', 'fileName', 'lineNumber', 'endLineNumber', 'message', 'name', 'number', 'stack']; + +function Exception(message, node) { + var loc = node && node.loc, + line = undefined, + endLineNumber = undefined, + column = undefined, + endColumn = undefined; + + if (loc) { + line = loc.start.line; + endLineNumber = loc.end.line; + column = loc.start.column; + endColumn = loc.end.column; + + message += ' - ' + line + ':' + column; + } + + var tmp = Error.prototype.constructor.call(this, message); + + // Unfortunately errors are not enumerable in Chrome (at least), so `for prop in tmp` doesn't work. + for (var idx = 0; idx < errorProps.length; idx++) { + this[errorProps[idx]] = tmp[errorProps[idx]]; + } + + /* istanbul ignore else */ + if (Error.captureStackTrace) { + Error.captureStackTrace(this, Exception); + } + + try { + if (loc) { + this.lineNumber = line; + this.endLineNumber = endLineNumber; + + // Work around issue under safari where we can't directly set the column value + /* istanbul ignore next */ + if (Object.defineProperty) { + Object.defineProperty(this, 'column', { + value: column, + enumerable: true + }); + Object.defineProperty(this, 'endColumn', { + value: endColumn, + enumerable: true + }); + } else { + this.column = column; + this.endColumn = endColumn; + } + } + } catch (nop) { + /* Ignore if the browser is very particular */ + } +} + +Exception.prototype = new Error(); + +exports['default'] = Exception; +module.exports = exports['default']; + + +},{}],100:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.registerDefaultHelpers = registerDefaultHelpers; +exports.moveHelperToHooks = moveHelperToHooks; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _helpersBlockHelperMissing = require('./helpers/block-helper-missing'); + +var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing); + +var _helpersEach = require('./helpers/each'); + +var _helpersEach2 = _interopRequireDefault(_helpersEach); + +var _helpersHelperMissing = require('./helpers/helper-missing'); + +var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing); + +var _helpersIf = require('./helpers/if'); + +var _helpersIf2 = _interopRequireDefault(_helpersIf); + +var _helpersLog = require('./helpers/log'); + +var _helpersLog2 = _interopRequireDefault(_helpersLog); + +var _helpersLookup = require('./helpers/lookup'); + +var _helpersLookup2 = _interopRequireDefault(_helpersLookup); + +var _helpersWith = require('./helpers/with'); + +var _helpersWith2 = _interopRequireDefault(_helpersWith); + +function registerDefaultHelpers(instance) { + _helpersBlockHelperMissing2['default'](instance); + _helpersEach2['default'](instance); + _helpersHelperMissing2['default'](instance); + _helpersIf2['default'](instance); + _helpersLog2['default'](instance); + _helpersLookup2['default'](instance); + _helpersWith2['default'](instance); +} + +function moveHelperToHooks(instance, helperName, keepHelper) { + if (instance.helpers[helperName]) { + instance.hooks[helperName] = instance.helpers[helperName]; + if (!keepHelper) { + delete instance.helpers[helperName]; + } + } +} + + +},{"./helpers/block-helper-missing":101,"./helpers/each":102,"./helpers/helper-missing":103,"./helpers/if":104,"./helpers/log":105,"./helpers/lookup":106,"./helpers/with":107}],101:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _utils = require('../utils'); + +exports['default'] = function (instance) { + instance.registerHelper('blockHelperMissing', function (context, options) { + var inverse = options.inverse, + fn = options.fn; + + if (context === true) { + return fn(this); + } else if (context === false || context == null) { + return inverse(this); + } else if (_utils.isArray(context)) { + if (context.length > 0) { + if (options.ids) { + options.ids = [options.name]; + } + + return instance.helpers.each(context, options); + } else { + return inverse(this); + } + } else { + if (options.data && options.ids) { + var data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name); + options = { data: data }; + } + + return fn(context, options); + } + }); +}; + +module.exports = exports['default']; + + +},{"../utils":115}],102:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('../utils'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('each', function (context, options) { + if (!options) { + throw new _exception2['default']('Must pass iterator to #each'); + } + + var fn = options.fn, + inverse = options.inverse, + i = 0, + ret = '', + data = undefined, + contextPath = undefined; + + if (options.data && options.ids) { + contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + '.'; + } + + if (_utils.isFunction(context)) { + context = context.call(this); + } + + if (options.data) { + data = _utils.createFrame(options.data); + } + + function execIteration(field, index, last) { + if (data) { + data.key = field; + data.index = index; + data.first = index === 0; + data.last = !!last; + + if (contextPath) { + data.contextPath = contextPath + field; + } + } + + ret = ret + fn(context[field], { + data: data, + blockParams: _utils.blockParams([context[field], field], [contextPath + field, null]) + }); + } + + if (context && typeof context === 'object') { + if (_utils.isArray(context)) { + for (var j = context.length; i < j; i++) { + if (i in context) { + execIteration(i, i, i === context.length - 1); + } + } + } else if (typeof Symbol === 'function' && context[Symbol.iterator]) { + var newContext = []; + var iterator = context[Symbol.iterator](); + for (var it = iterator.next(); !it.done; it = iterator.next()) { + newContext.push(it.value); + } + context = newContext; + for (var j = context.length; i < j; i++) { + execIteration(i, i, i === context.length - 1); + } + } else { + (function () { + var priorKey = undefined; + + Object.keys(context).forEach(function (key) { + // We're running the iterations one step out of sync so we can detect + // the last iteration without have to scan the object twice and create + // an itermediate keys array. + if (priorKey !== undefined) { + execIteration(priorKey, i - 1); + } + priorKey = key; + i++; + }); + if (priorKey !== undefined) { + execIteration(priorKey, i - 1, true); + } + })(); + } + } + + if (i === 0) { + ret = inverse(this); + } + + return ret; + }); +}; + +module.exports = exports['default']; + + +},{"../exception":99,"../utils":115}],103:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('helperMissing', function () /* [args, ]options */{ + if (arguments.length === 1) { + // A missing field in a {{foo}} construct. + return undefined; + } else { + // Someone is actually trying to call something, blow up. + throw new _exception2['default']('Missing helper: "' + arguments[arguments.length - 1].name + '"'); + } + }); +}; + +module.exports = exports['default']; + + +},{"../exception":99}],104:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('../utils'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('if', function (conditional, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#if requires exactly one argument'); + } + if (_utils.isFunction(conditional)) { + conditional = conditional.call(this); + } + + // Default behavior is to render the positive path if the value is truthy and not empty. + // The `includeZero` option may be set to treat the condtional as purely not empty based on the + // behavior of isEmpty. Effectively this determines if 0 is handled by the positive path or negative. + if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) { + return options.inverse(this); + } else { + return options.fn(this); + } + }); + + instance.registerHelper('unless', function (conditional, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#unless requires exactly one argument'); + } + return instance.helpers['if'].call(this, conditional, { + fn: options.inverse, + inverse: options.fn, + hash: options.hash + }); + }); +}; + +module.exports = exports['default']; + + +},{"../exception":99,"../utils":115}],105:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (instance) { + instance.registerHelper('log', function () /* message, options */{ + var args = [undefined], + options = arguments[arguments.length - 1]; + for (var i = 0; i < arguments.length - 1; i++) { + args.push(arguments[i]); + } + + var level = 1; + if (options.hash.level != null) { + level = options.hash.level; + } else if (options.data && options.data.level != null) { + level = options.data.level; + } + args[0] = level; + + instance.log.apply(instance, args); + }); +}; + +module.exports = exports['default']; + + +},{}],106:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (instance) { + instance.registerHelper('lookup', function (obj, field, options) { + if (!obj) { + // Note for 5.0: Change to "obj == null" in 5.0 + return obj; + } + return options.lookupProperty(obj, field); + }); +}; + +module.exports = exports['default']; + + +},{}],107:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _utils = require('../utils'); + +var _exception = require('../exception'); + +var _exception2 = _interopRequireDefault(_exception); + +exports['default'] = function (instance) { + instance.registerHelper('with', function (context, options) { + if (arguments.length != 2) { + throw new _exception2['default']('#with requires exactly one argument'); + } + if (_utils.isFunction(context)) { + context = context.call(this); + } + + var fn = options.fn; + + if (!_utils.isEmpty(context)) { + var data = options.data; + if (options.data && options.ids) { + data = _utils.createFrame(options.data); + data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]); + } + + return fn(context, { + data: data, + blockParams: _utils.blockParams([context], [data && data.contextPath]) + }); + } else { + return options.inverse(this); + } + }); +}; + +module.exports = exports['default']; + + +},{"../exception":99,"../utils":115}],108:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.createNewLookupObject = createNewLookupObject; + +var _utils = require('../utils'); + +/** + * Create a new object with "null"-prototype to avoid truthy results on prototype properties. + * The resulting object can be used with "object[property]" to check if a property exists + * @param {...object} sources a varargs parameter of source objects that will be merged + * @returns {object} + */ + +function createNewLookupObject() { + for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) { + sources[_key] = arguments[_key]; + } + + return _utils.extend.apply(undefined, [Object.create(null)].concat(sources)); +} + + +},{"../utils":115}],109:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.createProtoAccessControl = createProtoAccessControl; +exports.resultIsAllowed = resultIsAllowed; +exports.resetLoggedProperties = resetLoggedProperties; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +var _createNewLookupObject = require('./create-new-lookup-object'); + +var _logger = require('../logger'); + +var _logger2 = _interopRequireDefault(_logger); + +var loggedProperties = Object.create(null); + +function createProtoAccessControl(runtimeOptions) { + var defaultMethodWhiteList = Object.create(null); + defaultMethodWhiteList['constructor'] = false; + defaultMethodWhiteList['__defineGetter__'] = false; + defaultMethodWhiteList['__defineSetter__'] = false; + defaultMethodWhiteList['__lookupGetter__'] = false; + + var defaultPropertyWhiteList = Object.create(null); + // eslint-disable-next-line no-proto + defaultPropertyWhiteList['__proto__'] = false; + + return { + properties: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties), + defaultValue: runtimeOptions.allowProtoPropertiesByDefault + }, + methods: { + whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods), + defaultValue: runtimeOptions.allowProtoMethodsByDefault + } + }; +} + +function resultIsAllowed(result, protoAccessControl, propertyName) { + if (typeof result === 'function') { + return checkWhiteList(protoAccessControl.methods, propertyName); + } else { + return checkWhiteList(protoAccessControl.properties, propertyName); + } +} + +function checkWhiteList(protoAccessControlForType, propertyName) { + if (protoAccessControlForType.whitelist[propertyName] !== undefined) { + return protoAccessControlForType.whitelist[propertyName] === true; + } + if (protoAccessControlForType.defaultValue !== undefined) { + return protoAccessControlForType.defaultValue; + } + logUnexpecedPropertyAccessOnce(propertyName); + return false; +} + +function logUnexpecedPropertyAccessOnce(propertyName) { + if (loggedProperties[propertyName] !== true) { + loggedProperties[propertyName] = true; + _logger2['default'].log('error', 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\n' + 'You can add a runtime option to disable the check or this warning:\n' + 'See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details'); + } +} + +function resetLoggedProperties() { + Object.keys(loggedProperties).forEach(function (propertyName) { + delete loggedProperties[propertyName]; + }); +} + + +},{"../logger":111,"./create-new-lookup-object":108}],110:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.wrapHelper = wrapHelper; + +function wrapHelper(helper, transformOptionsFn) { + if (typeof helper !== 'function') { + // This should not happen, but apparently it does in https://github.com/wycats/handlebars.js/issues/1639 + // We try to make the wrapper least-invasive by not wrapping it, if the helper is not a function. + return helper; + } + var wrapper = function wrapper() /* dynamic arguments */{ + var options = arguments[arguments.length - 1]; + arguments[arguments.length - 1] = transformOptionsFn(options); + return helper.apply(this, arguments); + }; + return wrapper; +} + + +},{}],111:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; + +var _utils = require('./utils'); + +var logger = { + methodMap: ['debug', 'info', 'warn', 'error'], + level: 'info', + + // Maps a given level value to the `methodMap` indexes above. + lookupLevel: function lookupLevel(level) { + if (typeof level === 'string') { + var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase()); + if (levelMap >= 0) { + level = levelMap; + } else { + level = parseInt(level, 10); + } + } + + return level; + }, + + // Can be overridden in the host environment + log: function log(level) { + level = logger.lookupLevel(level); + + if (typeof console !== 'undefined' && logger.lookupLevel(logger.level) <= level) { + var method = logger.methodMap[level]; + // eslint-disable-next-line no-console + if (!console[method]) { + method = 'log'; + } + + for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { + message[_key - 1] = arguments[_key]; + } + + console[method].apply(console, message); // eslint-disable-line no-console + } + } +}; + +exports['default'] = logger; +module.exports = exports['default']; + + +},{"./utils":115}],112:[function(require,module,exports){ +/* global globalThis */ +'use strict'; + +exports.__esModule = true; + +exports['default'] = function (Handlebars) { + /* istanbul ignore next */ + // https://mathiasbynens.be/notes/globalthis + (function () { + if (typeof globalThis === 'object') return; + Object.prototype.__defineGetter__('__magic__', function () { + return this; + }); + __magic__.globalThis = __magic__; // eslint-disable-line no-undef + delete Object.prototype.__magic__; + })(); + + var $Handlebars = globalThis.Handlebars; + + /* istanbul ignore next */ + Handlebars.noConflict = function () { + if (globalThis.Handlebars === Handlebars) { + globalThis.Handlebars = $Handlebars; + } + return Handlebars; + }; +}; + +module.exports = exports['default']; + + +},{}],113:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.checkRevision = checkRevision; +exports.template = template; +exports.wrapProgram = wrapProgram; +exports.resolvePartial = resolvePartial; +exports.invokePartial = invokePartial; +exports.noop = noop; +// istanbul ignore next + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; } + +// istanbul ignore next + +function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } } + +var _utils = require('./utils'); + +var Utils = _interopRequireWildcard(_utils); + +var _exception = require('./exception'); + +var _exception2 = _interopRequireDefault(_exception); + +var _base = require('./base'); + +var _helpers = require('./helpers'); + +var _internalWrapHelper = require('./internal/wrapHelper'); + +var _internalProtoAccess = require('./internal/proto-access'); + +function checkRevision(compilerInfo) { + var compilerRevision = compilerInfo && compilerInfo[0] || 1, + currentRevision = _base.COMPILER_REVISION; + + if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) { + return; + } + + if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) { + var runtimeVersions = _base.REVISION_CHANGES[currentRevision], + compilerVersions = _base.REVISION_CHANGES[compilerRevision]; + throw new _exception2['default']('Template was precompiled with an older version of Handlebars than the current runtime. ' + 'Please update your precompiler to a newer version (' + runtimeVersions + ') or downgrade your runtime to an older version (' + compilerVersions + ').'); + } else { + // Use the embedded version info since the runtime doesn't know about this revision yet + throw new _exception2['default']('Template was precompiled with a newer version of Handlebars than the current runtime. ' + 'Please update your runtime to a newer version (' + compilerInfo[1] + ').'); + } +} + +function template(templateSpec, env) { + /* istanbul ignore next */ + if (!env) { + throw new _exception2['default']('No environment passed to template'); + } + if (!templateSpec || !templateSpec.main) { + throw new _exception2['default']('Unknown template object: ' + typeof templateSpec); + } + + templateSpec.main.decorator = templateSpec.main_d; + + // Note: Using env.VM references rather than local var references throughout this section to allow + // for external users to override these as pseudo-supported APIs. + env.VM.checkRevision(templateSpec.compiler); + + // backwards compatibility for precompiled templates with compiler-version 7 (<4.3.0) + var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7; + + function invokePartialWrapper(partial, context, options) { + if (options.hash) { + context = Utils.extend({}, context, options.hash); + if (options.ids) { + options.ids[0] = true; + } + } + partial = env.VM.resolvePartial.call(this, partial, context, options); + + var extendedOptions = Utils.extend({}, options, { + hooks: this.hooks, + protoAccessControl: this.protoAccessControl + }); + + var result = env.VM.invokePartial.call(this, partial, context, extendedOptions); + + if (result == null && env.compile) { + options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env); + result = options.partials[options.name](context, extendedOptions); + } + if (result != null) { + if (options.indent) { + var lines = result.split('\n'); + for (var i = 0, l = lines.length; i < l; i++) { + if (!lines[i] && i + 1 === l) { + break; + } + + lines[i] = options.indent + lines[i]; + } + result = lines.join('\n'); + } + return result; + } else { + throw new _exception2['default']('The partial ' + options.name + ' could not be compiled when running in runtime-only mode'); + } + } + + // Just add water + var container = { + strict: function strict(obj, name, loc) { + if (!obj || !(name in obj)) { + throw new _exception2['default']('"' + name + '" not defined in ' + obj, { + loc: loc + }); + } + return container.lookupProperty(obj, name); + }, + lookupProperty: function lookupProperty(parent, propertyName) { + var result = parent[propertyName]; + if (result == null) { + return result; + } + if (Object.prototype.hasOwnProperty.call(parent, propertyName)) { + return result; + } + + if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) { + return result; + } + return undefined; + }, + lookup: function lookup(depths, name) { + var len = depths.length; + for (var i = 0; i < len; i++) { + var result = depths[i] && container.lookupProperty(depths[i], name); + if (result != null) { + return depths[i][name]; + } + } + }, + lambda: function lambda(current, context) { + return typeof current === 'function' ? current.call(context) : current; + }, + + escapeExpression: Utils.escapeExpression, + invokePartial: invokePartialWrapper, + + fn: function fn(i) { + var ret = templateSpec[i]; + ret.decorator = templateSpec[i + '_d']; + return ret; + }, + + programs: [], + program: function program(i, data, declaredBlockParams, blockParams, depths) { + var programWrapper = this.programs[i], + fn = this.fn(i); + if (data || depths || blockParams || declaredBlockParams) { + programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths); + } else if (!programWrapper) { + programWrapper = this.programs[i] = wrapProgram(this, i, fn); + } + return programWrapper; + }, + + data: function data(value, depth) { + while (value && depth--) { + value = value._parent; + } + return value; + }, + mergeIfNeeded: function mergeIfNeeded(param, common) { + var obj = param || common; + + if (param && common && param !== common) { + obj = Utils.extend({}, common, param); + } + + return obj; + }, + // An empty object to use as replacement for null-contexts + nullContext: Object.seal({}), + + noop: env.VM.noop, + compilerInfo: templateSpec.compiler + }; + + function ret(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var data = options.data; + + ret._setup(options); + if (!options.partial && templateSpec.useData) { + data = initData(context, data); + } + var depths = undefined, + blockParams = templateSpec.useBlockParams ? [] : undefined; + if (templateSpec.useDepths) { + if (options.depths) { + depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths; + } else { + depths = [context]; + } + } + + function main(context /*, options*/) { + return '' + templateSpec.main(container, context, container.helpers, container.partials, data, blockParams, depths); + } + + main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams); + return main(context, options); + } + + ret.isTop = true; + + ret._setup = function (options) { + if (!options.partial) { + var mergedHelpers = Utils.extend({}, env.helpers, options.helpers); + wrapHelpersToPassLookupProperty(mergedHelpers, container); + container.helpers = mergedHelpers; + + if (templateSpec.usePartial) { + // Use mergeIfNeeded here to prevent compiling global partials multiple times + container.partials = container.mergeIfNeeded(options.partials, env.partials); + } + if (templateSpec.usePartial || templateSpec.useDecorators) { + container.decorators = Utils.extend({}, env.decorators, options.decorators); + } + + container.hooks = {}; + container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options); + + var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7; + _helpers.moveHelperToHooks(container, 'helperMissing', keepHelperInHelpers); + _helpers.moveHelperToHooks(container, 'blockHelperMissing', keepHelperInHelpers); + } else { + container.protoAccessControl = options.protoAccessControl; // internal option + container.helpers = options.helpers; + container.partials = options.partials; + container.decorators = options.decorators; + container.hooks = options.hooks; + } + }; + + ret._child = function (i, data, blockParams, depths) { + if (templateSpec.useBlockParams && !blockParams) { + throw new _exception2['default']('must pass block params'); + } + if (templateSpec.useDepths && !depths) { + throw new _exception2['default']('must pass parent depths'); + } + + return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths); + }; + return ret; +} + +function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) { + function prog(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + var currentDepths = depths; + if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) { + currentDepths = [context].concat(depths); + } + + return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths); + } + + prog = executeDecorators(fn, prog, container, depths, data, blockParams); + + prog.program = i; + prog.depth = depths ? depths.length : 0; + prog.blockParams = declaredBlockParams || 0; + return prog; +} + +/** + * This is currently part of the official API, therefore implementation details should not be changed. + */ + +function resolvePartial(partial, context, options) { + if (!partial) { + if (options.name === '@partial-block') { + partial = options.data['partial-block']; + } else { + partial = options.partials[options.name]; + } + } else if (!partial.call && !options.name) { + // This is a dynamic partial that returned a string + options.name = partial; + partial = options.partials[partial]; + } + return partial; +} + +function invokePartial(partial, context, options) { + // Use the current closure context to save the partial-block if this partial + var currentPartialBlock = options.data && options.data['partial-block']; + options.partial = true; + if (options.ids) { + options.data.contextPath = options.ids[0] || options.data.contextPath; + } + + var partialBlock = undefined; + if (options.fn && options.fn !== noop) { + (function () { + options.data = _base.createFrame(options.data); + // Wrapper function to get access to currentPartialBlock from the closure + var fn = options.fn; + partialBlock = options.data['partial-block'] = function partialBlockWrapper(context) { + var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + + // Restore the partial-block from the closure for the execution of the block + // i.e. the part inside the block of the partial call. + options.data = _base.createFrame(options.data); + options.data['partial-block'] = currentPartialBlock; + return fn(context, options); + }; + if (fn.partials) { + options.partials = Utils.extend({}, options.partials, fn.partials); + } + })(); + } + + if (partial === undefined && partialBlock) { + partial = partialBlock; + } + + if (partial === undefined) { + throw new _exception2['default']('The partial ' + options.name + ' could not be found'); + } else if (partial instanceof Function) { + return partial(context, options); + } +} + +function noop() { + return ''; +} + +function initData(context, data) { + if (!data || !('root' in data)) { + data = data ? _base.createFrame(data) : {}; + data.root = context; + } + return data; +} + +function executeDecorators(fn, prog, container, depths, data, blockParams) { + if (fn.decorator) { + var props = {}; + prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths); + Utils.extend(prog, props); + } + return prog; +} + +function wrapHelpersToPassLookupProperty(mergedHelpers, container) { + Object.keys(mergedHelpers).forEach(function (helperName) { + var helper = mergedHelpers[helperName]; + mergedHelpers[helperName] = passLookupPropertyOption(helper, container); + }); +} + +function passLookupPropertyOption(helper, container) { + var lookupProperty = container.lookupProperty; + return _internalWrapHelper.wrapHelper(helper, function (options) { + return Utils.extend({ lookupProperty: lookupProperty }, options); + }); +} + + +},{"./base":87,"./exception":99,"./helpers":100,"./internal/proto-access":109,"./internal/wrapHelper":110,"./utils":115}],114:[function(require,module,exports){ +// Build out our basic SafeString type +'use strict'; + +exports.__esModule = true; +function SafeString(string) { + this.string = string; +} + +SafeString.prototype.toString = SafeString.prototype.toHTML = function () { + return '' + this.string; +}; + +exports['default'] = SafeString; +module.exports = exports['default']; + + +},{}],115:[function(require,module,exports){ +'use strict'; + +exports.__esModule = true; +exports.extend = extend; +exports.indexOf = indexOf; +exports.escapeExpression = escapeExpression; +exports.isEmpty = isEmpty; +exports.createFrame = createFrame; +exports.blockParams = blockParams; +exports.appendContextPath = appendContextPath; +var escape = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''', + '`': '`', + '=': '=' +}; + +var badChars = /[&<>"'`=]/g, + possible = /[&<>"'`=]/; + +function escapeChar(chr) { + return escape[chr]; +} + +function extend(obj /* , ...source */) { + for (var i = 1; i < arguments.length; i++) { + for (var key in arguments[i]) { + if (Object.prototype.hasOwnProperty.call(arguments[i], key)) { + obj[key] = arguments[i][key]; + } + } + } + + return obj; +} + +var toString = Object.prototype.toString; + +exports.toString = toString; +// Sourced from lodash +// https://github.com/bestiejs/lodash/blob/master/LICENSE.txt +/* eslint-disable func-style */ +var isFunction = function isFunction(value) { + return typeof value === 'function'; +}; +// fallback for older versions of Chrome and Safari +/* istanbul ignore next */ +if (isFunction(/x/)) { + exports.isFunction = isFunction = function (value) { + return typeof value === 'function' && toString.call(value) === '[object Function]'; + }; +} +exports.isFunction = isFunction; + +/* eslint-enable func-style */ + +/* istanbul ignore next */ +var isArray = Array.isArray || function (value) { + return value && typeof value === 'object' ? toString.call(value) === '[object Array]' : false; +}; + +exports.isArray = isArray; +// Older IE versions do not directly support indexOf so we must implement our own, sadly. + +function indexOf(array, value) { + for (var i = 0, len = array.length; i < len; i++) { + if (array[i] === value) { + return i; + } + } + return -1; +} + +function escapeExpression(string) { + if (typeof string !== 'string') { + // don't escape SafeStrings, since they're already safe + if (string && string.toHTML) { + return string.toHTML(); + } else if (string == null) { + return ''; + } else if (!string) { + return string + ''; + } + + // Force a string conversion as this will be done by the append regardless and + // the regex test will do this transparently behind the scenes, causing issues if + // an object's to string has escaped characters in it. + string = '' + string; + } + + if (!possible.test(string)) { + return string; + } + return string.replace(badChars, escapeChar); +} + +function isEmpty(value) { + if (!value && value !== 0) { + return true; + } else if (isArray(value) && value.length === 0) { + return true; + } else { + return false; + } +} + +function createFrame(object) { + var frame = extend({}, object); + frame._parent = object; + return frame; +} + +function blockParams(params, ids) { + params.path = ids; + return params; +} + +function appendContextPath(contextPath, id) { + return (contextPath ? contextPath + '.' : '') + id; +} + + +},{}],116:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var has = Object.prototype.hasOwnProperty; +var hasNativeMap = typeof Map !== "undefined"; + +/** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ +function ArraySet() { + this._array = []; + this._set = hasNativeMap ? new Map() : Object.create(null); +} + +/** + * Static method for creating ArraySet instances from an existing array. + */ +ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; +}; + +/** + * Return how many unique items are in this ArraySet. If duplicates have been + * added, than those do not count towards the size. + * + * @returns Number + */ +ArraySet.prototype.size = function ArraySet_size() { + return hasNativeMap ? this._set.size : Object.getOwnPropertyNames(this._set).length; +}; + +/** + * Add the given string to this set. + * + * @param String aStr + */ +ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var sStr = hasNativeMap ? aStr : util.toSetString(aStr); + var isDuplicate = hasNativeMap ? this.has(aStr) : has.call(this._set, sStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + if (hasNativeMap) { + this._set.set(aStr, idx); + } else { + this._set[sStr] = idx; + } + } +}; + +/** + * Is the given string a member of this set? + * + * @param String aStr + */ +ArraySet.prototype.has = function ArraySet_has(aStr) { + if (hasNativeMap) { + return this._set.has(aStr); + } else { + var sStr = util.toSetString(aStr); + return has.call(this._set, sStr); + } +}; + +/** + * What is the index of the given string in the array? + * + * @param String aStr + */ +ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (hasNativeMap) { + var idx = this._set.get(aStr); + if (idx >= 0) { + return idx; + } + } else { + var sStr = util.toSetString(aStr); + if (has.call(this._set, sStr)) { + return this._set[sStr]; + } + } + + throw new Error('"' + aStr + '" is not in the set.'); +}; + +/** + * What is the element at the given index? + * + * @param Number aIdx + */ +ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); +}; + +/** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ +ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); +}; + +exports.ArraySet = ArraySet; + +},{"./util":125}],117:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +var base64 = require('./base64'); + +// A single base 64 digit can contain 6 bits of data. For the base 64 variable +// length quantities we use in the source map spec, the first bit is the sign, +// the next four bits are the actual value, and the 6th bit is the +// continuation bit. The continuation bit tells us whether there are more +// digits in this value following this digit. +// +// Continuation +// | Sign +// | | +// V V +// 101011 + +var VLQ_BASE_SHIFT = 5; + +// binary: 100000 +var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + +// binary: 011111 +var VLQ_BASE_MASK = VLQ_BASE - 1; + +// binary: 100000 +var VLQ_CONTINUATION_BIT = VLQ_BASE; + +/** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ +function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; +} + +/** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ +function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; +} + +/** + * Returns the base 64 VLQ encoded value. + */ +exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; +}; + +/** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ +exports.decode = function base64VLQ_decode(aStr, aIndex, aOutParam) { + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (aIndex >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + + digit = base64.decode(aStr.charCodeAt(aIndex++)); + if (digit === -1) { + throw new Error("Invalid base64 digit: " + aStr.charAt(aIndex - 1)); + } + + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aIndex; +}; + +},{"./base64":118}],118:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var intToCharMap = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'.split(''); + +/** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ +exports.encode = function (number) { + if (0 <= number && number < intToCharMap.length) { + return intToCharMap[number]; + } + throw new TypeError("Must be between 0 and 63: " + number); +}; + +/** + * Decode a single base 64 character code digit to an integer. Returns -1 on + * failure. + */ +exports.decode = function (charCode) { + var bigA = 65; // 'A' + var bigZ = 90; // 'Z' + + var littleA = 97; // 'a' + var littleZ = 122; // 'z' + + var zero = 48; // '0' + var nine = 57; // '9' + + var plus = 43; // '+' + var slash = 47; // '/' + + var littleOffset = 26; + var numberOffset = 52; + + // 0 - 25: ABCDEFGHIJKLMNOPQRSTUVWXYZ + if (bigA <= charCode && charCode <= bigZ) { + return (charCode - bigA); + } + + // 26 - 51: abcdefghijklmnopqrstuvwxyz + if (littleA <= charCode && charCode <= littleZ) { + return (charCode - littleA + littleOffset); + } + + // 52 - 61: 0123456789 + if (zero <= charCode && charCode <= nine) { + return (charCode - zero + numberOffset); + } + + // 62: + + if (charCode == plus) { + return 62; + } + + // 63: / + if (charCode == slash) { + return 63; + } + + // Invalid base64 digit. + return -1; +}; + +},{}],119:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +exports.GREATEST_LOWER_BOUND = 1; +exports.LEAST_UPPER_BOUND = 2; + +/** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + */ +function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next-closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } +} + +/** + * This is an implementation of binary search which will always try and return + * the index of the closest element if there is no exact hit. This is because + * mappings between original and generated line/col pairs are single points, + * and there is an implicit region between each of them, so a miss just means + * that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'binarySearch.GREATEST_LOWER_BOUND' or + * 'binarySearch.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'binarySearch.GREATEST_LOWER_BOUND'. + */ +exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + if (aHaystack.length === 0) { + return -1; + } + + var index = recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, + aCompare, aBias || exports.GREATEST_LOWER_BOUND); + if (index < 0) { + return -1; + } + + // We have found either the exact element, or the next-closest element than + // the one we are searching for. However, there may be more than one such + // element. Make sure we always return the smallest of these. + while (index - 1 >= 0) { + if (aCompare(aHaystack[index], aHaystack[index - 1], true) !== 0) { + break; + } + --index; + } + + return index; +}; + +},{}],120:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); + +/** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ +function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositionsInflated(mappingA, mappingB) <= 0; +} + +/** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ +function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; +} + +/** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ +MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + +/** + * Add the given source mapping. + * + * @param Object aMapping + */ +MappingList.prototype.add = function MappingList_add(aMapping) { + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } +}; + +/** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ +MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositionsInflated); + this._sorted = true; + } + return this._array; +}; + +exports.MappingList = MappingList; + +},{"./util":125}],121:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +// It turns out that some (most?) JavaScript engines don't self-host +// `Array.prototype.sort`. This makes sense because C++ will likely remain +// faster than JS when doing raw CPU-intensive sorting. However, when using a +// custom comparator function, calling back and forth between the VM's C++ and +// JIT'd JS is rather slow *and* loses JIT type information, resulting in +// worse generated code for the comparator function than would be optimal. In +// fact, when sorting with a comparator, these costs outweigh the benefits of +// sorting in C++. By using our own JS-implemented Quick Sort (below), we get +// a ~3500ms mean speed-up in `bench/bench.html`. + +/** + * Swap the elements indexed by `x` and `y` in the array `ary`. + * + * @param {Array} ary + * The array. + * @param {Number} x + * The index of the first item. + * @param {Number} y + * The index of the second item. + */ +function swap(ary, x, y) { + var temp = ary[x]; + ary[x] = ary[y]; + ary[y] = temp; +} + +/** + * Returns a random integer within the range `low .. high` inclusive. + * + * @param {Number} low + * The lower bound on the range. + * @param {Number} high + * The upper bound on the range. + */ +function randomIntInRange(low, high) { + return Math.round(low + (Math.random() * (high - low))); +} + +/** + * The Quick Sort algorithm. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + * @param {Number} p + * Start index of the array + * @param {Number} r + * End index of the array + */ +function doQuickSort(ary, comparator, p, r) { + // If our lower bound is less than our upper bound, we (1) partition the + // array into two pieces and (2) recurse on each half. If it is not, this is + // the empty array and our base case. + + if (p < r) { + // (1) Partitioning. + // + // The partitioning chooses a pivot between `p` and `r` and moves all + // elements that are less than or equal to the pivot to the before it, and + // all the elements that are greater than it after it. The effect is that + // once partition is done, the pivot is in the exact place it will be when + // the array is put in sorted order, and it will not need to be moved + // again. This runs in O(n) time. + + // Always choose a random pivot so that an input array which is reverse + // sorted does not cause O(n^2) running time. + var pivotIndex = randomIntInRange(p, r); + var i = p - 1; + + swap(ary, pivotIndex, r); + var pivot = ary[r]; + + // Immediately after `j` is incremented in this loop, the following hold + // true: + // + // * Every element in `ary[p .. i]` is less than or equal to the pivot. + // + // * Every element in `ary[i+1 .. j-1]` is greater than the pivot. + for (var j = p; j < r; j++) { + if (comparator(ary[j], pivot) <= 0) { + i += 1; + swap(ary, i, j); + } + } + + swap(ary, i + 1, j); + var q = i + 1; + + // (2) Recurse on each half. + + doQuickSort(ary, comparator, p, q - 1); + doQuickSort(ary, comparator, q + 1, r); + } +} + +/** + * Sort the given array in-place with the given comparator function. + * + * @param {Array} ary + * An array to sort. + * @param {function} comparator + * Function to use to compare two items. + */ +exports.quickSort = function (ary, comparator) { + doQuickSort(ary, comparator, 0, ary.length - 1); +}; + +},{}],122:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var util = require('./util'); +var binarySearch = require('./binary-search'); +var ArraySet = require('./array-set').ArraySet; +var base64VLQ = require('./base64-vlq'); +var quickSort = require('./quick-sort').quickSort; + +function SourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + return sourceMap.sections != null + ? new IndexedSourceMapConsumer(sourceMap, aSourceMapURL) + : new BasicSourceMapConsumer(sourceMap, aSourceMapURL); +} + +SourceMapConsumer.fromSourceMap = function(aSourceMap, aSourceMapURL) { + return BasicSourceMapConsumer.fromSourceMap(aSourceMap, aSourceMapURL); +} + +/** + * The version of the source mapping spec that we are consuming. + */ +SourceMapConsumer.prototype._version = 3; + +// `__generatedMappings` and `__originalMappings` are arrays that hold the +// parsed mapping coordinates from the source map's "mappings" attribute. They +// are lazily instantiated, accessed via the `_generatedMappings` and +// `_originalMappings` getters respectively, and we only parse the mappings +// and create these arrays once queried for a source location. We jump through +// these hoops because there can be many thousands of mappings, and parsing +// them is expensive, so we only want to do it if we must. +// +// Each object in the arrays is of the form: +// +// { +// generatedLine: The line number in the generated code, +// generatedColumn: The column number in the generated code, +// source: The path to the original source file that generated this +// chunk of code, +// originalLine: The line number in the original source that +// corresponds to this chunk of generated code, +// originalColumn: The column number in the original source that +// corresponds to this chunk of generated code, +// name: The name of the original symbol which generated this chunk of +// code. +// } +// +// All properties except for `generatedLine` and `generatedColumn` can be +// `null`. +// +// `_generatedMappings` is ordered by the generated positions. +// +// `_originalMappings` is ordered by the original positions. + +SourceMapConsumer.prototype.__generatedMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__generatedMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } +}); + +SourceMapConsumer.prototype.__originalMappings = null; +Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + configurable: true, + enumerable: true, + get: function () { + if (!this.__originalMappings) { + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } +}); + +SourceMapConsumer.prototype._charIsMappingSeparator = + function SourceMapConsumer_charIsMappingSeparator(aStr, index) { + var c = aStr.charAt(index); + return c === ";" || c === ","; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + +SourceMapConsumer.GENERATED_ORDER = 1; +SourceMapConsumer.ORIGINAL_ORDER = 2; + +SourceMapConsumer.GREATEST_LOWER_BOUND = 1; +SourceMapConsumer.LEAST_UPPER_BOUND = 2; + +/** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ +SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source === null ? null : this._sources.at(mapping.source); + source = util.computeSourceURL(sourceRoot, source, this._sourceMapURL); + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name === null ? null : this._names.at(mapping.name) + }; + }, this).forEach(aCallback, context); + }; + +/** + * Returns all generated line and column information for the original source, + * line, and column provided. If no column is provided, returns all mappings + * corresponding to a either the line we are searching for or the next + * closest line that has any mappings. Otherwise, returns all mappings + * corresponding to the given line and either the column we are searching for + * or the next closest column that has any offsets. + * + * The only argument is an object with the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number is 1-based. + * - column: Optional. the column number in the original source. + * The column number is 0-based. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var line = util.getArg(aArgs, 'line'); + + // When there is no exact match, BasicSourceMapConsumer.prototype._findMapping + // returns the index of the closest mapping less than the needle. By + // setting needle.originalColumn to 0, we thus find the last mapping for + // the given line, provided such a mapping exists. + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: line, + originalColumn: util.getArg(aArgs, 'column', 0) + }; + + needle.source = this._findSourceIndex(needle.source); + if (needle.source < 0) { + return []; + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + binarySearch.LEAST_UPPER_BOUND); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (aArgs.column === undefined) { + var originalLine = mapping.originalLine; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we found. Since + // mappings are sorted, this is guaranteed to find all mappings for + // the line we found. + while (mapping && mapping.originalLine === originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } else { + var originalColumn = mapping.originalColumn; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line than the one we were searching for. + // Since mappings are sorted, this is guaranteed to find all mappings for + // the line we are searching for. + while (mapping && + mapping.originalLine === line && + mapping.originalColumn == originalColumn) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + } + + return mappings; + }; + +exports.SourceMapConsumer = SourceMapConsumer; + +/** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The first parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ +function BasicSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + if (sourceRoot) { + sourceRoot = util.normalize(sourceRoot); + } + + sources = sources + .map(String) + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + .map(util.normalize) + // Always ensure that absolute sources are internally stored relative to + // the source root, if the source root is absolute. Not doing this would + // be particularly problematic when the source root is a prefix of the + // source (valid, but why??). See github issue #199 and bugzil.la/1188982. + .map(function (source) { + return sourceRoot && util.isAbsolute(sourceRoot) && util.isAbsolute(source) + ? util.relative(sourceRoot, source) + : source; + }); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names.map(String), true); + this._sources = ArraySet.fromArray(sources, true); + + this._absoluteSources = this._sources.toArray().map(function (s) { + return util.computeSourceURL(sourceRoot, s, aSourceMapURL); + }); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this._sourceMapURL = aSourceMapURL; + this.file = file; +} + +BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + +/** + * Utility function to find the index of a source. Returns -1 if not + * found. + */ +BasicSourceMapConsumer.prototype._findSourceIndex = function(aSource) { + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + if (this._sources.has(relativeSource)) { + return this._sources.indexOf(relativeSource); + } + + // Maybe aSource is an absolute URL as returned by |sources|. In + // this case we can't simply undo the transform. + var i; + for (i = 0; i < this._absoluteSources.length; ++i) { + if (this._absoluteSources[i] == aSource) { + return i; + } + } + + return -1; +}; + +/** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @param String aSourceMapURL + * The URL at which the source map can be found (optional) + * @returns BasicSourceMapConsumer + */ +BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap, aSourceMapURL) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + var names = smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + var sources = smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + smc._sourceMapURL = aSourceMapURL; + smc._absoluteSources = smc._sources.toArray().map(function (s) { + return util.computeSourceURL(smc.sourceRoot, s, aSourceMapURL); + }); + + // Because we are modifying the entries (by converting string sources and + // names to indices into the sources and names ArraySets), we have to make + // a copy of the entry or else bad things happen. Shared mutable state + // strikes again! See github issue #191. + + var generatedMappings = aSourceMap._mappings.toArray().slice(); + var destGeneratedMappings = smc.__generatedMappings = []; + var destOriginalMappings = smc.__originalMappings = []; + + for (var i = 0, length = generatedMappings.length; i < length; i++) { + var srcMapping = generatedMappings[i]; + var destMapping = new Mapping; + destMapping.generatedLine = srcMapping.generatedLine; + destMapping.generatedColumn = srcMapping.generatedColumn; + + if (srcMapping.source) { + destMapping.source = sources.indexOf(srcMapping.source); + destMapping.originalLine = srcMapping.originalLine; + destMapping.originalColumn = srcMapping.originalColumn; + + if (srcMapping.name) { + destMapping.name = names.indexOf(srcMapping.name); + } + + destOriginalMappings.push(destMapping); + } + + destGeneratedMappings.push(destMapping); + } + + quickSort(smc.__originalMappings, util.compareByOriginalPositions); + + return smc; + }; + +/** + * The version of the source mapping spec that we are consuming. + */ +BasicSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._absoluteSources.slice(); + } +}); + +/** + * Provide the JIT with a nice shape / hidden class. + */ +function Mapping() { + this.generatedLine = 0; + this.generatedColumn = 0; + this.source = null; + this.originalLine = null; + this.originalColumn = null; + this.name = null; +} + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var length = aStr.length; + var index = 0; + var cachedSegments = {}; + var temp = {}; + var originalMappings = []; + var generatedMappings = []; + var mapping, str, segment, end, value; + + while (index < length) { + if (aStr.charAt(index) === ';') { + generatedLine++; + index++; + previousGeneratedColumn = 0; + } + else if (aStr.charAt(index) === ',') { + index++; + } + else { + mapping = new Mapping(); + mapping.generatedLine = generatedLine; + + // Because each offset is encoded relative to the previous one, + // many segments often have the same encoding. We can exploit this + // fact by caching the parsed variable length fields of each segment, + // allowing us to avoid a second parse if we encounter the same + // segment again. + for (end = index; end < length; end++) { + if (this._charIsMappingSeparator(aStr, end)) { + break; + } + } + str = aStr.slice(index, end); + + segment = cachedSegments[str]; + if (segment) { + index += str.length; + } else { + segment = []; + while (index < end) { + base64VLQ.decode(aStr, index, temp); + value = temp.value; + index = temp.rest; + segment.push(value); + } + + if (segment.length === 2) { + throw new Error('Found a source, but no line and column'); + } + + if (segment.length === 3) { + throw new Error('Found a source and line, but no column'); + } + + cachedSegments[str] = segment; + } + + // Generated column. + mapping.generatedColumn = previousGeneratedColumn + segment[0]; + previousGeneratedColumn = mapping.generatedColumn; + + if (segment.length > 1) { + // Original source. + mapping.source = previousSource + segment[1]; + previousSource += segment[1]; + + // Original line. + mapping.originalLine = previousOriginalLine + segment[2]; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + + // Original column. + mapping.originalColumn = previousOriginalColumn + segment[3]; + previousOriginalColumn = mapping.originalColumn; + + if (segment.length > 4) { + // Original name. + mapping.name = previousName + segment[4]; + previousName += segment[4]; + } + } + + generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + originalMappings.push(mapping); + } + } + } + + quickSort(generatedMappings, util.compareByGeneratedPositionsDeflated); + this.__generatedMappings = generatedMappings; + + quickSort(originalMappings, util.compareByOriginalPositions); + this.__originalMappings = originalMappings; + }; + +/** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ +BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator, aBias) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator, aBias); + }; + +/** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ +BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositionsDeflated, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source !== null) { + source = this._sources.at(source); + source = util.computeSourceURL(this.sourceRoot, source, this._sourceMapURL); + } + var name = util.getArg(mapping, 'name', null); + if (name !== null) { + name = this._names.at(name); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: name + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +BasicSourceMapConsumer.prototype.hasContentsOfAllSources = + function BasicSourceMapConsumer_hasContentsOfAllSources() { + if (!this.sourcesContent) { + return false; + } + return this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function (sc) { return sc == null; }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + var index = this._findSourceIndex(aSource); + if (index >= 0) { + return this.sourcesContent[index]; + } + + var relativeSource = aSource; + if (this.sourceRoot != null) { + relativeSource = util.relative(this.sourceRoot, relativeSource); + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = relativeSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + relativeSource)) { + return this.sourcesContent[this._sources.indexOf("/" + relativeSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + relativeSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * - bias: Either 'SourceMapConsumer.GREATEST_LOWER_BOUND' or + * 'SourceMapConsumer.LEAST_UPPER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the one we are + * searching for, respectively, if the exact element cannot be found. + * Defaults to 'SourceMapConsumer.GREATEST_LOWER_BOUND'. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var source = util.getArg(aArgs, 'source'); + source = this._findSourceIndex(source); + if (source < 0) { + return { + line: null, + column: null, + lastColumn: null + }; + } + + var needle = { + source: source, + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping( + needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions, + util.getArg(aArgs, 'bias', SourceMapConsumer.GREATEST_LOWER_BOUND) + ); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + if (mapping.source === needle.source) { + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + +exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +/** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The first parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * The second parameter, if given, is a string whose value is the URL + * at which the source map was found. This URL is used to compute the + * sources array. + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ +function IndexedSourceMapConsumer(aSourceMap, aSourceMapURL) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = util.parseSourceMapInput(aSourceMap); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + this._sources = new ArraySet(); + this._names = new ArraySet(); + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map'), aSourceMapURL) + } + }); +} + +IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); +IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + +/** + * The version of the source mapping spec that we are consuming. + */ +IndexedSourceMapConsumer.prototype._version = 3; + +/** + * The list of original sources. + */ +Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + } + return sources; + } +}); + +/** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. The line number + * is 1-based. + * - column: The column number in the generated source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. The + * line number is 1-based. + * - column: The column number in the original source, or null. The + * column number is 0-based. + * - name: The original identifier, or null. + */ +IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + bias: aArgs.bias + }); + }; + +/** + * Return true if we have the source content for every source in the source + * map, false otherwise. + */ +IndexedSourceMapConsumer.prototype.hasContentsOfAllSources = + function IndexedSourceMapConsumer_hasContentsOfAllSources() { + return this._sections.every(function (s) { + return s.consumer.hasContentsOfAllSources(); + }); + }; + +/** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ +IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + +/** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. The line number + * is 1-based. + * - column: The column number in the original source. The column + * number is 0-based. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. The + * line number is 1-based. + * - column: The column number in the generated source, or null. + * The column number is 0-based. + */ +IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer._findSourceIndex(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + +/** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ +IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[j]; + + var source = section.consumer._sources.at(mapping.source); + source = util.computeSourceURL(section.consumer.sourceRoot, source, this._sourceMapURL); + this._sources.add(source); + source = this._sources.indexOf(source); + + var name = null; + if (mapping.name) { + name = section.consumer._names.at(mapping.name); + this._names.add(name); + name = this._names.indexOf(name); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.generatedColumn + + (section.generatedOffset.generatedLine === mapping.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0), + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + } + } + + quickSort(this.__generatedMappings, util.compareByGeneratedPositionsDeflated); + quickSort(this.__originalMappings, util.compareByOriginalPositions); + }; + +exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; + +},{"./array-set":116,"./base64-vlq":117,"./binary-search":119,"./quick-sort":121,"./util":125}],123:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var base64VLQ = require('./base64-vlq'); +var util = require('./util'); +var ArraySet = require('./array-set').ArraySet; +var MappingList = require('./mapping-list').MappingList; + +/** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ +function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; +} + +SourceMapGenerator.prototype._version = 3; + +/** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ +SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var sourceRelative = sourceFile; + if (sourceRoot !== null) { + sourceRelative = util.relative(sourceRoot, sourceFile); + } + + if (!generator._sources.has(sourceRelative)) { + generator._sources.add(sourceRelative); + } + + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + +/** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ +SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null) { + source = String(source); + if (!this._sources.has(source)) { + this._sources.add(source); + } + } + + if (name != null) { + name = String(name); + if (!this._names.has(name)) { + this._names.add(name); + } + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + +/** + * Set the source content for a source file. + */ +SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = Object.create(null); + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + +/** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ +SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + +/** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ +SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + // When aOriginal is truthy but has empty values for .line and .column, + // it is most likely a programmer error. In this case we throw a very + // specific error message to try to guide them the right way. + // For example: https://github.com/Polymer/polymer-bundler/pull/519 + if (aOriginal && typeof aOriginal.line !== 'number' && typeof aOriginal.column !== 'number') { + throw new Error( + 'original.line and original.column are not numbers -- you probably meant to omit ' + + 'the original mapping entirely and only map the generated position. If so, pass ' + + 'null for the original mapping instead of an object with empty or null values.' + ); + } + + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + +/** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ +SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var next; + var mapping; + var nameIdx; + var sourceIdx; + + var mappings = this._mappings.toArray(); + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + next = '' + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + next += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositionsInflated(mapping, mappings[i - 1])) { + continue; + } + next += ','; + } + } + + next += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + sourceIdx = this._sources.indexOf(mapping.source); + next += base64VLQ.encode(sourceIdx - previousSource); + previousSource = sourceIdx; + + // lines are stored 0-based in SourceMap spec version 3 + next += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + next += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + nameIdx = this._names.indexOf(mapping.name); + next += base64VLQ.encode(nameIdx - previousName); + previousName = nameIdx; + } + } + + result += next; + } + + return result; + }; + +SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, key) + ? this._sourcesContents[key] + : null; + }, this); + }; + +/** + * Externalize the source map. + */ +SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + +/** + * Render the source map being generated to a string. + */ +SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + +exports.SourceMapGenerator = SourceMapGenerator; + +},{"./array-set":116,"./base64-vlq":117,"./mapping-list":120,"./util":125}],124:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; +var util = require('./util'); + +// Matches a Windows-style `\r\n` newline or a `\n` newline used by all other +// operating systems these days (capturing the result). +var REGEX_NEWLINE = /(\r?\n)/; + +// Newline character code for charCodeAt() comparisons +var NEWLINE_CODE = 10; + +// Private symbol for identifying `SourceNode`s when multiple versions of +// the source-map library are loaded. This MUST NOT CHANGE across +// versions! +var isSourceNode = "$$$isSourceNode$$$"; + +/** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ +function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); +} + +/** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ +SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are accessed by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var remainingLinesIndex = 0; + var shiftNextLine = function() { + var lineContents = getNextLine(); + // The last line of a file might not have a newline. + var newLine = getNextLine() || ""; + return lineContents + newLine; + + function getNextLine() { + return remainingLinesIndex < remainingLines.length ? + remainingLines[remainingLinesIndex++] : undefined; + } + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[remainingLinesIndex] || ''; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[remainingLinesIndex] || ''; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[remainingLinesIndex] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLinesIndex < remainingLines.length) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.splice(remainingLinesIndex).join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + +/** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ +SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; +}; + +/** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } +}; + +/** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ +SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; +}; + +/** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ +SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; +}; + +/** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ +SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + +/** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ +SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + +/** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ +SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; +}; + +/** + * Returns the string representation of this source node along with a source + * map. + */ +SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; +}; + +exports.SourceNode = SourceNode; + +},{"./source-map-generator":123,"./util":125}],125:[function(require,module,exports){ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ +function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } +} +exports.getArg = getArg; + +var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.-]*)(?::(\d+))?(.*)$/; +var dataUrlRegexp = /^data:.+\,.+$/; + +function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; +} +exports.urlParse = urlParse; + +function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; +} +exports.urlGenerate = urlGenerate; + +/** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consecutive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ +function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = exports.isAbsolute(path); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; +} +exports.normalize = normalize; + +/** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ +function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; +} +exports.join = join; + +exports.isAbsolute = function (aPath) { + return aPath.charAt(0) === '/' || urlRegexp.test(aPath); +}; + +/** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ +function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // It is possible for the path to be above the root. In this case, simply + // checking whether the root is a prefix of the path won't work. Instead, we + // need to remove components from the root one by one, until either we find + // a prefix that fits, or we run out of components to remove. + var level = 0; + while (aPath.indexOf(aRoot + '/') !== 0) { + var index = aRoot.lastIndexOf("/"); + if (index < 0) { + return aPath; + } + + // If the only part of the root that is left is the scheme (i.e. http://, + // file:///, etc.), one or more slashes (/), or simply nothing at all, we + // have exhausted all components, so the path is not relative to the root. + aRoot = aRoot.slice(0, index); + if (aRoot.match(/^([^\/]+:\/)?\/*$/)) { + return aPath; + } + + ++level; + } + + // Make sure we add a "../" for each component we removed from the root. + return Array(level + 1).join("../") + aPath.substr(aRoot.length + 1); +} +exports.relative = relative; + +var supportsNullProto = (function () { + var obj = Object.create(null); + return !('__proto__' in obj); +}()); + +function identity (s) { + return s; +} + +/** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ +function toSetString(aStr) { + if (isProtoString(aStr)) { + return '$' + aStr; + } + + return aStr; +} +exports.toSetString = supportsNullProto ? identity : toSetString; + +function fromSetString(aStr) { + if (isProtoString(aStr)) { + return aStr.slice(1); + } + + return aStr; +} +exports.fromSetString = supportsNullProto ? identity : fromSetString; + +function isProtoString(s) { + if (!s) { + return false; + } + + var length = s.length; + + if (length < 9 /* "__proto__".length */) { + return false; + } + + if (s.charCodeAt(length - 1) !== 95 /* '_' */ || + s.charCodeAt(length - 2) !== 95 /* '_' */ || + s.charCodeAt(length - 3) !== 111 /* 'o' */ || + s.charCodeAt(length - 4) !== 116 /* 't' */ || + s.charCodeAt(length - 5) !== 111 /* 'o' */ || + s.charCodeAt(length - 6) !== 114 /* 'r' */ || + s.charCodeAt(length - 7) !== 112 /* 'p' */ || + s.charCodeAt(length - 8) !== 95 /* '_' */ || + s.charCodeAt(length - 9) !== 95 /* '_' */) { + return false; + } + + for (var i = length - 10; i >= 0; i--) { + if (s.charCodeAt(i) !== 36 /* '$' */) { + return false; + } + } + + return true; +} + +/** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ +function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0 || onlyCompareOriginal) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByOriginalPositions = compareByOriginalPositions; + +/** + * Comparator between two mappings with deflated source and name indices where + * the generated positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ +function compareByGeneratedPositionsDeflated(mappingA, mappingB, onlyCompareGenerated) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0 || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsDeflated = compareByGeneratedPositionsDeflated; + +function strcmp(aStr1, aStr2) { + if (aStr1 === aStr2) { + return 0; + } + + if (aStr1 === null) { + return 1; // aStr2 !== null + } + + if (aStr2 === null) { + return -1; // aStr1 !== null + } + + if (aStr1 > aStr2) { + return 1; + } + + return -1; +} + +/** + * Comparator between two mappings with inflated source and name strings where + * the generated positions are compared. + */ +function compareByGeneratedPositionsInflated(mappingA, mappingB) { + var cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp !== 0) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp !== 0) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp !== 0) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); +} +exports.compareByGeneratedPositionsInflated = compareByGeneratedPositionsInflated; + +/** + * Strip any JSON XSSI avoidance prefix from the string (as documented + * in the source maps specification), and then parse the string as + * JSON. + */ +function parseSourceMapInput(str) { + return JSON.parse(str.replace(/^\)]}'[^\n]*\n/, '')); +} +exports.parseSourceMapInput = parseSourceMapInput; + +/** + * Compute the URL of a source given the the source root, the source's + * URL, and the source map's URL. + */ +function computeSourceURL(sourceRoot, sourceURL, sourceMapURL) { + sourceURL = sourceURL || ''; + + if (sourceRoot) { + // This follows what Chrome does. + if (sourceRoot[sourceRoot.length - 1] !== '/' && sourceURL[0] !== '/') { + sourceRoot += '/'; + } + // The spec says: + // Line 4: An optional source root, useful for relocating source + // files on a server or removing repeated values in the + // “sources” entry. This value is prepended to the individual + // entries in the “source” field. + sourceURL = sourceRoot + sourceURL; + } + + // Historically, SourceMapConsumer did not take the sourceMapURL as + // a parameter. This mode is still somewhat supported, which is why + // this code block is conditional. However, it's preferable to pass + // the source map URL to SourceMapConsumer, so that this function + // can implement the source URL resolution algorithm as outlined in + // the spec. This block is basically the equivalent of: + // new URL(sourceURL, sourceMapURL).toString() + // ... except it avoids using URL, which wasn't available in the + // older releases of node still supported by this library. + // + // The spec says: + // If the sources are not absolute URLs after prepending of the + // “sourceRoot”, the sources are resolved relative to the + // SourceMap (like resolving script src in a html document). + if (sourceMapURL) { + var parsed = urlParse(sourceMapURL); + if (!parsed) { + throw new Error("sourceMapURL could not be parsed"); + } + if (parsed.path) { + // Strip the last path component, but keep the "/". + var index = parsed.path.lastIndexOf('/'); + if (index >= 0) { + parsed.path = parsed.path.substring(0, index + 1); + } + } + sourceURL = join(urlGenerate(parsed), sourceURL); + } + + return normalize(sourceURL); +} +exports.computeSourceURL = computeSourceURL; + +},{}],126:[function(require,module,exports){ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./lib/source-node').SourceNode; + +},{"./lib/source-map-consumer":122,"./lib/source-map-generator":123,"./lib/source-node":124}],127:[function(require,module,exports){ +// Create a simple path alias to allow browserify to resolve +// the runtime on a supported path. +module.exports = require('./dist/cjs/handlebars.runtime')['default']; + +},{"./dist/cjs/handlebars.runtime":86}],128:[function(require,module,exports){ +'use strict'; + +var $defineProperty = require('es-define-property'); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + return !!$defineProperty; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!$defineProperty) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + +},{"es-define-property":70}],129:[function(require,module,exports){ +'use strict'; + +var test = { + __proto__: null, + foo: {} +}; + +var $Object = Object; + +/** @type {import('.')} */ +module.exports = function hasProto() { + // @ts-expect-error: TS errors on an inherited property for some reason + return { __proto__: test }.foo === test.foo + && !(test instanceof $Object); +}; + +},{}],130:[function(require,module,exports){ +'use strict'; + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = require('./shams'); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + +},{"./shams":131}],131:[function(require,module,exports){ +'use strict'; + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + +},{}],132:[function(require,module,exports){ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {import('.')} */ +module.exports = bind.call(call, $hasOwn); + +},{"function-bind":80}],133:[function(require,module,exports){ +module.exports = require("handlebars/runtime")["default"]; + +},{"handlebars/runtime":127}],134:[function(require,module,exports){ +(function (Buffer){(function (){ +/* +Copyright (c) 2013 Sam Decrock + +MIT License + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +var querystring = require ('querystring'); +var https = require ('https'); +var http = require ('http'); +var url = require ('url'); +var fs = require ('fs'); + + +/** + * Generate multipart boundary + * + * @returns {string} + */ + +function generateBoundary () { + var boundary = '---------------------------'; + var charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + for (var i = 0; i < 29; i++) { + boundary += charset.charAt (Math.floor (Math.random () * charset.length)); + } + + return boundary; +} + + +/** + * Extract cookies from headers + * + * @param headers {object} - Response headers + * @returns {array} - Extracted cookie strings + */ + +function extractCookies (headers) { + var rawcookies = headers['set-cookie']; + + if (!rawcookies) { + return []; + } + + if (rawcookies == []) { + return []; + } + + var cookies = []; + for (var i = 0; i < rawcookies.length; i++) { + var rawcookie = rawcookies[i].split (';'); + if (rawcookie[0]) { + cookies.push (rawcookie[0]); + } + } + return cookies; +} + + +/** + * Custom HTTP request + * + * @callback callback + * @param o {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +function doRequest (o, callback) { + if (!callback) { + callback = function (err) {}; // dummy function + } + + // prevent multiple callbacks + var finalCallbackDone = false; + function finalCallback (err, res) { + if (!finalCallbackDone) { + finalCallbackDone = true; + callback (err, res); + } + } + + if (o.maxRedirects === undefined) { + o.maxRedirects = 10; + } + + if (o.encodePostParameters === undefined) { + o.encodePostParameters = true; + } + + var chunks = []; + var body; // Buffer + var contentType; + + var port; + var host; + var path; + var isHttps = false; + + if (o.proxy) { + port = o.proxy.port; + host = o.proxy.host; + path = o.url; // complete url + + if (o.proxy.protocol && o.proxy.protocol.match (/https/)) { + isHttps = true; + } + } else { + var reqUrl = url.parse (o.url); + host = reqUrl.hostname; + path = reqUrl.path; + + if (reqUrl.protocol === 'https:') { + isHttps = true; + } + + if (reqUrl.port) { + port = reqUrl.port; + } else if (isHttps) { + port = 443; + } else { + port = 80; + } + } + + if (o.files && o.files.length > 0 && o.method === 'GET') { + var err = new Error ('Can\'t send files using GET'); + err.code = 'CANT_SEND_FILES_USING_GET'; + return finalCallback (err); + } + + if (o.parameters) { + if (o.method === 'GET') { + path += '?' + querystring.stringify (o.parameters); + } else { + body = new Buffer (querystring.stringify (o.parameters), 'utf8'); + contentType = 'application/x-www-form-urlencoded; charset=UTF-8'; + } + } + + if (o.json) { + body = new Buffer (JSON.stringify (o.json), 'utf8'); + contentType = 'application/json'; + } + + if (o.files) { + var crlf = '\r\n'; + var boundary = generateBoundary (); + var separator = '--' + boundary; + var bodyArray = new Array (); // temporary body array + + // if the user wants to POST/PUT files, other parameters need to be encoded using 'Content-Disposition' + for (var key in o.parameters) { + // According to RFC 2388 (https://www.ietf.org/rfc/rfc2388.txt) + // "Field names originally in non-ASCII character sets MAY be encoded + // within the value of the "name" parameter using the standard method + // described in RFC 2047." + // -- encodePostParameters -- true by default and MAY be changed by the user + var headerKey = o.encodePostParameters ? encodeURIComponent (key) : key; + var encodedParameter = separator + crlf + + 'Content-Disposition: form-data; name="' + headerKey + '"' + crlf + + crlf + + o.parameters[key] + crlf; + bodyArray.push (new Buffer (encodedParameter)); + } + + // now for the files: + var haveAlreadyAddedAFile = false; + + for (var file in o.files) { + var filepath = o.files[file]; + var filename = filepath.replace (/\\/g, '/').replace (/.*\//, ''); + + var encodedFile = separator + crlf + + 'Content-Disposition: form-data; name="' + file + '"; filename="' + filename + '"' + crlf + + 'Content-Type: application/octet-stream' + crlf + + crlf; + + // add crlf before separator if we have already added a file + if (haveAlreadyAddedAFile) { + encodedFile = crlf + encodedFile; + } + + bodyArray.push (new Buffer (encodedFile)); + + // add binary file: + bodyArray.push (require ('fs').readFileSync (filepath)); + + haveAlreadyAddedAFile = true; + } + + var footer = crlf + separator + '--' + crlf; + bodyArray.push (new Buffer (footer)); + + // set body and contentType: + body = Buffer.concat (bodyArray); + contentType = 'multipart/form-data; boundary=' + boundary; + } + + // overwrites the body if the user passes a body: + // clears the content-type + if (o.body) { + body = new Buffer (o.body, 'utf8'); + contentType = null; + } + + + var requestoptions = { + host: host, + port: port, + path: path, + method: o.method, + headers: {} + }; + + if (!o.redirectCount) { + o.redirectCount = 0; + } + + if (body) { + requestoptions.headers['Content-Length'] = body.length; + } + + if (contentType) { + requestoptions.headers['Content-Type'] = contentType; + } + + if (o.cookies) { + requestoptions.headers.Cookie = o.cookies.join ('; '); + } + + if (o.rejectUnauthorized !== undefined && isHttps) { + requestoptions.rejectUnauthorized = o.rejectUnauthorized; + } + + if (isHttps && o.key) { + requestoptions.key = o.key; + } + + if (isHttps && o.cert) { + requestoptions.cert = o.cert; + } + + if (isHttps && o.secureProtocol) { + requestoptions.secureProtocol = o.secureProtocol; + } + + if (isHttps && o.ciphers) { + requestoptions.ciphers = o.ciphers; + } + + if (isHttps && o.passphrase) { + requestoptions.passphrase = o.passphrase; + } + + if (isHttps && o.pfx) { + requestoptions.pfx = o.pfx; + } + + if (isHttps && o.ca) { + requestoptions.ca = o.ca; + } + + // add custom headers: + if (o.headers) { + for (var headerkey in o.headers) { + requestoptions.headers[headerkey] = o.headers[headerkey]; + } + } + + if (o.agent) { + requestoptions.agent = o.agent; + } + + if (o.auth) { + requestoptions.auth = o.auth; + } + + if (o.localAddress) { + requestoptions.localAddress = o.localAddress; + } + + if (o.secureOptions) { + requestoptions.secureOptions = o.secureOptions; + } + + + /** + * Process request response + * + * @param res {object} - Response details + * @returns {void} + */ + + function requestResponse (res) { + var ended = false; + var currentsize = 0; + + var downloadstream = null; + if (o.downloadlocation) { + downloadstream = fs.createWriteStream (o.downloadlocation); + } + + res.on ('data', function (chunk) { + if (o.downloadlocation) { + downloadstream.write (chunk); //write it to disk, not to memory + } else { + chunks.push (chunk); + } + + if (o.progressCallback) { + var totalsize = res.headers['content-length']; + if (totalsize) { + currentsize += chunk.length; + + o.progressCallback (null, { + url: o.url, + totalsize: totalsize, + currentsize: currentsize, + percentage: currentsize * 100 / totalsize + }); + } else { + o.progressCallback (new Error ('no content-length specified for file, so no progress monitoring possible')); + } + } + }); + + res.on ('end', function (err) { + ended = true; + + // check for redirects + if (res.headers.location && o.allowRedirects) { + // Close any open file + if (o.downloadlocation) { + downloadstream.end (); + } + + if (o.redirectCount < o.maxRedirects) { + o.redirectCount++; + o.url = res.headers.location; + o.cookies = extractCookies (res.headers); + return doRequest (o, finalCallback); + } else { + var err = new Error ('Too many redirects (> ' + o.maxRedirects + ')'); + err.code = 'TOOMANYREDIRECTS'; + err.redirects = o.maxRedirects; + return finalCallback (err); + } + } + + if (!o.downloadlocation) { + var responsebody = Buffer.concat (chunks); + if (!o.binary) { + responsebody = responsebody.toString ('utf8'); + } + + finalCallback (null, { + headers: res.headers, + statusCode: res.statusCode, + body: responsebody, + cookies: extractCookies (res.headers) + }); + } else { + downloadstream.end (null, null, function () { + finalCallback (null, { + headers: res.headers, + statusCode: res.statusCode, + downloadlocation: o.downloadlocation, + cookies: extractCookies (res.headers) + }); + }); + } + }); + + res.on ('close', function () { + if (!ended) { + finalCallback (new Error ('Request aborted')); + } + }); + } + + var request; + + // remove headers with undefined keys or values + // else we get an error in Node 0.12.0 about "setHeader ()" + for (var headerName in requestoptions.headers) { + var headerValue = requestoptions.headers[headerName]; + if (!headerName || !headerValue) { + delete requestoptions.headers[headerName]; + } + } + + if (isHttps) { + request = https.request (requestoptions, requestResponse); + } else { + request = http.request (requestoptions, requestResponse); + } + + if (o.timeout) { + request.setTimeout (parseInt (o.timeout, 10), function () { + var err = new Error ('request timed out'); + err.code = 'TIMEOUT'; + finalCallback (err); + request.abort (); + }); + } + + request.on ('error', function (err) { + finalCallback (err); + }); + + if (body) { + request.write (body); + } + + request.end (); +} + +exports.doRequest = doRequest; + + +/** + * HTTP GET method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.get = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'GET'; + + if (moreOptions.allowRedirects === undefined) { + moreOptions.allowRedirects = true; + } + + doRequest (moreOptions, callback); +}; + + +/** + * HTTP OPTIONS method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.options = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'OPTIONS'; + doRequest (moreOptions, callback); +}; + + +/** + * HTTP POST method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.post = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'POST'; + doRequest (moreOptions, callback); +}; + + +/** + * HTTP PUT method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.put = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'PUT'; + doRequest (moreOptions, callback); +}; + + +/** + * HTTP PATCH method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.patch = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'PATCH'; + doRequest (moreOptions, callback); +}; + + +/** + * HTTP DELETE method + * + * @callback callback + * @param url {string} - Request URL + * @param [options] {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.delete = function (url, options, callback) { + if (callback === undefined && options && typeof options === 'function') { + callback = options; + } + + var moreOptions = options; + moreOptions.url = url; + moreOptions.method = 'DELETE'; + doRequest (moreOptions, callback); +}; + + +/** + * Download a file + * + * @callback callback + * @param url {string} - Request URL + * @param downloadlocation {string} - Path where to store file + * @param [progressCallback] {function} - Called multiple times during download + * @param callback {function} - Called once when download ends + * @returns {void} + */ + +exports.download = function (url, downloadlocation, progressCallback, callback) { + var options = {}; + options.url = url; + options.method = 'GET'; + options.downloadlocation = downloadlocation; + options.allowRedirects = true; + + // if only 3 args are provided, so no progressCallback + if (callback === undefined && progressCallback && typeof progressCallback === 'function') { + callback = progressCallback; + } else { + options.progressCallback = progressCallback; + } + + doRequest (options, callback); +}; + + +/** + * Upload files + * old function, can still be used + * + * @callback callback + * @param options {object} - Request options + * @param callback [function] - Process response + * @returns {void} + */ + +exports.uploadFiles = function (options, callback) { + var moreOptions = options; + moreOptions.method = 'POST'; + doRequest (moreOptions, callback); +}; + +}).call(this)}).call(this,require("buffer").Buffer) +},{"buffer":60,"fs":59,"http":158,"https":135,"querystring":152,"url":179}],135:[function(require,module,exports){ +var http = require('http') +var url = require('url') + +var https = module.exports + +for (var key in http) { + if (http.hasOwnProperty(key)) https[key] = http[key] +} + +https.request = function (params, cb) { + params = validateParams(params) + return http.request.call(this, params, cb) +} + +https.get = function (params, cb) { + params = validateParams(params) + return http.get.call(this, params, cb) +} + +function validateParams (params) { + if (typeof params === 'string') { + params = url.parse(params) + } + if (!params.protocol) { + params.protocol = 'https:' + } + if (params.protocol !== 'https:') { + throw new Error('Protocol "' + params.protocol + '" not supported. Expected "https:"') + } + return params +} + +},{"http":158,"url":179}],136:[function(require,module,exports){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + +},{}],137:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } +} + +},{}],138:[function(require,module,exports){ +/*! + * jQuery JavaScript Library v3.7.1 + * https://jquery.com/ + * + * Copyright OpenJS Foundation and other contributors + * Released under the MIT license + * https://jquery.org/license + * + * Date: 2023-08-28T13:37Z + */ +( function( global, factory ) { + + "use strict"; + + if ( typeof module === "object" && typeof module.exports === "object" ) { + + // For CommonJS and CommonJS-like environments where a proper `window` + // is present, execute the factory and get jQuery. + // For environments that do not have a `window` with a `document` + // (such as Node.js), expose a factory as module.exports. + // This accentuates the need for the creation of a real `window`. + // e.g. var jQuery = require("jquery")(window); + // See ticket trac-14549 for more info. + module.exports = global.document ? + factory( global, true ) : + function( w ) { + if ( !w.document ) { + throw new Error( "jQuery requires a window with a document" ); + } + return factory( w ); + }; + } else { + factory( global ); + } + +// Pass this if window is not defined yet +} )( typeof window !== "undefined" ? window : this, function( window, noGlobal ) { + +// Edge <= 12 - 13+, Firefox <=18 - 45+, IE 10 - 11, Safari 5.1 - 9+, iOS 6 - 9.1 +// throw exceptions when non-strict code (e.g., ASP.NET 4.5) accesses strict mode +// arguments.callee.caller (trac-13335). But as of jQuery 3.0 (2016), strict mode should be common +// enough that all such attempts are guarded in a try block. +"use strict"; + +var arr = []; + +var getProto = Object.getPrototypeOf; + +var slice = arr.slice; + +var flat = arr.flat ? function( array ) { + return arr.flat.call( array ); +} : function( array ) { + return arr.concat.apply( [], array ); +}; + + +var push = arr.push; + +var indexOf = arr.indexOf; + +var class2type = {}; + +var toString = class2type.toString; + +var hasOwn = class2type.hasOwnProperty; + +var fnToString = hasOwn.toString; + +var ObjectFunctionString = fnToString.call( Object ); + +var support = {}; + +var isFunction = function isFunction( obj ) { + + // Support: Chrome <=57, Firefox <=52 + // In some browsers, typeof returns "function" for HTML elements + // (i.e., `typeof document.createElement( "object" ) === "function"`). + // We don't want to classify *any* DOM node as a function. + // Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5 + // Plus for old WebKit, typeof returns "function" for HTML collections + // (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756) + return typeof obj === "function" && typeof obj.nodeType !== "number" && + typeof obj.item !== "function"; + }; + + +var isWindow = function isWindow( obj ) { + return obj != null && obj === obj.window; + }; + + +var document = window.document; + + + + var preservedScriptAttributes = { + type: true, + src: true, + nonce: true, + noModule: true + }; + + function DOMEval( code, node, doc ) { + doc = doc || document; + + var i, val, + script = doc.createElement( "script" ); + + script.text = code; + if ( node ) { + for ( i in preservedScriptAttributes ) { + + // Support: Firefox 64+, Edge 18+ + // Some browsers don't support the "nonce" property on scripts. + // On the other hand, just using `getAttribute` is not enough as + // the `nonce` attribute is reset to an empty string whenever it + // becomes browsing-context connected. + // See https://github.com/whatwg/html/issues/2369 + // See https://html.spec.whatwg.org/#nonce-attributes + // The `node.getAttribute` check was added for the sake of + // `jQuery.globalEval` so that it can fake a nonce-containing node + // via an object. + val = node[ i ] || node.getAttribute && node.getAttribute( i ); + if ( val ) { + script.setAttribute( i, val ); + } + } + } + doc.head.appendChild( script ).parentNode.removeChild( script ); + } + + +function toType( obj ) { + if ( obj == null ) { + return obj + ""; + } + + // Support: Android <=2.3 only (functionish RegExp) + return typeof obj === "object" || typeof obj === "function" ? + class2type[ toString.call( obj ) ] || "object" : + typeof obj; +} +/* global Symbol */ +// Defining this global in .eslintrc.json would create a danger of using the global +// unguarded in another place, it seems safer to define global only for this module + + + +var version = "3.7.1", + + rhtmlSuffix = /HTML$/i, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + + // The jQuery object is actually just the init constructor 'enhanced' + // Need init if jQuery is called (just allow error to be thrown if not included) + return new jQuery.fn.init( selector, context ); + }; + +jQuery.fn = jQuery.prototype = { + + // The current version of jQuery being used + jquery: version, + + constructor: jQuery, + + // The default length of a jQuery object is 0 + length: 0, + + toArray: function() { + return slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + + // Return all the elements in a clean array + if ( num == null ) { + return slice.call( this ); + } + + // Return just the one element from the set + return num < 0 ? this[ num + this.length ] : this[ num ]; + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + each: function( callback ) { + return jQuery.each( this, callback ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map( this, function( elem, i ) { + return callback.call( elem, i, elem ); + } ) ); + }, + + slice: function() { + return this.pushStack( slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + even: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return ( i + 1 ) % 2; + } ) ); + }, + + odd: function() { + return this.pushStack( jQuery.grep( this, function( _elem, i ) { + return i % 2; + } ) ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[ j ] ] : [] ); + }, + + end: function() { + return this.prevObject || this.constructor(); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: push, + sort: arr.sort, + splice: arr.splice +}; + +jQuery.extend = jQuery.fn.extend = function() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[ 0 ] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + + // Skip the boolean and the target + target = arguments[ i ] || {}; + i++; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !isFunction( target ) ) { + target = {}; + } + + // Extend jQuery itself if only one argument is passed + if ( i === length ) { + target = this; + i--; + } + + for ( ; i < length; i++ ) { + + // Only deal with non-null/undefined values + if ( ( options = arguments[ i ] ) != null ) { + + // Extend the base object + for ( name in options ) { + copy = options[ name ]; + + // Prevent Object.prototype pollution + // Prevent never-ending loop + if ( name === "__proto__" || target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject( copy ) || + ( copyIsArray = Array.isArray( copy ) ) ) ) { + src = target[ name ]; + + // Ensure proper type for the source value + if ( copyIsArray && !Array.isArray( src ) ) { + clone = []; + } else if ( !copyIsArray && !jQuery.isPlainObject( src ) ) { + clone = {}; + } else { + clone = src; + } + copyIsArray = false; + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend( { + + // Unique for each copy of jQuery on the page + expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), + + // Assume jQuery is ready without the ready module + isReady: true, + + error: function( msg ) { + throw new Error( msg ); + }, + + noop: function() {}, + + isPlainObject: function( obj ) { + var proto, Ctor; + + // Detect obvious negatives + // Use toString instead of jQuery.type to catch host objects + if ( !obj || toString.call( obj ) !== "[object Object]" ) { + return false; + } + + proto = getProto( obj ); + + // Objects with no prototype (e.g., `Object.create( null )`) are plain + if ( !proto ) { + return true; + } + + // Objects with prototype are plain iff they were constructed by a global Object function + Ctor = hasOwn.call( proto, "constructor" ) && proto.constructor; + return typeof Ctor === "function" && fnToString.call( Ctor ) === ObjectFunctionString; + }, + + isEmptyObject: function( obj ) { + var name; + + for ( name in obj ) { + return false; + } + return true; + }, + + // Evaluates a script in a provided context; falls back to the global one + // if not specified. + globalEval: function( code, options, doc ) { + DOMEval( code, { nonce: options && options.nonce }, doc ); + }, + + each: function( obj, callback ) { + var length, i = 0; + + if ( isArrayLike( obj ) ) { + length = obj.length; + for ( ; i < length; i++ ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } else { + for ( i in obj ) { + if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) { + break; + } + } + } + + return obj; + }, + + + // Retrieve the text value of an array of DOM nodes + text: function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + + // If no nodeType, this is expected to be an array + while ( ( node = elem[ i++ ] ) ) { + + // Do not traverse comment nodes + ret += jQuery.text( node ); + } + } + if ( nodeType === 1 || nodeType === 11 ) { + return elem.textContent; + } + if ( nodeType === 9 ) { + return elem.documentElement.textContent; + } + if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + + // Do not include comment or processing instruction nodes + + return ret; + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArrayLike( Object( arr ) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + return arr == null ? -1 : indexOf.call( arr, elem, i ); + }, + + isXMLDoc: function( elem ) { + var namespace = elem && elem.namespaceURI, + docElem = elem && ( elem.ownerDocument || elem ).documentElement; + + // Assume HTML when documentElement doesn't yet exist, such as inside + // document fragments. + return !rhtmlSuffix.test( namespace || docElem && docElem.nodeName || "HTML" ); + }, + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + merge: function( first, second ) { + var len = +second.length, + j = 0, + i = first.length; + + for ( ; j < len; j++ ) { + first[ i++ ] = second[ j ]; + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, invert ) { + var callbackInverse, + matches = [], + i = 0, + length = elems.length, + callbackExpect = !invert; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + callbackInverse = !callback( elems[ i ], i ); + if ( callbackInverse !== callbackExpect ) { + matches.push( elems[ i ] ); + } + } + + return matches; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var length, value, + i = 0, + ret = []; + + // Go through the array, translating each of the items to their new values + if ( isArrayLike( elems ) ) { + length = elems.length; + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret.push( value ); + } + } + } + + // Flatten any nested arrays + return flat( ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // jQuery.support is not used in Core but other projects attach their + // properties to it so it needs to exist. + support: support +} ); + +if ( typeof Symbol === "function" ) { + jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ]; +} + +// Populate the class2type map +jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ), + function( _i, name ) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); + } ); + +function isArrayLike( obj ) { + + // Support: real iOS 8.2 only (not reproducible in simulator) + // `in` check used to prevent JIT error (gh-2145) + // hasOwn isn't used here due to false negatives + // regarding Nodelist length in IE + var length = !!obj && "length" in obj && obj.length, + type = toType( obj ); + + if ( isFunction( obj ) || isWindow( obj ) ) { + return false; + } + + return type === "array" || length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj; +} + + +function nodeName( elem, name ) { + + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + +} +var pop = arr.pop; + + +var sort = arr.sort; + + +var splice = arr.splice; + + +var whitespace = "[\\x20\\t\\r\\n\\f]"; + + +var rtrimCSS = new RegExp( + "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", + "g" +); + + + + +// Note: an element does not contain itself +jQuery.contains = function( a, b ) { + var bup = b && b.parentNode; + + return a === bup || !!( bup && bup.nodeType === 1 && ( + + // Support: IE 9 - 11+ + // IE doesn't have `contains` on SVG. + a.contains ? + a.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + ) ); +}; + + + + +// CSS string/identifier serialization +// https://drafts.csswg.org/cssom/#common-serializing-idioms +var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g; + +function fcssescape( ch, asCodePoint ) { + if ( asCodePoint ) { + + // U+0000 NULL becomes U+FFFD REPLACEMENT CHARACTER + if ( ch === "\0" ) { + return "\uFFFD"; + } + + // Control characters and (dependent upon position) numbers get escaped as code points + return ch.slice( 0, -1 ) + "\\" + ch.charCodeAt( ch.length - 1 ).toString( 16 ) + " "; + } + + // Other potentially-special ASCII characters get backslash-escaped + return "\\" + ch; +} + +jQuery.escapeSelector = function( sel ) { + return ( sel + "" ).replace( rcssescape, fcssescape ); +}; + + + + +var preferredDoc = document, + pushNative = push; + +( function() { + +var i, + Expr, + outermostContext, + sortInput, + hasDuplicate, + push = pushNative, + + // Local document vars + document, + documentElement, + documentIsHTML, + rbuggyQSA, + matches, + + // Instance-specific data + expando = jQuery.expando, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + nonnativeSelectorCache = createCache(), + sortOrder = function( a, b ) { + if ( a === b ) { + hasDuplicate = true; + } + return 0; + }, + + booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|" + + "loop|multiple|open|readonly|required|scoped", + + // Regular expressions + + // https://www.w3.org/TR/css-syntax-3/#ident-token-diagram + identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", + + // Attribute selectors: https://www.w3.org/TR/selectors/#attribute-selectors + attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + + + // Operator (capture 2) + "*([*^$|!~]?=)" + whitespace + + + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + + whitespace + "*\\]", + + pseudos = ":(" + identifier + ")(?:\\((" + + + // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: + // 1. quoted (capture 3; capture 4 or capture 5) + "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + + + // 2. simple (capture 6) + "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + + + // 3. anything else (capture 2) + ".*" + + ")\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rwhitespace = new RegExp( whitespace + "+", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rleadingCombinator = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + + whitespace + "*" ), + rdescend = new RegExp( whitespace + "|>" ), + + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + ID: new RegExp( "^#(" + identifier + ")" ), + CLASS: new RegExp( "^\\.(" + identifier + ")" ), + TAG: new RegExp( "^(" + identifier + "|[*])" ), + ATTR: new RegExp( "^" + attributes ), + PSEUDO: new RegExp( "^" + pseudos ), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + bool: new RegExp( "^(?:" + booleans + ")$", "i" ), + + // For use in libraries implementing .is() + // We use this for POS matching in `select` + needsContext: new RegExp( "^" + whitespace + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rsibling = /[+~]/, + + // CSS escapes + // https://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = new RegExp( "\\\\[\\da-fA-F]{1,6}" + whitespace + + "?|\\\\([^\\r\\n\\f])", "g" ), + funescape = function( escape, nonHex ) { + var high = "0x" + escape.slice( 1 ) - 0x10000; + + if ( nonHex ) { + + // Strip the backslash prefix from a non-hex escape sequence + return nonHex; + } + + // Replace a hexadecimal escape sequence with the encoded Unicode code point + // Support: IE <=11+ + // For values outside the Basic Multilingual Plane (BMP), manually construct a + // surrogate pair + return high < 0 ? + String.fromCharCode( high + 0x10000 ) : + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }, + + // Used for iframes; see `setDocument`. + // Support: IE 9 - 11+, Edge 12 - 18+ + // Removing the function wrapper causes a "Permission Denied" + // error in IE/Edge. + unloadHandler = function() { + setDocument(); + }, + + inDisabledFieldset = addCombinator( + function( elem ) { + return elem.disabled === true && nodeName( elem, "fieldset" ); + }, + { dir: "parentNode", next: "legend" } + ); + +// Support: IE <=9 only +// Accessing document.activeElement can throw unexpectedly +// https://bugs.jquery.com/ticket/13393 +function safeActiveElement() { + try { + return document.activeElement; + } catch ( err ) { } +} + +// Optimize for push.apply( _, NodeList ) +try { + push.apply( + ( arr = slice.call( preferredDoc.childNodes ) ), + preferredDoc.childNodes + ); + + // Support: Android <=4.0 + // Detect silently failing push.apply + // eslint-disable-next-line no-unused-expressions + arr[ preferredDoc.childNodes.length ].nodeType; +} catch ( e ) { + push = { + apply: function( target, els ) { + pushNative.apply( target, slice.call( els ) ); + }, + call: function( target ) { + pushNative.apply( target, slice.call( arguments, 1 ) ); + } + }; +} + +function find( selector, context, results, seed ) { + var m, i, elem, nid, match, groups, newSelector, + newContext = context && context.ownerDocument, + + // nodeType defaults to 9, since context defaults to document + nodeType = context ? context.nodeType : 9; + + results = results || []; + + // Return early from calls with invalid selector or context + if ( typeof selector !== "string" || !selector || + nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { + + return results; + } + + // Try to shortcut find operations (as opposed to filters) in HTML documents + if ( !seed ) { + setDocument( context ); + context = context || document; + + if ( documentIsHTML ) { + + // If the selector is sufficiently simple, try using a "get*By*" DOM method + // (excepting DocumentFragment context, where the methods don't exist) + if ( nodeType !== 11 && ( match = rquickExpr.exec( selector ) ) ) { + + // ID selector + if ( ( m = match[ 1 ] ) ) { + + // Document context + if ( nodeType === 9 ) { + if ( ( elem = context.getElementById( m ) ) ) { + + // Support: IE 9 only + // getElementById can match elements by name instead of ID + if ( elem.id === m ) { + push.call( results, elem ); + return results; + } + } else { + return results; + } + + // Element context + } else { + + // Support: IE 9 only + // getElementById can match elements by name instead of ID + if ( newContext && ( elem = newContext.getElementById( m ) ) && + find.contains( context, elem ) && + elem.id === m ) { + + push.call( results, elem ); + return results; + } + } + + // Type selector + } else if ( match[ 2 ] ) { + push.apply( results, context.getElementsByTagName( selector ) ); + return results; + + // Class selector + } else if ( ( m = match[ 3 ] ) && context.getElementsByClassName ) { + push.apply( results, context.getElementsByClassName( m ) ); + return results; + } + } + + // Take advantage of querySelectorAll + if ( !nonnativeSelectorCache[ selector + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( selector ) ) ) { + + newSelector = selector; + newContext = context; + + // qSA considers elements outside a scoping root when evaluating child or + // descendant combinators, which is not what we want. + // In such cases, we work around the behavior by prefixing every selector in the + // list with an ID selector referencing the scope context. + // The technique has to be used as well when a leading combinator is used + // as such selectors are not recognized by querySelectorAll. + // Thanks to Andrew Dupont for this technique. + if ( nodeType === 1 && + ( rdescend.test( selector ) || rleadingCombinator.test( selector ) ) ) { + + // Expand context for sibling selectors + newContext = rsibling.test( selector ) && testContext( context.parentNode ) || + context; + + // We can use :scope instead of the ID hack if the browser + // supports it & if we're not changing the context. + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when + // strict-comparing two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( newContext != context || !support.scope ) { + + // Capture the context ID, setting it first if necessary + if ( ( nid = context.getAttribute( "id" ) ) ) { + nid = jQuery.escapeSelector( nid ); + } else { + context.setAttribute( "id", ( nid = expando ) ); + } + } + + // Prefix every selector in the list + groups = tokenize( selector ); + i = groups.length; + while ( i-- ) { + groups[ i ] = ( nid ? "#" + nid : ":scope" ) + " " + + toSelector( groups[ i ] ); + } + newSelector = groups.join( "," ); + } + + try { + push.apply( results, + newContext.querySelectorAll( newSelector ) + ); + return results; + } catch ( qsaError ) { + nonnativeSelectorCache( selector, true ); + } finally { + if ( nid === expando ) { + context.removeAttribute( "id" ); + } + } + } + } + } + + // All others + return select( selector.replace( rtrimCSS, "$1" ), context, results, seed ); +} + +/** + * Create key-value caches of limited size + * @returns {function(string, object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var keys = []; + + function cache( key, value ) { + + // Use (key + " ") to avoid collision with native prototype properties + // (see https://github.com/jquery/sizzle/issues/157) + if ( keys.push( key + " " ) > Expr.cacheLength ) { + + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return ( cache[ key + " " ] = value ); + } + return cache; +} + +/** + * Mark a function for special use by jQuery selector module + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created element and returns a boolean result + */ +function assert( fn ) { + var el = document.createElement( "fieldset" ); + + try { + return !!fn( el ); + } catch ( e ) { + return false; + } finally { + + // Remove from its parent by default + if ( el.parentNode ) { + el.parentNode.removeChild( el ); + } + + // release memory in IE + el = null; + } +} + +/** + * Returns a function to use in pseudos for input types + * @param {String} type + */ +function createInputPseudo( type ) { + return function( elem ) { + return nodeName( elem, "input" ) && elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for buttons + * @param {String} type + */ +function createButtonPseudo( type ) { + return function( elem ) { + return ( nodeName( elem, "input" ) || nodeName( elem, "button" ) ) && + elem.type === type; + }; +} + +/** + * Returns a function to use in pseudos for :enabled/:disabled + * @param {Boolean} disabled true for :disabled; false for :enabled + */ +function createDisabledPseudo( disabled ) { + + // Known :disabled false positives: fieldset[disabled] > legend:nth-of-type(n+2) :can-disable + return function( elem ) { + + // Only certain elements can match :enabled or :disabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-enabled + // https://html.spec.whatwg.org/multipage/scripting.html#selector-disabled + if ( "form" in elem ) { + + // Check for inherited disabledness on relevant non-disabled elements: + // * listed form-associated elements in a disabled fieldset + // https://html.spec.whatwg.org/multipage/forms.html#category-listed + // https://html.spec.whatwg.org/multipage/forms.html#concept-fe-disabled + // * option elements in a disabled optgroup + // https://html.spec.whatwg.org/multipage/forms.html#concept-option-disabled + // All such elements have a "form" property. + if ( elem.parentNode && elem.disabled === false ) { + + // Option elements defer to a parent optgroup if present + if ( "label" in elem ) { + if ( "label" in elem.parentNode ) { + return elem.parentNode.disabled === disabled; + } else { + return elem.disabled === disabled; + } + } + + // Support: IE 6 - 11+ + // Use the isDisabled shortcut property to check for disabled fieldset ancestors + return elem.isDisabled === disabled || + + // Where there is no isDisabled, check manually + elem.isDisabled !== !disabled && + inDisabledFieldset( elem ) === disabled; + } + + return elem.disabled === disabled; + + // Try to winnow out elements that can't be disabled before trusting the disabled property. + // Some victims get caught in our net (label, legend, menu, track), but it shouldn't + // even exist on them, let alone have a boolean value. + } else if ( "label" in elem ) { + return elem.disabled === disabled; + } + + // Remaining elements are neither :enabled nor :disabled + return false; + }; +} + +/** + * Returns a function to use in pseudos for positionals + * @param {Function} fn + */ +function createPositionalPseudo( fn ) { + return markFunction( function( argument ) { + argument = +argument; + return markFunction( function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ ( j = matchIndexes[ i ] ) ] ) { + seed[ j ] = !( matches[ j ] = seed[ j ] ); + } + } + } ); + } ); +} + +/** + * Checks a node for validity as a jQuery selector context + * @param {Element|Object=} context + * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value + */ +function testContext( context ) { + return context && typeof context.getElementsByTagName !== "undefined" && context; +} + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [node] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +function setDocument( node ) { + var subWindow, + doc = node ? node.ownerDocument || node : preferredDoc; + + // Return early if doc is invalid or already selected + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( doc == document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Update global variables + document = doc; + documentElement = document.documentElement; + documentIsHTML = !jQuery.isXMLDoc( document ); + + // Support: iOS 7 only, IE 9 - 11+ + // Older browsers didn't support unprefixed `matches`. + matches = documentElement.matches || + documentElement.webkitMatchesSelector || + documentElement.msMatchesSelector; + + // Support: IE 9 - 11+, Edge 12 - 18+ + // Accessing iframe documents after unload throws "permission denied" errors + // (see trac-13936). + // Limit the fix to IE & Edge Legacy; despite Edge 15+ implementing `matches`, + // all IE 9+ and Edge Legacy versions implement `msMatchesSelector` as well. + if ( documentElement.msMatchesSelector && + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + preferredDoc != document && + ( subWindow = document.defaultView ) && subWindow.top !== subWindow ) { + + // Support: IE 9 - 11+, Edge 12 - 18+ + subWindow.addEventListener( "unload", unloadHandler ); + } + + // Support: IE <10 + // Check if getElementById returns elements by name + // The broken getElementById methods don't pick up programmatically-set names, + // so use a roundabout getElementsByName test + support.getById = assert( function( el ) { + documentElement.appendChild( el ).id = jQuery.expando; + return !document.getElementsByName || + !document.getElementsByName( jQuery.expando ).length; + } ); + + // Support: IE 9 only + // Check to see if it's possible to do matchesSelector + // on a disconnected node. + support.disconnectedMatch = assert( function( el ) { + return matches.call( el, "*" ); + } ); + + // Support: IE 9 - 11+, Edge 12 - 18+ + // IE/Edge don't support the :scope pseudo-class. + support.scope = assert( function() { + return document.querySelectorAll( ":scope" ); + } ); + + // Support: Chrome 105 - 111 only, Safari 15.4 - 16.3 only + // Make sure the `:has()` argument is parsed unforgivingly. + // We include `*` in the test to detect buggy implementations that are + // _selectively_ forgiving (specifically when the list includes at least + // one valid selector). + // Note that we treat complete lack of support for `:has()` as if it were + // spec-compliant support, which is fine because use of `:has()` in such + // environments will fail in the qSA path and fall back to jQuery traversal + // anyway. + support.cssHas = assert( function() { + try { + document.querySelector( ":has(*,:jqfake)" ); + return false; + } catch ( e ) { + return true; + } + } ); + + // ID filter and find + if ( support.getById ) { + Expr.filter.ID = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute( "id" ) === attrId; + }; + }; + Expr.find.ID = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var elem = context.getElementById( id ); + return elem ? [ elem ] : []; + } + }; + } else { + Expr.filter.ID = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== "undefined" && + elem.getAttributeNode( "id" ); + return node && node.value === attrId; + }; + }; + + // Support: IE 6 - 7 only + // getElementById is not reliable as a find shortcut + Expr.find.ID = function( id, context ) { + if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { + var node, i, elems, + elem = context.getElementById( id ); + + if ( elem ) { + + // Verify the id attribute + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + + // Fall back on getElementsByName + elems = context.getElementsByName( id ); + i = 0; + while ( ( elem = elems[ i++ ] ) ) { + node = elem.getAttributeNode( "id" ); + if ( node && node.value === id ) { + return [ elem ]; + } + } + } + + return []; + } + }; + } + + // Tag + Expr.find.TAG = function( tag, context ) { + if ( typeof context.getElementsByTagName !== "undefined" ) { + return context.getElementsByTagName( tag ); + + // DocumentFragment nodes don't have gEBTN + } else { + return context.querySelectorAll( tag ); + } + }; + + // Class + Expr.find.CLASS = function( className, context ) { + if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) { + return context.getElementsByClassName( className ); + } + }; + + /* QSA/matchesSelector + ---------------------------------------------------------------------- */ + + // QSA and matchesSelector support + + rbuggyQSA = []; + + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert( function( el ) { + + var input; + + documentElement.appendChild( el ).innerHTML = + "" + + ""; + + // Support: iOS <=7 - 8 only + // Boolean attributes and "value" are not treated correctly in some XML documents + if ( !el.querySelectorAll( "[selected]" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); + } + + // Support: iOS <=7 - 8 only + if ( !el.querySelectorAll( "[id~=" + expando + "-]" ).length ) { + rbuggyQSA.push( "~=" ); + } + + // Support: iOS 8 only + // https://bugs.webkit.org/show_bug.cgi?id=136851 + // In-page `selector#id sibling-combinator selector` fails + if ( !el.querySelectorAll( "a#" + expando + "+*" ).length ) { + rbuggyQSA.push( ".#.+[+~]" ); + } + + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + if ( !el.querySelectorAll( ":checked" ).length ) { + rbuggyQSA.push( ":checked" ); + } + + // Support: Windows 8 Native Apps + // The type and name attributes are restricted during .innerHTML assignment + input = document.createElement( "input" ); + input.setAttribute( "type", "hidden" ); + el.appendChild( input ).setAttribute( "name", "D" ); + + // Support: IE 9 - 11+ + // IE's :disabled selector does not pick up the children of disabled fieldsets + // Support: Chrome <=105+, Firefox <=104+, Safari <=15.4+ + // In some of the document kinds, these selectors wouldn't work natively. + // This is probably OK but for backwards compatibility we want to maintain + // handling them through jQuery traversal in jQuery 3.x. + documentElement.appendChild( el ).disabled = true; + if ( el.querySelectorAll( ":disabled" ).length !== 2 ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Support: IE 11+, Edge 15 - 18+ + // IE 11/Edge don't find elements on a `[name='']` query in some cases. + // Adding a temporary attribute to the document before the selection works + // around the issue. + // Interestingly, IE 10 & older don't seem to have the issue. + input = document.createElement( "input" ); + input.setAttribute( "name", "" ); + el.appendChild( input ); + if ( !el.querySelectorAll( "[name='']" ).length ) { + rbuggyQSA.push( "\\[" + whitespace + "*name" + whitespace + "*=" + + whitespace + "*(?:''|\"\")" ); + } + } ); + + if ( !support.cssHas ) { + + // Support: Chrome 105 - 110+, Safari 15.4 - 16.3+ + // Our regular `try-catch` mechanism fails to detect natively-unsupported + // pseudo-classes inside `:has()` (such as `:has(:contains("Foo"))`) + // in browsers that parse the `:has()` argument as a forgiving selector list. + // https://drafts.csswg.org/selectors/#relational now requires the argument + // to be parsed unforgivingly, but browsers have not yet fully adjusted. + rbuggyQSA.push( ":has" ); + } + + rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join( "|" ) ); + + /* Sorting + ---------------------------------------------------------------------- */ + + // Document order sorting + sortOrder = function( a, b ) { + + // Flag for duplicate removal + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + // Sort on method existence if only one input has compareDocumentPosition + var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; + if ( compare ) { + return compare; + } + + // Calculate position if both inputs belong to the same document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + compare = ( a.ownerDocument || a ) == ( b.ownerDocument || b ) ? + a.compareDocumentPosition( b ) : + + // Otherwise we know they are disconnected + 1; + + // Disconnected nodes + if ( compare & 1 || + ( !support.sortDetached && b.compareDocumentPosition( a ) === compare ) ) { + + // Choose the first element that is related to our preferred document + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( a === document || a.ownerDocument == preferredDoc && + find.contains( preferredDoc, a ) ) { + return -1; + } + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( b === document || b.ownerDocument == preferredDoc && + find.contains( preferredDoc, b ) ) { + return 1; + } + + // Maintain original order + return sortInput ? + ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : + 0; + } + + return compare & 4 ? -1 : 1; + }; + + return document; +} + +find.matches = function( expr, elements ) { + return find( expr, null, null, elements ); +}; + +find.matchesSelector = function( elem, expr ) { + setDocument( elem ); + + if ( documentIsHTML && + !nonnativeSelectorCache[ expr + " " ] && + ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { + + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch ( e ) { + nonnativeSelectorCache( expr, true ); + } + } + + return find( expr, document, null, [ elem ] ).length > 0; +}; + +find.contains = function( context, elem ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( context.ownerDocument || context ) != document ) { + setDocument( context ); + } + return jQuery.contains( context, elem ); +}; + + +find.attr = function( elem, name ) { + + // Set document vars if needed + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( ( elem.ownerDocument || elem ) != document ) { + setDocument( elem ); + } + + var fn = Expr.attrHandle[ name.toLowerCase() ], + + // Don't get fooled by Object.prototype properties (see trac-13807) + val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? + fn( elem, name, !documentIsHTML ) : + undefined; + + if ( val !== undefined ) { + return val; + } + + return elem.getAttribute( name ); +}; + +find.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +/** + * Document sorting and removing duplicates + * @param {ArrayLike} results + */ +jQuery.uniqueSort = function( results ) { + var elem, + duplicates = [], + j = 0, + i = 0; + + // Unless we *know* we can detect duplicates, assume their presence + // + // Support: Android <=4.0+ + // Testing for detecting duplicates is unpredictable so instead assume we can't + // depend on duplicate detection in all browsers without a stable sort. + hasDuplicate = !support.sortStable; + sortInput = !support.sortStable && slice.call( results, 0 ); + sort.call( results, sortOrder ); + + if ( hasDuplicate ) { + while ( ( elem = results[ i++ ] ) ) { + if ( elem === results[ i ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + splice.call( results, duplicates[ j ], 1 ); + } + } + + // Clear input after sorting to release objects + // See https://github.com/jquery/sizzle/pull/225 + sortInput = null; + + return results; +}; + +jQuery.fn.uniqueSort = function() { + return this.pushStack( jQuery.uniqueSort( slice.apply( this ) ) ); +}; + +Expr = jQuery.expr = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + attrHandle: {}, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + ATTR: function( match ) { + match[ 1 ] = match[ 1 ].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[ 3 ] = ( match[ 3 ] || match[ 4 ] || match[ 5 ] || "" ) + .replace( runescape, funescape ); + + if ( match[ 2 ] === "~=" ) { + match[ 3 ] = " " + match[ 3 ] + " "; + } + + return match.slice( 0, 4 ); + }, + + CHILD: function( match ) { + + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[ 1 ] = match[ 1 ].toLowerCase(); + + if ( match[ 1 ].slice( 0, 3 ) === "nth" ) { + + // nth-* requires argument + if ( !match[ 3 ] ) { + find.error( match[ 0 ] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[ 4 ] = +( match[ 4 ] ? + match[ 5 ] + ( match[ 6 ] || 1 ) : + 2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) + ); + match[ 5 ] = +( ( match[ 7 ] + match[ 8 ] ) || match[ 3 ] === "odd" ); + + // other types prohibit arguments + } else if ( match[ 3 ] ) { + find.error( match[ 0 ] ); + } + + return match; + }, + + PSEUDO: function( match ) { + var excess, + unquoted = !match[ 6 ] && match[ 2 ]; + + if ( matchExpr.CHILD.test( match[ 0 ] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[ 3 ] ) { + match[ 2 ] = match[ 4 ] || match[ 5 ] || ""; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + + // Get excess from tokenize (recursively) + ( excess = tokenize( unquoted, true ) ) && + + // advance to the next closing parenthesis + ( excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length ) ) { + + // excess is a negative index + match[ 0 ] = match[ 0 ].slice( 0, excess ); + match[ 2 ] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + TAG: function( nodeNameSelector ) { + var expectedNodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); + return nodeNameSelector === "*" ? + function() { + return true; + } : + function( elem ) { + return nodeName( elem, expectedNodeName ); + }; + }, + + CLASS: function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + ( pattern = new RegExp( "(^|" + whitespace + ")" + className + + "(" + whitespace + "|$)" ) ) && + classCache( className, function( elem ) { + return pattern.test( + typeof elem.className === "string" && elem.className || + typeof elem.getAttribute !== "undefined" && + elem.getAttribute( "class" ) || + "" + ); + } ); + }, + + ATTR: function( name, operator, check ) { + return function( elem ) { + var result = find.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + if ( operator === "=" ) { + return result === check; + } + if ( operator === "!=" ) { + return result !== check; + } + if ( operator === "^=" ) { + return check && result.indexOf( check ) === 0; + } + if ( operator === "*=" ) { + return check && result.indexOf( check ) > -1; + } + if ( operator === "$=" ) { + return check && result.slice( -check.length ) === check; + } + if ( operator === "~=" ) { + return ( " " + result.replace( rwhitespace, " " ) + " " ) + .indexOf( check ) > -1; + } + if ( operator === "|=" ) { + return result === check || result.slice( 0, check.length + 1 ) === check + "-"; + } + + return false; + }; + }, + + CHILD: function( type, what, _argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, _context, xml ) { + var cache, outerCache, node, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType, + diff = false; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( ( node = node[ dir ] ) ) { + if ( ofType ? + nodeName( node, name ) : + node.nodeType === 1 ) { + + return false; + } + } + + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || ( parent[ expando ] = {} ); + cache = outerCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex && cache[ 2 ]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( ( node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + } else { + + // Use previously-cached element index if available + if ( useCache ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + cache = outerCache[ type ] || []; + nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ]; + diff = nodeIndex; + } + + // xml :nth-child(...) + // or :nth-last-child(...) or :nth(-last)?-of-type(...) + if ( diff === false ) { + + // Use the same loop as above to seek `elem` from the start + while ( ( node = ++nodeIndex && node && node[ dir ] || + ( diff = nodeIndex = 0 ) || start.pop() ) ) { + + if ( ( ofType ? + nodeName( node, name ) : + node.nodeType === 1 ) && + ++diff ) { + + // Cache the index of each encountered element + if ( useCache ) { + outerCache = node[ expando ] || + ( node[ expando ] = {} ); + outerCache[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + PSEUDO: function( pseudo, argument ) { + + // pseudo-class names are case-insensitive + // https://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + find.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as jQuery does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction( function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[ i ] ); + seed[ idx ] = !( matches[ idx ] = matched[ i ] ); + } + } ) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + + // Potentially complex pseudos + not: markFunction( function( selector ) { + + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrimCSS, "$1" ) ); + + return matcher[ expando ] ? + markFunction( function( seed, matches, _context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( ( elem = unmatched[ i ] ) ) { + seed[ i ] = !( matches[ i ] = elem ); + } + } + } ) : + function( elem, _context, xml ) { + input[ 0 ] = elem; + matcher( input, null, xml, results ); + + // Don't keep the element + // (see https://github.com/jquery/sizzle/issues/299) + input[ 0 ] = null; + return !results.pop(); + }; + } ), + + has: markFunction( function( selector ) { + return function( elem ) { + return find( selector, elem ).length > 0; + }; + } ), + + contains: markFunction( function( text ) { + text = text.replace( runescape, funescape ); + return function( elem ) { + return ( elem.textContent || jQuery.text( elem ) ).indexOf( text ) > -1; + }; + } ), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // https://www.w3.org/TR/selectors/#lang-pseudo + lang: markFunction( function( lang ) { + + // lang value must be a valid identifier + if ( !ridentifier.test( lang || "" ) ) { + find.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( ( elemLang = documentIsHTML ? + elem.lang : + elem.getAttribute( "xml:lang" ) || elem.getAttribute( "lang" ) ) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( ( elem = elem.parentNode ) && elem.nodeType === 1 ); + return false; + }; + } ), + + // Miscellaneous + target: function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + root: function( elem ) { + return elem === documentElement; + }, + + focus: function( elem ) { + return elem === safeActiveElement() && + document.hasFocus() && + !!( elem.type || elem.href || ~elem.tabIndex ); + }, + + // Boolean properties + enabled: createDisabledPseudo( false ), + disabled: createDisabledPseudo( true ), + + checked: function( elem ) { + + // In CSS3, :checked should return both checked and selected elements + // https://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + return ( nodeName( elem, "input" ) && !!elem.checked ) || + ( nodeName( elem, "option" ) && !!elem.selected ); + }, + + selected: function( elem ) { + + // Support: IE <=11+ + // Accessing the selectedIndex property + // forces the browser to treat the default option as + // selected when in an optgroup. + if ( elem.parentNode ) { + // eslint-disable-next-line no-unused-expressions + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + empty: function( elem ) { + + // https://www.w3.org/TR/selectors/#empty-pseudo + // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), + // but not by others (comment: 8; processing instruction: 7; etc.) + // nodeType < 6 works because attributes (2) do not appear as children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeType < 6 ) { + return false; + } + } + return true; + }, + + parent: function( elem ) { + return !Expr.pseudos.empty( elem ); + }, + + // Element/input types + header: function( elem ) { + return rheader.test( elem.nodeName ); + }, + + input: function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + button: function( elem ) { + return nodeName( elem, "input" ) && elem.type === "button" || + nodeName( elem, "button" ); + }, + + text: function( elem ) { + var attr; + return nodeName( elem, "input" ) && elem.type === "text" && + + // Support: IE <10 only + // New HTML5 attribute values (e.g., "search") appear + // with elem.type === "text" + ( ( attr = elem.getAttribute( "type" ) ) == null || + attr.toLowerCase() === "text" ); + }, + + // Position-in-collection + first: createPositionalPseudo( function() { + return [ 0 ]; + } ), + + last: createPositionalPseudo( function( _matchIndexes, length ) { + return [ length - 1 ]; + } ), + + eq: createPositionalPseudo( function( _matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + } ), + + even: createPositionalPseudo( function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + odd: createPositionalPseudo( function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + lt: createPositionalPseudo( function( matchIndexes, length, argument ) { + var i; + + if ( argument < 0 ) { + i = argument + length; + } else if ( argument > length ) { + i = length; + } else { + i = argument; + } + + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ), + + gt: createPositionalPseudo( function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + } ) + } +}; + +Expr.pseudos.nth = Expr.pseudos.eq; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +// Easy API for creating new setFilters +function setFilters() {} +setFilters.prototype = Expr.filters = Expr.pseudos; +Expr.setFilters = new setFilters(); + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || ( match = rcomma.exec( soFar ) ) ) { + if ( match ) { + + // Don't consume trailing commas as valid + soFar = soFar.slice( match[ 0 ].length ) || soFar; + } + groups.push( ( tokens = [] ) ); + } + + matched = false; + + // Combinators + if ( ( match = rleadingCombinator.exec( soFar ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + + // Cast descendant combinators to space + type: match[ 0 ].replace( rtrimCSS, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( ( match = matchExpr[ type ].exec( soFar ) ) && ( !preFilters[ type ] || + ( match = preFilters[ type ]( match ) ) ) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + if ( parseOnly ) { + return soFar.length; + } + + return soFar ? + find.error( selector ) : + + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[ i ].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + skip = combinator.next, + key = skip || dir, + checkNonElements = base && key === "parentNode", + doneName = done++; + + return combinator.first ? + + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + return false; + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var oldCache, outerCache, + newCache = [ dirruns, doneName ]; + + // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching + if ( xml ) { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( ( elem = elem[ dir ] ) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || ( elem[ expando ] = {} ); + + if ( skip && nodeName( elem, skip ) ) { + elem = elem[ dir ] || elem; + } else if ( ( oldCache = outerCache[ key ] ) && + oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { + + // Assign to newCache so results back-propagate to previous elements + return ( newCache[ 2 ] = oldCache[ 2 ] ); + } else { + + // Reuse newcache so results back-propagate to previous elements + outerCache[ key ] = newCache; + + // A match means we're done; a fail means we have to keep checking + if ( ( newCache[ 2 ] = matcher( elem, context, xml ) ) ) { + return true; + } + } + } + } + } + return false; + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[ i ]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[ 0 ]; +} + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + find( selector, contexts[ i ], results ); + } + return results; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( ( elem = unmatched[ i ] ) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction( function( seed, results, context, xml ) { + var temp, i, elem, matcherOut, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || + multipleContexts( selector || "*", + context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems; + + if ( matcher ) { + + // If we have a postFinder, or filtered seed, or non-seed postFilter + // or preexisting results, + matcherOut = postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results; + + // Find primary matches + matcher( matcherIn, matcherOut, context, xml ); + } else { + matcherOut = matcherIn; + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( ( elem = temp[ i ] ) ) { + matcherOut[ postMap[ i ] ] = !( matcherIn[ postMap[ i ] ] = elem ); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) ) { + + // Restore matcherIn since elem is not yet a final match + temp.push( ( matcherIn[ i ] = elem ) ); + } + } + postFinder( null, ( matcherOut = [] ), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( ( elem = matcherOut[ i ] ) && + ( temp = postFinder ? indexOf.call( seed, elem ) : preMap[ i ] ) > -1 ) { + + seed[ temp ] = !( results[ temp ] = elem ); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + } ); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[ 0 ].type ], + implicitRelative = leadingRelative || Expr.relative[ " " ], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + var ret = ( !leadingRelative && ( xml || context != outermostContext ) ) || ( + ( checkContext = context ).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + + // Avoid hanging onto element + // (see https://github.com/jquery/sizzle/issues/299) + checkContext = null; + return ret; + } ]; + + for ( ; i < len; i++ ) { + if ( ( matcher = Expr.relative[ tokens[ i ].type ] ) ) { + matchers = [ addCombinator( elementMatcher( matchers ), matcher ) ]; + } else { + matcher = Expr.filter[ tokens[ i ].type ].apply( null, tokens[ i ].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[ j ].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( + + // If the preceding token was a descendant combinator, insert an implicit any-element `*` + tokens.slice( 0, i - 1 ) + .concat( { value: tokens[ i - 2 ].type === " " ? "*" : "" } ) + ).replace( rtrimCSS, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( ( tokens = tokens.slice( j ) ) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + var bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, outermost ) { + var elem, j, matcher, + matchedCount = 0, + i = "0", + unmatched = seed && [], + setMatched = [], + contextBackup = outermostContext, + + // We must always have either seed elements or outermost context + elems = seed || byElement && Expr.find.TAG( "*", outermost ), + + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = ( dirruns += contextBackup == null ? 1 : Math.random() || 0.1 ), + len = elems.length; + + if ( outermost ) { + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + outermostContext = context == document || context || outermost; + } + + // Add elements passing elementMatchers directly to results + // Support: iOS <=7 - 9 only + // Tolerate NodeList properties (IE: "length"; Safari: ) matching + // elements by id. (see trac-14142) + for ( ; i !== len && ( elem = elems[ i ] ) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + + // Support: IE 11+, Edge 17 - 18+ + // IE/Edge sometimes throw a "Permission denied" error when strict-comparing + // two documents; shallow comparisons work. + // eslint-disable-next-line eqeqeq + if ( !context && elem.ownerDocument != document ) { + setDocument( elem ); + xml = !documentIsHTML; + } + while ( ( matcher = elementMatchers[ j++ ] ) ) { + if ( matcher( elem, context || document, xml ) ) { + push.call( results, elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + + // They will have gone through all possible matchers + if ( ( elem = !matcher && elem ) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // `i` is now the count of elements visited above, and adding it to `matchedCount` + // makes the latter nonnegative. + matchedCount += i; + + // Apply set filters to unmatched elements + // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount` + // equals `i`), unless we didn't visit _any_ elements in the above loop because we have + // no element matchers and no seed. + // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that + // case, which will result in a "00" `matchedCount` that differs from `i` but is also + // numerically zero. + if ( bySet && i !== matchedCount ) { + j = 0; + while ( ( matcher = setMatchers[ j++ ] ) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !( unmatched[ i ] || setMatched[ i ] ) ) { + setMatched[ i ] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + jQuery.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +function compile( selector, match /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + + // Generate a function of recursive functions that can be used to check each element + if ( !match ) { + match = tokenize( selector ); + } + i = match.length; + while ( i-- ) { + cached = matcherFromTokens( match[ i ] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, + matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + + // Save selector and tokenization + cached.selector = selector; + } + return cached; +} + +/** + * A low-level selection function that works with jQuery's compiled + * selector functions + * @param {String|Function} selector A selector or a pre-compiled + * selector function built with jQuery selector compile + * @param {Element} context + * @param {Array} [results] + * @param {Array} [seed] A set of elements to match against + */ +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + compiled = typeof selector === "function" && selector, + match = !seed && tokenize( ( selector = compiled.selector || selector ) ); + + results = results || []; + + // Try to minimize operations if there is only one selector in the list and no seed + // (the latter of which guarantees us context) + if ( match.length === 1 ) { + + // Reduce context if the leading compound selector is an ID + tokens = match[ 0 ] = match[ 0 ].slice( 0 ); + if ( tokens.length > 2 && ( token = tokens[ 0 ] ).type === "ID" && + context.nodeType === 9 && documentIsHTML && Expr.relative[ tokens[ 1 ].type ] ) { + + context = ( Expr.find.ID( + token.matches[ 0 ].replace( runescape, funescape ), + context + ) || [] )[ 0 ]; + if ( !context ) { + return results; + + // Precompiled matchers will still verify ancestry, so step up a level + } else if ( compiled ) { + context = context.parentNode; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr.needsContext.test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[ i ]; + + // Abort if we hit a combinator + if ( Expr.relative[ ( type = token.type ) ] ) { + break; + } + if ( ( find = Expr.find[ type ] ) ) { + + // Search, expanding context for leading sibling combinators + if ( ( seed = find( + token.matches[ 0 ].replace( runescape, funescape ), + rsibling.test( tokens[ 0 ].type ) && + testContext( context.parentNode ) || context + ) ) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, seed ); + return results; + } + + break; + } + } + } + } + + // Compile and execute a filtering function if one is not provided + // Provide `match` to avoid retokenization if we modified the selector above + ( compiled || compile( selector, match ) )( + seed, + context, + !documentIsHTML, + results, + !context || rsibling.test( selector ) && testContext( context.parentNode ) || context + ); + return results; +} + +// One-time assignments + +// Support: Android <=4.0 - 4.1+ +// Sort stability +support.sortStable = expando.split( "" ).sort( sortOrder ).join( "" ) === expando; + +// Initialize against the default document +setDocument(); + +// Support: Android <=4.0 - 4.1+ +// Detached nodes confoundingly follow *each other* +support.sortDetached = assert( function( el ) { + + // Should return 1, but returns 4 (following) + return el.compareDocumentPosition( document.createElement( "fieldset" ) ) & 1; +} ); + +jQuery.find = find; + +// Deprecated +jQuery.expr[ ":" ] = jQuery.expr.pseudos; +jQuery.unique = jQuery.uniqueSort; + +// These have always been private, but they used to be documented as part of +// Sizzle so let's maintain them for now for backwards compatibility purposes. +find.compile = compile; +find.select = select; +find.setDocument = setDocument; +find.tokenize = tokenize; + +find.escape = jQuery.escapeSelector; +find.getText = jQuery.text; +find.isXML = jQuery.isXMLDoc; +find.selectors = jQuery.expr; +find.support = jQuery.support; +find.uniqueSort = jQuery.uniqueSort; + + /* eslint-enable */ + +} )(); + + +var dir = function( elem, dir, until ) { + var matched = [], + truncate = until !== undefined; + + while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { + if ( elem.nodeType === 1 ) { + if ( truncate && jQuery( elem ).is( until ) ) { + break; + } + matched.push( elem ); + } + } + return matched; +}; + + +var siblings = function( n, elem ) { + var matched = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + matched.push( n ); + } + } + + return matched; +}; + + +var rneedsContext = jQuery.expr.match.needsContext; + +var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); + + + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, not ) { + if ( isFunction( qualifier ) ) { + return jQuery.grep( elements, function( elem, i ) { + return !!qualifier.call( elem, i, elem ) !== not; + } ); + } + + // Single element + if ( qualifier.nodeType ) { + return jQuery.grep( elements, function( elem ) { + return ( elem === qualifier ) !== not; + } ); + } + + // Arraylike of elements (jQuery, arguments, Array) + if ( typeof qualifier !== "string" ) { + return jQuery.grep( elements, function( elem ) { + return ( indexOf.call( qualifier, elem ) > -1 ) !== not; + } ); + } + + // Filtered directly for both simple and complex selectors + return jQuery.filter( qualifier, elements, not ); +} + +jQuery.filter = function( expr, elems, not ) { + var elem = elems[ 0 ]; + + if ( not ) { + expr = ":not(" + expr + ")"; + } + + if ( elems.length === 1 && elem.nodeType === 1 ) { + return jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : []; + } + + return jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { + return elem.nodeType === 1; + } ) ); +}; + +jQuery.fn.extend( { + find: function( selector ) { + var i, ret, + len = this.length, + self = this; + + if ( typeof selector !== "string" ) { + return this.pushStack( jQuery( selector ).filter( function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + } ) ); + } + + ret = this.pushStack( [] ); + + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, self[ i ], ret ); + } + + return len > 1 ? jQuery.uniqueSort( ret ) : ret; + }, + filter: function( selector ) { + return this.pushStack( winnow( this, selector || [], false ) ); + }, + not: function( selector ) { + return this.pushStack( winnow( this, selector || [], true ) ); + }, + is: function( selector ) { + return !!winnow( + this, + + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + typeof selector === "string" && rneedsContext.test( selector ) ? + jQuery( selector ) : + selector || [], + false + ).length; + } +} ); + + +// Initialize a jQuery object + + +// A central reference to the root jQuery(document) +var rootjQuery, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (trac-9521) + // Strict HTML recognition (trac-11290: must start with <) + // Shortcut simple #id case for speed + rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, + + init = jQuery.fn.init = function( selector, context, root ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Method init() accepts an alternate rootjQuery + // so migrate can support jQuery.sub (gh-2101) + root = root || rootjQuery; + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector[ 0 ] === "<" && + selector[ selector.length - 1 ] === ">" && + selector.length >= 3 ) { + + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && ( match[ 1 ] || !context ) ) { + + // HANDLE: $(html) -> $(array) + if ( match[ 1 ] ) { + context = context instanceof jQuery ? context[ 0 ] : context; + + // Option to run scripts is true for back-compat + // Intentionally let the error be thrown if parseHTML is not present + jQuery.merge( this, jQuery.parseHTML( + match[ 1 ], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + + // Properties of context are called as methods if possible + if ( isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[ 2 ] ); + + if ( elem ) { + + // Inject the element directly into the jQuery object + this[ 0 ] = elem; + this.length = 1; + } + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || root ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this[ 0 ] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( isFunction( selector ) ) { + return root.ready !== undefined ? + root.ready( selector ) : + + // Execute immediately if ready is not present + selector( jQuery ); + } + + return jQuery.makeArray( selector, this ); + }; + +// Give the init function the jQuery prototype for later instantiation +init.prototype = jQuery.fn; + +// Initialize central reference +rootjQuery = jQuery( document ); + + +var rparentsprev = /^(?:parents|prev(?:Until|All))/, + + // Methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend( { + has: function( target ) { + var targets = jQuery( target, this ), + l = targets.length; + + return this.filter( function() { + var i = 0; + for ( ; i < l; i++ ) { + if ( jQuery.contains( this, targets[ i ] ) ) { + return true; + } + } + } ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + matched = [], + targets = typeof selectors !== "string" && jQuery( selectors ); + + // Positional selectors never match, since there's no _selection_ context + if ( !rneedsContext.test( selectors ) ) { + for ( ; i < l; i++ ) { + for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) { + + // Always skip document fragments + if ( cur.nodeType < 11 && ( targets ? + targets.index( cur ) > -1 : + + // Don't pass non-elements to jQuery#find + cur.nodeType === 1 && + jQuery.find.matchesSelector( cur, selectors ) ) ) { + + matched.push( cur ); + break; + } + } + } + } + + return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched ); + }, + + // Determine the position of an element within the set + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; + } + + // Index in selector + if ( typeof elem === "string" ) { + return indexOf.call( jQuery( elem ), this[ 0 ] ); + } + + // Locate the position of the desired element + return indexOf.call( this, + + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[ 0 ] : elem + ); + }, + + add: function( selector, context ) { + return this.pushStack( + jQuery.uniqueSort( + jQuery.merge( this.get(), jQuery( selector, context ) ) + ) + ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter( selector ) + ); + } +} ); + +function sibling( cur, dir ) { + while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {} + return cur; +} + +jQuery.each( { + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, _i, until ) { + return dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, _i, until ) { + return dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, _i, until ) { + return dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return siblings( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return siblings( elem.firstChild ); + }, + contents: function( elem ) { + if ( elem.contentDocument != null && + + // Support: IE 11+ + // elements with no `data` attribute has an object + // `contentDocument` with a `null` prototype. + getProto( elem.contentDocument ) ) { + + return elem.contentDocument; + } + + // Support: IE 9 - 11 only, iOS 7 only, Android Browser <=4.3 only + // Treat the template element as a regular one in browsers that + // don't support it. + if ( nodeName( elem, "template" ) ) { + elem = elem.content || elem; + } + + return jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var matched = jQuery.map( this, fn, until ); + + if ( name.slice( -5 ) !== "Until" ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + matched = jQuery.filter( selector, matched ); + } + + if ( this.length > 1 ) { + + // Remove duplicates + if ( !guaranteedUnique[ name ] ) { + jQuery.uniqueSort( matched ); + } + + // Reverse order for parents* and prev-derivatives + if ( rparentsprev.test( name ) ) { + matched.reverse(); + } + } + + return this.pushStack( matched ); + }; +} ); +var rnothtmlwhite = ( /[^\x20\t\r\n\f]+/g ); + + + +// Convert String-formatted options into Object-formatted ones +function createOptions( options ) { + var object = {}; + jQuery.each( options.match( rnothtmlwhite ) || [], function( _, flag ) { + object[ flag ] = true; + } ); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + createOptions( options ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + + // Last fire value for non-forgettable lists + memory, + + // Flag to know if list was already fired + fired, + + // Flag to prevent firing + locked, + + // Actual callback list + list = [], + + // Queue of execution data for repeatable lists + queue = [], + + // Index of currently firing callback (modified by add/remove as needed) + firingIndex = -1, + + // Fire callbacks + fire = function() { + + // Enforce single-firing + locked = locked || options.once; + + // Execute callbacks for all pending executions, + // respecting firingIndex overrides and runtime changes + fired = firing = true; + for ( ; queue.length; firingIndex = -1 ) { + memory = queue.shift(); + while ( ++firingIndex < list.length ) { + + // Run callback and check for early termination + if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false && + options.stopOnFalse ) { + + // Jump to end and forget the data so .add doesn't re-fire + firingIndex = list.length; + memory = false; + } + } + } + + // Forget the data if we're done with it + if ( !options.memory ) { + memory = false; + } + + firing = false; + + // Clean up if we're done firing for good + if ( locked ) { + + // Keep an empty list if we have data for future add calls + if ( memory ) { + list = []; + + // Otherwise, this object is spent + } else { + list = ""; + } + } + }, + + // Actual Callbacks object + self = { + + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + + // If we have memory from a past run, we should fire after adding + if ( memory && !firing ) { + firingIndex = list.length - 1; + queue.push( memory ); + } + + ( function add( args ) { + jQuery.each( args, function( _, arg ) { + if ( isFunction( arg ) ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && toType( arg ) !== "string" ) { + + // Inspect recursively + add( arg ); + } + } ); + } )( arguments ); + + if ( memory && !firing ) { + fire(); + } + } + return this; + }, + + // Remove a callback from the list + remove: function() { + jQuery.each( arguments, function( _, arg ) { + var index; + while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + + // Handle firing indexes + if ( index <= firingIndex ) { + firingIndex--; + } + } + } ); + return this; + }, + + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? + jQuery.inArray( fn, list ) > -1 : + list.length > 0; + }, + + // Remove all callbacks from the list + empty: function() { + if ( list ) { + list = []; + } + return this; + }, + + // Disable .fire and .add + // Abort any current/pending executions + // Clear all callbacks and values + disable: function() { + locked = queue = []; + list = memory = ""; + return this; + }, + disabled: function() { + return !list; + }, + + // Disable .fire + // Also disable .add unless we have memory (since it would have no effect) + // Abort any pending executions + lock: function() { + locked = queue = []; + if ( !memory && !firing ) { + list = memory = ""; + } + return this; + }, + locked: function() { + return !!locked; + }, + + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + if ( !locked ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + queue.push( args ); + if ( !firing ) { + fire(); + } + } + return this; + }, + + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; + + +function Identity( v ) { + return v; +} +function Thrower( ex ) { + throw ex; +} + +function adoptValue( value, resolve, reject, noValue ) { + var method; + + try { + + // Check for promise aspect first to privilege synchronous behavior + if ( value && isFunction( ( method = value.promise ) ) ) { + method.call( value ).done( resolve ).fail( reject ); + + // Other thenables + } else if ( value && isFunction( ( method = value.then ) ) ) { + method.call( value, resolve, reject ); + + // Other non-thenables + } else { + + // Control `resolve` arguments by letting Array#slice cast boolean `noValue` to integer: + // * false: [ value ].slice( 0 ) => resolve( value ) + // * true: [ value ].slice( 1 ) => resolve() + resolve.apply( undefined, [ value ].slice( noValue ) ); + } + + // For Promises/A+, convert exceptions into rejections + // Since jQuery.when doesn't unwrap thenables, we can skip the extra checks appearing in + // Deferred#then to conditionally suppress rejection. + } catch ( value ) { + + // Support: Android 4.0 only + // Strict mode functions invoked without .call/.apply get global-object context + reject.apply( undefined, [ value ] ); + } +} + +jQuery.extend( { + + Deferred: function( func ) { + var tuples = [ + + // action, add listener, callbacks, + // ... .then handlers, argument index, [final state] + [ "notify", "progress", jQuery.Callbacks( "memory" ), + jQuery.Callbacks( "memory" ), 2 ], + [ "resolve", "done", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 0, "resolved" ], + [ "reject", "fail", jQuery.Callbacks( "once memory" ), + jQuery.Callbacks( "once memory" ), 1, "rejected" ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + "catch": function( fn ) { + return promise.then( null, fn ); + }, + + // Keep pipe for back-compat + pipe: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + + return jQuery.Deferred( function( newDefer ) { + jQuery.each( tuples, function( _i, tuple ) { + + // Map tuples (progress, done, fail) to arguments (done, fail, progress) + var fn = isFunction( fns[ tuple[ 4 ] ] ) && fns[ tuple[ 4 ] ]; + + // deferred.progress(function() { bind to newDefer or newDefer.notify }) + // deferred.done(function() { bind to newDefer or newDefer.resolve }) + // deferred.fail(function() { bind to newDefer or newDefer.reject }) + deferred[ tuple[ 1 ] ]( function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && isFunction( returned.promise ) ) { + returned.promise() + .progress( newDefer.notify ) + .done( newDefer.resolve ) + .fail( newDefer.reject ); + } else { + newDefer[ tuple[ 0 ] + "With" ]( + this, + fn ? [ returned ] : arguments + ); + } + } ); + } ); + fns = null; + } ).promise(); + }, + then: function( onFulfilled, onRejected, onProgress ) { + var maxDepth = 0; + function resolve( depth, deferred, handler, special ) { + return function() { + var that = this, + args = arguments, + mightThrow = function() { + var returned, then; + + // Support: Promises/A+ section 2.3.3.3.3 + // https://promisesaplus.com/#point-59 + // Ignore double-resolution attempts + if ( depth < maxDepth ) { + return; + } + + returned = handler.apply( that, args ); + + // Support: Promises/A+ section 2.3.1 + // https://promisesaplus.com/#point-48 + if ( returned === deferred.promise() ) { + throw new TypeError( "Thenable self-resolution" ); + } + + // Support: Promises/A+ sections 2.3.3.1, 3.5 + // https://promisesaplus.com/#point-54 + // https://promisesaplus.com/#point-75 + // Retrieve `then` only once + then = returned && + + // Support: Promises/A+ section 2.3.4 + // https://promisesaplus.com/#point-64 + // Only check objects and functions for thenability + ( typeof returned === "object" || + typeof returned === "function" ) && + returned.then; + + // Handle a returned thenable + if ( isFunction( then ) ) { + + // Special processors (notify) just wait for resolution + if ( special ) { + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ) + ); + + // Normal processors (resolve) also hook into progress + } else { + + // ...and disregard older resolution values + maxDepth++; + + then.call( + returned, + resolve( maxDepth, deferred, Identity, special ), + resolve( maxDepth, deferred, Thrower, special ), + resolve( maxDepth, deferred, Identity, + deferred.notifyWith ) + ); + } + + // Handle all other returned values + } else { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Identity ) { + that = undefined; + args = [ returned ]; + } + + // Process the value(s) + // Default process is resolve + ( special || deferred.resolveWith )( that, args ); + } + }, + + // Only normal processors (resolve) catch and reject exceptions + process = special ? + mightThrow : + function() { + try { + mightThrow(); + } catch ( e ) { + + if ( jQuery.Deferred.exceptionHook ) { + jQuery.Deferred.exceptionHook( e, + process.error ); + } + + // Support: Promises/A+ section 2.3.3.3.4.1 + // https://promisesaplus.com/#point-61 + // Ignore post-resolution exceptions + if ( depth + 1 >= maxDepth ) { + + // Only substitute handlers pass on context + // and multiple values (non-spec behavior) + if ( handler !== Thrower ) { + that = undefined; + args = [ e ]; + } + + deferred.rejectWith( that, args ); + } + } + }; + + // Support: Promises/A+ section 2.3.3.3.1 + // https://promisesaplus.com/#point-57 + // Re-resolve promises immediately to dodge false rejection from + // subsequent errors + if ( depth ) { + process(); + } else { + + // Call an optional hook to record the error, in case of exception + // since it's otherwise lost when execution goes async + if ( jQuery.Deferred.getErrorHook ) { + process.error = jQuery.Deferred.getErrorHook(); + + // The deprecated alias of the above. While the name suggests + // returning the stack, not an error instance, jQuery just passes + // it directly to `console.warn` so both will work; an instance + // just better cooperates with source maps. + } else if ( jQuery.Deferred.getStackHook ) { + process.error = jQuery.Deferred.getStackHook(); + } + window.setTimeout( process ); + } + }; + } + + return jQuery.Deferred( function( newDefer ) { + + // progress_handlers.add( ... ) + tuples[ 0 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onProgress ) ? + onProgress : + Identity, + newDefer.notifyWith + ) + ); + + // fulfilled_handlers.add( ... ) + tuples[ 1 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onFulfilled ) ? + onFulfilled : + Identity + ) + ); + + // rejected_handlers.add( ... ) + tuples[ 2 ][ 3 ].add( + resolve( + 0, + newDefer, + isFunction( onRejected ) ? + onRejected : + Thrower + ) + ); + } ).promise(); + }, + + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 5 ]; + + // promise.progress = list.add + // promise.done = list.add + // promise.fail = list.add + promise[ tuple[ 1 ] ] = list.add; + + // Handle state + if ( stateString ) { + list.add( + function() { + + // state = "resolved" (i.e., fulfilled) + // state = "rejected" + state = stateString; + }, + + // rejected_callbacks.disable + // fulfilled_callbacks.disable + tuples[ 3 - i ][ 2 ].disable, + + // rejected_handlers.disable + // fulfilled_handlers.disable + tuples[ 3 - i ][ 3 ].disable, + + // progress_callbacks.lock + tuples[ 0 ][ 2 ].lock, + + // progress_handlers.lock + tuples[ 0 ][ 3 ].lock + ); + } + + // progress_handlers.fire + // fulfilled_handlers.fire + // rejected_handlers.fire + list.add( tuple[ 3 ].fire ); + + // deferred.notify = function() { deferred.notifyWith(...) } + // deferred.resolve = function() { deferred.resolveWith(...) } + // deferred.reject = function() { deferred.rejectWith(...) } + deferred[ tuple[ 0 ] ] = function() { + deferred[ tuple[ 0 ] + "With" ]( this === deferred ? undefined : this, arguments ); + return this; + }; + + // deferred.notifyWith = list.fireWith + // deferred.resolveWith = list.fireWith + // deferred.rejectWith = list.fireWith + deferred[ tuple[ 0 ] + "With" ] = list.fireWith; + } ); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( singleValue ) { + var + + // count of uncompleted subordinates + remaining = arguments.length, + + // count of unprocessed arguments + i = remaining, + + // subordinate fulfillment data + resolveContexts = Array( i ), + resolveValues = slice.call( arguments ), + + // the primary Deferred + primary = jQuery.Deferred(), + + // subordinate callback factory + updateFunc = function( i ) { + return function( value ) { + resolveContexts[ i ] = this; + resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; + if ( !( --remaining ) ) { + primary.resolveWith( resolveContexts, resolveValues ); + } + }; + }; + + // Single- and empty arguments are adopted like Promise.resolve + if ( remaining <= 1 ) { + adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject, + !remaining ); + + // Use .then() to unwrap secondary thenables (cf. gh-3000) + if ( primary.state() === "pending" || + isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) { + + return primary.then(); + } + } + + // Multiple arguments are aggregated like Promise.all array elements + while ( i-- ) { + adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject ); + } + + return primary.promise(); + } +} ); + + +// These usually indicate a programmer mistake during development, +// warn about them ASAP rather than swallowing them by default. +var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; + +// If `jQuery.Deferred.getErrorHook` is defined, `asyncError` is an error +// captured before the async barrier to get the original error cause +// which may otherwise be hidden. +jQuery.Deferred.exceptionHook = function( error, asyncError ) { + + // Support: IE 8 - 9 only + // Console exists when dev tools are open, which can happen at any time + if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { + window.console.warn( "jQuery.Deferred exception: " + error.message, + error.stack, asyncError ); + } +}; + + + + +jQuery.readyException = function( error ) { + window.setTimeout( function() { + throw error; + } ); +}; + + + + +// The deferred used on DOM ready +var readyList = jQuery.Deferred(); + +jQuery.fn.ready = function( fn ) { + + readyList + .then( fn ) + + // Wrap jQuery.readyException in a function so that the lookup + // happens at the time of error handling instead of callback + // registration. + .catch( function( error ) { + jQuery.readyException( error ); + } ); + + return this; +}; + +jQuery.extend( { + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See trac-6781 + readyWait: 1, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + } +} ); + +jQuery.ready.then = readyList.then; + +// The ready event handler and self cleanup method +function completed() { + document.removeEventListener( "DOMContentLoaded", completed ); + window.removeEventListener( "load", completed ); + jQuery.ready(); +} + +// Catch cases where $(document).ready() is called +// after the browser event has already occurred. +// Support: IE <=9 - 10 only +// Older IE sometimes signals "interactive" too soon +if ( document.readyState === "complete" || + ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) { + + // Handle it asynchronously to allow scripts the opportunity to delay ready + window.setTimeout( jQuery.ready ); + +} else { + + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed ); +} + + + + +// Multifunctional method to get and set values of a collection +// The value/s can optionally be executed if it's a function +var access = function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + len = elems.length, + bulk = key == null; + + // Sets many values + if ( toType( key ) === "object" ) { + chainable = true; + for ( i in key ) { + access( elems, fn, i, key[ i ], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, _key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < len; i++ ) { + fn( + elems[ i ], key, raw ? + value : + value.call( elems[ i ], i, fn( elems[ i ], key ) ) + ); + } + } + } + + if ( chainable ) { + return elems; + } + + // Gets + if ( bulk ) { + return fn.call( elems ); + } + + return len ? fn( elems[ 0 ], key ) : emptyGet; +}; + + +// Matches dashed string for camelizing +var rmsPrefix = /^-ms-/, + rdashAlpha = /-([a-z])/g; + +// Used by camelCase as callback to replace() +function fcamelCase( _all, letter ) { + return letter.toUpperCase(); +} + +// Convert dashed to camelCase; used by the css and data modules +// Support: IE <=9 - 11, Edge 12 - 15 +// Microsoft forgot to hump their vendor prefix (trac-9572) +function camelCase( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); +} +var acceptData = function( owner ) { + + // Accepts only: + // - Node + // - Node.ELEMENT_NODE + // - Node.DOCUMENT_NODE + // - Object + // - Any + return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); +}; + + + + +function Data() { + this.expando = jQuery.expando + Data.uid++; +} + +Data.uid = 1; + +Data.prototype = { + + cache: function( owner ) { + + // Check if the owner object already has a cache + var value = owner[ this.expando ]; + + // If not, create one + if ( !value ) { + value = {}; + + // We can accept data for non-element nodes in modern browsers, + // but we should not, see trac-8335. + // Always return an empty object. + if ( acceptData( owner ) ) { + + // If it is a node unlikely to be stringify-ed or looped over + // use plain assignment + if ( owner.nodeType ) { + owner[ this.expando ] = value; + + // Otherwise secure it in a non-enumerable property + // configurable must be true to allow the property to be + // deleted when data is removed + } else { + Object.defineProperty( owner, this.expando, { + value: value, + configurable: true + } ); + } + } + } + + return value; + }, + set: function( owner, data, value ) { + var prop, + cache = this.cache( owner ); + + // Handle: [ owner, key, value ] args + // Always use camelCase key (gh-2257) + if ( typeof data === "string" ) { + cache[ camelCase( data ) ] = value; + + // Handle: [ owner, { properties } ] args + } else { + + // Copy the properties one-by-one to the cache object + for ( prop in data ) { + cache[ camelCase( prop ) ] = data[ prop ]; + } + } + return cache; + }, + get: function( owner, key ) { + return key === undefined ? + this.cache( owner ) : + + // Always use camelCase key (gh-2257) + owner[ this.expando ] && owner[ this.expando ][ camelCase( key ) ]; + }, + access: function( owner, key, value ) { + + // In cases where either: + // + // 1. No key was specified + // 2. A string key was specified, but no value provided + // + // Take the "read" path and allow the get method to determine + // which value to return, respectively either: + // + // 1. The entire cache object + // 2. The data stored at the key + // + if ( key === undefined || + ( ( key && typeof key === "string" ) && value === undefined ) ) { + + return this.get( owner, key ); + } + + // When the key is not a string, or both a key and value + // are specified, set or extend (existing objects) with either: + // + // 1. An object of properties + // 2. A key and value + // + this.set( owner, key, value ); + + // Since the "set" path can have two possible entry points + // return the expected data based on which path was taken[*] + return value !== undefined ? value : key; + }, + remove: function( owner, key ) { + var i, + cache = owner[ this.expando ]; + + if ( cache === undefined ) { + return; + } + + if ( key !== undefined ) { + + // Support array or space separated string of keys + if ( Array.isArray( key ) ) { + + // If key is an array of keys... + // We always set camelCase keys, so remove that. + key = key.map( camelCase ); + } else { + key = camelCase( key ); + + // If a key with the spaces exists, use it. + // Otherwise, create an array by matching non-whitespace + key = key in cache ? + [ key ] : + ( key.match( rnothtmlwhite ) || [] ); + } + + i = key.length; + + while ( i-- ) { + delete cache[ key[ i ] ]; + } + } + + // Remove the expando if there's no more data + if ( key === undefined || jQuery.isEmptyObject( cache ) ) { + + // Support: Chrome <=35 - 45 + // Webkit & Blink performance suffers when deleting properties + // from DOM nodes, so set to undefined instead + // https://bugs.chromium.org/p/chromium/issues/detail?id=378607 (bug restricted) + if ( owner.nodeType ) { + owner[ this.expando ] = undefined; + } else { + delete owner[ this.expando ]; + } + } + }, + hasData: function( owner ) { + var cache = owner[ this.expando ]; + return cache !== undefined && !jQuery.isEmptyObject( cache ); + } +}; +var dataPriv = new Data(); + +var dataUser = new Data(); + + + +// Implementation Summary +// +// 1. Enforce API surface and semantic compatibility with 1.9.x branch +// 2. Improve the module's maintainability by reducing the storage +// paths to a single mechanism. +// 3. Use the same single mechanism to support "private" and "user" data. +// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) +// 5. Avoid exposing implementation details on user objects (eg. expando properties) +// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 + +var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + rmultiDash = /[A-Z]/g; + +function getData( data ) { + if ( data === "true" ) { + return true; + } + + if ( data === "false" ) { + return false; + } + + if ( data === "null" ) { + return null; + } + + // Only convert to a number if it doesn't change the string + if ( data === +data + "" ) { + return +data; + } + + if ( rbrace.test( data ) ) { + return JSON.parse( data ); + } + + return data; +} + +function dataAttr( elem, key, data ) { + var name; + + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase(); + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = getData( data ); + } catch ( e ) {} + + // Make sure we set the data so it isn't changed later + dataUser.set( elem, key, data ); + } else { + data = undefined; + } + } + return data; +} + +jQuery.extend( { + hasData: function( elem ) { + return dataUser.hasData( elem ) || dataPriv.hasData( elem ); + }, + + data: function( elem, name, data ) { + return dataUser.access( elem, name, data ); + }, + + removeData: function( elem, name ) { + dataUser.remove( elem, name ); + }, + + // TODO: Now that all calls to _data and _removeData have been replaced + // with direct calls to dataPriv methods, these can be deprecated. + _data: function( elem, name, data ) { + return dataPriv.access( elem, name, data ); + }, + + _removeData: function( elem, name ) { + dataPriv.remove( elem, name ); + } +} ); + +jQuery.fn.extend( { + data: function( key, value ) { + var i, name, data, + elem = this[ 0 ], + attrs = elem && elem.attributes; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = dataUser.get( elem ); + + if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) { + i = attrs.length; + while ( i-- ) { + + // Support: IE 11 only + // The attrs elements can be null (trac-14894) + if ( attrs[ i ] ) { + name = attrs[ i ].name; + if ( name.indexOf( "data-" ) === 0 ) { + name = camelCase( name.slice( 5 ) ); + dataAttr( elem, name, data[ name ] ); + } + } + } + dataPriv.set( elem, "hasDataAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each( function() { + dataUser.set( this, key ); + } ); + } + + return access( this, function( value ) { + var data; + + // The calling jQuery object (element matches) is not empty + // (and therefore has an element appears at this[ 0 ]) and the + // `value` parameter was not undefined. An empty jQuery object + // will result in `undefined` for elem = this[ 0 ] which will + // throw an exception if an attempt to read a data cache is made. + if ( elem && value === undefined ) { + + // Attempt to get data from the cache + // The key will always be camelCased in Data + data = dataUser.get( elem, key ); + if ( data !== undefined ) { + return data; + } + + // Attempt to "discover" the data in + // HTML5 custom data-* attrs + data = dataAttr( elem, key ); + if ( data !== undefined ) { + return data; + } + + // We tried really hard, but the data doesn't exist. + return; + } + + // Set the data... + this.each( function() { + + // We always store the camelCased key + dataUser.set( this, key, value ); + } ); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each( function() { + dataUser.remove( this, key ); + } ); + } +} ); + + +jQuery.extend( { + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = dataPriv.get( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || Array.isArray( data ) ) { + queue = dataPriv.access( elem, type, jQuery.makeArray( data ) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // Clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // Not public - generate a queueHooks object, or return the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return dataPriv.get( elem, key ) || dataPriv.access( elem, key, { + empty: jQuery.Callbacks( "once memory" ).add( function() { + dataPriv.remove( elem, [ type + "queue", key ] ); + } ) + } ); + } +} ); + +jQuery.fn.extend( { + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[ 0 ], type ); + } + + return data === undefined ? + this : + this.each( function() { + var queue = jQuery.queue( this, type, data ); + + // Ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[ 0 ] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + } ); + }, + dequeue: function( type ) { + return this.each( function() { + jQuery.dequeue( this, type ); + } ); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while ( i-- ) { + tmp = dataPriv.get( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +} ); +var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; + +var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); + + +var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; + +var documentElement = document.documentElement; + + + + var isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ); + }, + composed = { composed: true }; + + // Support: IE 9 - 11+, Edge 12 - 18+, iOS 10.0 - 10.2 only + // Check attachment across shadow DOM boundaries when possible (gh-3504) + // Support: iOS 10.0-10.2 only + // Early iOS 10 versions support `attachShadow` but not `getRootNode`, + // leading to errors. We need to check for `getRootNode`. + if ( documentElement.getRootNode ) { + isAttached = function( elem ) { + return jQuery.contains( elem.ownerDocument, elem ) || + elem.getRootNode( composed ) === elem.ownerDocument; + }; + } +var isHiddenWithinTree = function( elem, el ) { + + // isHiddenWithinTree might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + + // Inline style trumps all + return elem.style.display === "none" || + elem.style.display === "" && + + // Otherwise, check computed style + // Support: Firefox <=43 - 45 + // Disconnected elements can have computed display: none, so first confirm that elem is + // in the document. + isAttached( elem ) && + + jQuery.css( elem, "display" ) === "none"; + }; + + + +function adjustCSS( elem, prop, valueParts, tween ) { + var adjusted, scale, + maxIterations = 20, + currentValue = tween ? + function() { + return tween.cur(); + } : + function() { + return jQuery.css( elem, prop, "" ); + }, + initial = currentValue(), + unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ), + + // Starting value computation is required for potential unit mismatches + initialInUnit = elem.nodeType && + ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) && + rcssNum.exec( jQuery.css( elem, prop ) ); + + if ( initialInUnit && initialInUnit[ 3 ] !== unit ) { + + // Support: Firefox <=54 + // Halve the iteration target value to prevent interference from CSS upper bounds (gh-2144) + initial = initial / 2; + + // Trust units reported by jQuery.css + unit = unit || initialInUnit[ 3 ]; + + // Iteratively approximate from a nonzero starting point + initialInUnit = +initial || 1; + + while ( maxIterations-- ) { + + // Evaluate and update our best guess (doubling guesses that zero out). + // Finish if the scale equals or crosses 1 (making the old*new product non-positive). + jQuery.style( elem, prop, initialInUnit + unit ); + if ( ( 1 - scale ) * ( 1 - ( scale = currentValue() / initial || 0.5 ) ) <= 0 ) { + maxIterations = 0; + } + initialInUnit = initialInUnit / scale; + + } + + initialInUnit = initialInUnit * 2; + jQuery.style( elem, prop, initialInUnit + unit ); + + // Make sure we update the tween properties later on + valueParts = valueParts || []; + } + + if ( valueParts ) { + initialInUnit = +initialInUnit || +initial || 0; + + // Apply relative offset (+=/-=) if specified + adjusted = valueParts[ 1 ] ? + initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] : + +valueParts[ 2 ]; + if ( tween ) { + tween.unit = unit; + tween.start = initialInUnit; + tween.end = adjusted; + } + } + return adjusted; +} + + +var defaultDisplayMap = {}; + +function getDefaultDisplay( elem ) { + var temp, + doc = elem.ownerDocument, + nodeName = elem.nodeName, + display = defaultDisplayMap[ nodeName ]; + + if ( display ) { + return display; + } + + temp = doc.body.appendChild( doc.createElement( nodeName ) ); + display = jQuery.css( temp, "display" ); + + temp.parentNode.removeChild( temp ); + + if ( display === "none" ) { + display = "block"; + } + defaultDisplayMap[ nodeName ] = display; + + return display; +} + +function showHide( elements, show ) { + var display, elem, + values = [], + index = 0, + length = elements.length; + + // Determine new display value for elements that need to change + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + display = elem.style.display; + if ( show ) { + + // Since we force visibility upon cascade-hidden elements, an immediate (and slow) + // check is required in this first loop unless we have a nonempty display value (either + // inline or about-to-be-restored) + if ( display === "none" ) { + values[ index ] = dataPriv.get( elem, "display" ) || null; + if ( !values[ index ] ) { + elem.style.display = ""; + } + } + if ( elem.style.display === "" && isHiddenWithinTree( elem ) ) { + values[ index ] = getDefaultDisplay( elem ); + } + } else { + if ( display !== "none" ) { + values[ index ] = "none"; + + // Remember what we're overwriting + dataPriv.set( elem, "display", display ); + } + } + } + + // Set the display of the elements in a second loop to avoid constant reflow + for ( index = 0; index < length; index++ ) { + if ( values[ index ] != null ) { + elements[ index ].style.display = values[ index ]; + } + } + + return elements; +} + +jQuery.fn.extend( { + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + if ( typeof state === "boolean" ) { + return state ? this.show() : this.hide(); + } + + return this.each( function() { + if ( isHiddenWithinTree( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + } ); + } +} ); +var rcheckableType = ( /^(?:checkbox|radio)$/i ); + +var rtagName = ( /<([a-z][^\/\0>\x20\t\r\n\f]*)/i ); + +var rscriptType = ( /^$|^module$|\/(?:java|ecma)script/i ); + + + +( function() { + var fragment = document.createDocumentFragment(), + div = fragment.appendChild( document.createElement( "div" ) ), + input = document.createElement( "input" ); + + // Support: Android 4.0 - 4.3 only + // Check state lost if the name is set (trac-11217) + // Support: Windows Web Apps (WWA) + // `name` and `type` must use .setAttribute for WWA (trac-14901) + input.setAttribute( "type", "radio" ); + input.setAttribute( "checked", "checked" ); + input.setAttribute( "name", "t" ); + + div.appendChild( input ); + + // Support: Android <=4.1 only + // Older WebKit doesn't clone checked state correctly in fragments + support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE <=11 only + // Make sure textarea (and checkbox) defaultValue is properly cloned + div.innerHTML = ""; + support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; + + // Support: IE <=9 only + // IE <=9 replaces "; + support.option = !!div.lastChild; +} )(); + + +// We have to close these tags to support XHTML (trac-13200) +var wrapMap = { + + // XHTML parsers do not magically insert elements in the + // same way that tag soup parsers do. So we cannot shorten + // this by omitting or other required elements. + thead: [ 1, "", "
    " ], + col: [ 2, "", "
    " ], + tr: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + _default: [ 0, "", "" ] +}; + +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +// Support: IE <=9 only +if ( !support.option ) { + wrapMap.optgroup = wrapMap.option = [ 1, "" ]; +} + + +function getAll( context, tag ) { + + // Support: IE <=9 - 11 only + // Use typeof to avoid zero-argument method invocation on host objects (trac-15151) + var ret; + + if ( typeof context.getElementsByTagName !== "undefined" ) { + ret = context.getElementsByTagName( tag || "*" ); + + } else if ( typeof context.querySelectorAll !== "undefined" ) { + ret = context.querySelectorAll( tag || "*" ); + + } else { + ret = []; + } + + if ( tag === undefined || tag && nodeName( context, tag ) ) { + return jQuery.merge( [ context ], ret ); + } + + return ret; +} + + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + dataPriv.set( + elems[ i ], + "globalEval", + !refElements || dataPriv.get( refElements[ i ], "globalEval" ) + ); + } +} + + +var rhtml = /<|&#?\w+;/; + +function buildFragment( elems, context, scripts, selection, ignored ) { + var elem, tmp, tag, wrap, attached, j, + fragment = context.createDocumentFragment(), + nodes = [], + i = 0, + l = elems.length; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( toType( elem ) === "object" ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || fragment.appendChild( context.createElement( "div" ) ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ]; + + // Descend through wrappers to the right content + j = wrap[ 0 ]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( nodes, tmp.childNodes ); + + // Remember the top-level container + tmp = fragment.firstChild; + + // Ensure the created nodes are orphaned (trac-12392) + tmp.textContent = ""; + } + } + } + + // Remove wrapper from fragment + fragment.textContent = ""; + + i = 0; + while ( ( elem = nodes[ i++ ] ) ) { + + // Skip elements already in the context collection (trac-4087) + if ( selection && jQuery.inArray( elem, selection ) > -1 ) { + if ( ignored ) { + ignored.push( elem ); + } + continue; + } + + attached = isAttached( elem ); + + // Append to fragment + tmp = getAll( fragment.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( attached ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( ( elem = tmp[ j++ ] ) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + return fragment; +} + + +var rtypenamespace = /^([^.]*)(?:\.(.+)|)/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +function on( elem, types, selector, data, fn, one ) { + var origFn, type; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + on( elem, type, selector, data, types[ type ], one ); + } + return elem; + } + + if ( data == null && fn == null ) { + + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return elem; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return elem.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + } ); +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + + var handleObjIn, eventHandle, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.get( elem ); + + // Only attach events to objects that accept data + if ( !acceptData( elem ) ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Ensure that invalid selectors throw exceptions at attach time + // Evaluate against documentElement in case elem is a non-element node (e.g., document) + if ( selector ) { + jQuery.find.matchesSelector( documentElement, selector ); + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !( events = elemData.events ) ) { + events = elemData.events = Object.create( null ); + } + if ( !( eventHandle = elemData.handle ) ) { + eventHandle = elemData.handle = function( e ) { + + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? + jQuery.event.dispatch.apply( elem, arguments ) : undefined; + }; + } + + // Handle multiple events separated by a space + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // There *must* be a type, no attaching namespace-only handlers + if ( !type ) { + continue; + } + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend( { + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join( "." ) + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !( handlers = events[ type ] ) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener if the special events handler returns false + if ( !special.setup || + special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + + var j, origCount, tmp, + events, t, handleObj, + special, handlers, type, namespaces, origType, + elemData = dataPriv.hasData( elem ) && dataPriv.get( elem ); + + if ( !elemData || !( events = elemData.events ) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( rnothtmlwhite ) || [ "" ]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[ t ] ) || []; + type = origType = tmp[ 1 ]; + namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[ 2 ] && + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || + selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || + special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove data and the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + dataPriv.remove( elem, "handle events" ); + } + }, + + dispatch: function( nativeEvent ) { + + var i, j, ret, matched, handleObj, handlerQueue, + args = new Array( arguments.length ), + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( nativeEvent ), + + handlers = ( + dataPriv.get( this, "events" ) || Object.create( null ) + )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[ 0 ] = event; + + for ( i = 1; i < arguments.length; i++ ) { + args[ i ] = arguments[ i ]; + } + + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( ( handleObj = matched.handlers[ j++ ] ) && + !event.isImmediatePropagationStopped() ) { + + // If the event is namespaced, then each handler is only invoked if it is + // specially universal or its namespaces are a superset of the event's. + if ( !event.rnamespace || handleObj.namespace === false || + event.rnamespace.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle || + handleObj.handler ).apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( ( event.result = ret ) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var i, handleObj, sel, matchedHandlers, matchedSelectors, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + if ( delegateCount && + + // Support: IE <=9 + // Black-hole SVG instance trees (trac-13180) + cur.nodeType && + + // Support: Firefox <=42 + // Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861) + // https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click + // Support: IE 11 only + // ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343) + !( event.type === "click" && event.button >= 1 ) ) { + + for ( ; cur !== this; cur = cur.parentNode || this ) { + + // Don't check non-elements (trac-13208) + // Don't process clicks on disabled elements (trac-6911, trac-8165, trac-11382, trac-11764) + if ( cur.nodeType === 1 && !( event.type === "click" && cur.disabled === true ) ) { + matchedHandlers = []; + matchedSelectors = {}; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (trac-13203) + sel = handleObj.selector + " "; + + if ( matchedSelectors[ sel ] === undefined ) { + matchedSelectors[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) > -1 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matchedSelectors[ sel ] ) { + matchedHandlers.push( handleObj ); + } + } + if ( matchedHandlers.length ) { + handlerQueue.push( { elem: cur, handlers: matchedHandlers } ); + } + } + } + } + + // Add the remaining (directly-bound) handlers + cur = this; + if ( delegateCount < handlers.length ) { + handlerQueue.push( { elem: cur, handlers: handlers.slice( delegateCount ) } ); + } + + return handlerQueue; + }, + + addProp: function( name, hook ) { + Object.defineProperty( jQuery.Event.prototype, name, { + enumerable: true, + configurable: true, + + get: isFunction( hook ) ? + function() { + if ( this.originalEvent ) { + return hook( this.originalEvent ); + } + } : + function() { + if ( this.originalEvent ) { + return this.originalEvent[ name ]; + } + }, + + set: function( value ) { + Object.defineProperty( this, name, { + enumerable: true, + configurable: true, + writable: true, + value: value + } ); + } + } ); + }, + + fix: function( originalEvent ) { + return originalEvent[ jQuery.expando ] ? + originalEvent : + new jQuery.Event( originalEvent ); + }, + + special: { + load: { + + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + + // Utilize native event to ensure correct state for checkable inputs + setup: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Claim the first handler + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + // dataPriv.set( el, "click", ... ) + leverageNative( el, "click", true ); + } + + // Return false to allow normal processing in the caller + return false; + }, + trigger: function( data ) { + + // For mutual compressibility with _default, replace `this` access with a local var. + // `|| data` is dead code meant only to preserve the variable through minification. + var el = this || data; + + // Force setup before triggering a click + if ( rcheckableType.test( el.type ) && + el.click && nodeName( el, "input" ) ) { + + leverageNative( el, "click" ); + } + + // Return non-false to allow normal event-path propagation + return true; + }, + + // For cross-browser consistency, suppress native .click() on links + // Also prevent it if we're currently inside a leveraged native-event stack + _default: function( event ) { + var target = event.target; + return rcheckableType.test( target.type ) && + target.click && nodeName( target, "input" ) && + dataPriv.get( target, "click" ) || + nodeName( target, "a" ); + } + }, + + beforeunload: { + postDispatch: function( event ) { + + // Support: Firefox 20+ + // Firefox doesn't alert if the returnValue field is not set. + if ( event.result !== undefined && event.originalEvent ) { + event.originalEvent.returnValue = event.result; + } + } + } + } +}; + +// Ensure the presence of an event listener that handles manually-triggered +// synthetic events by interrupting progress until reinvoked in response to +// *native* events that it fires directly, ensuring that state changes have +// already occurred before other listeners are invoked. +function leverageNative( el, type, isSetup ) { + + // Missing `isSetup` indicates a trigger call, which must force setup through jQuery.event.add + if ( !isSetup ) { + if ( dataPriv.get( el, type ) === undefined ) { + jQuery.event.add( el, type, returnTrue ); + } + return; + } + + // Register the controller as a special universal handler for all event namespaces + dataPriv.set( el, type, false ); + jQuery.event.add( el, type, { + namespace: false, + handler: function( event ) { + var result, + saved = dataPriv.get( this, type ); + + if ( ( event.isTrigger & 1 ) && this[ type ] ) { + + // Interrupt processing of the outer synthetic .trigger()ed event + if ( !saved ) { + + // Store arguments for use when handling the inner native event + // There will always be at least one argument (an event object), so this array + // will not be confused with a leftover capture object. + saved = slice.call( arguments ); + dataPriv.set( this, type, saved ); + + // Trigger the native event and capture its result + this[ type ](); + result = dataPriv.get( this, type ); + dataPriv.set( this, type, false ); + + if ( saved !== result ) { + + // Cancel the outer synthetic event + event.stopImmediatePropagation(); + event.preventDefault(); + + return result; + } + + // If this is an inner synthetic event for an event with a bubbling surrogate + // (focus or blur), assume that the surrogate already propagated from triggering + // the native event and prevent that from happening again here. + // This technically gets the ordering wrong w.r.t. to `.trigger()` (in which the + // bubbling surrogate propagates *after* the non-bubbling base), but that seems + // less bad than duplication. + } else if ( ( jQuery.event.special[ type ] || {} ).delegateType ) { + event.stopPropagation(); + } + + // If this is a native event triggered above, everything is now in order + // Fire an inner synthetic event with the original arguments + } else if ( saved ) { + + // ...and capture the result + dataPriv.set( this, type, jQuery.event.trigger( + saved[ 0 ], + saved.slice( 1 ), + this + ) ); + + // Abort handling of the native event by all jQuery handlers while allowing + // native handlers on the same element to run. On target, this is achieved + // by stopping immediate propagation just on the jQuery event. However, + // the native event is re-wrapped by a jQuery one on each level of the + // propagation so the only way to stop it for jQuery is to stop it for + // everyone via native `stopPropagation()`. This is not a problem for + // focus/blur which don't bubble, but it does also stop click on checkboxes + // and radios. We accept this limitation. + event.stopPropagation(); + event.isImmediatePropagationStopped = returnTrue; + } + } + } ); +} + +jQuery.removeEvent = function( elem, type, handle ) { + + // This "if" is needed for plain objects + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle ); + } +}; + +jQuery.Event = function( src, props ) { + + // Allow instantiation without the 'new' keyword + if ( !( this instanceof jQuery.Event ) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = src.defaultPrevented || + src.defaultPrevented === undefined && + + // Support: Android <=2.3 only + src.returnValue === false ? + returnTrue : + returnFalse; + + // Create target properties + // Support: Safari <=6 - 7 only + // Target should not be a text node (trac-504, trac-13143) + this.target = ( src.target && src.target.nodeType === 3 ) ? + src.target.parentNode : + src.target; + + this.currentTarget = src.currentTarget; + this.relatedTarget = src.relatedTarget; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || Date.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// https://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + constructor: jQuery.Event, + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + isSimulated: false, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + + if ( e && !this.isSimulated ) { + e.preventDefault(); + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopPropagation(); + } + }, + stopImmediatePropagation: function() { + var e = this.originalEvent; + + this.isImmediatePropagationStopped = returnTrue; + + if ( e && !this.isSimulated ) { + e.stopImmediatePropagation(); + } + + this.stopPropagation(); + } +}; + +// Includes all common event props including KeyEvent and MouseEvent specific props +jQuery.each( { + altKey: true, + bubbles: true, + cancelable: true, + changedTouches: true, + ctrlKey: true, + detail: true, + eventPhase: true, + metaKey: true, + pageX: true, + pageY: true, + shiftKey: true, + view: true, + "char": true, + code: true, + charCode: true, + key: true, + keyCode: true, + button: true, + buttons: true, + clientX: true, + clientY: true, + offsetX: true, + offsetY: true, + pointerId: true, + pointerType: true, + screenX: true, + screenY: true, + targetTouches: true, + toElement: true, + touches: true, + which: true +}, jQuery.event.addProp ); + +jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) { + + function focusMappedHandler( nativeEvent ) { + if ( document.documentMode ) { + + // Support: IE 11+ + // Attach a single focusin/focusout handler on the document while someone wants + // focus/blur. This is because the former are synchronous in IE while the latter + // are async. In other browsers, all those handlers are invoked synchronously. + + // `handle` from private data would already wrap the event, but we need + // to change the `type` here. + var handle = dataPriv.get( this, "handle" ), + event = jQuery.event.fix( nativeEvent ); + event.type = nativeEvent.type === "focusin" ? "focus" : "blur"; + event.isSimulated = true; + + // First, handle focusin/focusout + handle( nativeEvent ); + + // ...then, handle focus/blur + // + // focus/blur don't bubble while focusin/focusout do; simulate the former by only + // invoking the handler at the lower level. + if ( event.target === event.currentTarget ) { + + // The setup part calls `leverageNative`, which, in turn, calls + // `jQuery.event.add`, so event handle will already have been set + // by this point. + handle( event ); + } + } else { + + // For non-IE browsers, attach a single capturing handler on the document + // while someone wants focusin/focusout. + jQuery.event.simulate( delegateType, nativeEvent.target, + jQuery.event.fix( nativeEvent ) ); + } + } + + jQuery.event.special[ type ] = { + + // Utilize native event if possible so blur/focus sequence is correct + setup: function() { + + var attaches; + + // Claim the first handler + // dataPriv.set( this, "focus", ... ) + // dataPriv.set( this, "blur", ... ) + leverageNative( this, type, true ); + + if ( document.documentMode ) { + + // Support: IE 9 - 11+ + // We use the same native handler for focusin & focus (and focusout & blur) + // so we need to coordinate setup & teardown parts between those events. + // Use `delegateType` as the key as `type` is already used by `leverageNative`. + attaches = dataPriv.get( this, delegateType ); + if ( !attaches ) { + this.addEventListener( delegateType, focusMappedHandler ); + } + dataPriv.set( this, delegateType, ( attaches || 0 ) + 1 ); + } else { + + // Return false to allow normal processing in the caller + return false; + } + }, + trigger: function() { + + // Force setup before trigger + leverageNative( this, type ); + + // Return non-false to allow normal event-path propagation + return true; + }, + + teardown: function() { + var attaches; + + if ( document.documentMode ) { + attaches = dataPriv.get( this, delegateType ) - 1; + if ( !attaches ) { + this.removeEventListener( delegateType, focusMappedHandler ); + dataPriv.remove( this, delegateType ); + } else { + dataPriv.set( this, delegateType, attaches ); + } + } else { + + // Return false to indicate standard teardown should be applied + return false; + } + }, + + // Suppress native focus or blur if we're currently inside + // a leveraged native-event stack + _default: function( event ) { + return dataPriv.get( event.target, type ); + }, + + delegateType: delegateType + }; + + // Support: Firefox <=44 + // Firefox doesn't have focus(in | out) events + // Related ticket - https://bugzilla.mozilla.org/show_bug.cgi?id=687787 + // + // Support: Chrome <=48 - 49, Safari <=9.0 - 9.1 + // focus(in | out) events fire after focus & blur events, + // which is spec violation - http://www.w3.org/TR/DOM-Level-3-Events/#events-focusevent-event-order + // Related ticket - https://bugs.chromium.org/p/chromium/issues/detail?id=449857 + // + // Support: IE 9 - 11+ + // To preserve relative focusin/focus & focusout/blur event order guaranteed on the 3.x branch, + // attach a single handler for both events in IE. + jQuery.event.special[ delegateType ] = { + setup: function() { + + // Handle: regular nodes (via `this.ownerDocument`), window + // (via `this.document`) & document (via `this`). + var doc = this.ownerDocument || this.document || this, + dataHolder = document.documentMode ? this : doc, + attaches = dataPriv.get( dataHolder, delegateType ); + + // Support: IE 9 - 11+ + // We use the same native handler for focusin & focus (and focusout & blur) + // so we need to coordinate setup & teardown parts between those events. + // Use `delegateType` as the key as `type` is already used by `leverageNative`. + if ( !attaches ) { + if ( document.documentMode ) { + this.addEventListener( delegateType, focusMappedHandler ); + } else { + doc.addEventListener( type, focusMappedHandler, true ); + } + } + dataPriv.set( dataHolder, delegateType, ( attaches || 0 ) + 1 ); + }, + teardown: function() { + var doc = this.ownerDocument || this.document || this, + dataHolder = document.documentMode ? this : doc, + attaches = dataPriv.get( dataHolder, delegateType ) - 1; + + if ( !attaches ) { + if ( document.documentMode ) { + this.removeEventListener( delegateType, focusMappedHandler ); + } else { + doc.removeEventListener( type, focusMappedHandler, true ); + } + dataPriv.remove( dataHolder, delegateType ); + } else { + dataPriv.set( dataHolder, delegateType, attaches ); + } + } + }; +} ); + +// Create mouseenter/leave events using mouseover/out and event-time checks +// so that event delegation works in jQuery. +// Do the same for pointerenter/pointerleave and pointerover/pointerout +// +// Support: Safari 7 only +// Safari sends mouseenter too often; see: +// https://bugs.chromium.org/p/chromium/issues/detail?id=470258 +// for the description of the bug (it existed in older Chrome versions as well). +jQuery.each( { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mouseenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +} ); + +jQuery.fn.extend( { + + on: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn ); + }, + one: function( types, selector, data, fn ) { + return on( this, types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? + handleObj.origType + "." + handleObj.namespace : + handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each( function() { + jQuery.event.remove( this, types, fn, selector ); + } ); + } +} ); + + +var + + // Support: IE <=10 - 11, Edge 12 - 13 only + // In IE/Edge using regex groups here causes severe slowdowns. + // See https://connect.microsoft.com/IE/feedback/details/1736512/ + rnoInnerhtml = /\s*$/g; + +// Prefer a tbody over its parent table for containing new rows +function manipulationTarget( elem, content ) { + if ( nodeName( elem, "table" ) && + nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ) { + + return jQuery( elem ).children( "tbody" )[ 0 ] || elem; + } + + return elem; +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + elem.type = ( elem.getAttribute( "type" ) !== null ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + if ( ( elem.type || "" ).slice( 0, 5 ) === "true/" ) { + elem.type = elem.type.slice( 5 ); + } else { + elem.removeAttribute( "type" ); + } + + return elem; +} + +function cloneCopyEvent( src, dest ) { + var i, l, type, pdataOld, udataOld, udataCur, events; + + if ( dest.nodeType !== 1 ) { + return; + } + + // 1. Copy private data: events, handlers, etc. + if ( dataPriv.hasData( src ) ) { + pdataOld = dataPriv.get( src ); + events = pdataOld.events; + + if ( events ) { + dataPriv.remove( dest, "handle events" ); + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + } + + // 2. Copy user data + if ( dataUser.hasData( src ) ) { + udataOld = dataUser.access( src ); + udataCur = jQuery.extend( {}, udataOld ); + + dataUser.set( dest, udataCur ); + } +} + +// Fix IE bugs, see support tests +function fixInput( src, dest ) { + var nodeName = dest.nodeName.toLowerCase(); + + // Fails to persist the checked state of a cloned checkbox or radio button. + if ( nodeName === "input" && rcheckableType.test( src.type ) ) { + dest.checked = src.checked; + + // Fails to return the selected option to the default selected state when cloning options + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +function domManip( collection, args, callback, ignored ) { + + // Flatten any nested arrays + args = flat( args ); + + var fragment, first, scripts, hasScripts, node, doc, + i = 0, + l = collection.length, + iNoClone = l - 1, + value = args[ 0 ], + valueIsFunction = isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( valueIsFunction || + ( l > 1 && typeof value === "string" && + !support.checkClone && rchecked.test( value ) ) ) { + return collection.each( function( index ) { + var self = collection.eq( index ); + if ( valueIsFunction ) { + args[ 0 ] = value.call( this, index, self.html() ); + } + domManip( self, args, callback, ignored ); + } ); + } + + if ( l ) { + fragment = buildFragment( args, collection[ 0 ].ownerDocument, false, collection, ignored ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + // Require either new content or an interest in ignored elements to invoke the callback + if ( first || ignored ) { + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item + // instead of the first because it can end up + // being emptied incorrectly in certain situations (trac-8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + + // Support: Android <=4.0 only, PhantomJS 1 only + // push.apply(_, arraylike) throws on ancient WebKit + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( collection[ i ], node, i ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Re-enable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !dataPriv.access( node, "globalEval" ) && + jQuery.contains( doc, node ) ) { + + if ( node.src && ( node.type || "" ).toLowerCase() !== "module" ) { + + // Optional AJAX dependency, but won't run scripts if not present + if ( jQuery._evalUrl && !node.noModule ) { + jQuery._evalUrl( node.src, { + nonce: node.nonce || node.getAttribute( "nonce" ) + }, doc ); + } + } else { + + // Unwrap a CDATA section containing script contents. This shouldn't be + // needed as in XML documents they're already not visible when + // inspecting element contents and in HTML documents they have no + // meaning but we're preserving that logic for backwards compatibility. + // This will be removed completely in 4.0. See gh-4904. + DOMEval( node.textContent.replace( rcleanScript, "" ), node, doc ); + } + } + } + } + } + } + + return collection; +} + +function remove( elem, selector, keepData ) { + var node, + nodes = selector ? jQuery.filter( selector, elem ) : elem, + i = 0; + + for ( ; ( node = nodes[ i ] ) != null; i++ ) { + if ( !keepData && node.nodeType === 1 ) { + jQuery.cleanData( getAll( node ) ); + } + + if ( node.parentNode ) { + if ( keepData && isAttached( node ) ) { + setGlobalEval( getAll( node, "script" ) ); + } + node.parentNode.removeChild( node ); + } + } + + return elem; +} + +jQuery.extend( { + htmlPrefilter: function( html ) { + return html; + }, + + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var i, l, srcElements, destElements, + clone = elem.cloneNode( true ), + inPage = isAttached( elem ); + + // Fix IE cloning issues + if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && + !jQuery.isXMLDoc( elem ) ) { + + // We eschew jQuery#find here for performance reasons: + // https://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + fixInput( srcElements[ i ], destElements[ i ] ); + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0, l = srcElements.length; i < l; i++ ) { + cloneCopyEvent( srcElements[ i ], destElements[ i ] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + // Return the cloned set + return clone; + }, + + cleanData: function( elems ) { + var data, elem, type, + special = jQuery.event.special, + i = 0; + + for ( ; ( elem = elems[ i ] ) !== undefined; i++ ) { + if ( acceptData( elem ) ) { + if ( ( data = elem[ dataPriv.expando ] ) ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataPriv.expando ] = undefined; + } + if ( elem[ dataUser.expando ] ) { + + // Support: Chrome <=35 - 45+ + // Assign undefined instead of using delete, see Data#remove + elem[ dataUser.expando ] = undefined; + } + } + } + } +} ); + +jQuery.fn.extend( { + detach: function( selector ) { + return remove( this, selector, true ); + }, + + remove: function( selector ) { + return remove( this, selector ); + }, + + text: function( value ) { + return access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().each( function() { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.textContent = value; + } + } ); + }, null, value, arguments.length ); + }, + + append: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.appendChild( elem ); + } + } ); + }, + + prepend: function() { + return domManip( this, arguments, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + var target = manipulationTarget( this, elem ); + target.insertBefore( elem, target.firstChild ); + } + } ); + }, + + before: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + } ); + }, + + after: function() { + return domManip( this, arguments, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + } ); + }, + + empty: function() { + var elem, + i = 0; + + for ( ; ( elem = this[ i ] ) != null; i++ ) { + if ( elem.nodeType === 1 ) { + + // Prevent memory leaks + jQuery.cleanData( getAll( elem, false ) ); + + // Remove any remaining nodes + elem.textContent = ""; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function() { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + } ); + }, + + html: function( value ) { + return access( this, function( value ) { + var elem = this[ 0 ] || {}, + i = 0, + l = this.length; + + if ( value === undefined && elem.nodeType === 1 ) { + return elem.innerHTML; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { + + value = jQuery.htmlPrefilter( value ); + + try { + for ( ; i < l; i++ ) { + elem = this[ i ] || {}; + + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch ( e ) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function() { + var ignored = []; + + // Make the changes, replacing each non-ignored context element with the new content + return domManip( this, arguments, function( elem ) { + var parent = this.parentNode; + + if ( jQuery.inArray( this, ignored ) < 0 ) { + jQuery.cleanData( getAll( this ) ); + if ( parent ) { + parent.replaceChild( elem, this ); + } + } + + // Force callback invocation + }, ignored ); + } +} ); + +jQuery.each( { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1, + i = 0; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone( true ); + jQuery( insert[ i ] )[ original ]( elems ); + + // Support: Android <=4.0 only, PhantomJS 1 only + // .get() because push.apply(_, arraylike) throws on ancient WebKit + push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +} ); +var rnumnonpx = new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); + +var rcustomProp = /^--/; + + +var getStyles = function( elem ) { + + // Support: IE <=11 only, Firefox <=30 (trac-15098, trac-14150) + // IE throws on elements created in popups + // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" + var view = elem.ownerDocument.defaultView; + + if ( !view || !view.opener ) { + view = window; + } + + return view.getComputedStyle( elem ); + }; + +var swap = function( elem, options, callback ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.call( elem ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; +}; + + +var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" ); + + + +( function() { + + // Executing both pixelPosition & boxSizingReliable tests require only one layout + // so they're executed at the same time to save the second computation. + function computeStyleTests() { + + // This is a singleton, we need to execute it only once + if ( !div ) { + return; + } + + container.style.cssText = "position:absolute;left:-11111px;width:60px;" + + "margin-top:1px;padding:0;border:0"; + div.style.cssText = + "position:relative;display:block;box-sizing:border-box;overflow:scroll;" + + "margin:auto;border:1px;padding:1px;" + + "width:60%;top:1%"; + documentElement.appendChild( container ).appendChild( div ); + + var divStyle = window.getComputedStyle( div ); + pixelPositionVal = divStyle.top !== "1%"; + + // Support: Android 4.0 - 4.3 only, Firefox <=3 - 44 + reliableMarginLeftVal = roundPixelMeasures( divStyle.marginLeft ) === 12; + + // Support: Android 4.0 - 4.3 only, Safari <=9.1 - 10.1, iOS <=7.0 - 9.3 + // Some styles come back with percentage values, even though they shouldn't + div.style.right = "60%"; + pixelBoxStylesVal = roundPixelMeasures( divStyle.right ) === 36; + + // Support: IE 9 - 11 only + // Detect misreporting of content dimensions for box-sizing:border-box elements + boxSizingReliableVal = roundPixelMeasures( divStyle.width ) === 36; + + // Support: IE 9 only + // Detect overflow:scroll screwiness (gh-3699) + // Support: Chrome <=64 + // Don't get tricked when zoom affects offsetWidth (gh-4029) + div.style.position = "absolute"; + scrollboxSizeVal = roundPixelMeasures( div.offsetWidth / 3 ) === 12; + + documentElement.removeChild( container ); + + // Nullify the div so it wouldn't be stored in the memory and + // it will also be a sign that checks already performed + div = null; + } + + function roundPixelMeasures( measure ) { + return Math.round( parseFloat( measure ) ); + } + + var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, + reliableTrDimensionsVal, reliableMarginLeftVal, + container = document.createElement( "div" ), + div = document.createElement( "div" ); + + // Finish early in limited (non-browser) environments + if ( !div.style ) { + return; + } + + // Support: IE <=9 - 11 only + // Style of cloned element affects source element cloned (trac-8908) + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + jQuery.extend( support, { + boxSizingReliable: function() { + computeStyleTests(); + return boxSizingReliableVal; + }, + pixelBoxStyles: function() { + computeStyleTests(); + return pixelBoxStylesVal; + }, + pixelPosition: function() { + computeStyleTests(); + return pixelPositionVal; + }, + reliableMarginLeft: function() { + computeStyleTests(); + return reliableMarginLeftVal; + }, + scrollboxSize: function() { + computeStyleTests(); + return scrollboxSizeVal; + }, + + // Support: IE 9 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Behavior in IE 9 is more subtle than in newer versions & it passes + // some versions of this test; make sure not to make it pass there! + // + // Support: Firefox 70+ + // Only Firefox includes border widths + // in computed dimensions. (gh-4529) + reliableTrDimensions: function() { + var table, tr, trChild, trStyle; + if ( reliableTrDimensionsVal == null ) { + table = document.createElement( "table" ); + tr = document.createElement( "tr" ); + trChild = document.createElement( "div" ); + + table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate"; + tr.style.cssText = "box-sizing:content-box;border:1px solid"; + + // Support: Chrome 86+ + // Height set through cssText does not get applied. + // Computed height then comes back as 0. + tr.style.height = "1px"; + trChild.style.height = "9px"; + + // Support: Android 8 Chrome 86+ + // In our bodyBackground.html iframe, + // display for all div elements is set to "inline", + // which causes a problem only in Android 8 Chrome 86. + // Ensuring the div is `display: block` + // gets around this issue. + trChild.style.display = "block"; + + documentElement + .appendChild( table ) + .appendChild( tr ) + .appendChild( trChild ); + + trStyle = window.getComputedStyle( tr ); + reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) + + parseInt( trStyle.borderTopWidth, 10 ) + + parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight; + + documentElement.removeChild( table ); + } + return reliableTrDimensionsVal; + } + } ); +} )(); + + +function curCSS( elem, name, computed ) { + var width, minWidth, maxWidth, ret, + isCustomProp = rcustomProp.test( name ), + + // Support: Firefox 51+ + // Retrieving style before computed somehow + // fixes an issue with getting wrong values + // on detached elements + style = elem.style; + + computed = computed || getStyles( elem ); + + // getPropertyValue is needed for: + // .css('filter') (IE 9 only, trac-12537) + // .css('--customProperty) (gh-3144) + if ( computed ) { + + // Support: IE <=9 - 11+ + // IE only supports `"float"` in `getPropertyValue`; in computed styles + // it's only available as `"cssFloat"`. We no longer modify properties + // sent to `.css()` apart from camelCasing, so we need to check both. + // Normally, this would create difference in behavior: if + // `getPropertyValue` returns an empty string, the value returned + // by `.css()` would be `undefined`. This is usually the case for + // disconnected elements. However, in IE even disconnected elements + // with no styles return `"none"` for `getPropertyValue( "float" )` + ret = computed.getPropertyValue( name ) || computed[ name ]; + + if ( isCustomProp && ret ) { + + // Support: Firefox 105+, Chrome <=105+ + // Spec requires trimming whitespace for custom properties (gh-4926). + // Firefox only trims leading whitespace. Chrome just collapses + // both leading & trailing whitespace to a single space. + // + // Fall back to `undefined` if empty string returned. + // This collapses a missing definition with property defined + // and set to an empty string but there's no standard API + // allowing us to differentiate them without a performance penalty + // and returning `undefined` aligns with older jQuery. + // + // rtrimCSS treats U+000D CARRIAGE RETURN and U+000C FORM FEED + // as whitespace while CSS does not, but this is not a problem + // because CSS preprocessing replaces them with U+000A LINE FEED + // (which *is* CSS whitespace) + // https://www.w3.org/TR/css-syntax-3/#input-preprocessing + ret = ret.replace( rtrimCSS, "$1" ) || undefined; + } + + if ( ret === "" && !isAttached( elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Android Browser returns percentage for some values, + // but width seems to be reliably pixels. + // This is against the CSSOM draft spec: + // https://drafts.csswg.org/cssom/#resolved-values + if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret !== undefined ? + + // Support: IE <=9 - 11 only + // IE returns zIndex value as an integer. + ret + "" : + ret; +} + + +function addGetHookIf( conditionFn, hookFn ) { + + // Define the hook, we'll check on the first run if it's really needed. + return { + get: function() { + if ( conditionFn() ) { + + // Hook not needed (or it's not possible to use it due + // to missing dependency), remove it. + delete this.get; + return; + } + + // Hook needed; redefine it so that the support test is not executed again. + return ( this.get = hookFn ).apply( this, arguments ); + } + }; +} + + +var cssPrefixes = [ "Webkit", "Moz", "ms" ], + emptyStyle = document.createElement( "div" ).style, + vendorProps = {}; + +// Return a vendor-prefixed property or undefined +function vendorPropName( name ) { + + // Check for vendor prefixed names + var capName = name[ 0 ].toUpperCase() + name.slice( 1 ), + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in emptyStyle ) { + return name; + } + } +} + +// Return a potentially-mapped jQuery.cssProps or vendor prefixed property +function finalPropName( name ) { + var final = jQuery.cssProps[ name ] || vendorProps[ name ]; + + if ( final ) { + return final; + } + if ( name in emptyStyle ) { + return name; + } + return vendorProps[ name ] = vendorPropName( name ) || name; +} + + +var + + // Swappable if display is none or starts with table + // except "table", "table-cell", or "table-caption" + // See here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: "0", + fontWeight: "400" + }; + +function setPositiveNumber( _elem, value, subtract ) { + + // Any relative (+/-) values have already been + // normalized at this point + var matches = rcssNum.exec( value ); + return matches ? + + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 2 ] - ( subtract || 0 ) ) + ( matches[ 3 ] || "px" ) : + value; +} + +function boxModelAdjustment( elem, dimension, box, isBorderBox, styles, computedVal ) { + var i = dimension === "width" ? 1 : 0, + extra = 0, + delta = 0, + marginDelta = 0; + + // Adjustment may not be necessary + if ( box === ( isBorderBox ? "border" : "content" ) ) { + return 0; + } + + for ( ; i < 4; i += 2 ) { + + // Both box models exclude margin + // Count margin delta separately to only add it after scroll gutter adjustment. + // This is needed to make negative margins work with `outerHeight( true )` (gh-3982). + if ( box === "margin" ) { + marginDelta += jQuery.css( elem, box + cssExpand[ i ], true, styles ); + } + + // If we get here with a content-box, we're seeking "padding" or "border" or "margin" + if ( !isBorderBox ) { + + // Add padding + delta += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // For "border" or "margin", add border + if ( box !== "padding" ) { + delta += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + + // But still keep track of it otherwise + } else { + extra += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + + // If we get here with a border-box (content + padding + border), we're seeking "content" or + // "padding" or "margin" + } else { + + // For "content", subtract padding + if ( box === "content" ) { + delta -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // For "content" or "padding", subtract border + if ( box !== "margin" ) { + delta -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + // Account for positive content-box scroll gutter when requested by providing computedVal + if ( !isBorderBox && computedVal >= 0 ) { + + // offsetWidth/offsetHeight is a rounded sum of content, padding, scroll gutter, and border + // Assuming integer scroll gutter, subtract the rest and round down + delta += Math.max( 0, Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + computedVal - + delta - + extra - + 0.5 + + // If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter + // Use an explicit zero to avoid NaN (gh-3964) + ) ) || 0; + } + + return delta + marginDelta; +} + +function getWidthOrHeight( elem, dimension, extra ) { + + // Start with computed style + var styles = getStyles( elem ), + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-4322). + // Fake content-box until we know it's needed to know the true value. + boxSizingNeeded = !support.boxSizingReliable() || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + valueIsBorderBox = isBorderBox, + + val = curCSS( elem, dimension, styles ), + offsetProp = "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ); + + // Support: Firefox <=54 + // Return a confounding non-pixel value or feign ignorance, as appropriate. + if ( rnumnonpx.test( val ) ) { + if ( !extra ) { + return val; + } + val = "auto"; + } + + + // Support: IE 9 - 11 only + // Use offsetWidth/offsetHeight for when box sizing is unreliable. + // In those cases, the computed value can be trusted to be border-box. + if ( ( !support.boxSizingReliable() && isBorderBox || + + // Support: IE 10 - 11+, Edge 15 - 18+ + // IE/Edge misreport `getComputedStyle` of table rows with width/height + // set in CSS while `offset*` properties report correct values. + // Interestingly, in some cases IE 9 doesn't suffer from this issue. + !support.reliableTrDimensions() && nodeName( elem, "tr" ) || + + // Fall back to offsetWidth/offsetHeight when value is "auto" + // This happens for inline elements with no explicit setting (gh-3571) + val === "auto" || + + // Support: Android <=4.1 - 4.3 only + // Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602) + !parseFloat( val ) && jQuery.css( elem, "display", false, styles ) === "inline" ) && + + // Make sure the element is visible & connected + elem.getClientRects().length ) { + + isBorderBox = jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // Where available, offsetWidth/offsetHeight approximate border box dimensions. + // Where not available (e.g., SVG), assume unreliable box-sizing and interpret the + // retrieved value as a content box dimension. + valueIsBorderBox = offsetProp in elem; + if ( valueIsBorderBox ) { + val = elem[ offsetProp ]; + } + } + + // Normalize "" and auto + val = parseFloat( val ) || 0; + + // Adjust for the element's box model + return ( val + + boxModelAdjustment( + elem, + dimension, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles, + + // Provide the current computed size to request scroll gutter calculation (gh-3589) + val + ) + ) + "px"; +} + +jQuery.extend( { + + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Don't automatically add "px" to these possibly-unitless properties + cssNumber: { + animationIterationCount: true, + aspectRatio: true, + borderImageSlice: true, + columnCount: true, + flexGrow: true, + flexShrink: true, + fontWeight: true, + gridArea: true, + gridColumn: true, + gridColumnEnd: true, + gridColumnStart: true, + gridRow: true, + gridRowEnd: true, + gridRowStart: true, + lineHeight: true, + opacity: true, + order: true, + orphans: true, + scale: true, + widows: true, + zIndex: true, + zoom: true, + + // SVG-related + fillOpacity: true, + floodOpacity: true, + stopOpacity: true, + strokeMiterlimit: true, + strokeOpacity: true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: {}, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ), + style = elem.style; + + // Make sure that we're working with the right name. We don't + // want to query the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Gets hook for the prefixed version, then unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // Convert "+=" or "-=" to relative numbers (trac-7345) + if ( type === "string" && ( ret = rcssNum.exec( value ) ) && ret[ 1 ] ) { + value = adjustCSS( elem, name, ret ); + + // Fixes bug trac-9237 + type = "number"; + } + + // Make sure that null and NaN values aren't set (trac-7116) + if ( value == null || value !== value ) { + return; + } + + // If a number was passed in, add the unit (except for certain CSS properties) + // The isCustomProp check can be removed in jQuery 4.0 when we only auto-append + // "px" to a few hardcoded values. + if ( type === "number" && !isCustomProp ) { + value += ret && ret[ 3 ] || ( jQuery.cssNumber[ origName ] ? "" : "px" ); + } + + // background-* props affect original clone's values + if ( !support.clearCloneStyle && value === "" && name.indexOf( "background" ) === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !( "set" in hooks ) || + ( value = hooks.set( elem, value, extra ) ) !== undefined ) { + + if ( isCustomProp ) { + style.setProperty( name, value ); + } else { + style[ name ] = value; + } + } + + } else { + + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && + ( ret = hooks.get( elem, false, extra ) ) !== undefined ) { + + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var val, num, hooks, + origName = camelCase( name ), + isCustomProp = rcustomProp.test( name ); + + // Make sure that we're working with the right name. We don't + // want to modify the value if it is a CSS custom property + // since they are user-defined. + if ( !isCustomProp ) { + name = finalPropName( origName ); + } + + // Try prefixed name followed by the unprefixed name + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + // Convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Make numeric if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || isFinite( num ) ? num || 0 : val; + } + + return val; + } +} ); + +jQuery.each( [ "height", "width" ], function( _i, dimension ) { + jQuery.cssHooks[ dimension ] = { + get: function( elem, computed, extra ) { + if ( computed ) { + + // Certain elements can have dimension info if we invisibly show them + // but it must have a current display style that would benefit + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && + + // Support: Safari 8+ + // Table columns in Safari have non-zero offsetWidth & zero + // getBoundingClientRect().width unless display is changed. + // Support: IE <=11 only + // Running getBoundingClientRect on a disconnected node + // in IE throws an error. + ( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ? + swap( elem, cssShow, function() { + return getWidthOrHeight( elem, dimension, extra ); + } ) : + getWidthOrHeight( elem, dimension, extra ); + } + }, + + set: function( elem, value, extra ) { + var matches, + styles = getStyles( elem ), + + // Only read styles.position if the test has a chance to fail + // to avoid forcing a reflow. + scrollboxSizeBuggy = !support.scrollboxSize() && + styles.position === "absolute", + + // To avoid forcing a reflow, only fetch boxSizing if we need it (gh-3991) + boxSizingNeeded = scrollboxSizeBuggy || extra, + isBorderBox = boxSizingNeeded && + jQuery.css( elem, "boxSizing", false, styles ) === "border-box", + subtract = extra ? + boxModelAdjustment( + elem, + dimension, + extra, + isBorderBox, + styles + ) : + 0; + + // Account for unreliable border-box dimensions by comparing offset* to computed and + // faking a content-box to get border and padding (gh-3699) + if ( isBorderBox && scrollboxSizeBuggy ) { + subtract -= Math.ceil( + elem[ "offset" + dimension[ 0 ].toUpperCase() + dimension.slice( 1 ) ] - + parseFloat( styles[ dimension ] ) - + boxModelAdjustment( elem, dimension, "border", false, styles ) - + 0.5 + ); + } + + // Convert to pixels if value adjustment is needed + if ( subtract && ( matches = rcssNum.exec( value ) ) && + ( matches[ 3 ] || "px" ) !== "px" ) { + + elem.style[ dimension ] = value; + value = jQuery.css( elem, dimension ); + } + + return setPositiveNumber( elem, value, subtract ); + } + }; +} ); + +jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft, + function( elem, computed ) { + if ( computed ) { + return ( parseFloat( curCSS( elem, "marginLeft" ) ) || + elem.getBoundingClientRect().left - + swap( elem, { marginLeft: 0 }, function() { + return elem.getBoundingClientRect().left; + } ) + ) + "px"; + } + } +); + +// These hooks are used by animate to expand properties +jQuery.each( { + margin: "", + padding: "", + border: "Width" +}, function( prefix, suffix ) { + jQuery.cssHooks[ prefix + suffix ] = { + expand: function( value ) { + var i = 0, + expanded = {}, + + // Assumes a single number if not a string + parts = typeof value === "string" ? value.split( " " ) : [ value ]; + + for ( ; i < 4; i++ ) { + expanded[ prefix + cssExpand[ i ] + suffix ] = + parts[ i ] || parts[ i - 2 ] || parts[ 0 ]; + } + + return expanded; + } + }; + + if ( prefix !== "margin" ) { + jQuery.cssHooks[ prefix + suffix ].set = setPositiveNumber; + } +} ); + +jQuery.fn.extend( { + css: function( name, value ) { + return access( this, function( elem, name, value ) { + var styles, len, + map = {}, + i = 0; + + if ( Array.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + } +} ); + + +function Tween( elem, options, prop, end, easing ) { + return new Tween.prototype.init( elem, options, prop, end, easing ); +} +jQuery.Tween = Tween; + +Tween.prototype = { + constructor: Tween, + init: function( elem, options, prop, end, easing, unit ) { + this.elem = elem; + this.prop = prop; + this.easing = easing || jQuery.easing._default; + this.options = options; + this.start = this.now = this.cur(); + this.end = end; + this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); + }, + cur: function() { + var hooks = Tween.propHooks[ this.prop ]; + + return hooks && hooks.get ? + hooks.get( this ) : + Tween.propHooks._default.get( this ); + }, + run: function( percent ) { + var eased, + hooks = Tween.propHooks[ this.prop ]; + + if ( this.options.duration ) { + this.pos = eased = jQuery.easing[ this.easing ]( + percent, this.options.duration * percent, 0, 1, this.options.duration + ); + } else { + this.pos = eased = percent; + } + this.now = ( this.end - this.start ) * eased + this.start; + + if ( this.options.step ) { + this.options.step.call( this.elem, this.now, this ); + } + + if ( hooks && hooks.set ) { + hooks.set( this ); + } else { + Tween.propHooks._default.set( this ); + } + return this; + } +}; + +Tween.prototype.init.prototype = Tween.prototype; + +Tween.propHooks = { + _default: { + get: function( tween ) { + var result; + + // Use a property on the element directly when it is not a DOM element, + // or when there is no matching style property that exists. + if ( tween.elem.nodeType !== 1 || + tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { + return tween.elem[ tween.prop ]; + } + + // Passing an empty string as a 3rd parameter to .css will automatically + // attempt a parseFloat and fallback to a string if the parse fails. + // Simple values such as "10px" are parsed to Float; + // complex values such as "rotate(1rad)" are returned as-is. + result = jQuery.css( tween.elem, tween.prop, "" ); + + // Empty strings, null, undefined and "auto" are converted to 0. + return !result || result === "auto" ? 0 : result; + }, + set: function( tween ) { + + // Use step hook for back compat. + // Use cssHook if its there. + // Use .style if available and use plain properties where available. + if ( jQuery.fx.step[ tween.prop ] ) { + jQuery.fx.step[ tween.prop ]( tween ); + } else if ( tween.elem.nodeType === 1 && ( + jQuery.cssHooks[ tween.prop ] || + tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) { + jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); + } else { + tween.elem[ tween.prop ] = tween.now; + } + } + } +}; + +// Support: IE <=9 only +// Panic based approach to setting things on disconnected nodes +Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { + set: function( tween ) { + if ( tween.elem.nodeType && tween.elem.parentNode ) { + tween.elem[ tween.prop ] = tween.now; + } + } +}; + +jQuery.easing = { + linear: function( p ) { + return p; + }, + swing: function( p ) { + return 0.5 - Math.cos( p * Math.PI ) / 2; + }, + _default: "swing" +}; + +jQuery.fx = Tween.prototype.init; + +// Back compat <1.8 extension point +jQuery.fx.step = {}; + + + + +var + fxNow, inProgress, + rfxtypes = /^(?:toggle|show|hide)$/, + rrun = /queueHooks$/; + +function schedule() { + if ( inProgress ) { + if ( document.hidden === false && window.requestAnimationFrame ) { + window.requestAnimationFrame( schedule ); + } else { + window.setTimeout( schedule, jQuery.fx.interval ); + } + + jQuery.fx.tick(); + } +} + +// Animations created synchronously will run synchronously +function createFxNow() { + window.setTimeout( function() { + fxNow = undefined; + } ); + return ( fxNow = Date.now() ); +} + +// Generate parameters to create a standard animation +function genFx( type, includeWidth ) { + var which, + i = 0, + attrs = { height: type }; + + // If we include width, step value is 1 to do all cssExpand values, + // otherwise step value is 2 to skip over Left and Right + includeWidth = includeWidth ? 1 : 0; + for ( ; i < 4; i += 2 - includeWidth ) { + which = cssExpand[ i ]; + attrs[ "margin" + which ] = attrs[ "padding" + which ] = type; + } + + if ( includeWidth ) { + attrs.opacity = attrs.width = type; + } + + return attrs; +} + +function createTween( value, prop, animation ) { + var tween, + collection = ( Animation.tweeners[ prop ] || [] ).concat( Animation.tweeners[ "*" ] ), + index = 0, + length = collection.length; + for ( ; index < length; index++ ) { + if ( ( tween = collection[ index ].call( animation, prop, value ) ) ) { + + // We're done with this property + return tween; + } + } +} + +function defaultPrefilter( elem, props, opts ) { + var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, + isBox = "width" in props || "height" in props, + anim = this, + orig = {}, + style = elem.style, + hidden = elem.nodeType && isHiddenWithinTree( elem ), + dataShow = dataPriv.get( elem, "fxshow" ); + + // Queue-skipping animations hijack the fx hooks + if ( !opts.queue ) { + hooks = jQuery._queueHooks( elem, "fx" ); + if ( hooks.unqueued == null ) { + hooks.unqueued = 0; + oldfire = hooks.empty.fire; + hooks.empty.fire = function() { + if ( !hooks.unqueued ) { + oldfire(); + } + }; + } + hooks.unqueued++; + + anim.always( function() { + + // Ensure the complete handler is called before this completes + anim.always( function() { + hooks.unqueued--; + if ( !jQuery.queue( elem, "fx" ).length ) { + hooks.empty.fire(); + } + } ); + } ); + } + + // Detect show/hide animations + for ( prop in props ) { + value = props[ prop ]; + if ( rfxtypes.test( value ) ) { + delete props[ prop ]; + toggle = toggle || value === "toggle"; + if ( value === ( hidden ? "hide" : "show" ) ) { + + // Pretend to be hidden if this is a "show" and + // there is still data from a stopped show/hide + if ( value === "show" && dataShow && dataShow[ prop ] !== undefined ) { + hidden = true; + + // Ignore all other no-op show/hide data + } else { + continue; + } + } + orig[ prop ] = dataShow && dataShow[ prop ] || jQuery.style( elem, prop ); + } + } + + // Bail out if this is a no-op like .hide().hide() + propTween = !jQuery.isEmptyObject( props ); + if ( !propTween && jQuery.isEmptyObject( orig ) ) { + return; + } + + // Restrict "overflow" and "display" styles during box animations + if ( isBox && elem.nodeType === 1 ) { + + // Support: IE <=9 - 11, Edge 12 - 15 + // Record all 3 overflow attributes because IE does not infer the shorthand + // from identically-valued overflowX and overflowY and Edge just mirrors + // the overflowX value there. + opts.overflow = [ style.overflow, style.overflowX, style.overflowY ]; + + // Identify a display type, preferring old show/hide data over the CSS cascade + restoreDisplay = dataShow && dataShow.display; + if ( restoreDisplay == null ) { + restoreDisplay = dataPriv.get( elem, "display" ); + } + display = jQuery.css( elem, "display" ); + if ( display === "none" ) { + if ( restoreDisplay ) { + display = restoreDisplay; + } else { + + // Get nonempty value(s) by temporarily forcing visibility + showHide( [ elem ], true ); + restoreDisplay = elem.style.display || restoreDisplay; + display = jQuery.css( elem, "display" ); + showHide( [ elem ] ); + } + } + + // Animate inline elements as inline-block + if ( display === "inline" || display === "inline-block" && restoreDisplay != null ) { + if ( jQuery.css( elem, "float" ) === "none" ) { + + // Restore the original display value at the end of pure show/hide animations + if ( !propTween ) { + anim.done( function() { + style.display = restoreDisplay; + } ); + if ( restoreDisplay == null ) { + display = style.display; + restoreDisplay = display === "none" ? "" : display; + } + } + style.display = "inline-block"; + } + } + } + + if ( opts.overflow ) { + style.overflow = "hidden"; + anim.always( function() { + style.overflow = opts.overflow[ 0 ]; + style.overflowX = opts.overflow[ 1 ]; + style.overflowY = opts.overflow[ 2 ]; + } ); + } + + // Implement show/hide animations + propTween = false; + for ( prop in orig ) { + + // General show/hide setup for this element animation + if ( !propTween ) { + if ( dataShow ) { + if ( "hidden" in dataShow ) { + hidden = dataShow.hidden; + } + } else { + dataShow = dataPriv.access( elem, "fxshow", { display: restoreDisplay } ); + } + + // Store hidden/visible for toggle so `.stop().toggle()` "reverses" + if ( toggle ) { + dataShow.hidden = !hidden; + } + + // Show elements before animating them + if ( hidden ) { + showHide( [ elem ], true ); + } + + /* eslint-disable no-loop-func */ + + anim.done( function() { + + /* eslint-enable no-loop-func */ + + // The final step of a "hide" animation is actually hiding the element + if ( !hidden ) { + showHide( [ elem ] ); + } + dataPriv.remove( elem, "fxshow" ); + for ( prop in orig ) { + jQuery.style( elem, prop, orig[ prop ] ); + } + } ); + } + + // Per-property setup + propTween = createTween( hidden ? dataShow[ prop ] : 0, prop, anim ); + if ( !( prop in dataShow ) ) { + dataShow[ prop ] = propTween.start; + if ( hidden ) { + propTween.end = propTween.start; + propTween.start = 0; + } + } + } +} + +function propFilter( props, specialEasing ) { + var index, name, easing, value, hooks; + + // camelCase, specialEasing and expand cssHook pass + for ( index in props ) { + name = camelCase( index ); + easing = specialEasing[ name ]; + value = props[ index ]; + if ( Array.isArray( value ) ) { + easing = value[ 1 ]; + value = props[ index ] = value[ 0 ]; + } + + if ( index !== name ) { + props[ name ] = value; + delete props[ index ]; + } + + hooks = jQuery.cssHooks[ name ]; + if ( hooks && "expand" in hooks ) { + value = hooks.expand( value ); + delete props[ name ]; + + // Not quite $.extend, this won't overwrite existing keys. + // Reusing 'index' because we have the correct "name" + for ( index in value ) { + if ( !( index in props ) ) { + props[ index ] = value[ index ]; + specialEasing[ index ] = easing; + } + } + } else { + specialEasing[ name ] = easing; + } + } +} + +function Animation( elem, properties, options ) { + var result, + stopped, + index = 0, + length = Animation.prefilters.length, + deferred = jQuery.Deferred().always( function() { + + // Don't match elem in the :animated selector + delete tick.elem; + } ), + tick = function() { + if ( stopped ) { + return false; + } + var currentTime = fxNow || createFxNow(), + remaining = Math.max( 0, animation.startTime + animation.duration - currentTime ), + + // Support: Android 2.3 only + // Archaic crash bug won't allow us to use `1 - ( 0.5 || 0 )` (trac-12497) + temp = remaining / animation.duration || 0, + percent = 1 - temp, + index = 0, + length = animation.tweens.length; + + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( percent ); + } + + deferred.notifyWith( elem, [ animation, percent, remaining ] ); + + // If there's more to do, yield + if ( percent < 1 && length ) { + return remaining; + } + + // If this was an empty animation, synthesize a final progress notification + if ( !length ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + } + + // Resolve the animation and report its conclusion + deferred.resolveWith( elem, [ animation ] ); + return false; + }, + animation = deferred.promise( { + elem: elem, + props: jQuery.extend( {}, properties ), + opts: jQuery.extend( true, { + specialEasing: {}, + easing: jQuery.easing._default + }, options ), + originalProperties: properties, + originalOptions: options, + startTime: fxNow || createFxNow(), + duration: options.duration, + tweens: [], + createTween: function( prop, end ) { + var tween = jQuery.Tween( elem, animation.opts, prop, end, + animation.opts.specialEasing[ prop ] || animation.opts.easing ); + animation.tweens.push( tween ); + return tween; + }, + stop: function( gotoEnd ) { + var index = 0, + + // If we are going to the end, we want to run all the tweens + // otherwise we skip this part + length = gotoEnd ? animation.tweens.length : 0; + if ( stopped ) { + return this; + } + stopped = true; + for ( ; index < length; index++ ) { + animation.tweens[ index ].run( 1 ); + } + + // Resolve when we played the last frame; otherwise, reject + if ( gotoEnd ) { + deferred.notifyWith( elem, [ animation, 1, 0 ] ); + deferred.resolveWith( elem, [ animation, gotoEnd ] ); + } else { + deferred.rejectWith( elem, [ animation, gotoEnd ] ); + } + return this; + } + } ), + props = animation.props; + + propFilter( props, animation.opts.specialEasing ); + + for ( ; index < length; index++ ) { + result = Animation.prefilters[ index ].call( animation, elem, props, animation.opts ); + if ( result ) { + if ( isFunction( result.stop ) ) { + jQuery._queueHooks( animation.elem, animation.opts.queue ).stop = + result.stop.bind( result ); + } + return result; + } + } + + jQuery.map( props, createTween, animation ); + + if ( isFunction( animation.opts.start ) ) { + animation.opts.start.call( elem, animation ); + } + + // Attach callbacks from options + animation + .progress( animation.opts.progress ) + .done( animation.opts.done, animation.opts.complete ) + .fail( animation.opts.fail ) + .always( animation.opts.always ); + + jQuery.fx.timer( + jQuery.extend( tick, { + elem: elem, + anim: animation, + queue: animation.opts.queue + } ) + ); + + return animation; +} + +jQuery.Animation = jQuery.extend( Animation, { + + tweeners: { + "*": [ function( prop, value ) { + var tween = this.createTween( prop, value ); + adjustCSS( tween.elem, prop, rcssNum.exec( value ), tween ); + return tween; + } ] + }, + + tweener: function( props, callback ) { + if ( isFunction( props ) ) { + callback = props; + props = [ "*" ]; + } else { + props = props.match( rnothtmlwhite ); + } + + var prop, + index = 0, + length = props.length; + + for ( ; index < length; index++ ) { + prop = props[ index ]; + Animation.tweeners[ prop ] = Animation.tweeners[ prop ] || []; + Animation.tweeners[ prop ].unshift( callback ); + } + }, + + prefilters: [ defaultPrefilter ], + + prefilter: function( callback, prepend ) { + if ( prepend ) { + Animation.prefilters.unshift( callback ); + } else { + Animation.prefilters.push( callback ); + } + } +} ); + +jQuery.speed = function( speed, easing, fn ) { + var opt = speed && typeof speed === "object" ? jQuery.extend( {}, speed ) : { + complete: fn || !fn && easing || + isFunction( speed ) && speed, + duration: speed, + easing: fn && easing || easing && !isFunction( easing ) && easing + }; + + // Go to the end state if fx are off + if ( jQuery.fx.off ) { + opt.duration = 0; + + } else { + if ( typeof opt.duration !== "number" ) { + if ( opt.duration in jQuery.fx.speeds ) { + opt.duration = jQuery.fx.speeds[ opt.duration ]; + + } else { + opt.duration = jQuery.fx.speeds._default; + } + } + } + + // Normalize opt.queue - true/undefined/null -> "fx" + if ( opt.queue == null || opt.queue === true ) { + opt.queue = "fx"; + } + + // Queueing + opt.old = opt.complete; + + opt.complete = function() { + if ( isFunction( opt.old ) ) { + opt.old.call( this ); + } + + if ( opt.queue ) { + jQuery.dequeue( this, opt.queue ); + } + }; + + return opt; +}; + +jQuery.fn.extend( { + fadeTo: function( speed, to, easing, callback ) { + + // Show any hidden elements after setting opacity to 0 + return this.filter( isHiddenWithinTree ).css( "opacity", 0 ).show() + + // Animate to the value specified + .end().animate( { opacity: to }, speed, easing, callback ); + }, + animate: function( prop, speed, easing, callback ) { + var empty = jQuery.isEmptyObject( prop ), + optall = jQuery.speed( speed, easing, callback ), + doAnimation = function() { + + // Operate on a copy of prop so per-property easing won't be lost + var anim = Animation( this, jQuery.extend( {}, prop ), optall ); + + // Empty animations, or finishing resolves immediately + if ( empty || dataPriv.get( this, "finish" ) ) { + anim.stop( true ); + } + }; + + doAnimation.finish = doAnimation; + + return empty || optall.queue === false ? + this.each( doAnimation ) : + this.queue( optall.queue, doAnimation ); + }, + stop: function( type, clearQueue, gotoEnd ) { + var stopQueue = function( hooks ) { + var stop = hooks.stop; + delete hooks.stop; + stop( gotoEnd ); + }; + + if ( typeof type !== "string" ) { + gotoEnd = clearQueue; + clearQueue = type; + type = undefined; + } + if ( clearQueue ) { + this.queue( type || "fx", [] ); + } + + return this.each( function() { + var dequeue = true, + index = type != null && type + "queueHooks", + timers = jQuery.timers, + data = dataPriv.get( this ); + + if ( index ) { + if ( data[ index ] && data[ index ].stop ) { + stopQueue( data[ index ] ); + } + } else { + for ( index in data ) { + if ( data[ index ] && data[ index ].stop && rrun.test( index ) ) { + stopQueue( data[ index ] ); + } + } + } + + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && + ( type == null || timers[ index ].queue === type ) ) { + + timers[ index ].anim.stop( gotoEnd ); + dequeue = false; + timers.splice( index, 1 ); + } + } + + // Start the next in the queue if the last step wasn't forced. + // Timers currently will call their complete callbacks, which + // will dequeue but only if they were gotoEnd. + if ( dequeue || !gotoEnd ) { + jQuery.dequeue( this, type ); + } + } ); + }, + finish: function( type ) { + if ( type !== false ) { + type = type || "fx"; + } + return this.each( function() { + var index, + data = dataPriv.get( this ), + queue = data[ type + "queue" ], + hooks = data[ type + "queueHooks" ], + timers = jQuery.timers, + length = queue ? queue.length : 0; + + // Enable finishing flag on private data + data.finish = true; + + // Empty the queue first + jQuery.queue( this, type, [] ); + + if ( hooks && hooks.stop ) { + hooks.stop.call( this, true ); + } + + // Look for any active animations, and finish them + for ( index = timers.length; index--; ) { + if ( timers[ index ].elem === this && timers[ index ].queue === type ) { + timers[ index ].anim.stop( true ); + timers.splice( index, 1 ); + } + } + + // Look for any animations in the old queue and finish them + for ( index = 0; index < length; index++ ) { + if ( queue[ index ] && queue[ index ].finish ) { + queue[ index ].finish.call( this ); + } + } + + // Turn off finishing flag + delete data.finish; + } ); + } +} ); + +jQuery.each( [ "toggle", "show", "hide" ], function( _i, name ) { + var cssFn = jQuery.fn[ name ]; + jQuery.fn[ name ] = function( speed, easing, callback ) { + return speed == null || typeof speed === "boolean" ? + cssFn.apply( this, arguments ) : + this.animate( genFx( name, true ), speed, easing, callback ); + }; +} ); + +// Generate shortcuts for custom animations +jQuery.each( { + slideDown: genFx( "show" ), + slideUp: genFx( "hide" ), + slideToggle: genFx( "toggle" ), + fadeIn: { opacity: "show" }, + fadeOut: { opacity: "hide" }, + fadeToggle: { opacity: "toggle" } +}, function( name, props ) { + jQuery.fn[ name ] = function( speed, easing, callback ) { + return this.animate( props, speed, easing, callback ); + }; +} ); + +jQuery.timers = []; +jQuery.fx.tick = function() { + var timer, + i = 0, + timers = jQuery.timers; + + fxNow = Date.now(); + + for ( ; i < timers.length; i++ ) { + timer = timers[ i ]; + + // Run the timer and safely remove it when done (allowing for external removal) + if ( !timer() && timers[ i ] === timer ) { + timers.splice( i--, 1 ); + } + } + + if ( !timers.length ) { + jQuery.fx.stop(); + } + fxNow = undefined; +}; + +jQuery.fx.timer = function( timer ) { + jQuery.timers.push( timer ); + jQuery.fx.start(); +}; + +jQuery.fx.interval = 13; +jQuery.fx.start = function() { + if ( inProgress ) { + return; + } + + inProgress = true; + schedule(); +}; + +jQuery.fx.stop = function() { + inProgress = null; +}; + +jQuery.fx.speeds = { + slow: 600, + fast: 200, + + // Default speed + _default: 400 +}; + + +// Based off of the plugin by Clint Helfers, with permission. +jQuery.fn.delay = function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = window.setTimeout( next, time ); + hooks.stop = function() { + window.clearTimeout( timeout ); + }; + } ); +}; + + +( function() { + var input = document.createElement( "input" ), + select = document.createElement( "select" ), + opt = select.appendChild( document.createElement( "option" ) ); + + input.type = "checkbox"; + + // Support: Android <=4.3 only + // Default value for a checkbox should be "on" + support.checkOn = input.value !== ""; + + // Support: IE <=11 only + // Must access selectedIndex to make default options select + support.optSelected = opt.selected; + + // Support: IE <=11 only + // An input loses its value after becoming a radio + input = document.createElement( "input" ); + input.value = "t"; + input.type = "radio"; + support.radioValue = input.value === "t"; +} )(); + + +var boolHook, + attrHandle = jQuery.expr.attrHandle; + +jQuery.fn.extend( { + attr: function( name, value ) { + return access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each( function() { + jQuery.removeAttr( this, name ); + } ); + } +} ); + +jQuery.extend( { + attr: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set attributes on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === "undefined" ) { + return jQuery.prop( elem, name, value ); + } + + // Attribute hooks are determined by the lowercase version + // Grab necessary hook if one is defined + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + hooks = jQuery.attrHooks[ name.toLowerCase() ] || + ( jQuery.expr.match.bool.test( name ) ? boolHook : undefined ); + } + + if ( value !== undefined ) { + if ( value === null ) { + jQuery.removeAttr( elem, name ); + return; + } + + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + elem.setAttribute( name, value + "" ); + return value; + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + ret = jQuery.find.attr( elem, name ); + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? undefined : ret; + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !support.radioValue && value === "radio" && + nodeName( elem, "input" ) ) { + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + removeAttr: function( elem, value ) { + var name, + i = 0, + + // Attribute names can contain non-HTML whitespace characters + // https://html.spec.whatwg.org/multipage/syntax.html#attributes-2 + attrNames = value && value.match( rnothtmlwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( ( name = attrNames[ i++ ] ) ) { + elem.removeAttribute( name ); + } + } + } +} ); + +// Hooks for boolean attributes +boolHook = { + set: function( elem, value, name ) { + if ( value === false ) { + + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else { + elem.setAttribute( name, name ); + } + return name; + } +}; + +jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( _i, name ) { + var getter = attrHandle[ name ] || jQuery.find.attr; + + attrHandle[ name ] = function( elem, name, isXML ) { + var ret, handle, + lowercaseName = name.toLowerCase(); + + if ( !isXML ) { + + // Avoid an infinite loop by temporarily removing this function from the getter + handle = attrHandle[ lowercaseName ]; + attrHandle[ lowercaseName ] = ret; + ret = getter( elem, name, isXML ) != null ? + lowercaseName : + null; + attrHandle[ lowercaseName ] = handle; + } + return ret; + }; +} ); + + + + +var rfocusable = /^(?:input|select|textarea|button)$/i, + rclickable = /^(?:a|area)$/i; + +jQuery.fn.extend( { + prop: function( name, value ) { + return access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + return this.each( function() { + delete this[ jQuery.propFix[ name ] || name ]; + } ); + } +} ); + +jQuery.extend( { + prop: function( elem, name, value ) { + var ret, hooks, + nType = elem.nodeType; + + // Don't get/set properties on text, comment and attribute nodes + if ( nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { + + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && + ( ret = hooks.set( elem, value, name ) ) !== undefined ) { + return ret; + } + + return ( elem[ name ] = value ); + } + + if ( hooks && "get" in hooks && ( ret = hooks.get( elem, name ) ) !== null ) { + return ret; + } + + return elem[ name ]; + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + + // Support: IE <=9 - 11 only + // elem.tabIndex doesn't always return the + // correct value when it hasn't been explicitly set + // Use proper attribute retrieval (trac-12072) + var tabindex = jQuery.find.attr( elem, "tabindex" ); + + if ( tabindex ) { + return parseInt( tabindex, 10 ); + } + + if ( + rfocusable.test( elem.nodeName ) || + rclickable.test( elem.nodeName ) && + elem.href + ) { + return 0; + } + + return -1; + } + } + }, + + propFix: { + "for": "htmlFor", + "class": "className" + } +} ); + +// Support: IE <=11 only +// Accessing the selectedIndex property +// forces the browser to respect setting selected +// on the option +// The getter ensures a default option is selected +// when in an optgroup +// eslint rule "no-unused-expressions" is disabled for this code +// since it considers such accessions noop +if ( !support.optSelected ) { + jQuery.propHooks.selected = { + get: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent && parent.parentNode ) { + parent.parentNode.selectedIndex; + } + return null; + }, + set: function( elem ) { + + /* eslint no-unused-expressions: "off" */ + + var parent = elem.parentNode; + if ( parent ) { + parent.selectedIndex; + + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + } + }; +} + +jQuery.each( [ + "tabIndex", + "readOnly", + "maxLength", + "cellSpacing", + "cellPadding", + "rowSpan", + "colSpan", + "useMap", + "frameBorder", + "contentEditable" +], function() { + jQuery.propFix[ this.toLowerCase() ] = this; +} ); + + + + + // Strip and collapse whitespace according to HTML spec + // https://infra.spec.whatwg.org/#strip-and-collapse-ascii-whitespace + function stripAndCollapse( value ) { + var tokens = value.match( rnothtmlwhite ) || []; + return tokens.join( " " ); + } + + +function getClass( elem ) { + return elem.getAttribute && elem.getAttribute( "class" ) || ""; +} + +function classesToArray( value ) { + if ( Array.isArray( value ) ) { + return value; + } + if ( typeof value === "string" ) { + return value.match( rnothtmlwhite ) || []; + } + return []; +} + +jQuery.fn.extend( { + addClass: function( value ) { + var classNames, cur, curValue, className, i, finalValue; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).addClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + classNames = classesToArray( value ); + + if ( classNames.length ) { + return this.each( function() { + curValue = getClass( this ); + cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; + if ( cur.indexOf( " " + className + " " ) < 0 ) { + cur += className + " "; + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + this.setAttribute( "class", finalValue ); + } + } + } ); + } + + return this; + }, + + removeClass: function( value ) { + var classNames, cur, curValue, className, i, finalValue; + + if ( isFunction( value ) ) { + return this.each( function( j ) { + jQuery( this ).removeClass( value.call( this, j, getClass( this ) ) ); + } ); + } + + if ( !arguments.length ) { + return this.attr( "class", "" ); + } + + classNames = classesToArray( value ); + + if ( classNames.length ) { + return this.each( function() { + curValue = getClass( this ); + + // This expression is here for better compressibility (see addClass) + cur = this.nodeType === 1 && ( " " + stripAndCollapse( curValue ) + " " ); + + if ( cur ) { + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; + + // Remove *all* instances + while ( cur.indexOf( " " + className + " " ) > -1 ) { + cur = cur.replace( " " + className + " ", " " ); + } + } + + // Only assign if different to avoid unneeded rendering. + finalValue = stripAndCollapse( cur ); + if ( curValue !== finalValue ) { + this.setAttribute( "class", finalValue ); + } + } + } ); + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var classNames, className, i, self, + type = typeof value, + isValidValue = type === "string" || Array.isArray( value ); + + if ( isFunction( value ) ) { + return this.each( function( i ) { + jQuery( this ).toggleClass( + value.call( this, i, getClass( this ), stateVal ), + stateVal + ); + } ); + } + + if ( typeof stateVal === "boolean" && isValidValue ) { + return stateVal ? this.addClass( value ) : this.removeClass( value ); + } + + classNames = classesToArray( value ); + + return this.each( function() { + if ( isValidValue ) { + + // Toggle individual class names + self = jQuery( this ); + + for ( i = 0; i < classNames.length; i++ ) { + className = classNames[ i ]; + + // Check each className given, space separated list + if ( self.hasClass( className ) ) { + self.removeClass( className ); + } else { + self.addClass( className ); + } + } + + // Toggle whole class name + } else if ( value === undefined || type === "boolean" ) { + className = getClass( this ); + if ( className ) { + + // Store className if set + dataPriv.set( this, "__className__", className ); + } + + // If the element has a class name or if we're passed `false`, + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + if ( this.setAttribute ) { + this.setAttribute( "class", + className || value === false ? + "" : + dataPriv.get( this, "__className__" ) || "" + ); + } + } + } ); + }, + + hasClass: function( selector ) { + var className, elem, + i = 0; + + className = " " + selector + " "; + while ( ( elem = this[ i++ ] ) ) { + if ( elem.nodeType === 1 && + ( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) { + return true; + } + } + + return false; + } +} ); + + + + +var rreturn = /\r/g; + +jQuery.fn.extend( { + val: function( value ) { + var hooks, ret, valueIsFunction, + elem = this[ 0 ]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || + jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && + "get" in hooks && + ( ret = hooks.get( elem, "value" ) ) !== undefined + ) { + return ret; + } + + ret = elem.value; + + // Handle most common string cases + if ( typeof ret === "string" ) { + return ret.replace( rreturn, "" ); + } + + // Handle cases where value is null/undef or number + return ret == null ? "" : ret; + } + + return; + } + + valueIsFunction = isFunction( value ); + + return this.each( function( i ) { + var val; + + if ( this.nodeType !== 1 ) { + return; + } + + if ( valueIsFunction ) { + val = value.call( this, i, jQuery( this ).val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + + } else if ( typeof val === "number" ) { + val += ""; + + } else if ( Array.isArray( val ) ) { + val = jQuery.map( val, function( value ) { + return value == null ? "" : value + ""; + } ); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !( "set" in hooks ) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + } ); + } +} ); + +jQuery.extend( { + valHooks: { + option: { + get: function( elem ) { + + var val = jQuery.find.attr( elem, "value" ); + return val != null ? + val : + + // Support: IE <=10 - 11 only + // option.text throws exceptions (trac-14686, trac-14858) + // Strip and collapse whitespace + // https://html.spec.whatwg.org/#strip-and-collapse-whitespace + stripAndCollapse( jQuery.text( elem ) ); + } + }, + select: { + get: function( elem ) { + var value, option, i, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one", + values = one ? null : [], + max = one ? index + 1 : options.length; + + if ( index < 0 ) { + i = max; + + } else { + i = one ? index : 0; + } + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // Support: IE <=9 only + // IE8-9 doesn't update selected after form reset (trac-2551) + if ( ( option.selected || i === index ) && + + // Don't return options that are disabled or in a disabled optgroup + !option.disabled && + ( !option.parentNode.disabled || + !nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var optionSet, option, + options = elem.options, + values = jQuery.makeArray( value ), + i = options.length; + + while ( i-- ) { + option = options[ i ]; + + /* eslint-disable no-cond-assign */ + + if ( option.selected = + jQuery.inArray( jQuery.valHooks.option.get( option ), values ) > -1 + ) { + optionSet = true; + } + + /* eslint-enable no-cond-assign */ + } + + // Force browsers to behave consistently when non-matching value is set + if ( !optionSet ) { + elem.selectedIndex = -1; + } + return values; + } + } + } +} ); + +// Radios and checkboxes getter/setter +jQuery.each( [ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + set: function( elem, value ) { + if ( Array.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery( elem ).val(), value ) > -1 ); + } + } + }; + if ( !support.checkOn ) { + jQuery.valHooks[ this ].get = function( elem ) { + return elem.getAttribute( "value" ) === null ? "on" : elem.value; + }; + } +} ); + + + + +// Return jQuery for attributes-only inclusion +var location = window.location; + +var nonce = { guid: Date.now() }; + +var rquery = ( /\?/ ); + + + +// Cross-browser xml parsing +jQuery.parseXML = function( data ) { + var xml, parserErrorElem; + if ( !data || typeof data !== "string" ) { + return null; + } + + // Support: IE 9 - 11 only + // IE throws on parseFromString with invalid input. + try { + xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); + } catch ( e ) {} + + parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ]; + if ( !xml || parserErrorElem ) { + jQuery.error( "Invalid XML: " + ( + parserErrorElem ? + jQuery.map( parserErrorElem.childNodes, function( el ) { + return el.textContent; + } ).join( "\n" ) : + data + ) ); + } + return xml; +}; + + +var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + stopPropagationCallback = function( e ) { + e.stopPropagation(); + }; + +jQuery.extend( jQuery.event, { + + trigger: function( event, data, elem, onlyHandlers ) { + + var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, + eventPath = [ elem || document ], + type = hasOwn.call( event, "type" ) ? event.type : event, + namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split( "." ) : []; + + cur = lastElement = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf( "." ) > -1 ) { + + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split( "." ); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf( ":" ) < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) + event.isTrigger = onlyHandlers ? 2 : 3; + event.namespace = namespaces.join( "." ); + event.rnamespace = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (trac-9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (trac-9724) + if ( !onlyHandlers && !special.noBubble && !isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === ( elem.ownerDocument || document ) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( ( cur = eventPath[ i++ ] ) && !event.isPropagationStopped() ) { + lastElement = cur; + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] && + dataPriv.get( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && handle.apply && acceptData( cur ) ) { + event.result = handle.apply( cur, data ); + if ( event.result === false ) { + event.preventDefault(); + } + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( ( !special._default || + special._default.apply( eventPath.pop(), data ) === false ) && + acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name as the event. + // Don't do default actions on window, that's where global variables be (trac-6170) + if ( ontype && isFunction( elem[ type ] ) && !isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + + if ( event.isPropagationStopped() ) { + lastElement.addEventListener( type, stopPropagationCallback ); + } + + elem[ type ](); + + if ( event.isPropagationStopped() ) { + lastElement.removeEventListener( type, stopPropagationCallback ); + } + + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + // Piggyback on a donor event to simulate a different one + // Used only for `focus(in | out)` events + simulate: function( type, elem, event ) { + var e = jQuery.extend( + new jQuery.Event(), + event, + { + type: type, + isSimulated: true + } + ); + + jQuery.event.trigger( e, null, elem ); + } + +} ); + +jQuery.fn.extend( { + + trigger: function( type, data ) { + return this.each( function() { + jQuery.event.trigger( type, data, this ); + } ); + }, + triggerHandler: function( type, data ) { + var elem = this[ 0 ]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +} ); + + +var + rbracket = /\[\]$/, + rCRLF = /\r?\n/g, + rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, + rsubmittable = /^(?:input|select|textarea|keygen)/i; + +function buildParams( prefix, obj, traditional, add ) { + var name; + + if ( Array.isArray( obj ) ) { + + // Serialize array item. + jQuery.each( obj, function( i, v ) { + if ( traditional || rbracket.test( prefix ) ) { + + // Treat each array item as a scalar. + add( prefix, v ); + + } else { + + // Item is non-scalar (array or object), encode its numeric index. + buildParams( + prefix + "[" + ( typeof v === "object" && v != null ? i : "" ) + "]", + v, + traditional, + add + ); + } + } ); + + } else if ( !traditional && toType( obj ) === "object" ) { + + // Serialize object item. + for ( name in obj ) { + buildParams( prefix + "[" + name + "]", obj[ name ], traditional, add ); + } + + } else { + + // Serialize scalar item. + add( prefix, obj ); + } +} + +// Serialize an array of form elements or a set of +// key/values into a query string +jQuery.param = function( a, traditional ) { + var prefix, + s = [], + add = function( key, valueOrFunction ) { + + // If value is a function, invoke it and use its return value + var value = isFunction( valueOrFunction ) ? + valueOrFunction() : + valueOrFunction; + + s[ s.length ] = encodeURIComponent( key ) + "=" + + encodeURIComponent( value == null ? "" : value ); + }; + + if ( a == null ) { + return ""; + } + + // If an array was passed in, assume that it is an array of form elements. + if ( Array.isArray( a ) || ( a.jquery && !jQuery.isPlainObject( a ) ) ) { + + // Serialize the form elements + jQuery.each( a, function() { + add( this.name, this.value ); + } ); + + } else { + + // If traditional, encode the "old" way (the way 1.3.2 or older + // did it), otherwise encode params recursively. + for ( prefix in a ) { + buildParams( prefix, a[ prefix ], traditional, add ); + } + } + + // Return the resulting serialization + return s.join( "&" ); +}; + +jQuery.fn.extend( { + serialize: function() { + return jQuery.param( this.serializeArray() ); + }, + serializeArray: function() { + return this.map( function() { + + // Can add propHook for "elements" to filter or add form elements + var elements = jQuery.prop( this, "elements" ); + return elements ? jQuery.makeArray( elements ) : this; + } ).filter( function() { + var type = this.type; + + // Use .is( ":disabled" ) so that fieldset[disabled] works + return this.name && !jQuery( this ).is( ":disabled" ) && + rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) && + ( this.checked || !rcheckableType.test( type ) ); + } ).map( function( _i, elem ) { + var val = jQuery( this ).val(); + + if ( val == null ) { + return null; + } + + if ( Array.isArray( val ) ) { + return jQuery.map( val, function( val ) { + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ); + } + + return { name: elem.name, value: val.replace( rCRLF, "\r\n" ) }; + } ).get(); + } +} ); + + +var + r20 = /%20/g, + rhash = /#.*$/, + rantiCache = /([?&])_=[^&]*/, + rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, + + // trac-7653, trac-8125, trac-8152: local protocol detection + rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, + rnoContent = /^(?:GET|HEAD)$/, + rprotocol = /^\/\//, + + /* Prefilters + * 1) They are useful to introduce custom dataTypes (see ajax/jsonp.js for an example) + * 2) These are called: + * - BEFORE asking for a transport + * - AFTER param serialization (s.data is a string if s.processData is true) + * 3) key is the dataType + * 4) the catchall symbol "*" can be used + * 5) execution will start with transport dataType and THEN continue down to "*" if needed + */ + prefilters = {}, + + /* Transports bindings + * 1) key is the dataType + * 2) the catchall symbol "*" can be used + * 3) selection will start with transport dataType and THEN go to "*" if needed + */ + transports = {}, + + // Avoid comment-prolog char sequence (trac-10098); must appease lint and evade compression + allTypes = "*/".concat( "*" ), + + // Anchor tag for parsing the document origin + originAnchor = document.createElement( "a" ); + +originAnchor.href = location.href; + +// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport +function addToPrefiltersOrTransports( structure ) { + + // dataTypeExpression is optional and defaults to "*" + return function( dataTypeExpression, func ) { + + if ( typeof dataTypeExpression !== "string" ) { + func = dataTypeExpression; + dataTypeExpression = "*"; + } + + var dataType, + i = 0, + dataTypes = dataTypeExpression.toLowerCase().match( rnothtmlwhite ) || []; + + if ( isFunction( func ) ) { + + // For each dataType in the dataTypeExpression + while ( ( dataType = dataTypes[ i++ ] ) ) { + + // Prepend if requested + if ( dataType[ 0 ] === "+" ) { + dataType = dataType.slice( 1 ) || "*"; + ( structure[ dataType ] = structure[ dataType ] || [] ).unshift( func ); + + // Otherwise append + } else { + ( structure[ dataType ] = structure[ dataType ] || [] ).push( func ); + } + } + } + }; +} + +// Base inspection function for prefilters and transports +function inspectPrefiltersOrTransports( structure, options, originalOptions, jqXHR ) { + + var inspected = {}, + seekingTransport = ( structure === transports ); + + function inspect( dataType ) { + var selected; + inspected[ dataType ] = true; + jQuery.each( structure[ dataType ] || [], function( _, prefilterOrFactory ) { + var dataTypeOrTransport = prefilterOrFactory( options, originalOptions, jqXHR ); + if ( typeof dataTypeOrTransport === "string" && + !seekingTransport && !inspected[ dataTypeOrTransport ] ) { + + options.dataTypes.unshift( dataTypeOrTransport ); + inspect( dataTypeOrTransport ); + return false; + } else if ( seekingTransport ) { + return !( selected = dataTypeOrTransport ); + } + } ); + return selected; + } + + return inspect( options.dataTypes[ 0 ] ) || !inspected[ "*" ] && inspect( "*" ); +} + +// A special extend for ajax options +// that takes "flat" options (not to be deep extended) +// Fixes trac-9887 +function ajaxExtend( target, src ) { + var key, deep, + flatOptions = jQuery.ajaxSettings.flatOptions || {}; + + for ( key in src ) { + if ( src[ key ] !== undefined ) { + ( flatOptions[ key ] ? target : ( deep || ( deep = {} ) ) )[ key ] = src[ key ]; + } + } + if ( deep ) { + jQuery.extend( true, target, deep ); + } + + return target; +} + +/* Handles responses to an ajax request: + * - finds the right dataType (mediates between content-type and expected dataType) + * - returns the corresponding response + */ +function ajaxHandleResponses( s, jqXHR, responses ) { + + var ct, type, finalDataType, firstDataType, + contents = s.contents, + dataTypes = s.dataTypes; + + // Remove auto dataType and get content-type in the process + while ( dataTypes[ 0 ] === "*" ) { + dataTypes.shift(); + if ( ct === undefined ) { + ct = s.mimeType || jqXHR.getResponseHeader( "Content-Type" ); + } + } + + // Check if we're dealing with a known content-type + if ( ct ) { + for ( type in contents ) { + if ( contents[ type ] && contents[ type ].test( ct ) ) { + dataTypes.unshift( type ); + break; + } + } + } + + // Check to see if we have a response for the expected dataType + if ( dataTypes[ 0 ] in responses ) { + finalDataType = dataTypes[ 0 ]; + } else { + + // Try convertible dataTypes + for ( type in responses ) { + if ( !dataTypes[ 0 ] || s.converters[ type + " " + dataTypes[ 0 ] ] ) { + finalDataType = type; + break; + } + if ( !firstDataType ) { + firstDataType = type; + } + } + + // Or just use first one + finalDataType = finalDataType || firstDataType; + } + + // If we found a dataType + // We add the dataType to the list if needed + // and return the corresponding response + if ( finalDataType ) { + if ( finalDataType !== dataTypes[ 0 ] ) { + dataTypes.unshift( finalDataType ); + } + return responses[ finalDataType ]; + } +} + +/* Chain conversions given the request and the original response + * Also sets the responseXXX fields on the jqXHR instance + */ +function ajaxConvert( s, response, jqXHR, isSuccess ) { + var conv2, current, conv, tmp, prev, + converters = {}, + + // Work with a copy of dataTypes in case we need to modify it for conversion + dataTypes = s.dataTypes.slice(); + + // Create converters map with lowercased keys + if ( dataTypes[ 1 ] ) { + for ( conv in s.converters ) { + converters[ conv.toLowerCase() ] = s.converters[ conv ]; + } + } + + current = dataTypes.shift(); + + // Convert to each sequential dataType + while ( current ) { + + if ( s.responseFields[ current ] ) { + jqXHR[ s.responseFields[ current ] ] = response; + } + + // Apply the dataFilter if provided + if ( !prev && isSuccess && s.dataFilter ) { + response = s.dataFilter( response, s.dataType ); + } + + prev = current; + current = dataTypes.shift(); + + if ( current ) { + + // There's only work to do if current dataType is non-auto + if ( current === "*" ) { + + current = prev; + + // Convert response if prev dataType is non-auto and differs from current + } else if ( prev !== "*" && prev !== current ) { + + // Seek a direct converter + conv = converters[ prev + " " + current ] || converters[ "* " + current ]; + + // If none found, seek a pair + if ( !conv ) { + for ( conv2 in converters ) { + + // If conv2 outputs current + tmp = conv2.split( " " ); + if ( tmp[ 1 ] === current ) { + + // If prev can be converted to accepted input + conv = converters[ prev + " " + tmp[ 0 ] ] || + converters[ "* " + tmp[ 0 ] ]; + if ( conv ) { + + // Condense equivalence converters + if ( conv === true ) { + conv = converters[ conv2 ]; + + // Otherwise, insert the intermediate dataType + } else if ( converters[ conv2 ] !== true ) { + current = tmp[ 0 ]; + dataTypes.unshift( tmp[ 1 ] ); + } + break; + } + } + } + } + + // Apply converter (if not an equivalence) + if ( conv !== true ) { + + // Unless errors are allowed to bubble, catch and return them + if ( conv && s.throws ) { + response = conv( response ); + } else { + try { + response = conv( response ); + } catch ( e ) { + return { + state: "parsererror", + error: conv ? e : "No conversion from " + prev + " to " + current + }; + } + } + } + } + } + } + + return { state: "success", data: response }; +} + +jQuery.extend( { + + // Counter for holding the number of active queries + active: 0, + + // Last-Modified header cache for next request + lastModified: {}, + etag: {}, + + ajaxSettings: { + url: location.href, + type: "GET", + isLocal: rlocalProtocol.test( location.protocol ), + global: true, + processData: true, + async: true, + contentType: "application/x-www-form-urlencoded; charset=UTF-8", + + /* + timeout: 0, + data: null, + dataType: null, + username: null, + password: null, + cache: null, + throws: false, + traditional: false, + headers: {}, + */ + + accepts: { + "*": allTypes, + text: "text/plain", + html: "text/html", + xml: "application/xml, text/xml", + json: "application/json, text/javascript" + }, + + contents: { + xml: /\bxml\b/, + html: /\bhtml/, + json: /\bjson\b/ + }, + + responseFields: { + xml: "responseXML", + text: "responseText", + json: "responseJSON" + }, + + // Data converters + // Keys separate source (or catchall "*") and destination types with a single space + converters: { + + // Convert anything to text + "* text": String, + + // Text to html (true = no transformation) + "text html": true, + + // Evaluate text as a json expression + "text json": JSON.parse, + + // Parse text as xml + "text xml": jQuery.parseXML + }, + + // For options that shouldn't be deep extended: + // you can add your own custom options here if + // and when you create one that shouldn't be + // deep extended (see ajaxExtend) + flatOptions: { + url: true, + context: true + } + }, + + // Creates a full fledged settings object into target + // with both ajaxSettings and settings fields. + // If target is omitted, writes into ajaxSettings. + ajaxSetup: function( target, settings ) { + return settings ? + + // Building a settings object + ajaxExtend( ajaxExtend( target, jQuery.ajaxSettings ), settings ) : + + // Extending ajaxSettings + ajaxExtend( jQuery.ajaxSettings, target ); + }, + + ajaxPrefilter: addToPrefiltersOrTransports( prefilters ), + ajaxTransport: addToPrefiltersOrTransports( transports ), + + // Main method + ajax: function( url, options ) { + + // If url is an object, simulate pre-1.5 signature + if ( typeof url === "object" ) { + options = url; + url = undefined; + } + + // Force options to be an object + options = options || {}; + + var transport, + + // URL without anti-cache param + cacheURL, + + // Response headers + responseHeadersString, + responseHeaders, + + // timeout handle + timeoutTimer, + + // Url cleanup var + urlAnchor, + + // Request state (becomes false upon send and true upon completion) + completed, + + // To know if global events are to be dispatched + fireGlobals, + + // Loop variable + i, + + // uncached part of the url + uncached, + + // Create the final options object + s = jQuery.ajaxSetup( {}, options ), + + // Callbacks context + callbackContext = s.context || s, + + // Context for global events is callbackContext if it is a DOM node or jQuery collection + globalEventContext = s.context && + ( callbackContext.nodeType || callbackContext.jquery ) ? + jQuery( callbackContext ) : + jQuery.event, + + // Deferreds + deferred = jQuery.Deferred(), + completeDeferred = jQuery.Callbacks( "once memory" ), + + // Status-dependent callbacks + statusCode = s.statusCode || {}, + + // Headers (they are sent all at once) + requestHeaders = {}, + requestHeadersNames = {}, + + // Default abort message + strAbort = "canceled", + + // Fake xhr + jqXHR = { + readyState: 0, + + // Builds headers hashtable if needed + getResponseHeader: function( key ) { + var match; + if ( completed ) { + if ( !responseHeaders ) { + responseHeaders = {}; + while ( ( match = rheaders.exec( responseHeadersString ) ) ) { + responseHeaders[ match[ 1 ].toLowerCase() + " " ] = + ( responseHeaders[ match[ 1 ].toLowerCase() + " " ] || [] ) + .concat( match[ 2 ] ); + } + } + match = responseHeaders[ key.toLowerCase() + " " ]; + } + return match == null ? null : match.join( ", " ); + }, + + // Raw string + getAllResponseHeaders: function() { + return completed ? responseHeadersString : null; + }, + + // Caches the header + setRequestHeader: function( name, value ) { + if ( completed == null ) { + name = requestHeadersNames[ name.toLowerCase() ] = + requestHeadersNames[ name.toLowerCase() ] || name; + requestHeaders[ name ] = value; + } + return this; + }, + + // Overrides response content-type header + overrideMimeType: function( type ) { + if ( completed == null ) { + s.mimeType = type; + } + return this; + }, + + // Status-dependent callbacks + statusCode: function( map ) { + var code; + if ( map ) { + if ( completed ) { + + // Execute the appropriate callbacks + jqXHR.always( map[ jqXHR.status ] ); + } else { + + // Lazy-add the new callbacks in a way that preserves old ones + for ( code in map ) { + statusCode[ code ] = [ statusCode[ code ], map[ code ] ]; + } + } + } + return this; + }, + + // Cancel the request + abort: function( statusText ) { + var finalText = statusText || strAbort; + if ( transport ) { + transport.abort( finalText ); + } + done( 0, finalText ); + return this; + } + }; + + // Attach deferreds + deferred.promise( jqXHR ); + + // Add protocol if not provided (prefilters might expect it) + // Handle falsy url in the settings object (trac-10093: consistency with old signature) + // We also use the url parameter if available + s.url = ( ( url || s.url || location.href ) + "" ) + .replace( rprotocol, location.protocol + "//" ); + + // Alias method option to type as per ticket trac-12004 + s.type = options.method || options.type || s.method || s.type; + + // Extract dataTypes list + s.dataTypes = ( s.dataType || "*" ).toLowerCase().match( rnothtmlwhite ) || [ "" ]; + + // A cross-domain request is in order when the origin doesn't match the current origin. + if ( s.crossDomain == null ) { + urlAnchor = document.createElement( "a" ); + + // Support: IE <=8 - 11, Edge 12 - 15 + // IE throws exception on accessing the href property if url is malformed, + // e.g. http://example.com:80x/ + try { + urlAnchor.href = s.url; + + // Support: IE <=8 - 11 only + // Anchor's host property isn't correctly set when s.url is relative + urlAnchor.href = urlAnchor.href; + s.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== + urlAnchor.protocol + "//" + urlAnchor.host; + } catch ( e ) { + + // If there is an error parsing the URL, assume it is crossDomain, + // it can be rejected by the transport if it is invalid + s.crossDomain = true; + } + } + + // Convert data if not already a string + if ( s.data && s.processData && typeof s.data !== "string" ) { + s.data = jQuery.param( s.data, s.traditional ); + } + + // Apply prefilters + inspectPrefiltersOrTransports( prefilters, s, options, jqXHR ); + + // If request was aborted inside a prefilter, stop there + if ( completed ) { + return jqXHR; + } + + // We can fire global events as of now if asked to + // Don't fire events if jQuery.event is undefined in an AMD-usage scenario (trac-15118) + fireGlobals = jQuery.event && s.global; + + // Watch for a new set of requests + if ( fireGlobals && jQuery.active++ === 0 ) { + jQuery.event.trigger( "ajaxStart" ); + } + + // Uppercase the type + s.type = s.type.toUpperCase(); + + // Determine if request has content + s.hasContent = !rnoContent.test( s.type ); + + // Save the URL in case we're toying with the If-Modified-Since + // and/or If-None-Match header later on + // Remove hash to simplify url manipulation + cacheURL = s.url.replace( rhash, "" ); + + // More options handling for requests with no content + if ( !s.hasContent ) { + + // Remember the hash so we can put it back + uncached = s.url.slice( cacheURL.length ); + + // If data is available and should be processed, append data to url + if ( s.data && ( s.processData || typeof s.data === "string" ) ) { + cacheURL += ( rquery.test( cacheURL ) ? "&" : "?" ) + s.data; + + // trac-9682: remove data so that it's not used in an eventual retry + delete s.data; + } + + // Add or update anti-cache param if needed + if ( s.cache === false ) { + cacheURL = cacheURL.replace( rantiCache, "$1" ); + uncached = ( rquery.test( cacheURL ) ? "&" : "?" ) + "_=" + ( nonce.guid++ ) + + uncached; + } + + // Put hash and anti-cache on the URL that will be requested (gh-1732) + s.url = cacheURL + uncached; + + // Change '%20' to '+' if this is encoded form body content (gh-2658) + } else if ( s.data && s.processData && + ( s.contentType || "" ).indexOf( "application/x-www-form-urlencoded" ) === 0 ) { + s.data = s.data.replace( r20, "+" ); + } + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + if ( jQuery.lastModified[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-Modified-Since", jQuery.lastModified[ cacheURL ] ); + } + if ( jQuery.etag[ cacheURL ] ) { + jqXHR.setRequestHeader( "If-None-Match", jQuery.etag[ cacheURL ] ); + } + } + + // Set the correct header, if data is being sent + if ( s.data && s.hasContent && s.contentType !== false || options.contentType ) { + jqXHR.setRequestHeader( "Content-Type", s.contentType ); + } + + // Set the Accepts header for the server, depending on the dataType + jqXHR.setRequestHeader( + "Accept", + s.dataTypes[ 0 ] && s.accepts[ s.dataTypes[ 0 ] ] ? + s.accepts[ s.dataTypes[ 0 ] ] + + ( s.dataTypes[ 0 ] !== "*" ? ", " + allTypes + "; q=0.01" : "" ) : + s.accepts[ "*" ] + ); + + // Check for headers option + for ( i in s.headers ) { + jqXHR.setRequestHeader( i, s.headers[ i ] ); + } + + // Allow custom headers/mimetypes and early abort + if ( s.beforeSend && + ( s.beforeSend.call( callbackContext, jqXHR, s ) === false || completed ) ) { + + // Abort if not done already and return + return jqXHR.abort(); + } + + // Aborting is no longer a cancellation + strAbort = "abort"; + + // Install callbacks on deferreds + completeDeferred.add( s.complete ); + jqXHR.done( s.success ); + jqXHR.fail( s.error ); + + // Get transport + transport = inspectPrefiltersOrTransports( transports, s, options, jqXHR ); + + // If no transport, we auto-abort + if ( !transport ) { + done( -1, "No Transport" ); + } else { + jqXHR.readyState = 1; + + // Send global event + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxSend", [ jqXHR, s ] ); + } + + // If request was aborted inside ajaxSend, stop there + if ( completed ) { + return jqXHR; + } + + // Timeout + if ( s.async && s.timeout > 0 ) { + timeoutTimer = window.setTimeout( function() { + jqXHR.abort( "timeout" ); + }, s.timeout ); + } + + try { + completed = false; + transport.send( requestHeaders, done ); + } catch ( e ) { + + // Rethrow post-completion exceptions + if ( completed ) { + throw e; + } + + // Propagate others as results + done( -1, e ); + } + } + + // Callback for when everything is done + function done( status, nativeStatusText, responses, headers ) { + var isSuccess, success, error, response, modified, + statusText = nativeStatusText; + + // Ignore repeat invocations + if ( completed ) { + return; + } + + completed = true; + + // Clear timeout if it exists + if ( timeoutTimer ) { + window.clearTimeout( timeoutTimer ); + } + + // Dereference transport for early garbage collection + // (no matter how long the jqXHR object will be used) + transport = undefined; + + // Cache response headers + responseHeadersString = headers || ""; + + // Set readyState + jqXHR.readyState = status > 0 ? 4 : 0; + + // Determine if successful + isSuccess = status >= 200 && status < 300 || status === 304; + + // Get response data + if ( responses ) { + response = ajaxHandleResponses( s, jqXHR, responses ); + } + + // Use a noop converter for missing script but not if jsonp + if ( !isSuccess && + jQuery.inArray( "script", s.dataTypes ) > -1 && + jQuery.inArray( "json", s.dataTypes ) < 0 ) { + s.converters[ "text script" ] = function() {}; + } + + // Convert no matter what (that way responseXXX fields are always set) + response = ajaxConvert( s, response, jqXHR, isSuccess ); + + // If successful, handle type chaining + if ( isSuccess ) { + + // Set the If-Modified-Since and/or If-None-Match header, if in ifModified mode. + if ( s.ifModified ) { + modified = jqXHR.getResponseHeader( "Last-Modified" ); + if ( modified ) { + jQuery.lastModified[ cacheURL ] = modified; + } + modified = jqXHR.getResponseHeader( "etag" ); + if ( modified ) { + jQuery.etag[ cacheURL ] = modified; + } + } + + // if no content + if ( status === 204 || s.type === "HEAD" ) { + statusText = "nocontent"; + + // if not modified + } else if ( status === 304 ) { + statusText = "notmodified"; + + // If we have data, let's convert it + } else { + statusText = response.state; + success = response.data; + error = response.error; + isSuccess = !error; + } + } else { + + // Extract error from statusText and normalize for non-aborts + error = statusText; + if ( status || !statusText ) { + statusText = "error"; + if ( status < 0 ) { + status = 0; + } + } + } + + // Set data for the fake xhr object + jqXHR.status = status; + jqXHR.statusText = ( nativeStatusText || statusText ) + ""; + + // Success/Error + if ( isSuccess ) { + deferred.resolveWith( callbackContext, [ success, statusText, jqXHR ] ); + } else { + deferred.rejectWith( callbackContext, [ jqXHR, statusText, error ] ); + } + + // Status-dependent callbacks + jqXHR.statusCode( statusCode ); + statusCode = undefined; + + if ( fireGlobals ) { + globalEventContext.trigger( isSuccess ? "ajaxSuccess" : "ajaxError", + [ jqXHR, s, isSuccess ? success : error ] ); + } + + // Complete + completeDeferred.fireWith( callbackContext, [ jqXHR, statusText ] ); + + if ( fireGlobals ) { + globalEventContext.trigger( "ajaxComplete", [ jqXHR, s ] ); + + // Handle the global AJAX counter + if ( !( --jQuery.active ) ) { + jQuery.event.trigger( "ajaxStop" ); + } + } + } + + return jqXHR; + }, + + getJSON: function( url, data, callback ) { + return jQuery.get( url, data, callback, "json" ); + }, + + getScript: function( url, callback ) { + return jQuery.get( url, undefined, callback, "script" ); + } +} ); + +jQuery.each( [ "get", "post" ], function( _i, method ) { + jQuery[ method ] = function( url, data, callback, type ) { + + // Shift arguments if data argument was omitted + if ( isFunction( data ) ) { + type = type || callback; + callback = data; + data = undefined; + } + + // The url can be an options object (which then must have .url) + return jQuery.ajax( jQuery.extend( { + url: url, + type: method, + dataType: type, + data: data, + success: callback + }, jQuery.isPlainObject( url ) && url ) ); + }; +} ); + +jQuery.ajaxPrefilter( function( s ) { + var i; + for ( i in s.headers ) { + if ( i.toLowerCase() === "content-type" ) { + s.contentType = s.headers[ i ] || ""; + } + } +} ); + + +jQuery._evalUrl = function( url, options, doc ) { + return jQuery.ajax( { + url: url, + + // Make this explicit, since user can override this through ajaxSetup (trac-11264) + type: "GET", + dataType: "script", + cache: true, + async: false, + global: false, + + // Only evaluate the response if it is successful (gh-4126) + // dataFilter is not invoked for failure responses, so using it instead + // of the default converter is kludgy but it works. + converters: { + "text script": function() {} + }, + dataFilter: function( response ) { + jQuery.globalEval( response, options, doc ); + } + } ); +}; + + +jQuery.fn.extend( { + wrapAll: function( html ) { + var wrap; + + if ( this[ 0 ] ) { + if ( isFunction( html ) ) { + html = html.call( this[ 0 ] ); + } + + // The elements to wrap the target around + wrap = jQuery( html, this[ 0 ].ownerDocument ).eq( 0 ).clone( true ); + + if ( this[ 0 ].parentNode ) { + wrap.insertBefore( this[ 0 ] ); + } + + wrap.map( function() { + var elem = this; + + while ( elem.firstElementChild ) { + elem = elem.firstElementChild; + } + + return elem; + } ).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( isFunction( html ) ) { + return this.each( function( i ) { + jQuery( this ).wrapInner( html.call( this, i ) ); + } ); + } + + return this.each( function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + } ); + }, + + wrap: function( html ) { + var htmlIsFunction = isFunction( html ); + + return this.each( function( i ) { + jQuery( this ).wrapAll( htmlIsFunction ? html.call( this, i ) : html ); + } ); + }, + + unwrap: function( selector ) { + this.parent( selector ).not( "body" ).each( function() { + jQuery( this ).replaceWith( this.childNodes ); + } ); + return this; + } +} ); + + +jQuery.expr.pseudos.hidden = function( elem ) { + return !jQuery.expr.pseudos.visible( elem ); +}; +jQuery.expr.pseudos.visible = function( elem ) { + return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); +}; + + + + +jQuery.ajaxSettings.xhr = function() { + try { + return new window.XMLHttpRequest(); + } catch ( e ) {} +}; + +var xhrSuccessStatus = { + + // File protocol always yields status code 0, assume 200 + 0: 200, + + // Support: IE <=9 only + // trac-1450: sometimes IE returns 1223 when it should be 204 + 1223: 204 + }, + xhrSupported = jQuery.ajaxSettings.xhr(); + +support.cors = !!xhrSupported && ( "withCredentials" in xhrSupported ); +support.ajax = xhrSupported = !!xhrSupported; + +jQuery.ajaxTransport( function( options ) { + var callback, errorCallback; + + // Cross domain only allowed if supported through XMLHttpRequest + if ( support.cors || xhrSupported && !options.crossDomain ) { + return { + send: function( headers, complete ) { + var i, + xhr = options.xhr(); + + xhr.open( + options.type, + options.url, + options.async, + options.username, + options.password + ); + + // Apply custom fields if provided + if ( options.xhrFields ) { + for ( i in options.xhrFields ) { + xhr[ i ] = options.xhrFields[ i ]; + } + } + + // Override mime type if needed + if ( options.mimeType && xhr.overrideMimeType ) { + xhr.overrideMimeType( options.mimeType ); + } + + // X-Requested-With header + // For cross-domain requests, seeing as conditions for a preflight are + // akin to a jigsaw puzzle, we simply never set it to be sure. + // (it can always be set on a per-request basis or even using ajaxSetup) + // For same-domain requests, won't change header if already provided. + if ( !options.crossDomain && !headers[ "X-Requested-With" ] ) { + headers[ "X-Requested-With" ] = "XMLHttpRequest"; + } + + // Set headers + for ( i in headers ) { + xhr.setRequestHeader( i, headers[ i ] ); + } + + // Callback + callback = function( type ) { + return function() { + if ( callback ) { + callback = errorCallback = xhr.onload = + xhr.onerror = xhr.onabort = xhr.ontimeout = + xhr.onreadystatechange = null; + + if ( type === "abort" ) { + xhr.abort(); + } else if ( type === "error" ) { + + // Support: IE <=9 only + // On a manual native abort, IE9 throws + // errors on any property access that is not readyState + if ( typeof xhr.status !== "number" ) { + complete( 0, "error" ); + } else { + complete( + + // File: protocol always yields status 0; see trac-8605, trac-14207 + xhr.status, + xhr.statusText + ); + } + } else { + complete( + xhrSuccessStatus[ xhr.status ] || xhr.status, + xhr.statusText, + + // Support: IE <=9 only + // IE9 has no XHR2 but throws on binary (trac-11426) + // For XHR2 non-text, let the caller handle it (gh-2498) + ( xhr.responseType || "text" ) !== "text" || + typeof xhr.responseText !== "string" ? + { binary: xhr.response } : + { text: xhr.responseText }, + xhr.getAllResponseHeaders() + ); + } + } + }; + }; + + // Listen to events + xhr.onload = callback(); + errorCallback = xhr.onerror = xhr.ontimeout = callback( "error" ); + + // Support: IE 9 only + // Use onreadystatechange to replace onabort + // to handle uncaught aborts + if ( xhr.onabort !== undefined ) { + xhr.onabort = errorCallback; + } else { + xhr.onreadystatechange = function() { + + // Check readyState before timeout as it changes + if ( xhr.readyState === 4 ) { + + // Allow onerror to be called first, + // but that will not handle a native abort + // Also, save errorCallback to a variable + // as xhr.onerror cannot be accessed + window.setTimeout( function() { + if ( callback ) { + errorCallback(); + } + } ); + } + }; + } + + // Create the abort callback + callback = callback( "abort" ); + + try { + + // Do send the request (this may raise an exception) + xhr.send( options.hasContent && options.data || null ); + } catch ( e ) { + + // trac-14683: Only rethrow if this hasn't been notified as an error yet + if ( callback ) { + throw e; + } + } + }, + + abort: function() { + if ( callback ) { + callback(); + } + } + }; + } +} ); + + + + +// Prevent auto-execution of scripts when no explicit dataType was provided (See gh-2432) +jQuery.ajaxPrefilter( function( s ) { + if ( s.crossDomain ) { + s.contents.script = false; + } +} ); + +// Install script dataType +jQuery.ajaxSetup( { + accepts: { + script: "text/javascript, application/javascript, " + + "application/ecmascript, application/x-ecmascript" + }, + contents: { + script: /\b(?:java|ecma)script\b/ + }, + converters: { + "text script": function( text ) { + jQuery.globalEval( text ); + return text; + } + } +} ); + +// Handle cache's special case and crossDomain +jQuery.ajaxPrefilter( "script", function( s ) { + if ( s.cache === undefined ) { + s.cache = false; + } + if ( s.crossDomain ) { + s.type = "GET"; + } +} ); + +// Bind script tag hack transport +jQuery.ajaxTransport( "script", function( s ) { + + // This transport only deals with cross domain or forced-by-attrs requests + if ( s.crossDomain || s.scriptAttrs ) { + var script, callback; + return { + send: function( _, complete ) { + script = jQuery( "