PATH:
home
/
letacommog
/
rdvenunclick.fr1
/
wp-content
/
plugins
/
dokan-pro
/
modules
/
subscription
/
assets
/
js
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=82)}({1:function(t,e,n){"use strict";function r(t,e,n,r,o,i,a,s){var c,u="function"==typeof t?t.options:t;if(e&&(u.render=e,u.staticRenderFns=n,u._compiled=!0),r&&(u.functional=!0),i&&(u._scopeId="data-v-"+i),a?(c=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},u._ssrRegister=c):o&&(c=s?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(u.functional){u._injectStyles=c;var l=u.render;u.render=function(t,e){return c.call(e),l(t,e)}}else{var d=u.beforeCreate;u.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:u}}n.d(e,"a",(function(){return r}))},17:function(t,e,n){},2:function(t,e,n){t.exports=n(5)},3:function(t,e){function n(t,e,n,r,o,i,a){try{var s=t[i](a),c=s.value}catch(t){return void n(t)}s.done?e(c):Promise.resolve(c).then(r,o)}t.exports=function(t){return function(){var e=this,r=arguments;return new Promise((function(o,i){var a=t.apply(e,r);function s(t){n(a,o,i,s,c,"next",t)}function c(t){n(a,o,i,s,c,"throw",t)}s(void 0)}))}}},5:function(t,e,n){var r=function(t){"use strict";var e=Object.prototype,n=e.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",i=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function s(t,e,n,r){var o=e&&e.prototype instanceof l?e:l,i=Object.create(o.prototype),a=new k(r||[]);return i._invoke=function(t,e,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return S()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=b(a,n);if(s){if(s===u)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=c(t,e,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===u)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(t,n,a),i}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=s;var u={};function l(){}function d(){}function f(){}var p={};p[o]=function(){return this};var h=Object.getPrototypeOf,_=h&&h(h(x([])));_&&_!==e&&n.call(_,o)&&(p=_);var v=f.prototype=l.prototype=Object.create(p);function y(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function g(t,e){var r;this._invoke=function(o,i){function a(){return new e((function(r,a){!function r(o,i,a,s){var u=c(t[o],t,i);if("throw"!==u.type){var l=u.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?e.resolve(d.__await).then((function(t){r("next",t,a,s)}),(function(t){r("throw",t,a,s)})):e.resolve(d).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,s)}))}s(u.arg)}(o,i,r,a)}))}return r=r?r.then(a,a):a()}}function b(t,e){var n=t.iterator[e.method];if(void 0===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=void 0,b(t,e),"throw"===e.method))return u;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=c(n,t.iterator,e.arg);if("throw"===r.type)return e.method="throw",e.arg=r.arg,e.delegate=null,u;var o=r.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,u):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,u)}function m(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(m,this),this.reset(!0)}function x(t){if(t){var e=t[o];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,i=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return i.next=i}}return{next:S}}function S(){return{value:void 0,done:!0}}return d.prototype=v.constructor=f,f.constructor=d,f[a]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,f):(t.__proto__=f,a in t||(t[a]="GeneratorFunction")),t.prototype=Object.create(v),t},t.awrap=function(t){return{__await:t}},y(g.prototype),g.prototype[i]=function(){return this},t.AsyncIterator=g,t.async=function(e,n,r,o,i){void 0===i&&(i=Promise);var a=new g(s(e,n,r,o),i);return t.isGeneratorFunction(n)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},y(v),v[a]="Generator",v[o]=function(){return this},v.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=x,k.prototype={constructor:k,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&n.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=void 0)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(n,r){return a.type="throw",a.arg=t,e.next=n,r&&(e.method="next",e.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),c=n.call(i,"finallyLoc");if(s&&c){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,u):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),u},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),u}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var o=r.arg;w(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:x(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}},t}(t.exports);try{regeneratorRuntime=r}catch(t){Function("r","regeneratorRuntime = r")(r)}},75:function(t,e,n){"use strict";var r=n(17);n.n(r).a},82:function(t,e,n){"use strict";n.r(e);var r=n(2),o=n.n(r),i=n(3),a=n.n(i),s={name:"Subscriptions",components:{ListTable:dokan_get_lib("ListTable")},data:function(){return{showCb:!0,counts:{all:0},totalItems:0,perPage:10,totalPages:1,loading:!1,columns:{user_name:{label:this.__("User Name","dokan")},subscription_title:{label:this.__("Subscription Pack","dokan")},start_date:{label:this.__("Start Date","dokan")},end_date:{label:this.__("End Date","dokan")},status:{label:this.__("Status","dokan")},action:{label:this.__("Action","dokan")}},actions:[],bulkActions:[{key:"cancel",label:this.__("Cancel Subscription","dokan")},{key:"activate",label:this.__("Activate Subscription","dokan")}],vendors:[]}},watch:{"$route.query.status":function(){this.fetchSubscription()},"$route.query.page":function(){this.fetchSubscription()},"$route.query.orderby":function(){this.fetchSubscription()},"$route.query.order":function(){this.fetchSubscription()}},computed:{currentStatus:function(){return this.$route.query.status||"all"},currentPage:function(){var t=this.$route.query.page||1;return parseInt(t)},sortBy:function(){return this.$route.query.orderby||"registered"},sortOrder:function(){return this.$route.query.order||"desc"}},created:function(){this.fetchSubscription()},methods:{toggleSubscription:function(t){var e=this;t.status&&t.has_active_cancelled_sub?this.$swal({title:this.__("Cancel Subscription","dokan"),type:"warning",html:"Subscriptoin will be cancelled at ".concat(t.end_date," automatically"),showCancelButton:t.is_recurring,confirmButtonText:this.__("Cancel now","dokan"),cancelButtonText:this.__("Don't cancel subscription","dokan")}).then(function(){var n=a()(o.a.mark((function n(r){var i,a,s;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r.dismiss||"overlay"!==r.dismiss){n.next=2;break}return n.abrupt("return");case 2:return e.loading=!0,i="",a=!1,r.value&&(i="cancel",a=!0),r.dismiss&&"cancel"===r.dismiss&&(i="activate"),n.next=9,e.updateSubscriptonStatus(t.id,i,a);case 9:n.sent&&(e.loading=!1,s="cancel"===i?e.__("cancelled","dokan"):e.__("re-activated","dokan"),e.$swal.fire({title:e.__("Subscription has been ".concat(s),"dokan"),type:"success",showConfirmButton:!1,timer:2e3})),location.reload();case 12:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}()):this.$swal({title:this.__("Cancel Subscription","dokan"),type:"warning",showCancelButton:!0,cancelButtonText:this.__("Don't cancel","dokan"),confirmButtonText:this.__("Cancel subscription","dokan"),input:"radio",inputOptions:{immediately:this.__('Immediately <span class="date">'.concat(t.current_date,"</span>"),"dokan"),end_of_current_period:this.__('End of the current period <span class="date">'.concat(t.end_date,"</span>"),"dokan")}}).then(function(){var n=a()(o.a.mark((function n(r){var i;return o.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!r.dismiss&&r.value){n.next=2;break}return n.abrupt("return");case 2:return e.loading=!0,"cancel",i="immediately"===r.value,n.next=7,e.updateSubscriptonStatus(t.id,"cancel",i);case 7:n.sent&&(e.loading=!1,e.$swal.fire({title:e.__("Subscription has been cancelled","dokan"),type:"success",showConfirmButton:!1,timer:2e3})),location.reload();case 10:case"end":return n.stop()}}),n)})));return function(t){return n.apply(this,arguments)}}())},buttonTitle:function(t){return t.status&&t.has_active_cancelled_sub?this.__("Reactivate","dokan"):this.__("Cancel","dokan")},updatedCounts:function(t){this.counts.all=parseInt(t.getResponseHeader("X-WP-Total"))},updatePagination:function(t){this.totalPages=parseInt(t.getResponseHeader("X-WP-TotalPages")),this.totalItems=parseInt(t.getResponseHeader("X-WP-Total"))},updateSubscriptonStatus:function(t,e,n){var r={action:e,immediately:n};return new Promise((function(e,n){dokan.api.put("/subscription/"+t,r).done((function(t,r,o){"success"===r?e(!0):n(new Error("Something went wrong"))}))}))},fetchSubscription:function(){var t=this,e=this;e.loading=!0,dokan.api.get("/subscription",{per_page:e.perPage,paged:e.currentPage,order:this.sortOrder}).done((function(n,r,o){if("no_subscription"==n.code)return e.loading=!1;e.vendors=n,e.loading=!1,t.updatedCounts(o),t.updatePagination(o)}))},goToPage:function(t){this.$router.push({name:"Subscriptions",query:{page:t}})},onBulkAction:function(t,e){var n="activate"===t?this.__("Want to activate the subscription again?","dokan"):this.__("Are you sure to cancel the subscription?","dokan");if(confirm(n)){var r={action:t,user_ids:e};this.loading=!0,dokan.api.put("/subscription/batch",r).done((function(t){location.reload()}))}},subscriptionUrl:function(t){return dokan.urls.adminRoot+"post.php?post="+t+"&action=edit"},subscriptionStatus:function(t){return t.status&&t.has_active_cancelled_sub?this.sprintf(this.__("Active (Cancels %s)","dokan"),t.end_date):t.status?this.__("Active","dokan"):this.__("Inactive","dokan")},subscriptionEndDate:function(t){return t.is_recurring?this.__("Recurring","dokan"):t.end_date}}},c=(n(75),n(1)),u=Object(c.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"subscription-list"},[n("h1",{staticClass:"wp-heading-inline"},[t._v(t._s(t.__("Subscription User List","dokan")))]),t._v(" "),n("hr",{staticClass:"wp-header-end"}),t._v(" "),n("ul",{staticClass:"subsubsub"},[n("li",[n("router-link",{attrs:{to:"","active-class":"current",exact:""},domProps:{innerHTML:t._s(t.sprintf(t.__("Total Subscribed Vendors <span class='count'>(%s)</span>","dokan"),t.counts.all))}})],1)]),t._v(" "),n("list-table",{attrs:{columns:t.columns,loading:t.loading,rows:t.vendors,actions:t.actions,"show-cb":t.showCb,"total-items":t.totalItems,"bulk-actions":t.bulkActions,"total-pages":t.totalPages,"per-page":t.perPage,"current-page":t.currentPage,"not-found":"No vendors found.","sort-order":t.sortOrder},on:{pagination:t.goToPage,"bulk:click":t.onBulkAction},scopedSlots:t._u([{key:"user_name",fn:function(e){return[n("strong",[n("a",{attrs:{href:e.row.user_link}},[t._v(t._s(e.row.user_name?e.row.user_name:t.__("(no name)","dokan")))])])]}},{key:"subscription_title",fn:function(e){return[n("strong",[n("a",{attrs:{href:t.subscriptionUrl(e.row.subscription_id)}},[t._v(t._s(e.row.subscription_title?e.row.subscription_title:t.__("(no name)","dokan")))])])]}},{key:"end_date",fn:function(e){return[t._v("\n "+t._s(t.subscriptionEndDate(e.row))+"\n ")]}},{key:"status",fn:function(e){return[t._v("\n "+t._s(t.subscriptionStatus(e.row))+"\n ")]}},{key:"action",fn:function(e){return[n("span",{staticClass:"action-btn dashicons dashicons-edit",on:{click:function(n){return t.toggleSubscription(e.row)}}})]}}])})],1)}),[],!1,null,null,null).exports;dokan_add_route(u)}});
[+]
..
[-] admin-script.js
[edit]
[-] script.js
[edit]
[-] style.js
[edit]
[-] subscription.js
[edit]