Plugin Directory

Changeset 3323686


Ignore:
Timestamp:
07/07/2025 02:28:04 PM (8 months ago)
Author:
anyapi
Message:

Adding 1.1.0 version of anyapi

Location:
anyapi/tags/1.1.0
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • anyapi/tags/1.1.0/anyapi.php

    r3300936 r3323686  
    1010 * Plugin URI:        https://anyapiplugin.com
    1111 * Description:       REST API integration for wooCommerce
    12  * Version:           1.0.0
     12 * Version:           1.1.0
    1313 * Author:            Anyapiplugin.com
    1414 * License:           GPL v2 or later
     
    2222if ( ! function_exists( 'add_action' ) ) { exit; }
    2323
    24 define( 'ANYAPI_VERSION', '1.0.0' );
     24define( 'ANYAPI_VERSION', '1.1.0' );
     25define( 'ANYAPI_ASSETS', '1.0.0' );
     26
    2527
    2628if ( file_exists( dirname( __FILE__ ) . '/vendor/autoload.php' ) ) {
     
    3840register_deactivation_hook( __FILE__, 'anyapiDeactivate' );
    3941
    40 if( class_exists( 'Anyapi\\Admin' ) ) {
     42if ( class_exists( 'Anyapi\\Admin' ) ) {
    4143  Anyapi\Admin::registerServices();
    4244}
  • anyapi/tags/1.1.0/assets/js/layout-tab.min.js

    r3300936 r3323686  
    1 !function r(a,o,i){function s(t,e){if(!o[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}n=o[t]={exports:{}},a[t][0].call(n.exports,function(e){return s(a[t][1][e]||e)},n,n.exports,r,a,o,i)}return o[t].exports}for(var l="function"==typeof require&&require,e=0;e<i.length;e++)s(i[e]);return s}({1:[function(e,t,$){var _,n,r,a,o,i,s,l,c,u,d,f,p,h,m,N,L,g,A,v,y,b;function S(e){for(var c=0,u=!1,t=!1,n=0,r=e.length;n<r;++n)if((i=e[n]).ignoreCase)t=!0;else if(/[a-z]/i.test(i.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){t=!(u=!0);break}var a={b:8,t:9,n:10,v:11,f:12,r:13};function d(e){var t=e.charCodeAt(0);return 92!==t?t:(t=e.charAt(1),a[t]||("0"<=t&&t<="7"?parseInt(e.substring(1),8):"u"===t||"x"===t?parseInt(e.substring(2),16):e.charCodeAt(1)))}function f(e){return e<32?(e<16?"\\x0":"\\x")+e.toString(16):"\\"===(e=String.fromCharCode(e))||"-"===e||"]"===e||"^"===e?"\\"+e:e}function o(e){for(var t=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),n=t.length,r=[],a=0,o=0;a<n;++a)"("===(s=t[a])?++o:"\\"===s.charAt(0)&&(i=+s.substring(1))&&(i<=o?r[i]=-1:t[a]=f(i));for(a=1;a<r.length;++a)-1===r[a]&&(r[a]=++c);for(var i,a=0,o=0;a<n;++a)"("===(s=t[a])?r[++o]||(t[a]="(?:"):"\\"===s.charAt(0)&&(i=+s.substring(1))&&i<=o&&(t[a]="\\"+r[i]);for(a=0;a<n;++a)"^"===t[a]&&"^"!==t[a+1]&&(t[a]="");if(e.ignoreCase&&u)for(a=0;a<n;++a){var s,l=(s=t[a]).charAt(0);2<=s.length&&"["===l?t[a]=function(e){var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],e="^"===t[0],r=["["];e&&r.push("^");for(var a=e?1:0,o=t.length;a<o;++a){var i,s=t[a];/\\[bdsw]/i.test(s)?r.push(s):(s=d(s),a+2<o&&"-"===t[a+1]?(i=d(t[a+2]),a+=2):i=s,n.push([s,i]),i<65||122<s||(i<65||90<s||n.push([32|Math.max(65,s),32|Math.min(i,90)]),i<97)||122<s||n.push([-33&Math.max(97,s),-33&Math.min(i,122)]))}n.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});for(var l=[],c=[],a=0;a<n.length;++a)(u=n[a])[0]<=c[1]+1?c[1]=Math.max(c[1],u[1]):l.push(c=u);for(a=0;a<l.length;++a){var u=l[a];r.push(f(u[0])),u[1]>u[0]&&(u[1]+1>u[0]&&r.push("-"),r.push(f(u[1])))}return r.push("]"),r.join("")}(s):"\\"!==l&&(t[a]=s.replace(/[a-zA-Z]/g,function(e){e=e.charCodeAt(0);return"["+String.fromCharCode(-33&e,32|e)+"]"}))}return t.join("")}for(var i,s=[],n=0,r=e.length;n<r;++n){if((i=e[n]).global||i.multiline)throw new Error(""+i);s.push("(?:"+o(i)+")")}return new RegExp(s.join("|"),t?"gi":"g")}function P(e,o){var i=/(?:^|\s)nocode(?:\s|$)/,s=[],l=0,c=[],u=0;return function e(t){var n=t.nodeType;if(1==n){if(!i.test(t.className)){for(var r=t.firstChild;r;r=r.nextSibling)e(r);var a=t.nodeName.toLowerCase();"br"!==a&&"li"!==a||(s[u]="\n",c[u<<1]=l++,c[u++<<1|1]=t)}}else 3!=n&&4!=n||(a=t.nodeValue).length&&(a=o?a.replace(/\r\n?/g,"\n"):a.replace(/[ \t\r\n]+/g," "),s[u]=a,c[u<<1]=l,l+=a.length,c[u++<<1|1]=t)}(e),{sourceCode:s.join("").replace(/\n$/,""),spans:c}}function R(e,t,n,r,a){n&&(r(r={sourceNode:e,pre:1,langExtension:null,numberLines:null,sourceCode:n,spans:null,basePos:t,decorations:null}),a.push.apply(a,r.decorations))}function x(e,x){for(var w,C={},t=e.concat(x),n=[],r={},a=0,o=t.length;a<o;++a){var i=t[a],s=i[3];if(s)for(var l=s.length;0<=--l;)C[s.charAt(l)]=i;var c=i[1],u=""+c;r.hasOwnProperty(u)||(n.push(c),r[u]=null)}n.push(/[\0-\uffff]/),w=S(n);function E(e){for(var t=e.sourceCode,n=e.basePos,r=e.sourceNode,a=[n,N],o=0,i=t.match(w)||[],s={},l=0,c=i.length;l<c;++l){var u,d=i[l],f=s[d],p=void 0;if("string"==typeof f)u=!1;else{var h=C[d.charAt(0)];if(h)p=d.match(h[1]),f=h[0];else{for(var m=0;m<k;++m)if(h=x[m],p=d.match(h[1])){f=h[0];break}p||(f=N)}!(u=5<=f.length&&"lang-"===f.substring(0,5))||p&&"string"==typeof p[1]||(u=!1,f=L),u||(s[d]=f)}var g,v,y,b,S=o;o+=d.length,u?(g=p[1],y=(v=d.indexOf(g))+g.length,p[2]&&(v=(y=d.length-p[2].length)-g.length),b=f.substring(5),R(r,n+S,d.substring(0,v),E,a),R(r,n+S+v,g,T(b,g),a),R(r,n+S+y,d.substring(y),E,a)):a.push(n+S,f)}e.decorations=a}var k=x.length;return E}function w(e){var t=[],n=[],r=(e.tripleQuotedStrings?t.push([d,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([d,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([d,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([d,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]),e.hashComments),r=(r&&(e.cStyleComments?(t.push(1<r?[f,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]:[f,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([d,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):t.push([f,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([f,/^\/\/[^\r\n]*/,null]),n.push([f,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals),r=(r&&(a=(r=1<r?"":"\n\r")?".":"[\\S\\s]",n.push(["lang-regex",RegExp("^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*("+("/(?=[^/*"+r+"])(?:[^/\\x5B\\x5C"+r+"]|\\x5C"+a+"|\\x5B(?:[^\\x5C\\x5D"+r+"]|\\x5C"+a+")*(?:\\x5D|$))+/")+")")])),e.types),a=(r&&n.push([p,r]),(""+e.keywords).replace(/^ | $/g,"")),r=(a.length&&n.push(["kwd",new RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),null]),t.push([N,/^\s+/,null," \r\n\t "]),"^.[^\\s\\w.$@'\"`/\\\\]*");return e.regexLiterals&&(r+="(?!s*/)"),n.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[p,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[N,/^[a-z_$][a-z_$@0-9]*/i,null],[h,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[N,/^\\[\s\S]?/,null],[m,new RegExp(r),null]),x(t,n)}function q(e,t,i){for(var s=/(?:^|\s)nocode(?:\s|$)/,l=/\r\n?|\n/,c=e.ownerDocument,n=c.createElement("li");e.firstChild;)n.appendChild(e.firstChild);var r=[n];function u(e){for(;!e.nextSibling;)if(!(e=e.parentNode))return;for(var t,n=function e(t,n){var n=n?t.cloneNode(!1):t,r=t.parentNode;if(r){var a=e(r,1),o=t.nextSibling;a.appendChild(n);for(var i=o;i;i=o)o=i.nextSibling,a.appendChild(i)}return n}(e.nextSibling,0);(t=n.parentNode)&&1===t.nodeType;)n=t;r.push(n)}for(var a=0;a<r.length;++a)!function e(t){var n,r,a=t.nodeType;if(1!=a||s.test(t.className))3!=a&&4!=a||!i||(n=(a=t.nodeValue).match(l))&&(r=a.substring(0,n.index),t.nodeValue=r,(a=a.substring(n.index+n[0].length))&&t.parentNode.insertBefore(c.createTextNode(a),t.nextSibling),u(t),r||t.parentNode.removeChild(t));else if("br"===t.nodeName)u(t),t.parentNode&&t.parentNode.removeChild(t);else for(var o=t.firstChild;o;o=o.nextSibling)e(o)}(r[a]);t===(0|t)&&r[0].setAttribute("value",t);for(var o=c.createElement("ol"),d=(o.className="linenums",Math.max(0,t-1|0)||0),a=0,f=r.length;a<f;++a)(n=r[a]).className="L"+(a+d)%10,n.firstChild||n.appendChild(c.createTextNode(" ")),o.appendChild(n);e.appendChild(o)}function C(e,t){for(var n=t.length;0<=--n;){var r=t[n];y.hasOwnProperty(r)?_.console&&console.warn("cannot override language handler %s",r):y[r]=e}}function T(e,t){return e&&y.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),y[e]}function I(e){var t=e.langExtension;try{var n,r,a=P(e.sourceNode,e.pre),o=a.sourceCode,i=(e.sourceCode=o,e.spans=a.spans,e.basePos=0,T(t,o)(e),e),s=(s=/\bMSIE\s(\d+)/.exec(navigator.userAgent))&&+s[1]<=8,l=/\n/g,c=i.sourceCode,u=c.length,d=0,f=i.spans,p=f.length,h=0,m=i.decorations,g=0;for(m[S=m.length]=u,r=n=0;r<S;)m[r]!==m[r+2]?(m[n++]=m[r++],m[n++]=m[r++]):r+=2;for(S=n,r=n=0;r<S;){for(var v=m[r],y=m[r+1],b=r+2;b+2<=S&&m[b+1]===y;)b+=2;m[n++]=v,m[n++]=y,r=b}var S=m.length=n,i=i.sourceNode,x="";i&&(x=i.style.display,i.style.display="none");try{for(;h<p;){f[h];var w,C,E,k,N=f[h+2]||u,L=m[g+2]||u,b=Math.min(N,L),A=f[h+1];1!==A.nodeType&&(w=c.substring(d,b))&&(s&&(w=w.replace(l,"\r")),A.nodeValue=w,(E=(C=A.ownerDocument).createElement("span")).className=m[g+1],(k=A.parentNode).replaceChild(E,A),E.appendChild(A),d<N)&&(f[h+1]=A=C.createTextNode(c.substring(b,N)),k.insertBefore(A,E.nextSibling)),N<=(d=b)&&(h+=2),L<=d&&(g+=2)}}finally{i&&(i.style.display=x)}}catch(e){_.console&&console.log(e&&e.stack||e)}}function E(e,t,n){var n=n||!1,t=t||null,r=document.createElement("div");return r.innerHTML="<pre>"+e+"</pre>",r=r.firstChild,n&&q(r,n,!0),I({langExtension:t,numberLines:n,sourceNode:r,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null}),r.innerHTML}function k(m,e){var t=e||document.body,g=t.ownerDocument||document;function n(e){return t.getElementsByTagName(e)}for(var r=[n("pre"),n("code"),n("xmp")],v=[],a=0;a<r.length;++a)for(var o=0,i=r[a].length;o<i;++o)v.push(r[a][o]);var r=null,y=Date,b=(y.now||(y={now:function(){return+new Date}}),0),S=/\blang(?:uage)?-([\w.]+)(?!\S)/,x=/\bprettyprint\b/,w=/\bprettyprinted\b/,C=/pre|xmp/i,E=/^code$/i,k=/^(?:pre|code|xmp)$/i,N={};!function e(){for(var t=_.PR_SHOULD_USE_CONTINUATION?y.now()+250:1/0;b<v.length&&y.now()<t;b++){for(var n=v[b],r=N,a=n;a=a.previousSibling;){var o=a.nodeType,i=(7===o||8===o)&&a.nodeValue;if(i?!/^\??prettify\b/.test(i):3!==o||/\S/.test(a.nodeValue))break;if(i){r={},i.replace(/\b(\w+)=([\w:.%+-]+)/g,function(e,t,n){r[t]=n});break}}var s=n.className;if((r!==N||x.test(s))&&!w.test(s)){for(var l,c,u,d,f=!1,p=n.parentNode;p;p=p.parentNode){var h=p.tagName;if(k.test(h)&&p.className&&x.test(p.className)){f=!0;break}}f||(n.className+=" prettyprinted",l=(l=r.lang)||(l=!(l=s.match(S))&&(c=function(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling)var r=n.nodeType,t=1===r?t?e:n:3===r&&A.test(n.nodeValue)?e:t;return t===e?void 0:t}(n))&&E.test(c.tagName)?c.className.match(S):l)&&l[1],u=C.test(n.tagName)?1:(c=n.currentStyle,u=g.defaultView,(u=c?c.whiteSpace:u&&u.getComputedStyle?u.getComputedStyle(n,null).getPropertyValue("white-space"):0)&&"pre"===u.substring(0,3)),(d=(d="true"===(d=r.linenums)||+d)||!!(d=s.match(/\blinenums\b(?::(\d+))?/))&&(!d[1]||!d[1].length||+d[1]))&&q(n,d,u),I({langExtension:l,sourceNode:n,numberLines:d,pre:u,sourceCode:null,basePos:null,spans:null,decorations:null}))}}b<v.length?_.setTimeout(e,250):"function"==typeof m&&m()}()}window.PR_SHOULD_USE_CONTINUATION=!0,_=window,u=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,d="str",f="com",p="typ",h="lit",m="pun",N="pln",L="src",g="atv",A=/\S/,v=w({keywords:[a=[r=[[n=["break,continue,do,else,for,if,return,while"],"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],i=[r,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],o=[r,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],r=[r,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],s="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",l=[n,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],c=[n,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],n=[n,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"]],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),y={},C(v,["default-code"]),C(x([],[[N,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[f,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[m,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),C(x([[N,/^[\s]+/,null," \t\r\n"],[g,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[m,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),C(x([],[[g,/^[\s\S]+/]]),["uq.val"]),C(w({keywords:a,hashComments:!0,cStyleComments:!0,types:u}),["c","cc","cpp","cxx","cyc","m"]),C(w({keywords:"null,true,false"}),["json"]),C(w({keywords:i,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:u}),["cs"]),C(w({keywords:o,cStyleComments:!0}),["java"]),C(w({keywords:n,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),C(w({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),C(w({keywords:s,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),C(w({keywords:c,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),C(w({keywords:r,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),C(w({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),C(x([],[[d,/^[\s\S]+/]]),["regex"]),b=_.PR={createSimpleLexer:x,registerLangHandler:C,sourceDecorator:w,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:g,PR_COMMENT:f,PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:h,PR_NOCODE:"nocode",PR_PLAIN:N,PR_PUNCTUATION:m,PR_SOURCE:L,PR_STRING:d,PR_TAG:"tag",PR_TYPE:p,prettyPrintOne:E,prettyPrint:k},"function"==typeof(v=_.define)&&v.amd&&v("google-code-prettify",[],function(){return b})},{}],2:[function(e,t,n){"use strict";e("code-prettify"),window.addEventListener("load",function(){PR.prettyPrint();var e=document.querySelectorAll("ul.nav-tabs");function t(e){e.preventDefault();var t=e.currentTarget,n=t.closest("ul.nav-tabs"),r=n.querySelector("li.active"),a=document.querySelector(".tab-pane.active");r&&r.classList.remove("active"),a&&a.classList.remove("active");r=e.target.getAttribute("href"),t.classList.add("active"),a=document.querySelector(r);a&&a.classList.add("active"),localStorage.setItem("activeTab_"+n.id,r)}e.forEach(function(e){e.querySelectorAll("li").forEach(function(e){e.addEventListener("click",t)})}),e.forEach(function(e){var t="activeTab_"+e.id,t=localStorage.getItem(t);t&&(e=e.querySelector('a[href="'+t+'"]'))&&e.click()})}),window.addEventListener("load",function(){PR.prettyPrint();document.querySelectorAll("ul.nav.nav-tabs-apiauth li").forEach(function(e){e.addEventListener("click",function(e){e.preventDefault();var e=e.currentTarget.querySelector("a").getAttribute("href"),t=document.querySelector(e),n=document.querySelectorAll("div.apiauth");t&&(t.removeAttribute("hidden"),localStorage.setItem("activeFilterDiv",e)),n.forEach(function(e){e!==t&&e.setAttribute("hidden","")})})});var e=localStorage.getItem("activeFilterDiv");e&&(e=(e=document.querySelector('a[href="'+e+'"]'))||document.querySelector("ul.nav.nav-tabs-apiauth li:first-child"))&&e.click()}),window.addEventListener("load",function(){PR.prettyPrint();var e=document.querySelector("button.orderapi-activate"),e=(e&&e.addEventListener("click",function(){var e=document.getElementById("orderAPICheckbox");"Activate"===this.textContent.trim()?e.checked=!0:e.checked=!1}),document.querySelector("button.restapi-activate"));e&&e.addEventListener("click",function(){var e=document.getElementById("restAPICheckbox");"Activate"===this.textContent.trim()?e.checked=!0:e.checked=!1})}),window.addEventListener("load",function(){PR.prettyPrint();var e=document.querySelector("div.auth-cards"),t=document.querySelector("a.basic-auth-btn"),n=document.querySelector("a.bearer-token-btn"),r=document.querySelector("div.basic-auth-form"),a=document.querySelector("div.bearer-token-form"),o=document.querySelector("input#basicauth"),i=document.querySelector("input#bearertoken"),t=(t&&t.addEventListener("click",function(){r.removeAttribute("hidden"),e.setAttribute("hidden","true"),o.value="basic_auth"}),n&&n.addEventListener("click",function(){a.removeAttribute("hidden"),e.setAttribute("hidden","true"),i.value="bearer_token"}),document.querySelector("a.basic-auth-prev")),n=document.querySelector("a.bearer-token-prev");function s(e){e.preventDefault(),location.reload()}t&&t.addEventListener("click",s),n&&n.addEventListener("click",s)}),window.addEventListener("load",function(){PR.prettyPrint();var e=document.querySelector("#type"),t=document.querySelector("#url"),n=document.querySelector("#id");function r(){n.removeAttribute("required")}t&&t.addEventListener("keydown",function(e){9!==e.keyCode&&13!==e.keyCode||r()}),n&&n.addEventListener("click",function(){r()}),t&&t.addEventListener("click",function(){r()}),e&&e.addEventListener("click",function(){r()})}),document.addEventListener("DOMContentLoaded",function(){var e=document.getElementById("method"),t=document.getElementById("bodyLabel"),n=document.getElementById("body");e&&e.addEventListener("change",function(){var e=this.value;"post"===e||"patch"===e?(t.removeAttribute("hidden"),n.removeAttribute("hidden")):(t.setAttribute("hidden","true"),n.setAttribute("hidden","true"))})})},{"code-prettify":1}]},{},[2]);
     1!(function r(a, o, i) {
     2  function s(t, e) {
     3    if (!o[t]) {
     4      if (!a[t]) {
     5        var n = "function" == typeof require && require;
     6        if (!e && n) return n(t, !0);
     7        if (l) return l(t, !0);
     8        throw (
     9          (((e = new Error("Cannot find module '" + t + "'")).code =
     10            "MODULE_NOT_FOUND"),
     11          e)
     12        );
     13      }
     14      (n = o[t] = { exports: {} }),
     15        a[t][0].call(
     16          n.exports,
     17          function (e) {
     18            return s(a[t][1][e] || e);
     19          },
     20          n,
     21          n.exports,
     22          r,
     23          a,
     24          o,
     25          i
     26        );
     27    }
     28    return o[t].exports;
     29  }
     30  for (
     31    var l = "function" == typeof require && require, e = 0;
     32    e < i.length;
     33    e++
     34  )
     35    s(i[e]);
     36  return s;
     37})(
     38  {
     39    1: [
     40      function (e, t, $) {
     41        var _, n, r, a, o, i, s, l, c, u, d, f, p, h, m, N, L, g, A, v, y, b;
     42        function S(e) {
     43          for (var c = 0, u = !1, t = !1, n = 0, r = e.length; n < r; ++n)
     44            if ((i = e[n]).ignoreCase) t = !0;
     45            else if (
     46              /[a-z]/i.test(
     47                i.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, "")
     48              )
     49            ) {
     50              t = !(u = !0);
     51              break;
     52            }
     53          var a = { b: 8, t: 9, n: 10, v: 11, f: 12, r: 13 };
     54          function d(e) {
     55            var t = e.charCodeAt(0);
     56            return 92 !== t
     57              ? t
     58              : ((t = e.charAt(1)),
     59                a[t] ||
     60                  ("0" <= t && t <= "7"
     61                    ? parseInt(e.substring(1), 8)
     62                    : "u" === t || "x" === t
     63                    ? parseInt(e.substring(2), 16)
     64                    : e.charCodeAt(1)));
     65          }
     66          function f(e) {
     67            return e < 32
     68              ? (e < 16 ? "\\x0" : "\\x") + e.toString(16)
     69              : "\\" === (e = String.fromCharCode(e)) ||
     70                "-" === e ||
     71                "]" === e ||
     72                "^" === e
     73              ? "\\" + e
     74              : e;
     75          }
     76          function o(e) {
     77            for (
     78              var t = e.source.match(
     79                  new RegExp(
     80                    "(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)",
     81                    "g"
     82                  )
     83                ),
     84                n = t.length,
     85                r = [],
     86                a = 0,
     87                o = 0;
     88              a < n;
     89              ++a
     90            )
     91              "(" === (s = t[a])
     92                ? ++o
     93                : "\\" === s.charAt(0) &&
     94                  (i = +s.substring(1)) &&
     95                  (i <= o ? (r[i] = -1) : (t[a] = f(i)));
     96            for (a = 1; a < r.length; ++a) -1 === r[a] && (r[a] = ++c);
     97            for (var i, a = 0, o = 0; a < n; ++a)
     98              "(" === (s = t[a])
     99                ? r[++o] || (t[a] = "(?:")
     100                : "\\" === s.charAt(0) &&
     101                  (i = +s.substring(1)) &&
     102                  i <= o &&
     103                  (t[a] = "\\" + r[i]);
     104            for (a = 0; a < n; ++a)
     105              "^" === t[a] && "^" !== t[a + 1] && (t[a] = "");
     106            if (e.ignoreCase && u)
     107              for (a = 0; a < n; ++a) {
     108                var s,
     109                  l = (s = t[a]).charAt(0);
     110                2 <= s.length && "[" === l
     111                  ? (t[a] = (function (e) {
     112                      var t = e
     113                          .substring(1, e.length - 1)
     114                          .match(
     115                            new RegExp(
     116                              "\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]",
     117                              "g"
     118                            )
     119                          ),
     120                        n = [],
     121                        e = "^" === t[0],
     122                        r = ["["];
     123                      e && r.push("^");
     124                      for (var a = e ? 1 : 0, o = t.length; a < o; ++a) {
     125                        var i,
     126                          s = t[a];
     127                        /\\[bdsw]/i.test(s)
     128                          ? r.push(s)
     129                          : ((s = d(s)),
     130                            a + 2 < o && "-" === t[a + 1]
     131                              ? ((i = d(t[a + 2])), (a += 2))
     132                              : (i = s),
     133                            n.push([s, i]),
     134                            i < 65 ||
     135                              122 < s ||
     136                              (i < 65 ||
     137                                90 < s ||
     138                                n.push([
     139                                  32 | Math.max(65, s),
     140                                  32 | Math.min(i, 90),
     141                                ]),
     142                              i < 97) ||
     143                              122 < s ||
     144                              n.push([
     145                                -33 & Math.max(97, s),
     146                                -33 & Math.min(i, 122),
     147                              ]));
     148                      }
     149                      n.sort(function (e, t) {
     150                        return e[0] - t[0] || t[1] - e[1];
     151                      });
     152                      for (var l = [], c = [], a = 0; a < n.length; ++a)
     153                        (u = n[a])[0] <= c[1] + 1
     154                          ? (c[1] = Math.max(c[1], u[1]))
     155                          : l.push((c = u));
     156                      for (a = 0; a < l.length; ++a) {
     157                        var u = l[a];
     158                        r.push(f(u[0])),
     159                          u[1] > u[0] &&
     160                            (u[1] + 1 > u[0] && r.push("-"), r.push(f(u[1])));
     161                      }
     162                      return r.push("]"), r.join("");
     163                    })(s))
     164                  : "\\" !== l &&
     165                    (t[a] = s.replace(/[a-zA-Z]/g, function (e) {
     166                      e = e.charCodeAt(0);
     167                      return "[" + String.fromCharCode(-33 & e, 32 | e) + "]";
     168                    }));
     169              }
     170            return t.join("");
     171          }
     172          for (var i, s = [], n = 0, r = e.length; n < r; ++n) {
     173            if ((i = e[n]).global || i.multiline) throw new Error("" + i);
     174            s.push("(?:" + o(i) + ")");
     175          }
     176          return new RegExp(s.join("|"), t ? "gi" : "g");
     177        }
     178        function P(e, o) {
     179          var i = /(?:^|\s)nocode(?:\s|$)/,
     180            s = [],
     181            l = 0,
     182            c = [],
     183            u = 0;
     184          return (
     185            (function e(t) {
     186              var n = t.nodeType;
     187              if (1 == n) {
     188                if (!i.test(t.className)) {
     189                  for (var r = t.firstChild; r; r = r.nextSibling) e(r);
     190                  var a = t.nodeName.toLowerCase();
     191                  ("br" !== a && "li" !== a) ||
     192                    ((s[u] = "\n"), (c[u << 1] = l++), (c[(u++ << 1) | 1] = t));
     193                }
     194              } else
     195                (3 != n && 4 != n) ||
     196                  ((a = t.nodeValue).length &&
     197                    ((a = o
     198                      ? a.replace(/\r\n?/g, "\n")
     199                      : a.replace(/[ \t\r\n]+/g, " ")),
     200                    (s[u] = a),
     201                    (c[u << 1] = l),
     202                    (l += a.length),
     203                    (c[(u++ << 1) | 1] = t)));
     204            })(e),
     205            { sourceCode: s.join("").replace(/\n$/, ""), spans: c }
     206          );
     207        }
     208        function q(e, t, n, r, a) {
     209          n &&
     210            (r(
     211              (r = {
     212                sourceNode: e,
     213                pre: 1,
     214                langExtension: null,
     215                numberLines: null,
     216                sourceCode: n,
     217                spans: null,
     218                basePos: t,
     219                decorations: null,
     220              })
     221            ),
     222            a.push.apply(a, r.decorations));
     223        }
     224        function x(e, x) {
     225          for (
     226            var w, C = {}, t = e.concat(x), n = [], r = {}, a = 0, o = t.length;
     227            a < o;
     228            ++a
     229          ) {
     230            var i = t[a],
     231              s = i[3];
     232            if (s) for (var l = s.length; 0 <= --l; ) C[s.charAt(l)] = i;
     233            var c = i[1],
     234              u = "" + c;
     235            r.hasOwnProperty(u) || (n.push(c), (r[u] = null));
     236          }
     237          n.push(/[\0-\uffff]/), (w = S(n));
     238          function E(e) {
     239            for (
     240              var t = e.sourceCode,
     241                n = e.basePos,
     242                r = e.sourceNode,
     243                a = [n, N],
     244                o = 0,
     245                i = t.match(w) || [],
     246                s = {},
     247                l = 0,
     248                c = i.length;
     249              l < c;
     250              ++l
     251            ) {
     252              var u,
     253                d = i[l],
     254                f = s[d],
     255                p = void 0;
     256              if ("string" == typeof f) u = !1;
     257              else {
     258                var h = C[d.charAt(0)];
     259                if (h) (p = d.match(h[1])), (f = h[0]);
     260                else {
     261                  for (var m = 0; m < k; ++m)
     262                    if (((h = x[m]), (p = d.match(h[1])))) {
     263                      f = h[0];
     264                      break;
     265                    }
     266                  p || (f = N);
     267                }
     268                !(u = 5 <= f.length && "lang-" === f.substring(0, 5)) ||
     269                  (p && "string" == typeof p[1]) ||
     270                  ((u = !1), (f = L)),
     271                  u || (s[d] = f);
     272              }
     273              var g,
     274                v,
     275                y,
     276                b,
     277                S = o;
     278              (o += d.length),
     279                u
     280                  ? ((g = p[1]),
     281                    (y = (v = d.indexOf(g)) + g.length),
     282                    p[2] && (v = (y = d.length - p[2].length) - g.length),
     283                    (b = f.substring(5)),
     284                    q(r, n + S, d.substring(0, v), E, a),
     285                    q(r, n + S + v, g, T(b, g), a),
     286                    q(r, n + S + y, d.substring(y), E, a))
     287                  : a.push(n + S, f);
     288            }
     289            e.decorations = a;
     290          }
     291          var k = x.length;
     292          return E;
     293        }
     294        function w(e) {
     295          var t = [],
     296            n = [],
     297            r =
     298              (e.tripleQuotedStrings
     299                ? t.push([
     300                    d,
     301                    /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
     302                    null,
     303                    "'\"",
     304                  ])
     305                : e.multiLineStrings
     306                ? t.push([
     307                    d,
     308                    /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
     309                    null,
     310                    "'\"`",
     311                  ])
     312                : t.push([
     313                    d,
     314                    /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
     315                    null,
     316                    "\"'",
     317                  ]),
     318              e.verbatimStrings &&
     319                n.push([d, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]),
     320              e.hashComments),
     321            r =
     322              (r &&
     323                (e.cStyleComments
     324                  ? (t.push(
     325                      1 < r
     326                        ? [
     327                            f,
     328                            /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,
     329                            null,
     330                            "#",
     331                          ]
     332                        : [
     333                            f,
     334                            /^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,
     335                            null,
     336                            "#",
     337                          ]
     338                    ),
     339                    n.push([
     340                      d,
     341                      /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,
     342                      null,
     343                    ]))
     344                  : t.push([f, /^#[^\r\n]*/, null, "#"])),
     345              e.cStyleComments &&
     346                (n.push([f, /^\/\/[^\r\n]*/, null]),
     347                n.push([f, /^\/\*[\s\S]*?(?:\*\/|$)/, null])),
     348              e.regexLiterals),
     349            r =
     350              (r &&
     351                ((a = (r = 1 < r ? "" : "\n\r") ? "." : "[\\S\\s]"),
     352                n.push([
     353                  "lang-regex",
     354                  RegExp(
     355                    "^(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*(" +
     356                      ("/(?=[^/*" +
     357                        r +
     358                        "])(?:[^/\\x5B\\x5C" +
     359                        r +
     360                        "]|\\x5C" +
     361                        a +
     362                        "|\\x5B(?:[^\\x5C\\x5D" +
     363                        r +
     364                        "]|\\x5C" +
     365                        a +
     366                        ")*(?:\\x5D|$))+/") +
     367                      ")"
     368                  ),
     369                ])),
     370              e.types),
     371            a = (r && n.push([p, r]), ("" + e.keywords).replace(/^ | $/g, "")),
     372            r =
     373              (a.length &&
     374                n.push([
     375                  "kwd",
     376                  new RegExp("^(?:" + a.replace(/[\s,]+/g, "|") + ")\\b"),
     377                  null,
     378                ]),
     379              t.push([N, /^\s+/, null, " \r\n\t "]),
     380              "^.[^\\s\\w.$@'\"`/\\\\]*");
     381          return (
     382            e.regexLiterals && (r += "(?!s*/)"),
     383            n.push(
     384              [h, /^@[a-z_$][a-z_$@0-9]*/i, null],
     385              [p, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
     386              [N, /^[a-z_$][a-z_$@0-9]*/i, null],
     387              [
     388                h,
     389                new RegExp(
     390                  "^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*",
     391                  "i"
     392                ),
     393                null,
     394                "0123456789",
     395              ],
     396              [N, /^\\[\s\S]?/, null],
     397              [m, new RegExp(r), null]
     398            ),
     399            x(t, n)
     400          );
     401        }
     402        function R(e, t, i) {
     403          for (
     404            var s = /(?:^|\s)nocode(?:\s|$)/,
     405              l = /\r\n?|\n/,
     406              c = e.ownerDocument,
     407              n = c.createElement("li");
     408            e.firstChild;
     409
     410          )
     411            n.appendChild(e.firstChild);
     412          var r = [n];
     413          function u(e) {
     414            for (; !e.nextSibling; ) if (!(e = e.parentNode)) return;
     415            for (
     416              var t,
     417                n = (function e(t, n) {
     418                  var n = n ? t.cloneNode(!1) : t,
     419                    r = t.parentNode;
     420                  if (r) {
     421                    var a = e(r, 1),
     422                      o = t.nextSibling;
     423                    a.appendChild(n);
     424                    for (var i = o; i; i = o)
     425                      (o = i.nextSibling), a.appendChild(i);
     426                  }
     427                  return n;
     428                })(e.nextSibling, 0);
     429              (t = n.parentNode) && 1 === t.nodeType;
     430
     431            )
     432              n = t;
     433            r.push(n);
     434          }
     435          for (var a = 0; a < r.length; ++a)
     436            !(function e(t) {
     437              var n,
     438                r,
     439                a = t.nodeType;
     440              if (1 != a || s.test(t.className))
     441                (3 != a && 4 != a) ||
     442                  !i ||
     443                  ((n = (a = t.nodeValue).match(l)) &&
     444                    ((r = a.substring(0, n.index)),
     445                    (t.nodeValue = r),
     446                    (a = a.substring(n.index + n[0].length)) &&
     447                      t.parentNode.insertBefore(
     448                        c.createTextNode(a),
     449                        t.nextSibling
     450                      ),
     451                    u(t),
     452                    r || t.parentNode.removeChild(t)));
     453              else if ("br" === t.nodeName)
     454                u(t), t.parentNode && t.parentNode.removeChild(t);
     455              else for (var o = t.firstChild; o; o = o.nextSibling) e(o);
     456            })(r[a]);
     457          t === (0 | t) && r[0].setAttribute("value", t);
     458          for (
     459            var o = c.createElement("ol"),
     460              d = ((o.className = "linenums"), Math.max(0, (t - 1) | 0) || 0),
     461              a = 0,
     462              f = r.length;
     463            a < f;
     464            ++a
     465          )
     466            ((n = r[a]).className = "L" + ((a + d) % 10)),
     467              n.firstChild || n.appendChild(c.createTextNode(" ")),
     468              o.appendChild(n);
     469          e.appendChild(o);
     470        }
     471        function C(e, t) {
     472          for (var n = t.length; 0 <= --n; ) {
     473            var r = t[n];
     474            y.hasOwnProperty(r)
     475              ? _.console &&
     476                console.warn("cannot override language handler %s", r)
     477              : (y[r] = e);
     478          }
     479        }
     480        function T(e, t) {
     481          return (
     482            (e && y.hasOwnProperty(e)) ||
     483              (e = /^\s*</.test(t) ? "default-markup" : "default-code"),
     484            y[e]
     485          );
     486        }
     487        function I(e) {
     488          var t = e.langExtension;
     489          try {
     490            var n,
     491              r,
     492              a = P(e.sourceNode, e.pre),
     493              o = a.sourceCode,
     494              i =
     495                ((e.sourceCode = o),
     496                (e.spans = a.spans),
     497                (e.basePos = 0),
     498                T(t, o)(e),
     499                e),
     500              s = (s = /\bMSIE\s(\d+)/.exec(navigator.userAgent)) && +s[1] <= 8,
     501              l = /\n/g,
     502              c = i.sourceCode,
     503              u = c.length,
     504              d = 0,
     505              f = i.spans,
     506              p = f.length,
     507              h = 0,
     508              m = i.decorations,
     509              g = 0;
     510            for (m[(S = m.length)] = u, r = n = 0; r < S; )
     511              m[r] !== m[r + 2]
     512                ? ((m[n++] = m[r++]), (m[n++] = m[r++]))
     513                : (r += 2);
     514            for (S = n, r = n = 0; r < S; ) {
     515              for (
     516                var v = m[r], y = m[r + 1], b = r + 2;
     517                b + 2 <= S && m[b + 1] === y;
     518
     519              )
     520                b += 2;
     521              (m[n++] = v), (m[n++] = y), (r = b);
     522            }
     523            var S = (m.length = n),
     524              i = i.sourceNode,
     525              x = "";
     526            i && ((x = i.style.display), (i.style.display = "none"));
     527            try {
     528              for (; h < p; ) {
     529                f[h];
     530                var w,
     531                  C,
     532                  E,
     533                  k,
     534                  N = f[h + 2] || u,
     535                  L = m[g + 2] || u,
     536                  b = Math.min(N, L),
     537                  A = f[h + 1];
     538                1 !== A.nodeType &&
     539                  (w = c.substring(d, b)) &&
     540                  (s && (w = w.replace(l, "\r")),
     541                  (A.nodeValue = w),
     542                  ((E = (C = A.ownerDocument).createElement("span")).className =
     543                    m[g + 1]),
     544                  (k = A.parentNode).replaceChild(E, A),
     545                  E.appendChild(A),
     546                  d < N) &&
     547                  ((f[h + 1] = A = C.createTextNode(c.substring(b, N))),
     548                  k.insertBefore(A, E.nextSibling)),
     549                  N <= (d = b) && (h += 2),
     550                  L <= d && (g += 2);
     551              }
     552            } finally {
     553              i && (i.style.display = x);
     554            }
     555          } catch (e) {
     556            _.console && console.log((e && e.stack) || e);
     557          }
     558        }
     559        function E(e, t, n) {
     560          var n = n || !1,
     561            t = t || null,
     562            r = document.createElement("div");
     563          return (
     564            (r.innerHTML = "<pre>" + e + "</pre>"),
     565            (r = r.firstChild),
     566            n && R(r, n, !0),
     567            I({
     568              langExtension: t,
     569              numberLines: n,
     570              sourceNode: r,
     571              pre: 1,
     572              sourceCode: null,
     573              basePos: null,
     574              spans: null,
     575              decorations: null,
     576            }),
     577            r.innerHTML
     578          );
     579        }
     580        function k(m, e) {
     581          var t = e || document.body,
     582            g = t.ownerDocument || document;
     583          function n(e) {
     584            return t.getElementsByTagName(e);
     585          }
     586          for (
     587            var r = [n("pre"), n("code"), n("xmp")], v = [], a = 0;
     588            a < r.length;
     589            ++a
     590          )
     591            for (var o = 0, i = r[a].length; o < i; ++o) v.push(r[a][o]);
     592          var r = null,
     593            y = Date,
     594            b =
     595              (y.now ||
     596                (y = {
     597                  now: function () {
     598                    return +new Date();
     599                  },
     600                }),
     601              0),
     602            S = /\blang(?:uage)?-([\w.]+)(?!\S)/,
     603            x = /\bprettyprint\b/,
     604            w = /\bprettyprinted\b/,
     605            C = /pre|xmp/i,
     606            E = /^code$/i,
     607            k = /^(?:pre|code|xmp)$/i,
     608            N = {};
     609          !(function e() {
     610            for (
     611              var t = _.PR_SHOULD_USE_CONTINUATION ? y.now() + 250 : 1 / 0;
     612              b < v.length && y.now() < t;
     613              b++
     614            ) {
     615              for (var n = v[b], r = N, a = n; (a = a.previousSibling); ) {
     616                var o = a.nodeType,
     617                  i = (7 === o || 8 === o) && a.nodeValue;
     618                if (
     619                  i
     620                    ? !/^\??prettify\b/.test(i)
     621                    : 3 !== o || /\S/.test(a.nodeValue)
     622                )
     623                  break;
     624                if (i) {
     625                  (r = {}),
     626                    i.replace(/\b(\w+)=([\w:.%+-]+)/g, function (e, t, n) {
     627                      r[t] = n;
     628                    });
     629                  break;
     630                }
     631              }
     632              var s = n.className;
     633              if ((r !== N || x.test(s)) && !w.test(s)) {
     634                for (
     635                  var l, c, u, d, f = !1, p = n.parentNode;
     636                  p;
     637                  p = p.parentNode
     638                ) {
     639                  var h = p.tagName;
     640                  if (k.test(h) && p.className && x.test(p.className)) {
     641                    f = !0;
     642                    break;
     643                  }
     644                }
     645                f ||
     646                  ((n.className += " prettyprinted"),
     647                  (l =
     648                    (l = r.lang) ||
     649                    ((l =
     650                      !(l = s.match(S)) &&
     651                      (c = (function (e) {
     652                        for (
     653                          var t = void 0, n = e.firstChild;
     654                          n;
     655                          n = n.nextSibling
     656                        )
     657                          var r = n.nodeType,
     658                            t =
     659                              1 === r
     660                                ? t
     661                                  ? e
     662                                  : n
     663                                : 3 === r && A.test(n.nodeValue)
     664                                ? e
     665                                : t;
     666                        return t === e ? void 0 : t;
     667                      })(n)) &&
     668                      E.test(c.tagName)
     669                        ? c.className.match(S)
     670                        : l) &&
     671                      l[1])),
     672                  (u = C.test(n.tagName)
     673                    ? 1
     674                    : ((c = n.currentStyle),
     675                      (u = g.defaultView),
     676                      (u = c
     677                        ? c.whiteSpace
     678                        : u && u.getComputedStyle
     679                        ? u
     680                            .getComputedStyle(n, null)
     681                            .getPropertyValue("white-space")
     682                        : 0) && "pre" === u.substring(0, 3))),
     683                  (d =
     684                    (d = "true" === (d = r.linenums) || +d) ||
     685                    (!!(d = s.match(/\blinenums\b(?::(\d+))?/)) &&
     686                      (!d[1] || !d[1].length || +d[1]))) && R(n, d, u),
     687                  I({
     688                    langExtension: l,
     689                    sourceNode: n,
     690                    numberLines: d,
     691                    pre: u,
     692                    sourceCode: null,
     693                    basePos: null,
     694                    spans: null,
     695                    decorations: null,
     696                  }));
     697              }
     698            }
     699            b < v.length ? _.setTimeout(e, 250) : "function" == typeof m && m();
     700          })();
     701        }
     702        (window.PR_SHOULD_USE_CONTINUATION = !0),
     703          (_ = window),
     704          (u =
     705            /^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/),
     706          (d = "str"),
     707          (f = "com"),
     708          (p = "typ"),
     709          (h = "lit"),
     710          (m = "pun"),
     711          (N = "pln"),
     712          (L = "src"),
     713          (g = "atv"),
     714          (A = /\S/),
     715          (v = w({
     716            keywords: [
     717              (a = [
     718                (r = [
     719                  [
     720                    (n = ["break,continue,do,else,for,if,return,while"]),
     721                    "auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile",
     722                  ],
     723                  "catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof",
     724                ]),
     725                "alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where",
     726              ]),
     727              (i = [
     728                r,
     729                "abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield",
     730              ]),
     731              (o = [
     732                r,
     733                "abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient",
     734              ]),
     735              (r = [
     736                r,
     737                "abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN",
     738              ]),
     739              (s =
     740                "caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"),
     741              (l = [
     742                n,
     743                "and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None",
     744              ]),
     745              (c = [
     746                n,
     747                "alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END",
     748              ]),
     749              (n = [
     750                n,
     751                "case,done,elif,esac,eval,fi,function,in,local,set,then,until",
     752              ]),
     753            ],
     754            hashComments: !0,
     755            cStyleComments: !0,
     756            multiLineStrings: !0,
     757            regexLiterals: !0,
     758          })),
     759          (y = {}),
     760          C(v, ["default-code"]),
     761          C(
     762            x(
     763              [],
     764              [
     765                [N, /^[^<?]+/],
     766                ["dec", /^<!\w[^>]*(?:>|$)/],
     767                [f, /^<\!--[\s\S]*?(?:-\->|$)/],
     768                ["lang-", /^<\?([\s\S]+?)(?:\?>|$)/],
     769                ["lang-", /^<%([\s\S]+?)(?:%>|$)/],
     770                [m, /^(?:<[%?]|[%?]>)/],
     771                ["lang-", /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
     772                ["lang-js", /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
     773                ["lang-css", /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
     774                ["lang-in.tag", /^(<\/?[a-z][^<>]*>)/i],
     775              ]
     776            ),
     777            ["default-markup", "htm", "html", "mxml", "xhtml", "xml", "xsl"]
     778          ),
     779          C(
     780            x(
     781              [
     782                [N, /^[\s]+/, null, " \t\r\n"],
     783                [g, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, "\"'"],
     784              ],
     785              [
     786                ["tag", /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
     787                ["atn", /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
     788                ["lang-uq.val", /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
     789                [m, /^[=<>\/]+/],
     790                ["lang-js", /^on\w+\s*=\s*\"([^\"]+)\"/i],
     791                ["lang-js", /^on\w+\s*=\s*\'([^\']+)\'/i],
     792                ["lang-js", /^on\w+\s*=\s*([^\"\'>\s]+)/i],
     793                ["lang-css", /^style\s*=\s*\"([^\"]+)\"/i],
     794                ["lang-css", /^style\s*=\s*\'([^\']+)\'/i],
     795                ["lang-css", /^style\s*=\s*([^\"\'>\s]+)/i],
     796              ]
     797            ),
     798            ["in.tag"]
     799          ),
     800          C(x([], [[g, /^[\s\S]+/]]), ["uq.val"]),
     801          C(
     802            w({ keywords: a, hashComments: !0, cStyleComments: !0, types: u }),
     803            ["c", "cc", "cpp", "cxx", "cyc", "m"]
     804          ),
     805          C(w({ keywords: "null,true,false" }), ["json"]),
     806          C(
     807            w({
     808              keywords: i,
     809              hashComments: !0,
     810              cStyleComments: !0,
     811              verbatimStrings: !0,
     812              types: u,
     813            }),
     814            ["cs"]
     815          ),
     816          C(w({ keywords: o, cStyleComments: !0 }), ["java"]),
     817          C(w({ keywords: n, hashComments: !0, multiLineStrings: !0 }), [
     818            "bash",
     819            "bsh",
     820            "csh",
     821            "sh",
     822          ]),
     823          C(
     824            w({
     825              keywords: l,
     826              hashComments: !0,
     827              multiLineStrings: !0,
     828              tripleQuotedStrings: !0,
     829            }),
     830            ["cv", "py", "python"]
     831          ),
     832          C(
     833            w({
     834              keywords: s,
     835              hashComments: !0,
     836              multiLineStrings: !0,
     837              regexLiterals: 2,
     838            }),
     839            ["perl", "pl", "pm"]
     840          ),
     841          C(
     842            w({
     843              keywords: c,
     844              hashComments: !0,
     845              multiLineStrings: !0,
     846              regexLiterals: !0,
     847            }),
     848            ["rb", "ruby"]
     849          ),
     850          C(w({ keywords: r, cStyleComments: !0, regexLiterals: !0 }), [
     851            "javascript",
     852            "js",
     853            "ts",
     854            "typescript",
     855          ]),
     856          C(
     857            w({
     858              keywords:
     859                "all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",
     860              hashComments: 3,
     861              cStyleComments: !0,
     862              multilineStrings: !0,
     863              tripleQuotedStrings: !0,
     864              regexLiterals: !0,
     865            }),
     866            ["coffee"]
     867          ),
     868          C(x([], [[d, /^[\s\S]+/]]), ["regex"]),
     869          (b = _.PR =
     870            {
     871              createSimpleLexer: x,
     872              registerLangHandler: C,
     873              sourceDecorator: w,
     874              PR_ATTRIB_NAME: "atn",
     875              PR_ATTRIB_VALUE: g,
     876              PR_COMMENT: f,
     877              PR_DECLARATION: "dec",
     878              PR_KEYWORD: "kwd",
     879              PR_LITERAL: h,
     880              PR_NOCODE: "nocode",
     881              PR_PLAIN: N,
     882              PR_PUNCTUATION: m,
     883              PR_SOURCE: L,
     884              PR_STRING: d,
     885              PR_TAG: "tag",
     886              PR_TYPE: p,
     887              prettyPrintOne: E,
     888              prettyPrint: k,
     889            }),
     890          "function" == typeof (v = _.define) &&
     891            v.amd &&
     892            v("google-code-prettify", [], function () {
     893              return b;
     894            });
     895      },
     896      {},
     897    ],
     898    2: [
     899      function (e, t, n) {
     900        "use strict";
     901        e("code-prettify"),
     902          window.addEventListener("load", function () {
     903            PR.prettyPrint();
     904            var e = document.querySelectorAll("ul.nav-tabs");
     905            function t(e) {
     906              e.preventDefault();
     907              var t = e.currentTarget,
     908                n = t.closest("ul.nav-tabs"),
     909                r = n.querySelector("li.active"),
     910                a = document.querySelector(".tab-pane.active");
     911              r && r.classList.remove("active"),
     912                a && a.classList.remove("active");
     913              (r = e.target.getAttribute("href")),
     914                t.classList.add("active"),
     915                (a = document.querySelector(r));
     916              a && a.classList.add("active"),
     917                localStorage.setItem("activeTab_" + n.id, r);
     918            }
     919            e.forEach(function (e) {
     920              e.querySelectorAll("li").forEach(function (e) {
     921                e.addEventListener("click", t);
     922              });
     923            }),
     924              e.forEach(function (e) {
     925                var t = "activeTab_" + e.id,
     926                  t = localStorage.getItem(t);
     927                t && (e = e.querySelector('a[href="' + t + '"]')) && e.click();
     928              });
     929          }),
     930          window.addEventListener("load", function () {
     931            PR.prettyPrint();
     932            document
     933              .querySelectorAll("ul.nav.nav-tabs-apiauth li")
     934              .forEach(function (e) {
     935                e.addEventListener("click", function (e) {
     936                  e.preventDefault();
     937                  var e = e.currentTarget
     938                      .querySelector("a")
     939                      .getAttribute("href"),
     940                    t = document.querySelector(e),
     941                    n = document.querySelectorAll("div.apiauth");
     942                  t &&
     943                    (t.removeAttribute("hidden"),
     944                    localStorage.setItem("activeFilterDiv", e)),
     945                    n.forEach(function (e) {
     946                      e !== t && e.setAttribute("hidden", "");
     947                    });
     948                });
     949              });
     950            var e = localStorage.getItem("activeFilterDiv");
     951            e &&
     952              (e =
     953                (e = document.querySelector('a[href="' + e + '"]')) ||
     954                document.querySelector(
     955                  "ul.nav.nav-tabs-apiauth li:first-child"
     956                )) &&
     957              e.click();
     958          }),
     959          window.addEventListener("load", function () {
     960            PR.prettyPrint();
     961            var e = document.querySelector("button.orderapi-activate"),
     962              e =
     963                (e &&
     964                  e.addEventListener("click", function () {
     965                    var e = document.getElementById("orderAPICheckbox");
     966                    "Activate" === this.textContent.trim()
     967                      ? (e.checked = !0)
     968                      : (e.checked = !1);
     969                  }),
     970                document.querySelector("button.restapi-activate")),
     971              e =
     972                (e &&
     973                  e.addEventListener("click", function () {
     974                    var e = document.getElementById("restAPICheckbox");
     975                    "Activate" === this.textContent.trim()
     976                      ? (e.checked = !0)
     977                      : (e.checked = !1);
     978                  }),
     979                document.querySelector("button.apilogs-activate"));
     980            e &&
     981              e.addEventListener("click", function () {
     982                var e = document.getElementById("apiLogsCheckbox");
     983                "Activate" === this.textContent.trim()
     984                  ? (e.checked = !0)
     985                  : (e.checked = !1);
     986              });
     987          }),
     988          window.addEventListener("load", function () {
     989            PR.prettyPrint();
     990            var e = document.querySelector("div.auth-cards"),
     991              t = document.querySelector("a.basic-auth-btn"),
     992              n = document.querySelector("a.bearer-token-btn"),
     993              r = document.querySelector("div.basic-auth-form"),
     994              a = document.querySelector("div.bearer-token-form"),
     995              o = document.querySelector("input#basicauth"),
     996              i = document.querySelector("input#bearertoken"),
     997              t =
     998                (t &&
     999                  t.addEventListener("click", function () {
     1000                    r.removeAttribute("hidden"),
     1001                      e.setAttribute("hidden", "true"),
     1002                      (o.value = "basic_auth");
     1003                  }),
     1004                n &&
     1005                  n.addEventListener("click", function () {
     1006                    a.removeAttribute("hidden"),
     1007                      e.setAttribute("hidden", "true"),
     1008                      (i.value = "bearer_token");
     1009                  }),
     1010                document.querySelector("a.basic-auth-prev")),
     1011              n = document.querySelector("a.bearer-token-prev");
     1012            function s(e) {
     1013              e.preventDefault(), location.reload();
     1014            }
     1015            t && t.addEventListener("click", s),
     1016              n && n.addEventListener("click", s);
     1017          }),
     1018          window.addEventListener("load", function () {
     1019            PR.prettyPrint();
     1020            var e = document.querySelector("#type"),
     1021              t = document.querySelector("#url"),
     1022              n = document.querySelector("#id");
     1023            function r() {
     1024              n.removeAttribute("required");
     1025            }
     1026            t &&
     1027              t.addEventListener("keydown", function (e) {
     1028                (9 !== e.keyCode && 13 !== e.keyCode) || r();
     1029              }),
     1030              n &&
     1031                n.addEventListener("click", function () {
     1032                  r();
     1033                }),
     1034              t &&
     1035                t.addEventListener("click", function () {
     1036                  r();
     1037                }),
     1038              e &&
     1039                e.addEventListener("click", function () {
     1040                  r();
     1041                });
     1042          }),
     1043          document.addEventListener("DOMContentLoaded", function () {
     1044            var e = document.getElementById("method"),
     1045              t = document.getElementById("bodyLabel"),
     1046              n = document.getElementById("body");
     1047            e &&
     1048              e.addEventListener("change", function () {
     1049                var e = this.value;
     1050                "post" === e || "patch" === e
     1051                  ? (t.removeAttribute("hidden"), n.removeAttribute("hidden"))
     1052                  : (t.setAttribute("hidden", "true"),
     1053                    n.setAttribute("hidden", "true"));
     1054              });
     1055          });
     1056      },
     1057      { "code-prettify": 1 },
     1058    ],
     1059  },
     1060  {},
     1061  [2]
     1062);
  • anyapi/tags/1.1.0/assets/js/settings-api.min.js

    r3300936 r3323686  
    1 !(function r(a, c, l) {
    2   function i(t, e) {
    3     if (!c[t]) {
    4       if (!a[t]) {
    5         var s = "function" == typeof require && require;
    6         if (!e && s) return s(t, !0);
    7         if (n) return n(t, !0);
    8         throw (
    9           (((e = new Error("Cannot find module '" + t + "'")).code =
    10             "MODULE_NOT_FOUND"),
    11           e)
    12         );
    13       }
    14       (s = c[t] = { exports: {} }),
    15         a[t][0].call(
    16           s.exports,
    17           function (e) {
    18             return i(a[t][1][e] || e);
    19           },
    20           s,
    21           s.exports,
    22           r,
    23           a,
    24           c,
    25           l
    26         );
    27     }
    28     return c[t].exports;
    29   }
    30   for (
    31     var n = "function" == typeof require && require, e = 0;
    32     e < l.length;
    33     e++
    34   )
    35     i(l[e]);
    36   return i;
    37 })(
    38   {
    39     1: [
    40       function (e, t, s) {
    41         "use strict";
    42         document.addEventListener("DOMContentLoaded", function () {
    43           PR.prettyPrint();
    44           var c = document.querySelector("div.selected-key"),
    45             t = document.querySelector("div.trigger-action"),
    46             e = document.querySelector("div.api-mode"),
    47             s = document.querySelector("div.json-mode > pre"),
    48             l = document.querySelector(".final-id"),
    49             r = document.querySelector(".final-url"),
    50             a = document.querySelector(".final-body"),
    51             i = document.querySelector(".final-trigger"),
    52             n = document.querySelector(".final-mode"),
    53             o = document.querySelector(".final-json"),
    54             d = document.querySelector("span.api-id"),
    55             u = document.querySelector("span.api-url"),
    56             m = document.querySelector("span.api-body"),
    57             v = document.querySelector("span.api-trigger"),
    58             L = document.querySelector("span.api-mode"),
    59             y = document.querySelector("span.api-json"),
    60             p = document.querySelector("input#api-url"),
    61             S = document.querySelector("textarea#api-body");
    62           p &&
    63             (p.oninput = function () {
    64               (r.value = p.value), localStorage.setItem("url", r.value);
    65             }),
    66             S &&
    67               (S.oninput = function () {
    68                 (a.value = S.value), localStorage.setItem("body", a.value);
    69               });
    70           document.querySelectorAll("span.tag-key").forEach(function (r) {
    71             var a,
    72               e = r.getAttribute("id");
    73             e &&
    74               e.includes("[") &&
    75               e.includes("]") &&
    76               ((a = e.substring(e.indexOf("[") + 1, e.indexOf("]"))),
    77               r.addEventListener("click", function () {
    78                 var e = document.querySelector("table.api-data"),
    79                   t = document.getElementById("tag-header"),
    80                   s =
    81                     (document
    82                       .querySelectorAll("table.api-data > tbody > tr")
    83                       .forEach(function (e) {
    84                         e.style.display = "none";
    85                       }),
    86                     document.getElementById(a));
    87                 s
    88                   ? ((s.style.display = "table-row"),
    89                     (t.style.display = "table-row"),
    90                     e.removeAttribute("hidden"),
    91                     (c.innerHTML = r.outerHTML),
    92                     (l.value = r.innerHTML),
    93                     localStorage.setItem("id", r.innerHTML))
    94                   : ((c.innerHTML = ""), (l.value = "")),
    95                   r.classList.toggle("available", "none" === s.style.display),
    96                   r.classList.toggle("selected", "none" !== s.style.display),
    97                   r.classList.toggle(
    98                     "selected-key",
    99                     "none" !== s.style.display
    100                   ),
    101                   document
    102                     .querySelectorAll("span.tag-key")
    103                     .forEach(function (e) {
    104                       e !== r && e.classList.remove("selected");
    105                     });
    106               }));
    107           });
    108           var b = document.querySelectorAll("span.trigger"),
    109             q = null,
    110             f =
    111               (b.forEach(function (e) {
    112                 Array.from(e.classList).some(function (e) {
    113                   return e.startsWith("order-status-");
    114                 }) &&
    115                   (e.classList.add("disabled"),
    116                   e.classList.remove("available"),
    117                   (t.innerHTML = ""),
    118                   (i.value = "")),
    119                   e.addEventListener("click", function () {
    120                     e.classList.contains("available")
    121                       ? (null !== q &&
    122                           (q.classList.add("available"),
    123                           q.classList.remove("selected")),
    124                         e.classList.remove("available"),
    125                         e.classList.add("selected"),
    126                         (t.innerHTML = e.outerHTML),
    127                         (i.value = e.innerHTML),
    128                         (q = e),
    129                         localStorage.setItem("trigger", e.innerHTML))
    130                       : (e.classList.add("available"),
    131                         e.classList.remove("selected"),
    132                         (t.innerHTML = ""),
    133                         (i.value = ""),
    134                         (q = null));
    135                   });
    136               }),
    137               document.querySelector("span.filter-tag-basic")),
    138             g = document.querySelector("span.filter-tag-advance"),
    139             h = document.querySelector("span.filter-tag-expert"),
    140             M = document.querySelector("div.next-btn"),
    141             T = document.querySelector("div.filter-json-basic"),
    142             H = document.querySelector("div.filter-json-advance"),
    143             A = document.querySelector("div.filter-json-advance-sample"),
    144             E = document.querySelector("div.filter-json-expert"),
    145             b =
    146               (f &&
    147                 f.addEventListener("click", function () {
    148                   f.classList.contains("available")
    149                     ? (f.classList.add("selected"),
    150                       f.classList.remove("available"),
    151                       g.classList.add("disabled"),
    152                       g.classList.remove("available"),
    153                       h.classList.add("disabled"),
    154                       h.classList.remove("available"),
    155                       T.classList.remove("json"),
    156                       (e.innerHTML = f.outerHTML),
    157                       (s.innerHTML = T.outerHTML),
    158                       (n.value = f.innerHTML),
    159                       localStorage.setItem("mode", f.innerHTML),
    160                       localStorage.setItem(
    161                         "json",
    162                         "Original JSON will be send"
    163                       ))
    164                     : (f.classList.add("available"),
    165                       f.classList.remove("selected"),
    166                       g.classList.add("available"),
    167                       g.classList.remove("disabled"),
    168                       h.classList.add("available"),
    169                       h.classList.remove("disabled"),
    170                       T.classList.add("json"),
    171                       (e.innerHTML = ""),
    172                       s.classList.remove("scroll"),
    173                       (s.innerHTML = ""),
    174                       (n.value = ""));
    175                 }),
    176               g &&
    177                 g.addEventListener("click", function () {
    178                   g.classList.contains("available")
    179                     ? (g.classList.add("selected"),
    180                       g.classList.remove("available"),
    181                       f.classList.add("disabled"),
    182                       f.classList.remove("available"),
    183                       h.classList.add("disabled"),
    184                       h.classList.remove("available"),
    185                       A.classList.remove("json"),
    186                       (s.innerHTML = A.outerHTML),
    187                       (n.value = f.innerHTML),
    188                       localStorage.setItem("mode", f.innerHTML),
    189                       localStorage.setItem(
    190                         "json",
    191                         "Original JSON will be send"
    192                       ))
    193                     : (g.classList.add("available"),
    194                       g.classList.remove("selected"),
    195                       f.classList.add("available"),
    196                       f.classList.remove("disabled"),
    197                       h.classList.add("available"),
    198                       h.classList.remove("disabled"),
    199                       A.classList.add("json"),
    200                       H.classList.add("json"),
    201                       (e.innerHTML = ""),
    202                       s.classList.remove("scroll"),
    203                       (n.value = ""),
    204                       (o.value = ""));
    205                 }),
    206               h &&
    207                 h.addEventListener("click", function () {
    208                   h.classList.contains("available")
    209                     ? (h.classList.add("selected"),
    210                       h.classList.remove("available"),
    211                       f.classList.add("disabled"),
    212                       f.classList.remove("available"),
    213                       g.classList.add("disabled"),
    214                       g.classList.remove("available"),
    215                       E.classList.remove("json"),
    216                       (e.innerHTML = h.outerHTML),
    217                       (s.innerHTML = E.outerHTML),
    218                       (n.value = h.innerHTML),
    219                       localStorage.setItem("mode", h.innerHTML),
    220                       localStorage.setItem(
    221                         "json",
    222                         "Original JSON will be send"
    223                       ),
    224                       M.setAttribute("hidden", "true"))
    225                     : (h.classList.add("available"),
    226                       h.classList.remove("selected"),
    227                       f.classList.add("available"),
    228                       f.classList.remove("disabled"),
    229                       g.classList.add("available"),
    230                       g.classList.remove("disabled"),
    231                       E.classList.add("json"),
    232                       (e.innerHTML = ""),
    233                       (s.innerHTML = ""),
    234                       (n.value = ""),
    235                       M.removeAttribute("hidden"));
    236                 }),
    237               document.querySelector("div.api-setup")),
    238             k = document.querySelector("div.api-submit"),
    239             b =
    240               ("true" === localStorage.getItem("apiRecordVisible") &&
    241                 (b.setAttribute("hidden", "true"),
    242                 k.removeAttribute("hidden"),
    243                 (d.innerHTML = localStorage.getItem("id")),
    244                 (u.innerHTML = localStorage.getItem("url")),
    245                 (v.innerHTML = localStorage.getItem("trigger")),
    246                 (m.innerHTML = localStorage.getItem("body")),
    247                 (L.innerHTML = localStorage.getItem("mode")),
    248                 (y.innerHTML = localStorage.getItem("json")),
    249                 localStorage.setItem("apiRecordVisible", "false")),
    250               document.querySelector("div.save-btn form.save")),
    251             k =
    252               (b &&
    253                 b.addEventListener("submit", function () {
    254                   localStorage.setItem("apiRecordVisible", "true");
    255                 }),
    256               document.querySelector("div.back-btn"));
    257           k &&
    258             k.addEventListener("click", function () {
    259               location.reload();
    260             });
    261         }),
    262           window.addEventListener("load", function () {
    263             PR.prettyPrint();
    264             var a = document.querySelector("div.next-btn"),
    265               c = document.querySelector("div.prev-btn"),
    266               l = document.querySelector("div.save-btn"),
    267               e = document.querySelector("div.preview-btn"),
    268               i = document.querySelectorAll("span.trigger"),
    269               n = document.querySelectorAll("span.filter-mode"),
    270               t = document.querySelectorAll("div.mode-pre"),
    271               o = document.querySelector("div.adv-box-table-container"),
    272               s = document.querySelector("#api-url"),
    273               r = document.querySelector("span.url-tag"),
    274               s =
    275                 (s &&
    276                   s.addEventListener("click", function (e) {
    277                     e.preventDefault(), r.classList.add("notice-tag");
    278                   }),
    279                 document.querySelectorAll("span.step-one-key")),
    280               d = document.querySelector("span.key-tag"),
    281               s =
    282                 (s.forEach(function (t) {
    283                   t.addEventListener("click", function (e) {
    284                     t.classList.contains("available")
    285                       ? d.classList.remove("notice-tag")
    286                       : d.classList.add("notice-tag");
    287                   });
    288                 }),
    289                 document.querySelectorAll("span.trigger")),
    290               u = document.querySelector("span.action-tag"),
    291               s =
    292                 (s.forEach(function (t) {
    293                   t.addEventListener("click", function (e) {
    294                     t.classList.contains("available")
    295                       ? u.classList.remove("notice-tag")
    296                       : u.classList.add("notice-tag");
    297                   });
    298                 }),
    299                 document.querySelector("#api-body")),
    300               m = document.querySelector("span.body-tag"),
    301               v =
    302                 (s &&
    303                   s.addEventListener("click", function (e) {
    304                     e.preventDefault(), m.classList.add("notice-tag");
    305                   }),
    306                 document.querySelector("span.filter-tag-basic")),
    307               L = document.querySelector("span.filter-tag-advance"),
    308               y = document.querySelector("span.filter-tag-expert"),
    309               s = document.querySelectorAll("span.filter-mode"),
    310               p = document.querySelector("span.select-filter-tag"),
    311               S = document.querySelector("span.preview-filter-tag"),
    312               b = document.querySelector("div.json-pre"),
    313               q = document.querySelector("span.filter-tag");
    314             v &&
    315               v.addEventListener("click", function (e) {
    316                 e.preventDefault(),
    317                   (q.innerHTML =
    318                     "Basic mode - original json data will be send");
    319               }),
    320               L &&
    321                 L.addEventListener("click", function (e) {
    322                   e.preventDefault(),
    323                     (q.innerHTML =
    324                       "Advance mode - filter the json attribute which will be selected");
    325                 }),
    326               y &&
    327                 y.addEventListener("click", function (e) {
    328                   e.preventDefault(),
    329                     (q.innerHTML =
    330                       "Expert mode - Any custom fields will be filtered, Stay tuned for updates");
    331                 }),
    332               s.forEach(function (t) {
    333                 t.addEventListener("click", function (e) {
    334                   e.preventDefault(),
    335                     t.classList.contains("available")
    336                       ? (p.classList.remove("notice-tag"),
    337                         S.classList.remove("notice-tag"),
    338                         q.removeAttribute("hidden"),
    339                         b.removeAttribute("hidden"))
    340                       : (p.classList.add("notice-tag"),
    341                         S.classList.add("notice-tag"),
    342                         q.setAttribute("hidden", "true"),
    343                         b.setAttribute("hidden", "true"));
    344                 });
    345               });
    346             document
    347               .querySelectorAll('input[class^="final-"]')
    348               .forEach(function (e) {
    349                 e.type = "hidden";
    350               }),
    351               c && e.setAttribute("hidden", "true"),
    352               a &&
    353                 a.addEventListener("click", function (e) {
    354                   e.preventDefault();
    355                   var e = document.querySelector(".api-data"),
    356                     t = document.querySelector("input#api-url"),
    357                     s =
    358                       (!e.hasAttribute("hidden") & ("" !== t.value.trim())
    359                         ? (document
    360                             .querySelector(".step-1")
    361                             .classList.remove("active"),
    362                           document
    363                             .querySelector(".step-2")
    364                             .classList.add("active"),
    365                           document
    366                             .querySelector(".step-3")
    367                             .classList.remove("active"),
    368                           document
    369                             .querySelector(".step-4")
    370                             .classList.remove("active"),
    371                           document
    372                             .querySelector("#step-01")
    373                             .classList.remove("current"),
    374                           document
    375                             .querySelector("#step-02")
    376                             .classList.add("current"),
    377                           document
    378                             .querySelector("#step-03")
    379                             .classList.remove("current"),
    380                           document
    381                             .querySelector("#step-04")
    382                             .classList.remove("current"),
    383                           c.removeAttribute("hidden"),
    384                           (a.querySelector("input#submit").value = "Next"))
    385                         : t.setAttribute("placeholder", "API URL Required"),
    386                       document.querySelector("textarea#api-body"));
    387                   function r() {
    388                     document
    389                       .querySelector(".step-1")
    390                       .classList.remove("active"),
    391                       document
    392                         .querySelector(".step-2")
    393                         .classList.remove("active"),
    394                       document
    395                         .querySelector(".step-3")
    396                         .classList.remove("active"),
    397                       document.querySelector(".step-4").classList.add("active"),
    398                       document
    399                         .querySelector("#step-01")
    400                         .classList.remove("current"),
    401                       document
    402                         .querySelector("#step-02")
    403                         .classList.remove("current"),
    404                       document
    405                         .querySelector("#step-03")
    406                         .classList.remove("current"),
    407                       document
    408                         .querySelector("#step-04")
    409                         .classList.add("current"),
    410                       a.setAttribute("hidden", "true"),
    411                       c.setAttribute("hidden", "true"),
    412                       l.removeAttribute("hidden");
    413                   }
    414                   i.forEach(function (e) {
    415                     e.classList.contains("selected") && "" !== s.value.trim()
    416                       ? (document
    417                           .querySelector(".step-1")
    418                           .classList.remove("active"),
    419                         document
    420                           .querySelector(".step-2")
    421                           .classList.remove("active"),
    422                         document
    423                           .querySelector(".step-3")
    424                           .classList.add("active"),
    425                         document
    426                           .querySelector(".step-4")
    427                           .classList.remove("active"),
    428                         document
    429                           .querySelector("#step-01")
    430                           .classList.remove("current"),
    431                         document
    432                           .querySelector("#step-02")
    433                           .classList.remove("current"),
    434                         document
    435                           .querySelector("#step-03")
    436                           .classList.add("current"),
    437                         document
    438                           .querySelector("#step-04")
    439                           .classList.remove("current"),
    440                         (a.querySelector("input#submit").value = "Save"))
    441                       : s.setAttribute("placeholder", "API Body Required");
    442                   }),
    443                     n.forEach(function (e) {
    444                       v.classList.contains("selected") && r(),
    445                         L.classList.contains("selected") &&
    446                           "" !== o.innerHTML &&
    447                           r();
    448                     });
    449                 });
    450             var f = document.querySelector("#step-01"),
    451               g = document.querySelector("#step-02"),
    452               h = document.querySelector("#step-03"),
    453               M = document.querySelector("#step-04");
    454             c &&
    455               c.addEventListener("click", function (e) {
    456                 e.preventDefault(),
    457                   g.classList.contains("current") &&
    458                     (f.classList.add("current"),
    459                     g.classList.remove("current"),
    460                     h.classList.remove("current"),
    461                     M.classList.remove("current"),
    462                     i.forEach(function (e) {
    463                       e.classList.remove("selected");
    464                     }),
    465                     u.classList.remove("notice-tag"),
    466                     document.querySelector(".step-1").classList.add("active"),
    467                     document
    468                       .querySelector(".step-2")
    469                       .classList.remove("active"),
    470                     c.setAttribute("hidden", "true"),
    471                     (a.querySelector("input#submit").value = "Next")),
    472                   h.classList.contains("current") &&
    473                     (g.classList.add("current"),
    474                     f.classList.remove("current"),
    475                     h.classList.remove("current"),
    476                     M.classList.remove("current"),
    477                     u.classList.remove("notice-tag"),
    478                     i.forEach(function (e) {
    479                       e.classList.remove("selected");
    480                     }),
    481                     n.forEach(function (e) {
    482                       e.classList.remove("selected"),
    483                         e.classList.remove("disabled"),
    484                         e.classList.add("available");
    485                     }),
    486                     t.forEach(function (e) {
    487                       e.classList.add("json");
    488                     }),
    489                     document.querySelector(".step-2").classList.add("active"),
    490                     document
    491                       .querySelector(".step-1")
    492                       .classList.remove("active"),
    493                     document
    494                       .querySelector(".step-3")
    495                       .classList.remove("active"),
    496                     a.removeAttribute("hidden"),
    497                     c.removeAttribute("hidden"),
    498                     l.setAttribute("hidden", "true"),
    499                     (a.querySelector("input#submit").value = "Next")),
    500                   M.classList.contains("current") &&
    501                     (h.classList.add("current"),
    502                     f.classList.remove("current"),
    503                     g.classList.remove("current"),
    504                     M.classList.remove("current"),
    505                     u.classList.remove("notice-tag"),
    506                     i.forEach(function (e) {
    507                       e.classList.remove("selected");
    508                     }),
    509                     document.querySelector(".step-3").classList.add("active"),
    510                     document
    511                       .querySelector(".step-1")
    512                       .classList.remove("active"),
    513                     document
    514                       .querySelector(".step-2")
    515                       .classList.remove("active"),
    516                     document
    517                       .querySelector(".step-4")
    518                       .classList.remove("active"),
    519                     a.removeAttribute("hidden"),
    520                     c.removeAttribute("hidden"),
    521                     l.setAttribute("hidden", "true"),
    522                     v.classList.remove("disabled"),
    523                     advanceTagclassList.remove("disabled"),
    524                     y.classList.remove("disabled"),
    525                     (a.querySelector("input#submit").value = "Next"));
    526               });
    527           });
    528       },
    529       {},
    530     ],
    531   },
    532   {},
    533   [1]
    534 );
     1!function r(a,c,l){function i(t,e){if(!c[t]){if(!a[t]){var s="function"==typeof require&&require;if(!e&&s)return s(t,!0);if(n)return n(t,!0);throw(e=new Error("Cannot find module '"+t+"'")).code="MODULE_NOT_FOUND",e}s=c[t]={exports:{}},a[t][0].call(s.exports,function(e){return i(a[t][1][e]||e)},s,s.exports,r,a,c,l)}return c[t].exports}for(var n="function"==typeof require&&require,e=0;e<l.length;e++)i(l[e]);return i}({1:[function(e,t,s){"use strict";document.addEventListener("DOMContentLoaded",function(){PR.prettyPrint();var c=document.querySelector("div.selected-key"),t=document.querySelector("div.trigger-action"),e=document.querySelector("div.api-mode"),s=document.querySelector("div.json-mode > pre"),l=document.querySelector(".final-id"),r=document.querySelector(".final-url"),a=document.querySelector(".final-body"),i=document.querySelector(".final-trigger"),n=document.querySelector(".final-mode"),o=document.querySelector(".final-json"),d=document.querySelector("span.api-id"),u=document.querySelector("span.api-url"),m=document.querySelector("span.api-body"),v=document.querySelector("span.api-trigger"),L=document.querySelector("span.api-mode"),y=document.querySelector("span.api-json"),p=document.querySelector("input#api-url"),S=document.querySelector("textarea#api-body");p&&(p.oninput=function(){r.value=p.value,localStorage.setItem("url",r.value)}),S&&(S.oninput=function(){a.value=S.value,localStorage.setItem("body",a.value)});document.querySelectorAll("span.tag-key").forEach(function(r){var a,e=r.getAttribute("id");e&&e.includes("[")&&e.includes("]")&&(a=e.substring(e.indexOf("[")+1,e.indexOf("]")),r.addEventListener("click",function(){var e=document.querySelector("table.api-data"),t=document.getElementById("tag-header"),s=(document.querySelectorAll("table.api-data > tbody > tr").forEach(function(e){e.style.display="none"}),document.getElementById(a));s?(s.style.display="table-row",t.style.display="table-row",e.removeAttribute("hidden"),c.innerHTML=r.outerHTML,l.value=r.innerHTML,localStorage.setItem("id",r.innerHTML)):(c.innerHTML="",l.value=""),r.classList.toggle("available","none"===s.style.display),r.classList.toggle("selected","none"!==s.style.display),r.classList.toggle("selected-key","none"!==s.style.display),document.querySelectorAll("span.tag-key").forEach(function(e){e!==r&&e.classList.remove("selected")})}))});var b=document.querySelectorAll("span.trigger"),q=null,f=(b.forEach(function(e){Array.from(e.classList).some(function(e){return e.startsWith("order-status-")})&&(e.classList.add("disabled"),e.classList.remove("available"),t.innerHTML="",i.value=""),e.addEventListener("click",function(){e.classList.contains("available")?(null!==q&&(q.classList.add("available"),q.classList.remove("selected")),e.classList.remove("available"),e.classList.add("selected"),t.innerHTML=e.outerHTML,i.value=e.innerHTML,q=e,localStorage.setItem("trigger",e.innerHTML)):(e.classList.add("available"),e.classList.remove("selected"),t.innerHTML="",i.value="",q=null)})}),document.querySelector("span.filter-tag-basic")),g=document.querySelector("span.filter-tag-advance"),h=document.querySelector("span.filter-tag-expert"),M=document.querySelector("div.next-btn"),T=document.querySelector("div.filter-json-basic"),H=document.querySelector("div.filter-json-advance"),A=document.querySelector("div.filter-json-advance-sample"),E=document.querySelector("div.filter-json-expert"),b=(f&&f.addEventListener("click",function(){f.classList.contains("available")?(f.classList.add("selected"),f.classList.remove("available"),g.classList.add("disabled"),g.classList.remove("available"),h.classList.add("disabled"),h.classList.remove("available"),T.classList.remove("json"),e.innerHTML=f.outerHTML,s.innerHTML=T.outerHTML,n.value=f.innerHTML,localStorage.setItem("mode",f.innerHTML),localStorage.setItem("json","Original JSON will be send")):(f.classList.add("available"),f.classList.remove("selected"),g.classList.add("available"),g.classList.remove("disabled"),h.classList.add("available"),h.classList.remove("disabled"),T.classList.add("json"),e.innerHTML="",s.classList.remove("scroll"),s.innerHTML="",n.value="")}),g&&g.addEventListener("click",function(){g.classList.contains("available")?(g.classList.add("selected"),g.classList.remove("available"),f.classList.add("disabled"),f.classList.remove("available"),h.classList.add("disabled"),h.classList.remove("available"),A.classList.remove("json"),s.innerHTML=A.outerHTML,n.value=f.innerHTML,localStorage.setItem("mode",f.innerHTML),localStorage.setItem("json","Original JSON will be send")):(g.classList.add("available"),g.classList.remove("selected"),f.classList.add("available"),f.classList.remove("disabled"),h.classList.add("available"),h.classList.remove("disabled"),A.classList.add("json"),H.classList.add("json"),e.innerHTML="",s.classList.remove("scroll"),n.value="",o.value="")}),h&&h.addEventListener("click",function(){h.classList.contains("available")?(h.classList.add("selected"),h.classList.remove("available"),f.classList.add("disabled"),f.classList.remove("available"),g.classList.add("disabled"),g.classList.remove("available"),E.classList.remove("json"),e.innerHTML=h.outerHTML,s.innerHTML=E.outerHTML,n.value=h.innerHTML,localStorage.setItem("mode",h.innerHTML),localStorage.setItem("json","Original JSON will be send"),M.setAttribute("hidden","true")):(h.classList.add("available"),h.classList.remove("selected"),f.classList.add("available"),f.classList.remove("disabled"),g.classList.add("available"),g.classList.remove("disabled"),E.classList.add("json"),e.innerHTML="",s.innerHTML="",n.value="",M.removeAttribute("hidden"))}),document.querySelector("div.api-setup")),k=document.querySelector("div.api-submit"),b=("true"===localStorage.getItem("apiRecordVisible")&&(b.setAttribute("hidden","true"),k.removeAttribute("hidden"),d.innerHTML=localStorage.getItem("id"),u.innerHTML=localStorage.getItem("url"),v.innerHTML=localStorage.getItem("trigger"),m.innerHTML=localStorage.getItem("body"),L.innerHTML=localStorage.getItem("mode"),y.innerHTML=localStorage.getItem("json"),localStorage.setItem("apiRecordVisible","false")),document.querySelector("div.save-btn form.save")),k=(b&&b.addEventListener("submit",function(){localStorage.setItem("apiRecordVisible","true")}),document.querySelector("div.back-btn"));k&&k.addEventListener("click",function(){location.reload()})}),window.addEventListener("load",function(){PR.prettyPrint();var a=document.querySelector("div.next-btn"),c=document.querySelector("div.prev-btn"),l=document.querySelector("div.save-btn"),e=document.querySelector("div.preview-btn"),i=document.querySelectorAll("span.trigger"),n=document.querySelectorAll("span.filter-mode"),t=document.querySelectorAll("div.mode-pre"),o=document.querySelector("div.adv-box-table-container"),s=document.querySelector("#api-url"),r=document.querySelector("span.url-tag"),s=(s&&s.addEventListener("click",function(e){e.preventDefault(),r.classList.add("notice-tag")}),document.querySelectorAll("span.step-one-key")),d=document.querySelector("span.key-tag"),s=(s.forEach(function(t){t.addEventListener("click",function(e){t.classList.contains("available")?d.classList.remove("notice-tag"):d.classList.add("notice-tag")})}),document.querySelectorAll("span.trigger")),u=document.querySelector("span.action-tag"),s=(s.forEach(function(t){t.addEventListener("click",function(e){t.classList.contains("available")?u.classList.remove("notice-tag"):u.classList.add("notice-tag")})}),document.querySelector("#api-body")),m=document.querySelector("span.body-tag"),v=(s&&s.addEventListener("click",function(e){e.preventDefault(),m.classList.add("notice-tag")}),document.querySelector("span.filter-tag-basic")),L=document.querySelector("span.filter-tag-advance"),y=document.querySelector("span.filter-tag-expert"),s=document.querySelectorAll("span.filter-mode"),p=document.querySelector("span.select-filter-tag"),S=document.querySelector("span.preview-filter-tag"),b=document.querySelector("div.json-pre"),q=document.querySelector("span.filter-tag");v&&v.addEventListener("click",function(e){e.preventDefault(),q.innerHTML="Basic mode - original json data will be send"}),L&&L.addEventListener("click",function(e){e.preventDefault(),q.innerHTML="Advance mode - filter the json attribute which will be selected"}),y&&y.addEventListener("click",function(e){e.preventDefault(),q.innerHTML="Expert mode - Any custom fields will be filtered, Stay tuned for updates"}),s.forEach(function(t){t.addEventListener("click",function(e){e.preventDefault(),t.classList.contains("available")?(p.classList.remove("notice-tag"),S.classList.remove("notice-tag"),q.removeAttribute("hidden"),b.removeAttribute("hidden")):(p.classList.add("notice-tag"),S.classList.add("notice-tag"),q.setAttribute("hidden","true"),b.setAttribute("hidden","true"))})});document.querySelectorAll('input[class^="final-"]').forEach(function(e){e.type="hidden"}),c&&e.setAttribute("hidden","true"),a&&a.addEventListener("click",function(e){e.preventDefault();var e=document.querySelector(".api-data"),t=document.querySelector("input#api-url"),s=(!e.hasAttribute("hidden")&""!==t.value.trim()?(document.querySelector(".step-1").classList.remove("active"),document.querySelector(".step-2").classList.add("active"),document.querySelector(".step-3").classList.remove("active"),document.querySelector(".step-4").classList.remove("active"),document.querySelector("#step-01").classList.remove("current"),document.querySelector("#step-02").classList.add("current"),document.querySelector("#step-03").classList.remove("current"),document.querySelector("#step-04").classList.remove("current"),c.removeAttribute("hidden"),a.querySelector("input#submit").value="Next"):t.setAttribute("placeholder","API URL Required"),document.querySelector("textarea#api-body"));function r(){document.querySelector(".step-1").classList.remove("active"),document.querySelector(".step-2").classList.remove("active"),document.querySelector(".step-3").classList.remove("active"),document.querySelector(".step-4").classList.add("active"),document.querySelector("#step-01").classList.remove("current"),document.querySelector("#step-02").classList.remove("current"),document.querySelector("#step-03").classList.remove("current"),document.querySelector("#step-04").classList.add("current"),a.setAttribute("hidden","true"),c.setAttribute("hidden","true"),l.removeAttribute("hidden")}i.forEach(function(e){e.classList.contains("selected")&&""!==s.value.trim()?(document.querySelector(".step-1").classList.remove("active"),document.querySelector(".step-2").classList.remove("active"),document.querySelector(".step-3").classList.add("active"),document.querySelector(".step-4").classList.remove("active"),document.querySelector("#step-01").classList.remove("current"),document.querySelector("#step-02").classList.remove("current"),document.querySelector("#step-03").classList.add("current"),document.querySelector("#step-04").classList.remove("current"),a.querySelector("input#submit").value="Save"):s.setAttribute("placeholder","API Body Required")}),n.forEach(function(e){v.classList.contains("selected")&&r(),L.classList.contains("selected")&&""!==o.innerHTML&&r()})});var f=document.querySelector("#step-01"),g=document.querySelector("#step-02"),h=document.querySelector("#step-03"),M=document.querySelector("#step-04");c&&c.addEventListener("click",function(e){e.preventDefault(),g.classList.contains("current")&&(f.classList.add("current"),g.classList.remove("current"),h.classList.remove("current"),M.classList.remove("current"),i.forEach(function(e){e.classList.remove("selected")}),u.classList.remove("notice-tag"),document.querySelector(".step-1").classList.add("active"),document.querySelector(".step-2").classList.remove("active"),c.setAttribute("hidden","true"),a.querySelector("input#submit").value="Next"),h.classList.contains("current")&&(g.classList.add("current"),f.classList.remove("current"),h.classList.remove("current"),M.classList.remove("current"),u.classList.remove("notice-tag"),i.forEach(function(e){e.classList.remove("selected")}),n.forEach(function(e){e.classList.remove("selected"),e.classList.remove("disabled"),e.classList.add("available")}),t.forEach(function(e){e.classList.add("json")}),document.querySelector(".step-2").classList.add("active"),document.querySelector(".step-1").classList.remove("active"),document.querySelector(".step-3").classList.remove("active"),a.removeAttribute("hidden"),c.removeAttribute("hidden"),l.setAttribute("hidden","true"),a.querySelector("input#submit").value="Next"),M.classList.contains("current")&&(h.classList.add("current"),f.classList.remove("current"),g.classList.remove("current"),M.classList.remove("current"),u.classList.remove("notice-tag"),i.forEach(function(e){e.classList.remove("selected")}),document.querySelector(".step-3").classList.add("active"),document.querySelector(".step-1").classList.remove("active"),document.querySelector(".step-2").classList.remove("active"),document.querySelector(".step-4").classList.remove("active"),a.removeAttribute("hidden"),c.removeAttribute("hidden"),l.setAttribute("hidden","true"),v.classList.remove("disabled"),advanceTagclassList.remove("disabled"),y.classList.remove("disabled"),a.querySelector("input#submit").value="Next")})})},{}]},{},[1]);
  • anyapi/tags/1.1.0/inc/Admin.php

    r3300936 r3323686  
    3333      add_action( 'admin_init', array( $this, 'registerCustomFields' ) );
    3434    }
     35    add_action( 'admin_init', array( $this, 'anyapiInit' ) );
    3536    add_action( 'admin_notices', array( $this, 'addAdminNotice' ) );
    3637    add_action( 'admin_enqueue_scripts', array( $this, 'enqueueFiles') );
     
    4243    add_filter( "plugin_action_links_" . plugin_basename( dirname( __FILE__, 2) ) . '/anyapi.php', array( $this, 'settingsLinks' ) , 10, 2 );
    4344    add_filter( "plugin_row_meta", array( $this, 'customLinks' ) , 10, 2 );
    44 
    45     $this->update();
    4645
    4746  }
     
    159158        $setting[ "anyapi_option_name" ],
    160159        array(
    161           'type' => 'array',
    162           'sanitize_callback' => isset( $setting[ 'callback' ] ) ? $setting[ 'callback' ] : 'sanitize_text_field'
     160          'type'                => 'array',
     161          'sanitize_callback'   => isset( $setting[ 'callback' ] ) ? $setting[ 'callback' ] : 'sanitize_text_field'
    163162        ),
    164163      );
     
    169168        $section[ "id" ],
    170169        $section[ "title" ],
    171         ( isset( $section[ "callback" ] ) ? $section[ "callback" ] : '' ), $section[ "page" ],
    172         ( isset( $section[ "args" ] ) ? $section[ "args" ] : '' )
     170        isset( $section[ "callback" ] ) ? $section[ "callback" ] : '' , $section[ "page" ],
     171        isset( $section[ "args" ] ) ? $section[ "args" ] : ''
    173172      );
    174173    }
     
    178177        $field[ "id" ],
    179178        $field[ "title" ],
    180         ( isset( $field[ "callback" ] ) ? $field[ "callback" ] : '' ),
     179        isset( $field[ "callback" ] ) ? $field[ "callback" ] : '',
    181180        $field[ "page" ],
    182181        $field[ "section" ],
    183         ( isset( $field[ "args" ] ) ? $field[ "args" ] : '' )
     182        isset( $field[ "args" ] ) ? $field[ "args" ] : ''
    184183      );
    185184    }
     185
     186  }
     187
     188  public function anyapiInit() {
     189
     190    $this->update();
     191
     192    if ( ! get_option( 'anyapi_wc_apilog_function' ) ) {
     193      return;
     194    }
     195
     196    global $wpdb;
     197    $apiLogTable      = $wpdb->prefix . 'anyapi_log_anyapi';
     198    $charsetCollate   = $wpdb->get_charset_collate();
     199    $sql = "CREATE TABLE $apiLogTable (
     200      `id` mediumint(9) NOT NULL AUTO_INCREMENT,
     201      `order_id` bigint(20) NOT NULL,
     202      `http_code` int(3) NOT NULL,
     203      `status` text NOT NULL,
     204      `trigger` varchar(100) NOT NULL,
     205      `api_url` text NOT NULL,
     206      `payload` longtext NOT NULL,
     207      `timestamp` datetime DEFAULT CURRENT_TIMESTAMP NOT NULL,
     208      PRIMARY KEY (`id`)
     209    ) $charsetCollate;";
     210
     211    require_once ABSPATH . 'wp-admin/includes/upgrade.php';
     212
     213    dbDelta( $sql );
    186214
    187215  }
     
    198226    if ( isset( $_GET[ 'page' ] ) && $_GET[ 'page' ] === 'anyapi' ) {
    199227      if ( ! isset($numberOfKey) || count( $numberOfKey ) === 0 ) {
    200         $type = 'updated';
    201         $message = $notice[ 'system_1' ];
     228        $type     = 'updated';
     229        $message  = $notice[ 'system_1' ];
    202230      } else { return; }
    203231      if ( isset( $_GET[ 'setupkey_nonce' ] ) ) {
     
    232260      $this->plugin_url . $assets[ 'style' ],
    233261      array(),
    234       ANYAPI_VERSION,
     262      ANYAPI_ASSETS,
    235263    );
    236264
     
    240268        $this->plugin_url . $path,
    241269        array(),
    242         ANYAPI_VERSION,
     270        ANYAPI_ASSETS,
    243271        true
    244272      );
     
    274302
    275303  public function dashboardPage() {
    276     return require_once( "$this->plugin_path/templates/dashboard.php" );
     304    return require_once "$this->plugin_path/templates/dashboard.php";
    277305  }
    278306
    279307  public function orderAPIPage() {
    280     return require_once( "$this->plugin_path/templates/orderapi.php" );
     308    return require_once "$this->plugin_path/templates/orderapi.php";
    281309  }
    282310
    283311  public function restAPIPage() {
    284     return require_once( "$this->plugin_path/templates/restapi.php" );
     312    return require_once "$this->plugin_path/templates/restapi.php";
     313  }
     314
     315  public function apiLogPage() {
     316    return require_once "$this->plugin_path/templates/apilog.php";
    285317  }
    286318
     
    290322
    291323    $defaultOptions = array(
    292       'anyapi_wc_integration',
    293       'anyapi_wc_functions',
     324      'anyapi_wc_orderapi_integration',
     325      'anyapi_wc_restapi_function',
     326      'anyapi_wc_apilog_function',
    294327      'anyapi_wc_apikey',
    295328      'anyapi_wc_orderapi',
     
    355388
    356389    return array(
    357       // Dashboard features
    358       'WCIntegration'     => array(
    359         'orderAPI'    => 'Order API',
    360         'customerAPI' => 'Customer API',
    361         'productAPI'  => 'Product API',
    362       ),
    363       'WCFunction'        => array(
    364         'restAPI'     => 'WooCommerce API Tools',
    365         'apiLogs'     => 'WooCommerce API Logs',
    366       ),
    367       'message'           => array(
     390      'message'       => array(
    368391        'system_1'    => 'Reminder : Create first Order API Integrations with API key',
    369392      ),
  • anyapi/tags/1.1.0/inc/Anyapi.php

    r3300936 r3323686  
    99use Anyapi\Views\OrderApi;
    1010use Anyapi\Views\RestApi;
     11use Anyapi\Views\ApiLog;
    1112
    1213class Anyapi {
     
    1819  public $orderApi;
    1920  public $restApi;
     21  public $apiLog;
     22
    2023  public $pages     = array();
    2124  public $subpages  = array();
     
    2932    $this->orderApi   = new OrderApi();
    3033    $this->restApi    = new RestApi();
     34    $this->apiLog     = new ApiLog();
    3135    $this->setSections();
    3236
     
    4549    $args = array(
    4650      array(
    47         'anyapi_option_group' => 'anyapi_wc_integration',
    48         'anyapi_option_name'  => 'anyapi_wc_integration',
     51        'anyapi_option_group' => 'anyapi_wc_orderapi_integration',
     52        'anyapi_option_name'  => 'anyapi_wc_orderapi_integration',
    4953        'callback'            => array( $this, 'loadAddOns' ),
    5054      ),
    5155      array(
    52         'anyapi_option_group' => 'anyapi_wc_functions',
    53         'anyapi_option_name'  => 'anyapi_wc_functions',
     56        'anyapi_option_group' => 'anyapi_wc_restapi_function',
     57        'anyapi_option_name'  => 'anyapi_wc_restapi_function',
     58        'callback'            => array( $this, 'loadAddOns' )
     59      ),
     60      array(
     61        'anyapi_option_group' => 'anyapi_wc_apilog_function',
     62        'anyapi_option_name'  => 'anyapi_wc_apilog_function',
    5463        'callback'            => array( $this, 'loadAddOns' )
    5564      ),
     
    7887   *
    7988   */
    80 
    8189  public function loadAddOns( $input ) {
    8290
     
    8593    }
    8694
    87     $output = [];
    88     $config = Admin::getConfig();
    89     $output = array();
    90     foreach ( $config[ $input[ 'config' ] ] as $key => $value ) {
    91       $output[ $key ] = isset( $input[ sanitize_text_field( $key ) ] ) ? true : false;
    92     }
     95    $output   = [];
     96    $key      = isset( $input[ 'check' ] ) ? sanitize_text_field( $input[ 'check' ] ) : '';
     97    $output   = ! empty( $key ) ? true : false;
     98
    9399    return $output;
    94100
     
    101107    }
    102108
    103     $output = [];
    104     $id     = isset( $input[ 'id' ] ) ? sanitize_key( $input[ 'id' ] ) : '';
    105     $auth   = isset( $input[ 'authType' ] ) ? sanitize_key ( $input[ 'authType' ] ) : '';
    106     $output = $auth ? get_option( $this->option[ 'anyApiKey' ] ) : get_option( $this->option[ 'anyApiOrderApi' ] );
    107 
    108     if ( isset( $_POST[ "remove" ] ) ) {
    109       if ( isset( $_GET[ 'setupkey_nonce' ] ) ) {
    110         $setupKeyNonce = sanitize_text_field( wp_unslash( $_GET[ 'setupkey_nonce' ] ) );
    111         if ( ! wp_verify_nonce( $setupKeyNonce, 'setupkey_nonce_action' ) ) {
    112           die( 'Nonce verification failed' );
    113         }
    114       };
    115       unset( $output[ $_POST[ "remove" ] ] );
     109    $output   = [];
     110    $id       = isset( $input[ 'id' ] ) ? sanitize_key( $input[ 'id' ] ) : '';
     111    $auth     = isset( $input[ 'authType' ] ) ? sanitize_key ( $input[ 'authType' ] ) : '';
     112    $remove   = isset( $input[ 'remove' ] ) ? sanitize_key ( $input[ 'remove' ] ) : '';
     113    $authKey    = get_option( $this->option[ 'anyApiKey' ], array() );
     114    $output     = $auth ? get_option( $this->option[ 'anyApiKey' ] ) : get_option( $this->option[ 'anyApiOrderApi' ] );
     115
     116    if ( isset( $input[ 'remove' ] ) ) {
     117      if ( isset( $authKey[ $input[ 'id' ] ][ 'authType' ] ) ) {
     118        $output = get_option( $this->option[ 'anyApiKey' ] );
     119        unset( $output[ $input[ 'id' ] ] );
     120      }
    116121      return $output;
    117122    }
    118123
     124    foreach ( $output as $key => $value ) {
     125      if ( $key !== $id ) {
     126        unset( $output[ $key ] );
     127      }
     128    }
     129
    119130    if ( $id ) {
    120       $output[ $id ] = array_map( 'sanitize_text_field', (array) $input );
     131      $output[ $input[ 'id' ] ] = array_map( 'sanitize_text_field', (array) $input );
    121132    }
    122133
     
    159170        $outputUrl = $inputUrl . $endpoint . $inputId;
    160171      }
     172
    161173    }
    162174
     
    178190        'page'      => 'anyapi_orderapi_integration',
    179191        'args'      => array(
    180           'option_name' => 'anyapi_wc_integration',
    181           'value'       => 'orderAPI',
    182           'config'      => 'WCIntegration'
    183         )
    184       ),
    185       array(
    186         'id'        => 'anyapi_admin_restapi',
     192          'option'      => 'anyapi_wc_orderapi_integration',
     193          'config'      => 'orderAPI'
     194        )
     195      ),
     196      array(
     197        'id'        => 'anyapi_admin_restapi_function',
    187198        'title'     => '',
    188199        'callback'  => array( $this->dashboard, 'featureCard' ),
    189         'page'      => 'anyapi_restapi',
    190         'args' => array(
    191           'option_name' => 'anyapi_wc_functions',
    192           'value'       => 'restAPI',
    193           'config'      => 'WCFunction'
    194         )
    195       ),
    196       array(
    197         'id'        => 'anyapi_admin_api_logs',
     200        'page'      => 'anyapi_restapi_function',
     201        'args'      => array(
     202          'option'      => 'anyapi_wc_restapi_function',
     203          'config'      => 'restAPI'
     204        )
     205      ),
     206      array(
     207        'id'        => 'anyapi_admin_apilog_function',
    198208        'title'     => '',
    199209        'callback'  => array( $this->dashboard, 'featureCard' ),
    200         'page'      => 'anyapi_wcapi_log',
    201         'args'      => array(
    202           'option_name' => '',
    203           'value'       => 'apiLogs',
    204           'config'      => 'WCFunction'
     210        'page'      => 'anyapi_apilog_function',
     211        'args'      => array(
     212          'option'      => 'anyapi_wc_apilog_function',
     213          'config'      => 'apiLogs'
     214        )
     215      ),
     216      // Unreleased features
     217      array(
     218        'id'        => 'anyapi_admin_coming_function',
     219        'title'     => '',
     220        'callback'  => array( $this->dashboard, 'featureCard' ),
     221        'page'      => 'anyapi_coming_function',
     222        'args'      => array(
     223          'option'      => '',
     224          'config'      => 'coming'
    205225        )
    206226      ),
     
    212232        'page'      => 'anyapi_apikey_setup',
    213233        'args'      => array(
    214           'option_name' => 'anyapi_wc_apikey',
     234          'option' => 'anyapi_wc_apikey',
    215235        )
    216236      ),
     
    221241        'page'      => 'anyapi_auth_basic',
    222242        'args'      => array(
    223           'option_name' => 'anyapi_wc_apikey',
     243          'option'      => 'anyapi_wc_apikey',
    224244          'field'       => 'basicAuth',
    225245        )
     
    231251        'page'      => 'anyapi_auth_bearertoken',
    232252        'args'      => array(
    233           'option_name' => 'anyapi_wc_apikey',
     253          'option'      => 'anyapi_wc_apikey',
    234254          'field'       => 'bearerToken',
    235255        )
     
    242262        'page'      => 'anyapi_apikey_records',
    243263        'args'      => array(
    244           'option_name' => 'anyapi_wc_apikey',
     264          'option'          => 'anyapi_wc_apikey',
     265          'id'              => 'id',
     266          'value'           => 'remove',
    245267        )
    246268      ),
     
    307329      // RestAPI Tabs
    308330      array(
    309         'id'        => 'anyapi_admin_restapi',
     331        'id'        => 'anyapi_restapi_tools',
    310332        'title'     => 'Send Any WooCommerce REST API',
    311333        'callback'  => array( $this->restApi, 'setupRestApiTab'),
    312334        'page'      => 'anyapi_wc_restapi',
    313335        'args'      => array(
    314           'option_name' => 'anyapi_wc_restapi'
    315         )
    316       ),
    317       array(
    318         'id'        => 'anyapi_admin_response',
     336          'option' => 'anyapi_wc_restapi'
     337        )
     338      ),
     339      array(
     340        'id'        => 'anyapi_restapi_tools_response',
    319341        'title'     => 'Response',
    320342        'callback'  => array( $this->restApi, 'responseJson' ),
    321343        'page'      => 'anyapi_wc_restapi_response',
    322344        'args'      => array(
    323           'option_name' => 'anyapi_wc_restapi'
     345          'option' => 'anyapi_wc_restapi'
     346        )
     347      ),
     348      // API Log Tabs
     349      array(
     350        'id'        => 'anyapi_apilog',
     351        'title'     => '',
     352        'callback'  => array( $this->apiLog, 'apiLog' ),
     353        'page'      => 'anyapi_wc_apilog',
     354        'args'      => array(
     355          'table' => 'anyapi_log_anyapi'
    324356        )
    325357      ),
     
    338370    $this->pages = array(
    339371      array(
    340       'page_title'  => 'AnyAPI - WooCommerce API Integration',
    341       'menu_title'  => 'AnyAPI',
    342       'capability'  => 'manage_options',
    343       'menu_slug'   => self::MENU_SLUG,
    344       'callback'    => array( $this->settings, 'dashboardPage' ),
    345       'icon_url'    => 'dashicons-admin-plugins',
    346       'position'    => 150
     372        'page_title'  => 'AnyAPI - WooCommerce API Integration',
     373        'menu_title'  => 'AnyAPI',
     374        'capability'  => 'manage_options',
     375        'menu_slug'   => self::MENU_SLUG,
     376        'callback'    => array( $this->settings, 'dashboardPage' ),
     377        'icon_url'    => 'dashicons-admin-plugins',
     378        'position'    => 150
    347379      )
    348380    );
     
    352384  public function setSubPages() {
    353385
    354     $this->subpages = array();
    355     $orderAPIPage   = null;
    356     $restAPIPage    = null;
    357 
    358     $orderAPIOption = get_option( 'anyapi_wc_integration' );
    359     if ( isset( $orderAPIOption[ 'orderAPI' ] ) && $orderAPIOption[ 'orderAPI' ] ) {
     386    $this->subpages   = [];
     387    $orderAPIPage     = null;
     388    $restAPIPage      = null;
     389    $apiLogPage       = null;
     390
     391    $orderAPIOption = get_option( 'anyapi_wc_orderapi_integration' );
     392    if ( $orderAPIOption ) {
    360393      $orderAPIPage = array(
    361394        'parent_slug' => self::MENU_SLUG,
     
    368401    }
    369402
    370     $restAPIOption = get_option( 'anyapi_wc_functions' );
    371     if ( isset( $restAPIOption[ 'restAPI' ] ) && $restAPIOption[ 'restAPI' ] ) {
     403    $restAPIOption = get_option( 'anyapi_wc_restapi_function' );
     404    if ( $restAPIOption ) {
    372405      $restAPIPage = array(
    373406        'parent_slug' => self::MENU_SLUG,
     
    380413    }
    381414
     415    $apiLogOption = get_option( 'anyapi_wc_apilog_function' );
     416    if ( $apiLogOption ) {
     417      $apiLogPage = array(
     418        'parent_slug' => self::MENU_SLUG,
     419        'page_title'  => 'AnyAPI - API Logs',
     420        'menu_title'  => 'API Log',
     421        'capability'  => 'manage_options',
     422        'menu_slug'   => self::MENU_SLUG . '_apilog',
     423        'callback'    => array( $this->settings, 'apiLogPage' )
     424      );
     425    }
     426
    382427    if ( $orderAPIPage ) {
    383428      $this->subpages[] = $orderAPIPage;
     
    386431    if ( $restAPIPage ) {
    387432      $this->subpages[] = $restAPIPage;
     433    }
     434
     435    if ( $apiLogPage ) {
     436      $this->subpages[] = $apiLogPage;
    388437    }
    389438
     
    485534    return array(
    486535      'anyApiVersion'     => 'anyapi_version',
    487       'anyApiIntegration' => 'anyapi_wc_integration',
    488       'anyApiFunctions'   => 'anyapi_wc_functions',
    489536      'anyApiKey'         => 'anyapi_wc_apikey',
    490537      'anyApiOrderApi'    => 'anyapi_wc_orderapi',
  • anyapi/tags/1.1.0/inc/Controller/OrderIntegrations.php

    r3300936 r3323686  
    1818  public function registerAction() {
    1919
    20     if( ! get_option( 'anyapi_orderapi' ) ) {
     20    if ( ! get_option( 'anyapi_orderapi' ) ) {
    2121      return;
    2222    }
     
    158158      $order_data           = $order->get_data();
    159159      $body[ 'Order API' ]  = array(
    160         'Original Json' => wp_json_encode( $order_data )
     160        'Original Json' => $order_data
    161161      );
    162162    }
     
    174174    foreach ( $apiData as $key => $value ) {
    175175      $response[] = $this->sendRequest( $value[ 'url' ], $value[ 'headers' ], $value[ 'payload' ] );
     176    }
     177
     178    $this->apiLog( $response, $order_id, $trigger );
     179
     180  }
     181
     182  private function apiLog( $result, $order_id, $trigger ) {
     183
     184    global $wpdb;
     185    $apiLogTable = $wpdb->prefix . 'anyapi_log_anyapi';
     186
     187    foreach ( $result as $response ) {
     188
     189      $status = in_array( $response[ 'httpCode' ], [ 200, 201, 204 ] );
     190      // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery -- Custom table insertion required for API logging.
     191      $wpdb->insert(
     192        $apiLogTable,
     193        array(
     194          'order_id'          => $order_id,
     195          'http_code'         => $response[ 'httpCode' ],
     196          'status'            => $status ? 'Success' : 'Error',
     197          'trigger'           => $trigger,
     198          'api_url'           => $response[ 'apiUrl' ],
     199          'payload'           => wp_json_encode( $response[ 'payload' ] ),
     200          'timestamp'         => current_time('mysql'),
     201        )
     202      );
     203
    176204    }
    177205
  • anyapi/tags/1.1.0/inc/Views/Dashboard.php

    r3300936 r3323686  
    1212  public function featureCard( $args ) {
    1313
    14     $options  = get_option( $args[ 'option_name' ], array() );
    15     $name     = $args['value'];
    16     $button   = isset( $options[ $name ] ) && $options[ $name ] ? "Deactivate" : "Activate";
    17 
    18     if ( $name == 'apiLogs' ) {
     14    $options  = get_option( $args[ 'option' ], array() );
     15    $name     = $args['config'];
     16    $button   = ! empty( $options ) ? "Deactivate" : "Activate";
     17
     18    if ( $name == 'coming' ) {
    1919      echo '<div class="link-activate"><button type="" name="" class="btn btn--full tool-activate">Coming Soon</button></div>';
    2020      return;
     
    2222
    2323    echo '<form method="post" action="options.php" class="inline-block">';
    24     echo '<input type="checkbox" id="'. esc_attr( $name ) .'Checkbox" name="'. esc_attr( $args[ 'option_name' ] ) .'['. esc_attr( $name ) .']"style="display:none">';
    25     echo '<input type="hidden" id="' . esc_attr( $name ) . 'Config" name="'. esc_attr( $args[ 'option_name' ] ) .'[config]" value="' . esc_attr( $args[ 'config' ] ) . '">';
    26     settings_fields( $args[ 'option_name' ] );
     24    echo '<input type="checkbox" id="'. esc_attr( $name ) .'Checkbox" name="'. esc_attr( $args[ 'option' ] ) .'[check]"style="display:none">';
     25    settings_fields( $args[ 'option' ] );
    2726    echo '<div class="link-activate"><button type="submit" name="" class="btn btn--full '. esc_attr( strtolower( $name ) ).'-activate">' . esc_html( $button ) . '</button></div>';
    2827    echo '</form> ';
     
    3231  public function setupKeyTab( $args ) {
    3332
    34     $existKey = get_option( $args[ 'option_name' ], array() );
     33    $existKey = get_option( $args[ 'option' ], array() );
    3534    $totalKey = isset( $args['key'] ) ? $args['key'] : true;
    3635    echo '<div class="container"><div class="api-input-form">';
     
    6160  public function keySetting( $args ) {
    6261
    63     $this->inputFields( 'keyId', $args[ 'option_name' ] );
    64     $this->inputFields( $args[ 'field' ], $args[ 'option_name' ] );
     62    $this->inputFields( 'keyId', $args[ 'option' ] );
     63    $this->inputFields( $args[ 'field' ], $args[ 'option' ] );
    6564
    6665    echo '<input type="submit" name="submit" id="submit" class="btn btn--outline" value="Save">';
    67     echo '<input type="hidden" class="regular-text" id="' . esc_attr( strtolower( $args[ 'field' ] ) ). '" name="' . esc_attr( $args[ 'option_name' ] ) .'[authType]" value="">';
     66    echo '<input type="hidden" class="regular-text" id="' . esc_attr( strtolower( $args[ 'field' ] ) ). '" name="' . esc_attr( $args[ 'option' ] ) .'[authType]" value="">';
    6867
    6968  }
     
    7170  private function inputFields( $fieldName, $optionName ) {
    7271
    73     $image = Anyapi::getImages('tips');
    74     $fields = self::fields();
     72    $image    = Anyapi::getImages( 'tips' );
     73    $fields   = self::fields();
    7574
    7675    foreach ( $fields[ $fieldName ] as $key => $value ) {
     
    8988  public function apiKeyTab( $args ) {
    9089
    91     $options = get_option( $args[ 'option_name' ], array() );
     90    $options = get_option( $args[ 'option' ], array() );
    9291
    9392    if ( empty( $options ) || ! is_array( $options ) ) {
     
    115114
    116115          echo '<form method="post" action="options.php" class="inline-block">';
    117           settings_fields( $args[ 'option_name' ] );
    118           echo '<input type="hidden" name="remove" value="' . esc_attr( $option[ 'id' ] ) . '">';
     116          settings_fields( $args[ 'option' ] );
     117          echo '<input type="hidden" id="'. esc_attr( $args[ 'option' ] ) .'_'. esc_attr( $args[ 'id' ] ) .'" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $args[ 'id' ] ) . ']" value="' . esc_attr( $option[ 'id' ] ) . '">';
     118          echo '<input type="hidden" id="'. esc_attr( $args[ 'option' ] ) .'_'. esc_attr( $args[ 'value' ] ) .'" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $args[ 'value' ] ) . ']" value="">';
    119119          echo '<input type="submit" name="submit" id="submit" class="btn medium btn--outline" value="Remove" onclick="return confirm(\'Are you sure delete this record ?\')">';
    120120          echo '</form>';
     
    147147
    148148          echo '<form method="post" action="options.php" class="inline-block">';
    149           settings_fields( $args[ 'option_name' ] );
    150           echo '<input type="hidden" name="remove" value="' . esc_attr( $option[ 'id' ] ) . '">';
     149          settings_fields( $args[ 'option' ] );
     150          echo '<input type="hidden" id="'. esc_attr( $args[ 'option' ] ) .'_'. esc_attr( $args[ 'id' ] ) .'" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $args[ 'id' ] ) . ']" value="' . esc_attr( $option[ 'id' ] ) . '">';
     151          echo '<input type="hidden" id="'. esc_attr( $args[ 'option' ] ) .'_'. esc_attr( $args[ 'value' ] ) .'" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $args[ 'value' ] ) . ']" value="">';
    151152          echo '<input type="submit" name="submit" id="submit" class="btn medium btn--outline" value="Remove" onclick="return confirm(\'Are you sure delete this record ?\')">';
    152           echo '</form>'; 
     153          echo '</form>';
    153154          echo '</tr>';
    154155
  • anyapi/tags/1.1.0/inc/Views/OrderApi.php

    r3300936 r3323686  
    1616  public function selectApiKey( $args ) {
    1717
    18     $image = Anyapi::getImages('tips');
     18    $image = Anyapi::getImages( 'tips' );
    1919    echo '<div class="api-input-form">';
    2020    echo '<div class="feature-tags"><span class="">Add a new API Integration</span></div>';
     
    7171
    7272    echo '<hr><br>';
    73     $image    = Anyapi::getImages('tips');
    74     $image2   = Anyapi::getImages('lite');
     73    $image    = Anyapi::getImages( 'tips' );
     74    $image2   = Anyapi::getImages( 'lite' );
    7575
    7676    echo '<div class="api-input-form">';
     
    220220      echo "<td><span class=\"record-id tag tag--woo\">" . esc_attr( $option[ 'id' ] ) . "</span></td>";
    221221
    222       $optionIdTrimmed = trim( $option[ 'id' ] );
    223       $optionsId = get_option( $args[ 'anyApiKey' ], array() );
    224       $foundMatch = false;
     222      $optionIdTrimmed  = trim( $option[ 'id' ] );
     223      $optionsId        = get_option( $args[ 'anyApiKey' ], array() );
     224      $foundMatch       = false;
    225225
    226226      foreach ( $optionsId as $optionId ) {
     
    246246      }
    247247
    248       $checked = isset( $option[ $args[ 'value' ] ] ) ? ( $option[ $args[ 'value' ] ] ? true : false) : false;
     248      $checked = isset( $option[ $args[ 'value' ] ] ) ? ( $option[ $args[ 'value' ] ] ? true : false ) : false;
    249249
    250250      echo "<td class=\"text-center\">";
    251251      echo '<form method="post" action="options.php" class="inline-block">';
    252       echo '<div class="ui-toggle"><input type="checkbox" id="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'_' . esc_attr( $option[ 'id' ] ) . '" name="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'[' . esc_attr( $args[ 'value' ] ) . ']" value="1" class="" ' . ( esc_attr( $checked ) ? 'checked' : '') . '><label for="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'_' . esc_attr( $option[ 'id' ] ) . '"><div></div></label></div></td>';
     252      echo '<div class="ui-toggle"><input type="checkbox" id="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'_' . esc_attr( $option[ 'id' ] ) . '" name="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'[' . esc_attr( $args[ 'value' ] ) . ']" value="1" class="" ' . ( esc_attr( $checked ) ? 'checked' : '' ) . '><label for="' . esc_attr( $args[ 'anyApiOrderApi' ] ) .'_' . esc_attr( $option[ 'id' ] ) . '"><div></div></label></div></td>';
    253253
    254254      echo "<td class=\"text-center\">";
  • anyapi/tags/1.1.0/inc/Views/RestApi.php

    r3300936 r3323686  
    1515  public function setupRestApiTab( $args ) {
    1616
    17     $options    = get_option( $args['option_name'], array() );
     17    $options    = get_option( $args[ 'option' ], array() );
    1818    $image      = Anyapi::getImages('tips');
    1919    $fields     = self::fields();
     
    3131      echo '<div class="api-input-form">';
    3232      echo '<label for="' . esc_attr( $label ) . '">' . esc_attr( $label ) . '<div class="image-container"><img src="' . esc_url( $image ) . '" alt="tooltips icon" width="16" height="16"><div class="image-container"><div class="image-info"><p>'. esc_attr( $tooltips ) .'</p></div></div></div></label>';
    33       echo '<select class="dropdown" id="' . esc_attr( $name ) . '" name="' . esc_attr( $args[ 'option_name' ] ) . '[' . esc_attr( $name ) . ']">';
     33      echo '<select class="dropdown" id="' . esc_attr( $name ) . '" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $name ) . ']">';
    3434
    3535      $type = '';
     
    5757    echo '<div class="api-input-form">';
    5858    echo '<label id="bodyLabel" hidden>API BODY<div class="image-container"><img src="' . esc_url( $image ) . '" alt="tooltips icon" width="16" height="16"><div class="image-container"><div class="image-info"><p>API Body</p></div></div></div></label>';
    59     echo '<textarea id="body" name="' . esc_attr( $args['option_name'] ) . '[body]" class="" placeholder="Please input API BODY" rows="6" hidden>' . esc_attr( $textAreaValue ) . '</textarea></div>';
     59    echo '<textarea id="body" name="' . esc_attr( $args[ 'option' ] ) . '[body]" class="" placeholder="Please input API BODY" rows="6" hidden>' . esc_attr( $textAreaValue ) . '</textarea></div>';
    6060
    6161    foreach ( $fields[ 'text' ] as $key => $value ) {
     
    8888        }
    8989        $editPostKey  = sanitize_text_field( wp_unslash( $_POST[ "edit_post" ] ) );
    90         $input        = get_option( $args[ 'option_name' ] );
     90        $input        = get_option( $args[ 'option' ] );
    9191        $inputValue   = $input[ $editPostKey ][ $name ];
    9292        $this->getId  = $input[ $editPostKey ][ 'url' ];
     
    110110
    111111      echo '<div class="api-input-form">';
    112       echo '<label for="' . esc_attr( $label ) . '">' . esc_attr( $label ) . '<div class="image-container"><img src="' . esc_url( $image ) . '" alt="tooltips icon" width="16" height="16"><div class="image-container"><div class="image-info"><p>'. esc_attr( $tooltips ) .'</p></div></div></div></label><input type="text" id="' . esc_attr( $name ) . '" name="' . esc_attr( $args['option_name'] ) . '[' . esc_attr( $name ) . ']" value="' . esc_attr( $inputValue ) . '" placeholder="' . esc_attr( $placeholder ) . '" required>
     112      echo '<label for="' . esc_attr( $label ) . '">' . esc_attr( $label ) . '<div class="image-container"><img src="' . esc_url( $image ) . '" alt="tooltips icon" width="16" height="16"><div class="image-container"><div class="image-info"><p>'. esc_attr( $tooltips ) .'</p></div></div></div></label><input type="text" id="' . esc_attr( $name ) . '" name="' . esc_attr( $args[ 'option' ] ) . '[' . esc_attr( $name ) . ']" value="' . esc_attr( $inputValue ) . '" placeholder="' . esc_attr( $placeholder ) . '" required>
    113113      </div>';
    114114
     
    119119  public function responseJson( $args ) {
    120120
    121     $options = get_option( $args['option_name'] );
     121    $options = get_option( $args[ 'option' ] );
    122122
    123123    foreach ( $options as &$option ) {
  • anyapi/tags/1.1.0/readme.txt

    r3300936 r3323686  
    1 === AnyAPI ===
     1=== AnyAPI - Integration for WooCommerce API ===
    22Contributors: anyapi
    33Donate link:
    44Tags: api, woocommerce, json, orderapi, filter
    55Tested up to: 6.8
    6 Stable tag: 1.0.0
     6Stable tag: 1.1.0
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4242
    4343
     44== Screenshots ==
     45Dashboard Features
     46Dashboard Setup Key
     47WooCommerce Order API Integration Step 1
     48WooCommerce Order API Integration Step 2
     49WooCommerce Order API Integration Step 3
     50
    4451== Changelog ==
    4552
    46 = 1.0.0 =
     53= 1.1.0 - 2025-07-07 =
     54### Added
     55- API Logs for any API Integrations
     56
     57= 1.0.0 - 2025-05-27 =
    4758* Initial Release.
  • anyapi/tags/1.1.0/templates/dashboard.php

    r3300936 r3323686  
    7171              <div class="call-to-action">
    7272                <?php
    73                   do_settings_sections( 'anyapi_restapi' );
     73                  do_settings_sections( 'anyapi_restapi_function' );
     74                ?>
     75              </div>
     76            </div>
     77          </div>
     78
     79          <div class="feature api-logs">
     80            <div class="feature-content">
     81              <div class="feature-tags">
     82                <span class="tag tag--codefree">Code-free</span>
     83                <span class="tag tag--woo">New !</span>
     84              </div>
     85
     86              <p class="feature-title">API Integration Logs</p>
     87              <ul class="feature-attributes">
     88                <li class="feature-attribute">
     89                  <span><strong>Log all the API data</strong></span>
     90                </li>
     91                <li class="feature-attribute">
     92                  <span><strong>API Integration</strong> Logs</span>
     93                </li>
     94                <li class="feature-attribute">
     95                  <span><strong>HTTP</strong> Response</span>
     96                </li>
     97              </ul>
     98
     99              <div class="call-to-action">
     100                <?php
     101                  do_settings_sections( 'anyapi_apilog_function' );
    74102                ?>
    75103              </div>
     
    89117                </li>
    90118                <li class="feature-attribute">
    91                   <span><strong>API Integration</strong> Logs</span>
     119                  <span><strong>Filter</strong> Product API fields</span>
    92120                </li>
    93121                <li class="feature-attribute">
    94                   <span><strong>HTTP</strong> Response</span>
     122                  <span><strong>Trigger</strong> Order Status</span>
    95123                </li>
    96124              </ul>
     
    98126              <div class="call-to-action">
    99127                <?php
    100                   do_settings_sections( 'anyapi_wcapi_log' );
     128                  do_settings_sections( 'anyapi_coming_function' );
    101129                ?>
    102130              </div>
  • anyapi/tags/1.1.0/templates/restapi.php

    r3300936 r3323686  
    1313
    1414  <div class="tab-content-tools">
    15    
     15
    1616    <div id="tab-1" class="tab-pane-tools active">
    1717
Note: See TracChangeset for help on using the changeset viewer.