var __dnvPage_kesehatan=(()=>{try{return JSON["parse"](document["getElementById"]("denava-kesehatan-page-data")?.["textContent"]||"{}")}catch(t){return{}}})();window["denavaPrintStunting"]=function(t,e){var _0xf90339=function(){var a=window["denavaStuntingDataRequest"],r=window["denavaStuntingScorecardRequest"];if(a&&typeof a["state"]==="function"&&a["state"]()==="pending"){a["always"](_0xf90339);return}if(r&&typeof r["state"]==="function"&&r["state"]()==="pending"){r["always"](_0xf90339);return}var n=document["querySelector"](t);if(!n||window["__denavaStuntingPrintBusy"])return![];window["__denavaStuntingPrintBusy"]=!![];var i=n["cloneNode"](!![]);i["querySelectorAll"](".denava-no-print,.denava-health-skeleton,button,.dataTables_length,.dataTables_filter,.dataTables_paginate,.pagination")["forEach"](function(t){t["remove"]()});i["querySelectorAll"]("[style]")["forEach"](function(t){["height","min-height","max-height","overflow","overflow-x","overflow-y","transform","position","left","right","top","bottom","width","min-width","max-width"]["forEach"](function(e){t["style"]["removeProperty"](e)})});var o=document["createElement"]("iframe");o["setAttribute"]("aria-hidden","true");o["style"]["cssText"]="position:fixed;left:-12000px;top:0;width:1px;height:1px;border:0;opacity:0;pointer-events:none";document["body"]["appendChild"](o);var d=o["contentDocument"]||o["contentWindow"]["document"],c=String(e||"Data Convergensi Stunting")["replace"](/[<>]/g,"")["substring"](0,120),s=c["replace"](/[&<>"]/g,function(t){return{"&":"&","<":"<",">":">",'"':"""}[t]});var l=window["denavaPrintLetterheadHTML"]?window["denavaPrintLetterheadHTML"]():"";var u=Array["from"](i["querySelectorAll"]("table"))["reduce"](function(t,e){var a=e["tHead"]&&e["tHead"]["rows"][0]||e["tBodies"]&&e["tBodies"][0]&&e["tBodies"][0]["rows"][0];return Math["max"](t,a?Array["from"](a["cells"])["reduce"](function(t,e){return t+(Number(e["colSpan"])||1)},0):0)},0),m=u>=14?"A3 landscape":u>=7?"A4 landscape":"A4 portrait";d["open"]();d["write"](''+s+""+l+"

"+s+'

');d["close"]();d["querySelector"](".denava-print-health")["appendChild"](d["importNode"](i,!![]));var p=![],_0xe2fe90=function(){if(p)return;p=!![];window["__denavaStuntingPrintBusy"]=![];setTimeout(function(){if(o["parentNode"])o["parentNode"]["removeChild"](o)},300)},_0x5372d9=function(){try{o["contentWindow"]["onafterprint"]=_0xe2fe90;o["contentWindow"]["focus"]();o["contentWindow"]["print"]()}catch(t){_0xe2fe90()}setTimeout(_0xe2fe90,5e3)};setTimeout(_0x5372d9,350);return![]};_0xf90339();return![]};document["addEventListener"]("DOMContentLoaded",function(){"use strict";function _0x1ce438(t){return String(t==null?"":t)["replace"](/[&<>"']/g,function(t){return{"&":"&","<":"<",">":">",'"':""","'":"'"}[t]})}function _0x4a2d6f(t){return _0x1ce438(t==null||t===""?"0":t)}function _0x3c6087(t){t=Number(t);return isFinite(t)?t:0}function _0x457056(t){if(!Array["isArray"](t))return![];return t["some"](function(t){if(Array["isArray"](t["data"]))return t["data"]["some"](function(t){return _0x3c6087(typeof t==="object"?t["y"]:t)>0});return _0x3c6087(t["y"]||t["jumlah"]||t["value"])>0})}function _0x519f9a(t){return Array["isArray"](t)&&t["some"](function(t){return _0x3c6087(t&&(t["y"]!=null?t["y"]:t["jumlah"]))>0})}function _0x14d09f(t,e){return'

'+_0x1ce438(t)+'

'}function _0x2c7199(t,e){return'

'+_0x1ce438(t)+'

'+_0x1ce438(e||"Tidak ada data")+"
"}function _0x30c5ef(t,e,a){if(!window["Highcharts"]||!document["getElementById"](t))return;Highcharts["chart"](t,{chart:{type:"pie",height:320,backgroundColor:"transparent"},title:{text:null},credits:{enabled:![]},tooltip:{pointFormat:"{point.jumlah} anak ({point.y:.1f}%)"},plotOptions:{pie:{allowPointSelect:!![],cursor:"pointer",showInLegend:!![],dataLabels:{enabled:!![],distance:16,format:"{point.name}
{point.jumlah} anak"}}},series:[{name:e,colorByPoint:!![],data:a||[]}]})}function _0x20dc51(t,e,a){if(!window["Highcharts"]||!document["getElementById"](t))return;Highcharts["chart"](t,{chart:{type:"column",height:340,backgroundColor:"transparent"},title:{text:null},credits:{enabled:![]},xAxis:{categories:e||[],labels:{style:{fontSize:"11px"}}},yAxis:{min:0,title:{text:"Jumlah Anak"},allowDecimals:![]},plotOptions:{column:{borderRadius:5,dataLabels:{enabled:!![]}}},tooltip:{shared:!![]},series:a||[]})}function _0x273287(t){if(!Array["isArray"](t)||!t["length"])return'
Ringkasan belum tersedia.
';return'
'+t["map"](function(t){return'
'+_0x1ce438(t["title"]||"-")+""+_0x4a2d6f(t["total"])+"
"})["join"]("")+"
"}function _0x2e2e4b(){return'"}function _0x20d85(t){try{var e=(new DOMParser)["parseFromString"](String(t||""),"text/html"),a=e["querySelector"]("#table-datas")||e["querySelector"](".box-body table")||e["querySelector"]("table");if(!a)return"";a=a["cloneNode"](!![]);a["querySelectorAll"]("style,script,noscript,template,meta,link,base,title,object,embed")["forEach"](function(t){t["remove"]()});a["querySelectorAll"]("[style],[size],[face],[color],[valign],[align]")["forEach"](function(t){t["removeAttribute"]("style");t["removeAttribute"]("size");t["removeAttribute"]("face");t["removeAttribute"]("color");t["removeAttribute"]("valign");t["removeAttribute"]("align")});a["removeAttribute"]("id");a["classList"]["add"]("denava-scorecard-table");var r=![];a["querySelectorAll"]("img")["forEach"](function(t){t["removeAttribute"]("width");t["removeAttribute"]("height");t["removeAttribute"]("style");t["classList"]["add"]("denava-scorecard-image");t["setAttribute"]("loading","lazy");if(r)return;var a=t["closest"]("tr");if(!a)return;var n=String(a["textContent"]||"")["replace"](/\s+/g," ")["trim"]();if(!/(PEMERINTAH|KABUPATEN|KECAMATAN|\bDESA\b)/i["test"](n))return;var i=Array["prototype"]["slice"]["call"](a["children"])["filter"](function(t){return/^(TD|TH)$/["test"](t["tagName"])}),o=0,d=[];i["forEach"](function(t){o+=Math["max"](1,parseInt(t["getAttribute"]("colspan")||"1",10)||1);var e=t["cloneNode"](!![]);e["querySelectorAll"]("img")["forEach"](function(t){t["remove"]()});if(String(e["textContent"]||"")["replace"](/\s+/g," ")["trim"]()!=="")d["push"](e["innerHTML"])});var c=t["cloneNode"](!![]),s=e["createElement"]("td"),l=e["createElement"]("div"),u=e["createElement"]("div"),m=e["createElement"]("div");a["className"]="denava-scorecard-identity-row";s["className"]="denava-scorecard-identity-cell";s["colSpan"]=Math["max"](1,o);l["className"]="denava-scorecard-identity-flex";u["className"]="denava-scorecard-identity-logo";m["className"]="denava-scorecard-identity-text";u["appendChild"](c);m["innerHTML"]=d["join"]("
");l["appendChild"](u);l["appendChild"](m);s["appendChild"](l);a["innerHTML"]="";a["appendChild"](s);r=!![]});return'
'+a["outerHTML"]+"
"}catch(n){return""}}function _0x3c2da8(t){var e=jQuery["ajax"]({url:__dnvPage_kesehatan["v0"],type:"GET",dataType:"html",cache:![],data:{kuartal:String(document["getElementById"]("kuartal")["value"]||"")["replace"](/[^0-9]/g,"")["substring"](0,2),tahun:String(document["getElementById"]("tahun")["value"]||"")["replace"](/[^0-9]/g,"")["substring"](0,4),id:String(document["getElementById"]("id_posyandu")["value"]||"")["replace"](/[^0-9]/g,"")["substring"](0,12)},headers:{"X-Requested-With":"XMLHttpRequest"}});window["denavaStuntingScorecardRequest"]=e;e["done"](function(e){var a=_0x20d85(e);t["innerHTML"]=a?window["denavaSanitizeHTML"](a):'
Scorecard belum tersedia untuk pilihan ini.
'})["fail"](function(){t["innerHTML"]='
Scorecard belum tersedia untuk pilihan ini.
'});return e}function _0x521f5e(t){if(!t)return;t["innerHTML"]='";_0x3c2da8(t)}function _0xf0aacd(t,e,a){var r=document["getElementById"]("stunting-list");if(!r||!window["jQuery"])return;window["denavaStuntingScorecardRequest"]=null;window["denavaStuntingDataRequest"]=jQuery["ajax"]({url:__dnvPage_kesehatan["v1"],data:{tahun:String(t||"")["replace"](/[^0-9]/g,"")["substring"](0,4),kuartal:String(e||"")["replace"](/[^0-9]/g,"")["substring"](0,2),idPosyandu:String(a||"")["replace"](/[^0-9]/g,"")["substring"](0,12)},type:"GET",dataType:"json",beforeSend:function(){r["innerHTML"]=_0x2e2e4b()},success:function(t){var e=t&&t["data"]&&t["data"][0]&&t["data"][0]["attributes"]?t["data"][0]["attributes"]:{};var a=e["widgets"]||[];var n=e["chartStuntingPosyanduData"]||{};var i=e["chartKelompokUmurData"]||null;var o=e["chartStatusPerUmurData"]||[];var d=_0x273287(a)+'
';if(i&&_0x519f9a(i["data"]))d+=_0x14d09f(i["title"]||"Kelompok Umur","chart_kelompok_umur");else d+=_0x2c7199("Kelompok Umur","Belum ada data kelompok umur.");if(_0x457056(n["data"]))d+=_0x14d09f("Grafik Kasus Stunting per Posyandu","chart_posyandu");else d+=_0x2c7199("Grafik Kasus Stunting per Posyandu","Belum ada data kasus per posyandu.");if(Array["isArray"](o)&&o["length"]){o["forEach"](function(t,e){var a=String(t["id"]||"chart_status_umur_"+e)["replace"](/[^a-zA-Z0-9_-]/g,"");if(_0x519f9a(t["data"]))d+=_0x14d09f(t["title"]||"Status Umur "+(e+1),a);else d+=_0x2c7199(t["title"]||"Status Umur "+(e+1),"Tidak ada data pada kelompok ini.")})}d+='

Scorecard

';r["innerHTML"]=window["denavaSanitizeHTML"](d);if(i&&_0x519f9a(i["data"]))_0x30c5ef("chart_kelompok_umur",i["title"]||"Kelompok Umur",i["data"]);if(_0x457056(n["data"]))_0x20dc51("chart_posyandu",n["categories"]||[],n["data"]||[]);if(Array["isArray"](o)){o["forEach"](function(t,e){var a=String(t["id"]||"chart_status_umur_"+e)["replace"](/[^a-zA-Z0-9_-]/g,"");if(_0x519f9a(t["data"]))_0x30c5ef(a,t["title"]||"Status Umur",t["data"]||[])})}var c=document["getElementById"]("denava-scorecard-body");_0x521f5e(c)},error:function(){r["innerHTML"]='
Data stunting belum dapat dimuat.
'}})}_0xf0aacd(document["getElementById"]("tahun")["value"],document["getElementById"]("kuartal")["value"],document["getElementById"]("id_posyandu")["value"])});