/usr/share/javascript/requirejs/text.min.js is in libjs-requirejs-text 2.0.12-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 | define(["module"],function(d){var n,i,h,c,o,f=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],m=/^\s*<\?xml(\s)+version=[\'\"](\d)*.(\d)*[\'\"](\s)*\?>/im,k=/<body[^>]*>\s*([\s\S]+)\s*<\/body>/im,b=typeof location!=="undefined"&&location.href,e=b&&location.protocol&&location.protocol.replace(/\:/,""),g=b&&location.hostname,a=b&&(location.port||undefined),l={},j=(d.config&&d.config())||{};n={version:"2.0.12",strip:function(p){if(p){p=p.replace(m,"");var q=p.match(k);if(q){p=q[1]}}else{p=""}return p},jsEscape:function(p){return p.replace(/(['\\])/g,"\\$1").replace(/[\f]/g,"\\f").replace(/[\b]/g,"\\b").replace(/[\n]/g,"\\n").replace(/[\t]/g,"\\t").replace(/[\r]/g,"\\r").replace(/[\u2028]/g,"\\u2028").replace(/[\u2029]/g,"\\u2029")},createXhr:j.createXhr||function(){var s,p,q;if(typeof XMLHttpRequest!=="undefined"){return new XMLHttpRequest()}else{if(typeof ActiveXObject!=="undefined"){for(p=0;p<3;p+=1){q=f[p];try{s=new ActiveXObject(q)}catch(r){}if(s){f=[q];break}}}}return s},parseName:function(r){var v,u,p,t=false,q=r.indexOf("."),s=r.indexOf("./")===0||r.indexOf("../")===0;if(q!==-1&&(!s||q>1)){v=r.substring(0,q);u=r.substring(q+1,r.length)}else{v=r}p=u||v;q=p.indexOf("!");if(q!==-1){t=p.substring(q+1)==="strip";p=p.substring(0,q);if(u){u=p}else{v=p}}return{moduleName:v,ext:u,strip:t}},xdRegExp:/^((\w+)\:)?\/\/([^\/\\]+)/,useXhr:function(s,w,q,p){var u,v,t,r=n.xdRegExp.exec(s);if(!r){return true}u=r[2];v=r[3];v=v.split(":");t=v[1];v=v[0];return(!u||u===w)&&(!v||v.toLowerCase()===q.toLowerCase())&&((!t&&!v)||t===p)},finishLoad:function(p,r,s,q){s=r?n.strip(s):s;if(j.isBuild){l[p]=s}q(s)},load:function(t,v,u,s){if(s&&s.isBuild&&!s.inlineText){u();return}j.isBuild=s&&s.isBuild;var q=n.parseName(t),w=q.moduleName+(q.ext?"."+q.ext:""),r=v.toUrl(w),p=(j.useXhr)||n.useXhr;if(r.indexOf("empty:")===0){u();return}if(!b||p(r,e,g,a)){n.get(r,function(x){n.finishLoad(t,q.strip,x,u)},function(x){if(u.error){u.error(x)}})}else{v([w],function(x){n.finishLoad(q.moduleName+"."+q.ext,q.strip,x,u)})}},write:function(t,q,r,p){if(l.hasOwnProperty(q)){var s=n.jsEscape(l[q]);r.asModule(t+"!"+q,"define(function () { return '"+s+"';});\n")}},writeFile:function(u,q,w,x,r){var v=n.parseName(q),p=v.ext?"."+v.ext:"",s=v.moduleName+p,t=w.toUrl(v.moduleName+p)+".js";n.load(s,w,function(y){var z=function(A){return x(t,A)};z.asModule=function(A,B){return x.asModule(A,t,B)};n.write(u,s,z,r)},r)}};if(j.env==="node"||(!j.env&&typeof process!=="undefined"&&process.versions&&!!process.versions.node&&!process.versions["node-webkit"])){i=require.nodeRequire("fs");n.get=function(q,t,p){try{var r=i.readFileSync(q,"utf8");if(r.indexOf("\uFEFF")===0){r=r.substring(1)}t(r)}catch(s){if(p){p(s)}}}}else{if(j.env==="xhr"||(!j.env&&n.createXhr())){n.get=function(q,u,p,s){var r=n.createXhr(),t;r.open("GET",q,true);if(s){for(t in s){if(s.hasOwnProperty(t)){r.setRequestHeader(t.toLowerCase(),s[t])}}}if(j.onXhr){j.onXhr(r,q)}r.onreadystatechange=function(w){var v,x;if(r.readyState===4){v=r.status||0;if(v>399&&v<600){x=new Error(q+" HTTP status: "+v);x.xhr=r;if(p){p(x)}}else{u(r.responseText)}if(j.onXhrComplete){j.onXhrComplete(r,q)}}};r.send(null)}}else{if(j.env==="rhino"||(!j.env&&typeof Packages!=="undefined"&&typeof java!=="undefined")){n.get=function(p,w){var r,x,q="utf-8",s=new java.io.File(p),t=java.lang.System.getProperty("line.separator"),v=new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(s),q)),u="";try{r=new java.lang.StringBuffer();x=v.readLine();if(x&&x.length()&&x.charAt(0)===65279){x=x.substring(1)}if(x!==null){r.append(x)}while((x=v.readLine())!==null){r.append(t);r.append(x)}u=String(r.toString())}finally{v.close()}w(u)}}else{if(j.env==="xpconnect"||(!j.env&&typeof Components!=="undefined"&&Components.classes&&Components.interfaces)){h=Components.classes;c=Components.interfaces;Components.utils["import"]("resource://gre/modules/FileUtils.jsm");o=("@mozilla.org/windows-registry-key;1" in h);n.get=function(r,v){var q,s,t,p={};if(o){r=r.replace(/\//g,"\\")}t=new FileUtils.File(r);try{q=h["@mozilla.org/network/file-input-stream;1"].createInstance(c.nsIFileInputStream);q.init(t,1,0,false);s=h["@mozilla.org/intl/converter-input-stream;1"].createInstance(c.nsIConverterInputStream);s.init(q,"utf-8",q.available(),c.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);s.readString(q.available(),p);s.close();q.close();v(p.value)}catch(u){throw new Error((t&&t.path||"")+": "+u)}}}}}}return n});
|