/**
* IBM Confidential OCO Source Materials IBM Business Platform: CA Admin
* (C) Copyright IBM Corp. 2017, 2018
*
* The source code for this program is not published or otherwise divested of
* its trade secrets, irrespective of what has been deposited with the U.S.
* Copyright Office
*/
define("bi/admin/globalparameters/helpers/SoapHelper",["underscore"],function(e){var r='\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n';return{_createDTD:function(){return"\r\n"},processResponse:function(r,n){var t=[],T=$(n).selectNode("Envelope").selectNode("Body").find("> *").selectNode("result").selectNode("details").selectNode("item").byAttributeValue("xsi:type","bus:asynchDetailReportStatus").selectNode("status");if(""===T.text()&&(T=$(n).selectNode("Envelope").selectNode("Body").find("> *").selectNode("result").selectNode("status")),"prompting"!==T.text()){var a=$(n).selectNode("Envelope").selectNode("Body").find("> *");t=this._extractParametersFromResponse(r,a)}else t.push({name:"credential:",report_id:r.id,type:"credential"});var i,s=$(n).selectNode("Envelope").selectNode("Body").find("> *").find("> *").selectNode("details").selectNode("item").byAttributeValue("xsi:type","bus:asynchDetailReportOutput").selectNode("outputPages").selectNode("item"),u=[],o=s.text();if(""!==o){o=this._createDTD()+o,i=$.parseXML(o);var N=$(i).find("*[parameter]");e.each(N,function(e){u.push($(e).attr("parameter"))})}else i=null;return{parameters:t,promptControls:u,status:T.text(),type:"xml",report:r.defaultName,report_id:r.id,$conversation:$(n).selectNode("Envelope").selectNode("Body").find("> *").selectNode("result").selectNode("primaryRequest"),$tracking:$(n).selectNode("Envelope").selectNode("Header").selectNode("biBusHeader").selectNode("tracking").selectNode("conversationContext"),xml:i}},_extractParametersFromResponse:function(r,n){for(var t=[],T=n.selectNode("result").selectNode("details").selectNode("item").byAttributeValue("xsi:type","bus:asynchDetailParameters").selectNode("parameters").selectNode("item").byAttributeValue("xsi:type","bus:parameter"),a=0;a/g,">"),r=r.replace(/"/g,"""),r=r.replace(/'/g,"'")),r}}}),define("bi/admin/common/utils/parameters/SimpleParmValueItem",["bi/admin/globalparameters/helpers/SoapHelper"],function(e){function r(){this._inclusive=!0,this._use="",this._display=""}return r.prototype.fromJSON=function(e){e.inclusive&&(this._inclusive=e.inclusive),e.use&&(this._use=e.use),e.display&&(this._display=e.display)},r.prototype.toXML=function(r){var n="<"+r+' xsi:type="bus:simpleParmValueItem">'+this._inclusive+''+e.xml_encode(this._display)+'"+r+">";return n},r}),define("bi/admin/common/utils/parameters/BoundRangeParmValueItem",["bi/admin/common/utils/parameters/SimpleParmValueItem"],function(e){function r(){this._inclusive=!0,this._start=new e,this._end=new e}return r.prototype.fromJSON=function(e){e.inclusive&&(this._inclusive=e.inclusive),e.start&&this._start.fromJSON(e.start),e.end&&this._end.fromJSON(e.end)},r.prototype.toXML=function(e){var r="<"+e+' xsi:type="bus:boundRangeParmValueItem">'+this._inclusive+""+this._start.toXML("start")+this._end.toXML("end")+""+e+">";return r},r}),define("bi/admin/common/utils/parameters/UnboundedStartRangeParmValueItem",["bi/admin/common/utils/parameters/SimpleParmValueItem"],function(e){function r(){this._inclusive=!0,this._end=new e}return r.prototype.fromJSON=function(e){e.inclusive&&(this._inclusive=e.inclusive),e.end&&this._end.fromJSON(e.end)},r.prototype.toXML=function(e){var r="<"+e+' xsi:type="bus:unboundedStartRangeParmValueItem">'+this._inclusive+""+this._end.toXML("end")+""+e+">";return r},r}),define("bi/admin/common/utils/parameters/UnboundedEndRangeParmValueItem",["bi/admin/common/utils/parameters/SimpleParmValueItem"],function(e){function r(){this._inclusive=!0,this._start=new e}return r.prototype.fromJSON=function(e){e.inclusive&&(this._inclusive=e.inclusive),e.start&&this._start.fromJSON(e.start)},r.prototype.toXML=function(e){var r="<"+e+' xsi:type="bus:unboundedEndRangeParmValueItem">'+this._inclusive+""+this._start.toXML("start")+""+e+">";return r},r}),define("bi/admin/common/utils/parameters/HierarchicalParmValueItem",["underscore","bi/admin/common/utils/parameters/SimpleParmValueItem"],function(e,r){function n(){this._inclusive=!0,this._value=new r,this._subNodes=[]}return n.prototype.fromJSON=function(r){r.inclusive&&(this._inclusive=r.inclusive),r.value&&this._value.fromJSON(r.value),r.subNodes&&e.each(r.subNodes,function(e){var r=new n;r.fromJSON(e),this._subNodes.push(r)}.bind(this))},n.prototype.toXML=function(r){var n='';e.each(this._subNodes,function(e){n+=e.toXML("item")}),n+="";var t="<"+r+' xsi:type="bus:hierarchicalParmValueItem">'+this._inclusive+""+this._value.toXML("value")+n+""+r+">";return t},n}),define("bi/admin/common/utils/parameters/ParameterValue",["underscore","bi/admin/common/utils/parameters/SimpleParmValueItem","bi/admin/common/utils/parameters/BoundRangeParmValueItem","bi/admin/common/utils/parameters/UnboundedStartRangeParmValueItem","bi/admin/common/utils/parameters/UnboundedEndRangeParmValueItem","bi/admin/common/utils/parameters/HierarchicalParmValueItem","bi/admin/globalparameters/helpers/SoapHelper"],function(e,r,n,t,T,a,i){function s(){this._name="",this._parmValueItems=[]}return s.prototype._loadParmValueItemFromJSON=function(e){var i;switch(e.type){case"simpleParmValueItem":i=new r;break;case"boundRangeParmValueItem":i=new n;break;case"unboundedStartRangeParmValueItem":i=new t;break;case"unboundedEndRangeParmValueItem":i=new T;break;case"hierarchicalParmValueItem":i=new a;break;default:return null}return i.fromJSON(e),i},s.prototype.fromJSON=function(r){this._name=r.name,e.each(r.values,function(e){var r=this._loadParmValueItemFromJSON(e);null!=r&&this._parmValueItems.push(r)}.bind(this))},s.prototype.toXML=function(){var r='- ';return r+=''+i.xml_encode(this._name)+"",r+='',e.each(this._parmValueItems,function(e){r+=e.toXML("item")}),r+="",r+="
"},s}),define("bi/admin/common/utils/parameters/ParameterValues",["underscore","bi/admin/common/utils/parameters/ParameterValue"],function(e,r){return{fromJSON:function(n){var t=[];return e.map(n,function(e){var n=new r;n.fromJSON(e),t.push(n)}),t},toXML:function(r){var n=this.fromJSON(r),t='';return e.each(n,function(e){t+=e.toXML()}.bind(this)),t+=""}}}),define("js/admin/parametersBundle",function(){});