let namespace="vp";$(document).ready((function(){const t=$("#custommodeldata"),e=$("#calculatorForm"),a=$("#formItems"),n=$("#item"),i=$("#itemcount"),c=$("#items"),o=$("#content"),s=$("#copyButton"),r=$("#downloadButton"),l=$("#minus"),p=$("#plus"),m=$("input[name='quant']"),u=$("#namespace"),d=$("#item");function f(t){return t.split("_").map((t=>t.charAt(0).toUpperCase()+t.slice(1))).join(" ")}l.click((function(t){const e=parseInt(m.attr("value"));isNaN(e)?m.attr("value","0"):(e>m.attr("min")&&m.attr("value",(e-1).toString()),e-1==m.attr("min")&&$(this).attr("disabled",!0),$("#iteminput"+e).remove())})),p.click((function(t){const e=parseInt(m.attr("value"));if(isNaN(e))m.attr("value","0");else{if(e1?l.prop("disabled",!1):l.prop("disabled",!0),c.append('
'+namespace+':item/
')}})),$.each(itemDamages,(function(t,e){const a=f(t);d.append($("").attr("value",t).text(a))})),t.change((function(){d.find("option").each((function(){const e=$(this).val(),a=f(e),n=$(this).text().includes("(supports");if(""!==e)if(t.is(":checked")){if(n){const t=a;$(this).text(t)}}else if(!n){const t=a+" (supports "+itemDamages[e]+" models)";$(this).text(t)}}))})),u.change((function(){namespace=u.val(),""==namespace&&(namespace="minecraft"),u.val(namespace),$("span[id^='namespace']").text(namespace+":item/")})),n.change((function(){if(""!==this.value){a.show();const t=itemDamages[this.value];i.prop("max",t),p.prop("disabled",!1)}else a.hide()})),e.on("submit",(function(e){e.preventDefault();const a=t.is(":checked"),i=n.val(),c=parseInt(m.attr("value")),s=[];for(let t=0;t