/*! For license information please see application-ea2459df209564b9157b.js.LICENSE.txt */ var Danbooru;!function(){var t,e={42:function(t,e,n){"use strict";n.r(e);var r=n(5520),i=n(8980),o=n(1190);function a(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return s(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?s(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){c=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(c)throw o}}}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n0)}))},undo_selected:function(t){t.preventDefault(),c.updated=0;var e,n=$(".post-version-select:checked").parents(".post-version"),i=a(n);try{var s=function(){var t=e.value,i=$(t).data("post-version-id");o.default.add(function(){$.ajax("/post_versions/".concat(i,"/undo.json"),{method:"PUT"}),r.default.notice("".concat(++c.updated,"/").concat(n.length," changes undone."))},{name:"PostVersion.undo_selected"})};for(i.s();!(e=i.n()).done;)s()}catch(l){i.e(l)}finally{i.f()}},tag_script_selected:function(t){t.preventDefault(),c.updated=0;var e=$(".post-version-select:checked").parents(".post-version"),n=$("#update-tag-script").val();if(n){var s,l=a(e);try{var u=function(){var t=s.value,a=$(t).data("post-id");o.default.add(function(){i.default.tagScript(a,n),r.default.notice("".concat(++c.updated,"/").concat(e.length," changes applied."))},{name:"PostVersion.tag_script_selected"})};for(l.s();!(s=l.n()).done;)u()}catch(d){l.e(d)}finally{l.f()}}}};$(function(){return c.initialize_all()}),e.default=c},49:function(t,e,n){"use strict";t.exports=n.p+"static/gelbooru.com-7bc10d9e0b861a2f22df.png"},115:function(t,e,n){"use strict";t.exports=n.p+"static/3-066ff70a2884d45e98cb.png"},278:function(t,e,n){"use strict";t.exports=n.p+"static/skeb.jp-7e4dace572d6e61cbc7a.png"},298:function(t,e,n){"use strict";t.exports=n.p+"static/download-preview-38b177d3534d239cecbc.png"},445:function(t,e,n){"use strict";t.exports=n.p+"static/deleted-preview-1f04ff76dc6e262cbfc1.png"},452:function(t,e,n){var r={"./blacklisted-preview.png":2836,"./blank.png":3471,"./counter/0.png":4360,"./counter/1.png":5489,"./counter/2.png":4906,"./counter/3.png":115,"./counter/4.png":5244,"./counter/5.png":1781,"./counter/6.png":7774,"./counter/7.png":6999,"./counter/8.png":3440,"./counter/9.png":9689,"./deleted-preview.png":445,"./download-preview.png":298,"./favicons/4chan.org.png":5599,"./favicons/aethy.com.png":837,"./favicons/agn.ph.png":8259,"./favicons/amazonaws.com.png":9169,"./favicons/archiveofourown.org.png":4344,"./favicons/artconomy.com.png":2924,"./favicons/artfight.net.png":9155,"./favicons/artstation.com.png":8935,"./favicons/aryion.com.png":8778,"./favicons/blogspot.com.png":3038,"./favicons/boosty.to.png":6e3,"./favicons/bsky.app.png":5377,"./favicons/buymeacoffee.com.png":4753,"./favicons/carrd.co.png":8303,"./favicons/catarchive.booru.org.png":8304,"./favicons/catbox.moe.png":3503,"./favicons/chakatsden.com.png":2864,"./favicons/cohost.org.png":6700,"./favicons/commishes.com.png":3614,"./favicons/curiouscat.me.png":2873,"./favicons/danbooru.donmai.us.png":7369,"./favicons/derpibooru.org.png":2404,"./favicons/desuarchive.org.png":1950,"./favicons/deviantart.com.png":3850,"./favicons/discord.com.png":4714,"./favicons/drive.google.com.png":3257,"./favicons/dropbox.com.png":5923,"./favicons/e-hentai.org.png":9368,"./favicons/e621.net.png":906,"./favicons/etsy.com.png":8997,"./favicons/f-list.net.png":995,"./favicons/facebook.com.png":2838,"./favicons/fanbox.cc.png":2941,"./favicons/fandom.com.png":5775,"./favicons/fiverr.com.png":9718,"./favicons/fluffy-community.com.png":9982,"./favicons/furaffinity.net.png":7915,"./favicons/furbooru.org.png":8397,"./favicons/furrynetwork.com.png":472,"./favicons/furrystation.com.png":7170,"./favicons/gelbooru.com.png":49,"./favicons/gumroad.com.png":6541,"./favicons/hentai-foundry.com.png":1975,"./favicons/hiccears.com.png":2790,"./favicons/img.booru.org.png":7959,"./favicons/imgbb.com.png":651,"./favicons/imgur.com.png":6470,"./favicons/inkbunny.net.png":7352,"./favicons/instagram.com.png":6686,"./favicons/itaku.ee.png":7923,"./favicons/itch.io.png":4479,"./favicons/knowyourmeme.com.png":3334,"./favicons/ko-fi.com.png":4026,"./favicons/linktr.ee.png":6933,"./favicons/mastodon.social.png":6687,"./favicons/mega.nz.png":8147,"./favicons/neocities.org.png":6484,"./favicons/newgrounds.com.png":8244,"./favicons/nijie.info.png":742,"./favicons/onedrive.live.com.png":2190,"./favicons/patreon.com.png":753,"./favicons/pawoo.net.png":8110,"./favicons/picarto.tv.png":7857,"./favicons/piczel.tv.png":1248,"./favicons/pillowfort.social.png":5264,"./favicons/pixiv.net.png":4398,"./favicons/plurk.com.png":8106,"./favicons/pornhub.com.png":3018,"./favicons/privatter.net.png":497,"./favicons/redbubble.com.png":597,"./favicons/reddit.com.png":4238,"./favicons/redgifs.com.png":6054,"./favicons/rule34.paheal.net.png":7712,"./favicons/rule34.xxx.png":9030,"./favicons/skeb.jp.png":278,"./favicons/snootbooru.com.png":8736,"./favicons/sofurry.com.png":9748,"./favicons/steamcommunity.com.png":8893,"./favicons/subscribestar.adult.png":7513,"./favicons/t.me.png":9063,"./favicons/the-collection.booru.org.png":1536,"./favicons/tiktok.com.png":824,"./favicons/toyhou.se.png":7154,"./favicons/trashdump.booru.org.png":8490,"./favicons/trello.com.png":460,"./favicons/tumbex.com.png":2525,"./favicons/tumblr.com.png":1736,"./favicons/twitch.tv.png":6144,"./favicons/twitter.com.png":5483,"./favicons/u18chan.com.png":9996,"./favicons/vk.com.png":9519,"./favicons/weasyl.com.png":7413,"./favicons/web.archive.org.png":689,"./favicons/webtoons.com.png":8723,"./favicons/weibo.com.png":542,"./favicons/wikimedia.org.png":6235,"./favicons/wordpress.com.png":9027,"./favicons/yiff.life.png":1177,"./favicons/youtube.com.png":1457,"./favicons/zoo.booru.org.png":8198,"./github-logo.svg":825,"./logo/ace.svg":3263,"./logo/aro.svg":4554,"./logo/bi.svg":6909,"./logo/default.svg":6601,"./logo/default_bloodlust.svg":2728,"./logo/default_pony.svg":4220,"./logo/french.svg":1834,"./logo/gay.svg":9351,"./logo/genderfluid.svg":2991,"./logo/lesbian.svg":6044,"./logo/nonbinary.svg":5680,"./logo/omni.svg":6853,"./logo/pan.svg":5151,"./logo/pride.svg":712,"./logo/trans.svg":2520,"./main-logo.png":9752,"./ss_logotype.png":5441,"./themes/extras/aurora.png":5806,"./themes/extras/blood.png":7720,"./themes/extras/hex.png":9275,"./themes/extras/leaves_bottom.png":8854,"./themes/extras/snow_bottom.png":9201,"./themes/extras/snow_top.png":9947,"./themes/extras/space.png":9730,"./themes/extras/spring_bottom.png":6783,"./themes/extras/spring_bottom_fennec.png":9131,"./themes/extras/spring_bottom_fox.png":8989,"./themes/extras/spring_top.png":4677,"./themes/extras/spring_top_sky.png":1783,"./themes/extras/stars.png":3187,"./themes/hexagon/background-bright.png":2566,"./themes/hexagon/background.png":9415,"./thumb-preview.png":8666};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=452},460:function(t,e,n){"use strict";t.exports=n.p+"static/trello.com-d16684ce7d0b61c3f8cb.png"},472:function(t,e,n){"use strict";t.exports=n.p+"static/furrynetwork.com-76f637e84bf203f9c958.png"},497:function(t,e,n){"use strict";t.exports=n.p+"static/privatter.net-acf5bf503e77a1dd6641.png"},542:function(t,e,n){"use strict";t.exports=n.p+"static/weibo.com-cdcc967c82b5087ed775.png"},597:function(t,e,n){"use strict";t.exports=n.p+"static/redbubble.com-749f572d89d54ebc6660.png"},621:function(t,e,n){"use strict";function r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||i(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){if(t){if("string"==typeof t)return o(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}(arguments.length>1&&void 0!==arguments[1]?arguments[1]:[]);try{for(n.s();!(e=n.n()).done;){var r=e.value;a.bootstrap(t,r,t[r][0],t[r][1])}}catch(o){n.e(o)}finally{n.f()}},a.bootstrapMany=function(t){for(var e=0,n=Object.entries(t);e',italic:'',strikethrough:'',underline:'',heading:'',spoiler:'',code:'',quote:'',menu:''},(a=i(a="ICONS"))in o?Object.defineProperty(o,a,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[a]=s},712:function(t,e,n){"use strict";t.exports=n.p+"static/pride-0262da7916118357d1e8.svg"},742:function(t,e,n){"use strict";t.exports=n.p+"static/nijie.info-ef7ee74d0a1e5ef91592.png"},749:function(t,e,n){"use strict";n.r(e);var r=n(4596),i={init:function(){var t=$("#home-search-form"),e=$("#tags"),n=!e.val(),r=n;n&&t.addClass("empty"),e.on("input",function(){r=n,(n=!e.val())&&!r?t.addClass("empty"):!n&&r&&t.removeClass("empty")}),$(".home-buttons a").on("click",function(r){if(!n){r.preventDefault();var i=$(r.currentTarget).attr("tags");return i&&e.val(function(t,e){return e+" "+i}),t.trigger("submit"),!1}})}};$(function(){r.default.matches("static","home")&&i.init()}),e.default=i},753:function(t,e,n){"use strict";t.exports=n.p+"static/patreon.com-2e6dd6d6d2bbd9d154e7.png"},802:function(){function t(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==r.return||r.return()}finally{if(c)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return r(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(t,e):void 0}}function r(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n form"),n=new URLSearchParams(window.location.search);function r(){e.querySelectorAll("[data-dynamic-field]").forEach(function(t){return t.remove()});var r=t.selectedOptions[0].dataset.fields;r&&r.split(",").forEach(function(e){var r=function(t){var e=document.createElement("div");e.classList.add("input","string","optional","search_".concat(t)),e.dataset.dynamicField="true";var r=document.createElement("label");r.textContent=t.replace(/_/g," ").replace(/\b\w/g,function(t){return t.toUpperCase()}),r.setAttribute("for","search_".concat(t));var i=document.createElement("input");return i.name="search[".concat(t,"]"),i.id="search_".concat(t),i.type="text",n.has("search[".concat(t,"]"))&&(i.value=n.get("search[".concat(t,"]"))),e.appendChild(r),e.appendChild(i),e}(e);t.parentElement.insertAdjacentElement("afterend",r)})}t&&e&&(t.addEventListener("change",r),r())}};$(document).ready(function(){return r.init()}),e.default=r},906:function(t,e,n){"use strict";t.exports=n.p+"static/e621.net-bab9658c7eb1aed0309e.png"},956:function(t,e,n){"use strict";n.r(e);var r=n(5520),i=n(7247),o={atme:function(t){t.preventDefault();var e=$(t.target).parents("article.blip"),n=e.data("creator"),r=e.data("blip-id");$("#blip_body_for_")[0].value+="@"+String(n||"").replace(/ /g,"_")+": ",$("#blip_body_for_")[0].focus(),$("#blip_response_to")[0].value=r},quote:function(t){t.preventDefault();var e=$(t.target).parents("article.blip"),n=e.data("blip-id");$.ajax({url:"/blips/".concat(n,".json"),type:"GET",dataType:"json",accept:"text/javascript"}).done(function(t){var r=$("#blip_body_for_");i.default.processQuote(r,t.body,e.data("creator"),e.data("creator-id")),r.selectEnd(),$("#blip_response_to")[0].value=n}).fail(function(t){r.default.error(t.responseText)})},initialize_all:function(){$("#c-blips").length&&($(".blip-atme-link").on("click",o.atme),$(".blip-reply-link").on("click",o.quote))},reinitialize_all:function(){$("#c-blips").length&&($(".blip-atme-link").off("click"),$(".blip-reply-link").off("click"),o.initialize_all())}};$(function(){o.initialize_all()}),e.default=o},983:function(t,e,n){var r={"./Favorite.js":4947,"./Filter.js":9309,"./PostCache.js":9855,"./PostVote.js":6977,"./User.js":3296,"src/javascripts/models/Favorite.js":4947,"src/javascripts/models/Filter.js":9309,"src/javascripts/models/PostCache.js":9855,"src/javascripts/models/PostVote.js":6977,"src/javascripts/models/User.js":3296};function i(t){var e=o(t);return n(e)}function o(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=o,t.exports=i,i.id=983},995:function(t,e,n){"use strict";t.exports=n.p+"static/f-list.net-9ab73ab4e4284429fd4d.png"},1028:function(t,e,n){"use strict";n.r(e);var r=n(7742),i={initialize:function(){if($("#news").length){var t=parseInt($("#news").data("id"),10),e=!1;$("#news-header, #news-show").on("click",function(t){return t.preventDefault(),e=!e,$("#news").toggleClass("open",e),$("#news-show").text(e?"Hide":"Show"),!1}),$("#news-dismiss").on("click",function(e){return e.preventDefault(),$("#news").hide(),r.default.Site.NewsID=t,!1}),r.default.Site.NewsID=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,o=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw o}}}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n").attr("src",d.preview_url).appendTo(l.find("span.avatar-image")),l.hasClass("profile-avatar")&&l.attr("href","/posts/"+u))}}}catch(x){s.e(x)}finally{s.f()}var f,p=o(n);try{for(p.s();!(f=p.n()).done;){var h=f.value,g=$(h),v=g.hasClass("profile-avatar");v&&g.removeClass("placeholder").children(".placeholder").removeClass("placeholder");var m=g.data("id");if(m){var b=e[m];if(!b||v&&!b.preview_url)_(g,v);else{i.default.fromDeferredPosts(m,b);var y=(v?g:$("
")).addClass("post-thumbnail").toggleClass("dtext",g.hasClass("thumb-placeholder-link"));for(var w in Danbooru.Blacklist.hiddenPosts.has(m)&&y.addClass("blacklisted"),b)y.attr("data-"+w.replace(/_/g,"-"),b[w]);var k=v?g.children("a").first():$("").appendTo(y);k.attr("href","/posts/".concat(b.id)),$("").attr({src:b.preview_url||"/images/deleted-preview.png",title:"Rating: ".concat(b.rating,"\r\nID: ").concat(b.id,"\r\nStatus: ").concat(b.flags,"\r\nDate: ").concat(b.created_at,"\r\n\r\n").concat(b.tags),alt:b.tags,class:"post-thumbnail-img"}).appendTo(v?k.children(".avatar-image").first():k),v||g.replaceWith(y),a.push(y)}}else _(g,v)}}catch(x){p.e(x)}finally{p.f()}function _(t,e){t.hasClass("thumb-placeholder-link")?t.removeClass("thumb-placeholder-link"):e||t.empty()}a.length>0&&(r.default.add_posts(a),r.default.update_styles(),r.default.update_visibility())}};$(function(){s.initialize(),$(window).on("e621:add_deferred_posts",function(t,e){window.___deferred_posts=window.___deferred_posts||{},window.___deferred_posts=$.extend(window.___deferred_posts,e),s.initialize()}),$(document).on("thumbnails:apply",s.initialize)}),e.default=s},1177:function(t,e,n){"use strict";t.exports=n.p+"static/yiff.life-72014663c02c61985d62.png"},1190:function(t,e,n){"use strict";function r(){var t,e,n="function"==typeof Symbol?Symbol:{},o=n.iterator||"@@iterator",a=n.toStringTag||"@@toStringTag";function s(n,r,o,a){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return i(u,"_invoke",function(n,r,i){var o,a,s,l=0,u=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,a=0,s=t,f.n=n,c}};function p(n,r){for(a=n,s=r,e=0;!d&&l&&!i&&e3?(i=h===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&pr||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return c;throw d=!0,r}return function(i,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),a=u,s=h;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(l=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(e){o=t,a=1,s=e}finally{l=1}}return{value:e,done:d}}}(n,o,a),!0),u}var c={};function l(){}function u(){}function d(){}e=Object.getPrototypeOf;var f=[][o]?e(e([][o]())):(i(e={},o,function(){return this}),e),p=d.prototype=l.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,i(t,a,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,i(p,"constructor",d),i(d,"constructor",u),u.displayName="GeneratorFunction",i(d,a,"GeneratorFunction"),i(p),i(p,a,"Generator"),i(p,o,function(){return this}),i(p,"toString",function(){return"[object Generator]"}),(r=function(){return{w:s,m:h}})()}function i(t,e,n,r){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}i=function(t,e,n,r){function a(e,n){i(t,e,function(t){return this._invoke(e,n,t)})}e?o?o(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(a("next",0),a("throw",1),a("return",2))},i(t,e,n,r)}function o(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function a(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{};if("function"!==typeof t)throw new Error("Task must be a function");var r=n.delay,i=void 0===r?1e3:r,o=n.priority,a=void 0!==o&&o,s=n.name,c=void 0===s?null:s;if("number"!==typeof i||i<0)throw new Error("Delay must be a non-negative number");i<500&&(i=500);var l=new Promise(function(n,r){var o={task:t,resolve:n,reject:r,delay:i,name:c};a?e._queue.unshift(o):e._queue.push(o)});return this._run(),l}},{key:"_run",value:(i=r().m(function t(){var e,n,i,o,a,s,c,l;return r().w(function(t){for(;;)switch(t.p=t.n){case 0:if(!this._running&&0!==this._queue.length){t.n=1;break}return t.a(2);case 1:this._running=!0,e=0,t.p=2;case 3:if(!(this._queue.length>0&&this._running)){t.n=11;break}return t.n=4,this.sleep(e);case 4:if(this._running&&0!==this._queue.length){t.n=5;break}return t.a(3,11);case 5:if(n=this._queue.shift(),i=n.task,o=n.resolve,a=n.reject,s=n.delay,e=s,t.p=6,"function"===typeof i){t.n=7;break}throw new Error("Invalid task: not a function");case 7:return t.n=8,i();case 8:c=t.v,o(c),t.n=10;break;case 9:t.p=9,l=t.v,console.log("Task failed:",l),a(l);case 10:t.n=3;break;case 11:return t.p=11,this._running=!1,t.f(11);case 12:return t.a(2)}},t,this,[[6,9],[2,,11,12]])}),s=function(){var t=this,e=arguments;return new Promise(function(n,r){var a=i.apply(t,e);function s(t){o(a,n,r,s,c,"next",t)}function c(t){o(a,n,r,s,c,"throw",t)}s(void 0)})},function(){return s.apply(this,arguments)})},{key:"sleep",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e3;if("number"!==typeof t||t<0)throw new Error("Sleep duration must be a non-negative number");return 0===t?Promise.resolve():new Promise(function(e){return setTimeout(e,t)})}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Queue cleared";this._running=!1,this._queue.forEach(function(e){(0,e.reject)(new Error(t))}),this._queue=[]}},{key:"cancel",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"Task cancelled";if(null===t||void 0===t)return 0;var n=0;return this._queue=this._queue.filter(function(r){var i=r.name,o=r.reject;return i!==t||(o(new Error(e)),n++,!1)}),n}},{key:"length",get:function(){return this._queue.length}},{key:"isRunning",get:function(){return this._running}},{key:"pending",get:function(){return this._queue.map(function(t,e){var n=t.delay;return{index:e,name:t.name,delay:n}})}}],e&&a(t.prototype,e),n&&a(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,i,s}();s(l,"_queue",[]),s(l,"_running",!1)},1248:function(t,e,n){"use strict";t.exports=n.p+"static/piczel.tv-794181f65c5a1c7cb18d.png"},1436:function(t,e,n){"use strict";n.r(e);var r=n(6672),i={init:function(){var t=$("html"),e=$(".simple-avatar-menu");$("#nav-toggle, .nav-offset-left, .nav-offset-bott").on("click",function(n){n.preventDefault(),t.toggleClass("nav-toggled"),e.addClass("hidden")});var n=null;$(".simple-avatar").on("click",function(i){i.preventDefault(),null===n&&(n=r.default.register(".simple-avatar",".simple-avatar-menu",function(){e.addClass("hidden")})),n.disabled=!n.disabled,e.toggleClass("hidden",n.disabled),t.removeClass("nav-toggled")})}};$(function(){$("nav.navigation").length&&i.init()}),e.default=i},1457:function(t,e,n){"use strict";t.exports=n.p+"static/youtube.com-ee07f798f3c9a560881b.png"},1536:function(t,e,n){"use strict";t.exports=n.p+"static/the-collection.booru.org-dfcc3af708b65be0ea47.png"},1728:function(t,e,n){"use strict";n.r(e);var r=n(5520),i={put:function(t,e,n){var i="";if("session"!==n){n||(n=365);var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="expires="+o.toGMTString()+"; "}var a=t+"="+encodeURIComponent(e)+"; "+i+"path=/; SameSite=Lax";return document.cookie.length<4090-a.length?(document.cookie=a,!0):(r.default.error("You have too many cookies on this site. Consider deleting them all."),!1)},raw_get:function(t){for(var e=t+"=",n=document.cookie.split(";"),r=0;r=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function g(t,e){if(t){if("string"==typeof t)return v(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?v(t,e):void 0}}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n400?400:e,height:n>400?400:n}),$("#blacklist-cancel").on("click",function(){m.dialog.close()}),$("#blacklist-save").on("click",function(){var t=$("#blacklist-edit").val().split(/\n\r?/);o.default.blacklist.tags=t,o.default.saveBlacklist(),$("li.tag-list-item.blacklisted").removeClass("blacklisted");var e,n=h(o.default.blacklist.tags);try{for(n.s();!(e=n.n()).done;){var r=e.value;!r.includes(" ")&&m.tag_list_cache[r]&&m.tag_list_cache[r].addClass("blacklisted")}}catch(i){n.e(i)}finally{n.f()}}),$("#blacklist-edit-link").on("click",function(t){t.preventDefault(),$("#blacklist-edit").val(o.default.blacklist.tags.join("\n")),m.dialog.open()})}},m.init_reveal_on_click=function(){if($("#c-posts #a-show").length)var t=$("#image-container").off("click.blacklist").on("click.blacklist",function(){t.hasClass("blacklisted")&&(t.removeClass("blacklisted"),$("#note-container").css("visibility","visible"))})},m.regenerate_filters=function(){m.filters={};var t,e=h(o.default.blacklist.tags);try{for(e.s();!(t=e.n()).done;){var n=t.value,i=r.default.create(n);i&&(m.filters[i.text]=i)}}catch(d){e.e(d)}finally{e.f()}var a,s=Object.keys(m.filters),c=h(l.default.Blacklist.FilterState);try{for(c.s();!(a=c.n()).done;){var u=a.value;s.includes(u)||l.default.Blacklist.FilterState.delete(u)}}catch(d){c.e(d)}finally{c.f()}},m.init_comment_blacklist=function(){if("true"===a.default.meta("blacklist-users"))for(var t=0,e=Object.values(m.filters);t0,m.init_blacklist_editor(),m.init_reveal_on_click(),m.regenerate_filters(),m.add_posts($(".blacklistable")),m.update_styles(),m.update_visibility(),$("#blacklisted-hider").remove(),m.init_comment_blacklist(),m.init_blacklist_toggles(),m.init_quick_blacklist(),c.default.matches("posts","show"))var t=$("#image-container[data-file-ext='mp4'], #image-container[data-file-ext='webm']").on("blk:hide",function(){var e=t.find("video");e.length&&e[0].pause()})});var b=function(){return t=function t(e){var n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.$element=e,this.$counter=e.find(".blacklisted-count"),this.post=parseInt(e.attr("post")),this.hasPost=!Number.isNaN(this.post),e.attr("collapsed",l.default.Blacklist.Collapsed).find(".blacklist-header").on("click",function(){var t="true"!==n.$element.attr("collapsed");n.$element.attr("collapsed",t),l.default.Blacklist.Collapsed=t}),this.$toggle=e.find(".blacklist-toggle-all").text("Disable All Filters").on("click",function(){if("true"==n.$toggle.attr("is-enabling")){for(var t=0,e=Object.values(m.filters);t").attr("enabled",s.enabled).on("click",function(){s.enabled=!s.enabled}).appendTo(t.$container),l=$("").attr("href","/posts?tags="+encodeURIComponent(a)).html(a.replace(/_/g,"​_").replace(/ -/," ‑")).on("click",function(t){t.preventDefault()}).appendTo(c);$("").text(s.matchIDs.size).appendTo(l)},i=0,o=Object.entries(m.filters);i0)}}])&&d(t.prototype,e),n&&d(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();e.default=m},2388:function(t,e,n){"use strict";n.r(e);var r=n(7742),i=n(4596),o={current:0,showMascot:function(t){var e=$("body").css({"--bg-image":'url("'.concat(t.background_url,'")'),"--bg-color":t.background_color,"--fg-color":t.foreground_color});t.is_layered?e.attr("layered","true"):e.removeAttr("layered"),$("#mascot-artist").text("Mascot by ").append($("").text(t.artist_name).attr("href",t.artist_url))},changeMascot:function(t){t.preventDefault();var e=window.mascots,n=Object.keys(e),i=n.indexOf(o.current+"");o.current=n[(i+1)%n.length],o.showMascot(e[o.current]),r.default.Site.Mascot=o.current},initMascots:function(){var t=window.mascots;if(o.current=r.default.Site.Mascot,!t[o.current]){var e=Object.keys(t),n=Math.floor(Math.random()*e.length);o.current=e[n]}o.showMascot(t[o.current]),$("#mascot-swap").on("click",o.changeMascot)}};$(function(){i.default.matches("static","home")&&o.initMascots()}),e.default=o},2404:function(t,e,n){"use strict";t.exports=n.p+"static/derpibooru.org-506336e513573044bd0b.png"},2432:function(t,e,n){"use strict";function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n3?(i=h===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&pr||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return c;throw d=!0,r}return function(i,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),a=u,s=h;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(l=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(e){o=t,a=1,s=e}finally{l=1}}return{value:e,done:d}}}(n,i,o),!0),u}var c={};function l(){}function u(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),p=d.prototype=l.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,a(p,"constructor",d),a(d,"constructor",u),u.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(p),a(p,i,"Generator"),a(p,r,function(){return this}),a(p,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:h}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function c(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){s(o,r,i,a,c,"next",t)}function c(t){s(o,r,i,a,c,"throw",t)}a(void 0)})}}n.r(e);var l={baseURL:"",wrapper:null,manifest:[],page:0};l.initialize=c(o().m(function t(){var e,n,r,i;return o().w(function(t){for(;;)switch(t.n){case 0:return l.baseURL=window.furidURL,l.wrapper=$("#a-furid"),t.n=1,fetch(l.baseURL+"manifest.json");case 1:return e=t.v,t.n=2,e.json();case 2:for(n=t.v,l.manifest=[],l.page=0,r=0;r").attr({src:l.baseURL+e,loading:"lazy"}).appendTo(l.wrapper).one("error",function(){n.remove()})};for(e.s();!(t=e.n()).done;)n()}catch(i){e.e(i)}finally{e.f()}l.page++}},e.default=l},2472:function(t,e,n){"use strict";n.r(e);var r=n(5520),i={destroy:function(t){r.default.notice("Deleting takedown #"+t+"..."),$.ajax({url:"/takedown/destroy.json",type:"POST",dataType:"json",headers:{accept:"text/javascript"},data:{id:t}}).done(function(){r.default.notice("Takedown deleted"),$("#takedown-"+t).fadeOut("fast")}).fail(function(t){r.default.error(t.responseText)})},add_posts_by_tags_preview:function(t){var e=$("#takedown-add-posts-tags").val();$.ajax({url:"/takedowns/count_matching_posts.json",type:"POST",dataType:"json",headers:{accept:"text/javascript"},data:{id:t,post_tags:e}}).done(function(t){var n=t.matched_post_count,r=""+n+" "+(1==n?"post":"posts")+" "+(1==n?"matches":"match")+" the search '"+e+"'. Click Confirm to add "+(1==n?"it":"them")+" to the takedown.";$("#takedown-add-posts-tags-warning").html(r).show(),$("#takedown-add-posts-tags").prop("disabled",!0),$("#takedown-add-posts-tags-preview").hide(),$("#takedown-add-posts-tags-confirm").css("display","inline-block"),$("#takedown-add-posts-tags-cancel").css("display","inline-block")}).fail(function(t){r.default.error(t.responseText)})},add_posts_by_tags_cancel:function(){$("#takedown-add-posts-tags-warning").hide(),$("#takedown-add-posts-tags").val("").prop("disabled",!1),$("#takedown-add-posts-tags-preview").show().prop("disabled",!0),$("#takedown-add-posts-tags-confirm").hide(),$("#takedown-add-posts-tags-cancel").hide()},add_posts_by_tags:function(t){event.preventDefault();var e=$("#takedown-add-posts-tags").val();r.default.notice("Adding posts with tags '"+e+"' to takedown..."),$.ajax({url:"/takedowns/".concat(t,"/add_by_tags.json"),type:"POST",dataType:"json",headers:{accept:"text/javascript"},data:{id:t,post_tags:e}}).done(function(t){var n=t.added_post_ids,o=n.length;r.default.notice(o+" post"+(1==o?"":"s")+" with tags '"+e+"' added to takedown");for(var a=0;a post #"+t+"
"}};$(document).ready(function(){$("#takedown-add-posts-ids-submit").on("click",function(t){var e=$(t.target);i.add_posts_by_ids(e.data("tid"))}),$("#takedown-add-posts-tags-cancel").on("click",function(){i.add_posts_by_tags_cancel()}),$("#takedown-add-posts-tags-confirm").on("click",function(t){var e=$(t.target);i.add_posts_by_tags(e.data("tid"))}),$("#takedown-add-posts-tags-preview").on("click",function(t){var e=$(t.target);i.add_posts_by_tags_preview(e.data("tid"))})}),e.default=i},2520:function(t,e,n){"use strict";t.exports=n.p+"static/trans-760cc53b9728625c0e37.svg"},2525:function(t,e,n){"use strict";t.exports=n.p+"static/tumbex.com-1cb2dda472127098a49a.png"},2566:function(t,e,n){"use strict";t.exports=n.p+"static/background-bright-bbf4af533456131bea3c.png"},2689:function(t,e,n){"use strict";n.r(e);var r=n(5520),i=n(7247),o={initialize_all:function(){$("#c-forum-topics #a-show,#c-forum-posts #a-show").length&&($(".edit_forum_post_link").on("click.danbooru",function(t){var e=$(this).attr("id").match(/^edit_forum_post_link_(\d+)$/)[1];$("#edit_forum_post_"+e).fadeToggle("fast"),t.preventDefault()}),$(".edit_forum_topic_link").on("click.danbooru",function(t){var e=$(this).attr("id").match(/^edit_forum_topic_link_(\d+)$/)[1];$("#edit_forum_topic_"+e).fadeToggle("fast"),t.preventDefault()}),$(".forum-post-reply-link").on("click",o.quote),$(".forum-post-hide-link").on("click",o.hide),$(".forum-post-unhide-link").on("click",o.unhide),$(".forum-vote-up").on("click",function(t){return o.vote(t,1)}),$(".forum-vote-meh").on("click",function(t){return o.vote(t,0)}),$(".forum-vote-down").on("click",function(t){return o.vote(t,-1)}),$(document).on("click",".forum-vote-remove",o.vote_remove))},reinitialize_all:function(){$("#c-forum-topics #a-show,#c-forum-posts #a-show").length&&($(".edit_forum_post_link").off("click.danbooru"),$(".edit_forum_topic_link").off("click.danbooru"),$(".forum-post-reply-link").off("click"),$(".forum-post-hide-link").off("click"),$(".forum-post-unhide-link").off("click"),$(".forum-vote-up").off("click"),$(".forum-vote-meh").off("click"),$(".forum-vote-down").off("click"),$(document).off("click",".forum-vote-remove"),this.initialize_all())}};o.vote=function(t,e){t.preventDefault();var n=$(t.currentTarget).data("forum-id");$.ajax({url:"/forum_posts/".concat(n,"/votes.json"),type:"POST",dataType:"json",accept:"text/javascript",data:{"forum_post_vote[score]":e}}).done(function(t){var e,r,i,o,a;e=t,r={1:{fa_class:"fa-thumbs-up",e6_class:"up"},0:{fa_class:"fa-face-meh",e6_class:"meh"},"-1":{fa_class:"fa-thumbs-down",e6_class:"down"}},i=$("").attr("href","#").attr("data-forum-id",e.forum_post_id).addClass("forum-vote-remove").append($("").addClass("fa-regular").addClass(r[e.score.toString()].fa_class)),o=$("").attr("href","/users/".concat(e.creator_id)).text(e.creator_name),(a=$("
  • ").addClass("vote-score-".concat(r[e.score].e6_class)).addClass("own-forum-vote")).append(i).append(" ").append(o),$("#forum-post-votes-for-".concat(e.forum_post_id)).prepend(a),$("#forum-post-votes-for-".concat(n," .forum-post-vote-block")).hide()}).fail(function(t){var e;null!==t&&void 0!==t&&null!==(e=t.responseJSON)&&void 0!==e&&e.reason?r.default.error(t.responseJSON.reason):r.default.error("Failed to vote on forum post.")})},o.vote_remove=function(t){t.preventDefault();var e=$(t.currentTarget).data("forum-id");$.ajax({url:"/forum_posts/".concat(e,"/votes.json"),type:"DELETE",dataType:"json",accept:"text/javascript"}).done(function(){$(t.target).parents(".own-forum-vote").remove(),$("#forum-post-votes-for-".concat(e," .forum-post-vote-block")).show(),r.default.notice("Vote removed.")}).fail(function(){r.default.error("Failed to unvote on forum post.")})},o.quote=function(t){t.preventDefault();var e=$(t.target).parents("article.forum-post"),n=e.data("forum-post-id");$.ajax({url:"/forum_posts/".concat(n,".json"),type:"GET",dataType:"json",accept:"text/javascript"}).done(function(t){var n=$("#forum_post_body_for_");i.default.processQuote(n,t.body,e.data("creator"),e.data("creator-id")),n.selectEnd(),$("#topic-response").show(),setTimeout(function(){$("#topic-response")[0].scrollIntoView()},15)}).fail(function(t){r.default.error(t.responseText)})},o.hide=function(t){if(t.preventDefault(),confirm("Are you sure you want to hide this post?")){var e=$(t.target).parents("article.forum-post").data("forum-post-id");$.ajax({url:"/forum_posts/".concat(e,"/hide.json"),type:"POST",dataType:"json"}).done(function(){$('.forum-post[data-forum-post-id="'.concat(e,'"] div.author h4')).append(" (hidden)"),$('.forum-post[data-forum-post-id="'.concat(e,'"]')).attr("data-is-hidden","true")}).fail(function(){r.default.error("Failed to hide post.")})}},o.unhide=function(t){if(t.preventDefault(),confirm("Are you sure you want to unhide this post?")){var e=$(t.target).parents("article.forum-post").data("forum-post-id");$.ajax({url:"/forum_posts/".concat(e,"/unhide.json"),type:"POST",dataType:"json"}).done(function(){var t=$('.forum-post[data-forum-post-id="'.concat(e,'"] div.author h4'));t.text(t.text().replace(" (hidden)","")),$('.forum-post[data-forum-post-id="'.concat(e,'"]')).attr("data-is-hidden","false")}).fail(function(){r.default.error("Failed to unhide post.")})}},$(document).ready(function(){o.initialize_all()}),e.default=o},2728:function(t,e,n){"use strict";t.exports=n.p+"static/default_bloodlust-5c624f807656bbe87cb0.svg"},2771:function(t,e,n){"use strict";function r(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return i(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,c=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){c=!0,a=t},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw a}}}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);nt.length)&&(e=t.length);for(var n=0,r=Array(e);n").prop("href",this.uploadURL).prop("hostname");if(n&&n!==this.whitelist.oldDomain?$.getJSON("/upload_whitelists/is_allowed.json",{url:this.uploadURL},function(t){t.domain&&(e.whitelistWarning(t.is_allowed,t.domain,t.reason),t.is_allowed||e.setEmptyThumb())}):n||(this.clearWhitelistWarning(),this.setEmptyThumb()),this.whitelist.oldDomain=n,/^(https?\:\/\/|www).*?$/.test(this.uploadURL)){var r=/^(https?\:\/\/|www).*?\.(webm)$/.test(this.uploadURL);this.previewChanged(this.uploadURL,r)}else this.setEmptyThumb()},getFileURL:function(){return this.$refs.post_file.files[0]},updatePreviewFile:function(){var t,e,n=this.getFileURL(),r=null!==(t=this.maxFileSizeMap[null===(e=n.type.split("/"))||void 0===e?void 0:e[1]])&&void 0!==t?t:this.maxFileSize;n.size>r?(this.fileTooLarge=!0,this.exceededFileSize=r):(this.fileTooLarge=!1,this.exceededFileSize=0);var i=URL.createObjectURL(n);this.disableURLUpload=!0,this.uploadValueChanged(n),this.previewChanged(i,["video/webm","video/mp4"].includes(n.type))},uploadValueChanged:function(t){this.$emit("uploadValueChanged",t)},setEmptyThumb:function(){this.previewChanged("",!1)},previewChanged:function(t,e){this.$emit("previewChanged",{url:t,isVideo:e})}}};const P=(0,n(2443).A)(C,[["render",function(t,e,n,s,$,C){return(0,r.uX)(),(0,r.CE)("span",{class:"uploader-file-input","file-enabled":!$.disableFileUpload,"link-enabled":!$.disableURLUpload},[$.disableFileUpload?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",l,[$.fileTooLarge?((0,r.uX)(),(0,r.CE)("div",u,[(0,r.eW)("\n The file you are trying to upload is too large. Maximum allowed is "+(0,i.v_)(this.exceededFileSize/1048576)+" MiB.",1),e[6]||(e[6]=(0,r.Lk)("br",null,null,-1)),e[7]||(e[7]=(0,r.eW)("\n Check out ",-1)),e[8]||(e[8]=(0,r.Lk)("a",{href:"/help/supported_filetypes"},"the Supported Formats",-1)),e[9]||(e[9]=(0,r.eW)(" for more information.\n ",-1))])):(0,r.Q3)("",!0),e[13]||(e[13]=(0,r.eW)()),(0,r.Lk)("label",{class:"fileinput",for:"file-input",onDragover:e[1]||(e[1]=function(){return C.fileDragover&&C.fileDragover.apply(C,arguments)}),onDragleave:e[2]||(e[2]=function(){return C.fileDragleave&&C.fileDragleave.apply(C,arguments)}),onDrop:e[3]||(e[3]=function(){return C.fileDrop&&C.fileDrop.apply(C,arguments)}),dragging:$.uploader.dragging},[(0,r.Lk)("input",{type:"file",ref:"post_file",id:"file-input",accept:"image/png,.png,image/apng,.apng,image/jpeg,.jpg,.jpeg,image/gif,.gif,video/webm,.webm,video/mp4,.mp4,image/webp,.webp",onChange:e[0]||(e[0]=function(){return C.updatePreviewFile&&C.updatePreviewFile.apply(C,arguments)}),disabled:$.disableFileUpload},null,40,f),e[11]||(e[11]=(0,r.eW)()),(0,r.Lk)("span",p,[$.uploader.dragging?((0,r.uX)(),(0,r.CE)("div",h,"Release to drop a file here")):((0,r.uX)(),(0,r.CE)("div",g,"Choose an image or video to upload"))]),e[12]||(e[12]=(0,r.eW)()),(0,r.Lk)("span",v,[$.disableURLUpload?((0,r.uX)(),(0,r.CE)("div",m,(0,i.v_)(this.getFileURL().name),1)):((0,r.uX)(),(0,r.CE)("div",b,a(e[10]||(e[10]=[(0,r.Lk)("u",null,"Browse for file",-1),(0,r.eW)(" or drag and drop",-1)]))))])],40,d),e[14]||(e[14]=(0,r.eW)()),(0,r.bo)((0,r.Lk)("button",{class:"btn-clear",onClick:e[4]||(e[4]=(0,o.D$)(function(){return C.clearFileUpload&&C.clearFileUpload.apply(C,arguments)},["prevent"]))},"Clear",512),[[o.aG,$.disableURLUpload]])])),e[30]||(e[30]=(0,r.eW)()),$.disableURLUpload?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",y,[C.badDirectURL?((0,r.uX)(),(0,r.CE)("div",w,[(0,r.eW)("\n The direct URL entered has the following problem: "+(0,i.v_)(C.directURLProblem),1),e[15]||(e[15]=(0,r.Lk)("br",null,null,-1)),e[16]||(e[16]=(0,r.eW)("\n You should review ",-1)),e[17]||(e[17]=(0,r.Lk)("a",{href:"/wiki_pages/howto:sites_and_sources"},"the sourcing guide",-1)),e[18]||(e[18]=(0,r.eW)(".\n ",-1))])):(0,r.Q3)("",!0),e[28]||(e[28]=(0,r.eW)()),(0,r.Lk)("label",k,[(0,r.Lk)("span",_,(0,i.v_)($.disableFileUpload?"URL":"OR"),1),e[19]||(e[19]=(0,r.eW)()),(0,r.bo)((0,r.Lk)("input",{type:"text",size:"50",placeholder:"Paste image URL","onUpdate:modelValue":e[5]||(e[5]=function(t){return $.uploadURL=t}),disabled:$.disableURLUpload},null,8,x),[[o.Jo,$.uploadURL]])]),e[29]||(e[29]=(0,r.eW)()),(0,r.bo)((0,r.Lk)("div",{id:"whitelist-warning",class:(0,i.C4)({"whitelist-warning-allowed":$.whitelist.allowed,"whitelist-warning-disallowed":!$.whitelist.allowed})},[$.whitelist.allowed?((0,r.uX)(),(0,r.CE)("span",j,[e[20]||(e[20]=(0,r.eW)("Uploads from ",-1)),(0,r.Lk)("b",null,(0,i.v_)($.whitelist.domain),1),e[21]||(e[21]=(0,r.eW)(" are permitted.",-1))])):(0,r.Q3)("",!0),e[27]||(e[27]=(0,r.eW)()),$.whitelist.allowed?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("span",S,[e[22]||(e[22]=(0,r.eW)("Uploads from ",-1)),(0,r.Lk)("b",null,(0,i.v_)($.whitelist.domain),1),e[23]||(e[23]=(0,r.eW)(" are not permitted.\n ",-1)),$.whitelist.reason?((0,r.uX)(),(0,r.CE)("span",T,"Reason given: "+(0,i.v_)($.whitelist.reason),1)):(0,r.Q3)("",!0),e[24]||(e[24]=(0,r.eW)("\n (",-1)),e[25]||(e[25]=(0,r.Lk)("a",{href:"/upload_whitelists"},"View whitelisted domains",-1)),e[26]||(e[26]=(0,r.eW)(")",-1))]))],2),[[o.aG,$.whitelist.visible]])]))],8,c)}]]);var A=P},3263:function(t,e,n){"use strict";t.exports=n.p+"static/ace-73d60459ba81fb211f75.svg"},3296:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return g}});var r=n(7742),i=n(2370),o=n(9855);function a(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function o(n,r,i,o){var a=r&&r.prototype instanceof l?r:l,u=Object.create(a.prototype);return s(u,"_invoke",function(n,r,i){var o,a,s,l=0,u=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,a=0,s=t,f.n=n,c}};function p(n,r){for(a=n,s=r,e=0;!d&&l&&!i&&e3?(i=h===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&pr||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return c;throw d=!0,r}return function(i,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),a=u,s=h;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(l=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(e){o=t,a=1,s=e}finally{l=1}}return{value:e,done:d}}}(n,i,o),!0),u}var c={};function l(){}function u(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(s(e={},r,function(){return this}),e),p=d.prototype=l.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,s(t,i,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,s(p,"constructor",d),s(d,"constructor",u),u.displayName="GeneratorFunction",s(d,i,"GeneratorFunction"),s(p),s(p,i,"Generator"),s(p,r,function(){return this}),s(p,"toString",function(){return"[object Generator]"}),(a=function(){return{w:o,m:h}})()}function s(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}s=function(t,e,n,r){function o(e,n){s(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},s(t,e,n,r)}function c(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function l(t){return function(){var e=this,n=arguments;return new Promise(function(r,i){var o=t.apply(e,n);function a(t){c(o,r,i,a,s,"next",t)}function s(t){c(o,r,i,a,s,"throw",t)}a(void 0)})}}function u(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return d(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?d(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function d(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n").attr({name:"blacklisted-tags",content:JSON.stringify(this._userData.blacklist.tags)}).appendTo("head")}}},{key:"_get",value:function(){return this._userData||this._init(),this._userData}},{key:"id",get:function(){return this._get().id}},{key:"name",get:function(){return this._get().name}},{key:"level",get:function(){return this._get().level}},{key:"levelString",get:function(){return this._get().levelString}},{key:"commentThreshold",get:function(){return this._get().commentThreshold}},{key:"hotkeysEnabled",get:function(){return this._get().hotkeysEnabled}},{key:"blacklist",get:function(){return this._get().blacklist}},{key:"posts",get:function(){return this._get().posts}},{key:"can",get:function(){return this._get().can}},{key:"is",get:function(){return this._get().is}},{key:"addBlacklistedTag",value:(d=l(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:if(!this.blacklist.tags.includes(e)){t.n=1;break}return t.a(2);case 1:return this.blacklist.tags.push(e),t.a(2,this.saveBlacklist())}},t,this)})),function(t){return d.apply(this,arguments)})},{key:"removeBlacklistedTag",value:(c=l(a().m(function t(e){return a().w(function(t){for(;;)switch(t.n){case 0:if(this.blacklist.tags.includes(e)){t.n=1;break}return t.a(2);case 1:return this.blacklist.tags=this.blacklist.tags.filter(function(t){return t!==e}),t.a(2,this.saveBlacklist())}},t,this)})),function(t){return c.apply(this,arguments)})},{key:"saveBlacklist",value:(s=l(a().m(function t(){var e=this;return a().w(function(t){for(;;)if(0===t.n)return t.a(2,new Promise(function(t,n){if(e.is.anonymous)return r.default.Blacklist.AnonymousBlacklist=JSON.stringify(e.blacklist.tags),void t();e._authToken?$.ajax("/users/".concat(e.id,".json"),{method:"PUT",data:{"user[blacklisted_tags]":e.blacklist.tags.join("\n")}}).done(function(){t()}).fail(function(t){n(t)}):n("Unable to authorize request")}).then(function(){return i.default.dialog&&i.default.dialog.close(),$("meta[name=blacklisted-tags]").attr("content",JSON.stringify(e.blacklist.tags)),i.default.regenerate_filters(),i.default.add_posts(o.default.sample()),i.default.update_visibility(),Promise.resolve()},function(t){return Danbooru.error(t),Promise.reject()}))},t)})),function(){return s.apply(this,arguments)})}],e&&f(t.prototype,e),n&&f(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,s,c,d}();p(g,"_userData",null),p(g,"_authToken",null)},3334:function(t,e,n){"use strict";t.exports=n.p+"static/knowyourmeme.com-91916bc13897b8601e73.png"},3440:function(t,e,n){"use strict";t.exports=n.p+"static/8-1f3040e07f1ef2454e41.png"},3471:function(t,e,n){"use strict";t.exports=n.p+"static/blank-8dd283bceccca95a48d8.png"},3503:function(t,e,n){"use strict";t.exports=n.p+"static/catbox.moe-015c70b518bd22a60ad0.png"},3524:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return h}});var r=n(6115),i=n(3296),o=n(4596);function a(t){return function(t){if(Array.isArray(t))return u(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=l(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function c(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],c=!0,l=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);c=!0);}catch(t){l=!0,i=t}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw i}}return s}}(t,e)||l(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,e){if(t){if("string"==typeof t)return u(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(t,e):void 0}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n").text(l).appendTo(e);for(var d=0,f=Object.entries(u);d").text(h).appendTo(e);var v,m=$("
    ").addClass("hotkey-keys").attr({action:g,default:r.default.Definitions[g]===r.default.Defaults[g]}).appendTo(e),b=0,y=s(r.default.getKeys(g));try{for(y.s();!(v=y.n()).done;){var w=v.value;$("").attr({type:"button",title:"Close","aria-label":"Close dialog"}).appendTo(i).on("click",function(){return n.close()}),$("
    ").attr("role","document").appendTo(this.$dialog).append(this.$element),t.dialogIndex[this.id]=this,t.dialogStack.push(this.id),this.$dialog.on("mousedown",function(){t.focusDialog(n)}),t.resetFocus(this),this.$dialog.on("keydown",function(t){"Escape"!==t.key&&27!==t.keyCode||(t.preventDefault(),n.close())});var o=this.$element.data();for(var s in o)void 0===r[s]&&(r[s]=o[s]);if(r.title&&this.$title.text(r.title),r.position){var c=r.position.trim().split(/\s+/);this.currentNormalizedPosition=[t.resolveToNormalizedPosition(c[0]),t.resolveToNormalizedPosition(c[1])]}this.dialogWidth=r.width||this.$dialog.outerWidth()||250,r.height?this.dialogHeight=r.height+t.remToPx(2):(this.dialogHeight=this.$dialog.outerHeight()||200,this.$element.attr("data-id",this.id),t.resizeObserver.observe(this.$element[0])),this.recalculatePosition(),$(window).on("dialogContainer:resize",{obj:this},this.onResize),r.startOpen&&this.open()}return e=t,n=[{key:"priorPlacedX",get:function(){return"number"!==typeof this._priorPlacedX&&(this._priorPlacedX=this.currentNormalizedPosition[0]*(t.containerWidth-this.dialogWidth)),this._priorPlacedX}},{key:"priorPlacedY",get:function(){return"number"!==typeof this._priorPlacedY&&(this._priorPlacedY=this.currentNormalizedPosition[1]*(t.containerHeight-this.dialogHeight)),this._priorPlacedY}},{key:"onResize",value:function(t){t.data.obj.recalculatePosition()}},{key:"recalculatePosition",value:function(){var e={x:t.containerWidth-this.dialogWidth,y:t.containerHeight-this.dialogHeight},n=[];this.isPinned?(n[0]=this.priorPlacedX,n[1]=this.priorPlacedY):(n[0]=e.x*this.currentNormalizedPosition[0],n[1]=e.y*this.currentNormalizedPosition[1]);var r={left:Math.max(0,Math.min(n[0],e.x)),top:Math.max(0,Math.min(n[1],e.y))};this._updatePosition(r.left,r.top)}},{key:"setTitle",value:function(t){this.$title.html(t)}},{key:"_setZIndex",value:function(t){this.$dialog.css("z-index",250+t)}},{key:"isOpen",get:function(){return this._isOpen},set:function(t){t?this.open():this.close()}},{key:"open",value:function(){this._isOpen=!0,this.$dialog.removeClass("hidden"),t.focusDialog(this),this.$dialog.focus(),this.$element.trigger("dialog:open")}},{key:"close",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._isOpen=!1,this.isDragging&&(this.isDragging=!1,this.dragAnimationFrame&&(cancelAnimationFrame(this.dragAnimationFrame),this.dragAnimationFrame=null),$(document).off("mousemove.dialog-drag mouseup.dialog-drag visibilitychange.dialog-drag"),$(window).off("blur.dialog-drag"),this.$dialog.removeClass("dragging")),this.$dialog.addClass("hidden").removeClass("focused"),t||this.$element.trigger("dialog:close")}},{key:"toggle",value:function(){this.isOpen?this.close():this.open()}},{key:"xMin",get:function(){return 0==this._xMin?this._xMin:this._xMin||(this._xMin=parseInt(this.$dialog.css("left")))}},{key:"yMin",get:function(){return 0==this._yMin?this._yMin:this._yMin||(this._yMin=parseInt(this.$dialog.css("top")))}},{key:"xMax",get:function(){return this.xMin+this.dialogWidth}},{key:"yMax",get:function(){return this.yMin+this.dialogHeight}},{key:"_updatePosition",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._xMin=t,this._yMin=e,n&&(this._priorPlacedX=t,this._priorPlacedY=e),this.$dialog.css({width:this.dialogWidth,height:this.dialogHeight,left:t,top:e})}},{key:"isPinned",get:function(){return this._isPinned},set:function(t){this._isPinned!==t&&(this._isPinned=t,t||this.recalculatePosition())}},{key:"togglePin",value:function(){return this.isPinned=!this.isPinned}},{key:"destroy",value:function(){var e=this;this.close(!0),t.dialogStack=t.dialogStack.filter(function(t){return t!==e.id}),delete t.dialogIndex[this.id],t.resetFocus(),$(window).off("dialogContainer:resize",this.onResize),this.$element.trigger("dialog:destroy"),t.resizeObserver.unobserve(this.$element[0]),this.$dialog.remove(),this.$dialog=null,this.$element=null}},{key:"startDrag",value:function(t){var e=this;if(1===t.which&&!$(t.target).is("button")){t.preventDefault(),this.$dialog.addClass("dragging"),this.isDragging=!0,this.dragStartX=t.clientX,this.dragStartY=t.clientY;var n=this.$dialog.position();this.dialogStartX=n.left,this.dialogStartY=n.top,$(document).on("mousemove.dialog-drag",function(t){return e.drag(t)}),$(document).on("mouseup.dialog-drag",function(){return e.stopDrag()}),$(window).on("blur.dialog-drag",function(){return e.stopDrag()}),$(document).on("visibilitychange.dialog-drag",function(){document.hidden&&e.stopDrag()})}}},{key:"drag",value:function(t){var e=this;this.isDragging&&(this.dragAnimationFrame&&cancelAnimationFrame(this.dragAnimationFrame),this.dragAnimationFrame=requestAnimationFrame(function(){e.updateDialogPosition(t),e.dragAnimationFrame=null}))}},{key:"updateDialogPosition",value:function(e){e.preventDefault();var n=this.dialogStartX+(e.clientX-this.dragStartX),r=this.dialogStartY+(e.clientY-this.dragStartY),i=t.containerWidth-this.dialogWidth,o=t.containerHeight-this.dialogHeight;n=Math.max(0,Math.min(n,i)),r=Math.max(0,Math.min(r,o)),this.currentNormalizedPosition=[i>0?n/i:0,o>0?r/o:0],this._updatePosition(n,r,!0)}},{key:"stopDrag",value:function(){this.isDragging&&(this.isDragging=!1,this.dragAnimationFrame&&(cancelAnimationFrame(this.dragAnimationFrame),this.dragAnimationFrame=null),$(document).off("mousemove.dialog-drag mouseup.dialog-drag visibilitychange.dialog-drag"),$(window).off("blur.dialog-drag"),this.$dialog.removeClass("dragging"))}}],i=[{key:"container",get:function(){var t=this;return null!==this._container||(this._container=$("
    ").appendTo("body"),this.updateContainerDimensions(),$(window).on("resize.dialog orientationchange.dialog",function(){return t.onUpdateContainerDimensions()}),$(document).on("fullscreenchange webkitfullscreenchange mozfullscreenchange MSFullscreenChange",function(){t._currentTimeout&&clearTimeout(t._currentTimeout),t._currentTimeout=setTimeout(t.onUpdateContainerDimensions,100)})),this._container}},{key:"updateContainerDimensions",value:function(){this.containerWidth=this._container.innerWidth()||800,this.containerHeight=this._container.innerHeight()||600}},{key:"onUpdateContainerDimensions",value:function(){var e=t.containerWidth,n=t.containerHeight;t.updateContainerDimensions(),t._currentTimeout&&(clearTimeout(t._currentTimeout),t._currentTimeout=null),e===t.containerWidth&&n===t.containerHeight||$(window).trigger("dialogContainer:resize")}},{key:"resizeObserver",get:function(){var e=this;return null===this._resizeObserver&&(this._resizeObserver=new ResizeObserver(function(n){var i,o=r(n);try{for(o.s();!(i=o.n()).done;){var a,s,c=i.value,l=e.dialogIndex[c.target.getAttribute("data-id")];if(l){var u=c.borderBoxSize,d=(Array.isArray(u)?null===(a=u[0])||void 0===a?void 0:a.blockSize:null!==(s=null===u||void 0===u?void 0:u.blockSize)&&void 0!==s?s:c.contentRect.height)+t.remToPx(2);0!==d&&d!==l.dialogHeight&&(l.dialogHeight=d,l.recalculatePosition())}}}catch(f){o.e(f)}finally{o.f()}})),this._resizeObserver}},{key:"resolveToNormalizedPosition",value:function(e){return t.normalizedPositionLabel[e]||("number"===typeof e?Math.max(Math.min(e,1),0):.5)}},{key:"focusDialog",value:function(t){var e=this.dialogStack.indexOf(t.id);e!==this.dialogStack.length-1&&(e>-1&&this.dialogStack.splice(e,1),this.dialogStack.push(t.id),this.resetFocus())}},{key:"resetFocus",value:function(){var t,e=0,n=r(this.dialogStack);try{for(n.s();!(t=n.n()).done;){var i=t.value,o=this.dialogIndex[i];o&&(o._setZIndex(e),e++)}}catch(a){n.e(a)}finally{n.f()}}},{key:"remToPx",value:function(t){return t*parseFloat(getComputedStyle(document.documentElement).fontSize)}}],n&&o(e.prototype,n),i&&o(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i}();a(c,"_container",null),a(c,"containerWidth",0),a(c,"containerHeight",0),a(c,"_currentTimeout",null),a(c,"_resizeObserver",null),a(c,"normalizedPositionLabel",{center:.5,top:0,bottom:1,left:0,right:1}),a(c,"dialogStack",[]),a(c,"dialogIndex",{}),a(c,"dialogCount",0)},4906:function(t,e,n){"use strict";t.exports=n.p+"static/2-24dea2cdebfe92b77cd5.png"},4918:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return p}});var r=n(697),i=n(1190);function o(){var t,e,n="function"==typeof Symbol?Symbol:{},r=n.iterator||"@@iterator",i=n.toStringTag||"@@toStringTag";function s(n,r,i,o){var s=r&&r.prototype instanceof l?r:l,u=Object.create(s.prototype);return a(u,"_invoke",function(n,r,i){var o,a,s,l=0,u=i||[],d=!1,f={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(e,n){return o=e,a=0,s=t,f.n=n,c}};function p(n,r){for(a=n,s=r,e=0;!d&&l&&!i&&e3?(i=h===r)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=t):o[0]<=p&&((i=n<2&&pr||r>h)&&(o[4]=n,o[5]=r,f.n=h,a=0))}if(i||n>1)return c;throw d=!0,r}return function(i,u,h){if(l>1)throw TypeError("Generator is already running");for(d&&1===u&&p(u,h),a=u,s=h;(e=a<2?t:s)||!d;){o||(a?a<3?(a>1&&(f.n=-1),p(a,s)):f.n=s:f.v=s);try{if(l=2,o){if(a||(i="next"),e=o[i]){if(!(e=e.call(o,s)))throw TypeError("iterator result is not an object");if(!e.done)return e;s=e.value,a<2&&(a=0)}else 1===a&&(e=o.return)&&e.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+i+"' method"),a=1);o=t}else if((e=(d=f.n<0)?s:n.call(r,f))!==c)break}catch(e){o=t,a=1,s=e}finally{l=1}}return{value:e,done:d}}}(n,i,o),!0),u}var c={};function l(){}function u(){}function d(){}e=Object.getPrototypeOf;var f=[][r]?e(e([][r]())):(a(e={},r,function(){return this}),e),p=d.prototype=l.prototype=Object.create(f);function h(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,d):(t.__proto__=d,a(t,i,"GeneratorFunction")),t.prototype=Object.create(p),t}return u.prototype=d,a(p,"constructor",d),a(d,"constructor",u),u.displayName="GeneratorFunction",a(d,i,"GeneratorFunction"),a(p),a(p,i,"Generator"),a(p,r,function(){return this}),a(p,"toString",function(){return"[object Generator]"}),(o=function(){return{w:s,m:h}})()}function a(t,e,n,r){var i=Object.defineProperty;try{i({},"",{})}catch(t){i=0}a=function(t,e,n,r){function o(e,n){a(t,e,function(t){return this._invoke(e,n,t)})}e?i?i(t,e,{value:n,enumerable:!r,configurable:!r,writable:!r}):t[e]=n:(o("next",0),o("throw",1),o("return",2))},a(t,e,n,r)}function s(t,e,n,r,i,o,a){try{var s=t[o](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,i)}function c(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return l(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function l(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=Array(e);n").addClass("dtext-formatter-tabs").on("click","button.dtext-formatter-tab",function(e){t.state=$(e.currentTarget).attr("action")}),n=0,r=["Write","Preview"];n").addClass("dtext-formatter-tab").text(i).attr({type:"button",action:i.toLowerCase()}).appendTo(e)}return e}},{key:"buildFormattingButtons",value:function(){var e,n=this,i=$("
    ").addClass("dtext-formatter-buttons").on("click","button.dtext-formatter-button",function(t){n.handleFormattingButtonClick($(t.currentTarget))}),o=c(t.ButtonOrder);try{for(o.s();!(e=o.n()).done;){var a=e.value;if(null!==a){var s=t.ButtonDefinitions[a];s&&$("