"use strict";function extractOffset(t){var a=t.match(/(0x[a-fA-F0-9]+)/);return null===a?null:a[1]}function extractFct(t){var a=t.replace(/<[^>]*>/g,""),e=a.match(/\(fcn\) ([\S^]+)/);return null===e?null:e[1]}function extractVar(t){var a=t.replace(/<[^>]*>/g,""),e=a.match(/; var ([a-zA-Z0-9]+) ([\S^]+)/);return null===e?null:e[2]}function getChunk(t,a){var e;r2.cmd("pD "+a+"@e:scr.color=1,scr.html=1 @"+t,function(t){e=t}),e=clickableOffsets(e);for(var s=e.split("\n"),r=0;r<s.length;r++){var n=extractFct(s[r]);null!==n&&(s[r]="<span class='fcn' id='"+n+"'>"+s[r]+"</span>");var l=extractVar(s[r]);null!==l&&(s[r]="<span class='var' id='"+l+"'>"+s[r]+"</span>");var c=extractOffset(s[r]);null!==c&&(s[r]="<span class='offset' id='"+parseInt(c,16)+"'>"+s[r]+"</span>")}var f=s.join("\n");return'<pre style="border-bottom:1px dashed white;" title="'+t+'" id="block'+t+'">'+f+"</pre>"}importScripts("/m/r2.js"),importScripts("/m/tools.js"),self.onmessage=function(t){if(t.data.offset<0)self.postMessage({offset:0,data:"before 0x00"});else{var a={offset:t.data.offset,size:t.data.size,data:getChunk(t.data.offset,t.data.size)};self.postMessage(a)}};